1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006 - 2015 Andreas Persson |
* Copyright (C) 2006 - 2016 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
47 |
#ifndef OLD_THREADS |
#ifndef OLD_THREADS |
48 |
#include <glibmm/threads.h> |
#include <glibmm/threads.h> |
49 |
#endif |
#endif |
50 |
|
#include "ManagedWindow.h" |
51 |
|
|
52 |
class MainWindow; |
class MainWindow; |
53 |
|
|
54 |
class PropDialog : public Gtk::Window, |
class PropDialog : public ManagedWindow, |
55 |
public PropEditor<DLS::Info> { |
public PropEditor<DLS::Info> { |
56 |
public: |
public: |
57 |
PropDialog(); |
PropDialog(); |
58 |
void set_info(DLS::Info* info); |
void set_info(DLS::Info* info); |
59 |
void set_file(gig::File* file); |
void set_file(gig::File* file); |
60 |
|
|
61 |
|
// implementation for abstract methods of interface class "ManagedWindow" |
62 |
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->filePropsWindowX; } |
63 |
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->filePropsWindowY; } |
64 |
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->filePropsWindowW; } |
65 |
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->filePropsWindowH; } |
66 |
|
|
67 |
protected: |
protected: |
68 |
ChoiceEntry<int> eFileFormat; |
ChoiceEntry<int> eFileFormat; |
69 |
StringEntry eName; |
StringEntry eName; |
92 |
void onFileFormatChanged(); |
void onFileFormatChanged(); |
93 |
}; |
}; |
94 |
|
|
95 |
class InstrumentProps : public Gtk::Window, |
class InstrumentProps : public ManagedWindow, |
96 |
public PropEditor<gig::Instrument> { |
public PropEditor<gig::Instrument> { |
97 |
public: |
public: |
98 |
InstrumentProps(); |
InstrumentProps(); |
102 |
sigc::signal<void>& signal_name_changed() { |
sigc::signal<void>& signal_name_changed() { |
103 |
return sig_name_changed; |
return sig_name_changed; |
104 |
} |
} |
105 |
|
|
106 |
|
// implementation for abstract methods of interface class "ManagedWindow" |
107 |
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->instrPropsWindowX; } |
108 |
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->instrPropsWindowY; } |
109 |
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->instrPropsWindowW; } |
110 |
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->instrPropsWindowH; } |
111 |
|
|
112 |
protected: |
protected: |
113 |
void set_Name(const gig::String& name); |
void set_Name(const gig::String& name); |
114 |
void set_IsDrum(bool value); |
void set_IsDrum(bool value); |
188 |
float progress; |
float progress; |
189 |
}; |
}; |
190 |
|
|
191 |
class MainWindow : public Gtk::Window { |
class MainWindow : public ManagedWindow { |
192 |
public: |
public: |
193 |
MainWindow(); |
MainWindow(); |
194 |
virtual ~MainWindow(); |
virtual ~MainWindow(); |
214 |
|
|
215 |
sigc::signal<void, gig::Instrument*>& signal_switch_sampler_instrument(); |
sigc::signal<void, gig::Instrument*>& signal_switch_sampler_instrument(); |
216 |
|
|
217 |
|
sigc::signal<void, gig::Script*> signal_script_to_be_changed; |
218 |
|
sigc::signal<void, gig::Script*> signal_script_changed; |
219 |
|
|
220 |
|
// implementation for abstract methods of interface class "ManagedWindow" |
221 |
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->mainWindowX; } |
222 |
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->mainWindowY; } |
223 |
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->mainWindowW; } |
224 |
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
225 |
|
|
226 |
protected: |
protected: |
227 |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
228 |
Glib::RefPtr<Gtk::UIManager> uiManager; |
Glib::RefPtr<Gtk::UIManager> uiManager; |
276 |
class ModelColumns : public Gtk::TreeModel::ColumnRecord { |
class ModelColumns : public Gtk::TreeModel::ColumnRecord { |
277 |
public: |
public: |
278 |
ModelColumns() { |
ModelColumns() { |
279 |
|
add(m_col_nr); |
280 |
add(m_col_name); |
add(m_col_name); |
281 |
add(m_col_instr); |
add(m_col_instr); |
282 |
} |
} |
283 |
|
|
284 |
|
Gtk::TreeModelColumn<int> m_col_nr; |
285 |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
286 |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
287 |
} m_Columns; |
} m_Columns; |
385 |
void show_midi_rules(); |
void show_midi_rules(); |
386 |
void show_script_slots(); |
void show_script_slots(); |
387 |
void on_action_view_status_bar(); |
void on_action_view_status_bar(); |
388 |
|
void on_auto_restore_win_dim(); |
389 |
|
void on_save_with_temporary_file(); |
390 |
void on_action_refresh_all(); |
void on_action_refresh_all(); |
391 |
void on_action_warn_user_on_extensions(); |
void on_action_warn_user_on_extensions(); |
392 |
void on_action_sync_sampler_instrument_selection(); |
void on_action_sync_sampler_instrument_selection(); |