]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_taskbar.i
doc tweaks
[wxWidgets.git] / wxPython / src / _taskbar.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _taskbar.i
3 // Purpose: SWIG interface defs for wxTaskBarIcon
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 2-June-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17
18 %{
19 %}
20
21 //---------------------------------------------------------------------------
22 %newgroup;
23
24
25 %{
26 #ifdef __WXMAC__
27 // implement dummy classes and such for wxMac
28
29 class wxTaskBarIcon : public wxEvtHandler
30 {
31 public:
32 wxTaskBarIcon() { wxPyRaiseNotImplemented(); }
33 };
34
35
36 class wxTaskBarIconEvent : public wxEvent
37 {
38 public:
39 wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *)
40 { wxPyRaiseNotImplemented(); }
41 virtual wxEvent* Clone() const { return NULL; }
42 };
43
44 enum {
45 wxEVT_TASKBAR_MOVE = 0,
46 wxEVT_TASKBAR_LEFT_DOWN = 0,
47 wxEVT_TASKBAR_LEFT_UP = 0,
48 wxEVT_TASKBAR_RIGHT_DOWN = 0,
49 wxEVT_TASKBAR_RIGHT_UP = 0,
50 wxEVT_TASKBAR_LEFT_DCLICK = 0,
51 wxEVT_TASKBAR_RIGHT_DCLICK = 0,
52 };
53 #endif
54 %}
55
56
57
58
59 MustHaveApp(wxTaskBarIcon);
60
61 class wxTaskBarIcon : public wxEvtHandler
62 {
63 public:
64 wxTaskBarIcon();
65 ~wxTaskBarIcon();
66
67 %extend {
68 void Destroy() {
69 #ifndef __WXMAC__
70 self->RemoveIcon();
71 #endif
72 }
73 }
74
75 #ifndef __WXMAC__
76 bool IsOk() const;
77 %pythoncode { def __nonzero__(self): return self.IsOk() }
78
79 bool IsIconInstalled() const;
80
81 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString);
82 bool RemoveIcon(void);
83 bool PopupMenu(wxMenu *menu);
84 #endif
85 };
86
87
88
89 class wxTaskBarIconEvent : public wxEvent
90 {
91 public:
92 wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon);
93 };
94
95
96
97 %constant wxEventType wxEVT_TASKBAR_MOVE;
98 %constant wxEventType wxEVT_TASKBAR_LEFT_DOWN;
99 %constant wxEventType wxEVT_TASKBAR_LEFT_UP;
100 %constant wxEventType wxEVT_TASKBAR_RIGHT_DOWN;
101 %constant wxEventType wxEVT_TASKBAR_RIGHT_UP;
102 %constant wxEventType wxEVT_TASKBAR_LEFT_DCLICK;
103 %constant wxEventType wxEVT_TASKBAR_RIGHT_DCLICK;
104
105
106 %pythoncode {
107 EVT_TASKBAR_MOVE = wx.PyEventBinder ( wxEVT_TASKBAR_MOVE )
108 EVT_TASKBAR_LEFT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DOWN )
109 EVT_TASKBAR_LEFT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_UP )
110 EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN )
111 EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP )
112 EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK )
113 EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
114 }
115
116 //---------------------------------------------------------------------------