Renamed BMenuScrollView to TScrollArrowView and moved it into Deskbar
Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works but the down arrow doesn't because the sibling menu is stealing the MouseDown event."
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Marc Flerackers ([email protected])
|
||||
* Stefano Ceccherini ([email protected])
|
||||
* John Scipione ([email protected])
|
||||
*/
|
||||
#ifndef MENU_SCROLL_VIEW_H
|
||||
#define MENU_SCROLL_VIEW_H
|
||||
|
||||
|
||||
#include <View.h>
|
||||
|
||||
class BLayout;
|
||||
class BMenu;
|
||||
class BMenuScroller;
|
||||
class BPoint;
|
||||
|
||||
|
||||
class BMenuScrollView : public BView {
|
||||
public:
|
||||
BMenuScrollView(BRect frame, BMenu* menu);
|
||||
virtual ~BMenuScrollView();
|
||||
|
||||
virtual void AttachedToWindow();
|
||||
virtual void DetachedFromWindow();
|
||||
|
||||
void AttachScrollers();
|
||||
void DetachScrollers();
|
||||
bool HasScrollers() const;
|
||||
|
||||
void SetSmallStep(float step);
|
||||
void GetSteps(float* _smallStep, float* _largeStep) const;
|
||||
|
||||
bool CheckForScrolling(const BPoint& cursor);
|
||||
bool TryScrollBy(const float& step);
|
||||
|
||||
protected:
|
||||
bool _Scroll(const BPoint& cursor);
|
||||
void _ScrollBy(const float& step);
|
||||
|
||||
private:
|
||||
BMenu* fMenu;
|
||||
BMenuScroller* fUpperScroller;
|
||||
BMenuScroller* fLowerScroller;
|
||||
|
||||
float fScrollStep;
|
||||
float fValue;
|
||||
float fLimit;
|
||||
};
|
||||
|
||||
|
||||
#endif // MENU_SCROLL_VIEW_H
|
||||
Reference in New Issue
Block a user