tbx  0.7.6
Public Types | Public Member Functions | List of all members
tbx::res::ResIconbar Class Reference

Class for Iconbar in memory template. More...

#include <resiconbar.h>

Inheritance diagram for tbx::res::ResIconbar:
tbx::res::ResObject tbx::res::ResBase

Public Types

enum  { CLASS_ID = 0x82900 }
 

Public Member Functions

 ResIconbar (std::string name)
 Constructor and empty ResIconBar. More...
 
 ResIconbar (const ResIconbar &other)
 Copy constructor. More...
 
 ResIconbar (const ResObject &other)
 Construct from a ResObject. More...
 
ResIconbaroperator= (const ResIconbar &other)
 Assignment. More...
 
ResIconbaroperator= (const ResObject &other)
 Assignment from ResObject. 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 generate_select_about_to_be_shown () const
 Check if an iconbar select about to be shown event will be generated before the object* which has been associated with a select click is shown. More...
 
void generate_select_about_to_be_shown (bool generate)
 Set if an iconbar select about to be shown event will be generated before the object* which has been associated with a select click is shown. More...
 
bool generate_adjust_about_to_be_shown () const
 Check if an iconbar adjust about to be shown event will be generated before the object* which has been associated with a adjust click is shown. More...
 
void generate_adjust_about_to_be_shown (bool generate)
 Set if an iconbar adjust about to be shown event will be generated before the object* which has been associated with a adjust click is shown. More...
 
bool select_show_transient () const
 
void select_show_transient (bool transient)
 
bool adjust_show_transient () const
 
void adjust_show_transient (bool transient)
 
bool generate_clicked_on_select () const
 Check if the iconbar clicked (or client-specified) event is generate when select is clicked. More...
 
void generate_clicked_on_select (bool generate)
 Set if the iconbar clicked (or client-specified) event is generate when select is clicked. More...
 
bool generate_clicked_on_adjust () const
 Check if the iconbar clicked (or client-specified) event is generate when adjust is clicked. More...
 
void generate_clicked_on_adjust (bool generate)
 Set if the iconbar clicked (or client-specified) event is generate when adjust is clicked. More...
 
int position () const
 Get a negative integer giving the position of this icon on the iconbar.
 
void position (int value)
 Set a negative integer giving the position of this icon on the iconbar. More...
 
int priority () const
 Get The priority used to position the icon on the iconbar.
 
void priority (int value)
 Set The priority used to position the icon on the iconbar.
 
const char * sprite_name () const
 Get the sprite name.
 
void sprite_name (const char *name, int max_length=-1)
 Set the spritename. More...
 
void sprite_name (const std::string &name, int max_length=-1)
 Set the spritename. More...
 
int max_sprite_name () const
 Get the sprite name length.
 
const char * text () const
 Get the iconbar icon text.
 
void text (const char *value, int max_length=-1)
 Set the text. More...
 
void text (const std::string &value, int max_length=-1)
 Set the text. More...
 
int max_text () const
 Get the maximum text length.
 
const char * menu () const
 Get name of menu to show.
 
void menu (const char *name)
 Set name of menu to show. More...
 
void menu (std::string name)
 Set name of menu to show. More...
 
unsigned int select_event () const
 Get The event to generate when select is clicked or 0 for the default.
 
void select_event (unsigned int value)
 Set The event to generate when select is clicked or 0 for the default. More...
 
unsigned int adjust_event () const
 Get The event to generate when adjust is clicked or 0 for the default.
 
void adjust_event (unsigned int value)
 Set The event to generate when adjust is clicked or 0 for the default. More...
 
const char * select_show () const
 Get name of object to show on select. More...
 
void select_show (const char *name)
 Set name of object to show on select. More...
 
void select_show (std::string name)
 Set name of object to show on select. More...
 
const char * adjust_show () const
 Get name of object to show on adjust. More...
 
void adjust_show (const char *name)
 Set name of object to show on adjust. More...
 
void adjust_show (std::string name)
 Set name of object to show on adjust. More...
 
const char * help_message () const
 Get the iconbar icon help message.
 
void help_message (const char *value, int max_length=-1)
 Set the help message. More...
 
void help_message (const std::string &value, int max_length=-1)
 Set the help message. More...
 
int max_help_message () const
 Get the maximum help message length.
 
- Public Member Functions inherited from tbx::res::ResObject
 ResObject (const ResObject &other)
 Copy constructor.
 
virtual ~ResObject ()
 Destructor.
 
ResObjectoperator= (const ResObject &other)
 Assignment.
 
bool save (std::ostream &file)
 Save a resource object to a stream. More...
 
const ResObjectHeaderobject_header () const
 Return a pointer to the header information for this object.
 
const char * name () const
 Return pointer to name of object.
 
void name (std::string name)
 Set the name of the object.
 
int class_id () const
 Return class id of object.
 
int object_version () const
 Return version number * 100.
 
void object_version (int new_version)
 Set version for object.
 
unsigned int object_flags () const
 object flags - use methods below for named access to the bits of the flags
 
void object_flags (unsigned int flags)
 Set the object flags for this object. More...
 
bool create_on_load () const
 Get create on load flag. More...
 
void create_on_load (bool value)
 Set if the object should be automatically created when the Resource file is loaded. More...
 
bool show_on_create () const
 Get show on create flags. More...
 
void show_on_create (bool value)
 Set if the object to be automatically shown when it is created. More...
 
bool shared () const
 Get shared flag. More...
 
void shared (bool value)
 Set if the object is to be a shared object. More...
 
bool ancestor () const
 Get ancestor flags. More...
 
void ancestor (bool value)
 Set if the object should be an ancestor object. More...
 
void check_class_id (int class_id) const
 Check if this objects class id is as specified. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from tbx::res::ResObject
static ResObjectload (std::istream &file)
 Load a resource object from a stream. More...
 
static OsSpriteAreaPtr client_sprite_pointer ()
 Get pointer to client sprite area. More...
 
static void client_sprite_pointer (OsSpriteAreaPtr ptr)
 Set Sprite area to use for new and loaded objects.
 
- Protected Member Functions inherited from tbx::res::ResObject
 ResObject (std::string name, int class_id, int version, int object_size)
 Protected constructor for creating a subclass.
 
ResObjectHeaderobject_header ()
 Return a pointer to the header information for this object.
 
void make_writeable ()
 Make object writeable, call before any change. More...
 
ResData * component_data (char *new_body, int offset, int size) const
 Extract a copy of a components data from this object. More...
 
void insert_component (int offset, const ResImpl *comp_impl)
 Insert a component in an object. More...
 
void replace_component (int offset, int old_size, const ResImpl *comp_impl)
 Replace a component. More...
 
void erase_component (int offset, int size)
 Erase a component of the given size. More...
 
- 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...
 
- Protected Attributes inherited from tbx::res::ResBase
ResImpl * _impl
 Internal Resource implementation.
 

Detailed Description

Class for Iconbar in memory template.

Constructor & Destructor Documentation

◆ ResIconbar() [1/3]

tbx::res::ResIconbar::ResIconbar ( std::string  name)
inline

Constructor and empty ResIconBar.

Parameters
nametemplate name of the object

◆ ResIconbar() [2/3]

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

Copy constructor.

Parameters
otherobject to create copy of

◆ ResIconbar() [3/3]

tbx::res::ResIconbar::ResIconbar ( const ResObject other)
inline

Construct from a ResObject.

Parameters
otherobject to create copy of

Member Function Documentation

◆ adjust_event()

void tbx::res::ResIconbar::adjust_event ( unsigned int  value)
inline

Set The event to generate when adjust is clicked or 0 for the default.

Parameters
valuenumber of event to generate

◆ adjust_show() [1/3]

const char* tbx::res::ResIconbar::adjust_show ( ) const
inline

Get name of object to show on adjust.

Returns
pointer to zero terminated name of object to show or 0 if none.

◆ adjust_show() [2/3]

void tbx::res::ResIconbar::adjust_show ( const char *  name)
inline

Set name of object to show on adjust.

Parameters
namename of object to show on adjust or 0 for none

◆ adjust_show() [3/3]

void tbx::res::ResIconbar::adjust_show ( std::string  name)
inline

Set name of object to show on adjust.

Parameters
namename of object to show on adjust

◆ adjust_show_transient() [1/2]

bool tbx::res::ResIconbar::adjust_show_transient ( ) const
inline
Check if the adjust show object will be shown transient

(i.e. with the semantics of Wimp_CreateMenu)

Returns
true if the adjust show object will be shown transient

◆ adjust_show_transient() [2/2]

void tbx::res::ResIconbar::adjust_show_transient ( bool  transient)
inline
Set to show the adjust object as a transient

(i.e. with the semantics of Wimp_CreateMenu)

Parameters
transienttrue to show the adjust object as transient

◆ flags() [1/2]

unsigned int tbx::res::ResIconbar::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::ResIconbar::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

Parameters
valuenew value for the flags

◆ generate_adjust_about_to_be_shown() [1/2]

bool tbx::res::ResIconbar::generate_adjust_about_to_be_shown ( ) const
inline

Check if an iconbar adjust about to be shown event will be generated before the object* which has been associated with a adjust click is shown.

Returns
true if the event will be generated

◆ generate_adjust_about_to_be_shown() [2/2]

void tbx::res::ResIconbar::generate_adjust_about_to_be_shown ( bool  generate)
inline

Set if an iconbar adjust about to be shown event will be generated before the object* which has been associated with a adjust click is shown.

Parameters
generatetrue to generate the event

◆ generate_clicked_on_adjust() [1/2]

bool tbx::res::ResIconbar::generate_clicked_on_adjust ( ) const
inline

Check if the iconbar clicked (or client-specified) event is generate when adjust is clicked.

Returns
true if the clicked event is generated on adjust

◆ generate_clicked_on_adjust() [2/2]

void tbx::res::ResIconbar::generate_clicked_on_adjust ( bool  generate)
inline

Set if the iconbar clicked (or client-specified) event is generate when adjust is clicked.

Parameters
generatetrue if the clicked event is generated on adjust

◆ generate_clicked_on_select() [1/2]

bool tbx::res::ResIconbar::generate_clicked_on_select ( ) const
inline

Check if the iconbar clicked (or client-specified) event is generate when select is clicked.

Returns
true if the clicked event is generated on select

◆ generate_clicked_on_select() [2/2]

void tbx::res::ResIconbar::generate_clicked_on_select ( bool  generate)
inline

Set if the iconbar clicked (or client-specified) event is generate when select is clicked.

Parameters
generatetrue if the clicked event is generated on select

◆ generate_select_about_to_be_shown() [1/2]

bool tbx::res::ResIconbar::generate_select_about_to_be_shown ( ) const
inline

Check if an iconbar select about to be shown event will be generated before the object* which has been associated with a select click is shown.

Returns
true if the event will be generated

◆ generate_select_about_to_be_shown() [2/2]

void tbx::res::ResIconbar::generate_select_about_to_be_shown ( bool  generate)
inline

Set if an iconbar select about to be shown event will be generated before the object* which has been associated with a select click is shown.

Parameters
generatetrue to generate the event

◆ help_message() [1/2]

void tbx::res::ResIconbar::help_message ( const char *  value,
int  max_length = -1 
)
inline

Set the help message.

@param value iconbar icon help message or 0 for none
@param max_length maximum length for help message or -1 to use current value.
                  This is alway adjusted to allow for the full length of the help message.

◆ help_message() [2/2]

void tbx::res::ResIconbar::help_message ( const std::string &  value,
int  max_length = -1 
)
inline

Set the help message.

@param value iconbar icon help message
@param max_length maximum length for help message or -1 to use current value.
                  This is alway adjusted to allow for the full length of the help message.

◆ menu() [1/2]

void tbx::res::ResIconbar::menu ( const char *  name)
inline

Set name of menu to show.

Parameters
namename of menu to show

◆ menu() [2/2]

void tbx::res::ResIconbar::menu ( std::string  name)
inline

Set name of menu to show.

Parameters
namename of menu to show

◆ operator=() [1/2]

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

Assignment.

Parameters
otherobject to create copy of

◆ operator=() [2/2]

ResIconbar& tbx::res::ResIconbar::operator= ( const ResObject other)
inline

Assignment from ResObject.

Parameters
otherobject to create copy of

◆ position()

void tbx::res::ResIconbar::position ( int  value)
inline

Set a negative integer giving the position of this icon on the iconbar.

Parameters
valueposition on iconbar

◆ select_event()

void tbx::res::ResIconbar::select_event ( unsigned int  value)
inline

Set The event to generate when select is clicked or 0 for the default.

Parameters
valuenumber of event to generate

◆ select_show() [1/3]

const char* tbx::res::ResIconbar::select_show ( ) const
inline

Get name of object to show on select.

Returns
pointer to zero terminated name of object to show or 0 if none.

◆ select_show() [2/3]

void tbx::res::ResIconbar::select_show ( const char *  name)
inline

Set name of object to show on select.

Parameters
namename of object to show on select or 0 for none

◆ select_show() [3/3]

void tbx::res::ResIconbar::select_show ( std::string  name)
inline

Set name of object to show on select.

Parameters
namename of object to show on select

◆ select_show_transient() [1/2]

bool tbx::res::ResIconbar::select_show_transient ( ) const
inline
Check if the select show object will be shown transient

(i.e. with the semantics of Wimp_CreateMenu)

Returns
true if the select show object will be shown transient

◆ select_show_transient() [2/2]

void tbx::res::ResIconbar::select_show_transient ( bool  transient)
inline
Set to show the select show object as a transient

(i.e. with the semantics of Wimp_CreateMenu)

Parameters
transienttrue to show the select object as transient

◆ sprite_name() [1/2]

void tbx::res::ResIconbar::sprite_name ( const char *  name,
int  max_length = -1 
)
inline

Set the spritename.

@param name name of sprite
@param max_length maximum length for sprite name or -1 to use current value.
                  This is alway adjusted to allow for the full length on name.

◆ sprite_name() [2/2]

void tbx::res::ResIconbar::sprite_name ( const std::string &  name,
int  max_length = -1 
)
inline

Set the spritename.

@param name name of sprite
@param max_length maximum length for sprite name or -1 to use current value.
                  This is alway adjusted to allow for the full length on name.

◆ text() [1/2]

void tbx::res::ResIconbar::text ( const char *  value,
int  max_length = -1 
)
inline

Set the text.

@param value iconbar icon text
@param max_length maximum length for text or -1 to use current value.
                  This is alway adjusted to allow for the full length of the text.

◆ text() [2/2]

void tbx::res::ResIconbar::text ( const std::string &  value,
int  max_length = -1 
)
inline

Set the text.

@param value iconbar icon text
@param max_length maximum length for text or -1 to use current value.
                  This is alway adjusted to allow for the full length of the text.

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