-
-
Notifications
You must be signed in to change notification settings - Fork 338
/
StatusView.h
51 lines (40 loc) · 988 Bytes
/
StatusView.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
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright 2002-2012, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Vlad Slepukhin
* Siarzhuk Zharski
*/
#ifndef STATUS_VIEW_H
#define STATUS_VIEW_H
#include <String.h>
#include <View.h>
enum {
kPositionCell,
kEncodingCell,
kFileStateCell,
kStatusCellCount
};
class BScrollView;
class StatusView : public BView {
public:
StatusView(BScrollView* fScrollView);
~StatusView();
void SetStatus(BMessage* mesage);
virtual void AttachedToWindow();
virtual void GetPreferredSize(float* _width, float* _height);
virtual void ResizeToPreferred();
virtual void Draw(BRect bounds);
virtual void MouseDown(BPoint point);
private:
void _ValidatePreferredSize();
private:
BScrollView* fScrollView;
BSize fPreferredSize;
BString fCellText[kStatusCellCount];
float fCellWidth[kStatusCellCount];
bool fReadOnly;
BString fEncoding;
};
#endif // STATUS_VIEW_H