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

Contents of /gigedit/trunk/src/gigedit/scriptslots.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2610 - (show annotations) (download) (as text)
Sun Jun 8 19:09:26 2014 UTC (9 years, 9 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1426 byte(s)
* GIG SOUND FORMAT EXTENSION: Added support for managing script slots for
  instruments. Script slots define which scripts shall be executed for an
  instrument by the sampler and in which order.

1 /*
2 Copyright (c) 2014 Christian Schoenebeck
3
4 This file is part of "gigedit" and released under the terms of the
5 GNU General Public License version 2.
6 */
7
8 #ifndef GIGEDIT_SCRIPTSLOTS_H
9 #define GIGEDIT_SCRIPTSLOTS_H
10
11 #include <gig.h>
12 #include <gtkmm.h>
13 #include "compat.h"
14 #include <vector>
15
16 class ScriptSlots : public Gtk::Window {
17 public:
18 ScriptSlots();
19 ~ScriptSlots();
20 void setInstrument(gig::Instrument* instrument);
21 protected:
22 struct Row {
23 int id;
24 Gtk::HBox* hbox;
25 Gtk::Label* label;
26 Gtk::Button* upButton;
27 Gtk::Button* downButton;
28 Gtk::Button* deleteButton;
29 gig::Script* script;
30 };
31
32 Gtk::VBox m_vbox;
33 Gtk::Label m_generalInfoLabel;
34 Gtk::HButtonBox m_buttonBox;
35 Gtk::ScrolledWindow m_scrolledWindow;
36 Gtk::VBox m_vboxSlots;
37 Gtk::Label m_dragHintLabel;
38 Gtk::Button m_closeButton;
39
40 gig::Instrument* m_instrument;
41 std::vector<Row> m_slots;
42
43 void onScriptDragNDropDataReceived(
44 const Glib::RefPtr<Gdk::DragContext>& context, int, int,
45 const Gtk::SelectionData& selection_data, guint, guint time);
46 void appendNewSlot(gig::Script* script);
47 void moveSlotUp(int slotID);
48 void moveSlotDown(int slotID);
49 void deleteSlot(int slotID);
50 void refreshSlots();
51 void onButtonClose();
52 void onWindowHide();
53 void clearSlots();
54 };
55
56 #endif // GIGEDIT_SCRIPTSLOTS_H

  ViewVC Help
Powered by ViewVC