29 #include "component.h" 35 class AboutToBeShownListener;
36 class HasBeenHiddenListener;
37 class SubMenuListener;
38 class MenuSelectionListener;
51 enum { TOOLBOX_CLASS = 0x828c0 };
82 Menu(
const char *template_name) :
Object(template_name) {check_toolbox_class(Menu::TOOLBOX_CLASS);}
136 int height()
const {
return int_property(22);}
141 int width()
const {
return int_property(23);}
146 void title(
const std::string &title) {string_property(24, title);}
151 std::string
title()
const {
return string_property(25);}
238 void text(
const std::string &text);
239 std::string text()
const;
240 int text_length()
const;
242 void sprite_name(
const std::string &name);
243 std::string sprite_name()
const;
244 int sprite_name_length()
const;
246 void submenu(
const Object &
object);
247 void clear_submenu();
248 bool has_submenu()
const;
250 void submenu_event(
int id);
251 int submenu_event()
const;
253 void click_show(
const Object &
object,
bool transient =
true);
254 void clear_click_show();
255 bool has_click_show()
const;
256 Object click_show(
bool *
transient = 0);
257 void click_event(
int id);
258 int click_event()
const;
260 void help_message(
const std::string &msg);
261 std::string help_message()
const;
262 int help_message_length()
const;
270 void add_selection_command(
Command *command);
271 void remove_selection_command(
Command *command);
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
const ComponentId NULL_ComponentId
NULL component id.
Definition: handles.h:46
Listener for about to be shown event.
Definition: abouttobeshownlistener.h:76
ObjectId handle() const
Return the object handle for his component.
Definition: component.h:95
int ComponentId
Type for underlying toolbox component id.
Definition: handles.h:33
Base class for commands in tbx.
Definition: command.h:36
Classes to use/edit toolbox resources in memory.
Base class for components in an object.
Definition: component.h:42
unsigned int ObjectId
Type for underlying toolbox object id.
Definition: handles.h:31
ComponentId id() const
Get the component ID of this component.
Definition: component.h:103
Listener for an object has been hidden event.
Definition: hasbeenhiddenlistener.h:36
ObjectId _handle
Underlying toolbox handle.
Definition: component.h:45
int _id
Underlying toolbox component id.
Definition: component.h:46
Class to manipulate a toolbox object.
Definition: object.h:50
ObjectId handle() const
Return the underlying toolbox object id this object references.
Definition: object.h:93