25 #ifndef TBX_NUMBERRANGE_H_
26 #define TBX_NUMBERRANGE_H_
34 class ValueChangedListener;
44 enum {TOOLBOX_CLASS = 832};
137 void get_bounds(
int &lower,
int &upper)
const;
int precision() const
Get the precision of the NumberRange.
Definition: numberrange.cc:297
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
A Slider is a gadget that shows bar in a well which may be draggable by the user.
Definition: slider.h:49
NumberRange & operator=(const Gadget &other)
Assign a number range to refer to the same underlying toolbox gadget as an existing Gadget.
Definition: numberrange.h:92
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
Slider slider() const
Get the slider.
Definition: numberrange.cc:366
NumberRange wrapper for an underlying toolbox NumberRange gadget.
Definition: numberrange.h:42
~NumberRange()
Destroy a number range gadget.
Definition: numberrange.h:52
The Window object represents a toolbox window.
Definition: window.h:70
int int_property(int property_id) const
Get an integer property from the toolbox Component.
Definition: component.cc:165
An Adjuster is a gadget that shows two arrows facing in opposite directions either vertically or hori...
Definition: adjuster.h:49
bool operator==(const Gadget &other) const
Check if this number range refers to the same underlying toolbox gadget as another gadget.
Definition: numberrange.h:108
void get_bounds(int &lower, int &upper, int &step_size, int &precision) const
Get the bounds, step size and precision.
Definition: numberrange.cc:69
NumberRange(const Component &other)
Construct a number range from a gadget.
Definition: numberrange.h:78
Base class for components in an object.
Definition: component.h:42
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
NumberRange(const Gadget &other)
Construct a number range from another gadget.
Definition: numberrange.h:70
void value(int value)
Set the value of the number range.
Definition: numberrange.h:122
void set_bounds(int lower, int upper, int step_size, int precision)
Set bounds, step size and precision.
Definition: numberrange.cc:46
Adjuster right_adjuster() const
Get the right adjuster.
Definition: numberrange.cc:349
void remove_value_changed_listener(ValueChangedListener *listener)
Remove listener for when the value of the number range changes.
Definition: numberrange.cc:403
Adjuster left_adjuster() const
Get the left adjuster.
Definition: numberrange.cc:332
NumberRange & operator=(const NumberRange &other)
Assign a number range to refer to the same underlying toolbox gadget as another.
Definition: numberrange.h:84
void add_value_changed_listener(ValueChangedListener *listener)
Add listener for when the value of the number range changes.
Definition: numberrange.cc:395
Listener for value changed events.
Definition: valuechangedlistener.h:62
NumberRange & operator=(const Component &other)
Assign a number range to refer to the same underlying toolbox component as an existing Gadget.
Definition: numberrange.h:101
int step_size() const
Get step size of NumberRange.
Definition: numberrange.cc:256
NumberRange()
Construct an uninitialised number range.
Definition: numberrange.h:46
Gadget numeric_gadget() const
Get the gadget that displays the value of the NumberRange.
Definition: numberrange.cc:315
int _id
Underlying toolbox component id.
Definition: component.h:46
bool operator!=(const Gadget &other) const
Check if this number range refers to the same underlying toolbox gadget as another gadget.
Definition: numberrange.h:115
This is the base class for all Gadgets.
Definition: gadget.h:49
int lower_bound() const
Get Lower bound of NumberRange.
Definition: numberrange.cc:190
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 value() const
Get the value of the number range.
Definition: numberrange.h:130
NumberRange(const NumberRange &other)
Construct a number range from another number range.
Definition: numberrange.h:59
int upper_bound() const
Get Upper bound of NumberRange.
Definition: numberrange.cc:222