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

Class for PrintDbox object template. More...

#include <resprintdbox.h>

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

Public Types

enum  { CLASS_ID = 0x82b00 }
 

Public Member Functions

 ResPrintDbox (const ResObject &other)
 Construct a print dialogue resource from a ResObject. More...
 
 ResPrintDbox (const ResPrintDbox &other)
 Construct a print dialogue resource by copying another. More...
 
ResPrintDboxoperator= (const ResObject &other)
 Assign from a ResObject. More...
 
ResPrintDboxoperator= (const ResPrintDbox &other)
 Assign from another print dialogue resource. More...
 
 ResPrintDbox (std::string name)
 Construct a print dialogue resource. More...
 
int flags () const
 Raw access to all the object flags. More...
 
void flags (int value)
 Set all the flags. More...
 
bool generate_about_to_be_shown () const
 Check if the about to be shown event should be generated. More...
 
void generate_about_to_be_shown (bool value)
 Set if the about to be shown event should be generated. More...
 
bool generate_dialogue_completed () const
 Check if the dialogue completed event should be generated. More...
 
void generate_dialogue_completed (bool value)
 Set if the dialogue completed event should be generated. More...
 
bool generate_setup_about_to_be_shown () const
 Check if an event should be generated when the printer setup dialogue is about to be shown. More...
 
void generate_setup_about_to_be_shown (bool value)
 Set if an event should be generated when the printer setup dialogue is about to be shown. More...
 
bool has_page_range () const
 Check if the dialogue will show a choice of page range. More...
 
void has_page_range (bool value)
 Set if the dialogue will show a choice of page range. More...
 
bool has_copies () const
 Check if the number of copies can be specified. More...
 
void has_copies (bool value)
 Set if the number of copies can be specified. More...
 
bool has_scale () const
 Check if the scale can be specified. More...
 
void has_scale (bool value)
 Set if the scale can be specified. More...
 
bool has_orientation () const
 Check if the orientation can be specified. More...
 
void has_orientation (bool value)
 Set if the orientation can be specified. More...
 
bool has_save () const
 Check if the dialogue has a save button. More...
 
void has_save (bool value)
 Set if the dialogue has a save button. More...
 
bool has_setup () const
 Check if the dialogue has a setup button. More...
 
void has_setup (bool value)
 Set if the dialogue has a setup button. More...
 
bool has_draft () const
 Check if the dialogue include a draft option. More...
 
void has_draft (bool value)
 Set if the dialogue include a draft option. More...
 
bool has_from_to () const
 Check if from/to for page range is set. More...
 
void has_from_to (bool value)
 Set if from/to for page range is set. More...
 
bool sideways_selected () const
 Check if sideways is selected when dialogue is shown. More...
 
void sideways_selected (bool value)
 Set if sideways is selected when dialogue is shown. More...
 
bool draft_selected () const
 Check if draft is selected when dialogue is shown. More...
 
void draft_selected (bool value)
 Set if draft is selected when dialogue is shown. More...
 
int from () const
 Get from page number when dialogue is shown. More...
 
void from (int value)
 Set from page number when dialogue is shown. More...
 
int to () const
 Get to page number when dialogue is shown. More...
 
void to (int value)
 Set to page number when dialogue is shown. More...
 
int copies () const
 Get the number of copies set when the dialogue is shown. More...
 
void copies (int value)
 Set the number of copies set when the dialogue is shown. More...
 
int scale () const
 Get the scale set when the dialogue is shown. More...
 
void scale (int value)
 Set the scale set when the dialogue is shown. More...
 
const char * further_options () const
 Get the name of the window that shows further options. More...
 
void further_options (const char *value)
 Set the name of the window that shows further options. More...
 
void further_options (const std::string &value)
 Set the name of the window that shows further options. More...
 
const char * window () const
 Get the name of the window template that provides the window for this object. More...
 
void window (const char *value)
 Set the name of the window template that provides the window for this object. More...
 
void window (const std::string &value)
 Set the name of the window template that provides the window for this object. More...
 
- 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 PrintDbox object template.

Constructor & Destructor Documentation

◆ ResPrintDbox() [1/3]

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

Construct a print dialogue resource from a ResObject.

Parameters
otherResObject to construct from
Exceptions
ResObjectClassMismatchif the ResObject is not a print dialogue resource

◆ ResPrintDbox() [2/3]

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

Construct a print dialogue resource by copying another.

Parameters
otherResPrintDbox to copy

◆ ResPrintDbox() [3/3]

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

Construct a print dialogue resource.

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

Parameters
namethe name of this object (maximum 12 characters)

Member Function Documentation

◆ copies() [1/2]

int tbx::res::ResPrintDbox::copies ( ) const
inline

Get the number of copies set when the dialogue is shown.

Returns
number of copies

◆ copies() [2/2]

void tbx::res::ResPrintDbox::copies ( int  value)
inline

Set the number of copies set when the dialogue is shown.

Parameters
valuenumber of copies

◆ draft_selected() [1/2]

bool tbx::res::ResPrintDbox::draft_selected ( ) const
inline

Check if draft is selected when dialogue is shown.

Returns
true if draft is selected

◆ draft_selected() [2/2]

void tbx::res::ResPrintDbox::draft_selected ( bool  value)
inline

Set if draft is selected when dialogue is shown.

Parameters
valueset to true if draft is selected

◆ flags() [1/2]

int tbx::res::ResPrintDbox::flags ( ) const
inline

Raw access to all the object flags.

It is recommended you use the other methods in this class rather than use this directly.

Returns
integer with individual bits specifying various flags

◆ flags() [2/2]

void tbx::res::ResPrintDbox::flags ( int  value)
inline

Set all the flags.

It is recommended you use the other methods in this class rather than use this directly.

Parameters
valuethe new flags

◆ from() [1/2]

int tbx::res::ResPrintDbox::from ( ) const
inline

Get from page number when dialogue is shown.

Returns
from page number

◆ from() [2/2]

void tbx::res::ResPrintDbox::from ( int  value)
inline

Set from page number when dialogue is shown.

Parameters
valuefrom page number

◆ further_options() [1/3]

const char* tbx::res::ResPrintDbox::further_options ( ) const
inline

Get the name of the window that shows further options.

Returns
pointer to zero terminated window name or 0 for none

◆ further_options() [2/3]

void tbx::res::ResPrintDbox::further_options ( const char *  value)
inline

Set the name of the window that shows further options.

Parameters
valuepointer to zero terminated window name or 0 for none

◆ further_options() [3/3]

void tbx::res::ResPrintDbox::further_options ( const std::string &  value)
inline

Set the name of the window that shows further options.

Parameters
valuewindow name

◆ generate_about_to_be_shown() [1/2]

bool tbx::res::ResPrintDbox::generate_about_to_be_shown ( ) const
inline

Check if the about to be shown event should be generated.

Returns
true if the about to be shown event should be generated

◆ generate_about_to_be_shown() [2/2]

void tbx::res::ResPrintDbox::generate_about_to_be_shown ( bool  value)
inline

Set if the about to be shown event should be generated.

Parameters
valueset to true if the about to be shown event should be generated

◆ generate_dialogue_completed() [1/2]

bool tbx::res::ResPrintDbox::generate_dialogue_completed ( ) const
inline

Check if the dialogue completed event should be generated.

Returns
true if the dialogue completed event should be generated

◆ generate_dialogue_completed() [2/2]

void tbx::res::ResPrintDbox::generate_dialogue_completed ( bool  value)
inline

Set if the dialogue completed event should be generated.

Parameters
valueset to true if the dialogue completed event should be generated

◆ generate_setup_about_to_be_shown() [1/2]

bool tbx::res::ResPrintDbox::generate_setup_about_to_be_shown ( ) const
inline

Check if an event should be generated when the printer setup dialogue is about to be shown.

Returns
true the setup about to be shown event will be generated

◆ generate_setup_about_to_be_shown() [2/2]

void tbx::res::ResPrintDbox::generate_setup_about_to_be_shown ( bool  value)
inline

Set if an event should be generated when the printer setup dialogue is about to be shown.

Parameters
valueset to true if the setup about to be shown event should be generated

◆ has_copies() [1/2]

bool tbx::res::ResPrintDbox::has_copies ( ) const
inline

Check if the number of copies can be specified.

Returns
true if the number of copies can be specified

◆ has_copies() [2/2]

void tbx::res::ResPrintDbox::has_copies ( bool  value)
inline

Set if the number of copies can be specified.

Parameters
valueset to true if the number of copies can be specified

◆ has_draft() [1/2]

bool tbx::res::ResPrintDbox::has_draft ( ) const
inline

Check if the dialogue include a draft option.

Returns
true if the dialogue include a draft option

◆ has_draft() [2/2]

void tbx::res::ResPrintDbox::has_draft ( bool  value)
inline

Set if the dialogue include a draft option.

Parameters
valueset to true to include a draft option

◆ has_from_to() [1/2]

bool tbx::res::ResPrintDbox::has_from_to ( ) const
inline

Check if from/to for page range is set.

Returns
true if from/to for page range is set

◆ has_from_to() [2/2]

void tbx::res::ResPrintDbox::has_from_to ( bool  value)
inline

Set if from/to for page range is set.

Parameters
valueset to true if from/to for page range is set

◆ has_orientation() [1/2]

bool tbx::res::ResPrintDbox::has_orientation ( ) const
inline

Check if the orientation can be specified.

Returns
true if the orientation can be specified

◆ has_orientation() [2/2]

void tbx::res::ResPrintDbox::has_orientation ( bool  value)
inline

Set if the orientation can be specified.

Parameters
valueset to true if the orientation can be specified

◆ has_page_range() [1/2]

bool tbx::res::ResPrintDbox::has_page_range ( ) const
inline

Check if the dialogue will show a choice of page range.

Returns
true if a page range choice will be shown

◆ has_page_range() [2/2]

void tbx::res::ResPrintDbox::has_page_range ( bool  value)
inline

Set if the dialogue will show a choice of page range.

Parameters
valueset to true to enable a page range choice

◆ has_save() [1/2]

bool tbx::res::ResPrintDbox::has_save ( ) const
inline

Check if the dialogue has a save button.

Returns
true if the dialogue has a save button

◆ has_save() [2/2]

void tbx::res::ResPrintDbox::has_save ( bool  value)
inline

Set if the dialogue has a save button.

Parameters
valueset to true to include a save button

◆ has_scale() [1/2]

bool tbx::res::ResPrintDbox::has_scale ( ) const
inline

Check if the scale can be specified.

Returns
true if the scale can be specified

◆ has_scale() [2/2]

void tbx::res::ResPrintDbox::has_scale ( bool  value)
inline

Set if the scale can be specified.

Parameters
valueset to true if the scale can be specified

◆ has_setup() [1/2]

bool tbx::res::ResPrintDbox::has_setup ( ) const
inline

Check if the dialogue has a setup button.

Returns
true if the dialogue includes a setup button

◆ has_setup() [2/2]

void tbx::res::ResPrintDbox::has_setup ( bool  value)
inline

Set if the dialogue has a setup button.

Parameters
valueset to true to include a setup button

◆ operator=() [1/2]

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

Assign from a ResObject.

Parameters
otherResObject to copy
Exceptions
ResObjectClassMismatchif the ResObject is not a print dialogue resource

◆ operator=() [2/2]

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

Assign from another print dialogue resource.

Parameters
otherbutton gadget resource to copy

◆ scale() [1/2]

int tbx::res::ResPrintDbox::scale ( ) const
inline

Get the scale set when the dialogue is shown.

Returns
scale as a percentage

◆ scale() [2/2]

void tbx::res::ResPrintDbox::scale ( int  value)
inline

Set the scale set when the dialogue is shown.

Parameters
valuescale as a percentage

◆ sideways_selected() [1/2]

bool tbx::res::ResPrintDbox::sideways_selected ( ) const
inline

Check if sideways is selected when dialogue is shown.

Returns
true if sideways is selected

◆ sideways_selected() [2/2]

void tbx::res::ResPrintDbox::sideways_selected ( bool  value)
inline

Set if sideways is selected when dialogue is shown.

Parameters
valueset to true if sideways is selected

◆ to() [1/2]

int tbx::res::ResPrintDbox::to ( ) const
inline

Get to page number when dialogue is shown.

Returns
to page number

◆ to() [2/2]

void tbx::res::ResPrintDbox::to ( int  value)
inline

Set to page number when dialogue is shown.

Parameters
valueto page number

◆ window() [1/3]

const char* tbx::res::ResPrintDbox::window ( ) const
inline

Get the name of the window template that provides the window for this object.

Returns
name of window to use or 0 if default internal window will be used

◆ window() [2/3]

void tbx::res::ResPrintDbox::window ( const char *  value)
inline

Set the name of the window template that provides the window for this object.

Parameters
valueThe name of window to use or 0 if default internal window will be used

◆ window() [3/3]

void tbx::res::ResPrintDbox::window ( const std::string &  value)
inline

Set the name of the window template that provides the window for this object.

Parameters
valueThe name of window to use or 0 if default internal window will be used

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