libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / apps / mediaconverter / MediaFileInfoView.h
blobc2042082bad19a9c3da1567348968f5668fa8086
1 // Copyright 1999, Be Incorporated. All Rights Reserved.
2 // Copyright 2000-2004, Jun Suzuki. All Rights Reserved.
3 // Copyright 2007, Stephan Aßmus. All Rights Reserved.
4 // This file may be used under the terms of the Be Sample Code License.
5 #ifndef MEDIA_FILE_INFO_VIEW_H
6 #define MEDIA_FILE_INFO_VIEW_H
9 #include <Entry.h>
10 #include <View.h>
12 #include "MediaFileInfo.h"
15 class BMediaFile;
16 class BString;
18 class MediaFileInfoView : public BView {
19 public:
20 MediaFileInfoView();
21 virtual ~MediaFileInfoView();
23 virtual BSize MinSize();
24 virtual BSize MaxSize();
25 virtual BSize PreferredSize();
26 virtual BAlignment LayoutAlignment();
27 virtual void InvalidateLayout(bool children = false);
29 virtual void SetFont(const BFont* font,
30 uint32 mask = B_FONT_ALL);
32 protected:
33 virtual void Draw(BRect updateRect);
34 virtual void AttachedToWindow();
36 public:
37 void Update(BMediaFile* file, entry_ref* ref);
38 bigtime_t Duration() const
39 { return fInfo.useconds; }
41 private:
42 void _ValidateMinMax();
43 float _MaxLineWidth(BString* strings,
44 int32 stringCount, const BFont& font);
45 float _LineHeight();
46 void _SetFontFace(uint16 face);
48 bool fMinMaxValid;
49 BSize fMinSize;
50 float fMaxLabelWidth;
51 float fNoFileLabelWidth;
52 float fLineHeight;
53 entry_ref fRef;
54 BMediaFile* fMediaFile;
55 MediaFileInfo fInfo;
58 #endif // MEDIA_FILE_INFO_VIEW_H