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 17enum { 18 kPositionCell, 19 kEncodingCell, 20 kFileStateCell, 21 kStatusCellCount 22}; 23 24 25class BScrollView; 26 27class StatusView : public BView { 28public: 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 39private: 40 void _ValidatePreferredSize(); 41 42private: 43 BScrollView* fScrollView; 44 BSize fPreferredSize; 45 BString fCellText[kStatusCellCount]; 46 float fCellWidth[kStatusCellCount]; 47 bool fReadOnly; 48 BString fEncoding; 49}; 50 51#endif // STATUS_VIEW_H 52