X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4bc1aa27cb33f679d7e9c1518a7855bbc1fa471..14c140606b3b70cde00c805e210d67154b60cef3:/src/propgrid/advprops.cpp diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index dcc6b98207..71a57d4cb1 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -42,11 +42,11 @@ #include "wx/scrolwin.h" #include "wx/dirdlg.h" #include "wx/combobox.h" - #include "wx/layout.h" #include "wx/sizer.h" #include "wx/textdlg.h" #include "wx/filedlg.h" #include "wx/intl.h" + #include "wx/wxcrtvararg.h" #endif #define __wxPG_SOURCE_FILE__ @@ -62,8 +62,6 @@ #include #endif -#include - // ----------------------------------------------------------------------- #if defined(__WXMSW__) @@ -1472,13 +1470,14 @@ void wxCursorProperty::OnCustomPaint( wxDC& dc, if ( paintdata.m_choiceItem < NUM_CURSORS ) { - int cursorindex = gs_cp_es_syscursors_values[paintdata.m_choiceItem]; + wxStockCursor cursorIndex = + (wxStockCursor) gs_cp_es_syscursors_values[paintdata.m_choiceItem]; { - if ( cursorindex == wxCURSOR_NONE ) - cursorindex = wxCURSOR_ARROW; + if ( cursorIndex == wxCURSOR_NONE ) + cursorIndex = wxCURSOR_ARROW; - wxCursor cursor( cursorindex ); + wxCursor cursor( cursorIndex ); #ifdef __WXMSW__ HDC hDc = (HDC)((const wxMSWDCImpl *)dc.GetImpl())->GetHDC(); @@ -1551,9 +1550,7 @@ const wxString& wxPGGetDefaultImageWildcard() return wxPGGlobalVars->m_pDefaultImageWildcard; } -WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(wxImageFileProperty, - wxFileProperty, - const wxString&) +IMPLEMENT_DYNAMIC_CLASS(wxImageFileProperty, wxFileProperty) wxImageFileProperty::wxImageFileProperty( const wxString& label, const wxString& name, const wxString& value ) @@ -1808,13 +1805,6 @@ bool wxMultiChoiceProperty::OnEvent( wxPropertyGrid* propgrid, return false; } -int wxMultiChoiceProperty::GetChoiceInfo( wxPGChoiceInfo* choiceinfo ) -{ - if ( choiceinfo ) - choiceinfo->m_choices = &m_choices; - return -1; -} - bool wxMultiChoiceProperty::StringToValue( wxVariant& variant, const wxString& text, int ) const { wxArrayString arr; @@ -2003,6 +1993,10 @@ void wxPropertyGridInterface::InitAllTypeHandlers() void wxPropertyGridInterface::RegisterAdditionalEditors() { + // Register editor classes, if necessary. + if ( wxPGGlobalVars->m_mapEditorClasses.empty() ) + wxPropertyGrid::RegisterDefaultEditors(); + #if wxUSE_SPINBTN wxPGRegisterEditorClass(SpinCtrl); #endif