# Advanced Control Widgets Tasks

|  |  |  |  | Task Summary | Owner
|  |  |  |  | BChannelControl |
|  |  |  |  | BChannelSlider |
|  |  |  |  | BMultiChannelControl |
|  |  |  |  | BOptionControl |
|  |  |  |  | BOptionPopUp |

|  |  |  |  | Task Details
BChannelControl Class
|  |  |  |  | BChannelControl(BRect frame, const char * name, const char * label, BMessage * model, int32 channel_count = 1, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | BChannelControl(BMessage* from);
|  |  |  |  | virtual ~BChannelControl();
|  |  |  |  | virtual status_t Archive(BMessage* into, bool deep = true) const;
|  |  |  |  | virtual void Draw(BRect area) = 0;
|  |  |  |  | virtual void MouseDown(BPoint where) = 0;
|  |  |  |  | virtual void KeyDown(const char* bytes, int32 size) = 0;
|  |  |  |  | virtual void FrameResized(float width, float height);
|  |  |  |  | virtual void SetFont(const BFont* font, uint32 mask = B_FONT_ALL);
|  |  |  |  | virtual void AttachedToWindow();
|  |  |  |  | virtual void DetachedFromWindow();
|  |  |  |  | virtual void ResizeToPreferred();
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height) = 0;
|  |  |  |  | virtual void MessageReceived(BMessage* message);
|  |  |  |  | virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property);
|  |  |  |  | virtual status_t GetSupportedSuites(BMessage *data);
|  |  |  |  | virtual void SetModificationMessage(BMessage *message);
|  |  |  |  | BMessage *ModificationMessage() const;
|  |  |  |  | virtual status_t Invoke(BMessage *msg = NULL);
|  |  |  |  | virtual status_t InvokeChannel(BMessage *msg = NULL, int32 from_channel = 0, int32 channel_count = -1, const bool* in_mask = NULL);
|  |  |  |  | status_t InvokeNotifyChannel(BMessage *msg = NULL, uint32 kind = B_CONTROL_INVOKED, int32 from_channel = 0, int32 channel_count = -1, const bool* in_mask = NULL);
|  |  |  |  | virtual voidSetValue(int32 value);
|  |  |  |  | virtual status_t SetCurrentChannel(int32 channel);
|  |  |  |  | int32 CurrentChannel() const;
|  |  |  |  | virtual int32 CountChannels() const;
|  |  |  |  | virtual int32 MaxChannelCount() const = 0;
|  |  |  |  | virtual status_t SetChannelCount(int32 channel_count);
|  |  |  |  | int32 ValueFor(int32 channel) const;
|  |  |  |  | virtual int32 GetValue(int32* out_values, int32 from_channel, int32 channel_count) const;
|  |  |  |  | status_t SetValueFor(int32 channel, int32 value);
|  |  |  |  | virtual status_t SetValue(int32 from_channel, int32 channel_count, const int32* in_values);
|  |  |  |  | status_t SetAllValue(int32 values);
|  |  |  |  | status_t SetLimitsFor(int32 channel, int32 minimum, int32 maximum);
|  |  |  |  | status_t GetLimitsFor(int32 channel, int32* minimum, int32* maximum) const ;
|  |  |  |  | virtual status_t SetLimitsFor(int32 from_channel, int32 channel_count, const int32* minimum, const int32* maximum);
|  |  |  |  | virtual status_t GetLimitsFor(int32 from_channel, int32 channel_count, int32* minimum, int32* maximum) const;
|  |  |  |  | status_t SetLimits(int32 minimum, int32 maximum);
|  |  |  |  | status_t GetLimits(int32* outMinimum, int32* outMaximum) const;
|  |  |  |  | virtual bool SupportsIndividualLimits() const = 0;
|  |  |  |  | virtual status_t SetLimitLabels(const char* min_label, const char* max_label);
|  |  |  |  | const char* MinLimitLabel() const;
|  |  |  |  | const char* MaxLimitLabel() const;
|  |  |  |  | virtual status_t SetLimitLabelsFor(int32 channel, const char* minLabel, const char* maxLabel);
|  |  |  |  | virtual status_t SetLimitLabelsFor(int32 from_channel, int32 channel_count, const char* minLabel, const char* maxLabel);
|  |  |  |  | const char* MinLimitLabelFor(int32 channel) const;
|  |  |  |  | const char* MaxLimitLabelFor(int32 channel) const;
BChannelSlider Class
|  |  |  |  | BChannelSlider(BRect area, const char* name, const char* label, BMessage* model, int32 channels = 1, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | BChannelSlider(BRect area, const char* name, const char* label, BMessage* model, orientation o, int32 channels = 1, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | BChannelSlider(BMessage* from);
|  |  |  |  | virtual ~BChannelSlider();
|  |  |  |  | static BArchivable* Instantiate(BMessage* from);
|  |  |  |  | virtual status_t Archive(BMessage* into, bool deep = true) const;
|  |  |  |  | virtual orientation Orientation() const;
|  |  |  |  | void SetOrientation(orientation o);
|  |  |  |  | virtual int32 MaxChannelCount() const;
|  |  |  |  | virtual bool SupportsIndividualLimits() const;
|  |  |  |  | virtual void AttachedToWindow();
|  |  |  |  | virtual void AllAttached();
|  |  |  |  | virtual void DetachedFromWindow();
|  |  |  |  | virtual void AllDetached();
|  |  |  |  | virtual void MessageReceived(BMessage* msg);
|  |  |  |  | virtual void Draw(BRect area);
|  |  |  |  | virtual void MouseDown(BPoint where);
|  |  |  |  | virtual void MouseUp(BPoint pt);
|  |  |  |  | virtual void MouseMoved(BPoint pt, uint32 code, const BMessage* message);
|  |  |  |  | virtual void WindowActivated(bool state);
|  |  |  |  | virtual void KeyDown(const char* bytes, int32 numBytes);
|  |  |  |  | virtual void KeyUp(const char* bytes, int32 numBytes);
|  |  |  |  | virtual void FrameResized(float width, float height);
|  |  |  |  | virtual void SetFont(const BFont* font, uint32 mask = B_FONT_ALL);
|  |  |  |  | virtual void MakeFocus(bool focusState = true);
|  |  |  |  | virtual void SetEnabled(bool on);
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height);
|  |  |  |  | virtual BHandler* ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, int32 form, const char* property);
|  |  |  |  | virtual status_t GetSupportedSuites(BMessage* data);
|  |  |  |  | virtual void DrawChannel(BView* into, int32 channel, BRect area, bool pressed);
|  |  |  |  | virtual void DrawGroove(BView* into, int32 channel, BPoint tl, BPoint br);
|  |  |  |  | virtual void DrawThumb(BView* into, int32 channel, BPoint where, bool pressed );
|  |  |  |  | virtual const BBitmap* ThumbFor(int32 channel, bool pressed);
|  |  |  |  | virtual BRect ThumbFrameFor(int32 channel);
|  |  |  |  | virtual float ThumbDeltaFor(int32 channel);
|  |  |  |  | virtual float ThumbRangeFor(int32 channel);
BMultiChannelControl Class
|  |  |  |  | BMultiChannelControl(BRect frame, const char* name, const char* label, BMessage* model, int32 channel_count = 1, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | BMultiChannelControl(BMessage* from);
|  |  |  |  | virtual ~BMultiChannelControl();
|  |  |  |  | virtual status_t Archive(BMessage* into, bool deep = true) const;
|  |  |  |  | virtual void Draw(BRect area) = 0;
|  |  |  |  | virtual void MouseDown(BPoint where) = 0;
|  |  |  |  | virtual void KeyDown(const char* bytes, int32 size) = 0;
|  |  |  |  | virtual void FrameResized(float width, float height);
|  |  |  |  | virtual void SetFont(const BFont* font, uint32 mask = B_FONT_ALL);
|  |  |  |  | virtual void AttachedToWindow();
|  |  |  |  | virtual void DetachedFromWindow();
|  |  |  |  | virtual void ResizeToPreferred();
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height) = 0;
|  |  |  |  | virtual void MessageReceived(BMessage* message);
|  |  |  |  | virtual void SetValue(int32 value);
|  |  |  |  | virtual status_t SetCurrentChannel(int32 channel);
|  |  |  |  | int32 CurrentChannel() const;
|  |  |  |  | virtual int32 CountChannels() const;
|  |  |  |  | virtual int32 MaxChannelCount() const = 0;
|  |  |  |  | virtual status_t SetChannelCount(int32 channel_count);
|  |  |  |  | int32 ValueFor(int32 channel) const;
|  |  |  |  | virtual int32 GetValues(int32* out_values, int32 from_channel, int32 channel_count) const;
|  |  |  |  | status_t SetValueFor(int32 channel, int32 value);
|  |  |  |  | virtual status_t SetValues(int32 from_channel, int32 channel_count, const int32* in_values);
|  |  |  |  | status_t SetAllValues(int32 values);
|  |  |  |  | status_t SetLimitsFor(int32 channel, int32 minimum, int32 maximum);
|  |  |  |  | status_t GetLimitsFor(int32 channel, int32* minimum, int32* maximum) const ;
|  |  |  |  | virtual status_t SetLimits(int32 from_channel, int32 channel_count, const int32* minimum, const int32* maximum);
|  |  |  |  | virtual status_t GetLimits(int32 from_channel, int32 channel_count, int32* minimum, int32* maximum) const;
|  |  |  |  | status_t SetAllLimits(int32 minimum, int32 maximum);
|  |  |  |  | virtual status_t SetLimitLabels(const char* min_label, const char* max_label);
|  |  |  |  | const char* MinLimitLabel() const;
|  |  |  |  | const char* MaxLimitLabel() const;
BOptionControl Class
|  |  |  |  | BOptionControl(BRect frame, const char* name, const char* label, BMessage* message, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | virtual ~BOptionControl();
|  |  |  |  | virtual void MessageReceived(BMessage* message);
|  |  |  |  | status_t AddOption(const char* name, int32 value);
|  |  |  |  | virtual boolGetOptionAt(int32 index, const char** out_name, int32* out_value) = 0;
|  |  |  |  | virtual void RemoveOptionAt(int32 index) = 0;
|  |  |  |  | virtual int32 CountOptions() const = 0;
|  |  |  |  | virtual status_tAddOptionAt(const char* name, int32 value, int32 index) = 0;
|  |  |  |  | virtual int32 SelectedOption(const char** name = 0, int32* value = 0) const = 0;
|  |  |  |  | virtual status_t SelectOptionFor(int32 value);
|  |  |  |  | virtual status_t SelectOptionFor(const char *name);
|  |  |  |  | BMessage* MakeValueMessage(int32 value);
BOptionPopUp Class
|  |  |  |  | BOptionPopUp(BRect frame, const char* name, const char* label, BMessage* message, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | BOptionPopUp(BRect frame, const char* name, const char* label, BMessage* message, bool fixed, uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW);
|  |  |  |  | ~BOptionPopUp();
|  |  |  |  | BMenuField* MenuField();
|  |  |  |  | virtual bool GetOptionAt(int32 index, const char** out_name, int32* out_value);
|  |  |  |  | virtual void RemoveOptionAt(int32 index);
|  |  |  |  | virtual int32 CountOptions() const;
|  |  |  |  | virtual status_t AddOptionAt(const char* name, int32 value, int32 index);
|  |  |  |  | virtual void AllAttached();
|  |  |  |  | virtual void MessageReceived(BMessage* message);
|  |  |  |  | virtual void SetLabel(const char* text);
|  |  |  |  | virtual void SetValue(int32 value);
|  |  |  |  | virtual voidSetEnabled(bool on);
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height);
|  |  |  |  | virtual void ResizeToPreferred();
|  |  |  |  | virtual int32 SelectedOption(const char** outName = 0, int32* outValue = 0) const;

Legend
| Functional Spec
| Use Cases
| Unit Tests
| Technical Spec
| Implementation
| Completed

The OpenBeOS project is hosted by:

Copyright © 2001-2002 OpenBeOS Project