1
/////////////////////////////////////////////////////////////////////////////
3
// Purpose: SWIG interface defs for wxPopupWindow and derived classes
7
// Created: 22-Dec-1998
8
// RCS-ID: $Id: _popupwin.i 52876 2008-03-27 21:35:38Z RD $
9
// Copyright: (c) 2003 by Total Control Software
10
// Licence: wxWindows license
11
/////////////////////////////////////////////////////////////////////////////
16
//---------------------------------------------------------------------------
19
#include <wx/popupwin.h>
22
//---------------------------------------------------------------------------
25
MustHaveApp(wxPopupWindow);
27
// wxPopupWindow: a special kind of top level window used for popup menus,
28
// combobox popups and such.
29
MustHaveApp(wxPopupWindow);
31
class wxPopupWindow : public wxWindow {
33
%pythonAppend wxPopupWindow "self._setOORInfo(self)"
34
%pythonAppend wxPopupWindow() ""
36
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE);
37
%RenameCtor(PrePopupWindow, wxPopupWindow());
39
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
41
// move the popup window to the right position, i.e. such that it is
44
// the popup is positioned at ptOrigin + size if it opens below and to the
45
// right (default), at ptOrigin - sizePopup if it opens above and to the
48
// the point must be given in screen coordinates!
49
void Position(const wxPoint& ptOrigin,
54
//---------------------------------------------------------------------------
58
class wxPyPopupTransientWindow : public wxPopupTransientWindow
61
wxPyPopupTransientWindow() : wxPopupTransientWindow() {}
62
wxPyPopupTransientWindow(wxWindow* parent, int style = wxBORDER_NONE)
63
: wxPopupTransientWindow(parent, style) {}
65
DEC_PYCALLBACK_BOOL_ME(ProcessLeftDown);
66
DEC_PYCALLBACK__(OnDismiss);
67
DEC_PYCALLBACK_BOOL_(CanDismiss);
72
IMP_PYCALLBACK_BOOL_ME(wxPyPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown);
73
IMP_PYCALLBACK__(wxPyPopupTransientWindow, wxPopupTransientWindow, OnDismiss);
74
IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismiss);
78
MustHaveApp(wxPyPopupTransientWindow);
80
// wxPopupTransientWindow: a wxPopupWindow which disappears automatically
81
// when the user clicks mouse outside it or if it loses focus in any other way
83
%rename(PopupTransientWindow) wxPyPopupTransientWindow;
84
class wxPyPopupTransientWindow : public wxPopupWindow
87
%pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);" setCallbackInfo(PopupTransientWindow)
88
%pythonAppend wxPyPopupTransientWindow() ""
90
wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE);
91
%RenameCtor(PrePopupTransientWindow, wxPyPopupTransientWindow());
93
void _setCallbackInfo(PyObject* self, PyObject* _class);
95
// popup the window (this will show it too) and keep focus at winFocus
96
// (or itself if it's NULL), dismiss the popup if we lose focus
97
virtual void Popup(wxWindow *focus = NULL);
100
virtual void Dismiss();
102
virtual bool CanDismiss();
103
virtual bool ProcessLeftDown(wxMouseEvent& event);
107
//---------------------------------------------------------------------------