X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfcc02a8a4f019e3846b73660209080602e44967..726cc8697cd44a41b43257f05ca8cdd42b71a711:/include/wx/propgrid/advprops.h?ds=inline diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index 22ae110b34..860b89029b 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -6,27 +6,25 @@ // Created: 2004-09-25 // RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PROPGRID_ADVPROPS_H_ #define _WX_PROPGRID_ADVPROPS_H_ +#include "wx/defs.h" + #if wxUSE_PROPGRID #include "wx/propgrid/props.h" // ----------------------------------------------------------------------- - // // Additional Value Type Handlers // -#ifndef SWIG bool WXDLLIMPEXP_PROPGRID operator==(const wxArrayInt& array1, const wxArrayInt& array2); -#endif - // // Additional Property Editors @@ -123,47 +121,31 @@ public: Init( type, colour ); } -#ifndef SWIG void operator=(const wxColourPropertyValue& cpv) { - Init( cpv.m_type, cpv.m_colour ); + if (this != &cpv) + Init( cpv.m_type, cpv.m_colour ); } private: DECLARE_DYNAMIC_CLASS(wxColourPropertyValue) -#endif }; -#ifndef SWIG bool WXDLLIMPEXP_PROPGRID operator==(const wxColourPropertyValue&, const wxColourPropertyValue&); DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID) -#endif - -#ifndef SWIG - #define wxPG_EMPTY_CPV (*((wxColourPropertyValue*)NULL)) - #define wxPG_NORMAL_FONT (*wxNORMAL_FONT) -#else - #define wxPG_EMPTY_CPV wxCPV_wxPG_EMPTY - #define wxPG_NORMAL_FONT wxFONT_wxPG_NORMAL_FONT -#endif - - // ----------------------------------------------------------------------- // Declare part of custom colour property macro pairs. -#if wxUSE_IMAGE || defined(SWIG) +#if wxUSE_IMAGE #include "wx/image.h" #endif // ----------------------------------------------------------------------- -// Exclude class from wxPython bindings -#ifndef SWIG - /** @class wxFontProperty @ingroup classes Property representing wxFont. @@ -181,15 +163,14 @@ public: virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); - virtual void ChildChanged( wxVariant& thisValue, - int childIndex, wxVariant& childValue ) const; + virtual wxVariant ChildChanged( wxVariant& thisValue, + int childIndex, + wxVariant& childValue ) const; virtual void RefreshChildren(); protected: }; -#endif // !SWIG - // ----------------------------------------------------------------------- @@ -222,7 +203,8 @@ public: Override in derived class to customize how colours are printed as strings. */ - virtual wxString ColourToString( const wxColour& col, int index ) const; + virtual wxString ColourToString( const wxColour& col, int index, + int argFlags = 0 ) const; /** Returns index of entry that triggers colour picker dialog (default is last). @@ -254,10 +236,10 @@ protected: // Special constructors to be used by derived classes. wxSystemColourProperty( const wxString& label, const wxString& name, - const wxChar** labels, const long* values, wxPGChoices* choicesCache, + const wxChar* const* labels, const long* values, wxPGChoices* choicesCache, const wxColourPropertyValue& value ); wxSystemColourProperty( const wxString& label, const wxString& name, - const wxChar** labels, const long* values, wxPGChoices* choicesCache, + const wxChar* const* labels, const long* values, wxPGChoices* choicesCache, const wxColour& value ); void Init( int type, const wxColour& colour ); @@ -289,9 +271,10 @@ public: const wxColour& value = *wxWHITE ); virtual ~wxColourProperty(); -protected: virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual wxColour GetColour( int index ) const; + +protected: virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; private: @@ -300,9 +283,6 @@ private: // ----------------------------------------------------------------------- -// Exclude classes from wxPython bindings -#ifndef SWIG - /** @class wxCursorProperty @ingroup classes Property representing wxCursor. @@ -354,7 +334,7 @@ protected: #endif -#if wxUSE_CHOICEDLG || defined(SWIG) +#if wxUSE_CHOICEDLG /** @class wxMultiChoiceProperty @ingroup classes @@ -377,7 +357,6 @@ public: const wxString& name, const wxArrayString& strings, const wxArrayString& value ); -#ifndef SWIG wxMultiChoiceProperty( const wxString& label, const wxString& name, const wxPGChoices& choices, @@ -386,7 +365,7 @@ public: wxMultiChoiceProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& value = wxArrayString() ); -#endif + virtual ~wxMultiChoiceProperty(); virtual void OnSetValue(); @@ -428,7 +407,8 @@ protected: Supported special attributes: - "DateFormat": Determines displayed date format. - "PickerStyle": Determines window style used with wxDatePickerCtrl. - Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. + Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE + enables additional support for unspecified property value. */ class WXDLLIMPEXP_PROPGRID wxDateProperty : public wxPGProperty { @@ -440,6 +420,7 @@ public: const wxDateTime& value = wxDateTime() ); virtual ~wxDateProperty(); + virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue(wxVariant& variant, const wxString& text, @@ -484,8 +465,6 @@ protected: #endif // wxUSE_DATETIME -#endif // !SWIG - // ----------------------------------------------------------------------- #if wxUSE_SPINBTN