wxUSE_CHOICE ifdefs, so that the sample compiles with wxUniv

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-10-14 22:12:43 +00:00
parent 91f5c4d03b
commit 1ccd23f5c4

View File

@@ -86,8 +86,10 @@ public:
void OnListBox( wxCommandEvent &event ); void OnListBox( wxCommandEvent &event );
void OnListBoxDoubleClick( wxCommandEvent &event ); void OnListBoxDoubleClick( wxCommandEvent &event );
void OnListBoxButtons( wxCommandEvent &event ); void OnListBoxButtons( wxCommandEvent &event );
#if wxUSE_CHOICE
void OnChoice( wxCommandEvent &event ); void OnChoice( wxCommandEvent &event );
void OnChoiceButtons( wxCommandEvent &event ); void OnChoiceButtons( wxCommandEvent &event );
#endif
void OnCombo( wxCommandEvent &event ); void OnCombo( wxCommandEvent &event );
void OnComboTextChanged( wxCommandEvent &event ); void OnComboTextChanged( wxCommandEvent &event );
void OnComboTextEnter( wxCommandEvent &event ); void OnComboTextEnter( wxCommandEvent &event );
@@ -118,8 +120,10 @@ public:
wxListBox *m_listbox, wxListBox *m_listbox,
*m_listboxSorted; *m_listboxSorted;
#if wxUSE_CHOICE
wxChoice *m_choice, wxChoice *m_choice,
*m_choiceSorted; *m_choiceSorted;
#endif
wxComboBox *m_combo; wxComboBox *m_combo;
wxRadioBox *m_radio; wxRadioBox *m_radio;
wxGauge *m_gauge, wxGauge *m_gauge,
@@ -443,6 +447,7 @@ EVT_BUTTON (ID_LISTBOX_APPEND, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons) EVT_BUTTON (ID_LISTBOX_DELETE, MyPanel::OnListBoxButtons)
EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons) EVT_BUTTON (ID_LISTBOX_FONT, MyPanel::OnListBoxButtons)
EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons) EVT_CHECKBOX (ID_LISTBOX_ENABLE, MyPanel::OnListBoxButtons)
#if wxUSE_CHOICE
EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice) EVT_CHOICE (ID_CHOICE, MyPanel::OnChoice)
EVT_CHOICE (ID_CHOICE_SORTED, MyPanel::OnChoice) EVT_CHOICE (ID_CHOICE_SORTED, MyPanel::OnChoice)
EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons) EVT_BUTTON (ID_CHOICE_SEL_NUM, MyPanel::OnChoiceButtons)
@@ -452,6 +457,7 @@ EVT_BUTTON (ID_CHOICE_APPEND, MyPanel::OnChoiceButtons)
EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons) EVT_BUTTON (ID_CHOICE_DELETE, MyPanel::OnChoiceButtons)
EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons) EVT_BUTTON (ID_CHOICE_FONT, MyPanel::OnChoiceButtons)
EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons) EVT_CHECKBOX (ID_CHOICE_ENABLE, MyPanel::OnChoiceButtons)
#endif
EVT_COMBOBOX (ID_COMBO, MyPanel::OnCombo) EVT_COMBOBOX (ID_COMBO, MyPanel::OnCombo)
EVT_TEXT (ID_COMBO, MyPanel::OnComboTextChanged) EVT_TEXT (ID_COMBO, MyPanel::OnComboTextChanged)
EVT_TEXT_ENTER(ID_COMBO, MyPanel::OnComboTextEnter) EVT_TEXT_ENTER(ID_COMBO, MyPanel::OnComboTextEnter)
@@ -629,6 +635,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
panel->SetCursor(wxCursor(wxCURSOR_HAND)); panel->SetCursor(wxCursor(wxCURSOR_HAND));
m_notebook->AddPage(panel, "wxListBox", TRUE, Image_List); m_notebook->AddPage(panel, "wxListBox", TRUE, Image_List);
#if wxUSE_CHOICE
panel = new wxPanel(m_notebook); panel = new wxPanel(m_notebook);
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices ); m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1), m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
@@ -648,6 +655,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
(void)new wxCheckBox( panel, ID_CHOICE_ENABLE, "&Disable", wxPoint(20,130), wxSize(140,30) ); (void)new wxCheckBox( panel, ID_CHOICE_ENABLE, "&Disable", wxPoint(20,130), wxSize(140,30) );
m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice); m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
#endif // wxUSE_CHOICE
panel = new wxPanel(m_notebook); panel = new wxPanel(m_notebook);
(void)new wxStaticBox( panel, -1, "&Box around combobox", (void)new wxStaticBox( panel, -1, "&Box around combobox",
@@ -1032,6 +1040,7 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
} }
} }
#if wxUSE_CHOICE
void MyPanel::OnChoice( wxCommandEvent &event ) void MyPanel::OnChoice( wxCommandEvent &event )
{ {
wxChoice *choice = event.GetId() == ID_CHOICE ? m_choice wxChoice *choice = event.GetId() == ID_CHOICE ? m_choice
@@ -1115,6 +1124,7 @@ void MyPanel::OnChoiceButtons( wxCommandEvent &event )
} }
} }
} }
#endif // wxUSE_CHOICE
void MyPanel::OnCombo( wxCommandEvent &event ) void MyPanel::OnCombo( wxCommandEvent &event )
{ {