Make UEFI boot-platform build again
[haiku.git] / headers / os / interface / MultiChannelControl.h
blob4f4aff03f9e1ec8aff2846505cfc1ee7a6344f42
1 /*
2 * Copyright 2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _MULTI_CHANNEL_CONTROL_H
6 #define _MULTI_CHANNEL_CONTROL_H
9 #include <Control.h>
12 class BMultiChannelControl : public BControl {
13 public:
14 BMultiChannelControl(BRect frame,
15 const char* name, const char* label,
16 BMessage* message, int32 channelCount = 1,
17 uint32 resize = B_FOLLOW_LEFT_TOP,
18 uint32 flags = B_WILL_DRAW);
19 BMultiChannelControl(BMessage* archive);
20 virtual ~BMultiChannelControl();
22 virtual status_t Archive(BMessage* archive,
23 bool deep = true) const;
25 virtual void Draw(BRect updateRect) = 0;
26 virtual void MouseDown(BPoint where) = 0;
27 virtual void KeyDown(const char* bytes, int32 numBytes) = 0;
29 virtual void FrameResized(float width, float height);
30 virtual void SetFont(const BFont* font,
31 uint32 mask = B_FONT_ALL);
33 virtual void AttachedToWindow();
34 virtual void DetachedFromWindow();
35 virtual void ResizeToPreferred();
36 virtual void GetPreferredSize(float* _width,
37 float* _height) = 0;
39 virtual void MessageReceived(BMessage* message);
41 //! SetValueChannel() determines which channel
42 virtual void SetValue(int32 value);
43 virtual status_t SetCurrentChannel(int32 channel);
44 int32 CurrentChannel() const;
46 virtual int32 CountChannels() const;
47 virtual int32 MaxChannelCount() const = 0;
48 virtual status_t SetChannelCount(int32 channelCount);
49 int32 ValueFor(int32 channel) const;
50 virtual int32 GetValues(int32* _values, int32 firstChannel,
51 int32 channelCount) const;
52 status_t SetValueFor(int32 channel, int32 value);
53 virtual status_t SetValues(int32 firstChannel,
54 int32 channelCount, const int32* _values);
55 status_t SetAllValues(int32 values);
56 status_t SetLimitsFor(int32 channel, int32 minimum,
57 int32 maximum);
58 status_t GetLimitsFor(int32 channel, int32* _minimum,
59 int32* _maximum) const;
60 virtual status_t SetLimits(int32 firstChannel,
61 int32 channelCount, const int32* minimum,
62 const int32* maximum);
63 virtual status_t GetLimits(int32 firstChannel,
64 int32 channelCount, int32* _minimum,
65 int32* _maximum) const;
66 status_t SetAllLimits(int32 minimum, int32 maximum);
68 virtual status_t SetLimitLabels(const char* minLabel,
69 const char* maxLabel);
70 const char* MinLimitLabel() const;
71 const char* MaxLimitLabel() const;
73 private:
74 // FBC padding
75 virtual status_t _Reserverd_MultiChannelControl_0(void*, ...);
76 virtual status_t _Reserverd_MultiChannelControl_1(void*, ...);
77 virtual status_t _Reserverd_MultiChannelControl_2(void*, ...);
78 virtual status_t _Reserverd_MultiChannelControl_3(void*, ...);
79 virtual status_t _Reserverd_MultiChannelControl_4(void*, ...);
80 virtual status_t _Reserverd_MultiChannelControl_5(void*, ...);
81 virtual status_t _Reserverd_MultiChannelControl_6(void*, ...);
82 virtual status_t _Reserverd_MultiChannelControl_7(void*, ...);
84 // Forbidden
85 BMultiChannelControl(
86 const BMultiChannelControl&);
87 BMultiChannelControl& operator=(const BMultiChannelControl&);
90 protected:
91 inline int32* const& MinLimitList() const;
92 inline int32* const& MaxLimitList() const;
93 inline int32* const& ValueList() const;
95 private:
96 int32 fChannelCount;
97 int32 fValueChannel;
98 int32* fChannelMinima;
99 int32* fChannelMaxima;
100 int32* fChannelValues;
101 char* fMinLabel;
102 char* fMaxLabel;
104 uint32 _reserved_[16];
108 inline int32* const&
109 BMultiChannelControl::MinLimitList() const
111 return fChannelMinima;
115 inline int32* const&
116 BMultiChannelControl::MaxLimitList() const
118 return fChannelMaxima;
122 inline int32* const&
123 BMultiChannelControl::ValueList() const
125 return fChannelValues;
129 #endif // _MULTI_CHANNEL_CONTROL_H