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 <Entry.h>
14#include <String.h>
15#include <View.h>
16
17
18enum {
19	kPositionCell,
20	kEncodingCell,
21	kFileStateCell,
22	kStatusCellCount
23};
24
25
26class BScrollView;
27
28class StatusView : public BView {
29public:
30							StatusView(BScrollView* fScrollView);
31							~StatusView();
32
33			void			SetStatus(BMessage* mesage);
34			void			SetRef(const entry_ref& ref);
35	virtual	void			AttachedToWindow();
36	virtual void			GetPreferredSize(float* _width, float* _height);
37	virtual	void			ResizeToPreferred();
38	virtual	void			Draw(BRect bounds);
39	virtual	void			MouseDown(BPoint point);
40
41private:
42			void			_ValidatePreferredSize();
43			void			_ShowDirMenu();
44
45private:
46			BScrollView*	fScrollView;
47			BSize			fPreferredSize;
48			BString			fCellText[kStatusCellCount];
49			float			fCellWidth[kStatusCellCount];
50			bool			fReadOnly;
51			bool			fCanUnlock;
52			BString			fEncoding;
53			entry_ref		fRef;
54};
55
56#endif  // STATUS_VIEW_H
57