00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TRIGGERDIALOGS_H
00023 #define TRIGGERDIALOGS_H
00024
00025 #include <gtkmm/arrow.h>
00026 #include <gtkmm/comboboxtext.h>
00027 #include <gtkmm/dialog.h>
00028 #include <gtkmm/entry.h>
00029 #include <gtkmm/label.h>
00030 #include <gtkmm/listviewtext.h>
00031 #include <gtkmm/image.h>
00032 #include <gtkmm/notebook.h>
00033 #include <gtkmm/radiobutton.h>
00034 #include <gtkmm/scrolledwindow.h>
00035 #include <gtkmm/table.h>
00036 #include <gtkmm/textview.h>
00037
00038 #include "case.h"
00039 #include "casecombobox.h"
00040 #include "locationwidget.h"
00041 #include "triplet.h"
00042
00047 class AbstractDialog: public Gtk::Dialog {
00048 public:
00052 AbstractDialog(const Glib::ustring &trigger);
00053
00054 protected:
00055
00056 virtual void on_ok_button_clicked() { };
00057
00058
00059 virtual void on_cancel_button_clicked() { };
00060
00061
00062 Gtk::Label *m_TriggerLabel;
00063 };
00064
00065
00066
00069 class AddCourtRecDialog: public AbstractDialog {
00070 public:
00071
00072 enum Type { TYPE_ADD_EVIDENCE_SILENT, TYPE_ADD_EVIDENCE_ANIMATED, TYPE_ADD_PROFILE };
00073
00074
00075 struct _Data {
00076 Type type;
00077 Glib::ustring id;
00078 };
00079 typedef struct _Data Data;
00080
00081
00082 AddCourtRecDialog(const EvidenceMap &ev, const CharacterMap &chars);
00083
00084
00085 Data get_data() const;
00086
00087 protected:
00088
00089 void construct(const EvidenceMap &ev, const CharacterMap &chars);
00090
00091
00092 void on_combo_box_changed(const Glib::ustring &id);
00093
00094
00095 Gtk::Table* build_evidence_page(const EvidenceMap &ev);
00096
00097
00098 Gtk::Table* build_profile_page(const CharacterMap &chars);
00099
00100
00101 Gtk::Notebook *m_NB;
00102
00103
00104 Gtk::Label *m_EvidenceLabel;
00105 Gtk::Label *m_ProfileLabel;
00106 Gtk::Label *m_EvidencePreviewLabel;
00107 Gtk::Label *m_ProfilePreviewLabel;
00108
00109
00110 Gtk::CheckButton *m_EvidenceAnimCB;
00111
00112
00113 EvidenceComboBox *m_EvidenceCB;
00114 CharComboBox *m_ProfileCB;
00115
00116
00117 Gtk::Image *m_EvidenceImage;
00118 Gtk::Image *m_ProfileImage;
00119 };
00120
00121
00122
00125 class SpeakerDialog: public AbstractDialog {
00126 public:
00127
00128 SpeakerDialog(const CharacterMap &chars);
00129
00130
00131 Glib::ustring get_speaker();
00132
00133 protected:
00134
00135 void construct(const CharacterMap &chars);
00136
00137
00138 Gtk::Label *m_SpeakerLabel;
00139
00140
00141 CharComboBox *m_CharsCB;
00142 };
00143
00144
00145
00148 class GotoDialog: public AbstractDialog {
00149 public:
00150
00151 enum Type { GOTO_NORMAL, GOTO_DIRECT, GOTO_TIMED };
00152 typedef Triplet<Glib::ustring, Type, int> Data;
00153
00154
00155 GotoDialog(const BufferMap &blocks);
00156
00157
00158 Data get_data();
00159
00160 protected:
00161
00162 void construct(const BufferMap &blocks);
00163
00164
00165 void on_radio_button_toggled(const Glib::ustring &button);
00166
00167
00168 Gtk::RadioButtonGroup m_RadioGroup;
00169 Gtk::RadioButton *m_NormalRB;
00170 Gtk::RadioButton *m_DirectRB;
00171 Gtk::RadioButton *m_TimedRB;
00172
00173
00174 Gtk::Label *m_TypeLabel;
00175 Gtk::Label *m_TargetLabel;
00176 Gtk::Label *m_TimeLabel;
00177
00178
00179 Gtk::Entry *m_TimeEntry;
00180
00181
00182 BlockComboBox *m_BlockCB;
00183 };
00184
00185
00186
00189 class ShowEvidenceDialog: public AbstractDialog {
00190 public:
00191
00192 enum Type { TYPE_POS_LEFT, TYPE_POS_RIGHT };
00193 typedef std::pair<Glib::ustring, Type> Data;
00194
00195
00196 ShowEvidenceDialog(const EvidenceMap &ev);
00197
00198
00199 Data get_data() const;
00200
00201 protected:
00202
00203 void construct(const EvidenceMap &ev);
00204
00205
00206 void on_combo_box_changed();
00207
00208
00209 Gtk::RadioButtonGroup m_Group;
00210 Gtk::RadioButton *m_LeftRB;
00211 Gtk::RadioButton *m_RightRB;
00212
00213
00214 Gtk::Label *m_PositionLabel;
00215 Gtk::Label *m_EvidenceLabel;
00216 Gtk::Label *m_PreviewLabel;
00217
00218
00219 EvidenceComboBox *m_EvidenceCB;
00220
00221
00222 Gtk::Image *m_Image;
00223 };
00224
00225
00226
00229 class HideEvidenceDialog: public AbstractDialog {
00230 public:
00231 enum Type { TYPE_POS_LEFT, TYPE_POS_RIGHT };
00232
00233
00234 HideEvidenceDialog();
00235
00236
00237 Type get_position() const;
00238
00239 protected:
00240
00241 void construct();
00242
00243
00244 Gtk::RadioButtonGroup m_Group;
00245 Gtk::RadioButton *m_LeftRB;
00246 Gtk::RadioButton *m_RightRB;
00247
00248
00249 Gtk::Label *m_PositionLabel;
00250 };
00251
00252
00253
00256 class SetLocationDialog: public AbstractDialog {
00257 public:
00258
00259 SetLocationDialog(const LocationMap &locations);
00260
00261
00262 Glib::ustring get_location() const;
00263
00264 protected:
00265
00266 void construct(const LocationMap &locations);
00267
00268
00269 LocationWidget *m_LocWidget;
00270 };
00271
00272
00273
00276 class AddLocationDialog: public AbstractDialog {
00277 public:
00278
00279 AddLocationDialog(const LocationMap &locations);
00280
00281
00282 StringPair get_location_pair() const;
00283
00284 protected:
00285
00286 void construct(const LocationMap &locations);
00287
00288
00289 virtual void on_ok_button_clicked();
00290
00291
00292 Gtk::Label *m_TargetLabel;
00293 Gtk::Label *m_LocationLabel;
00294
00295
00296 LocationComboBox *m_TargetCB;
00297 LocationComboBox *m_LocationCB;
00298 };
00299
00300
00301
00304 class LocationTriggerDialog: public AbstractDialog {
00305 public:
00306
00307 LocationTriggerDialog(const LocationMap &locations, const BufferMap &buffers);
00308
00309
00310 StringPair get_selection() const;
00311
00312 protected:
00313
00314 void construct(const LocationMap &locations, const BufferMap &buffers);
00315
00316
00317 void on_text_block_combo_box_changed();
00318
00319
00320 Gtk::ScrolledWindow *m_SWindow;
00321
00322
00323 Gtk::Label *m_LocLabel;
00324 Gtk::Label *m_BlockLabel;
00325
00326
00327 LocationComboBox *m_LocationCB;
00328 BlockComboBox *m_BlockCB;
00329
00330
00331 Gtk::TextView *m_BlockView;
00332 };
00333
00334
00335
00338 class SetAnimationDialog: public AbstractDialog {
00339 public:
00340
00341 SetAnimationDialog(const CharacterMap &chars);
00342
00343
00344 StringPair get_selection() const;
00345
00346 protected:
00347
00348 void construct(const CharacterMap &chars);
00349
00350
00351 Gtk::Label *m_CharLabel;
00352 Gtk::Label *m_AnimLabel;
00353
00354
00355 Gtk::Entry *m_AnimEntry;
00356
00357
00358 CharComboBox *m_CharCB;
00359 };
00360
00361
00362
00365 class PutCharDialog: public AbstractDialog {
00366 public:
00367
00368 PutCharDialog(const CharacterMap &chars, const LocationMap &locations);
00369
00370
00371 StringPair get_selection() const;
00372
00373 protected:
00374
00375 void construct(const CharacterMap &chars, const LocationMap &locations);
00376
00377
00378 Gtk::Label *m_CharLabel;
00379
00380
00381 CharComboBox *m_CharCB;
00382
00383
00384 LocationWidget *m_LocWidget;
00385 };
00386
00387
00388
00391 class AddTalkDialog: public AbstractDialog {
00392 public:
00393
00394 AddTalkDialog(const CharacterMap &chars, const BufferMap &buffers);
00395
00396
00397 StringTriplet get_data() const;
00398
00399 protected:
00400
00401 void construct(const CharacterMap &chars, const BufferMap &buffers);
00402
00403
00404 Gtk::Label *m_CharLabel;
00405 Gtk::Label *m_ViewLabel;
00406 Gtk::Label *m_BlockLabel;
00407
00408
00409 CharComboBox *m_CharCB;
00410 BlockComboBox *m_BlockCB;
00411
00412
00413 Gtk::Entry *m_ViewEntry;
00414 };
00415
00416
00417
00420 class RemoveTalkDialog: public AbstractDialog {
00421 public:
00422
00423 RemoveTalkDialog(const CharacterMap &chars);
00424
00425
00426 StringPair get_data() const;
00427
00428 protected:
00429
00430 void construct(const CharacterMap &chars);
00431
00432
00433 Gtk::Label *m_CharLabel;
00434 Gtk::Label *m_ViewLabel;
00435
00436
00437 CharComboBox *m_CharCB;
00438
00439
00440 Gtk::Entry *m_ViewEntry;
00441 };
00442
00443
00444
00447 class ClearCharDialog: public AbstractDialog {
00448 public:
00449
00450 ClearCharDialog(const Glib::ustring &trigger, const CharacterMap &chars);
00451
00452
00453 Glib::ustring get_character() const;
00454
00455 protected:
00456
00457 void construct(const CharacterMap &chars);
00458
00459
00460 Gtk::Label *m_CharLabel;
00461
00462
00463 CharComboBox *m_CharCB;
00464 };
00465
00466
00467
00470 class AddPresentDialog: public AbstractDialog {
00471 public:
00472
00473 AddPresentDialog(const CharacterMap &chars, const BufferMap &buffers);
00474
00475
00476 StringTriplet get_data() const;
00477
00478 protected:
00479
00480 void construct(const CharacterMap &chars, const BufferMap &buffers);
00481
00482
00483 Gtk::Label *m_CharLabel;
00484 Gtk::Label *m_ItemLabel;
00485 Gtk::Label *m_BlockLabel;
00486
00487
00488 CharComboBox *m_CharCB;
00489 BlockComboBox *m_BlockCB;
00490
00491
00492 Gtk::Entry *m_ItemEntry;
00493 };
00494
00495
00496
00499 class RemovePresentDialog: public AbstractDialog {
00500 public:
00501
00502 RemovePresentDialog(const CharacterMap &chars);
00503
00504
00505 StringPair get_data() const;
00506
00507 protected:
00508
00509 void construct(const CharacterMap &chars);
00510
00511
00512 Gtk::Label *m_CharLabel;
00513 Gtk::Label *m_ItemLabel;
00514
00515
00516 CharComboBox *m_CharCB;
00517
00518
00519 Gtk::Entry *m_ItemEntry;
00520 };
00521
00522
00523
00526 class BadPresentDialog: public AbstractDialog {
00527 public:
00528
00529 BadPresentDialog(const CharacterMap &chars, const BufferMap &buffers);
00530
00531
00532 StringPair get_data() const;
00533
00534 protected:
00535
00536 void construct(const CharacterMap &chars, const BufferMap &buffers);
00537
00538
00539 Gtk::Label *m_CharLabel;
00540 Gtk::Label *m_BlockLabel;
00541
00542
00543 CharComboBox *m_CharCB;
00544 BlockComboBox *m_BlockCB;
00545 };
00546
00547
00548
00551 class LocMusicDialog: public AbstractDialog {
00552 public:
00553
00554 LocMusicDialog(const LocationMap &locations, const AudioMap &audio);
00555
00556
00557 StringPair get_data() const;
00558
00559 protected:
00560
00561 void construct(const LocationMap &locations, const AudioMap &audio);
00562
00563
00564 Gtk::Label *m_MusicLabel;
00565
00566
00567 AudioComboBox *m_AudioCB;
00568
00569
00570 LocationWidget *m_LocWidget;
00571 };
00572
00573
00574
00577 class MusicDialog: public AbstractDialog {
00578 public:
00579
00580 MusicDialog(const AudioMap &audio);
00581
00582
00583 Glib::ustring get_audio() const;
00584
00585 protected:
00586
00587 void construct(const AudioMap &audio);
00588
00589
00590 Gtk::Label *m_MusicLabel;
00591
00592
00593 AudioComboBox *m_AudioCB;
00594 };
00595
00596
00597
00600 class ReqEvidenceDialog: public AbstractDialog {
00601 public:
00602
00603 ReqEvidenceDialog(const BufferMap &buffers);
00604
00605
00606 StringTriplet get_data() const;
00607
00608 protected:
00609
00610 void construct(const BufferMap &buffers);
00611
00612
00613 BlockComboBox *m_CorrectCB;
00614 BlockComboBox *m_WrongCB;
00615
00616
00617 Gtk::Label *m_EvidenceLabel;
00618 Gtk::Label *m_CorrectLabel;
00619 Gtk::Label *m_WrongLabel;
00620
00621
00622 Gtk::Entry *m_EvidenceEntry;
00623 };
00624
00625
00626
00629 class ReqAnswerDialog: public AbstractDialog {
00630 public:
00631
00632 ReqAnswerDialog();
00633
00634
00635 std::vector<StringPair> get_talk_options() const;
00636
00637 protected:
00638
00639 void construct();
00640
00641
00642 void on_add_button_clicked();
00643
00644
00645 void on_remove_button_clicked();
00646
00647
00648 Gtk::ScrolledWindow *m_SWindow;
00649
00650
00651 Gtk::ListViewText *m_TalkList;
00652
00653
00654 Gtk::Button *m_AddButton;
00655 Gtk::Button *m_RemoveButton;
00656 };
00657
00658
00659
00662 class CourtCamDialog: public AbstractDialog {
00663 public:
00664
00665 CourtCamDialog();
00666
00667
00668 StringPair get_data() const;
00669
00670 protected:
00671
00672 void construct();
00673
00674
00675 Gtk::ComboBoxText *m_FromCB;
00676 Gtk::ComboBoxText *m_ToCB;
00677
00678
00679 Gtk::Label *m_FromLabel;
00680 Gtk::Label *m_ToLabel;
00681
00682
00683 Gtk::Arrow *m_Arrow;
00684 };
00685
00686
00687
00690 class FadeDialog: public AbstractDialog {
00691 public:
00692
00693 FadeDialog();
00694
00695
00696 Glib::ustring get_selection() const;
00697
00698 protected:
00699
00700 void construct();
00701
00702
00703 Gtk::RadioButtonGroup m_Group;
00704 Gtk::RadioButton *m_TopRB;
00705 Gtk::RadioButton *m_BottomRB;
00706 Gtk::RadioButton *m_BothRB;
00707 };
00708
00709
00710
00713 class OverImageDialog: public AbstractDialog {
00714 public:
00715
00716 OverImageDialog(const ImageMap &images);
00717
00718
00719 StringPair get_data() const;
00720
00721 protected:
00722
00723 void construct(const ImageMap &images);
00724
00725
00726 void on_combo_box_changed();
00727
00728
00729 Gtk::Label *m_ImageLabel;
00730 Gtk::Label *m_PreviewLabel;
00731 Gtk::Label *m_LocLabel;
00732
00733
00734 Gtk::ScrolledWindow *m_SWindow;
00735
00736
00737 ImgComboBox *m_ImgCB;
00738
00739
00740 Gtk::Image *m_Image;
00741
00742
00743 Gtk::RadioButtonGroup m_Group;
00744 Gtk::RadioButton *m_ProsecutorRB;
00745 Gtk::RadioButton *m_WitnessRB;
00746 Gtk::RadioButton *m_DefenseRB;
00747 Gtk::RadioButton *m_JudgeRB;
00748 };
00749
00750
00751
00754 class TempImgDialog: public AbstractDialog {
00755 public:
00756
00757 TempImgDialog(const ImageMap &map);
00758
00759
00760 Glib::ustring get_image() const;
00761
00762 protected:
00763
00764 void construct(const ImageMap &map);
00765
00766
00767 void on_combo_box_changed();
00768
00769
00770 Gtk::Label *m_ImgLabel;
00771 Gtk::Label *m_PreviewLabel;
00772
00773
00774 ImgComboBox *m_ImgCB;
00775
00776
00777 Gtk::ScrolledWindow *m_SWindow;
00778
00779
00780 Gtk::Image *m_Image;
00781 };
00782
00783
00784
00787 class DisplayTestimonyDialog: public AbstractDialog {
00788 public:
00789
00790 DisplayTestimonyDialog(const TestimonyMap &map);
00791
00792
00793 Glib::ustring get_testimony() const;
00794
00795 protected:
00796
00797 void construct(const TestimonyMap &map);
00798
00799
00800 Gtk::Label *m_TestimonyLabel;
00801
00802
00803 Gtk::ComboBoxText *m_TestimonyCB;
00804 };
00805
00806
00807
00810 class EditRecItemDialog: public AbstractDialog {
00811 public:
00812
00813 struct _Data {
00814 Glib::ustring id;
00815 Glib::ustring name;
00816 Glib::ustring gender;
00817 Glib::ustring caption;
00818 Glib::ustring desc;
00819 };
00820 typedef struct _Data Data;
00821
00822
00823 enum Mode { MODE_EVIDENCE=0, MODE_CHARACTER };
00824
00825
00826 EditRecItemDialog(const CharacterMap &chars);
00827
00828
00829 EditRecItemDialog(const EvidenceMap &map);
00830
00831
00832 Data get_data() const;
00833
00834 private:
00835
00836 void construct(const CharacterMap &chars);
00837
00838
00839 void construct(const EvidenceMap &evidence);
00840
00841
00842 void construct_internal();
00843
00844
00845 void on_combo_box_changed();
00846
00847
00848 void on_button_toggled(const Glib::ustring &button);
00849
00850
00851 Mode m_Mode;
00852
00853
00854 Gtk::Table *m_Table;
00855
00856
00857 Gtk::Label *m_ItemLabel;
00858
00859
00860 Gtk::Entry *m_NameEntry;
00861 Gtk::Entry *m_CaptionEntry;
00862 Gtk::Entry *m_DescEntry;
00863
00864
00865 CharComboBox *m_CharCB;
00866 EvidenceComboBox *m_EvidenceCB;
00867 Gtk::ComboBoxText *m_GenderCB;
00868
00869
00870 Gtk::CheckButton *m_NameCB;
00871 Gtk::CheckButton *m_CGenderCB;
00872 Gtk::CheckButton *m_CaptionCB;
00873 Gtk::CheckButton *m_DescCB;
00874 };
00875
00876 #endif