]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
reSWIGged
[wxWidgets.git] / samples / controls / controls.cpp
index 5dc63aca099079beadb989557691e32da1de5fb2..6db8d56732e94325ef0c61aa4e969ea0c76796c7 100644 (file)
@@ -8,10 +8,6 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-    #pragma implementation "controls.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -97,6 +93,8 @@ public:
     void OnComboButtons( wxCommandEvent &event );
     void OnRadio( wxCommandEvent &event );
     void OnRadioButtons( wxCommandEvent &event );
     void OnComboButtons( wxCommandEvent &event );
     void OnRadio( wxCommandEvent &event );
     void OnRadioButtons( wxCommandEvent &event );
+    void OnRadioButton1( wxCommandEvent &event );
+    void OnRadioButton2( wxCommandEvent &event );
     void OnSetFont( wxCommandEvent &event );
     void OnPageChanged( wxNotebookEvent &event );
     void OnPageChanging( wxNotebookEvent &event );
     void OnSetFont( wxCommandEvent &event );
     void OnPageChanged( wxNotebookEvent &event );
     void OnPageChanging( wxNotebookEvent &event );
@@ -464,6 +462,8 @@ EVT_BUTTON    (ID_RADIOBOX_SEL_NUM,     MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_SEL_STR,     MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_FONT,        MyPanel::OnRadioButtons)
 EVT_CHECKBOX  (ID_RADIOBOX_ENABLE,      MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_SEL_STR,     MyPanel::OnRadioButtons)
 EVT_BUTTON    (ID_RADIOBOX_FONT,        MyPanel::OnRadioButtons)
 EVT_CHECKBOX  (ID_RADIOBOX_ENABLE,      MyPanel::OnRadioButtons)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_1,       MyPanel::OnRadioButton1)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_2,       MyPanel::OnRadioButton2)
 EVT_BUTTON    (ID_SET_FONT,             MyPanel::OnSetFont)
 EVT_SLIDER    (ID_SLIDER,               MyPanel::OnSliderUpdate)
 #if wxUSE_SPINBTN
 EVT_BUTTON    (ID_SET_FONT,             MyPanel::OnSetFont)
 EVT_SLIDER    (ID_SLIDER,               MyPanel::OnSliderUpdate)
 #if wxUSE_SPINBTN
@@ -1290,6 +1290,16 @@ void MyPanel::OnRadio( wxCommandEvent &event )
     m_text->AppendText( _T("\n") );
 }
 
     m_text->AppendText( _T("\n") );
 }
 
+void MyPanel::OnRadioButton1( wxCommandEvent & WXUNUSED(event) )
+{
+    wxMessageBox(_T("First wxRadioButton selected."), _T("wxControl sample"));
+}
+
+void MyPanel::OnRadioButton2( wxCommandEvent & WXUNUSED(event) )
+{
+    m_text->AppendText(_T("Second wxRadioButton selected.\n"));
+}
+
 void MyPanel::OnRadioButtons( wxCommandEvent &event )
 {
     switch (event.GetId())
 void MyPanel::OnRadioButtons( wxCommandEvent &event )
 {
     switch (event.GetId())
@@ -1553,7 +1563,9 @@ MyFrame::MyFrame(const wxChar *title, int x, int y)
     // The wxICON() macros loads an icon from a resource under Windows
     // and uses an #included XPM image under GTK+ and Motif
 
     // The wxICON() macros loads an icon from a resource under Windows
     // and uses an #included XPM image under GTK+ and Motif
 
+#ifdef USE_XPM
     SetIcon( wxICON(mondrian) );
     SetIcon( wxICON(mondrian) );
+#endif
 
     wxMenu *file_menu = new wxMenu;
 
 
     wxMenu *file_menu = new wxMenu;