Reduce ambiguity of selection functions in wxPropertyGridManager, make them better match for wxPropertyGrid ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -498,14 +498,11 @@ public:
|
|||||||
int GetSelectedPage() const { return m_selPage; }
|
int GetSelectedPage() const { return m_selPage; }
|
||||||
|
|
||||||
/** Shortcut for GetGrid()->GetSelection(). */
|
/** Shortcut for GetGrid()->GetSelection(). */
|
||||||
wxPGProperty* GetSelectedProperty() const
|
wxPGProperty* GetSelection() const
|
||||||
{
|
{
|
||||||
return m_pPropGrid->GetSelection();
|
return m_pPropGrid->GetSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Synonyme for GetSelectedPage. */
|
|
||||||
int GetSelection() const { return m_selPage; }
|
|
||||||
|
|
||||||
/** Returns a pointer to the toolbar currently associated with the
|
/** Returns a pointer to the toolbar currently associated with the
|
||||||
wxPropertyGridManager (if any). */
|
wxPropertyGridManager (if any). */
|
||||||
wxToolBar* GetToolBar() const { return m_pToolbar; }
|
wxToolBar* GetToolBar() const { return m_pToolbar; }
|
||||||
@@ -619,12 +616,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetSplitterPosition( int pos, int column = 0 );
|
void SetSplitterPosition( int pos, int column = 0 );
|
||||||
|
|
||||||
/** Synonyme for SelectPage(name). */
|
|
||||||
void SetStringSelection( const wxChar* name )
|
|
||||||
{
|
|
||||||
SelectPage( GetPageByName(name) );
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef SWIG
|
#ifdef SWIG
|
||||||
%pythoncode {
|
%pythoncode {
|
||||||
def GetValuesFromPage(self,
|
def GetValuesFromPage(self,
|
||||||
|
@@ -1052,7 +1052,7 @@ void FormMain::OnPropertyGridItemDoubleClick( wxPropertyGridEvent& event )
|
|||||||
void FormMain::OnPropertyGridButtonClick ( wxCommandEvent& )
|
void FormMain::OnPropertyGridButtonClick ( wxCommandEvent& )
|
||||||
{
|
{
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
wxPGProperty* prop = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* prop = m_pPropGridManager->GetSelection();
|
||||||
wxStatusBar* sb = GetStatusBar();
|
wxStatusBar* sb = GetStatusBar();
|
||||||
if ( prop )
|
if ( prop )
|
||||||
{
|
{
|
||||||
@@ -1189,7 +1189,7 @@ void FormMain::OnTestXRC(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void FormMain::OnEnableCommonValues(wxCommandEvent& WXUNUSED(event))
|
void FormMain::OnEnableCommonValues(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxPGProperty* prop = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* prop = m_pPropGridManager->GetSelection();
|
||||||
if ( prop )
|
if ( prop )
|
||||||
prop->EnableCommonValue();
|
prop->EnableCommonValue();
|
||||||
else
|
else
|
||||||
@@ -2604,7 +2604,7 @@ void FormMain::OnRestoreState( wxCommandEvent& WXUNUSED(event) )
|
|||||||
void FormMain::OnSetSpinCtrlEditorClick( wxCommandEvent& WXUNUSED(event) )
|
void FormMain::OnSetSpinCtrlEditorClick( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
#if wxUSE_SPINBTN
|
#if wxUSE_SPINBTN
|
||||||
wxPGProperty* pgId = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* pgId = m_pPropGridManager->GetSelection();
|
||||||
if ( pgId )
|
if ( pgId )
|
||||||
m_pPropGridManager->SetPropertyEditor( pgId, wxPG_EDITOR(SpinCtrl) );
|
m_pPropGridManager->SetPropertyEditor( pgId, wxPG_EDITOR(SpinCtrl) );
|
||||||
else
|
else
|
||||||
@@ -2616,7 +2616,7 @@ void FormMain::OnSetSpinCtrlEditorClick( wxCommandEvent& WXUNUSED(event) )
|
|||||||
|
|
||||||
void FormMain::OnTestReplaceClick( wxCommandEvent& WXUNUSED(event) )
|
void FormMain::OnTestReplaceClick( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxPGProperty* pgId = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* pgId = m_pPropGridManager->GetSelection();
|
||||||
if ( pgId )
|
if ( pgId )
|
||||||
{
|
{
|
||||||
wxPGChoices choices;
|
wxPGChoices choices;
|
||||||
@@ -2986,7 +2986,7 @@ void FormMain::OnMisc ( wxCommandEvent& event )
|
|||||||
else if ( id == ID_COLLAPSE )
|
else if ( id == ID_COLLAPSE )
|
||||||
{
|
{
|
||||||
// Collapses selected.
|
// Collapses selected.
|
||||||
wxPGProperty* id = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* id = m_pPropGridManager->GetSelection();
|
||||||
if ( id )
|
if ( id )
|
||||||
{
|
{
|
||||||
m_pPropGridManager->Collapse(id);
|
m_pPropGridManager->Collapse(id);
|
||||||
@@ -3004,7 +3004,7 @@ void FormMain::OnMisc ( wxCommandEvent& event )
|
|||||||
}
|
}
|
||||||
else if ( id == ID_UNSPECIFY )
|
else if ( id == ID_UNSPECIFY )
|
||||||
{
|
{
|
||||||
wxPGProperty* prop = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* prop = m_pPropGridManager->GetSelection();
|
||||||
if ( prop )
|
if ( prop )
|
||||||
{
|
{
|
||||||
m_pPropGridManager->SetPropertyValueUnspecified(prop);
|
m_pPropGridManager->SetPropertyValueUnspecified(prop);
|
||||||
@@ -3012,7 +3012,7 @@ void FormMain::OnMisc ( wxCommandEvent& event )
|
|||||||
}
|
}
|
||||||
else if ( id == ID_SETCOLOUR )
|
else if ( id == ID_SETCOLOUR )
|
||||||
{
|
{
|
||||||
wxPGProperty* prop = m_pPropGridManager->GetSelectedProperty();
|
wxPGProperty* prop = m_pPropGridManager->GetSelection();
|
||||||
if ( prop )
|
if ( prop )
|
||||||
{
|
{
|
||||||
wxColourData data;
|
wxColourData data;
|
||||||
|
Reference in New Issue
Block a user