36 class UserEventListener;
37 class ObjectDeletedListener;
78 Object(
const std::string &template_name);
bool operator!=(const Object &other) const
Check if this object does not reference the same toolbox object as another.
Definition: object.h:114
int int_property(int property_id) const
Return the value of a property that returns an integer.
Definition: object.cc:477
void add_object_deleted_listener(ObjectDeletedListener *listener)
Add listener for when the toolbox object referenced by this object has been deleted.
Definition: object.cc:408
void remove_command(int command_id, Command *command)
Remove a command from this object.
Definition: object.cc:365
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
Object()
Constructs an object unattached to a toolbox object.
Definition: object.h:63
Component ancestor_component() const
Get ancestor component.
Definition: object.cc:216
int toolbox_class() const
Get the toolbox class of this object.
Definition: object.cc:104
Base class for a resource object that can be edited.
Definition: resobject.h:53
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93
void show_at_pointer()
Show the object at the current mouse position.
Definition: object.cc:282
ObjectId _handle
Handle for toolbox object.
Definition: object.h:175
std::string string_property(int property_id) const
Return the value of a property that returns text.
Definition: object.cc:519
void set_handler(int action, Listener *listener, RawToolboxEventHandler handler)
Set handler for an event that should not have more than one listener.
Definition: object.cc:461
Base class for components in an object.
Definition: component.h:42
void hide()
Hide the object.
Definition: object.cc:303
int string_property_length(int property_id) const
Gets the size of a string properties buffer.
Definition: object.cc:572
void add_user_event_listener(int event_id, UserEventListener *listener)
Add a user event listener.
Definition: object.cc:381
const ObjectId NULL_ObjectId
NULL object id.
Definition: handles.h:42
Component parent_component() const
Get parent component.
Definition: object.cc:181
void remove_object_deleted_listener(ObjectDeletedListener *listener)
Remove listener for when the toolbox object referenced by this object has been deleted.
Definition: object.cc:419
Object parent_object() const
Get parent object.
Definition: object.cc:163
void remove_all_listeners()
Remove all listeners and commands from this object.
Definition: object.cc:334
void check_toolbox_class(int class_id) const
Check if this objects toolbox class is as specified.
Definition: object.cc:122
void show()
Show the object at the default place.
Definition: object.cc:240
void remove_listener(int action, Listener *listener)
Remove listener for toolbox event.
Definition: object.cc:447
void remove_user_event_listener(int event_id, UserEventListener *listener)
Remove a user event listener from this object.
Definition: object.cc:395
void(* RawToolboxEventHandler)(IdBlock &id_block, PollBlock &data, Listener *listener)
Function type for handlers of raw (unprocessed) Toolbox events.
Definition: pollinfo.h:86
Class to manipulate a toolbox object.
Definition: object.h:51
Base class for all toolbox event listeners.
Definition: listener.h:34
Base class for commands in tbx.
Definition: command.h:37
Listener for toolbox object deleted event.
Definition: objectdeletedlistener.h:49
Object(ObjectId handle)
Construct an object referencing the given toolbox object.
Definition: object.h:70
Object & operator=(const Object &other)
Assign this object to reference the same toolbox object as another.
Definition: object.h:100
void add_listener(int action, Listener *listener, RawToolboxEventHandler handler)
Add a listener for the given toolbox event.
Definition: object.cc:434
bool showing() const
Check if an object is currently showing.
Definition: object.cc:316
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
void add_command(int command_id, Command *command)
Add a command to this Object.
Definition: object.cc:351
Object ancestor_object() const
Get ancestor object.
Definition: object.cc:198
bool bool_property(int property_id) const
Get a boolean property from the toolbox Cobject.
Definition: object.cc:595
bool operator==(const Object &other) const
Check if this object references the same toolbox object as another.
Definition: object.h:107
void delete_object()
Delete the underlying toolbox object.
Definition: object.cc:89
A UserEventListener can be used to capture any event on an object or component.
Definition: usereventlistener.h:62
Object(const Object &other)
Construct an object referencing the same toolbox object as another.
Definition: object.h:76
void show_centred()
Show the object in the centre of the screen.
Definition: object.cc:261
void * client_handle() const
Return user defined handle stored against this object.
Definition: object.cc:136