// Author: Jaakko Salli
// Modified by:
// Created: 2006-03-05
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#define _WX_SAMPLES_PROPGRID_SAMPLEPROPS_H_
-WX_PG_DECLARE_WXOBJECT_VARIANT_DATA(wxPGVariantDataFontData, wxFontData, wxEMPTY_PARAMETER_VALUE)
+DECLARE_VARIANT_OBJECT(wxFontData)
class wxFontDataProperty : public wxFontProperty
// in base class to function properly.
virtual wxVariant DoGetValue() const;
- WX_PG_DECLARE_PARENTAL_METHODS()
- WX_PG_DECLARE_EVENT_METHODS()
+ virtual wxVariant ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const;
+ virtual void RefreshChildren();
+ virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
protected:
// Value must be stored as variant - otherwise it will be
const wxSize& value = wxSize() );
virtual ~wxSizeProperty();
- WX_PG_DECLARE_PARENTAL_METHODS()
+ virtual wxVariant ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const;
+ virtual void RefreshChildren();
protected:
// I stands for internal
void SetValueI( const wxSize& value )
{
- m_value = wxSizeToVariant(value);
+ m_value = WXVARIANT(value);
}
};
const wxPoint& value = wxPoint() );
virtual ~wxPointProperty();
- WX_PG_DECLARE_PARENTAL_METHODS()
+ virtual wxVariant ChildChanged( wxVariant& thisValue,
+ int childIndex,
+ wxVariant& childValue ) const;
+ virtual void RefreshChildren();
protected:
// I stands for internal
void SetValueI( const wxPoint& value )
{
- m_value = wxPointToVariant(value);
+ m_value = WXVARIANT(value);
}
};
// -----------------------------------------------------------------------
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataArrayDouble, wxArrayDouble, wxEMPTY_PARAMETER_VALUE)
+WX_PG_DECLARE_VARIANT_DATA(wxArrayDouble)
class wxArrayDoubleProperty : public wxPGProperty
{
virtual ~wxArrayDoubleProperty ();
virtual void OnSetValue();
- WX_PG_DECLARE_BASIC_TYPE_METHODS()
- WX_PG_DECLARE_EVENT_METHODS()
- WX_PG_DECLARE_ATTRIBUTE_METHODS()
+ virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const;
+ virtual bool StringToValue( wxVariant& variant,
+ const wxString& text,
+ int argFlags = 0 ) const;
+ virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
+ virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
// Generates cache for displayed text
virtual void GenerateValueAsString ( wxString& target, int prec, bool removeZeroes ) const;