1 /**App window for the FileSoundWindow test 2 @author Tim de Jong 3 @date 21/09/2002 4 @version 1.0 5 */ 6 7 #ifndef FILE_SOUND_WINDOW 8 #define FILE_SOUND_WINDOW 9 10 #include <Window.h> 11 #include <Rect.h> 12 #include <Message.h> 13 #include <FileGameSound.h> 14 #include <Entry.h> 15 #include <FilePanel.h> 16 //message constants 17 #define BROWSE_MSG 1 18 #define PLAY_MSG 2 19 #define PAUSE_MSG 3 20 #define LOOP_MSG 4 21 #define PRELOAD_MSG 5 22 #define DELAY_MSG 6 23 24 class FileSoundWindow : public BWindow 25 { 26 public: 27 FileSoundWindow(BRect windowBounds); 28 virtual ~FileSoundWindow(); 29 virtual void MessageReceived(BMessage *message); 30 virtual bool QuitRequested(); 31 private: 32 BCheckBox *loopCheck; 33 BCheckBox *preloadCheck; 34 BFileGameSound *fileSound; 35 BFilePanel *openPanel; 36 BTextControl *textControl; 37 BButton *playButton; 38 BButton *pauseButton; 39 BTextControl *delayControl; 40 //private variables 41 bool loop; 42 bool paused; 43 bool preload; 44 bool playing; 45 bigtime_t rampTime; 46 entry_ref fileref; 47 }; 48 #endif 49