55 explicit PGItem(
const std::string &name);
58 INLINE
void set_name(
const std::string &name);
64 virtual void transform_changed();
65 virtual void draw_mask_changed();
70 virtual void compute_internal_bounds(CPT(
BoundingVolume) &internal_bounds,
71 int &internal_vertices,
73 Thread *current_thread)
const;
80 virtual void xform(
const LMatrix4 &mat);
81 bool activate_region(
const LMatrix4 &transform,
int sort,
92 virtual void focus_in();
93 virtual void focus_out();
106 INLINE
bool has_notify()
const;
110 INLINE
void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top);
111 INLINE
void set_frame(
const LVecBase4 &frame);
112 INLINE
const LVecBase4 &get_frame()
const;
113 INLINE
bool has_frame()
const;
114 INLINE
void clear_frame();
117 INLINE
int get_state()
const;
119 virtual void set_active(
bool active);
120 INLINE
bool get_active()
const;
122 virtual void set_focus(
bool focus);
123 INLINE
bool get_focus()
const;
125 void set_background_focus(
bool focus);
126 INLINE
bool get_background_focus()
const;
128 INLINE
void set_suppress_flags(
int suppress_flags);
129 INLINE
int get_suppress_flags()
const;
131 int get_num_state_defs()
const;
132 void clear_state_def(
int state);
133 bool has_state_def(
int state)
const;
134 INLINE
NodePath &get_state_def(
int state);
135 MAKE_SEQ(get_state_defs, get_num_state_defs, get_state_def);
139 void set_frame_style(
int state,
const PGFrameStyle &style);
141 INLINE
const std::string &get_id()
const;
142 INLINE
void set_id(
const std::string &
id);
144 INLINE
static std::string get_enter_prefix();
145 INLINE
static std::string get_exit_prefix();
146 INLINE
static std::string get_within_prefix();
147 INLINE
static std::string get_without_prefix();
148 INLINE
static std::string get_focus_in_prefix();
149 INLINE
static std::string get_focus_out_prefix();
150 INLINE
static std::string get_press_prefix();
151 INLINE
static std::string get_repeat_prefix();
152 INLINE
static std::string get_release_prefix();
153 INLINE
static std::string get_keystroke_prefix();
155 INLINE std::string get_enter_event()
const;
156 INLINE std::string get_exit_event()
const;
157 INLINE std::string get_within_event()
const;
158 INLINE std::string get_without_event()
const;
159 INLINE std::string get_focus_in_event()
const;
160 INLINE std::string get_focus_out_event()
const;
161 INLINE std::string get_press_event(
const ButtonHandle &button)
const;
162 INLINE std::string get_repeat_event(
const ButtonHandle &button)
const;
163 INLINE std::string get_release_event(
const ButtonHandle &button)
const;
164 INLINE std::string get_keystroke_event()
const;
166 INLINE LMatrix4 get_frame_inv_xform()
const;
169 void set_sound(
const std::string &event,
AudioSound *sound);
170 void clear_sound(
const std::string &event);
171 AudioSound *get_sound(
const std::string &event)
const;
172 bool has_sound(
const std::string &event)
const;
176 INLINE
static void set_text_node(
TextNode *node);
178 INLINE
static PGItem *get_focus_item();
181 void play_sound(
const std::string &event);
183 void reduce_region(LVecBase4 &clip,
PGItem *obscurer)
const;
184 void reduce_region(LVecBase4 &frame, PN_stdfloat px, PN_stdfloat py)
const;
185 LVecBase4 get_relative_frame(
PGItem *item)
const;
186 LPoint3 mouse_to_local(
const LPoint2 &mouse_point)
const;
188 virtual void frame_changed();
191 NodePath &do_get_state_def(
int state);
192 void slot_state_def(
int state);
193 void update_frame(
int state);
194 void mark_frames_stale();
196 INLINE
static PN_stdfloat compute_area(
const LVecBase4 &frame);
197 INLINE
static void compare_largest(
const LVecBase4 *&largest,
198 PN_stdfloat &largest_area,
199 const LVecBase4 *new_frame);
202 bool clip_frame(
ClipPoints &source_points,
const LPlane &plane)
const;
216 F_background_focus = 0x04,
222 LMatrix4 _frame_inv_xform;
233 StateDefs _state_defs;
241 static PGItem *_focus_item;
244 static BackgroundFocus _background_focus;
250 static void init_type() {
251 PandaNode::init_type();
253 PandaNode::get_class_type());
256 return get_class_type();
258 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The "top" node of the new Panda GUI system.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
This is the base class for all the various kinds of gui widget objects.
set_state
Sets the complete RenderState that will be applied to all nodes at this level and below.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A lightweight reentrant mutex.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This functions similarly to a LightAttrib.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void r_prepare_scene(GraphicsStateGuardianBase *gsg, const RenderState *node_state, GeomTransformer &transformer, Thread *current_thread)
The recursive implementation of prepare_scene().
This is our own Panda specialization on the default STL vector.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a specialization on MouseWatcherRegion, to add a bit more fields that are relevant to the PG ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
A thread; that is, a lightweight process.
The primary interface to this module.
This restricts rendering to within a rectangular region of the scene, without otherwise affecting the...
Objects that inherit from this class can receive specialized messages when PGItems change in certain ...
TypeHandle is the identifier used to differentiate C++ class types.
This is sent along as a parameter to most events generated for a region to indicate the mouse and but...
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.