#include <vgui_wx_dialog_impl.h>
Inheritance diagram for vgui_wx_dialog_impl:

Creates a dialog box in wxWidgets and provides methods for it's customization.
Definition at line 32 of file vgui_wx_dialog_impl.h.
Public Types | |
| enum | element_type { bool_elem, int_elem, long_elem, float_elem, double_elem, string_elem, choice_elem, text_msg, file_bsr, color_csr, inline_file_bsr, inline_color_csr, inline_tabl, dir_bsr, line_br, unknown } |
| Enum of possible element types. More... | |
Public Member Functions | |
| vgui_wx_dialog_impl (const char *name) | |
| Constructor - create an empty dialog with the given title. | |
| void | bool_field (const char *, bool &) |
| Add a boolean field to the dialog box. | |
| void | int_field (const char *, int &) |
| Add an integer field to the dialog box. | |
| void | long_field (const char *, long &) |
| Add a long integer field to the dialog box. | |
| void | float_field (const char *, float &) |
| Add a float field to the dialog box. | |
| void | double_field (const char *, double &) |
| Add a double field to the dialog box. | |
| void | string_field (const char *, vcl_string &) |
| Add a vcl_string field to the dialog box. | |
| void | choice_field (const char *, const vcl_vector< vcl_string > &, int &) |
| Add a choice (selection box) to the dialog box. | |
| void | text_message (const char *) |
| Add a text message to the dialog box. | |
| void | file_browser (const char *, vcl_string &, vcl_string &) |
| Add a popup file browser to the dialog box. | |
| void | inline_file_browser (const char *, vcl_string &, vcl_string &) |
| Add an inline file browser to the dialog box. | |
| void | color_chooser (const char *, vcl_string &) |
| Add a popup colour chooser to the dialog box. | |
| void | inline_color_chooser (const char *, vcl_string &) |
| Add an inline colour chooser to the dialog box. | |
| void | inline_tab (const vgui_tableau_sptr tab, unsigned width, unsigned height) |
| Add a tableau (OpenGL area) to the dialog box. | |
| virtual void * | bool_field_widget (const char *, bool &) |
| Pointer to a GUI widget for a bool field. | |
| virtual void * | int_field_widget (const char *, int &) |
| Pointer to a GUI widget for a integer field. | |
| virtual void * | long_field_widget (const char *, long &) |
| Pointer to a GUI widget for a long integer field. | |
| virtual void * | float_field_widget (const char *, float &) |
| Pointer to a GUI widget for a float field. | |
| virtual void * | double_field_widget (const char *, double &) |
| Pointer to a GUI widget for a double field. | |
| virtual void * | string_field_widget (const char *, vcl_string &) |
| Pointer to a GUI widget for a string field. | |
| virtual void * | text_message_widget (const char *) |
| Pointer to a GUI widget for a text message. | |
| virtual void * | file_browser_widget (const char *, vcl_string &, vcl_string &) |
| Pointer to a GUI widget for a file browser. | |
| virtual void * | inline_file_browser_widget (const char *, vcl_string &, vcl_string &) |
| Pointer to a GUI widget for an inline file browser. | |
| virtual void * | color_chooser_widget (const char *, vcl_string &) |
| Pointer to a GUI widget for a colour chooser. | |
| virtual void * | inline_color_chooser_widget (const char *, vcl_string &) |
| Pointer to a GUI widget for an inline colour chooser. | |
| virtual void * | inline_tableau_widget (const vgui_tableau_sptr tab, unsigned width, unsigned height) |
| Pointer to a GUI widget for a tableau (OpenGL area). | |
| virtual void | set_cancel_button (const char *msg) |
| Set the text on the cancel button. | |
| virtual void | set_ok_button (const char *msg) |
| Set the text on the OK button. | |
Protected Member Functions | |
| virtual | ~vgui_wx_dialog_impl () |
| Destructor. | |
| virtual bool | ask () |
| Display the dialog box form and collect data from the user. | |
| virtual void * | choice_field_widget (const char *txt, const vcl_vector< vcl_string > &labels, int &val) |
| Create a choice widget. | |
| virtual void * | inline_tableau_widget (const vgui_tableau_sptr tab, unsigned int width, unsigned int height) |
| Create the inline_tableau_widget (OpenGL area). | |
| virtual void | modal (bool m) |
| Set the modality of the dialog box. | |
Protected Attributes | |
| vcl_string | name |
| vcl_vector< element > | elements |
| vcl_string | cancel_button_text_ |
| vcl_string | ok_button_text_ |
Private Member Functions | |
| void | build_wx_dialog () |
| void | destroy_wx_dialog () |
| bool | has_changed () const |
| Determine if dialog has changed since last construction (i.e., ask()). | |
| int | probe_for_max_label_width () |
| wxSizer * | separator_element (int min_width) |
| wxSizer * | bool_element (vgui_dialog_field *field) |
| wxSizer * | choice_element (vgui_dialog_field *field, vgui_wx_dialog_choice *choices) |
| wxSizer * | text_element (vgui_dialog_field *field) |
| wxSizer * | text_with_button_element (vgui_dialog_field *field, wxTextCtrl *&text_control, const vcl_string &button, int event_id) |
| wxSizer * | exit_buttons_element () |
Private Attributes | |
| vcl_string | title_ |
| Title of the dialog widget. | |
| wxDialog * | dialog_ |
| Pointer to wxWidgets dialog widget. | |
| vcl_size_t | last_element_count_ |
| Element count at the last dialog construction (i.e., ask()). | |
| int | max_label_width_ |
| The width of the largest label; used for graphical alignment. | |
| bool | is_modal_ |
| True if the dialog box is modal (true by default). | |
| vgui_wx_adaptor * | adaptor_ |
enum vgui_dialog_impl::element_type [inherited] |
Enum of possible element types.
| bool_elem | |
| int_elem | |
| long_elem | |
| float_elem | |
| double_elem | |
| string_elem | |
| choice_elem | |
| text_msg | |
| file_bsr | |
| color_csr | |
| inline_file_bsr | |
| inline_color_csr | |
| inline_tabl | |
| dir_bsr | |
| line_br | |
| unknown |
Definition at line 141 of file vgui_dialog_impl.h.
| vgui_wx_dialog_impl::vgui_wx_dialog_impl | ( | const char * | name | ) |
Constructor - create an empty dialog with the given title.
Definition at line 192 of file vgui_wx_dialog_impl.cxx.
| vgui_wx_dialog_impl::~vgui_wx_dialog_impl | ( | ) | [protected, virtual] |
| bool vgui_wx_dialog_impl::ask | ( | void | ) | [protected, virtual] |
Display the dialog box form and collect data from the user.
In modal mode, it returns true if ok was pressed and false otherwise. In modeless mode, it returns false if the dialog was already displayed and true if it wasn't.
The vgui_dialog API doesn't really support modeless dialogs for data collection nor data monitoring. For example, for data monitoring we would need some sort of update() function to allow the user to periodically refresh the dialog values.
Implements vgui_dialog_impl.
Definition at line 224 of file vgui_wx_dialog_impl.cxx.
| virtual void* vgui_wx_dialog_impl::choice_field_widget | ( | const char * | txt, | |
| const vcl_vector< vcl_string > & | labels, | |||
| int & | val | |||
| ) | [protected, virtual] |
| virtual void* vgui_wx_dialog_impl::inline_tableau_widget | ( | const vgui_tableau_sptr | tab, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) | [protected, virtual] |
Create the inline_tableau_widget (OpenGL area).
| virtual void vgui_wx_dialog_impl::modal | ( | bool | m | ) | [inline, protected, virtual] |
Set the modality of the dialog box.
Reimplemented from vgui_dialog_impl.
Definition at line 56 of file vgui_wx_dialog_impl.h.
| void vgui_wx_dialog_impl::build_wx_dialog | ( | ) | [private] |
Definition at line 281 of file vgui_wx_dialog_impl.cxx.
| void vgui_wx_dialog_impl::destroy_wx_dialog | ( | ) | [private] |
Definition at line 429 of file vgui_wx_dialog_impl.cxx.
| bool vgui_wx_dialog_impl::has_changed | ( | void | ) | const [private] |
Determine if dialog has changed since last construction (i.e., ask()).
Note that we assume that the only change that can occur is that more fields are added.
Definition at line 449 of file vgui_wx_dialog_impl.cxx.
| int vgui_wx_dialog_impl::probe_for_max_label_width | ( | ) | [private] |
Definition at line 454 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::separator_element | ( | int | min_width | ) | [private] |
Definition at line 480 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::bool_element | ( | vgui_dialog_field * | field | ) | [private] |
Definition at line 490 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::choice_element | ( | vgui_dialog_field * | field, | |
| vgui_wx_dialog_choice * | choices | |||
| ) | [private] |
Definition at line 507 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::text_element | ( | vgui_dialog_field * | field | ) | [private] |
Definition at line 543 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::text_with_button_element | ( | vgui_dialog_field * | field, | |
| wxTextCtrl *& | text_control, | |||
| const vcl_string & | button, | |||
| int | event_id | |||
| ) | [private] |
Definition at line 571 of file vgui_wx_dialog_impl.cxx.
| wxSizer * vgui_wx_dialog_impl::exit_buttons_element | ( | ) | [private] |
Definition at line 597 of file vgui_wx_dialog_impl.cxx.
| void vgui_dialog_impl::bool_field | ( | const char * | , | |
| bool & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::int_field | ( | const char * | , | |
| int & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::long_field | ( | const char * | , | |
| long & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::float_field | ( | const char * | , | |
| float & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::double_field | ( | const char * | , | |
| double & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::string_field | ( | const char * | , | |
| vcl_string & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::choice_field | ( | const char * | , | |
| const vcl_vector< vcl_string > & | , | |||
| int & | ||||
| ) | [inherited] |
Add a choice (selection box) to the dialog box.
Definition at line 124 of file vgui_dialog_impl.cxx.
| void vgui_dialog_impl::text_message | ( | const char * | ) | [inherited] |
| void vgui_dialog_impl::file_browser | ( | const char * | , | |
| vcl_string & | , | |||
| vcl_string & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::inline_file_browser | ( | const char * | , | |
| vcl_string & | , | |||
| vcl_string & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::color_chooser | ( | const char * | , | |
| vcl_string & | ||||
| ) | [inherited] |
| void vgui_dialog_impl::inline_color_chooser | ( | const char * | , | |
| vcl_string & | ||||
| ) | [inherited] |
Add an inline colour chooser to the dialog box.
Definition at line 174 of file vgui_dialog_impl.cxx.
| void vgui_dialog_impl::inline_tab | ( | const vgui_tableau_sptr | tab, | |
| unsigned | width, | |||
| unsigned | height | |||
| ) | [inherited] |
| void * vgui_dialog_impl::bool_field_widget | ( | const char * | , | |
| bool & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a bool field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 216 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::int_field_widget | ( | const char * | , | |
| int & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a integer field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 217 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::long_field_widget | ( | const char * | , | |
| long & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a long integer field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 218 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::float_field_widget | ( | const char * | , | |
| float & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a float field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 219 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::double_field_widget | ( | const char * | , | |
| double & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a double field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 220 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::string_field_widget | ( | const char * | , | |
| vcl_string & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a string field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 221 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::text_message_widget | ( | const char * | ) | [virtual, inherited] |
Pointer to a GUI widget for a text message.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 223 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::file_browser_widget | ( | const char * | , | |
| vcl_string & | , | |||
| vcl_string & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a file browser.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 224 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::inline_file_browser_widget | ( | const char * | , | |
| vcl_string & | , | |||
| vcl_string & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for an inline file browser.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 225 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::color_chooser_widget | ( | const char * | , | |
| vcl_string & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a colour chooser.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 226 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::inline_color_chooser_widget | ( | const char * | , | |
| vcl_string & | ||||
| ) | [virtual, inherited] |
Pointer to a GUI widget for an inline colour chooser.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 227 of file vgui_dialog_impl.cxx.
| void * vgui_dialog_impl::inline_tableau_widget | ( | const vgui_tableau_sptr | tab, | |
| unsigned | width, | |||
| unsigned | height | |||
| ) | [virtual, inherited] |
Pointer to a GUI widget for a tableau (OpenGL area).
Reimplemented in vgui_gtk_dialog_impl, vgui_gtk2_dialog_impl, vgui_mfc_dialog_extensions_impl, and vgui_mfc_dialog_impl.
Definition at line 228 of file vgui_dialog_impl.cxx.
| virtual void vgui_dialog_impl::set_cancel_button | ( | const char * | msg | ) | [inline, virtual, inherited] |
Set the text on the cancel button.
Reimplemented in vgui_gtk_dialog_impl, and vgui_gtk2_dialog_impl.
Definition at line 132 of file vgui_dialog_impl.h.
| virtual void vgui_dialog_impl::set_ok_button | ( | const char * | msg | ) | [inline, virtual, inherited] |
Set the text on the OK button.
Reimplemented in vgui_gtk_dialog_impl, and vgui_gtk2_dialog_impl.
Definition at line 135 of file vgui_dialog_impl.h.
vcl_string vgui_wx_dialog_impl::title_ [private] |
wxDialog* vgui_wx_dialog_impl::dialog_ [private] |
vcl_size_t vgui_wx_dialog_impl::last_element_count_ [private] |
Element count at the last dialog construction (i.e., ask()).
Definition at line 84 of file vgui_wx_dialog_impl.h.
int vgui_wx_dialog_impl::max_label_width_ [private] |
The width of the largest label; used for graphical alignment.
Definition at line 87 of file vgui_wx_dialog_impl.h.
bool vgui_wx_dialog_impl::is_modal_ [private] |
True if the dialog box is modal (true by default).
Definition at line 90 of file vgui_wx_dialog_impl.h.
vgui_wx_adaptor* vgui_wx_dialog_impl::adaptor_ [private] |
Definition at line 92 of file vgui_wx_dialog_impl.h.
vcl_string vgui_dialog_impl::name [protected, inherited] |
Definition at line 169 of file vgui_dialog_impl.h.
vcl_vector<element> vgui_dialog_impl::elements [protected, inherited] |
Definition at line 170 of file vgui_dialog_impl.h.
vcl_string vgui_dialog_impl::cancel_button_text_ [protected, inherited] |
Definition at line 171 of file vgui_dialog_impl.h.
vcl_string vgui_dialog_impl::ok_button_text_ [protected, inherited] |
Definition at line 172 of file vgui_dialog_impl.h.
1.5.1