Panda3D
 All Classes Functions Variables Enumerations
textGraphic.h
1 // Filename: textGraphic.h
2 // Created by: drose (18Aug06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef TEXTGRAPHIC_H
16 #define TEXTGRAPHIC_H
17 
18 #include "pandabase.h"
19 
20 #include "config_text.h"
21 #include "nodePath.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : TextGraphic
25 // Description : This defines a special model that has been
26 // constructed for the purposes of embedding an
27 // arbitrary graphic image within a text paragraph.
28 //
29 // It can be any arbitrary model, though it should be
30 // built along the same scale as the text, and it should
31 // probably be at least mostly two-dimensional.
32 // Typically, this means it should be constructed in the
33 // X-Z plane, and it should have a maximum vertical (Z)
34 // height of 1.0.
35 //
36 // The frame specifies an arbitrary bounding volume in
37 // the form (left, right, bottom, top). This indicates
38 // the amount of space that will be reserved within the
39 // paragraph. The actual model is not actually required
40 // to fit within this rectangle, but if it does not, it
41 // may visually overlap with nearby text.
42 ////////////////////////////////////////////////////////////////////
43 class EXPCL_PANDA_TEXT TextGraphic {
44 PUBLISHED:
45  INLINE TextGraphic();
46  INLINE TextGraphic(const NodePath &model, const LVecBase4 &frame);
47  INLINE TextGraphic(const NodePath &model, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top);
48 
49  INLINE NodePath get_model() const;
50  INLINE void set_model(const NodePath &model);
51 
52  INLINE LVecBase4 get_frame() const;
53  INLINE void set_frame(const LVecBase4 &frame);
54  INLINE void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top);
55 
56  INLINE bool get_instance_flag() const;
57  INLINE void set_instance_flag(bool instance_flag);
58 
59 private:
60  NodePath _model;
61  LVecBase4 _frame;
62  bool _instance_flag;
63 };
64 
65 #include "textGraphic.I"
66 
67 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:165
This defines a special model that has been constructed for the purposes of embedding an arbitrary gra...
Definition: textGraphic.h:43