tbx  0.7.5
Public Types | Public Member Functions | List of all members
tbx::res::ResSlider Class Reference

Class for Slider gadget template. More...

#include <resslider.h>

Inheritance diagram for tbx::res::ResSlider:
tbx::res::ResGadget tbx::res::ResBase

Public Types

enum  { TYPE_ID = 576 }
 

Public Member Functions

 ResSlider (const ResGadget &other)
 Construct an slider gadget resource. More...
 
 ResSlider (const ResSlider &other)
 Construct an slider gadget resource. More...
 
ResSlideroperator= (const ResGadget &other)
 Assign from a ResGadget. More...
 
ResSlideroperator= (const ResSlider &other)
 Assign from another slider gadget resource. More...
 
 ResSlider ()
 Construct a slider gadget resource. More...
 
bool generate_value_changed () const
 Check if value changed event will be generated. More...
 
void generate_value_changed (bool value)
 Set if value changed event will be generated. More...
 
bool generate_value_changed_while_dragging () const
 Check if the value changed event will be generated when the slider is dragged. More...
 
void generate_value_changed_while_dragging (bool value)
 Set if the value changed event will be generated when the slider is dragged. More...
 
bool vertical () const
 Check if the slider is vertical instead of horizontal. More...
 
void vertical (bool value)
 Set if the slider is vertical instead of horizontal. More...
 
bool bar_is_draggable () const
 Check if the bar can be dragged. More...
 
void bar_is_draggable (bool value)
 Set if the bar can be dragged. More...
 
WimpColour bar_colour () const
 Get the bar colour. More...
 
void bar_colour (WimpColour value)
 Set the bar colour. More...
 
WimpColour background_colour () const
 Get the background colour. More...
 
void background_colour (WimpColour value)
 Set the background colour. More...
 
int lower_bound () const
 Get the minimum value for the slider. More...
 
void lower_bound (int value)
 Set the minimum value for the slider. More...
 
int upper_bound () const
 Get the maximum value for the slider. More...
 
void upper_bound (int value)
 Set the maximum value for the slider. More...
 
int step_size () const
 Get the step size for the slider. More...
 
void step_size (int value)
 Set the step size for the slider. More...
 
int initial_value () const
 Get the initial value for the slider. More...
 
void initial_value (int value)
 Set the initial value for the slider. More...
 
- Public Member Functions inherited from tbx::res::ResGadget
 ResGadget (const ResGadget &other)
 Construct a resource gadget as a copy of another. More...
 
ResGadgetoperator= (const ResGadget &other)
 Assign a resource gadget as a copy of another. More...
 
 ResGadget (int type, int size)
 Construct an empty gadget of the given type and size. More...
 
void check_type (int type) const
 Check if this gadgets type is as specified. 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 back () const
 Check if gadget is at the back (created first) More...
 
void back (bool value)
 Set if gadget should be at the back. More...
 
bool faded () const
 Check if the gadget is faded. More...
 
void faded (bool value)
 Set if the gadget is faded. More...
 
unsigned short type () const
 Get the gadget type. More...
 
unsigned short stored_size () const
 Get the size stored in template. More...
 
int size () const
 Size of gadget (including header). More...
 
int xmin () const
 Get the minimum x coordinate of the gadget's bounding box. More...
 
void xmin (int x)
 Set the minimum x coordinate of the gadget's bounding box. More...
 
int ymin () const
 Get the minimum y coordinate of the gadget's bounding box. More...
 
void ymin (int y)
 Set the minimum y coordinate of the gadget's bounding box. More...
 
int xmax () const
 Get the maximum x coordinate of the gadget's bounding box. More...
 
void xmax (int x)
 Set the maximum x coordinate of the gadget's bounding box. More...
 
int ymax () const
 Get the maximum y coordinate of the gadget's bounding box. More...
 
void ymax (int y)
 Set the maximum y coordinate of the gadget's bounding box. More...
 
ComponentId component_id () const
 Get the Component ID. More...
 
void component_id (ComponentId value)
 Set the Component ID. More...
 
const char * help_message () const
 Get the help message for the gadget. More...
 
void help_message (const char *msg, int max_length=-1)
 Set the help message for the gadget. More...
 
void help_message (const std::string &msg, int max_length=-1)
 Set the help message for the gadget. More...
 
int max_help () const
 Max size of message.
 
- 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::ResGadget
static int gadget_size (unsigned int type_and_size)
 Get gadget size given its type and size value. More...
 
- Protected Member Functions inherited from tbx::res::ResGadget
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...
 
- Protected Attributes inherited from tbx::res::ResBase
ResImpl * _impl
 Internal Resource implementation.
 

Detailed Description

Class for Slider gadget template.

Constructor & Destructor Documentation

◆ ResSlider() [1/3]

tbx::res::ResSlider::ResSlider ( const ResGadget other)
inline

Construct an slider gadget resource.

Parameters
otherResGadget to copy resource from
Exceptions
ResGadgetTypeMismatchif the ResGadget is not an slider

◆ ResSlider() [2/3]

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

Construct an slider gadget resource.

Parameters
otherslider to copy resource from

◆ ResSlider() [3/3]

tbx::res::ResSlider::ResSlider ( )
inline

Construct a slider gadget resource.

All options are false, events unset and messages are null.

Member Function Documentation

◆ background_colour() [1/2]

WimpColour tbx::res::ResSlider::background_colour ( ) const
inline

Get the background colour.

Returns
WIMP colour for the background

◆ background_colour() [2/2]

void tbx::res::ResSlider::background_colour ( WimpColour  value)
inline

Set the background colour.

Parameters
valueWIMP colour for the background

◆ bar_colour() [1/2]

WimpColour tbx::res::ResSlider::bar_colour ( ) const
inline

Get the bar colour.

Returns
WIMP colour for the bar

◆ bar_colour() [2/2]

void tbx::res::ResSlider::bar_colour ( WimpColour  value)
inline

Set the bar colour.

Parameters
valueWIMP colour for the bar

◆ bar_is_draggable() [1/2]

bool tbx::res::ResSlider::bar_is_draggable ( ) const
inline

Check if the bar can be dragged.

Returns
true if the bar can be dragged

◆ bar_is_draggable() [2/2]

void tbx::res::ResSlider::bar_is_draggable ( bool  value)
inline

Set if the bar can be dragged.

Parameters
valueset to true to allow the bar to be dragged

◆ generate_value_changed() [1/2]

bool tbx::res::ResSlider::generate_value_changed ( ) const
inline

Check if value changed event will be generated.

Returns
true if the value changed event will be generated

◆ generate_value_changed() [2/2]

void tbx::res::ResSlider::generate_value_changed ( bool  value)
inline

Set if value changed event will be generated.

Parameters
valueset to if the value changed event will be generated

◆ generate_value_changed_while_dragging() [1/2]

bool tbx::res::ResSlider::generate_value_changed_while_dragging ( ) const
inline

Check if the value changed event will be generated when the slider is dragged.

Returns
true to generate the value changed while dragging

◆ generate_value_changed_while_dragging() [2/2]

void tbx::res::ResSlider::generate_value_changed_while_dragging ( bool  value)
inline

Set if the value changed event will be generated when the slider is dragged.

Parameters
valueset to true to generate the value changed while dragging

◆ initial_value() [1/2]

int tbx::res::ResSlider::initial_value ( ) const
inline

Get the initial value for the slider.

Returns
initial value for the slider

◆ initial_value() [2/2]

void tbx::res::ResSlider::initial_value ( int  value)
inline

Set the initial value for the slider.

Parameters
valueinitial value for the slider

◆ lower_bound() [1/2]

int tbx::res::ResSlider::lower_bound ( ) const
inline

Get the minimum value for the slider.

Returns
minimum value for the slider

◆ lower_bound() [2/2]

void tbx::res::ResSlider::lower_bound ( int  value)
inline

Set the minimum value for the slider.

Parameters
valueminimum value for the slider

◆ operator=() [1/2]

ResSlider& tbx::res::ResSlider::operator= ( const ResGadget other)
inline

Assign from a ResGadget.

Parameters
otherResGadget to copy
Exceptions
ResGadgetTypeMismatchif the ResGadget is not an slider

◆ operator=() [2/2]

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

Assign from another slider gadget resource.

Parameters
otherslider gadget resource to copy

◆ step_size() [1/2]

int tbx::res::ResSlider::step_size ( ) const
inline

Get the step size for the slider.

Returns
step size for the slider

◆ step_size() [2/2]

void tbx::res::ResSlider::step_size ( int  value)
inline

Set the step size for the slider.

Parameters
valuestep size for the slider

◆ upper_bound() [1/2]

int tbx::res::ResSlider::upper_bound ( ) const
inline

Get the maximum value for the slider.

Returns
maximum value for the slider

◆ upper_bound() [2/2]

void tbx::res::ResSlider::upper_bound ( int  value)
inline

Set the maximum value for the slider.

Parameters
valuemaximum value for the slider

◆ vertical() [1/2]

bool tbx::res::ResSlider::vertical ( ) const
inline

Check if the slider is vertical instead of horizontal.

Returns
true if the slider is vertical

◆ vertical() [2/2]

void tbx::res::ResSlider::vertical ( bool  value)
inline

Set if the slider is vertical instead of horizontal.

Parameters
valueset to true for a vertical slider

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