dialogs.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 // dialogs.h: various small dialogs
00021 
00022 #ifndef DIALOGS_H
00023 #define DIALOGS_H
00024 
00025 #include <gtkmm/button.h>
00026 #include <gtkmm/comboboxtext.h>
00027 #include <gtkmm/dialog.h>
00028 #include <gtkmm/entry.h>
00029 #include <gtkmm/image.h>
00030 #include <gtkmm/label.h>
00031 #include <gtkmm/liststore.h>
00032 #include <gtkmm/listviewtext.h>
00033 #include <gtkmm/notebook.h>
00034 #include <gtkmm/progressbar.h>
00035 #include <gtkmm/scale.h>
00036 #include <gtkmm/scrolledwindow.h>
00037 #include <gtkmm/textbuffer.h>
00038 #include <gtkmm/textview.h>
00039 #include <gtkmm/togglebutton.h>
00040 
00041 #include "case.h"
00042 #include "casecombobox.h"
00043 #include "character.h"
00044 #include "colorwidget.h"
00045 #include "hotspotwidget.h"
00046 
00049 class ChangeSpeedDialog: public Gtk::Dialog {
00050         public:
00052                 ChangeSpeedDialog();
00053                 
00057                 Glib::ustring get_text_speed();
00058                 
00059         private:
00060                 // build the ui
00061                 void construct();
00062                 
00063                 // handler for value changes in slider
00064                 void on_value_changed();
00065                 
00066                 // buttons
00067                 Gtk::Button *m_OKButton;
00068                 
00069                 // labels
00070                 Gtk::Label *m_SlowerLabel;
00071                 Gtk::Label *m_FasterLabel;
00072                 
00073                 // scale for selecting value
00074                 Gtk::HScale *m_Scale;
00075 };
00076 
00077 /***************************************************************************/
00078 
00081 class ChangeColorDialog: public Gtk::Dialog {
00082         public:
00084                 ChangeColorDialog();
00085                 
00089                 Glib::ustring get_color();
00090                 
00091         private:
00092                 // build the ui
00093                 void construct();
00094                 
00095                 // buttons containing colors
00096                 Gtk::RadioButton *m_BlueButton;
00097                 Gtk::RadioButton *m_GreenButton;
00098                 Gtk::RadioButton *m_OrangeButton;
00099                 Gtk::RadioButton *m_WhiteButton;
00100                 
00101                 // radio buttons
00102                 Gtk::RadioButtonGroup m_Group;
00103 };
00104 
00105 /***************************************************************************/
00106 
00109 class ProgressDialog: public Gtk::Dialog {
00110         public:
00114                 ProgressDialog(const Glib::ustring &label);
00115                 
00119                 void set_progress(double amount);
00120                 
00121         private:
00122                 // build the ui
00123                 void construct();
00124                 
00125                 // label
00126                 Gtk::Label *m_Label;
00127                 
00128                 // progress bar
00129                 Gtk::ProgressBar *m_ProgBar;
00130 };
00131 
00132 /***************************************************************************/
00133 
00136 class TestimonyManager: public Gtk::Dialog {
00137         public:
00142                 TestimonyManager(const TestimonyMap &tmap, const StringVector &testimonyIds);
00143                 
00147                 TestimonyMap get_testimonies() const { return m_Testimonies; }
00148                 
00149         private:
00150                 // build the ui
00151                 void construct();
00152                 
00153                 // add button click handler
00154                 void on_add_button_clicked();
00155                 
00156                 // edit button click handler
00157                 void on_edit_button_clicked();
00158                 
00159                 // delete button click handler
00160                 void on_delete_button_clicked();
00161                 
00162                 // selection change handler
00163                 void on_selection_changed();
00164                 
00165                 // labels
00166                 Gtk::Label *m_TitleLabel;
00167                 Gtk::Label *m_PreviewLabel;
00168                 
00169                 // buttons
00170                 Gtk::Button *m_AddButton;
00171                 Gtk::Button *m_EditButton;
00172                 Gtk::Button *m_DeleteButton;
00173                 
00174                 // list view for list and its container
00175                 Gtk::ScrolledWindow *m_SWindow;
00176                 Gtk::ListViewText *m_ListView;
00177                 
00178                 // internal record of testimonies
00179                 TestimonyMap m_Testimonies;
00180                 StringVector m_Ids;
00181 };
00182 
00183 /***************************************************************************/
00184 
00187 class ImageDialog: public Gtk::Dialog {
00188         public:
00193                 ImageDialog(const ImageMap &imap, const StringVector &imgIds);
00194                 
00198                 ImageMap get_images() const { return m_Images; }
00199                 
00200         private:
00201                 // build the ui
00202                 void construct();
00203                 
00204                 // add image handler
00205                 void on_add_clicked();
00206                 
00207                 // remove image handler
00208                 void on_delete_clicked();
00209                 
00210                 // selection change handler
00211                 void on_selection_changed();
00212                 
00213                 // labels
00214                 Gtk::Label *m_ImageLabel;
00215                 Gtk::Label *m_PreviewLabel;
00216                 
00217                 // buttons
00218                 Gtk::Button *m_AddButton;
00219                 Gtk::Button *m_DeleteButton;
00220                 
00221                 // scrolled window container
00222                 Gtk::ScrolledWindow *m_SWindow;
00223                 
00224                 // list of images
00225                 Gtk::ListViewText *m_ImageList;
00226                 
00227                 // preview image
00228                 Gtk::Image *m_Image;
00229                 
00230                 // record of images
00231                 ImageMap m_Images;
00232                 StringVector m_ImageIds;
00233 };
00234 
00235 /***************************************************************************/
00236 
00239 class NewHotspotDialog: public Gtk::Dialog {
00240         public:
00242                 NewHotspotDialog();
00243                 
00247                 void set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf> &pixbuf) { m_HSWidget->set_image(pixbuf); }
00248                 
00252                 Case::Hotspot get_hotspot();
00253                 
00254         private:
00255                 // build the ui
00256                 void construct();
00257                 
00258                 // signal handler for point changes
00259                 void on_point_changed(int x, int y);
00260                 
00261                 // signal handler for dimension changes
00262                 void on_dimensions_changed(int w, int h);
00263                 
00264                 // handler for coordinate entry changes
00265                 void on_coord_entry_changed();
00266                 
00267                 // handler for dimension entry changes
00268                 void on_dimension_entry_changed();
00269                 
00270                 // labels
00271                 Gtk::Label *m_XLabel;
00272                 Gtk::Label *m_YLabel;
00273                 Gtk::Label *m_WLabel;
00274                 Gtk::Label *m_HLabel;
00275                 Gtk::Label *m_BlockLabel;
00276                 
00277                 // entries
00278                 Gtk::Entry *m_XEntry;
00279                 Gtk::Entry *m_YEntry;
00280                 Gtk::Entry *m_WEntry;
00281                 Gtk::Entry *m_HEntry;
00282                 Gtk::Entry *m_BlockEntry;
00283                 
00284                 // widget to visually edit the hotspot
00285                 HotspotWidget *m_HSWidget;
00286 };
00287 
00288 /***************************************************************************/
00289 
00292 class LocationsDialog: public Gtk::Dialog {
00293         public:
00299                 LocationsDialog(const LocationMap &locations, const BackgroundMap &bgs, const StringVector &usedIds);
00300                 
00304                 LocationMap get_locations() const { return m_Locations; }
00305                 
00306         private:
00307                 // build the ui
00308                 void construct();
00309                 
00310                 // add a location
00311                 void on_add();
00312                 
00313                 // remove a location
00314                 void on_delete();
00315                 
00316                 // add a hotspot
00317                 void on_add_hotspot();
00318                 
00319                 // remove a hotspot
00320                 void on_delete_hotspot();
00321                 
00322                 // amend button click handler
00323                 void on_amend_button_clicked();
00324                 
00325                 // row changes handler
00326                 void on_selection_changed();
00327                 
00328                 // buttons
00329                 Gtk::Button *m_AddButton;
00330                 Gtk::Button *m_DeleteButton;
00331                 Gtk::Button *m_AddHSButton;
00332                 Gtk::Button *m_DeleteHSButton;
00333                 Gtk::Button *m_AmendButton;
00334                 
00335                 // labels
00336                 Gtk::Label *m_LocationsLabel;
00337                 Gtk::Label *m_DetailsLabel;
00338                 Gtk::Label *m_IdLabel;
00339                 Gtk::Label *m_NameLabel;
00340                 Gtk::Label *m_BGLabel;
00341                 Gtk::Label *m_HotspotsLabel;
00342                 
00343                 // entries
00344                 Gtk::Entry *m_IdEntry;
00345                 Gtk::Entry *m_NameEntry;
00346                 Gtk::Entry *m_BGEntry;
00347                 
00348                 // scrolled windows
00349                 Gtk::ScrolledWindow *m_SWindow;
00350                 Gtk::ScrolledWindow *m_HotspotSWindow;
00351                 
00352                 // tree model and view
00353                 Gtk::TreeView *m_TreeView;
00354                 Glib::RefPtr<Gtk::ListStore> m_Model;
00355                 
00356                 // column record
00357                 class ColumnRec: public Gtk::TreeModel::ColumnRecord {
00358                         public:
00359                                 // constructor
00360                                 ColumnRec() {
00361                                         add(m_Column);
00362                                 }
00363                                 
00364                                 // columns
00365                                 Gtk::TreeModelColumn<Glib::ustring> m_Column;
00366                 };
00367                 
00368                 // column record instance
00369                 ColumnRec m_ColumnRec;
00370                 
00371                 // list view for hotspots
00372                 Gtk::ListViewText *m_HotspotList;
00373                 
00374                 // stored location data
00375                 LocationMap m_Locations;
00376                 BackgroundMap m_Backgrounds;
00377                 StringVector m_UsedIds;
00378 };
00379 
00380 /***************************************************************************/
00381 
00384 class SpriteChooserDialog: public Gtk::Dialog {
00385         public:
00387                 enum SpriteMode { SPRITE_NEW=0, SPRITE_EXISTING, SPRITE_FROM_GIFS };
00388                 
00390                 SpriteChooserDialog();
00391                 
00395                 SpriteMode get_sprite_mode() const;
00396                 
00400                 Glib::ustring get_path() const { return m_PathEntry->get_text(); }
00401                 
00402         private:
00403                 // build the ui
00404                 void construct();
00405                 
00406                 // browse button click handler
00407                 void on_browse_button_clicked();
00408                 
00409                 // new sprite radio button toggle handler
00410                 void on_new_sprite_toggled();
00411                 
00412                 // open sprite radio button toggle handler
00413                 void on_open_sprite_toggled();
00414                 
00415                 // from gif files radio buttons toggle handler
00416                 void on_from_gifs_toggled();
00417                 
00418                 // radio buttons
00419                 Gtk::RadioButtonGroup m_Group;
00420                 Gtk::RadioButton *m_NewSpriteRB;
00421                 Gtk::RadioButton *m_OpenSpriteRB;
00422                 Gtk::RadioButton *m_CreateFromGifsRB;
00423                 
00424                 // labels
00425                 Gtk::Label *m_SpriteLabel;
00426                 Gtk::Label *m_PathLabel;
00427                 
00428                 // entry
00429                 Gtk::Entry *m_PathEntry;
00430                 
00431                 // buttons
00432                 Gtk::Button *m_BrowseButton;
00433 };
00434 
00435 /***************************************************************************/
00436 
00440 class TextInputDialog: public Gtk::Dialog {
00441         public:
00446                 TextInputDialog(const Glib::ustring &label="Input text:", const Glib::ustring &defaultValue="");
00447                 
00451                 Glib::ustring get_text() const { return m_Entry->get_text(); }
00452                 
00453         private:
00454                 // build the ui
00455                 void construct(const Glib::ustring &label, const Glib::ustring &defaultValue);
00456                 
00457                 // labels
00458                 Gtk::Label *m_Label;
00459                 
00460                 // entries
00461                 Gtk::Entry *m_Entry;
00462 };
00463 
00464 /***************************************************************************/
00465 
00468 class AudioDialog: public Gtk::Dialog {
00469         public:
00471                 AudioDialog();
00472                 
00476                 void set_audio(const AudioMap &audio);
00477                 
00481                 AudioMap get_audio_data();
00482                 
00483         private:
00484                 // build the ui
00485                 void construct();
00486                 
00487                 // add button handler
00488                 void on_add_audio();
00489                 
00490                 // delete button handler
00491                 void on_remove_audio();
00492                 
00493                 // labels
00494                 Gtk::Label *m_AudioLabel;
00495                 
00496                 // containers
00497                 Gtk::ScrolledWindow *m_SWindow;
00498                 
00499                 // buttons
00500                 Gtk::Button *m_AddButton;
00501                 Gtk::Button *m_DeleteButton;
00502                 
00503                 // list of audio files
00504                 Glib::RefPtr<Gtk::ListStore> m_Model;
00505                 Gtk::TreeView *m_AudioList;
00506                 
00507                 // column record
00508                 class ColumnRec: public Gtk::TreeModel::ColumnRecord {
00509                         public:
00510                                 ColumnRec() {
00511                                         add(m_NameCol);
00512                                         add(m_IdCol);
00513                                 }
00514                                 
00515                                 // columns
00516                                 Gtk::TreeModelColumn<Glib::ustring> m_NameCol;
00517                                 Gtk::TreeModelColumn<Glib::ustring> m_IdCol;
00518                 };
00519                 
00520                 // column record instance
00521                 ColumnRec m_ColRec;
00522 };
00523 
00524 /***************************************************************************/
00525 
00528 class NewEvidenceDialog: public Gtk::Dialog {
00529         public:
00533                 NewEvidenceDialog(const StringVector &ids);
00534                 
00538                 Case::Evidence get_evidence_data();
00539                 
00543                 Glib::ustring get_image_path() const { return m_PathEntry->get_text(); }
00544                 
00545         private:
00546                 // build the ui
00547                 void construct();
00548                 
00549                 // id text changes handler
00550                 void on_id_changed();
00551                 
00552                 // browse button clicks
00553                 void on_browse_button_clicked();
00554                 
00555                 // labels
00556                 Gtk::Label *m_PathLabel;
00557                 Gtk::Label *m_IdLabel;
00558                 
00559                 // entries
00560                 Gtk::Entry *m_PathEntry;
00561                 Gtk::Entry *m_IdEntry;
00562                 
00563                 // buttons
00564                 Gtk::Button *m_BrowseButton;
00565                 Gtk::Button *m_OKButton;
00566                 
00567                 // record of used evidence ids
00568                 StringVector m_UsedIds;
00569 };
00570 
00571 /***************************************************************************/
00572 
00575 class EvidenceDialog: public Gtk::Dialog {
00576         public:
00582                 EvidenceDialog(const EvidenceMap &evidence,
00583                                const ImageMap &images,
00584                                const StringVector &evidenceIds);
00585                 
00589                 EvidenceMap get_evidence() const { return m_Evidence; }
00590                 
00591         private:
00592                 // build the ui
00593                 void construct(const ImageMap &images);
00594                 
00595                 // has check image button toggled
00596                 void on_check_img_toggled();
00597                 
00598                 // add a background
00599                 void on_add();
00600                 
00601                 // remove a background
00602                 void on_delete();
00603                 
00604                 // amend button click handler
00605                 void on_amend_button_clicked();
00606                 
00607                 // row changes handler
00608                 void on_selection_changed();
00609                 
00610                 // tree view and model for managing assets
00611                 Gtk::TreeView *m_TreeView;
00612                 Glib::RefPtr<Gtk::ListStore> m_Model;
00613                 
00614                 // labels
00615                 Gtk::Label *m_EvidenceLabel;
00616                 Gtk::Label *m_PreviewLabel;
00617                 Gtk::Label *m_InternalLabel;
00618                 Gtk::Label *m_NameLabel;
00619                 Gtk::Label *m_CaptionLabel;
00620                 Gtk::Label *m_DescLabel;
00621                 
00622                 // scrolled window container
00623                 Gtk::ScrolledWindow *m_SWindow;
00624                 
00625                 // image for previews
00626                 Gtk::Image *m_Image;
00627                 
00628                 // entries
00629                 Gtk::Entry *m_InternalEntry;
00630                 Gtk::Entry *m_NameEntry;
00631                 Gtk::Entry *m_CaptionEntry;
00632                 Gtk::Entry *m_DescEntry;
00633                 
00634                 // check buttons
00635                 Gtk::CheckButton *m_HasImgCB;
00636                 
00637                 // combo boxes
00638                 ImgComboBox *m_ImgCB;
00639                 
00640                 // buttons
00641                 Gtk::Button *m_AddButton;
00642                 Gtk::Button *m_DeleteButton;
00643                 Gtk::Button *m_AmendButton;
00644                 
00645                 // column record
00646                 class ColumnRec: public Gtk::TreeModel::ColumnRecord {
00647                         public:
00648                                 // constructor
00649                                 ColumnRec() {
00650                                         add(m_Column);
00651                                 }
00652                                 
00653                                 // columns
00654                                 Gtk::TreeModelColumn<Glib::ustring> m_Column;
00655                 };
00656                 
00657                 // column record instance
00658                 ColumnRec m_ColumnRec;
00659                 
00660                 // record of evidence data
00661                 EvidenceMap m_Evidence;
00662                 StringVector m_EvidenceIds;
00663 };
00664 
00665 /***************************************************************************/
00666 
00669 class BackgroundsDialog: public Gtk::Dialog {
00670         public:
00675                 BackgroundsDialog(const BackgroundMap &bgs,
00676                                   const StringVector &bgIds);
00677                 
00681                 BackgroundMap get_backgrounds() const { return m_Backgrounds; }
00682                 
00683         private:
00684                 // build the ui
00685                 void construct();
00686                 
00687                 // add a background
00688                 void on_add();
00689                 
00690                 // remove a background
00691                 void on_delete();
00692                 
00693                 // row changes handler
00694                 void on_selection_changed();
00695                 
00696                 // scrolled window container
00697                 Gtk::ScrolledWindow *m_SWindow;
00698                 
00699                 // list view for managing backgrounds
00700                 Gtk::TreeView *m_ListView;
00701                 Glib::RefPtr<Gtk::ListStore> m_ListModel;
00702                 
00703                 // image
00704                 Gtk::Image *m_Image;
00705                 
00706                 // labels
00707                 Gtk::Label *m_BGLabel;
00708                 Gtk::Label *m_PreviewLabel;
00709                 
00710                 // buttons
00711                 Gtk::Button *m_AddButton;
00712                 Gtk::Button *m_DeleteButton;
00713                 
00714                 // column record
00715                 class ColumnRec: public Gtk::TreeModel::ColumnRecord {
00716                         public:
00717                                 // constructor
00718                                 ColumnRec() {
00719                                         add(m_Column);
00720                                 }
00721                                 
00722                                 // columns
00723                                 Gtk::TreeModelColumn<Glib::ustring> m_Column;
00724                 };
00725                 
00726                 // column record instance
00727                 ColumnRec m_ColumnRec;
00728                 
00729                 // record of background data
00730                 BackgroundMap m_Backgrounds;
00731                 StringVector m_BGIds;
00732 };
00733 
00734 /***************************************************************************/
00735 
00738 class NewBackgroundDialog: public Gtk::Dialog {
00739         public:
00743                 NewBackgroundDialog(const StringVector &bgIds);
00744                 
00748                 Case::Background get_background_data();
00749                 
00753                 Glib::ustring get_path() const { return m_PathEntry->get_text(); }
00754                 
00755         private:
00756                 // build the ui
00757                 void construct();
00758                 
00759                 // browse button click handler
00760                 void on_browse_button_clicked();
00761                 
00762                 // id entry text change handler
00763                 void on_id_changed();
00764                 
00765                 // labels
00766                 Gtk::Label *m_PathLabel;
00767                 Gtk::Label *m_IdLabel;
00768                 Gtk::Label *m_TypeLabel;
00769                 
00770                 // entries
00771                 Gtk::Entry *m_PathEntry;
00772                 Gtk::Entry *m_IdEntry;
00773                 
00774                 // radio buttons
00775                 Gtk::RadioButton::Group m_RBGroup;
00776                 Gtk::RadioButton *m_SingleScreenRB;
00777                 Gtk::RadioButton *m_DoubleScreenRB;
00778                 
00779                 // buttons
00780                 Gtk::Button *m_OKButton;
00781                 Gtk::Button *m_BrowseButton;
00782                 
00783                 // record of background ids
00784                 StringVector m_UsedBGs;
00785 };
00786 
00787 /***************************************************************************/
00788 
00791 class NewDialog: public Gtk::Dialog {
00792         public:
00794                 NewDialog();
00795                 
00799                 void set_overview(const Case::Overview &overview);
00800                 
00804                 Case::Overview get_overview();
00805         
00806         private:
00807                 // build the ui
00808                 void construct();
00809                 
00810                 // labels
00811                 Gtk::Label *m_CaseNameLabel;
00812                 Gtk::Label *m_CaseAuthorLabel;
00813                 Gtk::Label *m_LawSysLabel;
00814                 
00815                 // entries
00816                 Gtk::Entry *m_CaseNameEntry;
00817                 Gtk::Entry *m_CaseAuthorEntry;
00818                 
00819                 // combo boxes
00820                 Gtk::ComboBoxText *m_LawSysCB;
00821 };
00822 
00823 /***************************************************************************/
00824 
00827 class CharBrowser: public Gtk::Dialog {
00828         public:
00832                 CharBrowser(const CharacterMap &cmap);
00833                 
00837                 bool was_changed() const { return m_CharChanged; }
00838                 
00842                 CharacterMap get_characters() const { return m_CharacterMap; }
00843                 
00844         private:
00845                 // build the ui
00846                 void construct();
00847                 
00848                 // edit button handler
00849                 void on_edit_button_clicked();
00850                 
00851                 // combo box selectio changes
00852                 void on_combo_box_changed();
00853                 
00854                 // see if a character was changed
00855                 bool m_CharChanged;
00856                 
00857                 // labels
00858                 Gtk::Label *m_CharacterLabel;
00859                 Gtk::Label *m_InternalLabel;
00860                 Gtk::Label *m_NameLabel;
00861                 Gtk::Label *m_DescLabel;
00862                 
00863                 // entries
00864                 Gtk::Entry *m_InternalEntry;
00865                 Gtk::Entry *m_NameEntry;
00866                 Gtk::Entry *m_DescEntry;
00867                 
00868                 // buttons
00869                 Gtk::Button *m_EditButton;
00870                 
00871                 // combo boxes
00872                 Gtk::ComboBoxText *m_CharCB;
00873                 
00874                 // internal record of characters
00875                 CharacterMap m_CharacterMap;
00876 };
00877 
00878 /***************************************************************************/
00879 
00882 class NewCharDialog: public Gtk::Dialog {
00883         public:
00887                 NewCharDialog(const StringVector &names);
00888                 
00892                 void set_character_data(const Character &ch);
00893                 
00897                 Character get_character_data();
00898                 
00899         private:
00900                 // build the ui
00901                 void construct();
00902                 
00903                 // signal handler for internal name text changes
00904                 void on_internal_name_changed();
00905                 
00906                 // signal handler for check button clicks
00907                 void on_check_button_clicked(const Glib::ustring &buttonId);
00908                 
00909                 // signal handler for browse button clicks
00910                 void on_browse_button_clicked(const Glib::ustring &buttonId);
00911                 
00912                 // flag if internal names should be checked
00913                 bool m_CheckInternals;
00914                 
00915                 // build the general page
00916                 Gtk::Container* build_general_page();
00917                 
00918                 // build the graphics page
00919                 Gtk::Container* build_graphics_page();
00920                 
00921                 // radio buttons
00922                 Gtk::RadioButtonGroup m_Group;
00923                 Gtk::RadioButton *m_MaleRB;
00924                 Gtk::RadioButton *m_FemaleRB;
00925                 Gtk::RadioButton *m_UnknownRB;
00926                 
00927                 // check buttons
00928                 Gtk::CheckButton *m_HasTagCB;
00929                 Gtk::CheckButton *m_HasHeadshotCB;
00930                 
00931                 // notebook for tabs
00932                 Gtk::Notebook *m_NB;
00933                 
00934                 // buttons
00935                 Gtk::Button *m_OKButton;
00936                 Gtk::Button *m_TagBrowseButton;
00937                 Gtk::Button *m_HeadshotBrowseButton;
00938                 
00939                 // labels
00940                 Gtk::Label *m_CodeNameLabel;
00941                 Gtk::Label *m_NameLabel;
00942                 Gtk::Label *m_GenderLabel;
00943                 Gtk::Label *m_CapLabel;
00944                 Gtk::Label *m_DescLabel;
00945                 Gtk::Label *m_SpriteLabel;
00946                 Gtk::Label *m_TextBoxLabel;
00947                 Gtk::Label *m_HeadshotLabel;
00948                 
00949                 // entries
00950                 Gtk::Entry *m_CodeNameEntry;
00951                 Gtk::Entry *m_NameEntry;
00952                 Gtk::Entry *m_CapEntry;
00953                 Gtk::Entry *m_DescEntry;
00954                 Gtk::Entry *m_SpriteEntry;
00955                 
00956                 // images
00957                 Gtk::Image *m_TextBoxImage;
00958                 Gtk::Image *m_HeadshotImage;
00959                 
00960                 // record of already present character internal names (used for validation)
00961                 StringVector m_UsedNames;
00962 };
00963 
00964 /***************************************************************************/
00965 
00968 class InitialBlockDialog: public Gtk::Dialog {
00969         public:
00974                 InitialBlockDialog(const Glib::ustring &id, BufferMap blocks);
00975                 
00979                 Glib::ustring get_selected_block_id() const { return m_BlocksCB->get_active_text(); }
00980                 
00981         private:
00982                 // build the ui
00983                 void construct();
00984                 
00985                 // block cb changes
00986                 void on_block_changed();
00987                 
00988                 // scrolled window for text view
00989                 Gtk::ScrolledWindow *m_SWindow;
00990                 
00991                 // text view
00992                 Gtk::TextView *m_TextPreview;
00993                 
00994                 // combo box
00995                 Gtk::ComboBoxText *m_BlocksCB;
00996                 
00997                 // labels
00998                 Gtk::Label *m_BlockLabel;
00999                 Gtk::Label *m_PreviewLabel;
01000                 
01001                 // record of text blocks
01002                 BufferMap m_Blocks;
01003 };
01004 
01005 #endif

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