* Update header indentation.
* Added BScrollBar::SetOrientation(). * Improved _DrawArrowButton() to have a good visual result even when the scroll bar does not have the standard width or height. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27494 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -28,106 +28,112 @@
|
||||
|
||||
class BScrollBar : public BView {
|
||||
public:
|
||||
BScrollBar(BRect frame, const char* name,
|
||||
BView* target, float min, float max,
|
||||
orientation direction);
|
||||
BScrollBar(const char* name, BView* target,
|
||||
float min, float max, orientation direction);
|
||||
BScrollBar(BMessage* data);
|
||||
virtual ~BScrollBar();
|
||||
static BArchivable *Instantiate(BMessage* data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
BScrollBar(BRect frame, const char* name,
|
||||
BView* target, float min, float max,
|
||||
orientation direction);
|
||||
BScrollBar(const char* name, BView* target,
|
||||
float min, float max, orientation direction);
|
||||
BScrollBar(BMessage* data);
|
||||
virtual ~BScrollBar();
|
||||
static BArchivable* Instantiate(BMessage* data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
virtual void AttachedToWindow();
|
||||
void SetValue(float value);
|
||||
float Value() const;
|
||||
void SetProportion(float);
|
||||
float Proportion() const;
|
||||
virtual void ValueChanged(float newValue);
|
||||
virtual void AttachedToWindow();
|
||||
void SetValue(float value);
|
||||
float Value() const;
|
||||
void SetProportion(float);
|
||||
float Proportion() const;
|
||||
virtual void ValueChanged(float newValue);
|
||||
|
||||
void SetRange(float min, float max);
|
||||
void GetRange(float *min, float *max) const;
|
||||
void SetSteps(float smallStep, float largeStep);
|
||||
void GetSteps(float *smallStep, float *largeStep) const;
|
||||
void SetTarget(BView *target);
|
||||
void SetTarget(const char *targetName);
|
||||
BView *Target() const;
|
||||
orientation Orientation() const;
|
||||
void SetRange(float min, float max);
|
||||
void GetRange(float* _min, float* _max) const;
|
||||
void SetSteps(float smallStep, float largeStep);
|
||||
void GetSteps(float* _smallStep,
|
||||
float* _largeStep) const;
|
||||
void SetTarget(BView *target);
|
||||
void SetTarget(const char* targetName);
|
||||
BView* Target() const;
|
||||
void SetOrientation(enum orientation orientation);
|
||||
orientation Orientation() const;
|
||||
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
virtual void MouseDown(BPoint pt);
|
||||
virtual void MouseUp(BPoint pt);
|
||||
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
|
||||
virtual void DetachedFromWindow();
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void FrameMoved(BPoint new_position);
|
||||
virtual void FrameResized(float new_width, float new_height);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void MouseDown(BPoint pt);
|
||||
virtual void MouseUp(BPoint pt);
|
||||
virtual void MouseMoved(BPoint pt, uint32 code,
|
||||
const BMessage* dragMessage);
|
||||
virtual void DetachedFromWindow();
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void FrameMoved(BPoint new_position);
|
||||
virtual void FrameResized(float newWidth, float newHeight);
|
||||
|
||||
virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
|
||||
BMessage *specifier, int32 form,
|
||||
const char *property);
|
||||
virtual BHandler* ResolveSpecifier(BMessage* message,
|
||||
int32 index, BMessage* specifier,
|
||||
int32 form, const char* property);
|
||||
|
||||
virtual void ResizeToPreferred();
|
||||
virtual void GetPreferredSize(float *width, float *height);
|
||||
virtual void MakeFocus(bool state = true);
|
||||
virtual void AllAttached();
|
||||
virtual void AllDetached();
|
||||
virtual status_t GetSupportedSuites(BMessage *data);
|
||||
virtual void ResizeToPreferred();
|
||||
virtual void GetPreferredSize(float* _width, float* _height);
|
||||
virtual void MakeFocus(bool state = true);
|
||||
virtual void AllAttached();
|
||||
virtual void AllDetached();
|
||||
virtual status_t GetSupportedSuites(BMessage* data);
|
||||
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
virtual status_t Perform(perform_code d, void* arg);
|
||||
|
||||
#if DISABLES_ON_WINDOW_DEACTIVATION
|
||||
virtual void WindowActivated(bool active);
|
||||
virtual void WindowActivated(bool active);
|
||||
#endif
|
||||
|
||||
private:
|
||||
class Private;
|
||||
friend class Private;
|
||||
private:
|
||||
class Private;
|
||||
friend class Private;
|
||||
|
||||
friend status_t control_scrollbar(scroll_bar_info *info, BScrollBar *bar);
|
||||
// for use within the preflet
|
||||
friend status_t control_scrollbar(scroll_bar_info* info,
|
||||
BScrollBar *bar);
|
||||
// for use within the preflet
|
||||
|
||||
virtual void _ReservedScrollBar1();
|
||||
virtual void _ReservedScrollBar2();
|
||||
virtual void _ReservedScrollBar3();
|
||||
virtual void _ReservedScrollBar4();
|
||||
virtual void _ReservedScrollBar1();
|
||||
virtual void _ReservedScrollBar2();
|
||||
virtual void _ReservedScrollBar3();
|
||||
virtual void _ReservedScrollBar4();
|
||||
|
||||
BScrollBar &operator=(const BScrollBar &);
|
||||
// disabled
|
||||
BScrollBar& operator=(const BScrollBar& other);
|
||||
|
||||
bool _DoubleArrows() const;
|
||||
void _UpdateThumbFrame();
|
||||
float _ValueFor(BPoint where) const;
|
||||
int32 _ButtonFor(BPoint where) const;
|
||||
BRect _ButtonRectFor(int32 button) const;
|
||||
void _UpdateTargetValue(BPoint where);
|
||||
void _UpdateArrowButtons();
|
||||
void _DrawDisabledBackground(BRect area,
|
||||
const rgb_color& light, const rgb_color& dark,
|
||||
const rgb_color& fill);
|
||||
void _DrawArrowButton(int32 direction,
|
||||
bool doubleArrows, BRect frame,
|
||||
const BRect& updateRect,
|
||||
bool enabled, bool down);
|
||||
bool _DoubleArrows() const;
|
||||
void _UpdateThumbFrame();
|
||||
float _ValueFor(BPoint where) const;
|
||||
int32 _ButtonFor(BPoint where) const;
|
||||
BRect _ButtonRectFor(int32 button) const;
|
||||
void _UpdateTargetValue(BPoint where);
|
||||
void _UpdateArrowButtons();
|
||||
void _DrawDisabledBackground(BRect area,
|
||||
const rgb_color& light,
|
||||
const rgb_color& dark,
|
||||
const rgb_color& fill);
|
||||
void _DrawArrowButton(int32 direction,
|
||||
bool doubleArrows, BRect frame,
|
||||
const BRect& updateRect,
|
||||
bool enabled, bool down);
|
||||
|
||||
BSize _MinSize() const;
|
||||
BSize _MinSize() const;
|
||||
|
||||
float fMin;
|
||||
float fMax;
|
||||
float fSmallStep;
|
||||
float fLargeStep;
|
||||
float fValue;
|
||||
float fProportion;
|
||||
BView* fTarget;
|
||||
orientation fOrientation;
|
||||
char* fTargetName;
|
||||
float fMin;
|
||||
float fMax;
|
||||
float fSmallStep;
|
||||
float fLargeStep;
|
||||
float fValue;
|
||||
float fProportion;
|
||||
BView* fTarget;
|
||||
orientation fOrientation;
|
||||
char* fTargetName;
|
||||
|
||||
Private* fPrivateData;
|
||||
Private* fPrivateData;
|
||||
|
||||
uint32 _reserved[3];
|
||||
uint32 _reserved[3];
|
||||
};
|
||||
|
||||
#endif // _SCROLL_BAR_H
|
||||
|
||||
Reference in New Issue
Block a user