00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00078 void on_format_title_button_clicked();
00079
00080
00081 void on_prev_button_clicked();
00082
00083
00084 void on_next_button_clicked();
00085
00086
00087 void on_append_button_clicked();
00088
00089
00090 void on_insert_button_clicked();
00091
00092
00093 void on_delete_button_clicked();
00094
00095
00096 void on_amend_button_clicked();
00097
00098
00099 void on_id_entry_changed();
00100
00101
00102 void on_text_view_populate_menu(Gtk::Menu *menu);
00103
00104
00105 void on_present_toggled();
00106
00107
00108 void on_list_button_pressed();
00109
00110
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
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
00131 Gtk::Entry *m_IdEntry;
00132 Gtk::Entry *m_TitleEntry;
00133 Gtk::Entry *m_PresentIdEntry;
00134
00135
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
00144 Gtk::CheckButton *m_HiddenCB;
00145 Gtk::CheckButton *m_PresentLabelCB;
00146
00147
00148 Gtk::TextView *m_TextView;
00149
00150
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