]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/radiobox.h
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / include / wx / gtk / radiobox.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
6b0d8a01 2// Name: wx/gtk/radiobox.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
27c78e45
VZ
9#ifndef _WX_GTK_RADIOBOX_H_
10#define _WX_GTK_RADIOBOX_H_
c801d85f 11
c801d85f
KB
12#include "wx/bitmap.h"
13
b5dbe15d 14class WXDLLIMPEXP_FWD_CORE wxGTKRadioButtonInfo;
dc26eeb3
VZ
15
16#include "wx/list.h"
17
a10a31ce 18WX_DECLARE_EXPORTED_LIST(wxGTKRadioButtonInfo, wxRadioBoxButtonsInfoList);
dc26eeb3
VZ
19
20
c801d85f
KB
21//-----------------------------------------------------------------------------
22// wxRadioBox
23//-----------------------------------------------------------------------------
24
27c78e45
VZ
25class WXDLLIMPEXP_CORE wxRadioBox : public wxControl,
26 public wxRadioBoxBase
c801d85f 27{
0de9b5b2 28public:
27c78e45 29 // ctors and dtor
ec373f2a 30 wxRadioBox() { }
f6bcfd97
BP
31 wxRadioBox(wxWindow *parent,
32 wxWindowID id,
33 const wxString& title,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 int n = 0,
37 const wxString choices[] = (const wxString *) NULL,
e77669fc 38 int majorDim = 0,
3998c74b 39 long style = wxRA_SPECIFY_COLS,
c8531822 40 const wxValidator& val = wxDefaultValidator,
f6bcfd97 41 const wxString& name = wxRadioBoxNameStr)
6de97a3b 42 {
f6bcfd97 43 Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
6de97a3b 44 }
27c78e45 45
584ad2a3
MB
46 wxRadioBox(wxWindow *parent,
47 wxWindowID id,
48 const wxString& title,
49 const wxPoint& pos,
50 const wxSize& size,
51 const wxArrayString& choices,
e77669fc 52 int majorDim = 0,
3998c74b 53 long style = wxRA_SPECIFY_COLS,
584ad2a3
MB
54 const wxValidator& val = wxDefaultValidator,
55 const wxString& name = wxRadioBoxNameStr)
56 {
584ad2a3
MB
57 Create( parent, id, title, pos, size, choices, majorDim, style, val, name );
58 }
f6bcfd97 59
f6bcfd97
BP
60 bool Create(wxWindow *parent,
61 wxWindowID id,
62 const wxString& title,
63 const wxPoint& pos = wxDefaultPosition,
64 const wxSize& size = wxDefaultSize,
65 int n = 0,
66 const wxString choices[] = (const wxString *) NULL,
67 int majorDim = 0,
3998c74b 68 long style = wxRA_SPECIFY_COLS,
c8531822 69 const wxValidator& val = wxDefaultValidator,
f6bcfd97 70 const wxString& name = wxRadioBoxNameStr);
584ad2a3
MB
71 bool Create(wxWindow *parent,
72 wxWindowID id,
73 const wxString& title,
74 const wxPoint& pos,
75 const wxSize& size,
76 const wxArrayString& choices,
77 int majorDim = 0,
3998c74b 78 long style = wxRA_SPECIFY_COLS,
584ad2a3
MB
79 const wxValidator& val = wxDefaultValidator,
80 const wxString& name = wxRadioBoxNameStr);
f6bcfd97 81
27c78e45
VZ
82 virtual ~wxRadioBox();
83
c8531822 84
27c78e45 85 // implement wxItemContainerImmutable methods
aa61d352 86 virtual unsigned int GetCount() const;
c8531822 87
aa61d352
VZ
88 virtual wxString GetString(unsigned int n) const;
89 virtual void SetString(unsigned int n, const wxString& s);
c8531822 90
27c78e45
VZ
91 virtual void SetSelection(int n);
92 virtual int GetSelection() const;
c8531822 93
c8531822 94
27c78e45 95 // implement wxRadioBoxBase methods
aa61d352
VZ
96 virtual bool Show(unsigned int n, bool show = true);
97 virtual bool Enable(unsigned int n, bool enable = true);
27c78e45 98
aa61d352
VZ
99 virtual bool IsItemEnabled(unsigned int n) const;
100 virtual bool IsItemShown(unsigned int n) const;
27c78e45
VZ
101
102
103 // override some base class methods to operate on radiobox itself too
b4efc9b9
WS
104 virtual bool Show( bool show = true );
105 virtual bool Enable( bool enable = true );
c8531822 106
27c78e45
VZ
107 virtual void SetLabel( const wxString& label );
108
9d522606
RD
109 static wxVisualAttributes
110 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
111
dc26eeb3
VZ
112 virtual int GetItemFromPoint( const wxPoint& pt ) const;
113#if wxUSE_HELP
114 // override virtual wxWindow::GetHelpTextAtPoint to use common platform independent
115 // wxRadioBoxBase::DoGetHelpTextAtPoint from the platform independent
116 // base class-interface wxRadioBoxBase.
117 virtual wxString GetHelpTextAtPoint(const wxPoint & pt, wxHelpEvent::Origin origin) const
118 {
119 return wxRadioBoxBase::DoGetHelpTextAtPoint( this, pt, origin );
120 }
121#endif // wxUSE_HELP
122
72a7edf0
RR
123 // implementation
124 // --------------
c8531822 125
72a7edf0
RR
126 void GtkDisableEvents();
127 void GtkEnableEvents();
72a7edf0 128#if wxUSE_TOOLTIPS
558a94bd 129 virtual void GTKApplyToolTip(const char* tip);
72a7edf0 130#endif // wxUSE_TOOLTIPS
c4ca49cd 131
dc26eeb3 132 wxRadioBoxButtonsInfoList m_buttonsInfo;
f6bcfd97
BP
133
134protected:
677dc0ed
JS
135 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
136
aa1e6de9
VZ
137#if wxUSE_TOOLTIPS
138 virtual void DoSetItemToolTip(unsigned int n, wxToolTip *tooltip);
139#endif
140
ef5c70f9
VZ
141 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
142 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
6f02a879 143
bd2e08d0
VS
144 virtual bool GTKNeedsToFilterSameWindowFocus() const { return true; }
145
2e1f5012
VZ
146 virtual bool GTKWidgetNeedsMnemonic() const;
147 virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
148
54517652
RR
149private:
150 DECLARE_DYNAMIC_CLASS(wxRadioBox)
c801d85f
KB
151};
152
27c78e45 153#endif // _WX_GTK_RADIOBOX_H_