BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / showimage / ShowImageStatusView.h
blob9c419c13128d34fa9c1999a6073d3871a6813dba
1 /*
2 * Copyright 2003-2010 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Fernando Francisco de Oliveira
7 * Michael Wilber
8 */
9 #ifndef SHOW_IMAGE_STATUS_VIEW_H
10 #define SHOW_IMAGE_STATUS_VIEW_H
13 #include <Entry.h>
14 #include <String.h>
15 #include <View.h>
18 enum {
19 kFrameSizeCell,
20 kZoomCell,
21 kPagesCell,
22 kImageTypeCell,
23 kStatusCellCount
27 class ShowImageStatusView : public BView {
28 public:
29 ShowImageStatusView(BScrollView* scrollView);
31 virtual void AttachedToWindow();
32 virtual void GetPreferredSize(float* _width, float* _height);
33 virtual void ResizeToPreferred();
34 virtual void Draw(BRect updateRect);
35 virtual void MouseDown(BPoint where);
37 void Update(const entry_ref& ref,
38 const BString& text, const BString& pages,
39 const BString& imageType, float zoom);
40 void SetZoom(float zoom);
41 private:
42 void _SetFrameText(const BString& text);
43 void _SetZoomText(float zoom);
44 void _SetPagesText(const BString& pages);
45 void _SetImageTypeText(const BString& imageType);
46 void _ValidatePreferredSize();
47 BScrollView* fScrollView;
48 BSize fPreferredSize;
49 BString fCellText[kStatusCellCount];
50 float fCellWidth[kStatusCellCount];
51 entry_ref fRef;
55 #endif // SHOW_IMAGE_STATUS_VIEW_H