- Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
- Removed wxImageList *GetImageList(int) const.
+wxWinCE:
+
+- Pressing build-in joystick on WinCE phones fires wxEVT_JOY_BUTTON_DOWN event.
+
Unix:
- NO_GCC_PRAGMA is not used any more, remove checks for it if you used it.
- utils/wxprop classes working (except maybe wxPropertyFormView)
in preparation for use in Dialog Editor.
- GNU-WIN32 compilation verified (a month or so ago).
-
-
// implementation from now on
void OnOK(wxCommandEvent& event);
+#ifndef __SMARTPHONE__
void OnListBoxDClick(wxCommandEvent& event);
+#endif
+#ifdef __WXWINCE__
+ void OnJoystickButtonDown(wxJoystickEvent& event);
+#endif
protected:
int m_selection;
wxString m_stringSelection;
+ void DoChoice();
+
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSingleChoiceDialog)
DECLARE_EVENT_TABLE()
int height = wxCHOICE_HEIGHT);
#endif // __CHOICEDLGH_G__
-
/////////////////////////////////////////////////////////////////////////////
-// Name: choicdgg.cpp
+// Name: src/generic/choicdgg.cpp
// Purpose: Choice dialogs
// Author: Julian Smart
// Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions
BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
+#ifndef __SMARTPHONE__
EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick)
+#endif
+#ifdef __WXWINCE__
+ EVT_JOY_BUTTON_DOWN(wxSingleChoiceDialog::OnJoystickButtonDown)
+#endif
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
{
- m_selection = m_listbox->GetSelection();
- m_stringSelection = m_listbox->GetStringSelection();
- if ( m_listbox->HasClientUntypedData() )
- SetClientData(m_listbox->GetClientData(m_selection));
- EndModal(wxID_OK);
+ DoChoice();
}
+#ifndef __SMARTPHONE__
void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
+{
+ DoChoice();
+}
+#endif
+
+#ifdef __WXWINCE__
+void wxSingleChoiceDialog::OnJoystickButtonDown(wxJoystickEvent& WXUNUSED(event))
+{
+ DoChoice();
+}
+#endif
+
+void wxSingleChoiceDialog::DoChoice()
{
m_selection = m_listbox->GetSelection();
m_stringSelection = m_listbox->GetStringSelection();
else // no default button
#endif // wxUSE_BUTTON
{
+#ifdef __WXWINCE__
+ wxJoystickEvent event(wxEVT_JOY_BUTTON_DOWN);
+ event.SetEventObject(this);
+ if(GetEventHandler()->ProcessEvent(event))
+ return true;
+#endif
// this is a quick and dirty test for a text
// control
if ( !(lDlgCode & DLGC_HASSETSEL) )
event.Skip();
}
#endif
-