wxComboBoxOption Class Reference

Implements a combo box option. More...

#include <wxOptions.h>

Inheritance diagram for wxComboBoxOption:

Inheritance graph
[legend]
Collaboration diagram for wxComboBoxOption:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxComboBoxOption (const wxString &configValueName, const wxString &description, const wxString &defaultValue, bool saveIndex)
wxComboBoxOptionAdd (const wxString &item)
wxComboBoxOptionAdd (long index, const wxString &item)
virtual void DoDisplay (wxOptionSizer *sizer, wxWindow *parent)
 you should override the following functions:
virtual void OnWindowDestroy ()
 When this is called, then you should save out any values stored in controls, as they will be destroyed soon.
virtual bool Enable (bool enable)
 Enable/disable any controls that need to be enabled/disabled.
bool DoSave ()
 Save any values to the config that needs to be saved.

Protected Attributes

bool m_hasDefault
wxString m_defaultValue
wxString m_originalDefaultValue
wxArrayString m_items
wxArrayInt m_indexes
wxComboBox * m_comboBox
bool m_saveIndex


Detailed Description

Implements a combo box option.

If saveIndex is true, then it saves/reads the index of the value, instead of the item itself.

Definition at line 509 of file wxOptions.h.


Constructor & Destructor Documentation

wxComboBoxOption::wxComboBoxOption ( const wxString &  configValueName,
const wxString &  description,
const wxString &  defaultValue,
bool  saveIndex 
) [inline]

Definition at line 512 of file wxOptions.h.


Member Function Documentation

wxComboBoxOption * wxComboBoxOption::Add ( const wxString &  item  ) 

Definition at line 206 of file wxOptions.cpp.

wxComboBoxOption * wxComboBoxOption::Add ( long  index,
const wxString &  item 
)

Definition at line 217 of file wxOptions.cpp.

void wxComboBoxOption::DoDisplay ( wxOptionSizer sizer,
wxWindow *  parent 
) [virtual]

you should override the following functions:

This is called when the option is going to be displayed. You should add your controls to a sizer, and then wait for OnWindowDestroy() to be called. If you need to get the value of a control (ie, a textbox), then you should keep pointers to them around. However, do not delete the controls, since they are owned by the parent dialog and will be automatically deleted.

Parameters:
sizer is a wxOptionSizer that has two columns that your controls should be added to
parent is a reference to the parent window that you should pass to your child controls.

Implements wxOption.

Reimplemented in serialPortComboBoxOption, and ttsTypeOption.

Definition at line 229 of file wxOptions.cpp.

virtual void wxComboBoxOption::OnWindowDestroy (  )  [inline, virtual]

When this is called, then you should save out any values stored in controls, as they will be destroyed soon.

Implements wxOption.

Definition at line 524 of file wxOptions.h.

virtual bool wxComboBoxOption::Enable ( bool  enable  )  [inline, virtual]

Enable/disable any controls that need to be enabled/disabled.

Don't bother doing this with static labels, that just seems like it would be annoying and useless.

Implements wxOption.

Reimplemented in ttsTypeOption.

Definition at line 525 of file wxOptions.h.

bool wxComboBoxOption::DoSave (  )  [virtual]

Save any values to the config that needs to be saved.

Please note that this will _not_ always be called. It is only called if DoDisplay() was called for your option

Implements wxOption.

Definition at line 285 of file wxOptions.cpp.


Member Data Documentation

Definition at line 529 of file wxOptions.h.

wxString wxComboBoxOption::m_defaultValue [protected]

Definition at line 530 of file wxOptions.h.

Definition at line 531 of file wxOptions.h.

wxArrayString wxComboBoxOption::m_items [protected]

Definition at line 535 of file wxOptions.h.

wxArrayInt wxComboBoxOption::m_indexes [protected]

Definition at line 536 of file wxOptions.h.

wxComboBox* wxComboBoxOption::m_comboBox [protected]

Definition at line 538 of file wxOptions.h.

Definition at line 539 of file wxOptions.h.


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

Generated on Sun Jul 27 17:26:21 2008 for Roadnav by  doxygen 1.5.5