Make UEFI boot-platform build again
[haiku.git] / headers / os / interface / RadioButton.h
bloba1cd200cdba4c6a591d9a88fa284a0e5c235d8b1
1 /*
2 * Copyright 2001-2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _RADIO_BUTTON_H
6 #define _RADIO_BUTTON_H
9 #include <Bitmap.h>
10 #include <Control.h>
13 class BRadioButton : public BControl {
14 public:
15 BRadioButton(BRect frame, const char* name,
16 const char* label, BMessage* message,
17 uint32 resizingMode = B_FOLLOW_LEFT_TOP,
18 uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
19 BRadioButton(const char* name,
20 const char* label, BMessage* message,
21 uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
22 BRadioButton(const char* label,
23 BMessage* message);
25 BRadioButton(BMessage* data);
26 virtual ~BRadioButton();
28 static BArchivable* Instantiate(BMessage* data);
29 virtual status_t Archive(BMessage* data, bool deep = true) const;
31 virtual void Draw(BRect updateRect);
32 virtual void MouseDown(BPoint where);
33 virtual void AttachedToWindow();
34 virtual void KeyDown(const char* bytes, int32 numBytes);
35 virtual void SetValue(int32 value);
36 virtual void GetPreferredSize(float* _width,
37 float* _height);
38 virtual void ResizeToPreferred();
39 virtual status_t Invoke(BMessage* message = NULL);
41 virtual void MessageReceived(BMessage* message);
42 virtual void WindowActivated(bool active);
43 virtual void MouseUp(BPoint where);
44 virtual void MouseMoved(BPoint where, uint32 code,
45 const BMessage* dragMessage);
46 virtual void DetachedFromWindow();
47 virtual void FrameMoved(BPoint newPosition);
48 virtual void FrameResized(float newWidth, float newHeight);
50 virtual BHandler* ResolveSpecifier(BMessage* message,
51 int32 index, BMessage* specifier,
52 int32 what, const char* property);
54 virtual void MakeFocus(bool focus = true);
55 virtual void AllAttached();
56 virtual void AllDetached();
57 virtual status_t GetSupportedSuites(BMessage* message);
59 virtual status_t Perform(perform_code d, void* argument);
61 virtual BSize MaxSize();
62 virtual BAlignment LayoutAlignment();
64 virtual status_t SetIcon(const BBitmap* icon, uint32 flags = 0);
66 private:
67 friend status_t _init_interface_kit_();
69 virtual void _ReservedRadioButton1();
70 virtual void _ReservedRadioButton2();
72 BRadioButton& operator=(const BRadioButton& other);
74 BRect _KnobFrame() const;
75 BRect _KnobFrame(
76 const font_height& fontHeight) const;
77 void _Redraw();
78 // for use in "synchronous" BWindows
80 private:
81 static BBitmap* sBitmaps[2][3];
83 bool fOutlined;
85 uint32 _reserved[2];
88 #endif // _RADIO_BUTTON_H