Pressing build-in joystick on WinCE phones fires wxEVT_JOY_BUTTON_DOWN event.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,10 @@ wxMSW:
|
||||
- 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.
|
||||
@@ -2526,5 +2530,3 @@ At this point, the following has been achieved:
|
||||
- utils/wxprop classes working (except maybe wxPropertyFormView)
|
||||
in preparation for use in Dialog Editor.
|
||||
- GNU-WIN32 compilation verified (a month or so ago).
|
||||
|
||||
|
||||
|
@@ -138,12 +138,19 @@ public:
|
||||
|
||||
// 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()
|
||||
@@ -301,4 +308,3 @@ WXDLLEXPORT size_t wxGetMultipleChoices(wxArrayInt& selections,
|
||||
int height = wxCHOICE_HEIGHT);
|
||||
|
||||
#endif // __CHOICEDLGH_G__
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -332,7 +332,12 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
|
||||
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)
|
||||
@@ -407,14 +412,24 @@ void wxSingleChoiceDialog::SetSelection(int sel)
|
||||
|
||||
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();
|
||||
|
@@ -2064,6 +2064,12 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
||||
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) )
|
||||
@@ -6202,4 +6208,3 @@ void wxWindowMSW::OnInitDialog( wxInitDialogEvent& event )
|
||||
event.Skip();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user