#include <vgui_win32_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, button_elem, unknown } |
Enum of possible element types. More... | |
Public Member Functions | |
vgui_win32_dialog_impl (const char *, HWND hWndParent=NULL) | |
~vgui_win32_dialog_impl () | |
void * | pushbutton_field_widget (const char *, const void *) |
Pointer to a GUI widget for a push button. | |
void * | choice_field_widget (const char *, const vcl_vector< vcl_string > &, int &) |
Pointer to a GUI widget for a choice field. | |
void * | inline_tableau_widget (const vgui_tableau_sptr tab, unsigned width, unsigned height) |
Pointer to a GUI widget for a tableau (OpenGL area). | |
void | modal (bool m) |
Set the modality of the dialog box. | |
bool | ask () |
Display the dialog box and collect data from the user. | |
virtual void | run () |
void | dialog_dispatcher (int item_id) |
virtual LRESULT | DialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) |
virtual void | OnOK () |
virtual void | OnCancel () |
virtual BOOL | OnBrowse (HWND hDlg, WORD wCtrlId) |
virtual BOOL | OnColor (HWND hDlg, WORD wCtrlId, LPTSTR lpColor) |
int | get_inline_tableau_size () |
vgui_win32_adaptor * | get_current_tab () |
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. | |
void | line_break () |
Add a line break to the dialog box. | |
void | pushbutton_field (vgui_command_sptr cmnd, const char *label, const void *icon) |
Add a push button field 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 an 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 | 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 | |
COLORREF | ColorStringToRGB (LPTSTR lpColor) |
Protected Attributes | |
bool | ok_clicked |
bool | is_modal |
HWND | hWndParent |
HWND | hWnd |
vcl_string | name |
vcl_vector< element > | elements |
vcl_string | cancel_button_text_ |
vcl_string | ok_button_text_ |
bool | use_line_break |
Private Member Functions | |
void | FindDialogSize (int &width, int &height, int &max_length, int &fbsr_count, int cxChar, int cyChar, int width_sep, int height_sep, int button_length, int edit_length, int browser_length) |
void | DrawImageOnButton (HDC hDC, RECT *lprcItem, HBITMAP hBitmap, unsigned w, unsigned h, BOOL isDisabled) |
bool | IsFileBrowserButton (unsigned short ctrl_id) |
bool | IsColorChooserButton (unsigned short ctrl_id) |
bool | IsCallbackControl (unsigned short ctrl_id) |
vgui_win32_adaptor * | find_adaptor (unsigned short ctrl_id) |
Private Attributes | |
vcl_vector< inline_tab_data > | inline_tableaus |
vcl_vector< unsigned short > | fb_ids |
vcl_vector< unsigned short > | cc_ids |
vcl_vector< callback_control_data > | callback_controls |
Definition at line 40 of file vgui_win32_dialog_impl.h.
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 | |
button_elem | |
unknown |
Definition at line 152 of file vgui_dialog_impl.h.
vgui_win32_dialog_impl::vgui_win32_dialog_impl | ( | const char * | name, |
HWND | hWndParent = NULL |
||
) |
Definition at line 16 of file vgui_win32_dialog_impl.cxx.
vgui_win32_dialog_impl::~vgui_win32_dialog_impl | ( | ) |
Definition at line 28 of file vgui_win32_dialog_impl.cxx.
bool vgui_win32_dialog_impl::ask | ( | ) | [virtual] |
Display the dialog box and collect data from the user.
Implements vgui_dialog_impl.
Definition at line 287 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::bool_field | ( | const char * | txt, |
bool & | val | ||
) | [inherited] |
Add a boolean field to the dialog box.
Definition at line 41 of file vgui_dialog_impl.cxx.
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 239 of file vgui_dialog_impl.cxx.
void vgui_dialog_impl::choice_field | ( | const char * | txt, |
const vcl_vector< vcl_string > & | labels, | ||
int & | val | ||
) | [inherited] |
Add a choice (selection box) to the dialog box.
Add a choice field to the dialog box.
Definition at line 139 of file vgui_dialog_impl.cxx.
void * vgui_win32_dialog_impl::choice_field_widget | ( | const char * | , |
const vcl_vector< vcl_string > & | , | ||
int & | |||
) | [virtual] |
Pointer to a GUI widget for a choice field.
Create a choice widget.
Reimplemented from vgui_dialog_impl.
Definition at line 50 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::color_chooser | ( | const char * | txt, |
vcl_string & | val | ||
) | [inherited] |
Add a popup colour chooser to the dialog box.
Definition at line 177 of file vgui_dialog_impl.cxx.
void * vgui_dialog_impl::color_chooser_widget | ( | const char * | txt, |
vcl_string & | val | ||
) | [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 249 of file vgui_dialog_impl.cxx.
COLORREF vgui_win32_dialog_impl::ColorStringToRGB | ( | LPTSTR | lpColor | ) | [protected] |
Definition at line 978 of file vgui_win32_dialog_impl.cxx.
void vgui_win32_dialog_impl::dialog_dispatcher | ( | int | item_id | ) |
Definition at line 1041 of file vgui_win32_dialog_impl.cxx.
LRESULT vgui_win32_dialog_impl::DialogProc | ( | HWND | hDlg, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) | [virtual] |
Definition at line 648 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::double_field | ( | const char * | txt, |
double & | val | ||
) | [inherited] |
Add a double field to the dialog box.
Definition at line 111 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 243 of file vgui_dialog_impl.cxx.
void vgui_win32_dialog_impl::DrawImageOnButton | ( | HDC | hDC, |
RECT * | lprcItem, | ||
HBITMAP | hBitmap, | ||
unsigned | w, | ||
unsigned | h, | ||
BOOL | isDisabled | ||
) | [private] |
Definition at line 1079 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::file_browser | ( | const char * | txt, |
vcl_string & | regexp, | ||
vcl_string & | val | ||
) | [inherited] |
Add a popup file browser to the dialog box.
Definition at line 152 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 247 of file vgui_dialog_impl.cxx.
vgui_win32_adaptor * vgui_win32_dialog_impl::find_adaptor | ( | unsigned short | ctrl_id | ) | [private] |
Definition at line 1032 of file vgui_win32_dialog_impl.cxx.
void vgui_win32_dialog_impl::FindDialogSize | ( | int & | width, |
int & | height, | ||
int & | max_length, | ||
int & | fbsr_count, | ||
int | cxChar, | ||
int | cyChar, | ||
int | width_sep, | ||
int | height_sep, | ||
int | button_length, | ||
int | edit_length, | ||
int | browser_length | ||
) | [private] |
Definition at line 117 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::float_field | ( | const char * | txt, |
float & | val | ||
) | [inherited] |
Add a float field to the dialog box.
Definition at line 97 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 242 of file vgui_dialog_impl.cxx.
vgui_win32_adaptor* vgui_win32_dialog_impl::get_current_tab | ( | ) | [inline] |
Definition at line 70 of file vgui_win32_dialog_impl.h.
int vgui_win32_dialog_impl::get_inline_tableau_size | ( | ) | [inline] |
Definition at line 67 of file vgui_win32_dialog_impl.h.
void vgui_dialog_impl::inline_color_chooser | ( | const char * | txt, |
vcl_string & | val | ||
) | [inherited] |
Add an inline colour chooser to the dialog box.
Definition at line 189 of file vgui_dialog_impl.cxx.
void * vgui_dialog_impl::inline_color_chooser_widget | ( | const char * | txt, |
vcl_string & | val | ||
) | [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 250 of file vgui_dialog_impl.cxx.
void vgui_dialog_impl::inline_file_browser | ( | const char * | txt, |
vcl_string & | regexp, | ||
vcl_string & | val | ||
) | [inherited] |
Add an inline file browser to the dialog box.
Definition at line 164 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 248 of file vgui_dialog_impl.cxx.
void vgui_dialog_impl::inline_tab | ( | const vgui_tableau_sptr | tab, |
unsigned | width, | ||
unsigned | height | ||
) | [inherited] |
Add a tableau (OpenGL area) to the dialog box.
Definition at line 201 of file vgui_dialog_impl.cxx.
void * vgui_win32_dialog_impl::inline_tableau_widget | ( | const vgui_tableau_sptr | tab, |
unsigned | width, | ||
unsigned | height | ||
) | [virtual] |
Pointer to a GUI widget for a tableau (OpenGL area).
Create the inline_tableau_widget (OpenGL area).
Reimplemented from vgui_dialog_impl.
Definition at line 69 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::int_field | ( | const char * | txt, |
int & | val | ||
) | [inherited] |
Add an integer field to the dialog box.
Definition at line 69 of file vgui_dialog_impl.cxx.
void * vgui_dialog_impl::int_field_widget | ( | const char * | , |
int & | |||
) | [virtual, inherited] |
Pointer to a GUI widget for an integer field.
Reimplemented in vgui_qt_dialog_impl, and vgui_qt_dialog_impl.
Definition at line 240 of file vgui_dialog_impl.cxx.
bool vgui_win32_dialog_impl::IsCallbackControl | ( | unsigned short | ctrl_id | ) | [inline, private] |
Definition at line 1023 of file vgui_win32_dialog_impl.cxx.
bool vgui_win32_dialog_impl::IsColorChooserButton | ( | unsigned short | ctrl_id | ) | [inline, private] |
Definition at line 1015 of file vgui_win32_dialog_impl.cxx.
bool vgui_win32_dialog_impl::IsFileBrowserButton | ( | unsigned short | ctrl_id | ) | [inline, private] |
Definition at line 1006 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::line_break | ( | ) | [inherited] |
Add a line break to the dialog box.
Reimplemented in vgui_dialog_extensions_impl.
Definition at line 231 of file vgui_dialog_impl.cxx.
void vgui_dialog_impl::long_field | ( | const char * | txt, |
long & | val | ||
) | [inherited] |
Add a long integer field to the dialog box.
Add a long field to the dialog box.
Definition at line 83 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 241 of file vgui_dialog_impl.cxx.
void vgui_win32_dialog_impl::modal | ( | bool | ) | [inline, virtual] |
Set the modality of the dialog box.
Changes the modality of the dialog. True makes the dialog modal.
True makes the dialog modal (i.e. the dialog 'grabs' all events) and this is the default. WARNING: It is dangerous to make a dialog that changes data non-modal, only messages should be non-modal.
(i.e. the dialog 'grabs' all events), this is the default. False makes the dialog non-modal.
Reimplemented from vgui_dialog_impl.
Definition at line 51 of file vgui_win32_dialog_impl.h.
BOOL vgui_win32_dialog_impl::OnBrowse | ( | HWND | hDlg, |
WORD | wCtrlId | ||
) | [virtual] |
Definition at line 911 of file vgui_win32_dialog_impl.cxx.
void vgui_win32_dialog_impl::OnCancel | ( | ) | [virtual] |
Definition at line 905 of file vgui_win32_dialog_impl.cxx.
BOOL vgui_win32_dialog_impl::OnColor | ( | HWND | hDlg, |
WORD | wCtrlId, | ||
LPTSTR | lpColor | ||
) | [virtual] |
Definition at line 945 of file vgui_win32_dialog_impl.cxx.
void vgui_win32_dialog_impl::OnOK | ( | ) | [virtual] |
Definition at line 851 of file vgui_win32_dialog_impl.cxx.
void vgui_dialog_impl::pushbutton_field | ( | vgui_command_sptr | cmnd, |
const char * | label, | ||
const void * | icon | ||
) | [inherited] |
Add a push button field to the dialog box.
Definition at line 55 of file vgui_dialog_impl.cxx.
void * vgui_win32_dialog_impl::pushbutton_field_widget | ( | const char * | , |
const void * | |||
) | [virtual] |
Pointer to a GUI widget for a push button.
Reimplemented from vgui_dialog_impl.
Definition at line 92 of file vgui_win32_dialog_impl.cxx.
void vgui_win32_dialog_impl::run | ( | void | ) | [virtual] |
Definition at line 637 of file vgui_win32_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_gtk2_dialog_impl, and vgui_gtk_dialog_impl.
Definition at line 143 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_gtk2_dialog_impl, and vgui_gtk_dialog_impl.
Definition at line 146 of file vgui_dialog_impl.h.
void vgui_dialog_impl::string_field | ( | const char * | txt, |
vcl_string & | val | ||
) | [inherited] |
Add a vcl_string field to the dialog box.
Definition at line 125 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 244 of file vgui_dialog_impl.cxx.
void vgui_dialog_impl::text_message | ( | const char * | txt | ) | [inherited] |
Add a text message to the dialog box.
Definition at line 218 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 246 of file vgui_dialog_impl.cxx.
vcl_vector<callback_control_data> vgui_win32_dialog_impl::callback_controls [private] |
Definition at line 113 of file vgui_win32_dialog_impl.h.
vcl_string vgui_dialog_impl::cancel_button_text_ [protected, inherited] |
Definition at line 182 of file vgui_dialog_impl.h.
vcl_vector<unsigned short> vgui_win32_dialog_impl::cc_ids [private] |
Definition at line 110 of file vgui_win32_dialog_impl.h.
vcl_vector<element> vgui_dialog_impl::elements [protected, inherited] |
Definition at line 181 of file vgui_dialog_impl.h.
vcl_vector<unsigned short> vgui_win32_dialog_impl::fb_ids [private] |
Definition at line 110 of file vgui_win32_dialog_impl.h.
HWND vgui_win32_dialog_impl::hWnd [protected] |
Definition at line 80 of file vgui_win32_dialog_impl.h.
HWND vgui_win32_dialog_impl::hWndParent [protected] |
Definition at line 78 of file vgui_win32_dialog_impl.h.
vcl_vector<inline_tab_data> vgui_win32_dialog_impl::inline_tableaus [private] |
Definition at line 106 of file vgui_win32_dialog_impl.h.
bool vgui_win32_dialog_impl::is_modal [protected] |
Definition at line 76 of file vgui_win32_dialog_impl.h.
vcl_string vgui_dialog_impl::name [protected, inherited] |
Definition at line 180 of file vgui_dialog_impl.h.
vcl_string vgui_dialog_impl::ok_button_text_ [protected, inherited] |
Definition at line 183 of file vgui_dialog_impl.h.
bool vgui_win32_dialog_impl::ok_clicked [protected] |
Definition at line 75 of file vgui_win32_dialog_impl.h.
bool vgui_dialog_impl::use_line_break [protected, inherited] |
Definition at line 185 of file vgui_dialog_impl.h.