]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/windows.i
6e95e8e5abf60e6e04ed8de17b1dcffdc3ab016a
[wxWidgets.git] / wxPython / src / windows.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: windows.i
3 // Purpose: SWIG definitions of various window classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 6/24/97
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13
14 %module windows
15
16 %{
17 #include "helpers.h"
18 #include <wx/menuitem.h>
19 %}
20
21 //----------------------------------------------------------------------
22
23 %include typemaps.i
24 %include my_typemaps.i
25
26 // Import some definitions of other classes, etc.
27 %import _defs.i
28 %import misc.i
29 %import gdi.i
30 %import clip_dnd.i
31
32 %pragma(python) code = "import wx"
33
34 //---------------------------------------------------------------------------
35
36 class wxEvtHandler {
37 public:
38 bool ProcessEvent(wxEvent& event);
39 void AddPendingEvent(wxEvent& event);
40 //bool SearchEventTable(wxEventTable& table, wxEvent& event);
41
42 bool GetEvtHandlerEnabled();
43 void SetEvtHandlerEnabled(bool enabled);
44
45 wxEvtHandler* GetNextHandler();
46 wxEvtHandler* GetPreviousHandler();
47 void SetNextHandler(wxEvtHandler* handler);
48 void SetPreviousHandler(wxEvtHandler* handler);
49
50
51 %addmethods {
52 void Connect( int id, int lastId, int eventType, PyObject* func) {
53 if (PyCallable_Check(func)) {
54 self->Connect(id, lastId, eventType,
55 (wxObjectEventFunction) &wxPyCallback::EventThunker,
56 new wxPyCallback(func));
57 }
58 }
59
60 bool Disconnect(int id, int lastId = -1,
61 wxEventType eventType = wxEVT_NULL) {
62 return self->Disconnect(id, lastId, eventType,
63 (wxObjectEventFunction)
64 &wxPyCallback::EventThunker);
65 }
66
67 }
68
69 %pragma(python) addtoclass = "
70 _prop_list_ = {}
71 "
72
73 // %pragma(python) addtoclass = "
74 // def __getattr__(self, name):
75 // pl = self._prop_list_
76 // if pl.has_key(name):
77 // getFunc, setFunc = pl[name]
78 // if getFunc:
79 // return getattr(self, getFunc)()
80 // else:
81 // raise TypeError, '%s property is write-only' % name
82 // raise AttributeError, name
83
84 // def __setattr__(self, name, value):
85 // pl = self._prop_list_
86 // if pl.has_key(name):
87 // getFunc, setFunc = pl[name]
88 // if setFunc:
89 // return getattr(self, setFunc)(value)
90 // else:
91 // raise TypeError, '%s property is read-only' % name
92 // self.__dict__[name] = value
93 // "
94 };
95
96
97 //----------------------------------------------------------------------
98
99 class wxValidator : public wxEvtHandler {
100 public:
101 wxValidator();
102 //~wxValidator();
103
104 wxValidator* Clone();
105 wxWindow* GetWindow();
106 void SetWindow(wxWindow* window);
107
108 // Properties list
109 %pragma(python) addtoclass = "
110 _prop_list_ = {
111 'window' : ('GetWindow', 'SetWindow'),
112 }
113 _prop_list_.update(wxEvtHandler._prop_list_)
114 "
115 };
116
117 %inline %{
118 bool wxValidator_IsSilent() {
119 return wxValidator::IsSilent();
120 }
121
122 void wxValidator_SetBellOnError(int doIt = TRUE) {
123 wxValidator::SetBellOnError(doIt);
124 }
125 %}
126
127 //----------------------------------------------------------------------
128 %{
129 class wxPyValidator : public wxValidator {
130 DECLARE_DYNAMIC_CLASS(wxPyValidator);
131 public:
132 wxPyValidator() {
133 }
134 // wxPyValidator(const wxPyValidator& other);
135
136 ~wxPyValidator() {
137 }
138
139 wxObject* wxPyValidator::Clone() const {
140 wxPyValidator* ptr = NULL;
141 wxPyValidator* self = (wxPyValidator*)this;
142
143 bool doSave = wxPyRestoreThread();
144 if (self->m_myInst.findCallback("Clone")) {
145 PyObject* ro;
146 ro = self->m_myInst.callCallbackObj(Py_BuildValue("()"));
147 if (ro) {
148 SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p");
149 Py_DECREF(ro);
150 }
151 }
152 // This is very dangerous!!! But is the only way I could find
153 // to squash a memory leak. Currently it is okay, but if the
154 // validator architecture in wxWindows ever changes, problems
155 // could arise.
156 delete self;
157
158 wxPySaveThread(doSave);
159 return ptr;
160 }
161
162 DEC_PYCALLBACK_BOOL_WXWIN(Validate);
163 DEC_PYCALLBACK_BOOL_(TransferToWindow);
164 DEC_PYCALLBACK_BOOL_(TransferFromWindow);
165
166 PYPRIVATE;
167 // PyObject* m_data;
168 };
169
170 IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate);
171 IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferToWindow);
172 IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow);
173
174 IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator);
175
176 %}
177
178 class wxPyValidator : public wxValidator {
179 public:
180 wxPyValidator();
181 // ~wxPyValidator();
182
183 %addmethods { void Destroy() { delete self; } }
184
185 void _setSelf(PyObject* self, PyObject* _class, int incref=TRUE);
186 %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPyValidator, 0)"
187
188 };
189
190 //----------------------------------------------------------------------
191
192 %apply int * INOUT { int* x, int* y };
193
194 class wxWindow : public wxEvtHandler {
195 public:
196
197 wxWindow(wxWindow* parent, const wxWindowID id,
198 const wxPoint& pos = wxPyDefaultPosition,
199 const wxSize& size = wxPyDefaultSize,
200 long style = 0,
201 char* name = "panel");
202
203 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
204
205 void CaptureMouse();
206 void Center(int direction = wxBOTH);
207 void Centre(int direction = wxBOTH);
208 void CentreOnParent(int direction = wxBOTH );
209 void CenterOnParent(int direction = wxBOTH );
210 void CentreOnScreen(int direction = wxBOTH );
211 void CenterOnScreen(int direction = wxBOTH );
212
213 // (uses apply'ed INOUT typemap, see above)
214 %name(ClientToScreenXY)void ClientToScreen(int* x, int* y);
215 wxPoint ClientToScreen(const wxPoint& pt);
216
217 bool Close(int force = FALSE);
218 bool Destroy();
219 void DestroyChildren();
220 #ifdef __WXMSW__
221 void DragAcceptFiles(bool accept);
222 #endif
223 void Enable(bool enable);
224 //bool FakePopupMenu(wxMenu* menu, int x, int y);
225 %name(FindWindowById) wxWindow* FindWindow(long id);
226 %name(FindWindowByName) wxWindow* FindWindow(const wxString& name);
227 void Fit();
228 wxColour GetBackgroundColour();
229
230 //wxList& GetChildren();
231 %addmethods {
232 PyObject* GetChildren() {
233 wxWindowList& list = self->GetChildren();
234 return wxPy_ConvertList(&list, "wxWindow");
235 }
236 }
237
238 int GetCharHeight();
239 int GetCharWidth();
240 %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
241 wxSize GetClientSize();
242 wxLayoutConstraints * GetConstraints();
243 wxEvtHandler* GetEventHandler();
244
245 wxFont& GetFont();
246 wxColour GetForegroundColour();
247 wxWindow * GetGrandParent();
248 %addmethods {
249 long GetHandle() {
250 return wxPyGetWinHandle(self); //(long)self->GetHandle();
251 }
252 }
253 int GetId();
254 wxString GetLabel();
255 void SetLabel(const wxString& label);
256 wxString GetName();
257 wxWindow * GetParent();
258 %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
259 wxPoint GetPosition();
260 wxRect GetRect();
261 int GetScrollThumb(int orientation);
262 int GetScrollPos(int orientation);
263 int GetScrollRange(int orientation);
264 %name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT);
265 wxSize GetSize();
266 void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT);
267 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
268 int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
269 const wxFont* font = NULL); //, bool use16 = FALSE)
270 wxString GetTitle();
271 wxRegion GetUpdateRegion();
272 long GetWindowStyleFlag();
273 void SetWindowStyleFlag(long style);
274 void SetWindowStyle(long style);
275 bool Hide();
276 void InitDialog();
277 bool IsEnabled();
278 bool IsExposed( int x, int y, int w=0, int h=0 );
279 %name(IsExposedPoint) bool IsExposed( const wxPoint& pt );
280 %name(IsExposedRect) bool IsExposed( const wxRect& rect );
281 bool IsRetained();
282 bool IsShown();
283 bool IsTopLevel();
284 void Layout();
285 bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
286 void Lower();
287 void MakeModal(bool flag);
288 %name(MoveXY)void Move(int x, int y);
289 void Move(const wxPoint& point);
290
291 wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
292 void PushEventHandler(wxEvtHandler* handler);
293
294 %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
295 bool PopupMenu(wxMenu *menu, const wxPoint& pos);
296
297 void Raise();
298 void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
299 void ReleaseMouse();
300 void RemoveChild(wxWindow* child);
301 bool Reparent( wxWindow* newParent );
302
303 // (uses apply'ed INOUT typemap, see above)
304 %name(ScreenToClientXY)void ScreenToClient(int *x, int *y);
305 wxPoint ScreenToClient(const wxPoint& pt);
306
307 void ScrollWindow(int dx, int dy, const wxRect* rect = NULL);
308 void SetAcceleratorTable(const wxAcceleratorTable& accel);
309 void SetAutoLayout(bool autoLayout);
310 bool GetAutoLayout();
311 void SetBackgroundColour(const wxColour& colour);
312 void SetConstraints(wxLayoutConstraints *constraints);
313 void UnsetConstraints(wxLayoutConstraints *constraints);
314 void SetFocus();
315 bool AcceptsFocus();
316 void SetFont(const wxFont& font);
317 void SetForegroundColour(const wxColour& colour);
318 void SetId(int id);
319 void SetName(const wxString& name);
320 void SetScrollbar(int orientation, int position, int thumbSize, int range, int refresh = TRUE);
321 void SetScrollPos(int orientation, int pos, bool refresh = TRUE);
322
323 %name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO);
324 %addmethods {
325 void SetSize(const wxSize& size) {
326 self->SetSize(size);
327 }
328
329 void SetPosition(const wxPoint& pos) {
330 self->Move(pos);
331 }
332 }
333
334 void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1);
335 %name(SetClientSizeWH)void SetClientSize(int width, int height);
336 void SetClientSize(const wxSize& size);
337 //void SetPalette(wxPalette* palette);
338 void SetCursor(const wxCursor&cursor);
339 void SetEventHandler(wxEvtHandler* handler);
340 void SetTitle(const wxString& title);
341 bool Show(bool show);
342 bool TransferDataFromWindow();
343 bool TransferDataToWindow();
344 bool Validate();
345 void WarpPointer(int x, int y);
346
347 %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
348 %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
349
350 %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
351 %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz);
352
353 %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
354 %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz);
355
356 %name(SetToolTipString)void SetToolTip(const wxString &tip);
357 void SetToolTip(wxToolTip *tooltip);
358 wxToolTip* GetToolTip();
359
360 void SetSizer(wxSizer* sizer);
361 wxSizer* GetSizer();
362
363 wxValidator* GetValidator();
364 void SetValidator(const wxValidator& validator);
365
366 void SetDropTarget(wxDropTarget* target);
367 wxDropTarget* GetDropTarget();
368 %pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0"
369
370 wxSize GetBestSize();
371
372 void SetCaret(wxCaret *caret);
373 wxCaret *GetCaret();
374 %pragma(python) addtoclass = "# replaces broken shadow method
375 def GetCaret(self, *_args, **_kwargs):
376 from misc2 import wxCaretPtr
377 val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
378 if val: val = wxCaretPtr(val)
379 return val
380 "
381
382
383 // Properties list
384 %pragma(python) addtoclass = "
385 _prop_list_ = {
386 'size' : ('GetSize', 'SetSize'),
387 'enabled' : ('IsEnabled', 'Enable'),
388 'background' : ('GetBackgroundColour', 'SetBackgroundColour'),
389 'foreground' : ('GetForegroundColour', 'SetForegroundColour'),
390 'children' : ('GetChildren', None),
391 'charHeight' : ('GetCharHeight', None),
392 'charWidth' : ('GetCharWidth', None),
393 'clientSize' : ('GetClientSize', 'SetClientSize'),
394 'font' : ('GetFont', 'SetFont'),
395 'grandParent' : ('GetGrandParent', None),
396 'handle' : ('GetHandle', None),
397 'label' : ('GetLabel', 'SetLabel'),
398 'name' : ('GetName', 'SetName'),
399 'parent' : ('GetParent', None),
400 'position' : ('GetPosition', 'SetPosition'),
401 'title' : ('GetTitle', 'SetTitle'),
402 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'),
403 'visible' : ('IsShown', 'Show'),
404 'toolTip' : ('GetToolTip', 'SetToolTip'),
405 'sizer' : ('GetSizer', 'SetSizer'),
406 'validator' : ('GetValidator', 'SetValidator'),
407 'dropTarget' : ('GetDropTarget', 'SetDropTarget'),
408 'caret' : ('GetCaret', 'SetCaret'),
409 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'),
410 'constraints' : ('GetConstraints', 'SetConstraints'),
411
412 }
413 _prop_list_.update(wxEvtHandler._prop_list_)
414 "
415 };
416
417 //%clear int* x, int* y;
418
419
420
421 %pragma(python) code = "
422 def wxDLG_PNT(win, point_or_x, y=None):
423 if y is None:
424 return win.ConvertDialogPointToPixels(point_or_x)
425 else:
426 return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
427
428 def wxDLG_SZE(win, size_width, height=None):
429 if height is None:
430 return win.ConvertDialogSizeToPixels(size_width)
431 else:
432 return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
433 "
434
435 #ifdef __WXMSW__
436 %inline %{
437 wxWindow* wxWindow_FindFocus() {
438 return wxWindow::FindFocus();
439 }
440 %}
441
442
443 %inline %{
444 wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
445 wxWindow* win = new wxWindow;
446 win->SetHWND(hWnd);
447 win->SubclassWin(hWnd);
448 return win;
449 }
450 %}
451 #endif
452
453 %inline %{
454 int wxWindow_NewControlId() {
455 return wxWindow::NewControlId();
456 }
457 int wxWindow_NextControlId(int id) {
458 return wxWindow::NextControlId(id);
459 }
460 int wxWindow_PrevControlId(int id) {
461 return wxWindow::PrevControlId(id);
462 }
463 %}
464
465
466 //---------------------------------------------------------------------------
467
468 class wxPanel : public wxWindow {
469 public:
470 wxPanel(wxWindow* parent,
471 const wxWindowID id,
472 const wxPoint& pos = wxPyDefaultPosition,
473 const wxSize& size = wxPyDefaultSize,
474 long style = wxTAB_TRAVERSAL,
475 const char* name = "panel");
476
477 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
478
479 void InitDialog();
480 wxButton* GetDefaultItem();
481 void SetDefaultItem(wxButton *btn);
482
483 // fix some SWIG trouble...
484 %pragma(python) addtoclass = "
485 def GetDefaultItem(self):
486 import controls
487 val = windowsc.wxPanel_GetDefaultItem(self.this)
488 val = controls.wxButtonPtr(val)
489 return val
490 "
491 };
492
493 //---------------------------------------------------------------------------
494
495 class wxDialog : public wxPanel {
496 public:
497 wxDialog(wxWindow* parent,
498 const wxWindowID id,
499 const wxString& title,
500 const wxPoint& pos = wxPyDefaultPosition,
501 const wxSize& size = wxPyDefaultSize,
502 long style = wxDEFAULT_DIALOG_STYLE,
503 const char* name = "dialogBox");
504
505 %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
506
507 void Centre(int direction = wxBOTH);
508 void EndModal(int retCode);
509 wxString GetTitle();
510 void Iconize(bool iconize);
511 bool IsIconized();
512 void SetModal(bool flag);
513 bool IsModal();
514 void SetTitle(const wxString& title);
515 bool Show(bool show);
516 int ShowModal();
517
518 int GetReturnCode();
519 void SetReturnCode(int retCode);
520 };
521
522 //---------------------------------------------------------------------------
523
524 class wxScrolledWindow : public wxPanel {
525 public:
526 wxScrolledWindow(wxWindow* parent,
527 const wxWindowID id = -1,
528 const wxPoint& pos = wxPyDefaultPosition,
529 const wxSize& size = wxPyDefaultSize,
530 long style = wxHSCROLL | wxVSCROLL,
531 char* name = "scrolledWindow");
532
533 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
534 %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
535
536 void EnableScrolling(bool xScrolling, bool yScrolling);
537 int GetScrollPageSize(int orient);
538 void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT);
539 wxWindow* GetTargetWindow();
540 void GetVirtualSize(int* OUTPUT, int* OUTPUT);
541 bool IsRetained();
542 void PrepareDC(wxDC& dc);
543 void Scroll(int x, int y);
544 void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
545 int noUnitsX, int noUnitsY,
546 int xPos = 0, int yPos = 0, int noRefresh=FALSE);
547 void SetScrollPageSize(int orient, int pageSize);
548 void SetTargetWindow(wxWindow* window);
549 void GetViewStart(int* OUTPUT, int* OUTPUT);
550 void ViewStart(int* OUTPUT, int* OUTPUT);
551
552 void CalcScrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
553 void CalcUnscrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
554
555 };
556
557 //----------------------------------------------------------------------
558
559
560 class wxMenu : public wxEvtHandler {
561 public:
562 wxMenu(const wxString& title = wxPyEmptyStr, long style = 0);
563
564 void Append(int id, const wxString& item,
565 const wxString& helpString = wxPyEmptyStr,
566 int checkable = FALSE);
567 %name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu,
568 const wxString& helpString = wxPyEmptyStr);
569 %name(AppendItem)void Append(const wxMenuItem* item);
570
571 void AppendSeparator();
572 void Break();
573 void Check(int id, bool flag);
574 bool IsChecked(int id);
575 void Enable(int id, bool enable);
576 bool IsEnabled(int id);
577
578 int FindItem(const wxString& itemString);
579 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
580
581 wxString GetTitle();
582 void SetTitle(const wxString& title);
583
584 wxString GetLabel(int id);
585 void SetLabel(int id, const wxString& label);
586
587 wxString GetHelpString(int id);
588 void SetHelpString(int id, const wxString& helpString);
589 void UpdateUI(wxEvtHandler* source = NULL);
590
591 bool Delete(int id);
592 %name(DeleteItem)bool Delete(wxMenuItem *item);
593 bool Insert(size_t pos, wxMenuItem *item);
594 wxMenuItem *Remove(int id);
595 %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
596
597 %addmethods {
598 void Destroy() { delete self; }
599 }
600 %name(DestroyId)bool Destroy(int id);
601 %name(DestroyItem)bool Destroy(wxMenuItem *item);
602
603 size_t GetMenuItemCount();
604 //wxMenuItemList& GetMenuItems();
605 %addmethods {
606 PyObject* GetMenuItems() {
607 wxMenuItemList& list = self->GetMenuItems();
608 return wxPy_ConvertList(&list, "wxMenuItem");
609 }
610 }
611
612 void SetEventHandler(wxEvtHandler *handler);
613 wxEvtHandler *GetEventHandler();
614
615 void SetInvokingWindow(wxWindow *win);
616 wxWindow *GetInvokingWindow();
617
618 long GetStyle();
619
620 bool IsAttached();
621
622 void SetParent(wxMenu *parent);
623 wxMenu *GetParent();
624 };
625
626
627 //----------------------------------------------------------------------
628
629 class wxMenuBar : public wxWindow {
630 public:
631 wxMenuBar();
632
633 bool Append(wxMenu *menu, const wxString& title);
634 bool Insert(size_t pos, wxMenu *menu, const wxString& title);
635 size_t GetMenuCount();
636 wxMenu *GetMenu(size_t pos);
637 wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
638 wxMenu *Remove(size_t pos);
639 void EnableTop(size_t pos, bool enable);
640 void SetLabelTop(size_t pos, const wxString& label);
641 wxString GetLabelTop(size_t pos);
642 int FindMenuItem(const wxString& menuString, const wxString& itemString);
643 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
644 void Enable(int id, bool enable);
645 void Check(int id, bool check);
646 bool IsChecked(int id);
647 bool IsEnabled(int id);
648
649 void SetLabel(int id, const wxString &label);
650 wxString GetLabel(int id);
651
652 void SetHelpString(int id, const wxString& helpString);
653 wxString GetHelpString(int id);
654
655 };
656
657
658 //----------------------------------------------------------------------
659
660 class wxMenuItem {
661 public:
662 wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_SEPARATOR,
663 const wxString& text = wxPyEmptyStr,
664 const wxString& help = wxPyEmptyStr,
665 bool isCheckable = FALSE, wxMenu* subMenu = NULL);
666
667
668 wxMenu *GetMenu();
669 void SetId(int id);
670 int GetId();
671 bool IsSeparator();
672 void SetText(const wxString& str);
673 wxString GetLabel();
674 const wxString& GetText();
675 void SetCheckable(bool checkable);
676 bool IsCheckable();
677 bool IsSubMenu();
678 void SetSubMenu(wxMenu *menu);
679 wxMenu *GetSubMenu();
680 void Enable(bool enable = TRUE);
681 bool IsEnabled();
682 void Check(bool check = TRUE);
683 bool IsChecked();
684 void Toggle();
685 void SetHelp(const wxString& str);
686 const wxString& GetHelp();
687 wxAcceleratorEntry *GetAccel();
688 void SetAccel(wxAcceleratorEntry *accel);
689
690 };
691
692 //---------------------------------------------------------------------------
693
694
695