Implement getters for members of wxPGWindowList
There is no reason to expose wxPGWindowList member variables. They should be set in ctors and retrieved with getters.
This commit is contained in:
@@ -35,6 +35,9 @@ public:
|
|||||||
|
|
||||||
void SetSecondary(wxWindow* secondary) { m_secondary = secondary; }
|
void SetSecondary(wxWindow* secondary) { m_secondary = secondary; }
|
||||||
|
|
||||||
|
wxWindow* GetPrimary() const { return m_primary; }
|
||||||
|
wxWindow* GetSecondary() const { return m_secondary; }
|
||||||
|
|
||||||
wxWindow* m_primary;
|
wxWindow* m_primary;
|
||||||
wxWindow* m_secondary;
|
wxWindow* m_secondary;
|
||||||
};
|
};
|
||||||
|
@@ -17,6 +17,15 @@ public:
|
|||||||
wxPGWindowList(wxWindow* primary, wxWindow* secondary = NULL);
|
wxPGWindowList(wxWindow* primary, wxWindow* secondary = NULL);
|
||||||
|
|
||||||
void SetSecondary(wxWindow* secondary);
|
void SetSecondary(wxWindow* secondary);
|
||||||
|
|
||||||
|
/** Gets window of primary editor.
|
||||||
|
@since 3.1.4
|
||||||
|
*/
|
||||||
|
wxWindow* GetPrimary() const;
|
||||||
|
/** Gets window of secondary editor.
|
||||||
|
@since 3.1.4
|
||||||
|
*/
|
||||||
|
wxWindow* GetSecondary() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -273,7 +273,7 @@ wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxP
|
|||||||
wnd2 = NULL;
|
wnd2 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow* wnd1 = wxPGTextCtrlEditor::CreateControls(propgrid, property, pos, tcSz).m_primary;
|
wxWindow* wnd1 = wxPGTextCtrlEditor::CreateControls(propgrid, property, pos, tcSz).GetPrimary();
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
// Let's add validator to make sure only numbers can be entered
|
// Let's add validator to make sure only numbers can be entered
|
||||||
wxTextValidator validator(wxFILTER_NUMERIC, &m_tempString);
|
wxTextValidator validator(wxFILTER_NUMERIC, &m_tempString);
|
||||||
|
@@ -1318,7 +1318,7 @@ wxPGWindowList wxPGChoiceAndButtonEditor::CreateControls( wxPropertyGrid* propGr
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxWindow* ch = wxPGChoiceEditor::CreateControls(propGrid,property,
|
wxWindow* ch = wxPGChoiceEditor::CreateControls(propGrid,property,
|
||||||
pos,ch_sz).m_primary;
|
pos,ch_sz).GetPrimary();
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
bt->Show();
|
bt->Show();
|
||||||
|
@@ -4163,8 +4163,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
|
|||||||
goodPos,
|
goodPos,
|
||||||
grect.GetSize());
|
grect.GetSize());
|
||||||
|
|
||||||
m_wndEditor = wndList.m_primary;
|
m_wndEditor = wndList.GetPrimary();
|
||||||
m_wndEditor2 = wndList.m_secondary;
|
m_wndEditor2 = wndList.GetSecondary();
|
||||||
// Remember actual positions within required cell.
|
// Remember actual positions within required cell.
|
||||||
// These values can be used when there will be required
|
// These values can be used when there will be required
|
||||||
// to reposition the cell.
|
// to reposition the cell.
|
||||||
|
Reference in New Issue
Block a user