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

checkbox_message_dialog Class Reference

A message dialog, with a checkbox, that says "Don't ask me again". More...

#include <checkbox_message_dialog.h>

Inheritance diagram for checkbox_message_dialog:

wxDialog List of all members.

Public Methods

  checkbox_message_dialog (wxWindow *parent, const wxString &message, const wxString &caption=_("Message"), long style=wxOK|wxCENTRE, const wxPoint &pos=wxDefaultPosition, const wxString &checkbox_caption=_("Don't remind me again"), const wxString &config_path_to_show_key="/", bool default_check_checkbox_if_key_not_found_in_config=TRUE)
  Contructor.

  checkbox_message_dialog ()
void  OnYes (wxCommandEvent &event)
  Action executed when user clicks 'Yes' button.

void  OnNo (wxCommandEvent &event)
  Action executed when user clicks 'No' button.

void  OnCancel (wxCommandEvent &event)
  Action executed when user clicks 'Cancel' button.

void  OnOK (wxCommandEvent &event)
  Action executed when user clicks 'OK' button.


Protected Methods

void  save_checkbox_value_to_config ()
  Saves checkbox value to the currently active wxConfig object.


Protected Attributes

wxString  m_config_path_to_show_key
  The configuration path to the key where value is loaded/saved.

wxCheckBox *  m_checkbox
  The checkbox on the dialog.


Detailed Description

A message dialog, with a checkbox, that says "Don't ask me again".

The value that user specified is saved the specified path in the currently active wxConfig object. Sytle of buttons is an an 'or' (|) of wxOK, wxCANCEL, wxYES | wxNO .

Returns wxYES/NO/OK/CANCEL .


Constructor & Destructor Documentation

checkbox_message_dialog::checkbox_message_dialog wxWindow *    parent,
const wxString &    message,
const wxString &    caption = _("Message"),
long    style = wxOK|wxCENTRE,
const wxPoint &    pos = wxDefaultPosition,
const wxString &    checkbox_caption = _("Don't remind me again"),
const wxString &    config_path_to_show_key = "/",
bool    default_check_checkbox_if_key_not_found_in_config = TRUE
 

Contructor.

Parameters:
parent  The parent window.
message  The message of the dialog, shown in the body of the dialog.
caption  The caption shown in the titlebar of the dialog.
style  The style of the dialog, usually wxOK and wxCENTRE.
pos  The x,y screen coordiate to show the dialog.
checkbox_caption  The caption shown to the right of the checkbox.
config_path_to_show_key  The path in the wxConfig object to save value.
default_check_checkbox_if_key_not_found_in_config  Whether to initially check the checkbox if no value exists in the active wxConfig.