42 virtual void xform(
const LMatrix4 &mat);
48 virtual void adjust();
54 void setup_scroll_bar(
bool vertical, PN_stdfloat length, PN_stdfloat width, PN_stdfloat bevel);
55 void setup_slider(
bool vertical, PN_stdfloat length, PN_stdfloat width, PN_stdfloat bevel);
57 INLINE
void set_axis(
const LVector3 &axis);
58 INLINE
const LVector3 &get_axis()
const;
60 INLINE
void set_range(PN_stdfloat min_value, PN_stdfloat max_value);
61 INLINE PN_stdfloat get_min_value()
const;
62 INLINE PN_stdfloat get_max_value()
const;
64 INLINE
void set_scroll_size(PN_stdfloat scroll_size);
65 INLINE PN_stdfloat get_scroll_size()
const;
67 INLINE
void set_page_size(PN_stdfloat page_size);
68 INLINE PN_stdfloat get_page_size()
const;
70 INLINE
void set_value(PN_stdfloat value);
71 INLINE PN_stdfloat get_value()
const;
73 INLINE
void set_ratio(PN_stdfloat ratio);
74 INLINE PN_stdfloat get_ratio()
const;
76 INLINE
bool is_button_down()
const;
78 INLINE
void set_resize_thumb(
bool resize_thumb);
79 INLINE
bool get_resize_thumb()
const;
81 INLINE
void set_manage_pieces(
bool manage_pieces);
82 INLINE
bool get_manage_pieces()
const;
84 INLINE
void set_thumb_button(
PGButton *thumb_button);
85 INLINE
void clear_thumb_button();
86 INLINE
PGButton *get_thumb_button()
const;
88 INLINE
void set_left_button(
PGButton *left_button);
89 INLINE
void clear_left_button();
90 INLINE
PGButton *get_left_button()
const;
92 INLINE
void set_right_button(
PGButton *right_button);
93 INLINE
void clear_right_button();
94 INLINE
PGButton *get_right_button()
const;
96 INLINE
static std::string get_adjust_prefix();
97 INLINE std::string get_adjust_event()
const;
105 virtual void frame_changed();
107 virtual void item_transform_changed(
PGItem *item);
108 virtual void item_frame_changed(
PGItem *item);
109 virtual void item_draw_mask_changed(
PGItem *item);
115 INLINE
void internal_set_ratio(PN_stdfloat ratio);
118 void advance_scroll();
121 void continue_drag();
125 bool _needs_remanage;
126 bool _needs_recompute;
127 bool _needs_reposition;
129 PN_stdfloat _min_value, _max_value;
130 PN_stdfloat _scroll_value, _scroll_ratio;
131 PN_stdfloat _page_value, _page_ratio;
142 PN_stdfloat _min_x, _max_x, _thumb_width, _range_x;
143 LPoint3 _thumb_start;
144 PGItem *_scroll_button_held;
145 bool _mouse_button_page;
147 double _next_advance_time;
149 PN_stdfloat _drag_start_x;
155 static void init_type() {
158 PGItem::get_class_type());
161 return get_class_type();
163 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
A basic node of the scene graph or data graph.
This is the base class for all the various kinds of gui widget objects.
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.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PGItemNotify * get_notify() const
Returns the object which will be notified when the PGItem changes, if any.
virtual void release(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever a mouse or keyboard button previously depressed wit...
virtual void move(const MouseWatcherParameter ¶m)
This is a callback hook function, called whenever a mouse is moved while within the region.
Objects that inherit from this class can receive notify messages when a slider bar moves or otherwise...
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
virtual void set_active(bool active)
Sets whether the PGItem is active for mouse watching.
virtual void press(const MouseWatcherParameter ¶m, bool background)
This is a callback hook function, called whenever a mouse or keyboard button is depressed while the m...
void set_notify(PGItemNotify *notify)
Sets the object which will be notified when the PGItem changes.
This is a particular kind of PGItem that draws a little bar with a slider that moves from left to rig...