1 /* 2 * MainWin.h - Media Player for the Haiku Operating System 3 * 4 * Copyright (C) 2006 Marcus Overhagen <marcus@overhagen.de> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 * 19 */ 20 #ifndef __FILE_INFO_WIN_H 21 #define __FILE_INFO_WIN_H 22 23 24 #include <Window.h> 25 26 27 class BLayoutItem; 28 class BStringView; 29 class BTextView; 30 class Controller; 31 class ControllerObserver; 32 class IconView; 33 34 35 #define INFO_STATS 0x00000001 36 #define INFO_TRANSPORT 0x00000002 37 #define INFO_FILE 0x00000004 38 #define INFO_AUDIO 0x00000008 39 #define INFO_VIDEO 0x00000010 40 #define INFO_COPYRIGHT 0x00000020 41 42 #define INFO_ALL 0xffffffff 43 44 45 class InfoWin : public BWindow { 46 public: 47 InfoWin(BPoint leftTop, 48 Controller* controller); 49 virtual ~InfoWin(); 50 51 virtual void MessageReceived(BMessage* message); 52 virtual bool QuitRequested(); 53 virtual void Pulse(); 54 55 void Update(uint32 which = INFO_ALL); 56 57 private: 58 void _UpdateFile(); 59 void _UpdateVideo(); 60 void _UpdateAudio(); 61 void _UpdateDuration(); 62 void _UpdateCopyright(); 63 64 BStringView* _CreateLabel(const char* name, 65 const char* label); 66 BStringView* _CreateInfo(const char* name); 67 BLayoutItem* _CreateSeparator(); 68 void _SetVisible(BView* view, bool visible); 69 70 private: 71 Controller* fController; 72 ControllerObserver* fControllerObserver; 73 74 IconView* fIconView; 75 BStringView* fFilenameView; 76 77 BStringView* fContainerInfo; 78 BLayoutItem* fVideoSeparator; 79 BStringView* fVideoLabel; 80 BStringView* fVideoFormatInfo; 81 BStringView* fVideoConfigInfo; 82 BStringView* fDisplayModeLabel; 83 BStringView* fDisplayModeInfo; 84 BLayoutItem* fAudioSeparator; 85 BStringView* fAudioLabel; 86 BStringView* fAudioFormatInfo; 87 BStringView* fAudioConfigInfo; 88 BStringView* fDurationInfo; 89 BStringView* fLocationInfo; 90 BLayoutItem* fCopyrightSeparator; 91 BStringView* fCopyrightLabel; 92 BStringView* fCopyrightInfo; 93 }; 94 95 96 #endif // __FILE_INFO_WIN_H 97