VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dt2DTextBoxFacade.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvCore/vrvCore.h>
12 #include <vrvCore/DtWidgetLabel.h>
13 #include <vrvCore/DtUniqueID.h>
14 #include <vrvUtil/DtUnicode.h>
15 
16 namespace makVrv
17 {
18  class DtWidgetLabelAgent;
19  class DtProjectedWidgetModelAgent;
20  class DtSceneObjectAgent;
21  class DtAgentManagerInterface;
22 
27  {
28  public:
30  Dt2DTextBoxFacade(DtAgentManagerInterface&, DtSceneObjectAgent* agent,
31  DtElementID id, int modelSet);
32 
34  Dt2DTextBoxFacade(DtAgentManagerInterface&, int modelSet, DtElementID id, bool distribute = true);
35 
37  virtual ~Dt2DTextBoxFacade();
38 
40  virtual void setFont(const std::string& font, int size);
41 
43  virtual void getFont(std::string&, int&);
44 
48  virtual void setFontScale(float);
49 
51  virtual float fontScale() const;
52 
54  virtual void setText(const DtUnicode& t);
55 
57  virtual const DtUnicode& text() const;
58 
60  virtual void setTextColor(float r, float g, float b, float a);
61 
63  virtual void setVisible(bool);
64 
66  virtual void setSize(double w, double h);
67 
69  virtual void getSize(double& w, double& h) const;
70 
72  virtual void setBoundsLength(int);
73 
75  virtual int boundsLength() const;
76 
78  virtual void setSizeConstraints(DtWidgetLabel::SizeConstraints);
79 
81  virtual void setTextAlignment(DtWidgetLabel::HorizontalAlignment);
82 
84  virtual void setGlyphCenterPolicy(DtWidgetLabel::GlyphCenterPolicy);
85 
87  virtual void setColor(float r, float g, float b, float a);
88 
90  virtual void setOrigin(float x, float y);
91 
93  virtual makVrv::DtUniqueID uniqueId() const;
94 
96  virtual makVrv::DtElementID elementId() const;
97 
99  virtual int modelSet() const;
100 
102  virtual void setEventsEnabled(bool);
103 
104  protected:
106  void createTextAgents();
107 
108  protected:
110  DtSceneObjectAgent* mySceneObjectAgent;
113 
114  DtWidgetLabelAgent* myTextAgent;
115  DtProjectedWidgetModelAgent* myProjectedWidgetAgent;
116 
118  double myWidth;
119  double myHeight;
120  std::string myFont;
123  float myFontScale;
125  float myOriginX;
126  float myOriginY;
127 
129  };
130 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)