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
12 #include "MediaFileInfo.h"
18 class MediaFileInfoView
: public BView
{
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
);
33 virtual void Draw(BRect updateRect
);
34 virtual void AttachedToWindow();
37 void Update(BMediaFile
* file
, entry_ref
* ref
);
38 bigtime_t
Duration() const
39 { return fInfo
.useconds
; }
42 void _ValidateMinMax();
43 float _MaxLineWidth(BString
* strings
,
44 int32 stringCount
, const BFont
& font
);
46 void _SetFontFace(uint16 face
);
51 float fNoFileLabelWidth
;
54 BMediaFile
* fMediaFile
;
58 #endif // MEDIA_FILE_INFO_VIEW_H