-
Notifications
You must be signed in to change notification settings - Fork 5
/
StackView.h
40 lines (30 loc) · 958 Bytes
/
StackView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef STACKVIEW_H
#define STACKVIEW_H
#include <InterfaceKit.h>
/* A small view that stack vertically his children's views.
Any subviews can sent him a RESTACK_MSG to force an stack layout update
*/
class StackView : public BView
{
public:
// Constructors, destructors, operators...
StackView(BRect frame, const char * name,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP);
typedef BView inherited;
enum {
RESTACK_MSG = 1
};
// Virtual function overrides
virtual void AddChild(BView * view);
virtual void TargetedByScrollView(BScrollView * scrollview);
virtual void FrameResized(float width, float height);
virtual void MessageReceived(BMessage *message);
// From here, it's none of your business! ;-)
private:
void SetupScroller();
BScrollView * m_scroller;
float m_height;
float m_width;
};
#endif // ifdef STACKVIEW_H