Fixed minor typos in comments.
This commit is contained in:
@@ -148,7 +148,7 @@ public:
|
|||||||
@remarks wxPropertyGrid will automatically unfocus the editor when
|
@remarks wxPropertyGrid will automatically unfocus the editor when
|
||||||
wxEVT_TEXT_ENTER is received and when it results in
|
wxEVT_TEXT_ENTER is received and when it results in
|
||||||
property value being modified. This happens regardless of
|
property value being modified. This happens regardless of
|
||||||
editor type (ie. behaviour is same for any wxTextCtrl and
|
editor type (i.e. behaviour is same for any wxTextCtrl and
|
||||||
wxComboBox based editor).
|
wxComboBox based editor).
|
||||||
*/
|
*/
|
||||||
virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property,
|
virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property,
|
||||||
@@ -439,7 +439,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// Editor class registeration macro (mostly for internal use)
|
// Editor class registration macro (mostly for internal use)
|
||||||
|
|
||||||
#define wxPGRegisterEditorClass(EDITOR) \
|
#define wxPGRegisterEditorClass(EDITOR) \
|
||||||
if ( wxPGEditor_##EDITOR == NULL ) \
|
if ( wxPGEditor_##EDITOR == NULL ) \
|
||||||
|
@@ -2343,7 +2343,7 @@ public:
|
|||||||
wxString* pString,
|
wxString* pString,
|
||||||
const wxPGCell** pCell );
|
const wxPGCell** pCell );
|
||||||
#endif // WXWIN_COMPATIBILITY_3_0
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
// This function can return modfied (customized) cell object.
|
// This function can return modified (customized) cell object.
|
||||||
void GetDisplayInfo( unsigned int column,
|
void GetDisplayInfo( unsigned int column,
|
||||||
int choiceIndex,
|
int choiceIndex,
|
||||||
int flags,
|
int flags,
|
||||||
|
@@ -280,7 +280,7 @@ typedef wxString wxPGCachedString;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
// Used to indicate wxPGChoices::Add etc that the value is actually not given
|
// Used to indicate wxPGChoices::Add etc. that the value is actually not given
|
||||||
// by the caller.
|
// by the caller.
|
||||||
#define wxPG_INVALID_VALUE INT_MAX
|
#define wxPG_INVALID_VALUE INT_MAX
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ wxPG_SORT_TOP_LEVEL_ONLY = 0x00000200
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
// Misc argument flags.
|
// Misc. argument flags.
|
||||||
enum wxPG_MISC_ARG_FLAGS
|
enum wxPG_MISC_ARG_FLAGS
|
||||||
{
|
{
|
||||||
// Get/Store full value instead of displayed value.
|
// Get/Store full value instead of displayed value.
|
||||||
@@ -389,7 +389,7 @@ enum wxPG_MISC_ARG_FLAGS
|
|||||||
// (guarantees that input wxVariant value is current own value)
|
// (guarantees that input wxVariant value is current own value)
|
||||||
wxPG_VALUE_IS_CURRENT = 0x00000040,
|
wxPG_VALUE_IS_CURRENT = 0x00000040,
|
||||||
|
|
||||||
// Value is being set programmatically (ie. not by user)
|
// Value is being set programmatically (i.e. not by user)
|
||||||
wxPG_PROGRAMMATIC_VALUE = 0x00000080
|
wxPG_PROGRAMMATIC_VALUE = 0x00000080
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -423,7 +423,7 @@ enum wxPG_SETVALUE_FLAGS
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// Editor class.
|
// Editor class.
|
||||||
|
|
||||||
// Editor accessor (for backwards compatiblity use only).
|
// Editor accessor (for backwards compatibility use only).
|
||||||
#define wxPG_EDITOR(T) wxPGEditor_##T
|
#define wxPG_EDITOR(T) wxPGEditor_##T
|
||||||
|
|
||||||
// Macro for declaring editor class, with optional impexpdecl part.
|
// Macro for declaring editor class, with optional impexpdecl part.
|
||||||
@@ -440,7 +440,7 @@ enum wxPG_SETVALUE_FLAGS
|
|||||||
extern wxPGEditor* wxPGEditor_##EDITOR; \
|
extern wxPGEditor* wxPGEditor_##EDITOR; \
|
||||||
extern wxPGEditor* wxPGConstruct##EDITOR##EditorClass();
|
extern wxPGEditor* wxPGConstruct##EDITOR##EditorClass();
|
||||||
|
|
||||||
// Declare builtin editor classes.
|
// Declare built-in editor classes.
|
||||||
WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrl,WXDLLIMPEXP_PROPGRID)
|
WX_PG_DECLARE_EDITOR_WITH_DECL(TextCtrl,WXDLLIMPEXP_PROPGRID)
|
||||||
WX_PG_DECLARE_EDITOR_WITH_DECL(Choice,WXDLLIMPEXP_PROPGRID)
|
WX_PG_DECLARE_EDITOR_WITH_DECL(Choice,WXDLLIMPEXP_PROPGRID)
|
||||||
WX_PG_DECLARE_EDITOR_WITH_DECL(ComboBox,WXDLLIMPEXP_PROPGRID)
|
WX_PG_DECLARE_EDITOR_WITH_DECL(ComboBox,WXDLLIMPEXP_PROPGRID)
|
||||||
@@ -491,7 +491,7 @@ template<> inline wxVariant WXVARIANT( const wxDateTime& value )
|
|||||||
|
|
||||||
//
|
//
|
||||||
// These are modified versions of DECLARE/WX_PG_IMPLEMENT_VARIANT_DATA
|
// These are modified versions of DECLARE/WX_PG_IMPLEMENT_VARIANT_DATA
|
||||||
// macros found in variant.h. Difference are as follows:
|
// macros found in variant.h. Differences are as follows:
|
||||||
// * These support non-wxObject data
|
// * These support non-wxObject data
|
||||||
// * These implement classname##RefFromVariant function which returns
|
// * These implement classname##RefFromVariant function which returns
|
||||||
// reference to data within.
|
// reference to data within.
|
||||||
@@ -518,7 +518,7 @@ extern expdecl const char* classname##_VariantType;
|
|||||||
#define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \
|
#define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \
|
||||||
WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
|
WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED(classname, wxEMPTY_PARAMETER_VALUE)
|
||||||
|
|
||||||
// Add getter (ie. classname << variant) separately to allow
|
// Add getter (i.e. classname << variant) separately to allow
|
||||||
// custom implementations.
|
// custom implementations.
|
||||||
#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,expdecl) \
|
#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,expdecl) \
|
||||||
const char* classname##_VariantType = #classname; \
|
const char* classname##_VariantType = #classname; \
|
||||||
|
@@ -395,7 +395,7 @@ public:
|
|||||||
const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const
|
const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const
|
||||||
{
|
{
|
||||||
// If 'id' refers to invalid property, then we will return dummy
|
// If 'id' refers to invalid property, then we will return dummy
|
||||||
// attributes (ie. root property's attributes, which contents should
|
// attributes (i.e. root property's attributes, which contents should
|
||||||
// should always be empty and of no consequence).
|
// should always be empty and of no consequence).
|
||||||
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes());
|
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes());
|
||||||
return p->GetAttributes();
|
return p->GetAttributes();
|
||||||
|
@@ -897,7 +897,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
{
|
{
|
||||||
// TODO: This aligns text so that it seems to be horizontally
|
// TODO: This aligns text so that it seems to be horizontally
|
||||||
// on the same line as property values. Not really
|
// on the same line as property values. Not really
|
||||||
// sure if its needed, but seems to not cause any harm.
|
// sure if it is needed, but seems to not cause any harm.
|
||||||
pt.x -= 1;
|
pt.x -= 1;
|
||||||
|
|
||||||
if ( item < 0 && (flags & wxODCB_PAINTING_CONTROL) )
|
if ( item < 0 && (flags & wxODCB_PAINTING_CONTROL) )
|
||||||
@@ -1915,7 +1915,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos,
|
|||||||
if ( forColumn != 1 )
|
if ( forColumn != 1 )
|
||||||
s.x -= 2;
|
s.x -= 2;
|
||||||
|
|
||||||
// Take button into acccount
|
// Take button into account
|
||||||
if ( secondary )
|
if ( secondary )
|
||||||
{
|
{
|
||||||
s.x -= (secondary->GetSize().x + wxPG_TEXTCTRL_AND_BUTTON_SPACING);
|
s.x -= (secondary->GetSize().x + wxPG_TEXTCTRL_AND_BUTTON_SPACING);
|
||||||
@@ -2019,7 +2019,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize
|
|||||||
wxSize s(sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2),
|
wxSize s(sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2),
|
||||||
sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2));
|
sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2));
|
||||||
|
|
||||||
// Reduce button width to lineheight
|
// Reduce button width to line height
|
||||||
if ( s.x > m_lineHeight )
|
if ( s.x > m_lineHeight )
|
||||||
s.x = m_lineHeight;
|
s.x = m_lineHeight;
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
#include "wx/propgrid/manager.h"
|
#include "wx/propgrid/manager.h"
|
||||||
|
|
||||||
|
|
||||||
#define wxPG_MAN_ALTERNATE_BASE_ID 11249 // Needed for wxID_ANY madnesss
|
#define wxPG_MAN_ALTERNATE_BASE_ID 11249 // Needed for wxID_ANY madness
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@@ -652,7 +652,7 @@ bool wxPropertyGridManager::SetFont( const wxFont& font )
|
|||||||
bool res = wxWindow::SetFont(font);
|
bool res = wxWindow::SetFont(font);
|
||||||
m_pPropGrid->SetFont(font);
|
m_pPropGrid->SetFont(font);
|
||||||
|
|
||||||
// TODO: Need to do caption recacalculations for other pages as well.
|
// TODO: Need to do caption recalculations for other pages as well.
|
||||||
for ( unsigned int i = 0; i < m_arrPages.size(); i++ )
|
for ( unsigned int i = 0; i < m_arrPages.size(); i++ )
|
||||||
{
|
{
|
||||||
wxPropertyGridPage* page = GetPage(i);
|
wxPropertyGridPage* page = GetPage(i);
|
||||||
@@ -1202,7 +1202,7 @@ bool wxPropertyGridManager::ProcessEvent( wxEvent& event )
|
|||||||
int evtType = event.GetEventType();
|
int evtType = event.GetEventType();
|
||||||
|
|
||||||
// NB: For some reason, under wxPython, Connect in Init doesn't work properly,
|
// NB: For some reason, under wxPython, Connect in Init doesn't work properly,
|
||||||
// so we'll need to call OnPropertyGridSelect manually. Multiple call's
|
// so we'll need to call OnPropertyGridSelect manually. Multiple calls
|
||||||
// don't really matter.
|
// don't really matter.
|
||||||
if ( evtType == wxEVT_PG_SELECTED )
|
if ( evtType == wxEVT_PG_SELECTED )
|
||||||
OnPropertyGridSelect((wxPropertyGridEvent&)event);
|
OnPropertyGridSelect((wxPropertyGridEvent&)event);
|
||||||
@@ -2068,7 +2068,7 @@ void wxPropertyGridManager::OnMouseClick( wxMouseEvent &event )
|
|||||||
if ( m_dragStatus == 0 )
|
if ( m_dragStatus == 0 )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Begin draggin the splitter
|
// Begin dragging the splitter
|
||||||
//
|
//
|
||||||
|
|
||||||
BEGIN_MOUSE_CAPTURE
|
BEGIN_MOUSE_CAPTURE
|
||||||
|
@@ -483,7 +483,7 @@ void wxPGProperty::Init()
|
|||||||
void wxPGProperty::Init( const wxString& label, const wxString& name )
|
void wxPGProperty::Init( const wxString& label, const wxString& name )
|
||||||
{
|
{
|
||||||
// We really need to check if &label and &name are NULL pointers
|
// We really need to check if &label and &name are NULL pointers
|
||||||
// (this can if we are called before property grid has been initalized)
|
// (this can if we are called before property grid has been initialized)
|
||||||
|
|
||||||
if ( (&label) != NULL && label != wxPG_LABEL )
|
if ( (&label) != NULL && label != wxPG_LABEL )
|
||||||
m_label = label;
|
m_label = label;
|
||||||
@@ -799,7 +799,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
|
|||||||
// Not painting list of choice popups, so get text from property
|
// Not painting list of choice popups, so get text from property
|
||||||
if ( column != 1 || !IsValueUnspecified() || IsCategory() )
|
if ( column != 1 || !IsValueUnspecified() || IsCategory() )
|
||||||
{
|
{
|
||||||
// Overrride default cell settings with
|
// Override default cell settings with
|
||||||
// custom settings defined for choice item.
|
// custom settings defined for choice item.
|
||||||
if (column == 1 && !IsValueUnspecified() && choiceIndex != wxNOT_FOUND)
|
if (column == 1 && !IsValueUnspecified() && choiceIndex != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
@@ -1100,7 +1100,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
|
|||||||
wxString token;
|
wxString token;
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
|
|
||||||
// Its best only to add non-empty group items
|
// It is best only to add non-empty group items
|
||||||
bool addOnlyIfNotEmpty = false;
|
bool addOnlyIfNotEmpty = false;
|
||||||
const wxChar delimiter = wxS(';');
|
const wxChar delimiter = wxS(';');
|
||||||
|
|
||||||
@@ -1162,7 +1162,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
|
|||||||
// *after* child->StringToValue() has been
|
// *after* child->StringToValue() has been
|
||||||
// called, since variant's value may be set by
|
// called, since variant's value may be set by
|
||||||
// assigning another variant into it, which
|
// assigning another variant into it, which
|
||||||
// then usually causes name to be copied (ie.
|
// then usually causes name to be copied (i.e.
|
||||||
// usually cleared) as well. wxBoolProperty
|
// usually cleared) as well. wxBoolProperty
|
||||||
// being case in point with its use of
|
// being case in point with its use of
|
||||||
// wxPGVariant_Bool macro as an optimization.
|
// wxPGVariant_Bool macro as an optimization.
|
||||||
@@ -2654,7 +2654,7 @@ bool wxPGProperty::IsChildSelected( bool recursive ) const
|
|||||||
if ( m_parentState->DoIsPropertySelected( child ) )
|
if ( m_parentState->DoIsPropertySelected( child ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Test sub-childs
|
// Test sub-children
|
||||||
if ( recursive && child->IsChildSelected( recursive ) )
|
if ( recursive && child->IsChildSelected( recursive ) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -474,7 +474,7 @@ void wxPropertyGrid::Init2()
|
|||||||
|
|
||||||
CalculateFontAndBitmapStuff( wxPG_DEFAULT_VSPACING );
|
CalculateFontAndBitmapStuff( wxPG_DEFAULT_VSPACING );
|
||||||
|
|
||||||
// Allocate cell datas
|
// Allocate cell data
|
||||||
m_propertyDefaultCell.SetEmptyData();
|
m_propertyDefaultCell.SetEmptyData();
|
||||||
m_categoryDefaultCell.SetEmptyData();
|
m_categoryDefaultCell.SetEmptyData();
|
||||||
|
|
||||||
@@ -653,7 +653,7 @@ void wxPropertyGrid::SetWindowStyleFlag( long style )
|
|||||||
if ( !(old_style & wxPG_AUTO_SORT) && (style & wxPG_AUTO_SORT) )
|
if ( !(old_style & wxPG_AUTO_SORT) && (style & wxPG_AUTO_SORT) )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Autosort enabled
|
// Auto sort enabled
|
||||||
//
|
//
|
||||||
if ( !IsFrozen() )
|
if ( !IsFrozen() )
|
||||||
PrepareAfterItemsAdded();
|
PrepareAfterItemsAdded();
|
||||||
@@ -1229,7 +1229,7 @@ void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )
|
|||||||
wxMilliClock_t currentTime = ::wxGetLocalTimeMillis();
|
wxMilliClock_t currentTime = ::wxGetLocalTimeMillis();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parent changed so let's redetermine and re-hook the
|
// Parent changed so let's re-determine and re-hook the
|
||||||
// correct top-level window.
|
// correct top-level window.
|
||||||
if ( m_tlp )
|
if ( m_tlp )
|
||||||
{
|
{
|
||||||
@@ -1990,7 +1990,7 @@ void wxPropertyGrid::DrawExpanderButton( wxDC& dc, const wxRect& rect,
|
|||||||
|
|
||||||
//
|
//
|
||||||
// This is the one called by OnPaint event handler and others.
|
// This is the one called by OnPaint event handler and others.
|
||||||
// topy and bottomy are already unscrolled (ie. physical)
|
// topy and bottomy are already unscrolled (i.e. physical)
|
||||||
//
|
//
|
||||||
void wxPropertyGrid::DrawItems( wxDC& dc,
|
void wxPropertyGrid::DrawItems( wxDC& dc,
|
||||||
unsigned int topItemY,
|
unsigned int topItemY,
|
||||||
@@ -2184,7 +2184,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
|||||||
int y = firstItemTopY;
|
int y = firstItemTopY;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pregenerate list of visible properties.
|
// Pre-generate list of visible properties.
|
||||||
wxArrayPGProperty visPropArray;
|
wxArrayPGProperty visPropArray;
|
||||||
visPropArray.reserve((m_height/m_lineHeight)+6);
|
visPropArray.reserve((m_height/m_lineHeight)+6);
|
||||||
|
|
||||||
@@ -2565,7 +2565,7 @@ wxRect wxPropertyGrid::GetPropertyRect( const wxPGProperty* p1, const wxPGProper
|
|||||||
else
|
else
|
||||||
visBottom = m_height + visTop;
|
visBottom = m_height + visTop;
|
||||||
|
|
||||||
// If seleced property is inside the range, we'll extend the range to include
|
// If selected property is inside the range, we'll extend the range to include
|
||||||
// control's size.
|
// control's size.
|
||||||
wxPGProperty* selected = GetSelection();
|
wxPGProperty* selected = GetSelection();
|
||||||
if ( selected )
|
if ( selected )
|
||||||
@@ -4136,7 +4136,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
// First, deactivate previous
|
// First, deactivate previous
|
||||||
if ( prevFirstSel )
|
if ( prevFirstSel )
|
||||||
{
|
{
|
||||||
// Must double-check if this is an selected in case of forceswitch
|
// Must double-check if this is an selected in case of force switch
|
||||||
if ( p != prevFirstSel )
|
if ( p != prevFirstSel )
|
||||||
{
|
{
|
||||||
if ( !CommitChangesFromEditor(flags) )
|
if ( !CommitChangesFromEditor(flags) )
|
||||||
@@ -4264,7 +4264,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
|
|
||||||
SetupChildEventHandling(primaryCtrl);
|
SetupChildEventHandling(primaryCtrl);
|
||||||
|
|
||||||
// Focus and select all (wxTextCtrl, wxComboBox etc)
|
// Focus and select all (wxTextCtrl, wxComboBox etc.)
|
||||||
if ( flags & wxPG_SEL_FOCUS )
|
if ( flags & wxPG_SEL_FOCUS )
|
||||||
{
|
{
|
||||||
primaryCtrl->SetFocus();
|
primaryCtrl->SetFocus();
|
||||||
@@ -4480,7 +4480,7 @@ bool wxPropertyGrid::DoCollapse( wxPGProperty* p, bool sendEvents )
|
|||||||
DoClearSelection();
|
DoClearSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store dont-center-splitter flag 'cause we need to temporarily set it
|
// Store dont-center-splitter flag because we need to temporarily set it
|
||||||
bool prevDontCenterSplitter = m_pState->m_dontCenterSplitter;
|
bool prevDontCenterSplitter = m_pState->m_dontCenterSplitter;
|
||||||
m_pState->m_dontCenterSplitter = true;
|
m_pState->m_dontCenterSplitter = true;
|
||||||
|
|
||||||
@@ -4900,7 +4900,7 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
|
|||||||
else if ( m_dragStatus == 0 )
|
else if ( m_dragStatus == 0 )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Begin draggin the splitter
|
// Begin dragging the splitter
|
||||||
//
|
//
|
||||||
|
|
||||||
// send event
|
// send event
|
||||||
@@ -5171,7 +5171,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Do not allow splitter cursor on caption items.
|
// Do not allow splitter cursor on caption items.
|
||||||
// (also not if we were dragging and its started
|
// (also not if we were dragging and it's started
|
||||||
// outside the splitter region)
|
// outside the splitter region)
|
||||||
|
|
||||||
if ( !m_propHover->IsCategory() &&
|
if ( !m_propHover->IsCategory() &&
|
||||||
@@ -5624,7 +5624,7 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
|||||||
|
|
||||||
wxCHECK2(!IsFrozen(), return);
|
wxCHECK2(!IsFrozen(), return);
|
||||||
|
|
||||||
// Travelsal between items, collapsing/expanding, etc.
|
// Traversal between items, collapsing/expanding, etc.
|
||||||
wxPGProperty* selected = GetSelection();
|
wxPGProperty* selected = GetSelection();
|
||||||
int keycode = event.GetKeyCode();
|
int keycode = event.GetKeyCode();
|
||||||
bool editorFocused = IsEditorFocused();
|
bool editorFocused = IsEditorFocused();
|
||||||
@@ -5955,7 +5955,7 @@ void wxPropertyGrid::HandleFocusChange( wxWindow* newFocused )
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Never allow focus to be changed when handling editor event.
|
// Never allow focus to be changed when handling editor event.
|
||||||
// Especially because they may be displaing a dialog which
|
// Especially because they may be displaying a dialog which
|
||||||
// could cause all kinds of weird (native) focus changes.
|
// could cause all kinds of weird (native) focus changes.
|
||||||
if ( HasInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT) )
|
if ( HasInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT) )
|
||||||
return;
|
return;
|
||||||
@@ -6362,7 +6362,7 @@ wxPropertyGridEvent::~wxPropertyGridEvent()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use iterate from the back since it is more likely that the event
|
// Use iterate from the back since it is more likely that the event
|
||||||
// being desroyed is at the end of the array.
|
// being destroyed is at the end of the array.
|
||||||
wxVector<wxPropertyGridEvent*>& liveEvents = m_pg->m_liveEvents;
|
wxVector<wxPropertyGridEvent*>& liveEvents = m_pg->m_liveEvents;
|
||||||
|
|
||||||
for ( int i = liveEvents.size()-1; i >= 0; i-- )
|
for ( int i = liveEvents.size()-1; i >= 0; i-- )
|
||||||
|
@@ -542,7 +542,7 @@ wxPGProperty* wxPropertyGridInterface::GetPropertyByName( const wxString& name )
|
|||||||
if ( p )
|
if ( p )
|
||||||
return p;
|
return p;
|
||||||
|
|
||||||
// Check if its "Property.SubProperty" format
|
// Check if it is "Property.SubProperty" format
|
||||||
int pos = name.Find(wxS('.'));
|
int pos = name.Find(wxS('.'));
|
||||||
if ( pos <= 0 )
|
if ( pos <= 0 )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -1372,7 +1372,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop )
|
|||||||
wxPropertyGrid* pg = m_pPropGrid;
|
wxPropertyGrid* pg = m_pPropGrid;
|
||||||
if ( i == 0 && pg->GetState() == this )
|
if ( i == 0 && pg->GetState() == this )
|
||||||
{
|
{
|
||||||
// If first item (ie. one with the active editor) was
|
// If first item (i.e. one with the active editor) was
|
||||||
// deselected, then we need to take some extra measures.
|
// deselected, then we need to take some extra measures.
|
||||||
wxArrayPGProperty sel = m_selection;
|
wxArrayPGProperty sel = m_selection;
|
||||||
sel.erase( sel.begin() + i );
|
sel.erase( sel.begin() + i );
|
||||||
@@ -1972,7 +1972,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
|
|||||||
|
|
||||||
wxPropertyGrid* pg = GetGrid();
|
wxPropertyGrid* pg = GetGrid();
|
||||||
|
|
||||||
// Try to unselect property and its subproperties.
|
// Try to unselect property and its sub-properties.
|
||||||
if ( DoIsPropertySelected(item) )
|
if ( DoIsPropertySelected(item) )
|
||||||
{
|
{
|
||||||
if ( pg && pg->GetState() == this )
|
if ( pg && pg->GetState() == this )
|
||||||
|
@@ -2094,7 +2094,7 @@ bool wxFileProperty::StringToValue( wxVariant& variant, const wxString& text, in
|
|||||||
|
|
||||||
bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
bool wxFileProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
||||||
{
|
{
|
||||||
// Return false on some occasions to make sure those attribs will get
|
// Return false on some occasions to make sure those attributes will get
|
||||||
// stored in m_attributes.
|
// stored in m_attributes.
|
||||||
if ( name == wxPG_FILE_SHOW_FULL_PATH )
|
if ( name == wxPG_FILE_SHOW_FULL_PATH )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user