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