Fixed wxPGProperty ctor documentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1038,35 +1038,16 @@ class WXDLLIMPEXP_PROPGRID wxPGProperty : public wxObject
|
|||||||
public:
|
public:
|
||||||
typedef wxUint32 FlagType;
|
typedef wxUint32 FlagType;
|
||||||
|
|
||||||
/** Basic constructor.
|
/**
|
||||||
|
Default constructor.
|
||||||
*/
|
*/
|
||||||
wxPGProperty();
|
wxPGProperty();
|
||||||
|
|
||||||
/** Constructor.
|
/**
|
||||||
Non-abstract property classes should have constructor of this style:
|
Constructor.
|
||||||
|
|
||||||
@code
|
All non-abstract property classes should have a constructor with
|
||||||
|
the same first two arguments as this one.
|
||||||
// If T is a class, then it should be a constant reference
|
|
||||||
// (e.g. const T& ) instead.
|
|
||||||
MyProperty( const wxString& label, const wxString& name, T value )
|
|
||||||
: wxPGProperty()
|
|
||||||
{
|
|
||||||
// Generally recommended way to set the initial value
|
|
||||||
// (as it should work in pretty much 100% of cases).
|
|
||||||
wxVariant variant;
|
|
||||||
variant << value;
|
|
||||||
SetValue(variant);
|
|
||||||
|
|
||||||
// If has private child properties then create them here. Also
|
|
||||||
// set flag that indicates presence of private children. E.g.:
|
|
||||||
//
|
|
||||||
// AddPrivateChild( new wxStringProperty("Subprop 1",
|
|
||||||
// wxPG_LABEL,
|
|
||||||
// value.GetSubProp1() ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@endcode
|
|
||||||
*/
|
*/
|
||||||
wxPGProperty( const wxString& label, const wxString& name );
|
wxPGProperty( const wxString& label, const wxString& name );
|
||||||
|
|
||||||
|
@@ -428,11 +428,15 @@
|
|||||||
class MyProperty : public wxPGProperty
|
class MyProperty : public wxPGProperty
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// All arguments of ctor must have a default value -
|
// Default constructor
|
||||||
|
MyProperty() { }
|
||||||
|
|
||||||
|
// All arguments of this ctor must have a default value -
|
||||||
// use wxPG_LABEL for label and name
|
// use wxPG_LABEL for label and name
|
||||||
MyProperty( const wxString& label = wxPG_LABEL,
|
MyProperty( const wxString& label = wxPG_LABEL,
|
||||||
const wxString& name = wxPG_LABEL,
|
const wxString& name = wxPG_LABEL,
|
||||||
const wxString& value = wxEmptyString )
|
const wxString& value = wxEmptyString )
|
||||||
|
: wxPGProperty(label, name)
|
||||||
{
|
{
|
||||||
// m_value is wxVariant
|
// m_value is wxVariant
|
||||||
m_value = value;
|
m_value = value;
|
||||||
@@ -509,7 +513,7 @@ public:
|
|||||||
@code
|
@code
|
||||||
|
|
||||||
MyProperty( const wxString& label, const wxString& name, const T& value )
|
MyProperty( const wxString& label, const wxString& name, const T& value )
|
||||||
: wxPGProperty()
|
: wxPGProperty(label, name)
|
||||||
{
|
{
|
||||||
// Generally recommended way to set the initial value
|
// Generally recommended way to set the initial value
|
||||||
// (as it should work in pretty much 100% of cases).
|
// (as it should work in pretty much 100% of cases).
|
||||||
|
Reference in New Issue
Block a user