]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/univ/radiobut.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / univ / radiobut.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/radiobut.h
3// Purpose: wxRadioButton declaration
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 10.09.00
7// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_UNIV_RADIOBUT_H_
12#define _WX_UNIV_RADIOBUT_H_
13
14#include "wx/checkbox.h"
15
16// ----------------------------------------------------------------------------
17// wxRadioButton
18// ----------------------------------------------------------------------------
19
20class WXDLLIMPEXP_CORE wxRadioButton : public wxCheckBox
21{
22public:
23 // constructors
24 wxRadioButton() { Init(); }
25
26 wxRadioButton(wxWindow *parent,
27 wxWindowID id,
28 const wxString& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxRadioButtonNameStr)
34 {
35 Init();
36
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent,
41 wxWindowID id,
42 const wxString& label,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = 0,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxRadioButtonNameStr);
48
49 // override some base class methods
50 virtual void ChangeValue(bool value);
51
52protected:
53 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
54
55 // implement our own drawing
56 virtual void DoDraw(wxControlRenderer *renderer);
57
58 // we use the radio button bitmaps for size calculation
59 virtual wxSize GetBitmapSize() const;
60
61 // the radio button can only be cleared using this method, not
62 // ChangeValue() above - and it is protected as it can only be called by
63 // another radiobutton
64 void ClearValue();
65
66 // called when the radio button becomes checked: we clear all the buttons
67 // in the same group with us here
68 virtual void OnCheck();
69
70 // send event about radio button selection
71 virtual void SendEvent();
72
73private:
74 DECLARE_DYNAMIC_CLASS(wxRadioButton)
75};
76
77#endif // _WX_UNIV_RADIOBUT_H_