wxIScan
wxOptionCheckBox Class Reference

The boolean option for an options dialog. More...

#include <wxoptionsdialog.h>

Inheritance diagram for wxOptionCheckBox:
wxOptionBase

List of all members.

Public Member Functions

 wxOptionCheckBox (const wxString &strText, bool *pbValue)
 Default constructor.
virtual bool AddToSizer (wxBoxSizer *poSizer)
 ...
virtual void Setup (wxWindow *poWindow, int nId)
 ...
virtual void StoreValue ()
 Store the value in the connected variables.

Protected Attributes

bool * m_pbValue
 ...
wxCheckBox * m_poCheckBox
 ...
wxString m_strText
 ...

Detailed Description

The boolean option for an options dialog.

This class represents a boolean (checkbox) option used in an options dialog.

Definition at line 88 of file wxoptionsdialog.h.


Constructor & Destructor Documentation

wxOptionCheckBox::wxOptionCheckBox ( const wxString &  strText,
bool *  pbValue 
)

Default constructor.

Parameters:
strText...
pbValue...

Definition at line 55 of file wxoptionsdialog.cpp.

References m_pbValue, and m_strText.

 : wxOptionBase()
{
    m_pbValue= pbValue;
    m_strText= strText;
}

Member Function Documentation

bool wxOptionCheckBox::AddToSizer ( wxBoxSizer *  poSizer) [virtual]

...

Implements wxOptionBase.

Definition at line 62 of file wxoptionsdialog.cpp.

References m_poCheckBox.

{
    return m_poCheckBox
           ? (bool)poSizer->Add( m_poCheckBox, 0, wxALIGN_LEFT | wxALL, 1 )
           : false;
}
void wxOptionCheckBox::Setup ( wxWindow *  poWindow,
int  nId 
) [virtual]

...

Implements wxOptionBase.

Definition at line 69 of file wxoptionsdialog.cpp.

References m_pbValue, m_poCheckBox, and m_strText.

{
    m_poCheckBox= new wxCheckBox( poWindow, nId, m_strText );
    if( !m_poCheckBox )
    {
        wxLogError( _( "Cannot create option checkbox." ) );
        return;
    }
    m_poCheckBox->SetValue( *m_pbValue );
}
void wxOptionCheckBox::StoreValue ( ) [virtual]

Store the value in the connected variables.

Implements wxOptionBase.

Definition at line 80 of file wxoptionsdialog.cpp.

References m_poCheckBox.

{
    (*m_pbValue)= m_poCheckBox->GetValue();
}

Member Data Documentation

bool* wxOptionCheckBox::m_pbValue [protected]

...

Definition at line 105 of file wxoptionsdialog.h.

Referenced by Setup(), and wxOptionCheckBox().

wxCheckBox* wxOptionCheckBox::m_poCheckBox [protected]

...

Definition at line 106 of file wxoptionsdialog.h.

Referenced by AddToSizer(), Setup(), and StoreValue().

wxString wxOptionCheckBox::m_strText [protected]

...

Definition at line 107 of file wxoptionsdialog.h.

Referenced by Setup(), and wxOptionCheckBox().


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