35 #include "showfullobject.h" 37 #include "eventinfo.h" 43 class AboutToBeShownListener;
44 class HasBeenHiddenListener;
45 class ScaleApplyFactorListener;
61 enum { TOOLBOX_CLASS = 0x82c00 };
97 Scale(
const std::string &template_name) :
ShowFullObject(template_name) {check_toolbox_class(Scale::TOOLBOX_CLASS);}
155 void value(
int pc) {int_property(1, pc);}
160 int value()
const {
return int_property(2);}
163 void lower_bound(
int value);
164 int lower_bound()
const;
165 void upper_bound(
int value);
166 int upper_bound()
const;
167 void step_size(
int value);
168 int step_size()
const;
173 void title(std::string msg) {string_property(5, msg);}
178 std::string
title()
const {
return string_property(6);}
212 int factor()
const {
return _data.word[4];}
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
void value(int pc)
Set the scale percentage.
Definition: scale.h:155
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
Structure holding the raw data from a call to Wimp_Poll.
Definition: pollinfo.h:71
std::string title() const
Return the title of the scale dialogue.
Definition: scale.h:178
Classes to use/edit toolbox resources in memory.
Class to provide apply factor event information for Scale object.
Definition: scale.h:197
int title_length() const
Return the title length.
Definition: scale.h:183
bool operator!=(const Object &other) const
Check if this Scale does not refers to the same underlying toolbox object as another.
Definition: scale.h:142
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
Scale()
Uninitialised constructor.
Definition: scale.h:69
ScaleApplyFactorEvent(IdBlock &id_block, PollBlock &data)
Construct the event from Toolbox and WIMP event data.
Definition: scale.h:206
Scale & operator=(const Scale &other)
Assign this Scale from another.
Definition: scale.h:114
Listener for scale factor events.
Definition: scale.h:218
Window window() const
Return the underlying toolbox window used to implement the Scale object.
Definition: scale.h:148
Scale(const Object &other)
Construct a Scale from an Object that refers to a Scale.
Definition: scale.h:89
The Window object represents a toolbox window.
Definition: window.h:69
void title(std::string msg)
Set the title for the scale dialogue.
Definition: scale.h:173
Class to provide information on a toolbox event.
Definition: eventinfo.h:48
Base class for all toolbox event listeners.
Definition: listener.h:33
Class to show a toolbox Scale object.
Definition: scale.h:58
int value() const
Get the scale percentage.
Definition: scale.h:160
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
Scale(const Scale &other)
Construct from another Scale object.
Definition: scale.h:78
int factor() const
Return the choses scale factor.
Definition: scale.h:212
Objects derived from this class can be shown with there full location and size specified as well as t...
Definition: showfullobject.h:40
Information passed back by the Toolbox with each toolbox event providing information on where the eve...
Definition: pollinfo.h:41
Class to manipulate a toolbox object.
Definition: object.h:50
Scale & operator=(const Object &other)
Assign this Scale from an Object that refers to a Scale.
Definition: scale.h:126
bool operator==(const Object &other) const
Check if this Scale refers to the same underlying toolbox object as another.
Definition: scale.h:134
Class for Scale object template.
Definition: resscale.h:36
Scale(const std::string &template_name)
Create a Scale from the named template.
Definition: scale.h:97
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93