// -----------------------------------------------------------------------
-
-#ifndef SWIG
-
//
// Additional Value Type Handlers
//
WX_PG_DECLARE_EDITOR_WITH_DECL(DatePickerCtrl,WXDLLIMPEXP_PROPGRID)
#endif
-#endif // !SWIG
-
// -----------------------------------------------------------------------
Init( type, colour );
}
-#ifndef SWIG
void operator=(const wxColourPropertyValue& cpv)
{
if (this != &cpv)
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 (*(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.
// -----------------------------------------------------------------------
-// Exclude class from wxPython bindings
-#ifndef SWIG
-
/** @class wxFontProperty
@ingroup classes
Property representing wxFont.
protected:
};
-#endif // !SWIG
-
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
-// Exclude classes from wxPython bindings
-#ifndef SWIG
-
/** @class wxCursorProperty
@ingroup classes
Property representing wxCursor.
const wxString& name,
const wxArrayString& strings,
const wxArrayString& value );
-#ifndef SWIG
wxMultiChoiceProperty( const wxString& label,
const wxString& name,
const wxPGChoices& choices,
wxMultiChoiceProperty( const wxString& label = wxPG_LABEL,
const wxString& name = wxPG_LABEL,
const wxArrayString& value = wxArrayString() );
-#endif
+
virtual ~wxMultiChoiceProperty();
virtual void OnSetValue();
#endif // wxUSE_DATETIME
-#endif // !SWIG
-
// -----------------------------------------------------------------------
#if wxUSE_SPINBTN
wxWindow* m_primary;
wxWindow* m_secondary;
-#ifndef SWIG
wxPGWindowList( wxWindow* a )
{
m_primary = a;
m_primary = a;
m_secondary = b;
};
-#endif
};
// -----------------------------------------------------------------------
virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property,
wxWindow* wnd_primary, wxEvent& event ) const = 0;
-#if !defined(SWIG) || defined(CREATE_VCW)
/** Returns value from control, via parameter 'variant'.
Usually ends up calling property's StringToValue or IntToValue.
Returns true if value was different.
virtual bool GetValueFromControl( wxVariant& variant,
wxPGProperty* property,
wxWindow* ctrl ) const;
-#endif
/**
Sets new appearance for the control. Default implementation
};
-// Exclude classes from being able to be derived from in wxPython bindings
-#ifndef SWIG
-
class WXDLLIMPEXP_PROPGRID wxPGChoiceAndButtonEditor : public wxPGChoiceEditor
{
public:
DECLARE_DYNAMIC_CLASS(wxPGTextCtrlAndButtonEditor)
};
-#endif // !SWIG
-
#if wxPG_INCLUDE_CHECKBOX
*/
wxString m_label;
-#ifndef SWIG
-
//virtual bool ProcessEvent( wxEvent& event );
wxPropertyGridManager* m_manager;
private:
bool m_isDefault; // is this base page object?
-private:
DECLARE_EVENT_TABLE()
-#endif
};
// -----------------------------------------------------------------------
virtual void SetWindowStyleFlag ( long style );
virtual bool Reparent( wxWindowBase *newParent );
-#ifndef SWIG
-
protected:
virtual wxSize DoGetBestSize() const;
private:
DECLARE_EVENT_TABLE()
-#endif // #ifndef SWIG
};
// -----------------------------------------------------------------------
};
-#ifndef SWIG
-
-
// space between vertical sides of a custom image
#define wxPG_CUSTOM_IMAGE_SPACINGY 1
bool m_hasValidText;
};
-#endif // !SWIG
/**
@class wxPGCell
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/** @class wxPGAttributeStorage
wxPGAttributeStorage is somewhat optimized storage for
wxPGHashMapS2P m_map;
};
-#endif // !SWIG
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/**
@section propgrid_property_attributes wxPropertyGrid Property Attribute
Identifiers.
#define wxPG_ATTR_INLINE_HELP wxPGGlobalVars->m_strInlineHelp
#endif
-#endif // !SWIG
-
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/** @class wxPGChoiceEntry
Data of a single wxPGChoices choice.
*/
#define wxPGChoicesEmptyData ((wxPGChoicesData*)NULL)
-#endif // SWIG
/** @class wxPGChoices
/** Removes count items starting at position nIndex. */
void RemoveAt(size_t nIndex, size_t count = 1);
-#ifndef SWIG
- /** Does not create copies for itself. */
+ /** Does not create copies for itself.
+ TODO: Deprecate.
+ */
void Set( const wxChar* const* labels, const long* values = NULL )
{
Free();
Add(labels,values);
}
-#endif // SWIG
/** Version that works with wxArrayString and wxArrayInt. */
void Set( const wxArrayString& labels,
wxArrayString GetLabels() const;
-#ifndef SWIG
void operator= (const wxPGChoices& a)
{
if (this != &a)
void Init();
void Free();
-#endif // !SWIG
};
// -----------------------------------------------------------------------
*/
virtual wxVariant DoGetValue() const { return m_value; }
-#if !defined(SWIG) || defined(CREATE_VCW)
/** Implement this function in derived class to check the value.
Return true if it is ok. Returning false prevents property change events
from occurring.
virtual bool IntToValue( wxVariant& value,
int number,
int argFlags = 0 ) const;
-#endif // !defined(SWIG) || defined(CREATE_VCW)
+
/**
Converts property value into a text representation.
*/
void SetDefaultValue( wxVariant& value );
-#ifndef SWIG
/** Sets editor for a property.
@param editor
{
m_customEditor = editor;
}
-#endif
/** Sets editor for a property.
*/
}
#endif // wxUSE_VALIDATORS
-#ifndef SWIG
/** Returns client data (void*) of a property.
*/
void* GetClientData() const
/** Sets managed client object of a property.
*/
wxClientData *GetClientObject() const { return m_clientObject; }
-#endif
/** Sets new set of choices for property.
*/
int GetImageOffset( int imageWidth ) const;
-#ifndef SWIG
// Returns wxPropertyGridPageState in which this property resides.
wxPropertyGridPageState* GetParentState() const { return m_parentState; }
-#endif
-#ifndef SWIG
wxPGProperty* GetItemAtY( unsigned int y,
unsigned int lh,
unsigned int* nextItemY ) const;
-#endif
/** Returns property at given virtual y coordinate.
*/
*/
wxPGProperty* GetPropertyByName( const wxString& name ) const;
-#ifndef SWIG
-
// Returns various display-related information for given column
void GetDisplayInfo( unsigned int column,
int choiceIndex,
// Called in constructors.
void Init();
void Init( const wxString& label, const wxString& name );
-#endif // #ifndef SWIG
};
// -----------------------------------------------------------------------
#define WX_PG_DECLARE_DOGETEDITORCLASS \
virtual const wxPGEditor* DoGetEditorClass() const;
-#ifndef SWIG
+#ifndef WX_PG_DECLARE_PROPERTY_CLASS
#define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME) \
public: \
DECLARE_DYNAMIC_CLASS(CLASSNAME) \
WX_PG_DECLARE_DOGETEDITORCLASS \
private:
-#else
- #define WX_PG_DECLARE_PROPERTY_CLASS(CLASSNAME)
#endif
// Implements sans constructor function. Also, first arg is class name, not
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/** @class wxPGRootProperty
@ingroup classes
Root parent property.
void Init();
};
-#endif // !SWIG
-
// -----------------------------------------------------------------------
#endif // wxUSE_PROPGRID
// Global variables
// -----------------------------------------------------------------------
-#ifndef SWIG
-
// This is required for sharing common global variables.
class WXDLLIMPEXP_PROPGRID wxPGGlobalVarsClass
{
// then the built-in module system won't pick this one up. Add it manually.
WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule();
-#endif // !SWIG
-
// -----------------------------------------------------------------------
/** @section propgrid_window_styles wxPropertyGrid Window Styles
// -----------------------------------------------------------------------
-#ifndef SWIG
-
// Internal flags
#define wxPG_FL_INITIALIZED 0x0001
// Set when creating editor controls if it was clicked on.
// Prevents RecalculateVirtualSize re-entrancy
#define wxPG_FL_RECALCULATING_VIRTUAL_SIZE 0x80000000
-#endif // #ifndef SWIG
-
-#if !defined(__wxPG_SOURCE_FILE__) && !defined(SWIG)
+#if !defined(__wxPG_SOURCE_FILE__)
// Reduce compile time, but still include in user app
#include "wx/propgrid/props.h"
#endif
*/
virtual void RefreshProperty( wxPGProperty* p );
-#ifndef SWIG
/** Registers a new editor class.
@return
Pointer to the editor class instance that should be used.
static wxPGEditor* DoRegisterEditorClass( wxPGEditor* editorClass,
const wxString& editorName,
bool noDefCheck = false );
-#endif
/** Resets all colours to the original system values.
*/
// Events from editor controls are forward to this function
void HandleCustomEditorEvent( wxEvent &event );
-#ifndef SWIG
-
/**
Generates contents for string dst based on the contents of
wxArrayString src.
bool ButtonTriggerKeyTest( int action, wxKeyEvent& event );
DECLARE_EVENT_TABLE()
-#endif // #ifndef SWIG
};
// -----------------------------------------------------------------------
// Bunch of inlines that need to resolved after all classes have been defined.
//
-#ifndef SWIG
inline bool wxPropertyGridPageState::IsDisplayed() const
{
return ( this == m_pPropGrid->GetState() );
{
return DoGetRoot()->GetChildrenHeight(GetGrid()->GetRowHeight());
}
-#endif
inline wxString wxPGProperty::GetHintText() const
{
/** Constructor. */
wxPropertyGridEvent(wxEventType commandType=0, int id=0);
-#ifndef SWIG
+
/** Copy constructor. */
wxPropertyGridEvent(const wxPropertyGridEvent& event);
-#endif
+
/** Destructor. */
~wxPropertyGridEvent();
m_validationInfo->SetFailureMessage( message );
}
-#ifndef SWIG
wxPGVFBFlags GetValidationFailureBehavior() const
{
wxASSERT( GetEventType() == wxEVT_PG_CHANGING );
bool m_canVeto;
bool m_wasVetoed;
-
-#endif
};
// NOTE: More in propertygrid.cpp
//
-#ifndef SWIG
-
#if defined(__WXMSW__)
// space between vertical line and value text
#define wxPG_SMALL_SCREEN 0
#endif
-#endif // #ifndef SWIG
// Undefine wxPG_ICON_WIDTH to use supplied xpm bitmaps instead
// (for tree buttons)
@{
*/
-#ifndef SWIG
- // Used to tell wxPGProperty to use label as name as well
- #define wxPG_LABEL (*wxPGProperty::sm_wxPG_LABEL)
- // This is the value placed in wxPGProperty::sm_wxPG_LABEL
- #define wxPG_LABEL_STRING wxS("@!")
- #define wxPG_NULL_BITMAP wxNullBitmap
- #define wxPG_COLOUR_BLACK (*wxBLACK)
-#else
- #define wxPG_NULL_BITMAP wxBitmap_NULL
- #define wxPG_COLOUR_BLACK wxColour_BLACK
-#endif // #ifndef SWIG
+// Used to tell wxPGProperty to use label as name as well
+#define wxPG_LABEL (*wxPGProperty::sm_wxPG_LABEL)
+
+// This is the value placed in wxPGProperty::sm_wxPG_LABEL
+#define wxPG_LABEL_STRING wxS("@!")
+#define wxPG_NULL_BITMAP wxNullBitmap
+#define wxPG_COLOUR_BLACK (*wxBLACK)
/** Convert Red, Green and Blue to a single 32-bit value.
*/
// -----------------------------------------------------------------------
-#ifndef SWIG
-
WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(wxPGProperty*, wxArrayPGProperty,
wxBaseArrayPtrVoid,
class WXDLLIMPEXP_PROPGRID);
-// Always use wxString based hashmap with unicode, stl, swig and GCC 4.0+
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(void*,
wxPGHashMapS2P,
class WXDLLIMPEXP_PROPGRID);
wxPGHashMapI2I,
class WXDLLIMPEXP_PROPGRID);
-#endif // #ifndef SWIG
-
// -----------------------------------------------------------------------
enum wxPG_GETPROPERTYVALUES_FLAGS
// -----------------------------------------------------------------------
// Editor class.
-#ifndef SWIG
-
// Editor accessor (for backwards compatiblity use only).
#define wxPG_EDITOR(T) wxPGEditor_##T
-// Declare editor class, with optional part.
-#define WX_PG_DECLARE_EDITOR_WITH_DECL(EDITOR,DECL) \
-extern DECL wxPGEditor* wxPGEditor_##EDITOR; \
-extern DECL wxPGEditor* wxPGConstruct##EDITOR##EditorClass();
+// Macro for declaring editor class, with optional impexpdecl part.
+#ifndef WX_PG_DECLARE_EDITOR_WITH_DECL
+
+ #define WX_PG_DECLARE_EDITOR_WITH_DECL(EDITOR,DECL) \
+ extern DECL wxPGEditor* wxPGEditor_##EDITOR; \
+ extern DECL wxPGEditor* wxPGConstruct##EDITOR##EditorClass();
+
+#endif
// Declare editor class.
#define WX_PG_DECLARE_EDITOR(EDITOR) \
#endif
WX_PG_DECLARE_EDITOR_WITH_DECL(ChoiceAndButton,WXDLLIMPEXP_PROPGRID)
-#endif // !SWIG
-
// -----------------------------------------------------------------------
#ifndef SWIG
// -----------------------------------------------------------------------
-#ifndef SWIG
-
//
// Tokenizer macros.
// NOTE: I have made two versions - worse ones (performance and consistency
#define WX_PG_TOKENIZER2_END() \
}
-#endif
-
// -----------------------------------------------------------------------
#endif // wxUSE_PROPGRID
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/** @section wxPGPropArgCls
Most property grid functions have this type as their argument, as it can
unsigned char m_flags;
};
-#endif
-
typedef const wxPGPropArgCls& wxPGPropArg;
// -----------------------------------------------------------------------
return m_pState->GetPropertyCategory(p);
}
-#ifndef SWIG
/** Returns client data (void*) of a property. */
void* GetPropertyClientData( wxPGPropArg id ) const
{
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(NULL)
return p->GetClientData();
}
-#endif
/**
Returns first property which label matches given string.
{
return (unsigned long) GetPropertyValueAsLong(id);
}
-#ifndef SWIG
int GetPropertyValueAsInt( wxPGPropArg id ) const
{ return (int)GetPropertyValueAsLong(id); }
-#endif
bool GetPropertyValueAsBool( wxPGPropArg id ) const;
double GetPropertyValueAsDouble( wxPGPropArg id ) const;
}
#endif
-#ifndef SWIG
/** Returns a wxVariant list containing wxVariant versions of all
property values. Order is not guaranteed.
@param flags
{
return m_pState->DoGetPropertyValues(listname, baseparent, flags);
}
-#endif
/**
Returns currently selected property. NULL if none.
return m_pState->m_selection;
}
-#ifndef SWIG
wxPropertyGridPageState* GetState() const { return m_pState; }
-#endif
/** Similar to GetIterator(), but instead returns wxPGVIterator instance,
which can be useful for forward-iterating through arbitrary property
const wxColour& fgCol = wxNullColour,
const wxColour& bgCol = wxNullColour );
-#ifndef SWIG
/** Sets client data (void*) of a property.
@remarks
This untyped client data has to be deleted manually.
p->SetEditor(editor);
RefreshProperty(p);
}
-#endif
/** Sets editor control of a property. As editor argument, use
editor name string, such as "TextCtrl" or "Choice".
p->SetValueToUnspecified();
}
-#ifndef SWIG
/**
Sets property values from a list of wxVariants.
*/
{
SetPropertyValues(list.GetList(),defaultCategory);
}
-#endif
/** Associates the help string with property.
@remarks
}
#endif
-#ifndef SWIG
/** Sets value (long integer) of a property.
*/
void SetPropertyValue( wxPGPropArg id, long value )
wxVariant v = WXVARIANT(value);
SetPropVal( id, v );
}
-#endif // !SWIG
/** Sets value (wxString) of a property.
SetPropVal( id, value );
}
-#ifndef SWIG
/** Sets value (wxVariant&) of a property. Same as SetPropertyValue, but
accepts reference. */
void SetPropVal( wxPGPropArg id, wxVariant& value );
-#endif
/** Adjusts how wxPropertyGrid behaves when invalid value is entered
in a property.
// Default call's m_pState's BaseGetPropertyByName
virtual wxPGProperty* DoGetPropertyByName( const wxString& name ) const;
-#ifndef SWIG
-
// Deriving classes must set this (it must be only or current page).
wxPropertyGridPageState* m_pState;
return NULL;
return static_cast<const wxPropertyGrid*>(m_pState->GetGrid());
}
-#endif // #ifndef SWIG
friend class wxPropertyGrid;
friend class wxPropertyGridManager;
m_pIt = it.m_pIt;
m_pIt->IncRef();
}
-#ifndef SWIG
const wxPGVIterator& operator=( const wxPGVIterator& it )
{
if (this != &it)
}
return *this;
}
-#endif
void Next() { m_pIt->Next(); }
bool AtEnd() const { return m_pIt->m_it.AtEnd(); }
wxPGProperty* GetProperty() const { return m_pIt->m_it.GetProperty(); }
// -----------------------------------------------------------------------
-#ifndef SWIG
-// We won't need this class from wxPython
-
/** @class wxPropertyGridPageState
Contains low-level property page information (properties, column widths,
void InitNonCatMode();
};
-#endif // #ifndef SWIG
-
// -----------------------------------------------------------------------
#endif // wxUSE_PROPGRID
// -----------------------------------------------------------------------
-#ifndef SWIG
-
/** @class wxPGInDialogValidator
@ingroup classes
Creates and manages a temporary wxTextCtrl for validation purposes.
wxTextCtrl* m_textCtrl;
};
-#endif // SWIG
-
// -----------------------------------------------------------------------
// Property classes
// -----------------------------------------------------------------------
-#ifndef SWIG
/** Constants used with DoValidation() methods.
*/
-enum
+enum wxPGDoValidationConstants
{
/** Instead of modifying the value, show an error message.
*/
*/
wxPG_PROPERTY_VALIDATION_WRAP = 2
};
-#endif
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
-// Exclude class from wxPython bindings
-#ifndef SWIG
-
/** @class wxBoolProperty
@ingroup classes
Basic property with boolean value.
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
};
-#endif // !SWIG
-
// -----------------------------------------------------------------------
// If set, then selection of choices is static and should not be
// -----------------------------------------------------------------------
-// Exclude class from wxPython bindings
-#ifndef SWIG
-
/** @class wxDirProperty
@ingroup classes
Like wxLongStringProperty, but the button triggers dir selector instead.
wxString m_dlgMessage;
};
-#endif // !SWIG
-
// -----------------------------------------------------------------------
// wxBoolProperty specific flags
wxWindow* primary,
const wxChar* cbt );
-#ifndef SWIG
// Creates wxArrayEditorDialog for string editing. Called in OnButtonClick.
virtual wxArrayEditorDialog* CreateEditorDialog();
-#endif
protected:
wxString m_display; // Cache for displayed text.