]>
Commit | Line | Data |
---|---|---|
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 | //bool SearchEventTable(wxEventTable& table, wxEvent& event); | |
40 | ||
41 | bool GetEvtHandlerEnabled(); | |
42 | void SetEvtHandlerEnabled(bool enabled); | |
43 | ||
44 | wxEvtHandler* GetNextHandler(); | |
45 | wxEvtHandler* GetPreviousHandler(); | |
46 | void SetNextHandler(wxEvtHandler* handler); | |
47 | void SetPreviousHandler(wxEvtHandler* handler); | |
48 | ||
49 | ||
50 | %addmethods { | |
51 | void Connect( int id, int lastId, int eventType, PyObject* func) { | |
52 | if (PyCallable_Check(func)) { | |
53 | self->Connect(id, lastId, eventType, | |
54 | (wxObjectEventFunction) &wxPyCallback::EventThunker, | |
55 | new wxPyCallback(func)); | |
56 | } | |
57 | } | |
58 | } | |
59 | }; | |
60 | ||
61 | ||
62 | //---------------------------------------------------------------------- | |
63 | ||
64 | class wxValidator : public wxEvtHandler { | |
65 | public: | |
66 | wxValidator(); | |
67 | //~wxValidator(); | |
68 | ||
69 | wxValidator* Clone(); | |
70 | wxWindow* GetWindow(); | |
71 | void SetWindow(wxWindow* window); | |
72 | }; | |
73 | ||
74 | %inline %{ | |
75 | bool wxValidator_IsSilent() { | |
76 | return wxValidator::IsSilent(); | |
77 | } | |
78 | ||
79 | void wxValidator_SetBellOnError(int doIt = TRUE) { | |
80 | wxValidator::SetBellOnError(doIt); | |
81 | } | |
82 | %} | |
83 | ||
84 | //---------------------------------------------------------------------- | |
85 | %{ | |
86 | class wxPyValidator : public wxValidator { | |
87 | DECLARE_DYNAMIC_CLASS(wxPyValidator); | |
88 | public: | |
89 | wxPyValidator() { | |
90 | } | |
91 | // wxPyValidator(const wxPyValidator& other); | |
92 | ||
93 | ~wxPyValidator() { | |
94 | } | |
95 | ||
96 | wxObject* wxPyValidator::Clone() const { | |
97 | wxPyValidator* ptr = NULL; | |
98 | wxPyValidator* self = (wxPyValidator*)this; | |
99 | ||
100 | bool doSave = wxPyRestoreThread(); | |
101 | if (self->m_myInst.findCallback("Clone")) { | |
102 | PyObject* ro; | |
103 | ro = self->m_myInst.callCallbackObj(Py_BuildValue("()")); | |
104 | SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p"); | |
105 | } | |
106 | // This is very dangerous!!! But is the only way I could find | |
107 | // to squash a memory leak. Currently it is okay, but if the | |
108 | // validator architecture in wxWindows ever changes, problems | |
109 | // could arise. | |
110 | delete self; | |
111 | ||
112 | wxPySaveThread(doSave); | |
113 | return ptr; | |
114 | } | |
115 | ||
116 | DEC_PYCALLBACK_BOOL_WXWIN(Validate); | |
117 | DEC_PYCALLBACK_BOOL_(TransferToWindow); | |
118 | DEC_PYCALLBACK_BOOL_(TransferFromWindow); | |
119 | ||
120 | PYPRIVATE; | |
121 | // PyObject* m_data; | |
122 | }; | |
123 | ||
124 | IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate); | |
125 | IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferToWindow); | |
126 | IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); | |
127 | ||
128 | IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); | |
129 | ||
130 | %} | |
131 | ||
132 | class wxPyValidator : public wxValidator { | |
133 | public: | |
134 | wxPyValidator(); | |
135 | // ~wxPyValidator(); | |
136 | ||
137 | %addmethods { | |
138 | void Destroy() { delete self; } | |
139 | } | |
140 | ||
141 | void _setSelf(PyObject* self, int incref=TRUE); | |
142 | %pragma(python) addtomethod = "__init__:self._setSelf(self, 0)" | |
143 | ||
144 | }; | |
145 | ||
146 | //---------------------------------------------------------------------- | |
147 | ||
148 | %apply int * INOUT { int* x, int* y }; | |
149 | ||
150 | class wxWindow : public wxEvtHandler { | |
151 | public: | |
152 | ||
153 | wxWindow(wxWindow* parent, const wxWindowID id, | |
154 | const wxPoint& pos = wxPyDefaultPosition, | |
155 | const wxSize& size = wxPyDefaultSize, | |
156 | long style = 0, | |
157 | char* name = "panel"); | |
158 | ||
159 | %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" | |
160 | ||
161 | void CaptureMouse(); | |
162 | void Center(int direction = wxBOTH); | |
163 | void Centre(int direction = wxBOTH); | |
164 | void CentreOnParent(int direction = wxBOTH ); | |
165 | void CenterOnParent(int direction = wxBOTH ); | |
166 | ||
167 | // (uses apply'ed INOUT typemap, see above) | |
168 | %name(ClientToScreenXY)void ClientToScreen(int* x, int* y); | |
169 | wxPoint ClientToScreen(const wxPoint& pt); | |
170 | ||
171 | bool Close(int force = FALSE); | |
172 | bool Destroy(); | |
173 | void DestroyChildren(); | |
174 | #ifdef __WXMSW__ | |
175 | void DragAcceptFiles(bool accept); | |
176 | #endif | |
177 | void Enable(bool enable); | |
178 | //bool FakePopupMenu(wxMenu* menu, int x, int y); | |
179 | %name(FindWindowById) wxWindow* FindWindow(long id); | |
180 | %name(FindWindowByName) wxWindow* FindWindow(const wxString& name); | |
181 | void Fit(); | |
182 | wxColour GetBackgroundColour(); | |
183 | ||
184 | //wxList& GetChildren(); | |
185 | %addmethods { | |
186 | PyObject* GetChildren() { | |
187 | wxWindowList& list = self->GetChildren(); | |
188 | return wxPy_ConvertList(&list, "wxWindow"); | |
189 | } | |
190 | } | |
191 | ||
192 | int GetCharHeight(); | |
193 | int GetCharWidth(); | |
194 | %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT); | |
195 | wxSize GetClientSize(); | |
196 | wxLayoutConstraints * GetConstraints(); | |
197 | wxEvtHandler* GetEventHandler(); | |
198 | ||
199 | wxFont& GetFont(); | |
200 | wxColour GetForegroundColour(); | |
201 | wxWindow * GetGrandParent(); | |
202 | %addmethods { | |
203 | long GetHandle() { | |
204 | return (long)self->GetHandle(); | |
205 | } | |
206 | } | |
207 | int GetId(); | |
208 | wxString GetLabel(); | |
209 | void SetLabel(const wxString& label); | |
210 | wxString GetName(); | |
211 | wxWindow * GetParent(); | |
212 | %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT); | |
213 | wxPoint GetPosition(); | |
214 | wxRect GetRect(); | |
215 | int GetScrollThumb(int orientation); | |
216 | int GetScrollPos(int orientation); | |
217 | int GetScrollRange(int orientation); | |
218 | %name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT); | |
219 | wxSize GetSize(); | |
220 | void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); | |
221 | %name(GetFullTextExtent)void GetTextExtent(const wxString& string, | |
222 | int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT, | |
223 | const wxFont* font = NULL); //, bool use16 = FALSE) | |
224 | wxString GetTitle(); | |
225 | wxRegion GetUpdateRegion(); | |
226 | long GetWindowStyleFlag(); | |
227 | bool Hide(); | |
228 | void InitDialog(); | |
229 | bool IsEnabled(); | |
230 | bool IsRetained(); | |
231 | bool IsShown(); | |
232 | bool IsTopLevel(); | |
233 | void Layout(); | |
234 | bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL); | |
235 | void Lower(); | |
236 | void MakeModal(bool flag); | |
237 | %name(MoveXY)void Move(int x, int y); | |
238 | void Move(const wxPoint& point); | |
239 | ||
240 | wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE); | |
241 | void PushEventHandler(wxEvtHandler* handler); | |
242 | ||
243 | %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y); | |
244 | bool PopupMenu(wxMenu *menu, const wxPoint& pos); | |
245 | ||
246 | void Raise(); | |
247 | void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL); | |
248 | void ReleaseMouse(); | |
249 | bool Reparent( wxWindow* newParent ); | |
250 | ||
251 | // (uses apply'ed INOUT typemap, see above) | |
252 | %name(ScreenToClientXY)void ScreenToClient(int *x, int *y); | |
253 | wxPoint ScreenToClient(const wxPoint& pt); | |
254 | ||
255 | void ScrollWindow(int dx, int dy, const wxRect* rect = NULL); | |
256 | void SetAcceleratorTable(const wxAcceleratorTable& accel); | |
257 | void SetAutoLayout(bool autoLayout); | |
258 | bool GetAutoLayout(); | |
259 | void SetBackgroundColour(const wxColour& colour); | |
260 | void SetConstraints(wxLayoutConstraints *constraints); | |
261 | void UnsetConstraints(wxLayoutConstraints *constraints); | |
262 | void SetFocus(); | |
263 | bool AcceptsFocus(); | |
264 | void SetFont(const wxFont& font); | |
265 | void SetForegroundColour(const wxColour& colour); | |
266 | void SetId(int id); | |
267 | void SetName(const wxString& name); | |
268 | void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = TRUE); | |
269 | void SetScrollPos(int orientation, int pos, bool refresh = TRUE); | |
270 | ||
271 | %name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO); | |
272 | %addmethods { | |
273 | void SetSize(const wxSize& size) { | |
274 | self->SetSize(size.x, size.y); | |
275 | } | |
276 | ||
277 | void SetPosition(const wxPoint& pos) { | |
278 | self->SetSize(pos.x, pos.y, -1, -1); | |
279 | } | |
280 | } | |
281 | ||
282 | void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1); | |
283 | %name(SetClientSizeWH)void SetClientSize(int width, int height); | |
284 | void SetClientSize(const wxSize& size); | |
285 | //void SetPalette(wxPalette* palette); | |
286 | void SetCursor(const wxCursor&cursor); | |
287 | void SetEventHandler(wxEvtHandler* handler); | |
288 | void SetTitle(const wxString& title); | |
289 | bool Show(bool show); | |
290 | bool TransferDataFromWindow(); | |
291 | bool TransferDataToWindow(); | |
292 | bool Validate(); | |
293 | void WarpPointer(int x, int y); | |
294 | ||
295 | %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt); | |
296 | %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz); | |
297 | ||
298 | %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt); | |
299 | %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz); | |
300 | ||
301 | %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt); | |
302 | %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz); | |
303 | ||
304 | %name(SetToolTipString)void SetToolTip(const wxString &tip); | |
305 | void SetToolTip(wxToolTip *tooltip); | |
306 | wxToolTip* GetToolTip(); | |
307 | ||
308 | void SetSizer(wxSizer* sizer); | |
309 | wxValidator* GetValidator(); | |
310 | void SetValidator(const wxValidator& validator); | |
311 | ||
312 | void SetDropTarget(wxDropTarget* target); | |
313 | wxDropTarget* GetDropTarget(); | |
314 | %pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0" | |
315 | ||
316 | wxSize GetBestSize(); | |
317 | }; | |
318 | ||
319 | //%clear int* x, int* y; | |
320 | ||
321 | ||
322 | ||
323 | %pragma(python) code = " | |
324 | def wxDLG_PNT(win, point_or_x, y=None): | |
325 | if y is None: | |
326 | return win.ConvertDialogPointToPixels(point_or_x) | |
327 | else: | |
328 | return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y)) | |
329 | ||
330 | def wxDLG_SZE(win, size_width, height=None): | |
331 | if height is None: | |
332 | return win.ConvertDialogSizeToPixels(size_width) | |
333 | else: | |
334 | return win.ConvertDialogSizeToPixels(wxSize(size_width, height)) | |
335 | " | |
336 | ||
337 | #ifdef __WXMSW__ | |
338 | %inline %{ | |
339 | wxWindow* wxWindow_FindFocus() { | |
340 | return wxWindow::FindFocus(); | |
341 | } | |
342 | %} | |
343 | ||
344 | ||
345 | %inline %{ | |
346 | wxWindow* wxWindow_FromHWND(unsigned long hWnd) { | |
347 | wxWindow* win = new wxWindow; | |
348 | win->SetHWND(hWnd); | |
349 | win->SubclassWin(hWnd); | |
350 | return win; | |
351 | } | |
352 | %} | |
353 | #endif | |
354 | ||
355 | ||
356 | ||
357 | //--------------------------------------------------------------------------- | |
358 | ||
359 | class wxPanel : public wxWindow { | |
360 | public: | |
361 | wxPanel(wxWindow* parent, | |
362 | const wxWindowID id, | |
363 | const wxPoint& pos = wxPyDefaultPosition, | |
364 | const wxSize& size = wxPyDefaultSize, | |
365 | long style = wxTAB_TRAVERSAL, | |
366 | const char* name = "panel"); | |
367 | ||
368 | %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" | |
369 | ||
370 | void InitDialog(); | |
371 | wxButton* GetDefaultItem(); | |
372 | void SetDefaultItem(wxButton *btn); | |
373 | ||
374 | // fix some SWIG trouble... | |
375 | %pragma(python) addtoclass = " | |
376 | def GetDefaultItem(self): | |
377 | import controls | |
378 | val = windowsc.wxPanel_GetDefaultItem(self.this) | |
379 | val = controls.wxButtonPtr(val) | |
380 | return val | |
381 | " | |
382 | }; | |
383 | ||
384 | //--------------------------------------------------------------------------- | |
385 | ||
386 | class wxDialog : public wxPanel { | |
387 | public: | |
388 | wxDialog(wxWindow* parent, | |
389 | const wxWindowID id, | |
390 | const wxString& title, | |
391 | const wxPoint& pos = wxPyDefaultPosition, | |
392 | const wxSize& size = wxPyDefaultSize, | |
393 | long style = wxDEFAULT_DIALOG_STYLE, | |
394 | const char* name = "dialogBox"); | |
395 | ||
396 | %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)" | |
397 | ||
398 | void Centre(int direction = wxBOTH); | |
399 | void EndModal(int retCode); | |
400 | wxString GetTitle(); | |
401 | void Iconize(bool iconize); | |
402 | bool IsIconized(); | |
403 | void SetModal(bool flag); | |
404 | bool IsModal(); | |
405 | void SetTitle(const wxString& title); | |
406 | bool Show(bool show); | |
407 | int ShowModal(); | |
408 | ||
409 | int GetReturnCode(); | |
410 | void SetReturnCode(int retCode); | |
411 | }; | |
412 | ||
413 | //--------------------------------------------------------------------------- | |
414 | ||
415 | class wxScrolledWindow : public wxPanel { | |
416 | public: | |
417 | wxScrolledWindow(wxWindow* parent, | |
418 | const wxWindowID id = -1, | |
419 | const wxPoint& pos = wxPyDefaultPosition, | |
420 | const wxSize& size = wxPyDefaultSize, | |
421 | long style = wxHSCROLL | wxVSCROLL, | |
422 | char* name = "scrolledWindow"); | |
423 | ||
424 | %pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)" | |
425 | %pragma(python) addtomethod = "__init__:wx._StdOnScrollCallbacks(self)" | |
426 | ||
427 | void EnableScrolling(bool xScrolling, bool yScrolling); | |
428 | void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT); | |
429 | void GetVirtualSize(int* OUTPUT, int* OUTPUT); | |
430 | bool IsRetained(); | |
431 | void PrepareDC(wxDC& dc); | |
432 | void Scroll(int x, int y); | |
433 | void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, | |
434 | int noUnitsX, int noUnitsY, | |
435 | int xPos = 0, int yPos = 0); | |
436 | void ViewStart(int* OUTPUT, int* OUTPUT); | |
437 | ||
438 | void CalcScrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT); | |
439 | void CalcUnscrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT); | |
440 | ||
441 | }; | |
442 | ||
443 | //---------------------------------------------------------------------- | |
444 | ||
445 | ||
446 | class wxMenu : public wxEvtHandler { | |
447 | public: | |
448 | wxMenu(const wxString& title = wxPyEmptyStr, long style = 0); | |
449 | ||
450 | void Append(int id, const wxString& item, | |
451 | const wxString& helpString = wxPyEmptyStr, | |
452 | int checkable = FALSE); | |
453 | %name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu, | |
454 | const wxString& helpString = wxPyEmptyStr); | |
455 | %name(AppendItem)void Append(const wxMenuItem* item); | |
456 | ||
457 | void AppendSeparator(); | |
458 | void Break(); | |
459 | void Check(int id, bool flag); | |
460 | bool IsChecked(int id); | |
461 | void Enable(int id, bool enable); | |
462 | bool IsEnabled(int id); | |
463 | ||
464 | int FindItem(const wxString& itemString); | |
465 | %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/); | |
466 | ||
467 | wxString GetTitle(); | |
468 | void SetTitle(const wxString& title); | |
469 | ||
470 | wxString GetLabel(int id); | |
471 | void SetLabel(int id, const wxString& label); | |
472 | ||
473 | wxString GetHelpString(int id); | |
474 | void SetHelpString(int id, const wxString& helpString); | |
475 | void UpdateUI(wxEvtHandler* source = NULL); | |
476 | ||
477 | bool Delete(int id); | |
478 | %name(DeleteItem)bool Delete(wxMenuItem *item); | |
479 | bool Insert(size_t pos, wxMenuItem *item); | |
480 | wxMenuItem *Remove(int id); | |
481 | %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item); | |
482 | ||
483 | %addmethods { | |
484 | void Destroy() { | |
485 | delete self; | |
486 | } | |
487 | } | |
488 | %name(DestroyId)bool Destroy(int id); | |
489 | %name(DestroyItem)bool Destroy(wxMenuItem *item); | |
490 | ||
491 | size_t GetMenuItemCount(); | |
492 | //wxMenuItemList& GetMenuItems(); | |
493 | %addmethods { | |
494 | PyObject* GetMenuItems() { | |
495 | wxMenuItemList& list = self->GetMenuItems(); | |
496 | return wxPy_ConvertList(&list, "wxMenuItem"); | |
497 | } | |
498 | } | |
499 | ||
500 | void SetEventHandler(wxEvtHandler *handler); | |
501 | wxEvtHandler *GetEventHandler(); | |
502 | ||
503 | void SetInvokingWindow(wxWindow *win); | |
504 | wxWindow *GetInvokingWindow(); | |
505 | ||
506 | long GetStyle(); | |
507 | ||
508 | bool IsAttached(); | |
509 | ||
510 | void SetParent(wxMenu *parent); | |
511 | wxMenu *GetParent(); | |
512 | }; | |
513 | ||
514 | ||
515 | //---------------------------------------------------------------------- | |
516 | ||
517 | class wxMenuBar : public wxWindow { | |
518 | public: | |
519 | wxMenuBar(); | |
520 | ||
521 | bool Append(wxMenu *menu, const wxString& title); | |
522 | bool Insert(size_t pos, wxMenu *menu, const wxString& title); | |
523 | size_t GetMenuCount(); | |
524 | wxMenu *GetMenu(size_t pos); | |
525 | wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); | |
526 | wxMenu *Remove(size_t pos); | |
527 | void EnableTop(size_t pos, bool enable); | |
528 | void SetLabelTop(size_t pos, const wxString& label); | |
529 | wxString GetLabelTop(size_t pos); | |
530 | int FindMenuItem(const wxString& menuString, const wxString& itemString); | |
531 | %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/); | |
532 | void Enable(int id, bool enable); | |
533 | void Check(int id, bool check); | |
534 | bool IsChecked(int id); | |
535 | bool IsEnabled(int id); | |
536 | ||
537 | void SetLabel(int id, const wxString &label); | |
538 | wxString GetLabel(int id); | |
539 | ||
540 | void SetHelpString(int id, const wxString& helpString); | |
541 | wxString GetHelpString(int id); | |
542 | ||
543 | }; | |
544 | ||
545 | ||
546 | //---------------------------------------------------------------------- | |
547 | ||
548 | class wxMenuItem { | |
549 | public: | |
550 | wxMenuItem(wxMenu* parentMenu=NULL, int id=ID_SEPARATOR, | |
551 | const wxString& text = wxPyEmptyStr, | |
552 | const wxString& help = wxPyEmptyStr, | |
553 | bool isCheckable = FALSE, wxMenu* subMenu = NULL); | |
554 | ||
555 | ||
556 | wxMenu *GetMenu(); | |
557 | void SetId(int id); | |
558 | int GetId(); | |
559 | bool IsSeparator(); | |
560 | void SetText(const wxString& str); | |
561 | wxString GetLabel(); | |
562 | const wxString& GetText(); | |
563 | void SetCheckable(bool checkable); | |
564 | bool IsCheckable(); | |
565 | bool IsSubMenu(); | |
566 | void SetSubMenu(wxMenu *menu); | |
567 | wxMenu *GetSubMenu(); | |
568 | void Enable(bool enable = TRUE); | |
569 | bool IsEnabled(); | |
570 | void Check(bool check = TRUE); | |
571 | bool IsChecked(); | |
572 | void Toggle(); | |
573 | void SetHelp(const wxString& str); | |
574 | const wxString& GetHelp(); | |
575 | wxAcceleratorEntry *GetAccel(); | |
576 | void SetAccel(wxAcceleratorEntry *accel); | |
577 | ||
578 | }; | |
579 | ||
580 | //--------------------------------------------------------------------------- | |
581 | ||
582 | ||
583 |