1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions of various window classes
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/menuitem.h>
19 #include <wx/tooltip.h>
22 //----------------------------------------------------------------------
25 %include my_typemaps.i
27 // Import some definitions of other classes, etc.
33 %pragma(python) code = "import wx"
36 //----------------------------------------------------------------------
39 // Put some wx default wxChar* values into wxStrings.
40 DECLARE_DEF_STRING(PanelNameStr);
41 static const wxString wxPyEmptyString(wxT(""));
44 //---------------------------------------------------------------------------
46 class wxEvtHandler : public wxObject {
50 bool ProcessEvent(wxEvent& event);
51 void AddPendingEvent(wxEvent& event);
52 //bool SearchEventTable(wxEventTable& table, wxEvent& event);
54 bool GetEvtHandlerEnabled();
55 void SetEvtHandlerEnabled(bool enabled);
57 wxEvtHandler* GetNextHandler();
58 wxEvtHandler* GetPreviousHandler();
59 void SetNextHandler(wxEvtHandler* handler);
60 void SetPreviousHandler(wxEvtHandler* handler);
64 void Connect( int id, int lastId, int eventType, PyObject* func) {
65 if (PyCallable_Check(func)) {
66 self->Connect(id, lastId, eventType,
67 (wxObjectEventFunction) &wxPyCallback::EventThunker,
68 new wxPyCallback(func));
70 else if (func == Py_None) {
71 self->Disconnect(id, lastId, eventType,
72 (wxObjectEventFunction)
73 &wxPyCallback::EventThunker);
76 PyErr_SetString(PyExc_TypeError, "Expected callable object or None.");
80 bool Disconnect(int id, int lastId = -1,
81 wxEventType eventType = wxEVT_NULL) {
82 return self->Disconnect(id, lastId, eventType,
83 (wxObjectEventFunction)
84 &wxPyCallback::EventThunker);
89 void _setOORInfo(PyObject* _self) {
90 self->SetClientObject(new wxPyOORClientData(_self));
96 //----------------------------------------------------------------------
98 class wxValidator : public wxEvtHandler {
103 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
105 wxValidator* Clone();
106 wxWindow* GetWindow();
107 void SetWindow(wxWindow* window);
109 static bool IsSilent();
110 static void SetBellOnError(int doIt = TRUE);
115 //----------------------------------------------------------------------
117 class wxPyValidator : public wxValidator {
118 DECLARE_DYNAMIC_CLASS(wxPyValidator);
126 wxObject* Clone() const {
127 wxPyValidator* ptr = NULL;
128 wxPyValidator* self = (wxPyValidator*)this;
130 wxPyBeginBlockThreads();
131 if (self->m_myInst.findCallback("Clone")) {
133 ro = self->m_myInst.callCallbackObj(Py_BuildValue("()"));
135 SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p");
139 wxPyEndBlockThreads();
141 // This is very dangerous!!! But is the only way I could find
142 // to squash a memory leak. Currently it is okay, but if the
143 // validator architecture in wxWindows ever changes, problems
150 DEC_PYCALLBACK_BOOL_WXWIN(Validate);
151 DEC_PYCALLBACK_BOOL_(TransferToWindow);
152 DEC_PYCALLBACK_BOOL_(TransferFromWindow);
157 IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate);
158 IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferToWindow);
159 IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow);
161 IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator);
165 class wxPyValidator : public wxValidator {
169 void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=TRUE);
170 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyValidator, 1)"
172 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
175 //----------------------------------------------------------------------
177 %apply int * INOUT { int* x, int* y };
179 class wxWindow : public wxEvtHandler {
181 wxWindow(wxWindow* parent, const wxWindowID id,
182 const wxPoint& pos = wxDefaultPosition,
183 const wxSize& size = wxDefaultSize,
185 const wxString& name = wxPyPanelNameStr);
186 %name(wxPreWindow)wxWindow();
188 bool Create(wxWindow* parent, const wxWindowID id,
189 const wxPoint& pos = wxDefaultPosition,
190 const wxSize& size = wxDefaultSize,
192 const wxString& name = wxPyPanelNameStr);
194 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
195 %pragma(python) addtomethod = "wxPreWindow:val._setOORInfo(val)"
198 void Center(int direction = wxBOTH);
199 void Centre(int direction = wxBOTH);
200 void CentreOnParent(int direction = wxBOTH );
201 void CenterOnParent(int direction = wxBOTH );
202 void CentreOnScreen(int direction = wxBOTH );
203 void CenterOnScreen(int direction = wxBOTH );
207 // (uses apply'ed INOUT typemap, see above)
208 %name(ClientToScreenXY)void ClientToScreen(int* x, int* y);
209 wxPoint ClientToScreen(const wxPoint& pt);
211 bool Close(int force = FALSE);
213 void DestroyChildren();
214 bool IsBeingDeleted();
216 void DragAcceptFiles(bool accept);
218 void Enable(bool enable);
219 //bool FakePopupMenu(wxMenu* menu, int x, int y);
220 %name(FindWindowById) wxWindow* FindWindow(long id);
221 %name(FindWindowByName) wxWindow* FindWindow(const wxString& name);
223 wxColour GetBackgroundColour();
224 wxBorder GetBorder() const;
226 //wxList& GetChildren();
228 PyObject* GetChildren() {
229 wxWindowList& list = self->GetChildren();
230 return wxPy_ConvertList(&list, "wxWindow");
236 %name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
237 wxSize GetClientSize();
239 // get the origin of the client area of the window relative to the
240 // window top left corner (the client area may be shifted because of
241 // the borders, scrollbars, other decorations...)
242 wxPoint GetClientAreaOrigin() const;
244 // get the client rectangle in window (i.e. client) coordinates
245 wxRect GetClientRect() const;
247 wxLayoutConstraints * GetConstraints();
248 wxEvtHandler* GetEventHandler();
251 wxColour GetForegroundColour();
252 wxWindow * GetGrandParent();
255 return wxPyGetWinHandle(self); //(long)self->GetHandle();
260 void SetLabel(const wxString& label);
262 wxWindow * GetParent();
263 %name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
264 wxPoint GetPosition();
266 int GetScrollThumb(int orientation);
267 int GetScrollPos(int orientation);
268 int GetScrollRange(int orientation);
269 %name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT);
271 void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT);
272 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
273 int *OUTPUT, int *OUTPUT, int *OUTPUT, int* OUTPUT,
274 const wxFont* font = NULL); //, bool use16 = FALSE)
276 wxRegion GetUpdateRegion();
277 long GetWindowStyleFlag();
278 void SetWindowStyleFlag(long style);
279 void SetWindowStyle(long style);
280 bool HasScrollbar(int orient) const;
282 wxHitTest HitTest(const wxPoint& pt);
285 bool IsExposed( int x, int y, int w=0, int h=0 );
286 %name(IsExposedPoint) bool IsExposed( const wxPoint& pt );
287 %name(IsExposedRect) bool IsExposed( const wxRect& rect );
292 bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
294 void MakeModal(bool flag=TRUE);
295 %name(MoveXY)void Move(int x, int y, int flags = wxSIZE_USE_EXISTING);
296 void Move(const wxPoint& point, int flags = wxSIZE_USE_EXISTING);
298 wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE);
299 void PushEventHandler(wxEvtHandler* handler);
301 // find the given handler in the event handler chain and remove (but
302 // not delete) it from the event handler chain, return TRUE if it was
303 // found and FALSE otherwise (this also results in an assert failure so
304 // this function should only be called when the handler is supposed to
306 bool RemoveEventHandler(wxEvtHandler *handler);
308 %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y);
309 bool PopupMenu(wxMenu *menu, const wxPoint& pos);
312 void Refresh(bool eraseBackground = TRUE, const wxRect* rect = NULL);
313 void RefreshRect(const wxRect& rect);
315 void RemoveChild(wxWindow* child);
316 bool Reparent( wxWindow* newParent );
318 // (uses apply'ed INOUT typemap, see above)
319 %name(ScreenToClientXY)void ScreenToClient(int *x, int *y);
320 wxPoint ScreenToClient(const wxPoint& pt);
322 void ScrollWindow(int dx, int dy, const wxRect* rect = NULL);
323 void SetAutoLayout(bool autoLayout);
324 bool GetAutoLayout();
325 void SetBackgroundColour(const wxColour& colour);
326 void SetConstraints(wxLayoutConstraints *constraints);
327 void UnsetConstraints(wxLayoutConstraints *constraints);
329 void SetFocusFromKbd();
331 void SetFont(const wxFont& font);
332 void SetForegroundColour(const wxColour& colour);
334 void SetName(const wxString& name);
335 void SetScrollbar(int orientation, int position, int thumbSize, int range, int refresh = TRUE);
336 void SetScrollPos(int orientation, int pos, bool refresh = TRUE);
338 %name(SetDimensions) void SetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO);
340 void SetSize(const wxSize& size) {
344 void SetPosition(const wxPoint& pos, int flags = wxSIZE_USE_EXISTING) {
345 self->Move(pos, flags);
348 void SetRect(const wxRect& rect, int sizeFlags=wxSIZE_AUTO) {
349 self->SetSize(rect, sizeFlags);
353 void SetSizeHints(int minW, int minH,
354 int maxW=-1, int maxH=-1,
355 int incW=-1, int incH=-1);
356 void SetVirtualSizeHints( int minW, int minH,
357 int maxW = -1, int maxH = -1 );
359 void SetVirtualSize( const wxSize &size );
360 %name(SetVirtualSizeWH)void SetVirtualSize( int x, int y );
362 wxSize GetVirtualSize() const;
363 %name(GetVirtualSizeTuple)void GetVirtualSize( int *OUTPUT, int *OUTPUT ) const;
365 %name(SetClientSizeWH)void SetClientSize(int width, int height);
366 void SetClientSize(const wxSize& size);
367 //void SetPalette(wxPalette* palette);
368 void SetCursor(const wxCursor& cursor);
369 void SetEventHandler(wxEvtHandler* handler);
370 void SetExtraStyle(long exStyle);
371 void SetTitle(const wxString& title);
372 bool Show(bool show=TRUE);
373 bool TransferDataFromWindow();
374 bool TransferDataToWindow();
375 void UpdateWindowUI();
378 %name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
379 %name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
381 %name(DLG_PNT) wxPoint ConvertDialogToPixels(const wxPoint& pt);
382 %name(DLG_SZE) wxSize ConvertDialogToPixels(const wxSize& sz);
384 %name(ConvertPixelPointToDialog) wxPoint ConvertPixelsToDialog(const wxPoint& pt);
385 %name(ConvertPixelSizeToDialog) wxSize ConvertPixelsToDialog(const wxSize& sz);
387 %name(SetToolTipString)void SetToolTip(const wxString &tip);
388 void SetToolTip(wxToolTip *tooltip);
389 wxToolTip* GetToolTip();
391 void SetSizer(wxSizer* sizer, bool deleteOld=TRUE);
392 void SetSizerAndFit(wxSizer *sizer, bool deleteOld=TRUE);
395 // Track if this window is a member of a sizer
396 void SetContainingSizer(wxSizer* sizer);
397 wxSizer *GetContainingSizer() const;
399 wxValidator* GetValidator();
400 void SetValidator(const wxValidator& validator);
402 void SetDropTarget(wxDropTarget* target);
403 wxDropTarget* GetDropTarget();
404 %pragma(python) addtomethod = "SetDropTarget:_args[0].thisown = 0"
406 wxSize GetBestSize();
409 void SetCaret(wxCaret *caret);
411 %pragma(python) addtoclass = "# replaces broken shadow method
412 def GetCaret(self, *_args, **_kwargs):
413 from misc2 import wxCaretPtr
414 val = apply(windowsc.wxWindow_GetCaret,(self,) + _args, _kwargs)
415 if val: val = wxCaretPtr(val)
423 wxString GetHelpText();
424 void SetHelpText(const wxString& helpText);
425 void SetHelpTextForId(const wxString& text);
427 bool ScrollLines(int lines);
428 bool ScrollPages(int pages);
434 static wxWindow* FindFocus();
435 static int NewControlId();
436 static int NextControlId(int id);
437 static int PrevControlId(int id);
439 void SetAcceleratorTable(const wxAcceleratorTable& accel);
440 wxAcceleratorTable *GetAcceleratorTable();
443 // A way to do the native draw first... Too bad it isn't in wxGTK too.
444 void OnPaint(wxPaintEvent& event);
447 wxWindow* GetDefaultItem();
448 wxWindow* SetDefaultItem(wxWindow *btn);
449 void SetTmpDefaultItem(wxWindow *win);
451 // move the mouse to the specified position
452 void WarpPointer(int x, int y);
454 // start or end mouse capture, these functions maintain the stack of
455 // windows having captured the mouse and after calling ReleaseMouse()
456 // the mouse is not released but returns to the window which had had
457 // captured it previously (if any)
461 // get the window which currently captures the mouse or NULL
462 static wxWindow *GetCapture();
464 // does this window have the capture?
465 bool HasCapture() const;
471 %pragma(python) code = "
472 def wxDLG_PNT(win, point_or_x, y=None):
474 return win.ConvertDialogPointToPixels(point_or_x)
476 return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
478 def wxDLG_SZE(win, size_width, height=None):
480 return win.ConvertDialogSizeToPixels(size_width)
482 return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
488 wxWindow* wxWindow_FromHWND(unsigned long hWnd) {
489 wxWindow* win = new wxWindow;
491 win->SubclassWin(hWnd);
498 //---------------------------------------------------------------------------
500 class wxPanel : public wxWindow {
502 wxPanel(wxWindow* parent,
504 const wxPoint& pos = wxDefaultPosition,
505 const wxSize& size = wxDefaultSize,
506 long style = wxTAB_TRAVERSAL,
507 const wxString& name = wxPyPanelNameStr);
508 %name(wxPrePanel)wxPanel();
510 bool Create(wxWindow* parent,
512 const wxPoint& pos = wxDefaultPosition,
513 const wxSize& size = wxDefaultSize,
514 long style = wxTAB_TRAVERSAL,
515 const wxString& name = wxPyPanelNameStr);
517 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
518 %pragma(python) addtomethod = "wxPrePanel:val._setOORInfo(val)"
524 //---------------------------------------------------------------------------
527 // TODO: Add wrappers for the wxScrollHelper class, make wxScrolledWindow
528 // derive from it and wxPanel.
531 class wxScrolledWindow : public wxPanel {
533 wxScrolledWindow(wxWindow* parent,
534 const wxWindowID id = -1,
535 const wxPoint& pos = wxDefaultPosition,
536 const wxSize& size = wxDefaultSize,
537 long style = wxHSCROLL | wxVSCROLL,
538 const wxString& name = wxPyPanelNameStr);
539 %name(wxPreScrolledWindow)wxScrolledWindow();
541 bool Create(wxWindow* parent,
542 const wxWindowID id = -1,
543 const wxPoint& pos = wxDefaultPosition,
544 const wxSize& size = wxDefaultSize,
545 long style = wxHSCROLL | wxVSCROLL,
546 const wxString& name = wxPyPanelNameStr);
548 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
549 %pragma(python) addtomethod = "wxPreScrolledWindow:val._setOORInfo(val)"
551 void EnableScrolling(bool xScrolling, bool yScrolling);
552 int GetScrollPageSize(int orient);
553 void GetScrollPixelsPerUnit(int* OUTPUT, int* OUTPUT);
554 wxWindow* GetTargetWindow();
556 void PrepareDC(wxDC& dc);
557 void Scroll(int x, int y);
558 void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
559 int noUnitsX, int noUnitsY,
560 int xPos = 0, int yPos = 0, int noRefresh=FALSE);
561 void SetScrollPageSize(int orient, int pageSize);
562 void SetTargetWindow(wxWindow* window);
563 void GetViewStart(int* OUTPUT, int* OUTPUT);
564 %pragma(python) addtoclass = "ViewStart = GetViewStart"
566 %name(CalcScrolledPosition1)wxPoint CalcScrolledPosition(const wxPoint& pt);
567 %name(CalcScrolledPosition2)void CalcScrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
569 %name(CalcUnscrolledPosition1)wxPoint CalcUnscrolledPosition(const wxPoint& pt);
570 %name(CalcUnscrolledPosition2)void CalcUnscrolledPosition( int x, int y, int *OUTPUT, int *OUTPUT);
572 %pragma(python) addtoclass = "
573 def CalcScrolledPosition(self, *args):
575 return apply(self.CalcScrolledPosition1, args)
577 return apply(self.CalcScrolledPosition2, args)
579 raise TypeError, 'Invalid parameters: only (x,y) or (point) allowed'
581 def CalcUnscrolledPosition(self, *args):
583 return apply(self.CalcUnscrolledPosition1, args)
585 return apply(self.CalcUnscrolledPosition2, args)
587 raise TypeError, 'Invalid parameters: only (x,y) or (point) allowed'
590 void SetScale(double xs, double ys);
594 void AdjustScrollbars();
598 // Set the x, y scrolling increments.
599 void SetScrollRate( int xstep, int ystep );
603 //----------------------------------------------------------------------
606 class wxMenu : public wxEvtHandler {
608 wxMenu(const wxString& title = wxPyEmptyString, long style = 0);
610 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
612 void Append(int id, const wxString& item,
613 const wxString& helpString = wxPyEmptyString,
614 wxItemKind kind = wxITEM_NORMAL);
615 %name(AppendMenu)void Append(int id, const wxString& item, wxMenu *subMenu,
616 const wxString& helpString = wxPyEmptyString);
617 %name(AppendItem)void Append(const wxMenuItem* item);
618 void AppendCheckItem(int id,
619 const wxString& text,
620 const wxString& help = wxPyEmptyString);
621 void AppendRadioItem(int id,
622 const wxString& text,
623 const wxString& help = wxPyEmptyString);
624 void AppendSeparator();
627 void Insert(size_t pos,
629 const wxString& text,
630 const wxString& help = wxPyEmptyString,
631 wxItemKind kind = wxITEM_NORMAL);
632 void InsertSeparator(size_t pos);
633 void InsertCheckItem(size_t pos,
635 const wxString& text,
636 const wxString& help = wxPyEmptyString);
637 void InsertRadioItem(size_t pos,
639 const wxString& text,
640 const wxString& help = wxPyEmptyString);
641 %name(InsertMenu)void Insert(size_t pos,
643 const wxString& text,
645 const wxString& help = wxPyEmptyString);
646 %name(InsertItem)bool Insert(size_t pos, wxMenuItem *item);
650 const wxString& text,
651 const wxString& help = wxPyEmptyString,
652 wxItemKind kind = wxITEM_NORMAL);
653 void PrependSeparator();
654 void PrependCheckItem(int id,
655 const wxString& text,
656 const wxString& help = wxPyEmptyString);
657 void PrependRadioItem(int id,
658 const wxString& text,
659 const wxString& help = wxPyEmptyString);
660 %name(PrependMenu)void Prepend(int id,
661 const wxString& text,
663 const wxString& help = wxPyEmptyString);
664 %name(PrependItem)void Prepend(wxMenuItem *item);
668 void Check(int id, bool flag);
669 bool IsChecked(int id);
670 void Enable(int id, bool enable);
671 bool IsEnabled(int id);
673 int FindItem(const wxString& itemString);
674 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
677 void SetTitle(const wxString& title);
679 wxString GetLabel(int id);
680 void SetLabel(int id, const wxString& label);
682 wxString GetHelpString(int id);
683 void SetHelpString(int id, const wxString& helpString);
684 void UpdateUI(wxEvtHandler* source = NULL);
687 %name(DeleteItem)bool Delete(wxMenuItem *item);
688 wxMenuItem *Remove(int id);
689 %name(RemoveItem) wxMenuItem *Remove(wxMenuItem *item);
695 void Destroy() { delete self; }
697 %name(DestroyId)bool Destroy(int id);
698 %name(DestroyItem)bool Destroy(wxMenuItem *item);
700 size_t GetMenuItemCount();
701 //wxMenuItemList& GetMenuItems();
703 PyObject* GetMenuItems() {
704 wxMenuItemList& list = self->GetMenuItems();
705 return wxPy_ConvertList(&list, "wxMenuItem");
709 void SetEventHandler(wxEvtHandler *handler);
710 wxEvtHandler *GetEventHandler();
712 void SetInvokingWindow(wxWindow *win);
713 wxWindow *GetInvokingWindow();
719 void SetParent(wxMenu *parent);
724 //----------------------------------------------------------------------
726 class wxMenuBar : public wxWindow {
728 wxMenuBar(long style = 0);
730 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
732 bool Append(wxMenu *menu, const wxString& title);
733 bool Insert(size_t pos, wxMenu *menu, const wxString& title);
734 size_t GetMenuCount();
735 wxMenu *GetMenu(size_t pos);
736 wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
737 wxMenu *Remove(size_t pos);
738 void EnableTop(size_t pos, bool enable);
739 void SetLabelTop(size_t pos, const wxString& label);
740 wxString GetLabelTop(size_t pos);
741 int FindMenu(const wxString& title);
742 int FindMenuItem(const wxString& menuString, const wxString& itemString);
743 %name(FindItemById)wxMenuItem* FindItem(int id/*, wxMenu **menu = NULL*/);
744 void Enable(int id, bool enable);
745 void Check(int id, bool check);
746 bool IsChecked(int id);
747 bool IsEnabled(int id);
749 void SetLabel(int id, const wxString &label);
750 wxString GetLabel(int id);
752 void SetHelpString(int id, const wxString& helpString);
753 wxString GetHelpString(int id);
758 //----------------------------------------------------------------------
760 class wxMenuItem : public wxObject {
762 wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_SEPARATOR,
763 const wxString& text = wxPyEmptyString,
764 const wxString& help = wxPyEmptyString,
765 wxItemKind kind = wxITEM_NORMAL,
766 wxMenu* subMenu = NULL);
773 void SetText(const wxString& str);
775 const wxString& GetText();
776 wxItemKind GetKind();
777 void SetCheckable(bool checkable);
780 void SetSubMenu(wxMenu *menu);
781 wxMenu *GetSubMenu();
782 void Enable(bool enable = TRUE);
784 void Check(bool check = TRUE);
787 void SetHelp(const wxString& str);
788 const wxString& GetHelp();
789 wxAcceleratorEntry *GetAccel();
790 void SetAccel(wxAcceleratorEntry *accel);
792 static wxString GetLabelFromText(const wxString& text);
793 // static wxAcceleratorEntry *GetAccelFromString(const wxString& label);
795 // wxOwnerDrawn methods
797 void SetFont(const wxFont& font);
799 void SetTextColour(const wxColour& colText);
800 wxColour GetTextColour();
801 void SetBackgroundColour(const wxColour& colBack);
802 wxColour GetBackgroundColour();
803 void SetBitmaps(const wxBitmap& bmpChecked,
804 const wxBitmap& bmpUnchecked = wxNullBitmap);
805 void SetBitmap(const wxBitmap& bmpChecked);
806 wxBitmap GetBitmap(bool bChecked = TRUE);
807 void SetMarginWidth(int nWidth);
808 int GetMarginWidth();
809 static int GetDefaultMarginWidth();
810 //void SetName(const wxString& strName);
811 //const wxString& GetName();
812 //void SetCheckable(bool checkable);
813 //bool IsCheckable();
815 void ResetOwnerDrawn();
819 //---------------------------------------------------------------------------