1 /* 2 * MainWin.h - Media Player for the Haiku Operating System 3 * 4 * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de> 5 * 6 * Released under the terms of the MIT license. 7 */ 8 #ifndef __FILE_INFO_WIN_H 9 #define __FILE_INFO_WIN_H 10 11 12 #include <Window.h> 13 14 15 class BLayoutItem; 16 class BStringView; 17 class BTextView; 18 class Controller; 19 class ControllerObserver; 20 class IconView; 21 22 23 #define INFO_STATS 0x00000001 24 #define INFO_TRANSPORT 0x00000002 25 #define INFO_FILE 0x00000004 26 #define INFO_AUDIO 0x00000008 27 #define INFO_VIDEO 0x00000010 28 #define INFO_COPYRIGHT 0x00000020 29 30 #define INFO_ALL 0xffffffff 31 32 33 class InfoWin : public BWindow { 34 public: 35 InfoWin(BPoint leftTop, 36 Controller* controller); 37 virtual ~InfoWin(); 38 39 virtual void MessageReceived(BMessage* message); 40 virtual bool QuitRequested(); 41 virtual void Pulse(); 42 43 void Update(uint32 which = INFO_ALL); 44 45 private: 46 void _UpdateFile(); 47 void _UpdateVideo(); 48 void _UpdateAudio(); 49 void _UpdateDuration(); 50 void _UpdateCopyright(); 51 52 BStringView* _CreateLabel(const char* name, 53 const char* label); 54 BStringView* _CreateInfo(const char* name); 55 BLayoutItem* _CreateSeparator(); 56 void _SetVisible(BView* view, bool visible); 57 58 private: 59 Controller* fController; 60 ControllerObserver* fControllerObserver; 61 62 IconView* fIconView; 63 BStringView* fFilenameView; 64 65 BStringView* fContainerInfo; 66 BLayoutItem* fVideoSeparator; 67 BStringView* fVideoLabel; 68 BStringView* fVideoFormatInfo; 69 BStringView* fVideoConfigInfo; 70 BStringView* fDisplayModeLabel; 71 BStringView* fDisplayModeInfo; 72 BLayoutItem* fAudioSeparator; 73 BStringView* fAudioLabel; 74 BStringView* fAudioFormatInfo; 75 BStringView* fAudioConfigInfo; 76 BStringView* fDurationInfo; 77 BStringView* fLocationInfo; 78 BLayoutItem* fCopyrightSeparator; 79 BStringView* fCopyrightLabel; 80 BStringView* fCopyrightInfo; 81 }; 82 83 84 #endif // __FILE_INFO_WIN_H 85