/[svn]/gigedit/trunk/src/gigedit/MacroEditor.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/MacroEditor.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3151 by schoenebeck, Fri May 5 18:44:59 2017 UTC revision 3162 by schoenebeck, Tue May 9 14:35:23 2017 UTC
# Line 25  Line 25 
25  #include <gtkmm/actiongroup.h>  #include <gtkmm/actiongroup.h>
26  #include "ManagedWindow.h"  #include "ManagedWindow.h"
27    
28    /** @brief Editor for gigedit macros.
29     *
30     * Implements a window which allows to edit the abstract tree of one macro
31     * that may be applied with gigedit.
32     */
33  class MacroEditor : public ManagedWindow {  class MacroEditor : public ManagedWindow {
34  public:  public:
35      MacroEditor();      MacroEditor();
36     ~MacroEditor();     ~MacroEditor();
37      void setMacro(Serialization::Archive* macro);      void setMacro(Serialization::Archive* macro, bool isClipboard);
38    
39        sigc::signal<void>& signal_changes_applied();
40    
41      // implementation for abstract methods of interface class "ManagedWindow"      // implementation for abstract methods of interface class "ManagedWindow"
42      virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->macroEditorWindowX; }      virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->macroEditorWindowX; }
# Line 41  protected: Line 48  protected:
48      Serialization::Archive* m_macroOriginal;      Serialization::Archive* m_macroOriginal;
49      Serialization::Archive  m_macro;      Serialization::Archive  m_macro;
50    
51        sigc::signal<void> m_changes_applied;
52    
53      Gtk::VBox m_vbox;      Gtk::VBox m_vbox;
54      Gtk::HBox m_footerHBox;      Gtk::HBox m_footerHBox;
55      Gtk::HBox m_statusHBox;      Gtk::HBox m_statusHBox;
56        Gtk::HButtonBox m_buttonBoxL;
57      Gtk::HButtonBox m_buttonBox;      Gtk::HButtonBox m_buttonBox;
58      Gtk::ScrolledWindow m_scrolledWindow;      Gtk::ScrolledWindow m_scrolledWindow;
59        //Gtk::Label m_labelIntro;
60    
61      class MacroModel : public Gtk::TreeModel::ColumnRecord {      class MacroModel : public Gtk::TreeModel::ColumnRecord {
62      public:      public:
# Line 73  protected: Line 84  protected:
84    
85      Gtk::TreeView m_treeViewMacro;      Gtk::TreeView m_treeViewMacro;
86      Glib::RefPtr<MacroTreeStore> m_treeStoreMacro;      Glib::RefPtr<MacroTreeStore> m_treeStoreMacro;
87        bool m_ignoreTreeViewValueChange;
88    
89      Gtk::Label m_statusLabel;      Gtk::Label m_statusLabel;
90        Gtk::Button m_deleteButton;
91        Gtk::Button m_inverseDeleteButton;
92      Gtk::Button m_applyButton;      Gtk::Button m_applyButton;
93      Gtk::Button m_cancelButton;      Gtk::Button m_cancelButton;
94    
95        bool m_altKeyDown;
96    
97      bool isModified() const;      bool isModified() const;
98      void onButtonCancel();      void onButtonCancel();
99      void onButtonApply();      void onButtonApply();
# Line 87  protected: Line 103  protected:
103      void updateStatusBar();      void updateStatusBar();
104      void reloadTreeView();      void reloadTreeView();
105      void buildTreeView(const Gtk::TreeModel::Row& parentRow, const Serialization::Object& parentObject);      void buildTreeView(const Gtk::TreeModel::Row& parentRow, const Serialization::Object& parentObject);
106        void onTreeViewSelectionChanged();
107        void onMacroTreeViewKeyRelease(GdkEventKey* button);
108        void onMacroTreeViewRowValueChanged(const Gtk::TreeModel::Path& path,
109                                            const Gtk::TreeModel::iterator& iter);
110        void deleteSelectedRows();
111        void inverseDeleteSelectedRows();
112        void deleteRows(const std::vector<Gtk::TreeModel::Path>& rows);
113        bool onKeyPressed(GdkEventKey* key);
114        bool onKeyReleased(GdkEventKey* key);
115  };  };
116    
117  #endif // GIGEDIT_MACROEDITOR_H  #endif // GIGEDIT_MACROEDITOR_H

Legend:
Removed from v.3151  
changed lines
  Added in v.3162

  ViewVC Help
Powered by ViewVC