|virtual status_t ||AddOptionAt (const char *name, int32 value, int32 index)|
| ||Add an option to the menu. More...|
|virtual void ||AllAttached ()|
| ||Similar to AttachedToWindow() but this method is triggered after all child views have already been detached from a window. More...|
|virtual void ||AttachedToWindow ()|
| ||Hook method called when the control is attached to a window. More...|
virtual int32 ||CountOptions () const|
| ||Count options in the menu. |
virtual bool ||GetOptionAt (int32 index, const char **_name, int32 *_value)|
| ||Get option at given index. |
|virtual void ||GetPreferredSize (float *_width, float *_height)|
| ||Fill out the preferred width and height of the control into the _width and _height parameters. More...|
|virtual void ||MessageReceived (BMessage *message)|
| ||Handle message received by the associated looper. More...|
virtual void ||RemoveOptionAt (int32 index)|
| ||Remove option at given index from the menu. |
|virtual void ||ResizeToPreferred ()|
| ||Resize the control to its preferred size. More...|
virtual int32 ||SelectedOption (const char **_name=0, int32 *_value=0) const|
| ||Get the label and/or value of the currently selected option. |
|virtual void ||SetEnabled (bool enabled)|
| ||Enables or disables the control. More...|
|virtual void ||SetLabel (const char *text)|
| ||Sets the label of the control. More...|
|virtual void ||SetValue (int32 value)|
| ||Sets the value of the control. More...|
A BMenuField based BControl implementation.
This class is a wrapper around BMenuField that implements BControl semantics. Each menu item holds a value, which is used as the control value when that item is selected.
The menu is populated using the AddOptionAt() method, giving the label and value for each option. It is set to radio mode by default.
- BeOS R5
|virtual void BOptionPopUp::SetEnabled
Enables or disables the control.
BControl objects are enabled by default. If the control changes enabled state then it is redrawn.
Disabled controls generally won't allow the user to focus on them (The
B_NAVIGABLE flag is turned off), and don't post any messages.
Disabled controls in derived classes should be drawn in subdued colors to visually indicate that they are disabled and should not respond to keyboard or mouse events.
true enables the control, if
false, disables it.
- BeOS R3
Reimplemented from BControl.