mainwindow.h

00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Mike Polan                                      *
00003  *   kanadakid@gmail.com                                                   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 // mainwindow.h: the MainWindow class
00021 
00022 #ifndef MAINWINDOW_H
00023 #define MAINWINDOW_H
00024 
00025 #include <gtkmm/actiongroup.h>
00026 #include <gtkmm/box.h>
00027 #include <gtkmm/button.h>
00028 #include <gtkmm/checkbutton.h>
00029 #include <gtkmm/label.h>
00030 #include <gtkmm/table.h>
00031 #include <gtkmm/uimanager.h>
00032 #include <gtkmm/window.h>
00033 
00034 // data gathered from frontend
00035 struct _PlayerParams {
00036         // the path to the case file
00037         Glib::ustring path;
00038         
00039         // switches to pass to player
00040         Glib::ustring params;
00041 };
00042 typedef struct _PlayerParams PlayerParams;
00043 
00044 // the core window of the frontend
00045 class MainWindow: public Gtk::Window {
00046         public:
00047                 // constructor
00048                 MainWindow();
00049                 
00050                 // get the selected options and case path
00051                 PlayerParams* get_params();
00052                 
00053         private:
00054                 // build the interface
00055                 void construct();
00056                 
00057                 // play button clicked
00058                 void on_play_clicked();
00059                 
00060                 // open handler
00061                 void on_open();
00062                 
00063                 // quit handler
00064                 void on_quit();
00065                 
00066                 // about handler
00067                 void on_about();
00068                 
00069                 // menu stuff
00070                 Glib::RefPtr<Gtk::ActionGroup> m_ActionGroup;
00071                 Glib::RefPtr<Gtk::UIManager> m_UIManager;
00072                 
00073                 // main layout box
00074                 Gtk::VBox *m_VB;
00075                 
00076                 // buttons
00077                 Gtk::Button *m_PlayButton;
00078                 
00079                 // labels
00080                 Gtk::Label *m_PathLabel;
00081                 Gtk::Label *m_EntryLabel;
00082                 
00083                 // check buttons
00084                 Gtk::CheckButton *m_NoSoundCB;
00085                 Gtk::CheckButton *m_DebugModeCB;
00086                 Gtk::CheckButton *m_FullscreenCB;
00087                 
00088                 // flag if the window was closed without clicking
00089                 // the run button
00090                 bool m_Closed;
00091 };
00092 
00093 #endif

Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3