added wxWindow::GetPopupMenuSelectionFromUser() (modified patch 1793823)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -988,10 +988,19 @@ public:
|
||||
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// show popup menu at the given position, generate events for the items
|
||||
// selected in it
|
||||
bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition)
|
||||
{ return DoPopupMenu(menu, pos.x, pos.y); }
|
||||
bool PopupMenu(wxMenu *menu, int x, int y)
|
||||
{ return DoPopupMenu(menu, x, y); }
|
||||
|
||||
// simply return the id of the selected item or wxID_NONE without
|
||||
// generating any events
|
||||
int GetPopupMenuSelectionFromUser(wxMenu& menu, const wxPoint& pos)
|
||||
{ return DoGetPopupMenuSelectionFromUser(menu, pos.x, pos.y); }
|
||||
int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
|
||||
{ return DoGetPopupMenuSelectionFromUser(menu, x, y); }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// override this method to return true for controls having multiple pages
|
||||
@@ -1497,6 +1506,13 @@ private:
|
||||
// enabled/disabled
|
||||
void NotifyWindowOnEnableChange(bool enabled);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
// temporary event handler used by GetPopupMenuSelectionFromUser()
|
||||
void InternalOnPopupMenu(wxCommandEvent& event);
|
||||
|
||||
// implementation of the public GetPopupMenuSelectionFromUser() method
|
||||
int DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// contains the last id generated by NewControlId
|
||||
static int ms_lastControlId;
|
||||
|
Reference in New Issue
Block a user