SoundPreview.h

Go to the documentation of this file.
00001 #ifndef SOUNDSHADERPREVIEW_H_
00002 #define SOUNDSHADERPREVIEW_H_
00003 
00004 #include <string>
00005 
00006 // Forward declaration
00007 typedef struct _GtkWidget GtkWidget;
00008 typedef struct _GtkListStore GtkListStore;
00009 typedef struct _GtkTreeSelection GtkTreeSelection;
00010 typedef struct _GtkButton GtkButton;
00011 
00012 namespace ui
00013 {
00020     class SoundPreview
00021     {
00022             // The main container widget of this preview
00023             GtkWidget* _widget;
00024 
00025             GtkWidget* _playButton;
00026             GtkWidget* _stopButton;
00027             GtkWidget* _statusLabel;
00028 
00029             // The currently "previewed" soundfile
00030             std::string _soundFile;
00031 
00032         public:
00033             SoundPreview ();
00034 
00037             void setSound (const std::string& soundFile);
00038 
00042             operator GtkWidget* ();
00043 
00044         private:
00049             std::string getSelectedSoundFile ();
00050 
00053             GtkWidget* createControlPanel ();
00054 
00055             // GTK Callbacks
00056             static void onPlay (GtkButton* button, SoundPreview* self);
00057             static void onStop (GtkButton* button, SoundPreview* self);
00058     };
00059 
00060 } // namespace ui
00061 
00062 #endif /*SOUNDSHADERPREVIEW_H_*/

Generated by  doxygen 1.6.2