36 #include "valuechangedlistener.h"
42 class SliderValueChangedListener;
51 enum {TOOLBOX_CLASS = 576};
139 void get_bounds(
int &lower,
int &upper)
const;
void value(int value)
Set the value of the slider.
Definition: slider.h:128
Slider & operator=(const Slider &other)
Assign a slider to refer to the same underlying toolbox gadget as another.
Definition: slider.h:91
Slider(const Component &other)
Construct a slider from a gadget.
Definition: slider.h:85
bool drag_start_or_click() const
Check if value was changed by a click or start of dragging of the bar.
Definition: slider.h:186
This is the base class for all Gadgets.
Definition: gadget.h:48
bool drag_ended() const
Check if this is the end of a drag.
Definition: slider.h:198
WimpColour background_colour() const
Get the background colour of the slider.
Definition: slider.cc:295
~Slider()
Destroy a slider gadget.
Definition: slider.h:59
void get_bounds(int &lower, int &upper, int &step_size) const
Get all three bounds at once.
Definition: slider.cc:58
PollBlock & _data
raw data from the event
Definition: eventinfo.h:53
bool operator==(const Gadget &other) const
Check if this slider refers to the same underlying toolbox gadget as another gadget.
Definition: slider.h:115
void add_value_changed_listener(SliderValueChangedListener *listener)
Add Listener for changes in the slider.
Definition: slider.cc:332
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
bool drag_in_progress() const
Check if the drag is in progress.
Definition: slider.h:192
int upper_bound() const
Get Upper bound of slider.
Definition: slider.cc:148
Listener for changes in the slider value.
Definition: slider.h:204
void check_toolbox_class(int class_id) const
Check the underlying gadget class for this object has the given class id.
Definition: gadget.cc:47
int step_size() const
Get step size of slider.
Definition: slider.cc:178
Event details for a change of an integer value in a gadget.
Definition: valuechangedlistener.h:38
int int_property(int property_id) const
Get an integer property from the toolbox Component.
Definition: component.cc:165
WimpColour bar_colour() const
Get the bar colour of the slider.
Definition: slider.cc:255
Class to represent a standard desktop WIMP colour.
Definition: colour.h:146
Slider & operator=(const Gadget &other)
Assign a slider to refer to the same underlying toolbox gadget as an existing Gadget.
Definition: slider.h:99
Slider(const Slider &other)
Construct a slider from another slider.
Definition: slider.h:66
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
Base class for components in an object.
Definition: component.h:42
void set_bounds(int lower, int upper, int step_size)
Set all three bounds at once.
Definition: slider.cc:42
virtual void slider_value_changed(const SliderValueChangedEvent &event)=0
Method called when the slider value has changed.
The Window object represents a toolbox window.
Definition: window.h:69
Base class for all toolbox event listeners.
Definition: listener.h:33
void set_colour(WimpColour bar, WimpColour background)
Set colours for the bar and background of the slider.
Definition: slider.cc:196
int word[64]
Array containing information return from Wimp_Poll.
Definition: pollinfo.h:76
int value() const
Get the value of the slider.
Definition: slider.h:134
SliderValueChangedEvent(IdBlock &id_block, PollBlock &data)
Construct the event from Toolbox and WIMP event data.
Definition: slider.h:176
Slider & operator=(const Component &other)
Assign a slider to refer to the same underlying toolbox component as an existing Gadget.
Definition: slider.h:108
Listener for value changed events.
Definition: valuechangedlistener.h:61
int lower_bound() const
Get Lower bound of slider.
Definition: slider.cc:119
void remove_value_changed_listener(SliderValueChangedListener *listener)
Remove Listener for changes in the slider.
Definition: slider.cc:341
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
const IdBlock & id_block() const
IdBlock for the current event.
Definition: eventinfo.h:71
Slider(const Gadget &other)
Construct a slider from another gadget.
Definition: slider.h:77
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
void get_colour(WimpColour &bar, WimpColour &background)
Get colours for the bar and background of the slider.
Definition: slider.cc:214
int _id
Underlying toolbox component id.
Definition: component.h:46
bool operator!=(const Gadget &other) const
Check if this slider refers to the same underlying toolbox gadget as another gadget.
Definition: slider.h:122
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
A Slider is a gadget that shows bar in a well which may be draggable by the user. ...
Definition: slider.h:48
Information on event generated when the value of the slider has been changed.
Definition: slider.h:167
Slider()
Construct an uninitialised slider.
Definition: slider.h:53