tbx
0.7.3
|
Window resource object. More...
#include <reswindow.h>
Classes | |
class | const_gadget_iterator |
Constant iterator for gadgets in the window resource. More... | |
class | const_shortcut_iterator |
Constant iterator for shortcuts. More... | |
class | gadget_iterator |
Iterator for gadgets in the window resource. More... | |
class | shortcut_iterator |
Iterator for shortcuts. More... | |
Public Types | |
enum | { CLASS_ID = 0x82880 } |
Public Member Functions | |
ResWindow (std::string name, bool toolbar=false) | |
Constructor and empty ResWindow. More... | |
ResWindow (const ResWindow &other) | |
Copy constructor. More... | |
ResWindow (const ResObject &other) | |
Construct from a ResObject. More... | |
ResWindow & | operator= (const ResWindow &other) |
Assignment. More... | |
ResWindow & | operator= (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_about_to_be_shown () const |
Check if the about to be shown event will be generated. More... | |
void | generate_about_to_be_shown (bool value) |
Set if the about to be shown event will be generated. More... | |
bool | auto_show () const |
Check if window is automatically shown. More... | |
void | auto_show (bool value) |
Set if window is automatically shown. More... | |
bool | auto_close () const |
Check if window is automatically closed. More... | |
void | auto_close (bool value) |
Set if window is automatically closed. More... | |
bool | generate_has_been_hidden () const |
Check if an event will be generated when the window has been hidden. More... | |
void | generate_has_been_hidden (bool value) |
Set if an event will be generated when the window has been hidden. More... | |
bool | toolbar () const |
Check if this template is for a toolbar. More... | |
void | toolbar (bool value) |
Set if this template is for a toolbar. More... | |
const char * | help_message () const |
Get the help message. More... | |
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. | |
const char * | pointer_shape () const |
Get the name of the sprite to use for the mouse pointer when it is over this window. More... | |
void | pointer_shape (const char *value, int max_length=-1) |
Set the name of the sprite to use for the mouse pointer when it is over this window. More... | |
void | pointer_shape (const std::string &value, int max_length=-1) |
Set the name of the sprite to use for the mouse pointer when it is over this window. More... | |
int | max_pointer_shape () const |
Get the maximum pointer shape length. | |
int | pointer_x_hot () const |
Get the X position of the hotspot in the pointer. More... | |
void | pointer_x_hot (int value) |
Set the X position of the hotspot in the pointer. More... | |
int | pointer_y_hot () const |
Get the Y position of the hotspot in the pointer. More... | |
void | pointer_y_hot (int value) |
Set the Y position of the hotspot in the pointer. More... | |
const char * | menu () const |
Get the menu to be shown for this menu. More... | |
void | menu (const char *value) |
Set the menu to be shown for this menu. More... | |
void | menu (const std::string &value) |
Set the menu to be shown for this menu. More... | |
int | num_shortcuts () const |
Get the number of shortcut keys in this window. More... | |
int | num_gadgets () const |
Get the number of gadgets in this window. More... | |
ComponentId | default_focus () const |
Get the component ID of the gadget to get the default focus. More... | |
void | default_focus (ComponentId id) |
Set the component ID of the gadget to get the default focus. More... | |
int | show_event () const |
Get the event ID of the event generated when the window is shown. More... | |
void | show_event (int event_id) |
Set the event ID of the event generated when the window is shown. More... | |
int | hide_event () const |
Get the event ID of the event generated when the window has been hidden. More... | |
void | hide_event (int value) |
Set the event ID of the event generated when the window has been hidden. More... | |
const char * | internal_bl_toolbar () const |
Get the name of the object to use for the internal bottom left toolbar. More... | |
void | internal_bl_toolbar (const char *value) |
Set the name of the object to use for the internal bottom left toolbar. More... | |
void | internal_bl_toolbar (const std::string &value) |
Set the name of the object to use for the internal bottom left toolbar. More... | |
const char * | internal_tl_toolbar () const |
Get the name of the object to use for the internal top left toolbar. More... | |
void | internal_tl_toolbar (const char *value) |
Set the name of the object to use for the internal top left toolbar. More... | |
void | internal_tl_toolbar (const std::string &value) |
Set the name of the object to use for the internal top left toolbar. More... | |
const char * | external_bl_toolbar () const |
Get the name of the object to use for the external bottom left toolbar. More... | |
void | external_bl_toolbar (const char *value) |
Set the name of the object to use for the external bottom left toolbar. More... | |
void | external_bl_toolbar (const std::string &value) |
Set the name of the object to use for the external bottom left toolbar. More... | |
const char * | external_tl_toolbar () const |
Get the name of the object to use for the external top left toolbar. More... | |
void | external_tl_toolbar (const char *value) |
Set the name of the object to use for the external top left toolbar. More... | |
void | external_tl_toolbar (const std::string &value) |
Set the name of the object to use for the external top left toolbar. More... | |
int | visible_xmin () const |
Get the minimum X coordinate of the visible part of the window. More... | |
void | visible_xmin (int value) |
Set the minimum X coordinate of the visible part of the window. More... | |
int | visible_ymin () const |
Get the minimum Y coordinate of the visible part of the window. More... | |
void | visible_ymin (int value) |
Set the minimum Y coordinate of the visible part of the window. More... | |
int | visible_xmax () const |
Get the maximum X coordinate of the visible part of the window. More... | |
void | visible_xmax (int value) |
Set the maximum X coordinate of the visible part of the window. More... | |
int | visible_ymax () const |
Get the maximum Y coordinate of the visible part of the window. More... | |
void | visible_ymax (int value) |
Set the maximum Y coordinate of the visible part of the window. More... | |
int | scroll_x () const |
Get the X scroll offset into the work area. More... | |
void | scroll_x (int value) |
Set the X scroll offset into the work area. More... | |
int | scroll_y () const |
Get the Y scroll offset into the work area. More... | |
void | scroll_y (int value) |
Set the Y scroll offset into the work area. More... | |
int | behind () const |
Get the WIMP window handle this window will be opened behind. More... | |
void | behind (int value) |
Set the WIMP window handle this window will be opened behind. More... | |
unsigned int | window_flags () const |
Get the window flags. More... | |
void | window_flags (unsigned int value) |
Set the window flags. More... | |
bool | moveable () const |
Check if the window will be moveable. More... | |
void | moveable (bool move) |
Set if the window is moveable. More... | |
bool | auto_redraw () const |
Check if window can be redrawn entirely by the WIMP. More... | |
void | auto_redraw (bool on) |
Set if window can be redrawn entirely by the WIMP. More... | |
bool | pane () const |
Check if a window is a pane. More... | |
void | pane (bool p) |
Set if a window is a pane. More... | |
bool | allow_off_screen () const |
Check if window is allowed off screen. More... | |
void | allow_off_screen (bool allow) |
Set if window is allowed off screen. More... | |
bool | user_scroll () const |
Check if a Scroll_Request event if returned with auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region. More... | |
void | user_scroll (bool scroll) |
Set if a Scroll_Request event if returned with auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region. More... | |
bool | user_scroll_debounced () const |
Check if a Scroll_Request event if returned with no auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region. More... | |
void | user_scroll_debounced (bool scroll) |
Set if a Scroll_Request event if returned with no auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region. More... | |
bool | real_colours () const |
Check if window colours are given as gcol numbers. More... | |
void | real_colours (bool real) |
Set if window colours are given as gcol numbers. More... | |
bool | top_window () const |
Check if window can be opened below this. More... | |
void | top_window (bool tw) |
Set if window can be opened below this. More... | |
bool | hot_keys () const |
Check if generates events for hot keys. More... | |
void | hot_keys (bool generate) |
Set if generates events for hot keys. More... | |
bool | force_on_screen () const |
Check if window is forced on screen. More... | |
void | force_on_screen (bool on) |
Set if window is forced on screen. More... | |
bool | ignore_right_extent () const |
Check if right extent is ignored. More... | |
void | ignore_right_extent (bool ignore) |
Set if right extent is ignored. More... | |
bool | ignore_lower_extent () const |
Check if lower extent is ignored. More... | |
void | ignore_lower_extent (bool ignore) |
Set if lower extent is ignored. More... | |
bool | back_icon () const |
Check if window has a back icon. More... | |
void | back_icon (bool has_icon) |
Set if window has a back icon. More... | |
bool | close_icon () const |
Check if window has a close icon. More... | |
void | close_icon (bool has_icon) |
Set if window has a close icon. More... | |
bool | titlebar () const |
Check if window has a title bar. More... | |
void | titlebar (bool has_tb) |
Set if window has a title bar. More... | |
bool | toggle_size_icon () const |
Check if window has a toggle size icon. More... | |
void | toggle_size_icon (bool has_icon) |
Set if window has a toggle size icon. More... | |
bool | vscrollbar () const |
Check if window has a vertical scroll bar. More... | |
void | vscrollbar (bool has_vsb) |
Set if window has a vertical scroll bar. More... | |
bool | adjust_size_icon () const |
Check if window has an adjust size icon. More... | |
void | adjust_size_icon (bool has_icon) |
Set if window has an adjust size icon. More... | |
bool | hscrollbar () const |
Check if window has a horizontal scroll bar. More... | |
void | hscrollbar (bool has_hsb) |
Set if window has a horizontal scroll bar. More... | |
WimpColour | title_fore () const |
Get the foreground/text colour for the title bar. More... | |
void | title_fore (WimpColour value) |
Set the foreground/text colour for the title bar. More... | |
WimpColour | title_back () const |
Get the background colour for the title bar. More... | |
void | title_back (WimpColour value) |
Set the background colour for the title bar. More... | |
WimpColour | work_fore () const |
Get the work area foreground colour. More... | |
void | work_fore (WimpColour value) |
Set the work area foreground colour. More... | |
WimpColour | work_back () const |
Get the work area background colour. More... | |
void | work_back (WimpColour value) |
Set the work area background colour. More... | |
WimpColour | scroll_outer () const |
Get the work area scroll bar outer colour. More... | |
void | scroll_outer (WimpColour value) |
Set the scroll bar outer colour. More... | |
WimpColour | scroll_inner () const |
Get the scroll bar inner colour. More... | |
void | scroll_inner (WimpColour value) |
Set the scroll bar inner colour. More... | |
WimpColour | title_inputfocus () const |
Get the background colour for the title bar when it has the input focus. More... | |
void | title_inputfocus (WimpColour value) |
Set the background colour for the title bar when it has the input focus. More... | |
int | work_xmin () const |
Get the minimum X coordinate of the work area extent. More... | |
void | work_xmin (int value) |
Set the minimum X coordinate of the work area extent. More... | |
int | work_ymin () const |
Get the minimum Y coordinate of the work area extent. More... | |
void | work_ymin (int value) |
Set the minimum Y coordinate of the work area extent. More... | |
int | work_xmax () const |
Get the maximum X coordinate of the work area extent. More... | |
void | work_xmax (int value) |
Set the maximum X coordinate of the work area extent. More... | |
int | work_ymax () const |
Get the maximum Y coordinate of the work area extent. More... | |
void | work_ymax (int value) |
Set the maximum Y coordinate of the work area extent. More... | |
unsigned int | title_flags () const |
Get the title flags. More... | |
void | title_flags (unsigned int value) |
Set the title flags. More... | |
unsigned int | button_type () const |
Get the button type. More... | |
void | button_type (unsigned int value) |
Set the button type. More... | |
OsSpriteAreaPtr | sprite_area () const |
Get a pointer to the sprite area used for client icons on this window. More... | |
void | sprite_area (OsSpriteAreaPtr value) |
Set a pointer to the sprite area used for client icons on this window. More... | |
unsigned short | min_width () const |
Get the minimum width for the window. More... | |
void | min_width (unsigned short value) |
Set the minimum width for the window. More... | |
unsigned short | min_height () const |
Get the minimum height for the window. More... | |
void | min_height (unsigned short value) |
Set the minimum height for the window. More... | |
const char * | title_text () const |
Get the text for the title of the window. More... | |
void | title_text (const char *value) |
Set the text for the title of the window. More... | |
void | title_text (const std::string &value) |
Set the text for the title of the window. More... | |
const char * | title_validation () const |
Get the title validation. More... | |
void | title_validation (const char *value) |
Set the title validation. More... | |
void | title_validation (const std::string &value) |
Set the title validation. More... | |
int | title_buflen () const |
Get the length of the buffer to hold the title. More... | |
void | title_buflen (int value) |
Set the length of the buffer to hold the title. More... | |
const_shortcut_iterator | shortcut_begin () const |
Get constant iterator to first shortcut. More... | |
const_shortcut_iterator | shortcut_end () const |
Get constant iterator to end of shortcuts. More... | |
const_shortcut_iterator | shortcut_cbegin () const |
Get constant iterator to first shortcut. More... | |
const_shortcut_iterator | shortcut_cend () const |
Get constant iterator to end of shortcuts. More... | |
const_shortcut_iterator | find_shortcut (int key_code) const |
Find shortcut with given key. More... | |
shortcut_iterator | shortcut_begin () |
Get iterator to first shortcut. More... | |
shortcut_iterator | shortcut_end () |
Get iterator to end of shortcuts. More... | |
shortcut_iterator | find_shortcut (int key_code) |
Find shortcut for the given key. More... | |
ResShortcut | shortcut (int key_code) const |
Get a copy of shortcut with key_code. More... | |
bool | contains_shortcut (int key_code) const |
Returns true if Window contains a shortcut with the given id. | |
void | add_shortcut (const ResShortcut &shortcut) |
Adds the shortcut to the end of the window. More... | |
void | replace_shortcut (const ResShortcut &shortcut) |
Replace menu shortcut with same key_code as given shortcut. More... | |
void | erase_shortcut (int key_code) |
Erase shortcut with specific key_code. More... | |
shortcut_iterator | insert_shortcut (shortcut_iterator pos, const ResShortcut &shortcut) |
Insert shortcut at given position. More... | |
shortcut_iterator | replace_shortcut (shortcut_iterator pos, const ResShortcut &shortcut) |
Replace the shortcut at the given iterator position. More... | |
shortcut_iterator | erase_shortcut (shortcut_iterator pos) |
Delete the component at the given location. More... | |
const_gadget_iterator | gadget_begin () const |
Get constant iterator to first gadget. More... | |
const_gadget_iterator | gadget_end () const |
Get constant iterator to the end of the gadgets. More... | |
const_gadget_iterator | gadget_cbegin () const |
Get constant iterator to first gadget. More... | |
const_gadget_iterator | gadget_cend () const |
Get constant iterator to the end of the gadgets. More... | |
const_gadget_iterator | find_gadget (int component_id) const |
Find gadget with given id. More... | |
gadget_iterator | gadget_begin () |
Get iterator to first gadget. More... | |
gadget_iterator | gadget_end () |
Get iterator to the end of the gadgets. More... | |
gadget_iterator | find_gadget (int component_id) |
Find gadget with given id. More... | |
ResGadget | gadget (ComponentId component_id) const |
Get a copy of gadget with given component id. More... | |
bool | contains_gadget (ComponentId component_id) const |
Check if the window contains a gadget with the given id. More... | |
void | add_gadget (const ResGadget &gadget) |
Adds the gadget to the end of the window. More... | |
void | replace_gadget (const ResGadget &gadget) |
Replace menu gadget with same component id as given gadget. More... | |
void | erase_gadget (ComponentId component_id) |
Erase gadget with specific id. More... | |
gadget_iterator | insert_gadget (gadget_iterator pos, const ResGadget &gadget) |
Insert gadget at given position. More... | |
gadget_iterator | replace_gadget (gadget_iterator pos, const ResGadget &gadget) |
Replace the gadget at the given iterator position. More... | |
gadget_iterator | erase_gadget (gadget_iterator pos) |
Delete the component at the given location. More... | |
![]() | |
ResObject (const ResObject &other) | |
Copy constructor. | |
virtual | ~ResObject () |
Destructor. | |
ResObject & | operator= (const ResObject &other) |
Assignment. | |
bool | save (std::ostream &file) |
Save a resource object to a stream. More... | |
const ResObjectHeader * | object_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... | |
![]() | |
ResBase (const ResBase &other) | |
Copy constructor. More... | |
virtual | ~ResBase () |
Destructor. | |
ResBase & | operator= (const ResBase &other) |
Assignment. More... | |
Protected Member Functions | |
char * | gadget_start () const |
Get pointer to position of first gadget in memory. More... | |
int | first_gadget_offset () const |
Get offset to first gadget. More... | |
int | end_gadget_offset () const |
Get offset to end of gadgets. More... | |
ResGadget | gadget_at_offset (int item_offset) const |
Get a copy of the gadget at the given offset. More... | |
void | next_gadget (int &item_offset) const |
Get offset to next gadget in window. More... | |
char * | shortcut_start () const |
Get pointer to first short cut in memory. More... | |
int | first_shortcut_offset () const |
Get offset of first shortcut in window. More... | |
int | end_shortcut_offset () const |
Get offset to end of shortcuts in window. More... | |
ResShortcut | shortcut_at_offset (int item_offset) const |
Get a copy of the shortcut at the given offset. More... | |
![]() | |
ResObject (std::string name, int class_id, int version, int object_size) | |
Protected constructor for creating a subclass. | |
ResObjectHeader * | object_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... | |
![]() | |
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 | const_shortcut_iterator |
class | shortcut_iterator |
class | const_gadget_iterator |
class | gadget_iterator |
Additional Inherited Members | |
![]() | |
static ResObject * | load (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. | |
![]() | |
ResImpl * | _impl |
Internal Resource implementation. | |
Window resource object.
|
inline |
Constructor and empty ResWindow.
name | template name of the object |
toolbar | true to set defaults for a toolbar |
|
inline |
Copy constructor.
other | object to create copy of |
|
inline |
Construct from a ResObject.
other | object to create copy of |
void tbx::res::ResWindow::add_gadget | ( | const ResGadget & | gadget | ) |
Adds the gadget to the end of the window.
gadget | - gadget to add |
ResGadgetExists | if the gadget's component id is already in the window |
void tbx::res::ResWindow::add_shortcut | ( | const ResShortcut & | shortcut | ) |
Adds the shortcut to the end of the window.
shortcut | - shortcut to add |
ResShortcutExists | if the shortcut's key_code is already in the window |
|
inline |
Check if window has an adjust size icon.
|
inline |
Set if window has an adjust size icon.
has_icon | true if window has an adjust size icon |
|
inline |
Check if window is allowed off screen.
|
inline |
Set if window is allowed off screen.
allow | true if window is allowed off screen |
|
inline |
Check if window is automatically closed.
Automatically close this Window when a WIMP CloseWindowRequest is received (when set the client will not see the underlying WIMP requests)
|
inline |
Set if window is automatically closed.
Automatically close this Window when a WIMP CloseWindowRequest is received (when set the client will not see the underlying WIMP requests)
value | set to true if window should be automatically closed |
|
inline |
Check if window can be redrawn entirely by the WIMP.
i.e there are no user graphics in the work area
|
inline |
Set if window can be redrawn entirely by the WIMP.
i.e there are no user graphics in the work area
on | true if WIMP can redraw whole Window |
|
inline |
Check if window is automatically shown.
Automatically open this Window when a WIMP OpenWindowRequest is received (when set the client will not see the underlying WIMP requests)
|
inline |
Set if window is automatically shown.
Automatically open this Window when a WIMP OpenWindowRequest is received (when set the client will not see the underlying WIMP requests)
value | set to true if window is automatically shown |
|
inline |
Check if window has a back icon.
|
inline |
Set if window has a back icon.
has_icon | true if window has a back icon |
|
inline |
Get the WIMP window handle this window will be opened behind.
|
inline |
Set the WIMP window handle this window will be opened behind.
value | WIMP window handle or -1 for on top |
|
inline |
Get the button type.
|
inline |
Set the button type.
value | button type |
|
inline |
Check if window has a close icon.
|
inline |
Set if window has a close icon.
has_icon | true if window has a close icon |
bool tbx::res::ResWindow::contains_gadget | ( | ComponentId | component_id | ) | const |
Check if the window contains a gadget with the given id.
component_id | component ID of gadget to check |
|
inline |
Get the component ID of the gadget to get the default focus.
|
inline |
Set the component ID of the gadget to get the default focus.
id | the component ID, FOCUS_TO_WINDOW if focus should be on the window or NULL_ComponentID for none |
|
protected |
Get offset to end of gadgets.
|
protected |
Get offset to end of shortcuts in window.
void tbx::res::ResWindow::erase_gadget | ( | ComponentId | id | ) |
Erase gadget with specific id.
id | component id |
ResGadgetNotFound | if id is not in the Window |
ResWindow::gadget_iterator tbx::res::ResWindow::erase_gadget | ( | gadget_iterator | pos | ) |
Delete the component at the given location.
pos | iterator to gadget to be deleted |
void tbx::res::ResWindow::erase_shortcut | ( | int | key_code | ) |
Erase shortcut with specific key_code.
key_code | WIMP key code of shortcut to erase |
ResShortcutNotFound | if key_code is not in the Window |
ResWindow::shortcut_iterator tbx::res::ResWindow::erase_shortcut | ( | shortcut_iterator | pos | ) |
Delete the component at the given location.
pos | iterator to shortcut to erase |
|
inline |
Get the name of the object to use for the external bottom left toolbar.
|
inline |
Set the name of the object to use for the external bottom left toolbar.
value | pointer to zero terminated toolbar object name or 0 if none. |
|
inline |
Set the name of the object to use for the external bottom left toolbar.
value | toolbar object name. |
|
inline |
Get the name of the object to use for the external top left toolbar.
|
inline |
Set the name of the object to use for the external top left toolbar.
value | pointer to zero terminated toolbar object name or 0 if none. |
|
inline |
Set the name of the object to use for the external top left toolbar.
value | toolbar object name. |
ResWindow::const_gadget_iterator tbx::res::ResWindow::find_gadget | ( | int | component_id | ) | const |
Find gadget with given id.
component_id | component ID of gadget to find |
ResWindow::gadget_iterator tbx::res::ResWindow::find_gadget | ( | int | component_id | ) |
Find gadget with given id.
component_id | component ID of gadget to find |
ResWindow::const_shortcut_iterator tbx::res::ResWindow::find_shortcut | ( | int | key_code | ) | const |
Find shortcut with given key.
key_code | key code for shortcut |
ResWindow::shortcut_iterator tbx::res::ResWindow::find_shortcut | ( | int | key_code | ) |
Find shortcut for the given key.
key_code | key code for shortcut |
|
protected |
Get offset to first gadget.
|
protected |
Get offset of first shortcut in window.
|
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
|
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
|
inline |
Check if window is forced on screen.
|
inline |
Set if window is forced on screen.
on | true if window if forced on screen |
ResGadget tbx::res::ResWindow::gadget | ( | ComponentId | component_id | ) | const |
Get a copy of gadget with given component id.
component_id | to find |
ResGadgetNotFound | if component can't be found |
|
protected |
Get a copy of the gadget at the given offset.
This is for specialised use only - use gadget iterators for normal access to the gadgets in this window
|
inline |
Get constant iterator to first gadget.
|
inline |
Get iterator to first gadget.
|
inline |
Get constant iterator to first gadget.
|
inline |
Get constant iterator to the end of the gadgets.
|
inline |
Get constant iterator to the end of the gadgets.
|
inline |
Get iterator to the end of the gadgets.
|
inlineprotected |
Get pointer to position of first gadget in memory.
|
inline |
Check if the about to be shown event will be generated.
|
inline |
Set if the about to be shown event will be generated.
value | set to true if the about to be shown event should be generated |
|
inline |
Check if an event will be generated when the window has been hidden.
|
inline |
Set if an event will be generated when the window has been hidden.
value | set to true if the event should be generated |
|
inline |
Get the help message.
|
inline |
Set the help message.
value | pointer to zero terminated help message or 0 if none. |
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. |
|
inline |
Set the help message.
value | help message. |
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. |
|
inline |
Get the event ID of the event generated when the window has been hidden.
generate_has_been_hidden must be set for this event to be generated
|
inline |
Set the event ID of the event generated when the window has been hidden.
generate_has_been_hidden must be set for this event to be generated
value | event ID or -1 for default. |
|
inline |
Check if generates events for hot keys.
|
inline |
Set if generates events for hot keys.
generate | true if events are generated for hot keys |
|
inline |
Check if window has a horizontal scroll bar.
|
inline |
Set if window has a horizontal scroll bar.
has_hsb | true if window has a horizontal scroll bar |
|
inline |
Check if lower extent is ignored.
|
inline |
Set if lower extent is ignored.
ignore | true if lower extent is ignored |
|
inline |
Check if right extent is ignored.
|
inline |
Set if right extent is ignored.
ignore | true if right extent is ignored |
ResWindow::gadget_iterator tbx::res::ResWindow::insert_gadget | ( | gadget_iterator | pos, |
const ResGadget & | gadget | ||
) |
Insert gadget at given position.
pos | position to insert the gadget before |
gadget | gadget to insert |
ResGadgetExists | if a gadget with the same component ID already exists in the window |
ResWindow::shortcut_iterator tbx::res::ResWindow::insert_shortcut | ( | shortcut_iterator | pos, |
const ResShortcut & | shortcut | ||
) |
Insert shortcut at given position.
pos | iterator to position to insert the shortcut |
shortcut | shortcut to insert |
ResShortcutExists | if a shortcut with the same key code already exists. |
|
inline |
Get the name of the object to use for the internal bottom left toolbar.
|
inline |
Set the name of the object to use for the internal bottom left toolbar.
value | pointer to zero terminated toolbar object name or 0 if none. |
|
inline |
Set the name of the object to use for the internal bottom left toolbar.
value | toolbar object name. |
|
inline |
Get the name of the object to use for the internal top left toolbar.
|
inline |
Set the name of the object to use for the internal top left toolbar.
value | pointer to zero terminated toolbar object name or 0 if none. |
|
inline |
Set the name of the object to use for the internal top left toolbar.
value | toolbar object name. |
|
inline |
Get the menu to be shown for this menu.
|
inline |
Set the menu to be shown for this menu.
value | pointer to zero terminated menu object name or 0 for none |
|
inline |
Set the menu to be shown for this menu.
value | menu object name |
|
inline |
Get the minimum height for the window.
|
inline |
Set the minimum height for the window.
value | minimum height in OS units |
|
inline |
Get the minimum width for the window.
|
inline |
Set the minimum width for the window.
value | minimum width in OS units |
|
inline |
Check if the window will be moveable.
|
inline |
Set if the window is moveable.
move | true to make window moveable |
|
protected |
Get offset to next gadget in window.
item_offset | current offset. Updated to next offset. |
|
inline |
Get the number of gadgets in this window.
|
inline |
Get the number of shortcut keys in this window.
Assignment.
other | object to create copy of |
Assignment from ResObject.
other | object to create copy of |
|
inline |
Check if a window is a pane.
|
inline |
Set if a window is a pane.
p | true if the window is a pane |
|
inline |
Get the name of the sprite to use for the mouse pointer when it is over this window.
|
inline |
Set the name of the sprite to use for the mouse pointer when it is over this window.
value | pointer to zero terminated sprite name or 0 if none |
max_length | maximum length of sprite name the pointer shape will be set to or -1 to use the length of value. |
|
inline |
Set the name of the sprite to use for the mouse pointer when it is over this window.
value | sprite name |
max_length | maximum length of sprite name the pointer shape will be set to or -1 to use the length of value. |
|
inline |
Get the X position of the hotspot in the pointer.
|
inline |
Set the X position of the hotspot in the pointer.
value | X position of hotspot |
|
inline |
Get the Y position of the hotspot in the pointer.
|
inline |
Set the Y position of the hotspot in the pointer.
value | Y position of hotspot |
|
inline |
Check if window colours are given as gcol numbers.
|
inline |
Set if window colours are given as gcol numbers.
real | true if window colours are given as gcol numbers |
void tbx::res::ResWindow::replace_gadget | ( | const ResGadget & | gadget | ) |
Replace menu gadget with same component id as given gadget.
gadget | gadget to replace |
ResGadgetNotFound | if a gadget with the same component ID does not exist |
ResWindow::gadget_iterator tbx::res::ResWindow::replace_gadget | ( | gadget_iterator | pos, |
const ResGadget & | gadget | ||
) |
Replace the gadget at the given iterator position.
pos | iterator pointing at gadget to replace |
gadget | gadget to use as replacement |
ResGadgetExists | if component ID of replacement gadget matches an existing gadget in the window apart from the one replaced. |
void tbx::res::ResWindow::replace_shortcut | ( | const ResShortcut & | shortcut | ) |
Replace menu shortcut with same key_code as given shortcut.
shortcut | shortcut to replace |
ResShortcutNotFound | if shortcut with same key code is not in the window |
ResWindow::shortcut_iterator tbx::res::ResWindow::replace_shortcut | ( | shortcut_iterator | pos, |
const ResShortcut & | shortcut | ||
) |
Replace the shortcut at the given iterator position.
pos | position of shortcut to replace |
shortcut | replacement shortcut |
ResShortcutExists | if a shortcut apart from the replaced shortcut exists with the same key code as the replacement shortcut. |
|
inline |
Get the scroll bar inner colour.
|
inline |
Set the scroll bar inner colour.
value | WIMP colour |
|
inline |
Get the work area scroll bar outer colour.
|
inline |
Set the scroll bar outer colour.
value | WIMP colour |
|
inline |
Get the X scroll offset into the work area.
|
inline |
Set the X scroll offset into the work area.
value | X scroll offset in OS units |
|
inline |
Get the Y scroll offset into the work area.
|
inline |
Set the Y scroll offset into the work area.
value | Y scroll offset in OS units |
ResShortcut tbx::res::ResWindow::shortcut | ( | int | key_code | ) | const |
Get a copy of shortcut with key_code.
key_code | to find |
ResShortcutNotFound | if shortcut can't be found |
|
protected |
Get a copy of the shortcut at the given offset.
This is for specialised use only - use shortcut iterators for normal access to the shortcuts in this window
item_offset | offset to shortcut in the window |
|
inline |
Get constant iterator to first shortcut.
|
inline |
Get iterator to first shortcut.
|
inline |
Get constant iterator to first shortcut.
|
inline |
Get constant iterator to end of shortcuts.
|
inline |
Get constant iterator to end of shortcuts.
|
inline |
Get iterator to end of shortcuts.
|
inlineprotected |
Get pointer to first short cut in memory.
|
inline |
Get the event ID of the event generated when the window is shown.
generate_about_to_be_shown must be set for this event to be generated
|
inline |
Set the event ID of the event generated when the window is shown.
generate_about_to_be_shown must be set for this event to be generated
event_id | event ID or -1 for default. |
|
inline |
Get a pointer to the sprite area used for client icons on this window.
|
inline |
Set a pointer to the sprite area used for client icons on this window.
value | OS Sprite area pointer |
|
inline |
Get the background colour for the title bar.
|
inline |
Set the background colour for the title bar.
value | WIMP colour |
|
inline |
Get the length of the buffer to hold the title.
|
inline |
Set the length of the buffer to hold the title.
value | title buffer length |
|
inline |
Get the title flags.
|
inline |
Set the title flags.
value | title flags 32 bit value |
|
inline |
Get the foreground/text colour for the title bar.
|
inline |
Set the foreground/text colour for the title bar.
value | WIMP colour |
|
inline |
Get the background colour for the title bar when it has the input focus.
|
inline |
Set the background colour for the title bar when it has the input focus.
value | WIMP colour |
|
inline |
Get the text for the title of the window.
|
inline |
Set the text for the title of the window.
value | pointer to zero terminated title text |
|
inline |
Set the text for the title of the window.
value | title text |
|
inline |
Get the title validation.
|
inline |
Set the title validation.
value | pointer to zero terminated title validation string or -1 if none. |
|
inline |
Set the title validation.
value | title validation string |
|
inline |
Check if window has a title bar.
|
inline |
Set if window has a title bar.
has_tb | true if window has a title bar |
|
inline |
Check if window has a toggle size icon.
|
inline |
Set if window has a toggle size icon.
has_icon | true if window has a toggle size icon |
|
inline |
Check if this template is for a toolbar.
|
inline |
Set if this template is for a toolbar.
value | set to true if the template is for a toolbar |
|
inline |
Check if window can be opened below this.
|
inline |
Set if window can be opened below this.
tw | true if this is the top window |
|
inline |
Check if a Scroll_Request event if returned with auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region.
|
inline |
Set if a Scroll_Request event if returned with auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region.
scroll | true to turn user scroll on |
|
inline |
Check if a Scroll_Request event if returned with no auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region.
|
inline |
Set if a Scroll_Request event if returned with no auto-repeat on the arrow icons and no auto-repeat on the outer scroll bar region.
scroll | true to turn user scroll on |
|
inline |
Get the maximum X coordinate of the visible part of the window.
|
inline |
Set the maximum X coordinate of the visible part of the window.
value | X coordinate in OS units |
|
inline |
Get the minimum X coordinate of the visible part of the window.
|
inline |
Set the minimum X coordinate of the visible part of the window.
value | X coordinate in OS units |
|
inline |
Get the maximum Y coordinate of the visible part of the window.
|
inline |
Set the maximum Y coordinate of the visible part of the window.
value | Y coordinate in OS units |
|
inline |
Get the minimum Y coordinate of the visible part of the window.
|
inline |
Set the minimum Y coordinate of the visible part of the window.
value | Y coordinate in OS units |
|
inline |
Check if window has a vertical scroll bar.
|
inline |
Set if window has a vertical scroll bar.
has_vsb | true if window has a vertical scroll bar |
|
inline |
Get the window flags.
This gets all the window flags as one number, use the methods below for a more readable way to interrogate individual window flags
|
inline |
Set the window flags.
This sets all the window flags as one number, use the methods below for a more readble way to set the individual window flags.
value | the new window flags |
|
inline |
Get the work area background colour.
|
inline |
Set the work area background colour.
value | WIMP colour |
|
inline |
Get the work area foreground colour.
|
inline |
Set the work area foreground colour.
value | WIMP colour |
|
inline |
Get the maximum X coordinate of the work area extent.
|
inline |
Set the maximum X coordinate of the work area extent.
value | X coordinate in OS units |
|
inline |
Get the minimum X coordinate of the work area extent.
|
inline |
Set the minimum X coordinate of the work area extent.
value | X coordinate in OS units |
|
inline |
Get the maximum Y coordinate of the work area extent.
|
inline |
Set the maximum Y coordinate of the work area extent.
value | Y coordinate in OS units |
|
inline |
Get the minimum Y coordinate of the work area extent.
|
inline |
Set the minimum Y coordinate of the work area extent.
value | Y coordinate in OS units |