xref: /haiku/src/apps/stylededit/StatusView.h (revision 4b7e219688450694efc9d1890f83f816758c16d3)
1 /*
2  * Copyright 2002-2012, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Vlad Slepukhin
7  *		Siarzhuk Zharski
8  */
9 #ifndef STATUS_VIEW_H
10 #define STATUS_VIEW_H
11 
12 
13 #include <String.h>
14 #include <View.h>
15 
16 
17 enum {
18 	kPositionCell,
19 	kEncodingCell,
20 	kFileStateCell,
21 	kStatusCellCount
22 };
23 
24 
25 class BScrollView;
26 
27 class StatusView : public BView {
28 public:
29 							StatusView(BScrollView* fScrollView);
30 							~StatusView();
31 
32 			void			SetStatus(BMessage* mesage);
33 	virtual	void			AttachedToWindow();
34 	virtual void			GetPreferredSize(float* _width, float* _height);
35 	virtual	void			ResizeToPreferred();
36 	virtual	void			Draw(BRect bounds);
37 	virtual	void			MouseDown(BPoint point);
38 
39 private:
40 			void			_ValidatePreferredSize();
41 
42 private:
43 			BScrollView*	fScrollView;
44 			BSize			fPreferredSize;
45 			BString			fCellText[kStatusCellCount];
46 			float			fCellWidth[kStatusCellCount];
47 			bool			fReadOnly;
48 			bool			fCanUnlock;
49 			BString			fEncoding;
50 };
51 
52 #endif  // STATUS_VIEW_H
53