18 #include "pandabase.h"
21 #include "pgSliderBarNotify.h"
22 #include "pgButtonNotify.h"
51 virtual void adjust();
57 void setup_scroll_bar(
bool vertical, PN_stdfloat length, PN_stdfloat width, PN_stdfloat bevel);
58 void setup_slider(
bool vertical, PN_stdfloat length, PN_stdfloat width, PN_stdfloat bevel);
60 INLINE
void set_axis(
const LVector3 &axis);
61 INLINE
const LVector3 &get_axis()
const;
63 INLINE
void set_range(PN_stdfloat min_value, PN_stdfloat max_value);
64 INLINE PN_stdfloat get_min_value()
const;
65 INLINE PN_stdfloat get_max_value()
const;
67 INLINE
void set_scroll_size(PN_stdfloat scroll_size);
68 INLINE PN_stdfloat get_scroll_size()
const;
70 INLINE
void set_page_size(PN_stdfloat page_size);
71 INLINE PN_stdfloat get_page_size()
const;
73 INLINE
void set_value(PN_stdfloat value);
74 INLINE PN_stdfloat get_value()
const;
76 INLINE
void set_ratio(PN_stdfloat ratio);
77 INLINE PN_stdfloat get_ratio()
const;
79 INLINE
bool is_button_down()
const;
81 INLINE
void set_resize_thumb(
bool resize_thumb);
82 INLINE
bool get_resize_thumb()
const;
84 INLINE
void set_manage_pieces(
bool manage_pieces);
85 INLINE
bool get_manage_pieces()
const;
87 INLINE
void set_thumb_button(
PGButton *thumb_button);
88 INLINE
void clear_thumb_button();
89 INLINE
PGButton *get_thumb_button()
const;
91 INLINE
void set_left_button(
PGButton *left_button);
92 INLINE
void clear_left_button();
93 INLINE
PGButton *get_left_button()
const;
95 INLINE
void set_right_button(
PGButton *right_button);
96 INLINE
void clear_right_button();
97 INLINE
PGButton *get_right_button()
const;
99 INLINE
static string get_adjust_prefix();
100 INLINE
string get_adjust_event()
const;
108 virtual void frame_changed();
110 virtual void item_transform_changed(
PGItem *item);
111 virtual void item_frame_changed(
PGItem *item);
112 virtual void item_draw_mask_changed(
PGItem *item);
118 INLINE
void internal_set_ratio(PN_stdfloat ratio);
121 void advance_scroll();
124 void continue_drag();
128 bool _needs_remanage;
129 bool _needs_recompute;
130 bool _needs_reposition;
132 PN_stdfloat _min_value, _max_value;
133 PN_stdfloat _scroll_value, _scroll_ratio;
134 PN_stdfloat _page_value, _page_ratio;
145 PN_stdfloat _min_x, _max_x, _thumb_width, _range_x;
147 PGItem *_scroll_button_held;
148 bool _mouse_button_page;
150 double _next_advance_time;
152 PN_stdfloat _drag_start_x;
158 static void init_type() {
160 register_type(_type_handle,
"PGSliderBar",
161 PGItem::get_class_type());
164 return get_class_type();
166 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
174 #include "pgSliderBar.I"
A basic node of the scene graph or data graph.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this node by the indicated matrix, if it means anything to do so...
This is the base class for all the various kinds of gui widget objects.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
PGItemNotify * get_notify() const
Returns the object which will be notified when the PGItem changes, if any.
This is a 4-by-4 transform matrix.
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...
This is a two-component point in space.
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...
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...