summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeMenu.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/NodeMenu.hpp')
-rw-r--r--src/gui/NodeMenu.hpp43
1 files changed, 29 insertions, 14 deletions
diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp
index 2a3268b4..0427672c 100644
--- a/src/gui/NodeMenu.hpp
+++ b/src/gui/NodeMenu.hpp
@@ -19,18 +19,35 @@
#include "ObjectMenu.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/types.hpp"
+#include <ingen/URI.hpp>
-#include <gtkmm/builder.h>
-#include <gtkmm/menu.h>
-#include <gtkmm/menushell.h>
+#include <sigc++/connection.h>
+#include <sigc++/signal.h>
+#include <memory>
#include <string>
+namespace Glib {
+template <class T> class RefPtr;
+} // namespace Glib
+
+namespace Gtk {
+class Builder;
+class CheckMenuItem;
+class Menu;
+class MenuItem;
+} // namespace Gtk
+
namespace ingen {
+
+namespace client {
+class BlockModel;
+} // namespace client
+
namespace gui {
+class App;
+
/** Menu for a Node.
*
* \ingroup GUI
@@ -41,7 +58,7 @@ public:
NodeMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml);
- void init(App& app, SPtr<const client::BlockModel> block);
+ void init(App& app, const std::shared_ptr<const client::BlockModel>& block);
bool has_control_inputs();
@@ -49,9 +66,7 @@ public:
sigc::signal<void, bool> signal_embed_gui;
protected:
- SPtr<const client::BlockModel> block() const {
- return dynamic_ptr_cast<const client::BlockModel>(_object);
- }
+ std::shared_ptr<const client::BlockModel> block() const;
void add_preset(const URI& uri, const std::string& label);
@@ -62,11 +77,11 @@ protected:
void on_save_preset_activated();
void on_preset_activated(const std::string& uri);
- Gtk::MenuItem* _popup_gui_menuitem;
- Gtk::CheckMenuItem* _embed_gui_menuitem;
- Gtk::CheckMenuItem* _enabled_menuitem;
- Gtk::MenuItem* _randomize_menuitem;
- Gtk::Menu* _presets_menu;
+ Gtk::MenuItem* _popup_gui_menuitem{nullptr};
+ Gtk::CheckMenuItem* _embed_gui_menuitem{nullptr};
+ Gtk::CheckMenuItem* _enabled_menuitem{nullptr};
+ Gtk::MenuItem* _randomize_menuitem{nullptr};
+ Gtk::Menu* _presets_menu{nullptr};
sigc::connection _preset_connection;
};