--- gigedit/trunk/src/gigedit/mainwindow.h 2007/06/10 10:56:11 1225 +++ gigedit/trunk/src/gigedit/mainwindow.h 2007/08/26 09:29:52 1303 @@ -55,14 +55,12 @@ public: InstrumentProps(); void set_instrument(gig::Instrument* instrument); + sigc::signal signal_instrument_changed(); protected: Gtk::VBox vbox; Gtk::HButtonBox buttonBox; Gtk::Button quitButton; Gtk::Table table; - Gtk::Label label[10]; - Gtk::Entry entry[8]; - Gtk::CheckButton check[2]; StringEntry eName; BoolEntry eIsDrum; NumEntryTemp eMIDIBank; @@ -76,9 +74,12 @@ NoteEntry eDimensionKeyRangeLow; NoteEntry eDimensionKeyRangeHigh; int rowno; + void add_prop(BoolEntry& prop); + void add_prop(BoolEntryPlus6& prop); void add_prop(LabelWidget& prop); void key_range_low_changed(); void key_range_high_changed(); + sigc::signal instrument_changed; }; class LoadDialog : public Gtk::Dialog { @@ -115,6 +116,7 @@ virtual ~MainWindow(); void load_file(const char* name); void load_instrument(gig::Instrument* instr); + void file_changed(); protected: Glib::RefPtr actionGroup; @@ -198,6 +200,7 @@ void on_action_file_save(); void on_action_file_save_as(); void on_action_file_properties(); + void on_action_quit(); void show_instr_props(); void on_action_help_about(); @@ -216,14 +219,24 @@ void load_gig(gig::File* gig, const char* filename); gig::File* file; + bool file_has_name; + bool file_is_changed; + std::string filename; + std::string current_dir; + + bool file_save(); + bool file_save_as(); + bool check_if_savable(); void on_button_release(GdkEventButton* button); + void on_sample_treeview_drag_begin(const Glib::RefPtr& context); void on_sample_treeview_drag_data_get(const Glib::RefPtr&, Gtk::SelectionData& selection_data, guint, guint); void on_sample_label_drop_drag_data_received(const Glib::RefPtr& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time); + void sample_name_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter); void instrument_name_changed(const Gtk::TreeModel::Path& path, @@ -232,7 +245,13 @@ void __import_queued_samples(); void __clear(); + bool close_confirmation_dialog(); + Gtk::Menu* popup_menu; + + bool on_delete_event(GdkEventAny* event); + + bool first_call_to_drag_data_get; }; #endif