]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/windows.i
An attempt at make the wxCSConv class useful. Uses iconv under Unix,
[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
211 // (uses apply'ed INOUT typemap, see above)
212 %name(ClientToScreenXY)void ClientToScreen(int* x, int* y);
213 wxPoint ClientToScreen(const wxPoint& pt);
214
215 bool Close(int force = FALSE);
216 bool Destroy();
217 void DestroyChildren();
218 #ifdef __WXMSW__
219 void DragAcceptFiles(bool accept);
220 #endif
221 void Enable(bool enable);
222 //bool FakePopupMenu(wxMenu* menu, int x, int y);
223 %name(FindWindowById) wxWindow* FindWindow(long id);
224 %name(FindWindowByName) wxWindow* FindWindow(const wxString& name);
225 void Fit();
226 wxColour GetBackgroundColour();
227
228 //wxList& GetChildren();
229 %addmethods {
230 PyObject* GetChildren() {
231 wxWindowList& list = self->GetChildren();
232 return wxPy_ConvertList(&list, "wxWindow");
233 }
234 }
235
236 int GetCharHeight();
237 int GetCharWidth();
238 %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
239 wxSize GetClientSize();
240 wxLayoutConstraints * GetConstraints();
241 wxEvtHandler* GetEventHandler();
242
243 wxFont& GetFont();
244 wxColour GetForegroundColour();
245 wxWindow * GetGrandParent();
246 %addmethods {
247 long GetHandle() {
248 return wxPyGetWinHandle(self); //(long)self->GetHandle();
249 }
250 }
251 int GetId();
252 wxString GetLabel();
253 void SetLabel(const wxString& label);
254 wxString GetName();
255 wxWindow * GetParent();
256 %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
257 wxPoint GetPosition();
258 wxRect GetRect();
259 int GetScrollThumb(int orientation);
260 int GetScrollPos(int orientation);
261 int GetScrollRange(int orientation);
262 %name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT);
263 wxSize GetSize();
264 void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT);
265 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
266 int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
267 const wxFont* font = NULL); //, bool use16 = FALSE)
268 wxString GetTitle();
269 wxRegion GetUpdateRegion();
270 long GetWindowStyleFlag();
271 void SetWindowStyleFlag(long style);
272 void SetWindowStyle(long style);
273 bool Hide();
274 void InitDialog();
275 bool IsEnabled();
276 bool IsExposed( int x, int y, int w=0, int h=0 );
277 %name(IsExposedPoint) bool IsExposed( const wxPoint& pt );
278 %name(IsExposedRect) bool IsExposed( const wxRect& rect );
279 bool IsRetained();
280 bool IsShown();
281 bool IsTopLevel();
282 void Layout();
283 bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
284 void Lower();
285 void MakeModal(bool flag);
286 %name(MoveXY)void Move(int x, int y);
287 void Move(const wxPoint& point);
288
289 wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
290 void PushEventHandler(wxEvtHandler* handler);
291
292 %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
293 bool PopupMenu(wxMenu *menu, const wxPoint& pos);
294
295 void Raise();
296 void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
297 void ReleaseMouse();
298 void RemoveChild(wxWindow* child);
299 bool Reparent( wxWindow* newParent );
300
301 // (uses apply'ed INOUT typemap, see above)
302 %name(ScreenToClientXY)void ScreenToClient(int *x, int *y);
303 wxPoint ScreenToClient(const wxPoint& pt);
304
305 void ScrollWindow(int dx, int dy, const wxRect* rect = NULL);
306 void SetAcceleratorTable(const wxAcceleratorTable& accel);
307 void SetAutoLayout(bool autoLayout);
308 bool GetAutoLayout();
309 void SetBackgroundColour(const wxColour& colour);
310 void SetConstraints(wxLayoutConstraints *constraints);
311 void UnsetConstraints(wxLayoutConstraints *constraints);
312 void SetFocus();
313 bool AcceptsFocus();
314 void SetFont(const wxFont& font);
315 void SetForegroundColour(const wxColour& colour);
316 void SetId(int id);
317 void SetName(const wxString& name);
318 void SetScrollbar(int orientation, int position, int thumbSize, int range, int refresh = TRUE);
319 void SetScrollPos(int orientation, int pos, bool refresh = TRUE);
320
321 %name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO);
322 %addmethods {
323 void SetSize(const wxSize& size) {
324 self->SetSize(size);
325 }
326
327 void SetPosition(const wxPoint& pos) {
328 self->Move(pos);
329 }
330 }
331
332 void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1);
333 %name(SetClientSizeWH)void SetClientSize(int width, int height);
334 void SetClientSize(const wxSize& size);
335 //void SetPalette(wxPalette* palette);
336 void SetCursor(const wxCursor&cursor);
337 void SetEventHandler(wxEvtHandler* handler);
338 void SetTitle(const wxString& title);
339 bool Show(bool show);
340 bool TransferDataFromWindow();
341 bool TransferDataToWindow();
342 bool Validate();
343 void WarpPointer(int x, int y);
344
345 %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
346 %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
347
348 %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
349 %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz);
350
351 %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
352 %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz);
353
354 %name(SetToolTipString)void SetToolTip(const wxString &tip);
355 void SetToolTip(wxToolTip *tooltip);
356 wxToolTip* GetToolTip();
357
358 void SetSizer(wxSizer* sizer);
359 wxSizer* GetSizer();
360
361 wxValidator* GetValidator();
362 void SetValidator(const wxValidator& validator);
363
364 void SetDropTarget(wxDropTarget* target);
365 wxDropTarget* GetDropTarget();
366 %pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0"
367
368 wxSize GetBestSize();
369
370 void SetCaret(wxCaret *caret);
371 wxCaret *GetCaret();
372 %pragma(python) addtoclass = "# replaces broken shadow method
373 def GetCaret(self, *_args, **_kwargs):
374 from misc2 import wxCaretPtr
375 val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
376 if val: val = wxCaretPtr(val)
377 return val
378 "
379
380
381 // Properties list
382 %pragma(python) addtoclass = "
383 _prop_list_ = {
384 'size' : ('GetSize', 'SetSize'),
385 'enabled' : ('IsEnabled', 'Enable'),
386 'background' : ('GetBackgroundColour', 'SetBackgroundColour'),
387 'foreground' : ('GetForegroundColour', 'SetForegroundColour'),
388 'children' : ('GetChildren', None),
389 'charHeight' : ('GetCharHeight', None),
390 'charWidth' : ('GetCharWidth', None),
391 'clientSize' : ('GetClientSize', 'SetClientSize'),
392 'font' : ('GetFont', 'SetFont'),
393 'grandParent' : ('GetGrandParent', None),
394 'handle' : ('GetHandle', None),
395 'label' : ('GetLabel', 'SetLabel'),
396 'name' : ('GetName', 'SetName'),
397 'parent' : ('GetParent', None),
398 'position' : ('GetPosition', 'SetPosition'),
399 'title' : ('GetTitle', 'SetTitle'),
400 'style' : ('GetWindowStyleFlag', 'SetWindowStyleFlag'),
401 'visible' : ('IsShown', 'Show'),
402 'toolTip' : ('GetToolTip', 'SetToolTip'),
403 'sizer' : ('GetSizer', 'SetSizer'),
404 'validator' : ('GetValidator', 'SetValidator'),
405 'dropTarget' : ('GetDropTarget', 'SetDropTarget'),
406 'caret' : ('GetCaret', 'SetCaret'),
407 'autoLayout' : ('GetAutoLayout', 'SetAutoLayout'),
408 'constraints' : ('GetConstraints', 'SetConstraints'),
409
410 }
411 _prop_list_.update(wxEvtHandler._prop_list_)
412 "
413 };
414
415 //%clear int* x, int* y;
416
417
418
419 %pragma(python) code = "
420 def wxDLG_PNT(win, point_or_x, y=None):
421 if y is None:
422 return win.ConvertDialogPointToPixels(point_or_x)
423 else:
424 return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
425
426 def wxDLG_SZE(win, size_width, height=None):
427 if height is None:
428 return win.ConvertDialogSizeToPixels(size_width)
429 else:
430 return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
431 "
432
433 #ifdef __WXMSW__
434 %inline %{
435 wxWindow* wxWindow_FindFocus() {
436 return wxWindow::FindFocus();
437 }
438 %}
439
440
441 %inline %{
442 wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
443 wxWindow* win = new wxWindow;
444 win->SetHWND(hWnd);
445 win->SubclassWin(hWnd);
446 return win;
447 }
448 %}
449 #endif
450
451 %inline %{
452 int wxWindow_NewControlId() {
453 return wxWindow::NewControlId();
454 }
455 int wxWindow_NextControlId(int id) {
456 return wxWindow::NextControlId(id);
457 }
458 int wxWindow_PrevControlId(int id) {
459 return wxWindow::PrevControlId(id);
460 }
461 %}
462
463
464 //---------------------------------------------------------------------------
465
466 class wxPanel : public wxWindow {
467 public:
468 wxPanel(wxWindow* parent,
469 const wxWindowID id,
470 const wxPoint& pos = wxPyDefaultPosition,
471 const wxSize& size = wxPyDefaultSize,
472 long style = wxTAB_TRAVERSAL,
473 const char* name = "panel");
474
475 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
476
477 void InitDialog();
478 wxButton* GetDefaultItem();
479 void SetDefaultItem(wxButton *btn);
480
481 // fix some SWIG trouble...
482 %pragma(python) addtoclass = "
483 def GetDefaultItem(self):
484 import controls
485 val = windowsc.wxPanel_GetDefaultItem(self.this)
486 val = controls.wxButtonPtr(val)
487 return val
488 "
489 };
490
491 //---------------------------------------------------------------------------
492
493 class wxDialog : public wxPanel {
494 public:
495 wxDialog(wxWindow* parent,
496 const wxWindowID id,
497 const wxString& title,
498 const wxPoint& pos = wxPyDefaultPosition,
499 const wxSize& size = wxPyDefaultSize,
500 long style = wxDEFAULT_DIALOG_STYLE,
501 const char* name = "dialogBox");
502
503 %pragma(python) addtomethod = "__init__:#wx._StdDialogCallbacks(self)"
504
505 void Centre(int direction = wxBOTH);
506 void EndModal(int retCode);
507 wxString GetTitle();
508 void Iconize(bool iconize);
509 bool IsIconized();
510 void SetModal(bool flag);
511 bool IsModal();
512 void SetTitle(const wxString& title);
513 bool Show(bool show);
514 int ShowModal();
515
516 int GetReturnCode();
517 void SetReturnCode(int retCode);
518 };
519
520 //---------------------------------------------------------------------------
521
522 class wxScrolledWindow : public wxPanel {
523 public:
524 wxScrolledWindow(wxWindow* parent,
525 const wxWindowID id = -1,
526 const wxPoint& pos = wxPyDefaultPosition,
527 const wxSize& size = wxPyDefaultSize,
528 long style = wxHSCROLL | wxVSCROLL,
529 char* name = "scrolledWindow");
530
531 %pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
532 %pragma(python) addtomethod = "__init__:#wx._StdOnScrollCallbacks(self)"
533
534 void EnableScrolling(bool xScrolling, bool yScrolling);
535 int GetScrollPageSize(int orient);
536 void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT);
537 wxWindow* GetTargetWindow();
538 void GetVirtualSize(int* OUTPUT, int* OUTPUT);
539 bool IsRetained();
540 void PrepareDC(wxDC& dc);
541 void Scroll(int x, int y);
542 void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
543 int noUnitsX, int noUnitsY,
544 int xPos = 0, int yPos = 0, int noRefresh=FALSE);
545 void SetScrollPageSize(int orient, int pageSize);
546 void SetTargetWindow(wxWindow* window);
547 void GetViewStart(int* OUTPUT, int* OUTPUT);
548 void ViewStart(int* OUTPUT, int* OUTPUT);
549
550 void CalcScrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
551 void CalcUnscrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
552
553 };
554
555 //----------------------------------------------------------------------
556
557
558 class wxMenu : public wxEvtHandler {
559 public:
560 wxMenu(const wxString& title = wxPyEmptyStr, long style = 0);
561
562 void Append(int id, const wxString& item,
563 const wxString& helpString = wxPyEmptyStr,
564 int checkable = FALSE);
565 %name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu,
566 const wxString& helpString = wxPyEmptyStr);
567 %name(AppendItem)void Append(const wxMenuItem* item);
568
569 void AppendSeparator();
570 void Break();
571 void Check(int id, bool flag);
572 bool IsChecked(int id);
573 void Enable(int id, bool enable);
574 bool IsEnabled(int id);
575
576 int FindItem(const wxString& itemString);
577 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
578
579 wxString GetTitle();
580 void SetTitle(const wxString& title);
581
582 wxString GetLabel(int id);
583 void SetLabel(int id, const wxString& label);
584
585 wxString GetHelpString(int id);
586 void SetHelpString(int id, const wxString& helpString);
587 void UpdateUI(wxEvtHandler* source = NULL);
588
589 bool Delete(int id);
590 %name(DeleteItem)bool Delete(wxMenuItem *item);
591 bool Insert(size_t pos, wxMenuItem *item);
592 wxMenuItem *Remove(int id);
593 %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
594
595 %addmethods {
596 void Destroy() { delete self; }
597 }
598 %name(DestroyId)bool Destroy(int id);
599 %name(DestroyItem)bool Destroy(wxMenuItem *item);
600
601 size_t GetMenuItemCount();
602 //wxMenuItemList& GetMenuItems();
603 %addmethods {
604 PyObject* GetMenuItems() {
605 wxMenuItemList& list = self->GetMenuItems();
606 return wxPy_ConvertList(&list, "wxMenuItem");
607 }
608 }
609
610 void SetEventHandler(wxEvtHandler *handler);
611 wxEvtHandler *GetEventHandler();
612
613 void SetInvokingWindow(wxWindow *win);
614 wxWindow *GetInvokingWindow();
615
616 long GetStyle();
617
618 bool IsAttached();
619
620 void SetParent(wxMenu *parent);
621 wxMenu *GetParent();
622 };
623
624
625 //----------------------------------------------------------------------
626
627 class wxMenuBar : public wxWindow {
628 public:
629 wxMenuBar();
630
631 bool Append(wxMenu *menu, const wxString& title);
632 bool Insert(size_t pos, wxMenu *menu, const wxString& title);
633 size_t GetMenuCount();
634 wxMenu *GetMenu(size_t pos);
635 wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
636 wxMenu *Remove(size_t pos);
637 void EnableTop(size_t pos, bool enable);
638 void SetLabelTop(size_t pos, const wxString& label);
639 wxString GetLabelTop(size_t pos);
640 int FindMenuItem(const wxString& menuString, const wxString& itemString);
641 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
642 void Enable(int id, bool enable);
643 void Check(int id, bool check);
644 bool IsChecked(int id);
645 bool IsEnabled(int id);
646
647 void SetLabel(int id, const wxString &label);
648 wxString GetLabel(int id);
649
650 void SetHelpString(int id, const wxString& helpString);
651 wxString GetHelpString(int id);
652
653 };
654
655
656 //----------------------------------------------------------------------
657
658 class wxMenuItem {
659 public:
660 wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_SEPARATOR,
661 const wxString& text = wxPyEmptyStr,
662 const wxString& help = wxPyEmptyStr,
663 bool isCheckable = FALSE, wxMenu* subMenu = NULL);
664
665
666 wxMenu *GetMenu();
667 void SetId(int id);
668 int GetId();
669 bool IsSeparator();
670 void SetText(const wxString& str);
671 wxString GetLabel();
672 const wxString& GetText();
673 void SetCheckable(bool checkable);
674 bool IsCheckable();
675 bool IsSubMenu();
676 void SetSubMenu(wxMenu *menu);
677 wxMenu *GetSubMenu();
678 void Enable(bool enable = TRUE);
679 bool IsEnabled();
680 void Check(bool check = TRUE);
681 bool IsChecked();
682 void Toggle();
683 void SetHelp(const wxString& str);
684 const wxString& GetHelp();
685 wxAcceleratorEntry *GetAccel();
686 void SetAccel(wxAcceleratorEntry *accel);
687
688 };
689
690 //---------------------------------------------------------------------------
691
692
693