2 * Copyright 2001-2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _OPTION_CONTROL_H
6 #define _OPTION_CONTROL_H
13 B_OPTION_CONTROL_VALUE
= '_BMV'
17 class BOptionControl
: public BControl
{
19 BOptionControl(BRect frame
, const char* name
,
20 const char* label
, BMessage
* message
,
21 uint32 resizeMask
= B_FOLLOW_LEFT_TOP
,
22 uint32 flags
= B_WILL_DRAW
);
23 BOptionControl(const char* name
,
24 const char* label
, BMessage
* message
,
25 uint32 flags
= B_WILL_DRAW
);
27 virtual ~BOptionControl();
29 virtual void MessageReceived(BMessage
* message
);
31 status_t
AddOption(const char* name
, int32 value
);
32 virtual bool GetOptionAt(int32 index
, const char** _name
,
34 virtual void RemoveOptionAt(int32 index
) = 0;
35 virtual int32
CountOptions() const = 0;
36 virtual status_t
AddOptionAt(const char* name
, int32 value
,
38 virtual int32
SelectedOption(const char** name
= NULL
,
39 int32
* outValue
= NULL
) const = 0;
41 virtual status_t
SelectOptionFor(int32 value
);
42 virtual status_t
SelectOptionFor(const char* name
);
45 BMessage
* MakeValueMessage(int32 value
);
48 // FBC padding and forbidden methods
50 BOptionControl(const BOptionControl
& other
);
51 BOptionControl
& operator=(const BOptionControl
& other
);
53 virtual status_t
_Reserved_OptionControl_0(void*, ...);
54 virtual status_t
_Reserved_OptionControl_1(void*, ...);
55 virtual status_t
_Reserved_OptionControl_2(void*, ...);
56 virtual status_t
_Reserved_OptionControl_3(void*, ...);
57 virtual status_t
_Reserved_OptionControl_4(void*, ...);
58 virtual status_t
_Reserved_OptionControl_5(void*, ...);
59 virtual status_t
_Reserved_OptionControl_6(void*, ...);
60 virtual status_t
_Reserved_OptionControl_7(void*, ...);
61 virtual status_t
_Reserved_OptionControl_8(void*, ...);
62 virtual status_t
_Reserved_OptionControl_9(void*, ...);
63 virtual status_t
_Reserved_OptionControl_10(void*, ...);
64 virtual status_t
_Reserved_OptionControl_11(void*, ...);
71 #endif // _OPTION_CONTROL_H