Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

utils_controls Class Reference

A static-only class for commonly used functions of wxWindows controls. More...

#include <utils_controls.h>

List of all members.


Static Public Methods

bool  splitterwindow_fix_sash_out_of_range (wxSplitterWindow *splitterwindow)
  Fixes a wxSplitterWindow that has its sash position out of range.

bool  textctrl_hex_color_selection (wxTextCtrl *target_color_textctrl)
  Show a color selector dialog and put the hex color value string in a textctrl.

bool  textctrl_filename_selection (wxTextCtrl *target_filename_textctrl, wxString message, wxString default_file, wxString default_directory, wxString wildcard, bool allow_multiple, wxChar multiple_selection_delimiter, bool uses_file_protocol)
  Show a file selector dialog and put the filename(s) into a textctrl.

bool  textctrl_directory_selection (wxTextCtrl *target_filename_textctrl, wxString message, wxString default_directory, bool allow_multiple, wxChar multiple_selection_delimiter)
  Show a directory selector dialog and put the directory(ies) into a textctrl.

void  set_html_window_text_in_gui_style (wxHtmlWindow *target_html_window, const wxString &source=wxEmptyString, long options=optionSET_HTML_BACKGROUND_TO_MATCH_GUI_PANEL|optionSET_HTML_FONT_COLOR_TO_MATCH_GUI|optionSET_HTML_FONT_FACE_AND_POINTSIZE_TO_MATCH_GUI|optionSET_HTML_WINDOW_INTERNAL_PADDING_TO_ZERO)
  Sets a target HTML window to certain HTML content, in the style of part of a GUI's paenl.

void  set_choice_to_configuration_time_string (wxChoice *target_choice, const wxString &time_configuration_key, const wxString &default_time_string="12:00:00")
  Sets a time choice to the time specified in a configuration key string.

void  set_configuration_time_string_to_choice_index (const wxString &time_configuration_key, wxChoice *input_choice)
  Sets a config key to the time of a choice control.

void  read_dialog_position_and_size (wxWindow *target_window, const wxString &configuration_key_basename, wxPoint default_position=wxDefaultPosition, wxSize default_size=wxDefaultSize)
  Reads a dialog position and size,.

void  write_dialog_position_and_size (wxWindow *target_window, const wxString &configuration_key_basename)
  Writes a dialog position and size to the configuraiton,.


Detailed Description

A static-only class for commonly used functions of wxWindows controls.

Member Function Documentation

void utils_controls::read_dialog_position_and_size wxWindow *    target_window,
const wxString &    configuration_key_basename,
wxPoint    default_position = wxDefaultPosition,
wxSize    default_size = wxDefaultSize
[static]
 

Reads a dialog position and size,.

Parameters:
target_window  The window whose size should be saved.
configuration_key_basename  The basename of the key in the config. For example 'channel_dialog' (which will use keys like 'channel_dialog_position_x', etc.
default_position  Default position, if none in configuration file.
default_size  Default size, if none in cofiguration file.
void utils_controls::set_choice_to_configuration_time_string wxChoice *    target_choice,
const wxString &    time_configuration_key,
const wxString &    default_time_string = "12:00:00"
[static]
 

Sets a time choice to the time specified in a configuration key string.

Parameters:
target_choice  Pointer to the choice.
time_configuration_key  Key in configuration file holding the time.
default_time_string  Default time to fill into the textctrl.
void utils_controls::set_configuration_time_string_to_choice_index const wxString &    time_configuration_key,
wxChoice *    input_choice
[static]
 

Sets a config key to the time of a choice control.

Parameters:
time_configuration_key  Key in configuration file holding the time.
target_choice  Pointer to the choice.
void utils_controls::set_html_window_text_in_gui_style wxHtmlWindow *    target_html_window,
const wxString &    source = wxEmptyString,
long    options = optionSET_HTML_BACKGROUND_TO_MATCH_GUI_PANEL|optionSET_HTML_FONT_COLOR_TO_MATCH_GUI|optionSET_HTML_FONT_FACE_AND_POINTSIZE_TO_MATCH_GUI|optionSET_HTML_WINDOW_INTERNAL_PADDING_TO_ZERO
[static]
 

Sets a target HTML window to certain HTML content, in the style of part of a GUI's paenl.

The html window will initially be set up to look like part of a panel: background will match the color of a panel, and fonts will be the same size as a panel. The HTML source however can include a <font face=""> or a to override this if so desired.

Parameters:
target_html_window  Pointer to the html window.
source  A string of HTML source code that should be put into the htmlwindow. This is not a filename, it is a string. See wxHtmlWindow::SetPage() in wx docs for more information.
Bitlist  options of what things should be matched to the GUI, if you only want to set just the fonts face/pointsize, font color or the background color.
bool utils_controls::splitterwindow_fix_sash_out_of_range wxSplitterWindow   splitterwindow [static]
 

Fixes a wxSplitterWindow that has its sash position out of range.

Parameters:
splitterwindow  The splitterwindow to check to see if out of range.
Returns :
TRUE if the splitterwindow needed a fix.
bool utils_controls::textctrl_directory_selection wxTextCtrl *    target_filename_textctrl,
wxString    message,
wxString    default_directory,
bool    allow_multiple,
wxChar    multiple_selection_delimiter
[static]
 

Show a directory selector dialog and put the directory(ies) into a textctrl.

When a "Choose directory..." button beside a filename textctrl is clicked, show a directory dialog, initialize to textctrl's previous value if possible, get the directory, and put it back in the textctrl.

Parameters:
target_filename_textctrl  Pointer to the textctrl
message  The prompt message shown in the dialog.
default_directory  The default directory to open. If Empty will be the current working directory.
allow_multiple  TRUE means they can select more than one file.
multiple_selection_delimiter  If they select mulitple directories, the delimiter to place between each directory when the directories are placed in the textctrl.
uses_file_protocal  TRUE if the textctrl needs a file:// prefixed at the start of the filename. Example: channel_dialog Starting Page tab.
Returns :
FALSE if there was a problem.
bool utils_controls::textctrl_filename_selection wxTextCtrl *    target_filename_textctrl,
wxString    message,
wxString    default_file,
wxString    default_directory,
wxString    wildcard,
bool    allow_multiple,
wxChar    multiple_selection_delimiter,
bool    uses_file_protocol
[static]
 

Show a file selector dialog and put the filename(s) into a textctrl.

When a "Choose file..." button beside a filename textctrl is clicked, show a filename dialog, initialize to textctrl's previous value if possible, get the filename, put it back in the textctrl. Return false if there was a problem.

Parameters:
target_filename_textctrl  Pointer to the textctrl
message  The prompt message shown in the dialog.
default_file  The default filename to select (can be empty string).
default_directory  The default directory to open. If Empty will be the current working directory.
wildcard  The wildcard filterpattern to use. One of the defines.
allow_multiple  TRUE means they can select more than one file.
multiple_selection_delimiter  If they select mulitple files, the delimiter to place between each filename when the files are placed in the textctrl.
uses_file_protocal  TRUE if the textctrl needs a file:// prefixed at the start of the filename. Example: channel_dialog Starting Page tab.
Returns :
FALSE if there was a problem.
bool utils_controls::textctrl_hex_color_selection wxTextCtrl *    target_color_textctrl [static]
 

Show a color selector dialog and put the hex color value string in a textctrl.

When a "Choose color..." button beside a hex color textctrl is tapped, show a color dialog, initialize to textctrl's previous value if possible, get the color, convert to hex, put it back in the list ctrl.

Parameters:
target_color_textctrl  Pointer to the textctrl to place the hex string
Returns :
FALSE if there was a problem.
void utils_controls::write_dialog_position_and_size wxWindow *    target_window,
const wxString &    configuration_key_basename
[static]
 

Writes a dialog position and size to the configuraiton,.

Parameters:
target_window  The window whose size should be saved.
configuration_key_basename  The basename of the key in the config. For example 'channel_dialog' (which will use keys like 'channel_dialog_position_x', etc.