25#include <wx/propgrid/property.h>
35 aProperty->
setter(
object, aValue );
41 return object !=
nullptr;
52 wxPGChoices choices = aProperty->
GetChoices(
this );
54 if( choices.GetCount() )
57 aProperty->
set<
int>( object, aValue.GetInteger() );
59 aProperty->
set<wxString>( object, choices.GetLabel( aValue.GetInteger() ) );
63 aProperty->
set<wxVariant>( object, aValue );
70 return object !=
nullptr;
78 return object ? aProperty->
getter(
object ) : wxAny();
wxAny Get(PROPERTY_BASE *aProperty) const
bool Set(PROPERTY_BASE *aProperty, wxAny &aValue, bool aNotify=true)
virtual size_t TypeHash() const =0
Return type-id of the property type.
virtual wxAny getter(const void *aObject) const =0
wxPGChoices GetChoices(INSPECTABLE *aObject) const
virtual void setter(void *aObject, wxAny &aValue)=0
void set(void *aObject, T aValue)
virtual size_t OwnerHash() const =0
Return type-id of the Owner class.
Provide class metadata.Helper macro to map type hashes to names.
void PropertyChanged(INSPECTABLE *aObject, PROPERTY_BASE *aProperty)
Callback to alert the notification system that a property has changed.
static PROPERTY_MANAGER & Instance()
const void * TypeCast(const void *aSource, TYPE_ID aBase, TYPE_ID aTarget) const
Cast a type to another type.