wxRadioButton more or less works under GTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-10 16:39:54 +00:00
parent bc2dad04e7
commit 5b1d0de44a
18 changed files with 568 additions and 396 deletions

View File

@@ -38,6 +38,7 @@
#include "wx/button.h"
#include "wx/checkbox.h"
#include "wx/listbox.h"
#include "wx/radiobut.h"
#include "wx/scrolbar.h"
#include "wx/scrolwin.h"
#include "wx/statbox.h"
@@ -109,6 +110,7 @@ protected:
// event handlers
void OnButton(wxCommandEvent& event);
void OnCheckBox(wxCommandEvent& event);
void OnRadioBox(wxCommandEvent& event);
void OnListBox(wxCommandEvent& event);
void OnLeftUp(wxMouseEvent& event);
@@ -150,6 +152,7 @@ WX_USE_THEME(gtk);
BEGIN_EVENT_TABLE(MyUnivFrame, wxFrame)
EVT_BUTTON(-1, MyUnivFrame::OnButton)
EVT_CHECKBOX(-1, MyUnivFrame::OnCheckBox)
EVT_RADIOBUTTON(-1, MyUnivFrame::OnRadioBox)
EVT_LISTBOX(-1, MyUnivFrame::OnListBox)
EVT_LEFT_UP(MyUnivFrame::OnLeftUp)
@@ -340,6 +343,8 @@ MyUnivFrame::MyUnivFrame(const wxString& title)
new wxCheckBox(this, -1, _T("Don't check me"),
wxPoint(150, 550), wxDefaultSize,
wxALIGN_RIGHT);
new wxRadioButton(this, -1, _T("Toggle me"), wxPoint(10, 600));
new wxRadioButton(this, -1, _T("And then me"), wxPoint(150, 600));
}
void MyUnivFrame::OnButton(wxCommandEvent& event)
@@ -361,6 +366,11 @@ void MyUnivFrame::OnCheckBox(wxCommandEvent& event)
event.IsChecked() ? _T("") : _T("un"));
}
void MyUnivFrame::OnRadioBox(wxCommandEvent& event)
{
wxLogDebug(_T("Radio button selected."));
}
void MyUnivFrame::OnListBox(wxCommandEvent& event)
{
wxLogDebug(_T("Listbox item %d selected."), event.GetInt());