29 #include "component.h" 139 unsigned int flags()
const;
145 void fade(
bool fade);
void fade()
Fade the gadget.
Definition: gadget.cc:162
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
bool operator!=(const Component &other) const
Check if this gadget refers to the same underlying toolbox component as the given Component...
Definition: gadget.h:117
void remove_loader(Loader *loader, int file_type=-2)
Remove a file loader.
Definition: gadget.cc:472
Class to represent a two-dimensional size.
Definition: size.h:34
Window window() const
Get the window that contains this gadget.
Definition: gadget.h:88
This is the base class for all Gadgets.
Definition: gadget.h:48
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
BBox bounds() const
Get the bounding box of the gadget.
Definition: gadget.cc:250
Class to represent a two dimensional bounding box.
Definition: bbox.h:37
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 ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
unsigned int flags() const
Return the gadget flags.
Definition: gadget.cc:97
int toolbox_class_and_size() const
Get the toolbox class and size for a gadget.
Definition: gadget.cc:81
Size size() const
Return the size of the gadget.
Definition: gadget.cc:410
Point bottom_left() const
Get the bottom left location of gadget.
Definition: gadget.cc:292
Base class for components in an object.
Definition: component.h:42
bool operator!=(const Gadget &other) const
Check if this gadget refers to the same underlying toolbox component as the given Gadget...
Definition: gadget.h:131
Class to represent a position in two dimensional space.
Definition: point.h:36
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
void move_to(const Point &pos)
Move gadget (without resizing)
Definition: gadget.cc:334
void move_by(int bx, int by)
Move gadget relative to it's current position without resizing.
Definition: gadget.cc:385
Class to handle file/data loading from the filer or an external application.
Definition: loader.h:179
void set_flag(unsigned int set)
Sets bits in the gadgets flags.
Definition: gadget.cc:116
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
Window window()
Get the window that contains this gadget.
Definition: gadget.h:83
int toolbox_class() const
Get the toolbox class for a gadget.
Definition: gadget.cc:64
bool operator==(const Component &other) const
Check if this gadget refers to the same underlying toolbox component as the given Component...
Definition: gadget.h:110
The Window object represents a toolbox window.
Definition: window.h:69
Gadget()
Construct an uninitialised gadget.
Definition: gadget.h:61
Gadget(const Component &other)
Construct a gadget as a copy of another component object.
Definition: gadget.h:78
bool operator==(const Gadget &other) const
Check if this gadget refers to the same underlying toolbox component as the given Gadget...
Definition: gadget.h:124
void add_loader(Loader *loader, int file_type=-2)
Add a file loader.
Definition: gadget.cc:458
Gadget & operator=(const Component &other)
Assign this gadget to refer to the same underlying toolbox gadget as the specified Component...
Definition: gadget.h:103
Point top_left() const
Get the top left location of gadget.
Definition: gadget.cc:313
Gadget & operator=(const Gadget &other)
Assign this gadget to refer to the same underlying toolbox gadget as another gadget.
Definition: gadget.h:94
Component()
Construct an uninitialised component.
Definition: component.h:55
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
std::vector< IconHandle > icon_list()
Get list of icons used in this gadget.
Definition: gadget.cc:220
void clear_flag(unsigned int clear)
Clear bits in the gadget flags.
Definition: gadget.cc:140
bool faded() const
Check if the gadget is faded.
Definition: gadget.cc:191
void unfade()
Clear the gadgets fade state.
Definition: gadget.cc:170
int _id
Underlying toolbox component id.
Definition: component.h:46
Gadget(const Gadget &other)
Construct a gadget as a copy of another gadget object.
Definition: gadget.h:68
void focus()
Set input focus to the gadget.
Definition: gadget.cc:202