wxFloatProperty Class Reference

Basic property with double-precision floating point value. More...

#include <props.h>

Inheritance diagram for wxFloatProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool ValidateValue (wxVariant &value, wxPGValidationInfo &validationInfo) const
 wxFloatProperty (const wxString &label=wxPG_LABEL, const wxString &name=wxPG_LABEL, double value=0.0)
virtual ~wxFloatProperty ()

Static Public Member Functions

static bool DoValidation (const wxPGProperty *property, double &value, wxPGValidationInfo *pValidationInfo, int mode=wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE)

Protected Member Functions

virtual wxValidator * DoGetValidator () const

Protected Attributes

int m_precision

Detailed Description

Basic property with double-precision floating point value.

Supported special attributes:

Definition at line 472 of file props.h.


Constructor & Destructor Documentation

wxFloatProperty::wxFloatProperty ( const wxString &  label = wxPG_LABEL,
const wxString &  name = wxPG_LABEL,
double  value = 0.0 
)
virtual wxFloatProperty::~wxFloatProperty (  )  [virtual]

Member Function Documentation

virtual wxValidator* wxFloatProperty::DoGetValidator (  )  const [protected, virtual]

Returns pointer to the wxValidator that should be used with the editor of this property (NULL for no validator). Setting validator explicitly via SetPropertyValidator will override this.

In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro):

        wxValidator* wxMyPropertyClass::DoGetValidator () const
        {
            WX_PG_DOGETVALIDATOR_ENTRY()

            wxMyValidator* validator = new wxMyValidator(...);

            ... prepare validator...

            WX_PG_DOGETVALIDATOR_EXIT(validator)
        }
Remarks:
You can get common filename validator by returning wxFileProperty::GetClassValidator(). wxDirProperty, for example, uses it.

Reimplemented from wxPGProperty.

static bool wxFloatProperty::DoValidation ( const wxPGProperty property,
double &  value,
wxPGValidationInfo pValidationInfo,
int  mode = wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE 
) [static]

Validation helper.

virtual bool wxFloatProperty::ValidateValue ( wxVariant &  value,
wxPGValidationInfo validationInfo 
) const [virtual]

Implement this function in derived class to check the value. Return true if it is ok. Returning false prevents property change events from occurring.

Remarks:
  • Default implementation always returns true.

Reimplemented from wxPGProperty.


Member Data Documentation

Definition at line 489 of file props.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


wxpropgrid
Author(s): Jaakko Salli
autogenerated on Fri Jan 11 09:34:06 2013