Instigate Open Source Documentation

instigate::toolkit::window Class Reference

Window widget. More...

#include <window.hpp>

List of all members.

Classes

struct  callback
struct  event_handler
 Base event handler.
struct  g_event_handler
 Gtk event handler.
struct  gtk_graphic_context
struct  gtk_list_view
struct  gtk_tree_view
struct  gtk_tree_view_base
struct  line_coordinates
struct  q_event_handler
 Qt event handler.
struct  qt_graphic_context
class  qt_notebook
struct  qt_notebook_page
struct  qt_tree_view
struct  template_callback
struct  tree_view_column

Public Types

enum  widget_type {
  layout = 0, button = 1, edit_box = 2, text_box = 3,
  combo_box = 4, main_window = 5, label = 6, menu_bar = 7,
  menu_item = 8, menu = 9, sub_menu = 10, notebook = 11,
  notebook_page = 12, check_box = 13, toolbar = 14, toolitem = 15,
  action = 16, check_menu_item = 17, tool_button = 18, action_group = 19,
  radio_menu_item = 20, tree = 21, statusbar = 22, scrollwindow = 23,
  chooser_button = 24, file_chooser = 25, paned_window = 26, color_button = 27,
  list = 28, frame = 29, image = 30, table = 31,
  html_view = 32, progressbar = 33
}
typedef std::vector< std::string > rows
typedef std::vector< std::string > widget_children
 The Widget's children.

Public Member Functions

void replace_all_occurrences (std::string &, const std::string &, const std::string &) const throw ()
Main Window



void set_position (const std::string &s) throw ()
 Sets the position of the main window.
void resize (size_t w, size_t h) throw ()
 Resizes the main window.
void set_style (const std::string &s) throw ()
 Sets the window's GUI style.
void set_modal (bool m) throw ()
 Sets the window's modality.
Layout



void add_horizontal_layout (const std::string &s) throw ()
 Adds a new horizontal box with given path.
void add_vertical_layout (const std::string &s) throw ()
 Adds a new vertical box.
Paneds and Frame.



void add_horizontal_paned (const std::string &s) throw ()
 Adds a new horizontal paned.
void add_vertical_paned (const std::string &s) throw ()
 Adds a new vertical paned.
void set_paned_position (const std::string &s, int i) throw ()
 Sets the position of the dividers between panes for paned widget.
void add_frame (const std::string &s) throw ()
 Adds a frame.
Read-only widgets



void add_label (const std::string &s) throw ()
 Adds a new label.
void add_image (const std::string &s, const std::string &p="") throw ()
 Adds a new image.
void add_html_view (const std::string &s) throw ()
 Adds a new html view.
template<typename T >
void add_action (const std::string &s, T f) throw ()
 Adds a new action.
Editable widgets



void add_edit_box (const std::string &s) throw ()
 Adds a new edit box.
int get_edit_box_cursor_position (const std::string &s) throw ()
 Gets edit box cursor position.
void set_edit_box_cursor_position (const std::string &s, int i) throw ()
 Sets edit box cursor position.
void set_language (const std::string &s, const std::string &p) throw ()
 Sets the source language of text box.
void set_accelerator (const std::string &s, const std::string &p) throw ()
 Sets accelerator to menu item.
void add_text_box (const std::string &s) throw ()
 Adds a new text box.
void move_cursor (const std::string &s) throw ()
 Move cursor of text box.
void add_scroll_window (const std::string &s) throw ()
 Adds a new scroll window.
void set_syntax (const std::string &s, const std::string &l) throw ()
 Sets syntax for text box.
void set_background_color (const std::string &s, const std::string &c) throw ()
 Sets the background color of the widget.
Snapshot



void create_snapshot (const std::string &n) const throw ()
Switches



void add_check_box (const std::string &s) throw ()
 Adds a new check box.
void add_toggle_button (const std::string &s) throw ()
 Adds a new toggle button.
Removable actions with widgets.



void remove_widget (const std::string &s) throw ()
 Removes the widget.
Choice widgets



void add_radio_button_group (const std::string &s) throw ()
 Adds a new radio button group.
void add_combo_box (const std::string &s) throw ()
 Adds a new combo box.
void add_combo_box_item (const std::string &s, const std::string &t) throw ()
 Adds a new combo box item to combo box.
Collection Widgets



void add_grid (const std::string &s) throw ()
 Adds a new grid.
void add_table (const std::string &s, size_t r, size_t c) throw ()
 Adds a new table.
void add_item (const std::string &s, const std::string &t) throw ()
 Adds new t item to widget corresponding to s.
Events

Widgets raise certain events. To handle an event, one should use register and action with the method add_action and use the method add_handler.



void add_handler (const std::string &s, const std::string &e, const std::string &a) throw ()
 Adds an event handler to the widget.
void remove_all_handlers (const std::string &s) throw ()
 Remove all n handlers from s widget.
Text of widgets



void set_text (const std::string &s, const std::string &t) throw ()
 Set widget text.
Value of widgets



void set_value (const std::string &s, const std::string &t) throw ()
 Sets text value of the widget. Text values can be set to the following widgets:

  • text_box
  • line_edit
  • color_button (valid name of a color)
  • file_chooser_button (valid file/dir path).

void set_value (const std::string &s, const char *t) throw ()
 Sets text value of the widget.
void set_value (const std::string &s, int v) throw ()
 Sets integer value of the widget. Integer values can be set to the following widgets:

  • combo_box (active text number)
  • progress_bar.

void set_value (const std::string &s, bool t) throw ()
 Sets the boolean value to check box widget.
Color of text widgets



void set_color (const std::string &s, const std::string &t) throw ()
 Sets text color.
Style of text widgets



void set_font_style (const std::string &s, const std::string &t) throw ()
 Sets text style.
Focus of widgets



void set_focus (const std::string &s) throw ()
bool is_focusable (const std::string &s) const throw ()
Text of line edit and label widgets



void set_markup (const std::string &s, const std::string &t) throw ()
 Set label markup.
void append_text (const std::string &s, const std::string &t) throw ()
 Appends text to widget text.
std::string get_text (const std::string &s) const throw ()
 Get widget text.
void collect_children (const std::string &s, widget_children &c) const throw ()
 Get widget children.
std::string get_tooltip_text (const std::string &s) const throw ()
 Get widget tooltip text.
void set_html_content (const std::string &s, const std::string &h) throw ()
 Sets html content of html view.
Context



void set_context (const std::string &s) throw ()
 Sets current context.
bool is_exist_item_with_name (const std::string &s) const throw ()
 Checks existing of item(widget, canvas or canvas item) with this name.
std::string get_context () const throw ()
 Returns the current context.
Widgets



void add_button (const std::string &s) throw ()
 Adds a new button.
void add_icon (const std::string &s, const std::string &n) throw ()
 Adds a new icon.
void add_color_button (const std::string &s) throw ()
 Adds a new color button.
std::string get_color (const std::string &s) const throw ()
 Returns the color of the color button in rgb form.
Action



void set_action_caption (const std::string &s, const std::string &n) throw ()
 Set action caption.
void set_action_accelerator (const std::string &s, const std::string &n) throw ()
 Set accelerator for action.
Selection



std::string get_selected_item_text (const std::string &s) const throw ()
 Gets the text of the selected item of widget of type tree view.
size_t get_selected_item_index (const std::string &s) throw ()
 Gets the index of the selected item of widget of type tree view.
rows get_selected_rows (const std::string &s) const throw ()
 Gets the paths of the selected rows of tree view.
std::string get_selected_item_column (const std::string &s) const throw ()
 Gets the column path of the selected item.
void select_row (const std::string &s) const throw ()
 Sets the current keyboard focus to be at row, and selects it.
void deselect_row (const std::string &s) throw ()
 Deselect the row.
Tree and List view



void add_tree (const std::string &s) throw ()
 Adds a new tree.
void add_list (const std::string &s) throw ()
 Adds a new list view.
void add_column (const std::string &s) throw ()
 Adds a new tree column.
void add_row (const std::string &s) throw ()
 Adds a new row to tree.
void set_title (const std::string &s, const std::string &t) throw ()
 Sets a title to the column.
void add_check_field (const std::string &s) throw ()
 Adds a column with check buttons.
void add_label_field (const std::string &s) throw ()
 Adds a label column to the tree.
void add_icon_field (const std::string &s) throw ()
 Adds an icon column to the tree.
bool is_checked (const std::string &s) const throw ()
 Gets whether the corresponding widget is checked or not.
std::string get_expanded_row (const std::string &s) const throw ()
 Gets the path of the expanded row of tree view.
std::string get_collapsed_row (const std::string &s) const throw ()
 Gets the path of the collapsed row of tree view.
rows get_tree_row_children (const std::string &s) const throw ()
 Gets the paths of the tree view row children.
void expand_row (const std::string &s) const throw ()
 Opens the row so its children are visible.
void clear_rows (const std::string &s) throw ()
 Clears all rows from the tree or list widget.
void set_selection_mode (const std::string &s, const std::string &m) throw ()
 Sets the selection mode of the tree view.
std::string get_selection_mode (const std::string &s) const throw ()
 Gets the selection mode of the tree view.
size_t get_item_id (const std::string &s) throw ()
 Gets item id.
Selection mode manipulation



void set_multiselection_mode (const std::string &s) throw ()
 Set selection mode to multi selection mode of tree view widget.
void set_singleselection_mode (const std::string &s) throw ()
 Set selection mode to single selection mode of tree view widget.
bool is_selection_mode_single (const std::string &s) throw ()
 Indicates whether is single mode the selection mode.
Menu



void add_menu_bar (const std::string &s) throw ()
 Adds a new menu bar to the main.
void add_menu (const std::string &s) throw ()
 Adds a new menu to the main.
void add_context_menu (const std::string &s) throw ()
 Adds a new context menu to the widget.
void run_context_menu (const std::string &s) throw ()
 Runs the context menu.
void add_menu_item (const std::string &s) throw ()
 Adds a new menu item on the menu.
void add_toggle_menu_item (const std::string &s) throw ()
 Adds a new toggle menu item on the menu.
StatusBar



void add_statusbar (const std::string &s) throw ()
 Adds a new statusbar.
Toolbar



void add_toolbar (const std::string &s) throw ()
 Adds a new toolbar.
void add_toolbar_item (const std::string &s) throw ()
 Adds a new tool bar item on the tool bar.
void add_toggle_toolbar_item (const std::string &s) throw ()
 Adds a new toggle tool bar item on the tool bar.
Separator



void add_separator (const std::string &s) throw ()
 Adds separator to menu.
Properties



void set_enable (const std::string &s) throw ()
 Enables the widget corresponding to s.
void set_disable (const std::string &s) throw ()
 Disables the widget corresponding to s.
bool is_enable (const std::string &s) const throw ()
 Get whether the widget corresponding to s is sensitive.
void hide (const std::string &s) throw ()
 Hides the widget corresponding to s.
void set_editable (const std::string &s) throw ()
 Makes the widget corresponding to s editable.
void set_read_only (const std::string &s) throw ()
 Makes the widget corresponding to s read only.
void show (const std::string &s) throw ()
 Shows the widget corresponding to s.
bool is_visible (const std::string &s) const throw ()
 Get whether the widget corresponding to s is visible.
bool is_editable (const std::string &s) const throw ()
 Get whether the widget corresponding to s is editable.
Notebook



void add_notebook (const std::string &s) throw ()
 Adds a new notebook.
void add_notebook_page (const std::string &s) throw ()
 Adds a new notebook page on the notebook.
void set_current_page (const std::string &s) throw ()
 Sets the notebook's current page to s.
int get_current_page (const std::string &s) const throw ()
 Gets the notebook's current page.
void set_tooltip_text (const std::string &s, const std::string &t) throw ()
 Sets widget tooltip text.
Progress bar



void add_progress_bar (const std::string &s) throw ()
 Adds a new progress bar.
int get_value (const std::string &s) const throw ()
 Gets the value of the progress bar.
Radio Menu



void add_radio_menu (const std::string &s) throw ()
 Adds a new radio menu .
void add_radio_menu_item (const std::string &s) throw ()
 Adds a new radio menu item to radio menu .
Graphic context

Graphic context is used to draw items on canvas widget. To draw an item one should add his graphic context, specify its properties and select it by the method set_graphic_context. After a call of that method all items added to the canvas will be drawn with the specified graphic context.



void add_graphic_context (const std::string &s) throw ()
 Adds a new graphic context.
void set_line_color (const std::string &s, const std::string &c) throw ()
 Sets a line color.
void set_fill_color (const std::string &s, const std::string &c) throw ()
 Sets a fill color.
void set_font (const std::string &s, const std::string &f) throw ()
 Sets a font.
void set_font_size (const std::string &s, double d) throw ()
 Sets a size.
void set_italic (const std::string &s, bool b) throw ()
 Sets a italic.
void set_bold (const std::string &s, bool b) throw ()
 Sets a bold.
void set_fill_transparency (const std::string &s, int a) throw ()
 Sets a fill transparency.
void set_line_transparency (const std::string &s, int a) throw ()
 Sets a line transparency.
void set_line_width (const std::string &s, int w) throw ()
 Sets line width of graphic context.
void set_graphic_context (const std::string &s) throw ()
 Sets the current graphic context.
void set_graphic_context (const std::string &s, const std::string &c) throw ()
 Sets the graphic context to item.
User data



void set_user_data (const std::string &s, void *d) throw ()
 Sets a user data.
void * get_user_data (const std::string &s) const throw ()
 Gets a user data.
Items



void add_line (const std::string &s, double x1, double y1, double x2, double y2) throw ()
 Adds a new line.
void add_rectangle (const std::string &s, double x1, double y1, double x2, double y2) throw ()
 Adds a new rectangle.
void add_text (const std::string &s, double x1, double y1, const std::string &c) throw ()
 Adds a new text.
void add_ellipse (const std::string &s, double x1, double y1, double x2, double y2) throw ()
 Adds a new ellipse.
void remove_item (const std::string &s) throw ()
 Remove the item.
Group



void add_group (const std::string &s) throw ()
 Adds a new group.
Coordinate manipulating



double get_x1_coordinate (const std::string &s) const throw ()
 Gets a x1 coordinate of the item.
double get_x2_coordinate (const std::string &s) const throw ()
 Gets a x2 coordinate of the item.
double get_y1_coordinate (const std::string &s) const throw ()
 Gets a y1 coordinate of the item.
double get_y2_coordinate (const std::string &s) const throw ()
 Gets a y2 coordinate of the item.
uint32_t get_width (const std::string &s) const throw ()
 Gets a width of the item.
uint32_t get_height (const std::string &s) const throw ()
 Gets a height of the item.
void set_x1_coordinate (const std::string &s, double c) throw ()
 Sets a x1 coordinate of the item.
void set_x2_coordinate (const std::string &s, double c) throw ()
 Sets a x2 coordinate of the item.
void set_y1_coordinate (const std::string &s, double c) throw ()
 Sets a y1 coordinate of the item.
void set_y2_coordinate (const std::string &s, double c) throw ()
 Sets a y2 coordinate of the item.
Move



void move_item_by (const std::string &s, double x, double y) throw ()
 Moves the item by x points horizontally, and y point vertically.
void rotate (const std::string &s, double a) throw ()
 Rotates item on canvas.
void zoom (const std::string &s, double a, double b) throw ()
 Zoom item on canvas.
std::string get_item_at (const std::string &s, double x, double y) const throw ()
 Gets the path of the topmost item that is under the specified position.
Zoom



void zoom_canvas (const std::string &s, double f) throw ()
 Zoom canvas by the zoom factor.
void reset_canvas_zoom_factor (const std::string &s) throw ()
 Resets the canvas zoom factor.
FileChooserDialog



void add_file_chooser_dialog (const std::string &s) throw ()
 Creates file chooser dialog.
void add_file_chooser_button (const std::string &s, const std::string &p) throw ()
 Adds a new file chooser button.
void run_file_chooser_dialog (const std::string &s) throw ()
 Runs the file chooser dialog.
void set_name_filter (const std::string &s, const std::string &t) throw ()
 Sets the name filter onto a file chooser dialog.
void set_file_chooser_mode (const std::string &s, const std::string &t) throw ()
 Sets the file chooser dialog mode.
std::string get_filename (const std::string &s) const throw ()
 Returns the selected file name.
void raise_to_top (const std::string &s) throw ()
 Raises an item to the top of its parent's stack.
void lower_to_bottom (const std::string &s) throw ()
 Lowers an item to the bottom of its parent's stack.
Special member functions



 ~window () throw ()
 Destructor.
 window (const std::string &n) throw ()
 Only available constructor.

Friends

class application
class qt_graphics_view
class item
class qt_widget
class qt_event_handler
class gtk_key_event

Canvas



enum  mode { antialiased = 0, simple = 1 }
void add_canvas (const std::string &s, mode m) throw ()
 Adds a new canvas.

Key state



bool is_control_pressed () const throw ()
 Return true if control key is pressed.
bool is_shift_pressed () const throw ()
 Return true if shift key is pressed.
std::string get_event_emitter () const throw ()
 Returns the path of the canvas item which emitted the event.
widget_type get_widget_type (const std::string &s) throw ()
std::string get_substring (const std::string &, const std::string &="/") const throw ()
std::string get_name () const throw ()
void run () throw ()
 Runs the dialog window.

Layout properties



void set_spacing (const std::string &s, int t) throw ()
 Sets placement between children of box.
void add_spacer (const std::string &s) throw ()
 Add spacer to the layout.
void set_size_policy (const std::string &s, const std::string &t) throw ()
 Sets layout size policy.
std::string get_size_policy (const std::string &s) const throw ()
 Gets layout size policy.

User defined events

Users can specify the user defined event(used add_event), register listener for this event(used add_listener) and emit corresponding event (used emit_event). The events can be registered and emitted from different threads. Also event handling mechanism provides thread safe execution of the callback registered in event's listener.

 // Event registration
 add_event("name");
 ...
 // Listener registration
 add_listener("name", &work);
 ...
 // Event emitting
 emit_event("name");
Todo:
When emitted event from different thread, which callback refreshes gui, in gtk mode gui not refreshed automatically. It refreshes only during mouse moving on window.


void add_event (const std::string &n) throw ()
 Creates an event with given name.
template<typename T >
void add_listener (const std::string &n, T f) throw ()
 Registers a new listener to respective event.
void emit_event (const std::string &n) throw ()
 Emit respective event.

Key events



std::string get_pressed_key () const throw ()
 Returns the last pressed key on the widget.
std::string get_released_key () const throw ()
 Returns the last released key on the widget.

Mouse coordinates



double get_mouse_x_coordinate () const throw ()
 Gets a x coordinate of the mouse.
double get_mouse_y_coordinate () const throw ()
 Gets a y coordinate of the mouse.
void get_group_items (const std::string &s, std::vector< std::string > &v) throw ()
 Group Items.
void toggle_selection (const std::string &s) throw ()
 selects an item if it's not selected and deselects otherwise
void select_item (const std::string &s) throw ()
 Selects an item.
bool is_item_selected (const std::string &s) throw ()
 Returns true if item is selected, and false otherwise.
bool is_item_exist (const std::string &s) throw ()
 Returns true if item exists, and false otherwise.
void select_all () throw ()
 Selects all the canvas items .
void deselect_item (const std::string &s) throw ()
 Deselects an item.
void deselect_all () throw ()
 Deselects all the canvas items .

Detailed Description

Window widget.

Central concept of toolkit library. Provides methods for adding and manipulating all supported kinds of widgets and layouts.

Identification of widgets is similar to identification of files. Each widget has a name, which is unique in context of its parent. The path of a widget determines its location - hierarchy of parent widgets, separated with '/' character. The path "/" represents the root path.

To add a widget, one needs to specify its path. All path are given relative to the current context, which may be modified by set_context method. The current path is the root path by default.

Precondition:
Widget's path can not be ".." or ".".

E.g. the following code adds button "my_button" to a horizontal box "my_hbox", which is located in a vertical box "my_vbox"

 {
      add_vertical_layout("my_vbox");
      add_horizontal_layout("my_vbox/my_hbox");
      set_context("my_vbox/my_hbox");
      add_button("my_button");
      set_text("my_button", "My Button");
 }

To create window, one should derive this class and use a bunch of methods to specify its content.


Constructor & Destructor Documentation

instigate::toolkit::window::window ( const std::string &  n  )  throw ()

Only available constructor.

Parameters:
n Name of window.
Precondition:
!n.empty()
n should be unique.

Member Function Documentation

template<typename T >
void instigate::toolkit::window::add_action ( const std::string &  s,
f 
) throw () [inline]

Adds a new action.

Parameters:
s The name of the action.
f Callback function.
void instigate::toolkit::window::add_button ( const std::string &  s  )  throw ()

Adds a new button.

Parameters:
s The path of the button.

Events

  • clicked
void instigate::toolkit::window::add_canvas ( const std::string &  s,
mode  m 
) throw ()

Adds a new canvas.

Parameters:
s The path of the canvas.
m Canvas mode.
void instigate::toolkit::window::add_check_box ( const std::string &  s  )  throw ()

Adds a new check box.

Parameters:
s The path of the text box.

Events

  • clicked
void instigate::toolkit::window::add_check_field ( const std::string &  s  )  throw ()

Adds a column with check buttons.

Parameters:
s The path of the tree column field.
void instigate::toolkit::window::add_color_button ( const std::string &  s  )  throw ()

Adds a new color button.

Parameters:
s The path of the button.
void instigate::toolkit::window::add_column ( const std::string &  s  )  throw ()

Adds a new tree column.

Note:
This function do not create tree column. The columns creation will be done before first row creation in the add_row().
Parameters:
s The path of the tree column.
void instigate::toolkit::window::add_combo_box ( const std::string &  s  )  throw ()

Adds a new combo box.

Parameters:
s The path of the widget.

Events - changed

void instigate::toolkit::window::add_combo_box_item ( const std::string &  s,
const std::string &  t 
) throw ()

Adds a new combo box item to combo box.

Parameters:
s The path of the widget.
t The name of the widget.
void instigate::toolkit::window::add_context_menu ( const std::string &  s  )  throw ()

Adds a new context menu to the widget.

Parameters:
s The path of the menu.
void instigate::toolkit::window::add_edit_box ( const std::string &  s  )  throw ()

Adds a new edit box.

Parameters:
s The path of the edit box.

Events

  • activate
  • event
  • changed
void instigate::toolkit::window::add_ellipse ( const std::string &  s,
double  x1,
double  y1,
double  x2,
double  y2 
) throw ()

Adds a new ellipse.

Parameters:
s The path of the ellipse.
x1 The x coordinate of the first endpoint
y1 The y coordinate of the first endpoint
x2 The x coordinate of the second endpoint
y2 The y coordinate of the second endpoint
void instigate::toolkit::window::add_event ( const std::string &  n  )  throw ()

Creates an event with given name.

Parameters:
n Name of the event to be created.
Precondition:
!n.empty()
There must be no event existing with name n
Complexity
Todo:
Clarify complexity
void instigate::toolkit::window::add_file_chooser_button ( const std::string &  s,
const std::string &  p 
) throw ()

Adds a new file chooser button.

Parameters:
s The path of the button.
p The path of the dialog.
void instigate::toolkit::window::add_file_chooser_dialog ( const std::string &  s  )  throw ()

Creates file chooser dialog.

??? from here until ???END lines may have been inserted/deleted

Parameters:
s The path of the dialog.
void instigate::toolkit::window::add_frame ( const std::string &  s  )  throw ()

Adds a frame.

Parameters:
s The path of the frame.
Todo:
The frame is not visible in some Qt configurations, so QPlastiqueStyle is temporally explicitly set for displaying the frame box in Qt.
void instigate::toolkit::window::add_graphic_context ( const std::string &  s  )  throw ()

Adds a new graphic context.

Parameters:
s The path of the graphic context.
void instigate::toolkit::window::add_grid ( const std::string &  s  )  throw ()

Adds a new grid.

Parameters:
s The path of the grid

Events

void instigate::toolkit::window::add_group ( const std::string &  s  )  throw ()

Adds a new group.

Parameters:
s The path of the group.
void instigate::toolkit::window::add_handler ( const std::string &  s,
const std::string &  e,
const std::string &  a 
) throw ()

Adds an event handler to the widget.

Parameters:
s The path of the widget.
e Event name.
a The name of the handler action.
void instigate::toolkit::window::add_horizontal_layout ( const std::string &  s  )  throw ()

Adds a new horizontal box with given path.

Note:
The size policy of the horizontal layout is "expand" by default.
Parameters:
s The path of the layout.
Precondition:
!s.empty()
void instigate::toolkit::window::add_horizontal_paned ( const std::string &  s  )  throw ()

Adds a new horizontal paned.

Parameters:
s The path of the paned.
void instigate::toolkit::window::add_html_view ( const std::string &  s  )  throw ()

Adds a new html view.

Parameters:
s The path of the html view widget
void instigate::toolkit::window::add_icon ( const std::string &  s,
const std::string &  n 
) throw ()

Adds a new icon.

Parameters:
s The path of the icon.
n File name of icon to use.
void instigate::toolkit::window::add_icon_field ( const std::string &  s  )  throw ()

Adds an icon column to the tree.

Parameters:
s The path of the tree column field.
void instigate::toolkit::window::add_image ( const std::string &  s,
const std::string &  p = "" 
) throw ()

Adds a new image.

Parameters:
s The path of the image widget
p The path of the file containing image

Events

void instigate::toolkit::window::add_label ( const std::string &  s  )  throw ()

Adds a new label.

Parameters:
s The path of the label.

Events

void instigate::toolkit::window::add_label_field ( const std::string &  s  )  throw ()

Adds a label column to the tree.

Parameters:
s The path of the tree column field.
void instigate::toolkit::window::add_line ( const std::string &  s,
double  x1,
double  y1,
double  x2,
double  y2 
) throw ()

Adds a new line.

Parameters:
s The path of the line.
x1 The x coordinate of the first endpoint
y1 The y coordinate of the first endpoint
x2 The x coordinate of the second endpoint
y2 The y coordinate of the second endpoint
void instigate::toolkit::window::add_list ( const std::string &  s  )  throw ()

Adds a new list view.

Parameters:
s The path of the list view

Events

  • selection_changed
  • cursor_changed
  • row_activated
template<typename T >
void instigate::toolkit::window::add_listener ( const std::string &  n,
f 
) throw () [inline]

Registers a new listener to respective event.

Parameters:
n The name of the event.
l The listener object.

If an event by name n is emitted, only the listeners associated with that event will be notified.

Precondition:
!n.empty()
l must be an generator function, with any result type(ignored)
Complexity
Todo:
Clarify complexity
void instigate::toolkit::window::add_menu ( const std::string &  s  )  throw ()

Adds a new menu to the main.

Parameters:
s The path of the menu.

Events

  • activate
  • select
  • deselect
void instigate::toolkit::window::add_menu_bar ( const std::string &  s  )  throw ()

Adds a new menu bar to the main.

Parameters:
s The path of the menu.
void instigate::toolkit::window::add_menu_item ( const std::string &  s  )  throw ()

Adds a new menu item on the menu.

Parameters:
s The path of the menu item.

Events

  • activate
  • select
  • deselect
void instigate::toolkit::window::add_notebook ( const std::string &  s  )  throw ()

Adds a new notebook.

Parameters:
s The path of the notebook.
void instigate::toolkit::window::add_notebook_page ( const std::string &  s  )  throw ()

Adds a new notebook page on the notebook.

Parameters:
s The path of the notebook page.
void instigate::toolkit::window::add_progress_bar ( const std::string &  s  )  throw ()

Adds a new progress bar.

This widget can be added on window, layout or status bar.

Parameters:
s The path of the progress bar.
Precondition:
!s.empty()
void instigate::toolkit::window::add_radio_button_group ( const std::string &  s  )  throw ()

Adds a new radio button group.

Parameters:
s The path of the combo box.

Events

void instigate::toolkit::window::add_radio_menu ( const std::string &  s  )  throw ()

Adds a new radio menu .

Parameters:
s The path of the radio menu.

Events

  • activate
  • select
  • deselect
void instigate::toolkit::window::add_radio_menu_item ( const std::string &  s  )  throw ()

Adds a new radio menu item to radio menu .

Parameters:
s The path of the radio menu item.

Events

  • activate
  • select
  • deselect
void instigate::toolkit::window::add_rectangle ( const std::string &  s,
double  x1,
double  y1,
double  x2,
double  y2 
) throw ()

Adds a new rectangle.

Parameters:
s The path of the rectangle.
x1 The x coordinate of the first endpoint
y1 The y coordinate of the first endpoint
x2 The x coordinate of the second endpoint
y2 The y coordinate of the second endpoint
void instigate::toolkit::window::add_row ( const std::string &  s  )  throw ()

Adds a new row to tree.

Parameters:
s The path of the tree row.
void instigate::toolkit::window::add_scroll_window ( const std::string &  s  )  throw ()

Adds a new scroll window.

Parameters:
s The path of the scroll window.
void instigate::toolkit::window::add_separator ( const std::string &  s  )  throw ()

Adds separator to menu.

Parameters:
s The path of the menu.
void instigate::toolkit::window::add_spacer ( const std::string &  s  )  throw ()

Add spacer to the layout.

Todo:
remove_widget function should be extended to delete spacers
void instigate::toolkit::window::add_statusbar ( const std::string &  s  )  throw ()

Adds a new statusbar.

Parameters:
s The path of the statusbar.
void instigate::toolkit::window::add_table ( const std::string &  s,
size_t  r,
size_t  c 
) throw ()

Adds a new table.

Parameters:
s The path of the table
r The count of rows
c The count of columns

Events

void instigate::toolkit::window::add_text ( const std::string &  s,
double  x1,
double  y1,
const std::string &  c 
) throw ()

Adds a new text.

Parameters:
s The path of the text.
x1 The x coordinate of the first endpoint
y1 The y coordinate of the first endpoint
c The text
void instigate::toolkit::window::add_text_box ( const std::string &  s  )  throw ()

Adds a new text box.

Parameters:
s The path of the text box.
Note:
The text box has scroll bar, i.e. user should not add scroll window for text box.

Events - insert at cursor.

void instigate::toolkit::window::add_toggle_button ( const std::string &  s  )  throw ()

Adds a new toggle button.

Parameters:
s The path of the button.

Events

void instigate::toolkit::window::add_toggle_menu_item ( const std::string &  s  )  throw ()

Adds a new toggle menu item on the menu.

Parameters:
s The path of the toggle menu item.

Events

  • activate
  • select
  • deselect
void instigate::toolkit::window::add_toggle_toolbar_item ( const std::string &  s  )  throw ()

Adds a new toggle tool bar item on the tool bar.

Parameters:
s The path of the toolbar item.
void instigate::toolkit::window::add_toolbar ( const std::string &  s  )  throw ()

Adds a new toolbar.

Parameters:
s The path of the toolbar.
void instigate::toolkit::window::add_toolbar_item ( const std::string &  s  )  throw ()

Adds a new tool bar item on the tool bar.

Parameters:
s The path of the toolbar item.
void instigate::toolkit::window::add_tree ( const std::string &  s  )  throw ()

Adds a new tree.

Parameters:
s The path of the tree.
void instigate::toolkit::window::add_vertical_layout ( const std::string &  s  )  throw ()

Adds a new vertical box.

Note:
The size policy of the vertical layout is "expand" by default.
Parameters:
s The path of the layout.
Precondition:
!s.empty()
void instigate::toolkit::window::add_vertical_paned ( const std::string &  s  )  throw ()

Adds a new vertical paned.

Parameters:
s The path of the paned.
void instigate::toolkit::window::append_text ( const std::string &  s,
const std::string &  t 
) throw ()

Appends text to widget text.

Parameters:
s Widget path.
t Text to be set.
void instigate::toolkit::window::clear_rows ( const std::string &  s  )  throw ()

Clears all rows from the tree or list widget.

Parameters:
s The path of the tree or list.
void instigate::toolkit::window::collect_children ( const std::string &  s,
widget_children c 
) const throw ()

Get widget children.

Parameters:
s Widget path.
c The vector that the children must be put in.
void instigate::toolkit::window::create_snapshot ( const std::string &  n  )  const throw ()

Creates the snapshot of the window and saves it in ".png" format.

Parameters:
n - the path of the image file
Note:
".png" extension is added to the specified file name.
The method is available since gtkmm 2.14.
Precondition:
The dialog is already shown.
!n.empty()
Todo:
if the method is invoked directly after show() method, a snapshot may not be taken properly, because of the "slowness" of show() method.
void instigate::toolkit::window::deselect_item ( const std::string &  s  )  throw ()

Deselects an item.

Parameters:
s The path of the item.
void instigate::toolkit::window::deselect_row ( const std::string &  s  )  throw ()

Deselect the row.

Parameters:
s The path of the row.
void instigate::toolkit::window::emit_event ( const std::string &  n  )  throw ()

Emit respective event.

Parameters:
n Name of the event.
Precondition:
There should be a event with name n (created using add_event) before invoking this.
Note:
This function is thread-safe
Complexity
Todo:
Clarify complexity
void instigate::toolkit::window::expand_row ( const std::string &  s  )  const throw ()

Opens the row so its children are visible.

Parameters:
s The path of the tree view row.
std::string instigate::toolkit::window::get_collapsed_row ( const std::string &  s  )  const throw ()

Gets the path of the collapsed row of tree view.

Parameters:
s The path of the tree view.
std::string instigate::toolkit::window::get_color ( const std::string &  s  )  const throw ()

Returns the color of the color button in rgb form.

Parameters:
s The path of the button.
int instigate::toolkit::window::get_current_page ( const std::string &  s  )  const throw ()

Gets the notebook's current page.

Parameters:
s The path of the notebook.
int instigate::toolkit::window::get_edit_box_cursor_position ( const std::string &  s  )  throw ()

Gets edit box cursor position.

Parameters:
s The path of the edit box.
std::string instigate::toolkit::window::get_event_emitter (  )  const throw ()

Returns the path of the canvas item which emitted the event.

Note:
This function is to be called from canvas event handlers only.
Todo:
Implement this function for other widgets too.
std::string instigate::toolkit::window::get_expanded_row ( const std::string &  s  )  const throw ()

Gets the path of the expanded row of tree view.

Parameters:
s The path of the tree view.
std::string instigate::toolkit::window::get_filename ( const std::string &  s  )  const throw ()

Returns the selected file name.

Parameters:
s The path of the dialog.
void instigate::toolkit::window::get_group_items ( const std::string &  s,
std::vector< std::string > &  v 
) throw ()

Group Items.

Gets group items.

Parameters:
s The path of the item.
v The vector of group items.
uint32_t instigate::toolkit::window::get_height ( const std::string &  s  )  const throw ()

Gets a height of the item.

Parameters:
s The path of the item.
Note:
Currently works only for images.
std::string instigate::toolkit::window::get_item_at ( const std::string &  s,
double  x,
double  y 
) const throw ()

Gets the path of the topmost item that is under the specified position.

Parameters:
s The path of the canvas.
x X position.
y Y position.
size_t instigate::toolkit::window::get_item_id ( const std::string &  s  )  throw ()

Gets item id.

Parameters:
s The path of the widget.
Returns:
item id
std::string instigate::toolkit::window::get_selected_item_column ( const std::string &  s  )  const throw ()

Gets the column path of the selected item.

Parameters:
s The path of the tree view or list view.
Precondition:
s must be path of tree view or list view.
size_t instigate::toolkit::window::get_selected_item_index ( const std::string &  s  )  throw ()

Gets the index of the selected item of widget of type tree view.

Parameters:
s The path of the widget.
Returns:
Selected item index.
std::string instigate::toolkit::window::get_selected_item_text ( const std::string &  s  )  const throw ()

Gets the text of the selected item of widget of type tree view.

Parameters:
s The path of the widget.
Returns:
Selected item text.
rows instigate::toolkit::window::get_selected_rows ( const std::string &  s  )  const throw ()

Gets the paths of the selected rows of tree view.

Parameters:
s The path of the tree view.
std::string instigate::toolkit::window::get_selection_mode ( const std::string &  s  )  const throw ()

Gets the selection mode of the tree view.

Parameters:
s The path of the tree view.
std::string instigate::toolkit::window::get_size_policy ( const std::string &  s  )  const throw ()

Gets layout size policy.

Parameters:
s The path of the layout.
Precondition:
s must be path of the layout.
!s.empty()
std::string instigate::toolkit::window::get_text ( const std::string &  s  )  const throw ()

Get widget text.

Parameters:
s Widget path.
std::string instigate::toolkit::window::get_tooltip_text ( const std::string &  s  )  const throw ()

Get widget tooltip text.

Parameters:
s Widget path.
rows instigate::toolkit::window::get_tree_row_children ( const std::string &  s  )  const throw ()

Gets the paths of the tree view row children.

Parameters:
s The path of the tree view.
void* instigate::toolkit::window::get_user_data ( const std::string &  s  )  const throw ()

Gets a user data.

Parameters:
s The path of the item.
int instigate::toolkit::window::get_value ( const std::string &  s  )  const throw ()

Gets the value of the progress bar.

Parameters:
s The path of the progress bar.
Precondition:
s must be path of the progress bar.
Todo:
This function will be used also for other widgets (e.g. slider).
widget_type instigate::toolkit::window::get_widget_type ( const std::string &  s  )  throw ()

Returns type of the specified widget.

Parameters:
s - path of the widget which type should be returned
Precondition:
s is a valid widget path
uint32_t instigate::toolkit::window::get_width ( const std::string &  s  )  const throw ()

Gets a width of the item.

Parameters:
s The path of the item.
Note:
Currently works only for images.
double instigate::toolkit::window::get_x1_coordinate ( const std::string &  s  )  const throw ()

Gets a x1 coordinate of the item.

Parameters:
s The path of the item.
double instigate::toolkit::window::get_x2_coordinate ( const std::string &  s  )  const throw ()

Gets a x2 coordinate of the item.

Parameters:
s The path of the item.
double instigate::toolkit::window::get_y1_coordinate ( const std::string &  s  )  const throw ()

Gets a y1 coordinate of the item.

Parameters:
s The path of the item.
double instigate::toolkit::window::get_y2_coordinate ( const std::string &  s  )  const throw ()

Gets a y2 coordinate of the item.

Parameters:
s The path of the item.
void instigate::toolkit::window::hide ( const std::string &  s  )  throw ()

Hides the widget corresponding to s.

Parameters:
s The path of the widget
Todo:
Provide hide function for gtk(does not work now)
bool instigate::toolkit::window::is_checked ( const std::string &  s  )  const throw ()

Gets whether the corresponding widget is checked or not.

The specified widget should be one of the following:

  • check_box
  • toggle_button
  • toggle_menu_item
  • toggle_toolbar_item
Parameters:
s The path of the widget.
bool instigate::toolkit::window::is_exist_item_with_name ( const std::string &  s  )  const throw ()

Checks existing of item(widget, canvas or canvas item) with this name.

Parameters:
s The path of item(widget, canvas or canvas item).
Todo:
Must be checked a validity of the context(can be container).
bool instigate::toolkit::window::is_item_exist ( const std::string &  s  )  throw ()

Returns true if item exists, and false otherwise.

Parameters:
s The path of the item.
bool instigate::toolkit::window::is_item_selected ( const std::string &  s  )  throw ()

Returns true if item is selected, and false otherwise.

Parameters:
s The path of the item.
bool instigate::toolkit::window::is_selection_mode_single ( const std::string &  s  )  throw ()

Indicates whether is single mode the selection mode.

Parameters:
s The path of the widget.
Returns:
true if selection mode is single.
void instigate::toolkit::window::lower_to_bottom ( const std::string &  s  )  throw ()

Lowers an item to the bottom of its parent's stack.

Parameters:
s The path of the item.
void instigate::toolkit::window::move_cursor ( const std::string &  s  )  throw ()

Move cursor of text box.

Parameters:
s The path of the text box.
Note:
Now move the cursor to the page end. The new parameter should be added for specifying cursor position (i.e. page begin/end, one word forward/backward)
void instigate::toolkit::window::move_item_by ( const std::string &  s,
double  x,
double  y 
) throw ()

Moves the item by x points horizontally, and y point vertically.

Parameters:
s The path of the item.
x Horizontal offset.
y Vertical offset.
void instigate::toolkit::window::raise_to_top ( const std::string &  s  )  throw ()

Raises an item to the top of its parent's stack.

Parameters:
s The path of the item.
void instigate::toolkit::window::remove_all_handlers ( const std::string &  s  )  throw ()

Remove all n handlers from s widget.

Parameters:
s The path of the widget.
void instigate::toolkit::window::remove_item ( const std::string &  s  )  throw ()

Remove the item.

Parameters:
s The path of the item.
void instigate::toolkit::window::remove_widget ( const std::string &  s  )  throw ()

Removes the widget.

Parameters:
s The path of the widget.
void instigate::toolkit::window::reset_canvas_zoom_factor ( const std::string &  s  )  throw ()

Resets the canvas zoom factor.

Parameters:
s The path of the canvas.
void instigate::toolkit::window::resize ( size_t  w,
size_t  h 
) throw ()

Resizes the main window.

Parameters:
w The width to be set
h The height to be set
void instigate::toolkit::window::rotate ( const std::string &  s,
double  a 
) throw ()

Rotates item on canvas.

Rotate the item with given angle on canvas.

Parameters:
s The unique name of item.
a The rotate angle, if a is positive, rotation of item will be clockwise, else will be counterclockwise.
Note:
Currently works only for images.
void instigate::toolkit::window::run (  )  throw ()

Runs the dialog window.

Todo:
Remove run
void instigate::toolkit::window::run_context_menu ( const std::string &  s  )  throw ()

Runs the context menu.

Parameters:
s The path of the menu.
void instigate::toolkit::window::run_file_chooser_dialog ( const std::string &  s  )  throw ()

Runs the file chooser dialog.

Parameters:
s The path of the dialog.
void instigate::toolkit::window::select_item ( const std::string &  s  )  throw ()

Selects an item.

Parameters:
s The path of the item.
void instigate::toolkit::window::select_row ( const std::string &  s  )  const throw ()

Sets the current keyboard focus to be at row, and selects it.

Parameters:
s The path of the row.
void instigate::toolkit::window::set_accelerator ( const std::string &  s,
const std::string &  p 
) throw ()

Sets accelerator to menu item.

Parameters:
s The path of menu item.
p The accelerator key to be set on menu item.
void instigate::toolkit::window::set_action_accelerator ( const std::string &  s,
const std::string &  n 
) throw ()

Set accelerator for action.

Parameters:
s The action name.
n Accelerator string.
Todo:
explain the format of accelerator.
void instigate::toolkit::window::set_action_caption ( const std::string &  s,
const std::string &  n 
) throw ()

Set action caption.

Parameters:
s The action name.
n Caption name.
void instigate::toolkit::window::set_background_color ( const std::string &  s,
const std::string &  c 
) throw ()

Sets the background color of the widget.

Parameters:
s The path of the widget.
c Color to be set.
void instigate::toolkit::window::set_bold ( const std::string &  s,
bool  b 
) throw ()

Sets a bold.

Parameters:
s The path of the graphic context.
b If b is true sets the font's style to bold, otherwise sets normal.
void instigate::toolkit::window::set_color ( const std::string &  s,
const std::string &  t 
) throw ()

Sets text color.

For label, check box and notebook page widgets only.

Parameters:
s Widget path.
t Valid color name to be set.
Precondition:
s must be path of label, check box or notebook page.
void instigate::toolkit::window::set_context ( const std::string &  s  )  throw ()

Sets current context.

Parameters:
s The path of the new context.
Todo:
must be checked validity of setting context(conteiners must be)
void instigate::toolkit::window::set_current_page ( const std::string &  s  )  throw ()

Sets the notebook's current page to s.

Parameters:
s The path of the notebook page to be active.
Note:
that the function makes sense only if the notebook is visible.
void instigate::toolkit::window::set_disable ( const std::string &  s  )  throw ()

Disables the widget corresponding to s.

Parameters:
s The path of the widget
void instigate::toolkit::window::set_edit_box_cursor_position ( const std::string &  s,
int  i 
) throw ()

Sets edit box cursor position.

Parameters:
s The path of the edit box.
i The position of edit box cursor
void instigate::toolkit::window::set_editable ( const std::string &  s  )  throw ()

Makes the widget corresponding to s editable.

Parameters:
s The path of the widget.
void instigate::toolkit::window::set_enable ( const std::string &  s  )  throw ()

Enables the widget corresponding to s.

Parameters:
s The path of the widget
void instigate::toolkit::window::set_file_chooser_mode ( const std::string &  s,
const std::string &  t 
) throw ()

Sets the file chooser dialog mode.

Parameters:
s The path of the dialog.
t The mode.
void instigate::toolkit::window::set_fill_color ( const std::string &  s,
const std::string &  c 
) throw ()

Sets a fill color.

Parameters:
s The path of the graphic context.
c Color to be set.
void instigate::toolkit::window::set_fill_transparency ( const std::string &  s,
int  a 
) throw ()

Sets a fill transparency.

Parameters:
s The path of the graphic context.
a Alpha-channel, i.e. transparency.Integer alpha is specified in the range 0-255.
void instigate::toolkit::window::set_font ( const std::string &  s,
const std::string &  f 
) throw ()

Sets a font.

Parameters:
s The path of the graphic context.
f Font to be set.
void instigate::toolkit::window::set_font_size ( const std::string &  s,
double  d 
) throw ()

Sets a size.

Parameters:
s The path of the graphic context.
d Size to be set.
void instigate::toolkit::window::set_font_style ( const std::string &  s,
const std::string &  t 
) throw ()

Sets text style.

For label, check box and notebook page widgets only. Currently only "bold" style is supported.

Parameters:
s Widget path.
t Valid style type to be set.
Precondition:
s must be path of label, check box or notebook page.
t is valid text style
void instigate::toolkit::window::set_graphic_context ( const std::string &  s,
const std::string &  c 
) throw ()

Sets the graphic context to item.

Parameters:
s The path of the item.
c The path of the graphic context.
void instigate::toolkit::window::set_graphic_context ( const std::string &  s  )  throw ()

Sets the current graphic context.

Parameters:
s The path of the graphic context.

All items added after call of this function will be drawn with the specified graphic context.

void instigate::toolkit::window::set_html_content ( const std::string &  s,
const std::string &  h 
) throw ()

Sets html content of html view.

param s Widget path

param h Html content

void instigate::toolkit::window::set_italic ( const std::string &  s,
bool  b 
) throw ()

Sets a italic.

Parameters:
s The path of the graphic context.
b If b is true sets the font's style to italic, otherwise sets normal.
void instigate::toolkit::window::set_language ( const std::string &  s,
const std::string &  p 
) throw ()

Sets the source language of text box.

Parameters:
s Path of the text box
p Source language
Precondition:
p should be one of cpp, tcl, python, verilog, vhdl.
void instigate::toolkit::window::set_line_color ( const std::string &  s,
const std::string &  c 
) throw ()

Sets a line color.

Parameters:
s The path of the graphic context.
c Color to be set.
void instigate::toolkit::window::set_line_transparency ( const std::string &  s,
int  a 
) throw ()

Sets a line transparency.

Parameters:
s The path of the graphic context.
a Alpha-channel, i.e. transparency.Integer alpha is specified in the range 0-255.
void instigate::toolkit::window::set_line_width ( const std::string &  s,
int  w 
) throw ()

Sets line width of graphic context.

Parameters:
s The path of the graphic context.
w Width to be set.
void instigate::toolkit::window::set_markup ( const std::string &  s,
const std::string &  t 
) throw ()

Set label markup.

Parameters:
s The path of the label for which the markup should be set.
t The markup to be set
Precondition:
!s.empty()
!t.empty()
void instigate::toolkit::window::set_modal ( bool  m  )  throw ()

Sets the window's modality.

The window is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows.

When the window is not modal, it does not block input to other windows.

Parameters:
m The modality of window.
void instigate::toolkit::window::set_multiselection_mode ( const std::string &  s  )  throw ()

Set selection mode to multi selection mode of tree view widget.

Parameters:
s The path of the widget.
void instigate::toolkit::window::set_name_filter ( const std::string &  s,
const std::string &  t 
) throw ()

Sets the name filter onto a file chooser dialog.

Parameters:
s The path of the dialog.
t The filter text.
void instigate::toolkit::window::set_paned_position ( const std::string &  s,
int  i 
) throw ()

Sets the position of the dividers between panes for paned widget.

Parameters:
s The path of the widget.
i The pixel position.
Todo:
Is implemented for Gtk only.
void instigate::toolkit::window::set_position ( const std::string &  s  )  throw ()

Sets the position of the main window.

If the position is specified as "center" the window will be opened in the center of the desktop. If the position is specified as "mouse" will be opened with the mouse cursor as its center.

Parameters:
s The position of the main window.
Precondition:
s == "center" || s == "mouse"
void instigate::toolkit::window::set_read_only ( const std::string &  s  )  throw ()

Makes the widget corresponding to s read only.

Parameters:
s The path of the widget.
void instigate::toolkit::window::set_selection_mode ( const std::string &  s,
const std::string &  m 
) throw ()

Sets the selection mode of the tree view.

Parameters:
s The path of the tree view.
m Mode to be set.
void instigate::toolkit::window::set_singleselection_mode ( const std::string &  s  )  throw ()

Set selection mode to single selection mode of tree view widget.

Parameters:
s The path of the widget.
void instigate::toolkit::window::set_size_policy ( const std::string &  s,
const std::string &  t 
) throw ()

Sets layout size policy.

Parameters:
s The path of the layout
t The policy should be set. Possible values are shrink and expand.

If t is shrink, then widget size is fixed in parent layout direction.

If t is expand, then widget size is expanding in parent layout direction.

Precondition:
s must be path of the layout.
void instigate::toolkit::window::set_spacing ( const std::string &  s,
int  t 
) throw ()

Sets placement between children of box.

Parameters:
s The path of the layout
t The number of pixels to place between children
void instigate::toolkit::window::set_style ( const std::string &  s  )  throw ()

Sets the window's GUI style.

The possible values are "dialog", "splash_screen".

When the style of window is "dialog", it indicates that the window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). If you want to use it as a modal dialog set_modal().

When the style of window is "splash_screen", it indicates that the window is a splash screen.

Parameters:
s The style of window.
void instigate::toolkit::window::set_syntax ( const std::string &  s,
const std::string &  l 
) throw ()

Sets syntax for text box.

Parameters:
s Path of the text box
l language
Todo:
possible values of l should be described.
void instigate::toolkit::window::set_text ( const std::string &  s,
const std::string &  t 
) throw ()

Set widget text.

Parameters:
s Widget path.
t Text to be set.
void instigate::toolkit::window::set_title ( const std::string &  s,
const std::string &  t 
) throw ()

Sets a title to the column.

Parameters:
s The path of the tree column.
t The title of the tree column.
void instigate::toolkit::window::set_tooltip_text ( const std::string &  s,
const std::string &  t 
) throw ()

Sets widget tooltip text.

Parameters:
s Widget path.
t Text to be set.
void instigate::toolkit::window::set_user_data ( const std::string &  s,
void *  d 
) throw ()

Sets a user data.

Parameters:
s The path of the item.
d Data to be set.
void instigate::toolkit::window::set_value ( const std::string &  s,
bool  t 
) throw ()

Sets the boolean value to check box widget.

Parameters:
s Widget path.
t Boolean parameter defining whether s is checked or not.
Precondition:
s must be path of the check box.
void instigate::toolkit::window::set_value ( const std::string &  s,
int  v 
) throw ()

Sets integer value of the widget. Integer values can be set to the following widgets:

  • combo_box (active text number)
  • progress_bar.

Parameters:
s Widget path.
v Value to be set.
Precondition:
s must be path of the progress bar or combo box.
void instigate::toolkit::window::set_value ( const std::string &  s,
const char *  t 
) throw ()

Sets text value of the widget.

The method cannot be overloaded with bool and string values, because string is implicitly converted to bool. To workaround this problem, following function is provided.

void instigate::toolkit::window::set_value ( const std::string &  s,
const std::string &  t 
) throw ()

Sets text value of the widget. Text values can be set to the following widgets:

  • text_box
  • line_edit
  • color_button (valid name of a color)
  • file_chooser_button (valid file/dir path).

Parameters:
s Widget path.
t Value to be set.
Precondition:
s must be path of the text box, edit box, file chooser button, or color button.
Todo:
find out if set_value method is needed for file chooser dialog.
void instigate::toolkit::window::set_x1_coordinate ( const std::string &  s,
double  c 
) throw ()

Sets a x1 coordinate of the item.

Parameters:
s The path of the item.
c Coordinate to be set.
void instigate::toolkit::window::set_x2_coordinate ( const std::string &  s,
double  c 
) throw ()

Sets a x2 coordinate of the item.

Parameters:
s The path of the item.
c Coordinate to be set.
void instigate::toolkit::window::set_y1_coordinate ( const std::string &  s,
double  c 
) throw ()

Sets a y1 coordinate of the item.

Parameters:
s The path of the item.
c Coordinate to be set.
void instigate::toolkit::window::set_y2_coordinate ( const std::string &  s,
double  c 
) throw ()

Sets a y2 coordinate of the item.

Parameters:
s The path of the item.
c Coordinate to be set.
void instigate::toolkit::window::show ( const std::string &  s  )  throw ()

Shows the widget corresponding to s.

Parameters:
s The path of the widget.
void instigate::toolkit::window::toggle_selection ( const std::string &  s  )  throw ()

selects an item if it's not selected and deselects otherwise

Parameters:
s The path of the item.
void instigate::toolkit::window::zoom ( const std::string &  s,
double  a,
double  b 
) throw ()

Zoom item on canvas.

Multiplies the sizes of item by given factors. After zooming the top-left coordinate of the item remains the same. Zooming out will take place in case if less than 1 coefficients are given.

Parameters:
s The unique name of image
a The coefficient of horizontal zooming
b The coefficient of vertical zooming
void instigate::toolkit::window::zoom_canvas ( const std::string &  s,
double  f 
) throw ()

Zoom canvas by the zoom factor.

Parameters:
s The path of the canvas.
f Zoom factor.

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


© Instigate CJSC, Open Source