Explain toolbar sample actions better
Added messages to show that Copy tool intentionally influences Print tool and Cut tool influences Help tool, as this is rather unexpected behaviour and could be seen as a bug.
This commit is contained in:
committed by
Vadim Zeitlin
parent
0d45559975
commit
2e103dfe95
@@ -861,6 +861,7 @@ void MyFrame::DoEnablePrint()
|
|||||||
|
|
||||||
wxToolBarBase *tb = GetToolBar();
|
wxToolBarBase *tb = GetToolBar();
|
||||||
tb->EnableTool(wxID_PRINT, !tb->GetToolEnabled(wxID_PRINT));
|
tb->EnableTool(wxID_PRINT, !tb->GetToolEnabled(wxID_PRINT));
|
||||||
|
m_textWindow->AppendText("Print tool state changed.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::DoDeletePrint()
|
void MyFrame::DoDeletePrint()
|
||||||
@@ -870,6 +871,7 @@ void MyFrame::DoDeletePrint()
|
|||||||
|
|
||||||
wxToolBarBase *tb = GetToolBar();
|
wxToolBarBase *tb = GetToolBar();
|
||||||
tb->DeleteTool( wxID_PRINT );
|
tb->DeleteTool( wxID_PRINT );
|
||||||
|
m_textWindow->AppendText("Print tool was deleted.\n");
|
||||||
|
|
||||||
m_nPrint--;
|
m_nPrint--;
|
||||||
}
|
}
|
||||||
@@ -878,6 +880,7 @@ void MyFrame::DoToggleHelp()
|
|||||||
{
|
{
|
||||||
wxToolBarBase *tb = GetToolBar();
|
wxToolBarBase *tb = GetToolBar();
|
||||||
tb->ToggleTool( wxID_HELP, !tb->GetToolState( wxID_HELP ) );
|
tb->ToggleTool( wxID_HELP, !tb->GetToolState( wxID_HELP ) );
|
||||||
|
m_textWindow->AppendText("Help tool was toggled.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnToggleSearch(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnToggleSearch(wxCommandEvent& WXUNUSED(event))
|
||||||
|
Reference in New Issue
Block a user