tbx  0.7.5
Public Member Functions | Protected Member Functions | Friends | List of all members
tbx::res::ResShortcut Class Reference

Keyboard short cut. More...

#include <resshortcut.h>

Inheritance diagram for tbx::res::ResShortcut:
tbx::res::ResBase

Public Member Functions

 ResShortcut (const ResShortcut &other)
 Construct shortcut as a copy of another. More...
 
ResShortcutoperator= (const ResShortcut &other)
 Assign this shortcut to be a copy of another. More...
 
 ResShortcut (int code)
 Construct a new shortcut for the given key code. More...
 
unsigned int flags () const
 Get all flags as a word raw access. More...
 
void flags (unsigned int value)
 Set all flags as a word. More...
 
bool transient () const
 Check if show object will be shown transiently. More...
 
void transient (bool b)
 Set if show object will be shown transiently. More...
 
int key_code () const
 Get the WIMP key code for shortcut. More...
 
void key_code (int code)
 Set the WIMP key code for shortcut. More...
 
int event_id () const
 Get the event ID to be generated for key. More...
 
void event_id (int id)
 Set the event ID to be generated for key. More...
 
const char * show () const
 Get the Toolbox object to show. More...
 
void show (const char *obj)
 Set the Toolbox object to show. More...
 
void show (const std::string &obj)
 Set the Toolbox object to show. More...
 
- Public Member Functions inherited from tbx::res::ResBase
 ResBase (const ResBase &other)
 Copy constructor. More...
 
virtual ~ResBase ()
 Destructor.
 
ResBaseoperator= (const ResBase &other)
 Assignment. More...
 

Protected Member Functions

void make_writeable ()
 Make item writeable.
 
- Protected Member Functions inherited from tbx::res::ResBase
 ResBase (ResImpl *impl)
 Create from internal resource implementation. More...
 
const char * string (int offset) const
 Return a string at the given offset. More...
 
void string (int offset, const char *value)
 Set a string at the given offset. More...
 
void string (int offset, std::string value)
 Set a string at the given offset. More...
 
void string_with_length (int offset, const char *value, int length=-1)
 Assign a string where the length is at offset+4. More...
 
void string_with_length (int offset, const std::string &value, int length=-1)
 Assign a string where the length is at offset+4. More...
 
const char * message (int offset) const
 Get the message string at the given offset. More...
 
void message (int offset, const char *value)
 Set a message at the given offset. More...
 
void message (int offset, std::string value)
 Set a message at the given offset. More...
 
void message_with_length (int offset, const char *value, int length=-1)
 Assign a message where the length is at offset+4. More...
 
void message_with_length (int offset, const std::string &value, int length=-1)
 Assign a message where the length is at offset+4. More...
 
int int_value (int offset) const
 Get an integer value. More...
 
void int_value (int offset, int value)
 Set a number at the specified offset. More...
 
unsigned int uint_value (int offset) const
 Get an unsigned integer value. More...
 
void uint_value (int offset, unsigned int value)
 Set an unsigned number at the specified offset. More...
 
unsigned char byte_value (int offset) const
 Get a byte value. More...
 
void byte_value (int offset, unsigned char value)
 Set an unsigned byte (8 bit value) at the specified offset. More...
 
unsigned short ushort_value (int offset) const
 Get a unsigned short value. More...
 
void ushort_value (int offset, unsigned short value)
 Set an unsigned short (16 bit value) at the specified offset. More...
 
bool flag (int offset, int mask) const
 Check if any of the bits in a mask are set. More...
 
void flag (int offset, int mask, bool on)
 Set/clear the bits in mask. More...
 
int flag_value (int offset, int mask) const
 Get the bits for the given mask. More...
 
void flag_value (int offset, int mask, int value)
 Set bits in given mask clearing others. More...
 
void init_string (int offset, const char *value)
 Initialise a string in a constructor helper. More...
 
void init_message (int offset, const char *value)
 Initialise a message in a constructor helper. More...
 
void init_sprite_area_ref (int offset)
 Initialise a sprite area reference. More...
 
void init_object_ref (int offset)
 Initialise an object reference. More...
 

Friends

class ResWindow
 
class tbx::Window
 

Additional Inherited Members

- Protected Attributes inherited from tbx::res::ResBase
ResImpl * _impl
 Internal Resource implementation.
 

Detailed Description

Keyboard short cut.

Constructor & Destructor Documentation

◆ ResShortcut() [1/2]

tbx::res::ResShortcut::ResShortcut ( const ResShortcut other)
inline

Construct shortcut as a copy of another.

Parameters
othershortcut to copy

◆ ResShortcut() [2/2]

tbx::res::ResShortcut::ResShortcut ( int  code)
inline

Construct a new shortcut for the given key code.

Parameters
codeWIMP key code for the short cut

Member Function Documentation

◆ event_id() [1/2]

int tbx::res::ResShortcut::event_id ( ) const
inline

Get the event ID to be generated for key.

Returns
event ID or 0 if none

◆ event_id() [2/2]

void tbx::res::ResShortcut::event_id ( int  id)
inline

Set the event ID to be generated for key.

Parameters
idevent ID or 0 if none

◆ flags() [1/2]

unsigned int tbx::res::ResShortcut::flags ( ) const
inline

Get all flags as a word raw access.

Not normally used as there are named methods that allow access to the individual items in the flags

◆ flags() [2/2]

void tbx::res::ResShortcut::flags ( unsigned int  value)
inline

Set all flags as a word.

Not normally used as there are named methods that allow access to the individual items in the flags

◆ key_code() [1/2]

int tbx::res::ResShortcut::key_code ( ) const
inline

Get the WIMP key code for shortcut.

Returns
WIMP key code

◆ key_code() [2/2]

void tbx::res::ResShortcut::key_code ( int  code)
inline

Set the WIMP key code for shortcut.

Parameters
codeWIMP key code

◆ operator=()

ResShortcut& tbx::res::ResShortcut::operator= ( const ResShortcut other)
inline

Assign this shortcut to be a copy of another.

Parameters
othershortcut to copy

◆ show() [1/3]

const char* tbx::res::ResShortcut::show ( ) const
inline

Get the Toolbox object to show.

Returns
pointer to zero terminated object name or 0 if none

◆ show() [2/3]

void tbx::res::ResShortcut::show ( const char *  obj)
inline

Set the Toolbox object to show.

Parameters
objpointer to zero terminated object name or 0 if none

◆ show() [3/3]

void tbx::res::ResShortcut::show ( const std::string &  obj)
inline

Set the Toolbox object to show.

Parameters
objobject name

◆ transient() [1/2]

bool tbx::res::ResShortcut::transient ( ) const
inline

Check if show object will be shown transiently.

Returns
true if show object will be shown transiently

◆ transient() [2/2]

void tbx::res::ResShortcut::transient ( bool  b)
inline

Set if show object will be shown transiently.

transient means the show object will automatically be closed if a click occurs outside it.

Parameters
bset to true if show object should be shown transiently

The documentation for this class was generated from the following file: