testimonyeditor.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 // testimonyeditor.h: the TestimonyEditor class
00021 
00022 #ifndef TESTIMONYEDITOR_H
00023 #define TESTIMONYEDITOR_H
00024 
00025 #include <gtkmm/checkbutton.h>
00026 #include <gtkmm/dialog.h>
00027 #include <gtkmm/entry.h>
00028 #include <gtkmm/frame.h>
00029 #include <gtkmm/label.h>
00030 #include <gtkmm/scrolledwindow.h>
00031 #include <gtkmm/textview.h>
00032 
00033 #include "case.h"
00034 #include "casecombobox.h"
00035 
00040 class TestimonyEditor: public Gtk::Dialog {
00041         public:
00048                 TestimonyEditor(const CharacterMap &chars, const LocationMap &locations, 
00049                                 const BufferMap &buffers, const StringVector &testimonyIds);
00050                 
00054                 void set_testimony(const Case::Testimony &testimony);
00055                 
00059                 Case::Testimony get_testimony_data();
00060                 
00061         private:
00067                 void construct(const CharacterMap &chars, const LocationMap &locations, const BufferMap &buffers);
00068                 
00072                 Case::TestimonyPiece create_testimony_piece();
00073                 
00075                 void update();
00076                 
00077                 // format title button click handler
00078                 void on_format_title_button_clicked();
00079                 
00080                 // previous piece button click handler
00081                 void on_prev_button_clicked();
00082                 
00083                 // next piece button click handler
00084                 void on_next_button_clicked();
00085                 
00086                 // append piece button click handler
00087                 void on_append_button_clicked();
00088                 
00089                 // insert piece button click handler
00090                 void on_insert_button_clicked();
00091                 
00092                 // delete piece button click handler
00093                 void on_delete_button_clicked();
00094                 
00095                 // amend button click handler
00096                 void on_amend_button_clicked();
00097                 
00098                 // id entry change handler
00099                 void on_id_entry_changed();
00100                 
00101                 // handler for populate signal from text view
00102                 void on_text_view_populate_menu(Gtk::Menu *menu);
00103                 
00104                 // present check button toggled
00105                 void on_present_toggled();
00106                 
00107                 // handler for right clicks on list
00108                 void on_list_button_pressed();
00109                 
00110                 // buttons
00111                 Gtk::Button *m_FormatTitleButton;
00112                 Gtk::Button *m_PrevButton;
00113                 Gtk::Button *m_NextButton;
00114                 Gtk::Button *m_AppendButton;
00115                 Gtk::Button *m_InsertButton;
00116                 Gtk::Button *m_DeleteButton;
00117                 Gtk::Button *m_AmendButton;
00118                 Gtk::Button *m_OKButton;
00119                 
00120                 // labels
00121                 Gtk::Label *m_IdLabel;
00122                 Gtk::Label *m_TitleLabel;
00123                 Gtk::Label *m_SpeakerLabel;
00124                 Gtk::Label *m_NextBlockLabel;
00125                 Gtk::Label *m_FollowLocLabel;
00126                 Gtk::Label *m_XExamineBlockLabel;
00127                 Gtk::Label *m_PieceLabel;
00128                 Gtk::Label *m_PressLabel;
00129                 
00130                 // text entries
00131                 Gtk::Entry *m_IdEntry;
00132                 Gtk::Entry *m_TitleEntry;
00133                 Gtk::Entry *m_PresentIdEntry;
00134                 
00135                 // combo boxes
00136                 CharComboBox *m_SpeakerCB;
00137                 BlockComboBox *m_PresentTargetCB;
00138                 BlockComboBox *m_PressCB;
00139                 BlockComboBox *m_NextBlockCB;
00140                 BlockComboBox *m_XExamineCB;
00141                 LocationComboBox *m_FollowLocCB;
00142                 
00143                 // check buttons
00144                 Gtk::CheckButton *m_HiddenCB;
00145                 Gtk::CheckButton *m_PresentLabelCB;
00146                 
00147                 // text view
00148                 Gtk::TextView *m_TextView;
00149                 
00150                 // containers
00151                 Gtk::ScrolledWindow *m_SWindow;
00152                 Gtk::Frame *m_PieceFrame;
00153                 
00155                 Case::Testimony m_Testimony;
00156                 
00158                 int m_CurPiece;
00159                 
00161                 StringVector m_Ids;
00162 };
00163 
00164 #endif

Generated on Fri Feb 22 22:34:17 2008 for Phoenix Wright Case Editor API by  doxygen 1.5.3