Fixed minor typos in comments.

This commit is contained in:
Artur Wieczorek 2015-06-08 21:49:38 +02:00
parent c8088e479a
commit aeed3322f2
11 changed files with 41 additions and 41 deletions

View File

@ -148,7 +148,7 @@ public:
@remarks wxPropertyGrid will automatically unfocus the editor when
wxEVT_TEXT_ENTER is received and when it results in
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).
*/
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) \
if ( wxPGEditor_##EDITOR == NULL ) \

View File

@ -2343,7 +2343,7 @@ public:
wxString* pString,
const wxPGCell** pCell );
#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,
int choiceIndex,
int flags,

View File

@ -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.
#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
{
// 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)
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
};
@ -423,7 +423,7 @@ enum wxPG_SETVALUE_FLAGS
// -----------------------------------------------------------------------
// Editor class.
// Editor accessor (for backwards compatiblity use only).
// Editor accessor (for backwards compatibility use only).
#define wxPG_EDITOR(T) wxPGEditor_##T
// Macro for declaring editor class, with optional impexpdecl part.
@ -440,7 +440,7 @@ enum wxPG_SETVALUE_FLAGS
extern wxPGEditor* wxPGEditor_##EDITOR; \
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(Choice,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
// macros found in variant.h. Difference are as follows:
// macros found in variant.h. Differences are as follows:
// * These support non-wxObject data
// * These implement classname##RefFromVariant function which returns
// reference to data within.
@ -518,7 +518,7 @@ extern expdecl const char* classname##_VariantType;
#define WX_PG_IMPLEMENT_VARIANT_DATA(classname) \
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.
#define WX_PG_IMPLEMENT_VARIANT_DATA_EXPORTED_NO_EQ_NO_GETTER(classname,expdecl) \
const char* classname##_VariantType = #classname; \

View File

@ -395,7 +395,7 @@ public:
const wxPGAttributeStorage& GetPropertyAttributes( wxPGPropArg id ) const
{
// 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).
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(m_pState->DoGetRoot()->GetAttributes());
return p->GetAttributes();

View File

@ -897,7 +897,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
{
// TODO: This aligns text so that it seems to be horizontally
// 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;
if ( item < 0 && (flags & wxODCB_PAINTING_CONTROL) )
@ -1915,7 +1915,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos,
if ( forColumn != 1 )
s.x -= 2;
// Take button into acccount
// Take button into account
if ( secondary )
{
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),
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 )
s.x = m_lineHeight;

View File

@ -45,7 +45,7 @@
#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);
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++ )
{
wxPropertyGridPage* page = GetPage(i);
@ -1202,7 +1202,7 @@ bool wxPropertyGridManager::ProcessEvent( wxEvent& event )
int evtType = event.GetEventType();
// 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.
if ( evtType == wxEVT_PG_SELECTED )
OnPropertyGridSelect((wxPropertyGridEvent&)event);
@ -2068,7 +2068,7 @@ void wxPropertyGridManager::OnMouseClick( wxMouseEvent &event )
if ( m_dragStatus == 0 )
{
//
// Begin draggin the splitter
// Begin dragging the splitter
//
BEGIN_MOUSE_CAPTURE

View File

@ -483,7 +483,7 @@ void wxPGProperty::Init()
void wxPGProperty::Init( const wxString& label, const wxString& name )
{
// 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 )
m_label = label;
@ -799,7 +799,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column,
// Not painting list of choice popups, so get text from property
if ( column != 1 || !IsValueUnspecified() || IsCategory() )
{
// Overrride default cell settings with
// Override default cell settings with
// custom settings defined for choice item.
if (column == 1 && !IsValueUnspecified() && choiceIndex != wxNOT_FOUND)
{
@ -1100,7 +1100,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
wxString token;
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;
const wxChar delimiter = wxS(';');
@ -1162,7 +1162,7 @@ bool wxPGProperty::StringToValue( wxVariant& v, const wxString& text, int argFla
// *after* child->StringToValue() has been
// called, since variant's value may be set by
// 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
// being case in point with its use of
// wxPGVariant_Bool macro as an optimization.
@ -2654,7 +2654,7 @@ bool wxPGProperty::IsChildSelected( bool recursive ) const
if ( m_parentState->DoIsPropertySelected( child ) )
return true;
// Test sub-childs
// Test sub-children
if ( recursive && child->IsChildSelected( recursive ) )
return true;
}

View File

@ -474,7 +474,7 @@ void wxPropertyGrid::Init2()
CalculateFontAndBitmapStuff( wxPG_DEFAULT_VSPACING );
// Allocate cell datas
// Allocate cell data
m_propertyDefaultCell.SetEmptyData();
m_categoryDefaultCell.SetEmptyData();
@ -653,7 +653,7 @@ void wxPropertyGrid::SetWindowStyleFlag( long style )
if ( !(old_style & wxPG_AUTO_SORT) && (style & wxPG_AUTO_SORT) )
{
//
// Autosort enabled
// Auto sort enabled
//
if ( !IsFrozen() )
PrepareAfterItemsAdded();
@ -1229,7 +1229,7 @@ void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )
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.
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.
// topy and bottomy are already unscrolled (ie. physical)
// topy and bottomy are already unscrolled (i.e. physical)
//
void wxPropertyGrid::DrawItems( wxDC& dc,
unsigned int topItemY,
@ -2184,7 +2184,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
int y = firstItemTopY;
//
// Pregenerate list of visible properties.
// Pre-generate list of visible properties.
wxArrayPGProperty visPropArray;
visPropArray.reserve((m_height/m_lineHeight)+6);
@ -2565,7 +2565,7 @@ wxRect wxPropertyGrid::GetPropertyRect( const wxPGProperty* p1, const wxPGProper
else
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.
wxPGProperty* selected = GetSelection();
if ( selected )
@ -4136,7 +4136,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
// First, deactivate previous
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 ( !CommitChangesFromEditor(flags) )
@ -4264,7 +4264,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
SetupChildEventHandling(primaryCtrl);
// Focus and select all (wxTextCtrl, wxComboBox etc)
// Focus and select all (wxTextCtrl, wxComboBox etc.)
if ( flags & wxPG_SEL_FOCUS )
{
primaryCtrl->SetFocus();
@ -4480,7 +4480,7 @@ bool wxPropertyGrid::DoCollapse( wxPGProperty* p, bool sendEvents )
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;
m_pState->m_dontCenterSplitter = true;
@ -4900,7 +4900,7 @@ bool wxPropertyGrid::HandleMouseClick( int x, unsigned int y, wxMouseEvent &even
else if ( m_dragStatus == 0 )
{
//
// Begin draggin the splitter
// Begin dragging the splitter
//
// send event
@ -5171,7 +5171,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
else
{
// 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)
if ( !m_propHover->IsCategory() &&
@ -5624,7 +5624,7 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
wxCHECK2(!IsFrozen(), return);
// Travelsal between items, collapsing/expanding, etc.
// Traversal between items, collapsing/expanding, etc.
wxPGProperty* selected = GetSelection();
int keycode = event.GetKeyCode();
bool editorFocused = IsEditorFocused();
@ -5955,7 +5955,7 @@ void wxPropertyGrid::HandleFocusChange( wxWindow* newFocused )
{
//
// 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.
if ( HasInternalFlag(wxPG_FL_IN_HANDLECUSTOMEDITOREVENT) )
return;
@ -6362,7 +6362,7 @@ wxPropertyGridEvent::~wxPropertyGridEvent()
#endif
// 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;
for ( int i = liveEvents.size()-1; i >= 0; i-- )

View File

@ -542,7 +542,7 @@ wxPGProperty* wxPropertyGridInterface::GetPropertyByName( const wxString& name )
if ( p )
return p;
// Check if its "Property.SubProperty" format
// Check if it is "Property.SubProperty" format
int pos = name.Find(wxS('.'));
if ( pos <= 0 )
return NULL;

View File

@ -1372,7 +1372,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop )
wxPropertyGrid* pg = m_pPropGrid;
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.
wxArrayPGProperty sel = m_selection;
sel.erase( sel.begin() + i );
@ -1972,7 +1972,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
wxPropertyGrid* pg = GetGrid();
// Try to unselect property and its subproperties.
// Try to unselect property and its sub-properties.
if ( DoIsPropertySelected(item) )
{
if ( pg && pg->GetState() == this )

View File

@ -2094,7 +2094,7 @@ bool wxFileProperty::StringToValue( wxVariant& variant, const wxString& text, in
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.
if ( name == wxPG_FILE_SHOW_FULL_PATH )
{