wxDoubleOption Class Reference

Implements a double option. More...

#include <wxOptions.h>

Inheritance diagram for wxDoubleOption:

Inheritance graph
[legend]
Collaboration diagram for wxDoubleOption:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxDoubleOption (const wxString &configValueName, const wxString &description, double defaultValue, bool hasMinAndMax=false, double minValue=0, double maxValue=0)
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.
bool DoSave ()
 Save any values to the config that needs to be saved.
virtual bool Enable (bool enable)
 Enable/disable any controls that need to be enabled/disabled.

Protected Attributes

double m_defaultValue
wxTextCtrl * m_textCtrl


Detailed Description

Implements a double option.

TODO: need to implement min/max

Definition at line 361 of file wxOptions.h.


Constructor & Destructor Documentation

wxDoubleOption::wxDoubleOption ( const wxString &  configValueName,
const wxString &  description,
double  defaultValue,
bool  hasMinAndMax = false,
double  minValue = 0,
double  maxValue = 0 
) [inline]

Definition at line 363 of file wxOptions.h.


Member Function Documentation

virtual void wxDoubleOption::DoDisplay ( wxOptionSizer sizer,
wxWindow *  parent 
) [inline, 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.

Definition at line 368 of file wxOptions.h.

virtual void wxDoubleOption::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 375 of file wxOptions.h.

bool wxDoubleOption::DoSave (  )  [inline, 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 376 of file wxOptions.h.

virtual bool wxDoubleOption::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.

Definition at line 377 of file wxOptions.h.


Member Data Documentation

double wxDoubleOption::m_defaultValue [protected]

Definition at line 380 of file wxOptions.h.

wxTextCtrl* wxDoubleOption::m_textCtrl [protected]

Definition at line 381 of file wxOptions.h.


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

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