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