VR-Forces 4.1.1 Class Documentation
2dGraphicalObjectTextStateRecord.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2010 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: 2dGraphicalObjectTextStateRecord.h,v $ $Revision: 1.1 $ $State: Exp $
7 *********************************************************************/
8 #pragma once
9 
12 
14 {
15  DtNetFloat32 myFontSize;
16  DtNetU16 myWidth;
17  DtNetU8 myAlignment;
18  DtNetU8 myFontNameSize;
19 };
20 
23 {
24 public:
26  {
27  Dt2DTextAlignmentLeft = 0,
28  Dt2DTextAlignmentCenter = 1,
29  Dt2DTextAlignmentRight = 2,
30  Dt2DTextAlignmentJustify = 3
31  };
32 public:
35 
39 
43 
46 
48  virtual DtEnvironmentalRecord* clone() const;
49 
50  virtual void setFontName(const char* fontName, int length);
51  virtual const char* fontName(int* length = 0) const;
52 
53  virtual void setFontSize(float sizeInPoints);
54  virtual float fontSize() const;
55 
56  virtual void setWidth(int widthInPixels);
57  virtual int width() const;
58 
59  virtual void setAlignment(Dt2DTextAlignment align);
60  virtual Dt2DTextAlignment alignment() const;
61 
63  virtual bool createNetworkRepresentation();
64 
66  virtual void setFromNet(const DtNetEnvironmentalRecord& buffer);
67 
69  const DtNet2DGraphicalObjectTextStateRecord* textNetRep() const;
71 
73  virtual int netRepSize() const;
74 
75 protected:
76  virtual bool resizeNetRep(int newSize);
77  // These functions do the pointer math to get a pointer to
78  // the right place in the internal buffer for the start of these
79  // data areas.
80  virtual void* pointerToFontName() const;
81  virtual void* pointerToVertices() const;
82  virtual void* pointerToApplicationIds() const;
83  virtual void* pointerToParentOverlays() const;
84  virtual void* pointerToWindowName() const;
85  virtual void* pointerToUserData() const;
86 
87 protected:
88  char* myFontName;
90  float myFontSize;
91  int myWidth;
93 };
94 
95 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)