2012-12-22 21:51:08 +00:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
2015-05-30 09:10:58 +00:00
|
|
|
#include <Entry.h>
|
2012-12-22 21:51:08 +00:00
|
|
|
#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);
|
2015-05-30 09:10:58 +00:00
|
|
|
void SetRef(const entry_ref& ref);
|
2012-12-22 21:51:08 +00:00
|
|
|
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();
|
2015-05-30 09:10:58 +00:00
|
|
|
void _ShowDirMenu();
|
2012-12-22 21:51:08 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
BScrollView* fScrollView;
|
|
|
|
BSize fPreferredSize;
|
|
|
|
BString fCellText[kStatusCellCount];
|
|
|
|
float fCellWidth[kStatusCellCount];
|
|
|
|
bool fReadOnly;
|
2013-09-03 18:30:47 +00:00
|
|
|
bool fCanUnlock;
|
2013-01-16 13:51:41 +00:00
|
|
|
BString fEncoding;
|
2015-05-30 09:10:58 +00:00
|
|
|
entry_ref fRef;
|
2012-12-22 21:51:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // STATUS_VIEW_H
|