25 #ifndef TBX_RES_SHORTCUT_H 26 #define TBX_RES_SHORTCUT_H 38 const int SHORTCUT_SIZE = 16;
48 :
ResBase(
new ResImpl(item_header, 0, SHORTCUT_SIZE, data))
54 void *header()
const {
return _impl->header();}
85 :
ResBase(new ResImpl(new char[SHORTCUT_SIZE], 0, SHORTCUT_SIZE, new ResData()))
87 memset(
_impl->body(), 0, SHORTCUT_SIZE);
100 ResImpl *new_impl =
new ResImpl(*
_impl);
129 bool transient()
const {
return flag(0,1);}
138 void transient(
bool b) {
flag(0,1, b);}
unsigned int flags() const
Get all flags as a word raw access.
Definition: resshortcut.h:114
int event_id() const
Get the event ID to be generated for key.
Definition: resshortcut.h:157
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
void init_string(int offset, const char *value)
Initialise a string in a constructor helper.
Definition: resbase.cc:1725
ResShortcut & operator=(const ResShortcut &other)
Assign this shortcut to be a copy of another.
Definition: resshortcut.h:73
Base class for objects, gadgets and menu items from ressources.
Definition: resbase.h:252
bool flag(int offset, int mask) const
Check if any of the bits in a mask are set.
Definition: resbase.h:352
unsigned int uint_value(int offset) const
Get an unsigned integer value.
Definition: resbase.h:324
Classes to use/edit toolbox resources in memory.
Window resource object.
Definition: reswindow.h:48
ResBase(ResImpl *impl)
Create from internal resource implementation.
Definition: resbase.h:262
Keyboard short cut.
Definition: resshortcut.h:43
int int_value(int offset) const
Get an integer value.
Definition: resbase.h:316
void show(const char *obj)
Set the Toolbox object to show.
Definition: resshortcut.h:175
const char * string(int offset) const
Return a string at the given offset.
Definition: resbase.cc:1555
const char * show() const
Get the Toolbox object to show.
Definition: resshortcut.h:169
void flags(unsigned int value)
Set all flags as a word.
Definition: resshortcut.h:122
The Window object represents a toolbox window.
Definition: window.h:69
void key_code(int code)
Set the WIMP key code for shortcut.
Definition: resshortcut.h:151
void show(const std::string &obj)
Set the Toolbox object to show.
Definition: resshortcut.h:181
ResShortcut(const ResShortcut &other)
Construct shortcut as a copy of another.
Definition: resshortcut.h:62
ResBase & operator=(const ResBase &other)
Assignment.
Definition: resbase.cc:1534
void make_writeable()
Make item writeable.
Definition: resshortcut.h:96
void event_id(int id)
Set the event ID to be generated for key.
Definition: resshortcut.h:163
int key_code() const
Get the WIMP key code for shortcut.
Definition: resshortcut.h:145
ResImpl * _impl
Internal Resource implementation.
Definition: resbase.h:255
ResShortcut(int code)
Construct a new shortcut for the given key code.
Definition: resshortcut.h:84