From 394b01da8e26dbe1b6a0520944d954ca0b16b1b5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 23 Sep 2018 17:31:12 +0200 Subject: Use lowercase namespace names --- src/gui/App.cpp | 24 +++++++++---------- src/gui/App.hpp | 44 +++++++++++++++++------------------ src/gui/Arc.cpp | 16 ++++++------- src/gui/Arc.hpp | 16 ++++++------- src/gui/BreadCrumbs.cpp | 8 +++---- src/gui/BreadCrumbs.hpp | 8 +++---- src/gui/ConnectWindow.cpp | 24 +++++++++---------- src/gui/ConnectWindow.hpp | 12 +++++----- src/gui/GraphBox.cpp | 12 +++++----- src/gui/GraphBox.hpp | 30 ++++++++++++------------ src/gui/GraphCanvas.cpp | 28 +++++++++++----------- src/gui/GraphCanvas.hpp | 34 +++++++++++++-------------- src/gui/GraphPortModule.cpp | 12 +++++----- src/gui/GraphPortModule.hpp | 18 +++++++-------- src/gui/GraphTreeWindow.cpp | 12 +++++----- src/gui/GraphTreeWindow.hpp | 26 ++++++++++----------- src/gui/GraphView.cpp | 10 ++++---- src/gui/GraphView.hpp | 18 +++++++-------- src/gui/GraphWindow.cpp | 8 +++---- src/gui/GraphWindow.hpp | 14 +++++------ src/gui/LoadGraphWindow.cpp | 12 +++++----- src/gui/LoadGraphWindow.hpp | 16 ++++++------- src/gui/LoadPluginWindow.cpp | 10 ++++---- src/gui/LoadPluginWindow.hpp | 28 +++++++++++----------- src/gui/MessagesWindow.cpp | 8 +++---- src/gui/MessagesWindow.hpp | 8 +++---- src/gui/NewSubgraphWindow.cpp | 12 +++++----- src/gui/NewSubgraphWindow.hpp | 16 ++++++------- src/gui/NodeMenu.cpp | 12 +++++----- src/gui/NodeMenu.hpp | 14 +++++------ src/gui/NodeModule.cpp | 14 +++++------ src/gui/NodeModule.hpp | 26 ++++++++++----------- src/gui/ObjectMenu.cpp | 10 ++++---- src/gui/ObjectMenu.hpp | 14 +++++------ src/gui/PluginMenu.cpp | 16 ++++++------- src/gui/PluginMenu.hpp | 22 +++++++++--------- src/gui/Port.cpp | 16 ++++++------- src/gui/Port.hpp | 20 ++++++++-------- src/gui/PortMenu.cpp | 12 +++++----- src/gui/PortMenu.hpp | 10 ++++---- src/gui/PropertiesWindow.cpp | 38 +++++++++++++++--------------- src/gui/PropertiesWindow.hpp | 16 ++++++------- src/gui/RDFS.cpp | 24 +++++++++---------- src/gui/RDFS.hpp | 18 +++++++-------- src/gui/RenameWindow.cpp | 10 ++++---- src/gui/RenameWindow.hpp | 14 +++++------ src/gui/Style.cpp | 12 +++++----- src/gui/Style.hpp | 12 +++++----- src/gui/SubgraphModule.cpp | 10 ++++---- src/gui/SubgraphModule.hpp | 16 ++++++------- src/gui/ThreadedLoader.cpp | 12 +++++----- src/gui/ThreadedLoader.hpp | 12 +++++----- src/gui/URIEntry.cpp | 16 ++++++------- src/gui/URIEntry.hpp | 8 +++---- src/gui/WidgetFactory.cpp | 12 +++++----- src/gui/WidgetFactory.hpp | 8 +++---- src/gui/Window.hpp | 8 +++---- src/gui/WindowFactory.cpp | 10 ++++---- src/gui/WindowFactory.hpp | 32 ++++++++++++------------- src/gui/ingen_gui.cpp | 18 +++++++-------- src/gui/ingen_gui_lv2.cpp | 54 +++++++++++++++++++++---------------------- src/gui/rgba.hpp | 8 +++---- 62 files changed, 519 insertions(+), 519 deletions(-) (limited to 'src/gui') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 9f1a29ca..8a33fe46 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -58,19 +58,19 @@ namespace Raul { class Deletable; } -namespace Ingen { +namespace ingen { -namespace Client { class PluginModel; } +namespace client { class PluginModel; } -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { class Port; Gtk::Main* App::_main = nullptr; -App::App(Ingen::World* world) +App::App(ingen::World* world) : _style(new Style(*this)) , _about_dialog(nullptr) , _window_factory(new WindowFactory(*this)) @@ -111,12 +111,12 @@ App::~App() } SPtr -App::create(Ingen::World* world) +App::create(ingen::World* world) { suil_init(&world->argc(), &world->argv(), SUIL_ARG_NONE); // Add RC file for embedded GUI Gtk style - const std::string rc_path = Ingen::data_file_path("ingen_style.rc"); + const std::string rc_path = ingen::data_file_path("ingen_style.rc"); Gtk::RC::add_default_file(rc_path); _main = Gtk::Main::instance(); @@ -158,7 +158,7 @@ App::run() } void -App::attach(SPtr client) +App::attach(SPtr client) { assert(!_client); assert(!_store); @@ -282,7 +282,7 @@ App::set_property(const URI& subject, void App::set_tooltip(Gtk::Widget* widget, const LilvNode* node) { - const std::string comment = RDFS::comment(_world, node); + const std::string comment = rdfs::comment(_world, node); if (!comment.empty()) { widget->set_tooltip_text(comment); } @@ -480,7 +480,7 @@ App::quit(Gtk::Window* dialog_parent) } bool -App::can_control(const Client::PortModel* port) const +App::can_control(const client::PortModel* port) const { return port->is_a(uris().lv2_ControlPort) || port->is_a(uris().lv2_CVPort) @@ -495,5 +495,5 @@ App::sample_rate() const return _sample_rate; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 75661449..76465bfb 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -34,7 +34,7 @@ #include "lilv/lilv.h" #include "raul/Deletable.hpp" -namespace Ingen { +namespace ingen { class Interface; class Log; @@ -43,7 +43,7 @@ class Serialiser; class StreamWriter; class World; -namespace Client { +namespace client { class ClientStore; class GraphModel; @@ -53,7 +53,7 @@ class SigClientInterface; } -namespace GUI { +namespace gui { class ConnectWindow; class GraphCanvas; @@ -75,7 +75,7 @@ public: void error_message(const std::string& str); - void attach(SPtr client); + void attach(SPtr client); void detach(); @@ -89,7 +89,7 @@ public: void port_activity(Port* port); void activity_port_destroyed(Port* port); - bool can_control(const Client::PortModel* port) const; + bool can_control(const client::PortModel* port) const; bool signal() const { return _enable_signal; } void enable_signals(bool b) { _enable_signal = b; } @@ -118,17 +118,17 @@ public: Style* style() const { return _style; } WindowFactory* window_factory() const { return _window_factory; } - Ingen::Forge& forge() const { return _world->forge(); } - SPtr interface() const { return _world->interface(); } - SPtr client() const { return _client; } - SPtr store() const { return _store; } + ingen::Forge& forge() const { return _world->forge(); } + SPtr interface() const { return _world->interface(); } + SPtr client() const { return _client; } + SPtr store() const { return _store; } SPtr loader() const { return _loader; } - SPtr sig_client(); + SPtr sig_client(); SPtr serialiser(); - static SPtr create(Ingen::World* world); + static SPtr create(ingen::World* world); void run(); @@ -136,17 +136,17 @@ public: sigc::signal signal_status_text_changed; - inline Ingen::World* world() const { return _world; } - inline Ingen::URIs& uris() const { return _world->uris(); } - inline Ingen::Log& log() const { return _world->log(); } + inline ingen::World* world() const { return _world; } + inline ingen::URIs& uris() const { return _world->uris(); } + inline ingen::Log& log() const { return _world->log(); } protected: - explicit App(Ingen::World* world); + explicit App(ingen::World* world); - void message(const Ingen::Message& msg); + void message(const ingen::Message& msg); bool animate(); - void response(int32_t id, Ingen::Status status, const std::string& subject); + void response(int32_t id, ingen::Status status, const std::string& subject); void put(const URI& uri, const Properties& properties, @@ -159,8 +159,8 @@ protected: static Gtk::Main* _main; - SPtr _client; - SPtr _store; + SPtr _client; + SPtr _store; SPtr _loader; SPtr _dumper; @@ -172,7 +172,7 @@ protected: Gtk::AboutDialog* _about_dialog; WindowFactory* _window_factory; - Ingen::World* _world; + ingen::World* _world; int32_t _sample_rate; int32_t _block_length; @@ -190,7 +190,7 @@ protected: bool _is_plugin; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_APP_HPP diff --git a/src/gui/Arc.cpp b/src/gui/Arc.cpp index c14b2e88..db8b3a85 100644 --- a/src/gui/Arc.cpp +++ b/src/gui/Arc.cpp @@ -20,19 +20,19 @@ #define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { Arc::Arc(Ganv::Canvas& canvas, - SPtr model, + SPtr model, Ganv::Node* src, Ganv::Node* dst) : Ganv::Edge(canvas, src, dst) , _arc_model(model) { - SPtr tparent = model->tail()->parent(); - SPtr tparent_block; - if ((tparent_block = dynamic_ptr_cast(tparent))) { + SPtr tparent = model->tail()->parent(); + SPtr tparent_block; + if ((tparent_block = dynamic_ptr_cast(tparent))) { if (tparent_block->plugin_uri() == NS_INTERNALS "BlockDelay") { g_object_set(_gobj, "dash-length", 4.0, NULL); set_constraining(false); @@ -40,5 +40,5 @@ Arc::Arc(Ganv::Canvas& canvas, } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/Arc.hpp b/src/gui/Arc.hpp index 382ca305..4eedde88 100644 --- a/src/gui/Arc.hpp +++ b/src/gui/Arc.hpp @@ -22,11 +22,11 @@ #include "ganv/Edge.hpp" #include "ingen/types.hpp" -namespace Ingen { +namespace ingen { -namespace Client { class ArcModel; } +namespace client { class ArcModel; } -namespace GUI { +namespace gui { /** An Arc (directed edge) in a Graph. * @@ -36,17 +36,17 @@ class Arc : public Ganv::Edge { public: Arc(Ganv::Canvas& canvas, - SPtr model, + SPtr model, Ganv::Node* src, Ganv::Node* dst); - SPtr model() const { return _arc_model; } + SPtr model() const { return _arc_model; } private: - SPtr _arc_model; + SPtr _arc_model; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_ARC_HPP diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp index ae7882e3..2d2c535e 100644 --- a/src/gui/BreadCrumbs.cpp +++ b/src/gui/BreadCrumbs.cpp @@ -24,8 +24,8 @@ #include "App.hpp" #include "BreadCrumbs.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { using std::string; @@ -225,5 +225,5 @@ BreadCrumbs::object_moved(const Raul::Path& old_path, const Raul::Path& new_path } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp index 467d3bfc..35c97fd0 100644 --- a/src/gui/BreadCrumbs.hpp +++ b/src/gui/BreadCrumbs.hpp @@ -30,8 +30,8 @@ #include "GraphView.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Collection of breadcrumb buttons forming a path. * This doubles as a cache for GraphViews. @@ -113,7 +113,7 @@ private: std::list _breadcrumbs; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_BREADCRUMBS_HPP diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 458a43dd..e76fbc06 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -41,10 +41,10 @@ #include "ConnectWindow.hpp" #include "WindowFactory.hpp" -using namespace Ingen::Client; +using namespace ingen::client; -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { ConnectWindow::ConnectWindow(BaseObjectType* cobject, Glib::RefPtr xml) @@ -102,7 +102,7 @@ ConnectWindow::error(const std::string& msg) } void -ConnectWindow::start(App& app, Ingen::World* world) +ConnectWindow::start(App& app, ingen::World* world) { _app = &app; @@ -129,7 +129,7 @@ ConnectWindow::ingen_response(int32_t id, } void -ConnectWindow::set_connected_to(SPtr engine) +ConnectWindow::set_connected_to(SPtr engine) { _app->world()->set_interface(engine); @@ -193,12 +193,12 @@ ConnectWindow::set_connecting_widget_states() bool ConnectWindow::connect_remote(const URI& uri) { - Ingen::World* world = _app->world(); + ingen::World* world = _app->world(); SPtr sci(new SigClientInterface()); SPtr qi(new QueuedInterface(sci)); - SPtr iface(world->new_interface(uri, qi)); + SPtr iface(world->new_interface(uri, qi)); if (iface) { world->set_interface(iface); _app->attach(qi); @@ -223,14 +223,14 @@ ConnectWindow::connect(bool existing) set_connecting_widget_states(); _connect_stage = 0; - Ingen::World* world = _app->world(); + ingen::World* world = _app->world(); if (_mode == Mode::CONNECT_REMOTE) { std::string uri_str = world->conf().option("connect").ptr(); if (existing) { uri_str = world->interface()->uri(); _connect_stage = 1; - SPtr client = dynamic_ptr_cast(world->interface()); + SPtr client = dynamic_ptr_cast(world->interface()); if (client) { _app->attach(client->respondee()); _app->register_callbacks(); @@ -290,7 +290,7 @@ ConnectWindow::disconnect() _attached = false; _app->detach(); - set_connected_to(SPtr()); + set_connected_to(SPtr()); if (!_widgets_loaded) { return; @@ -568,5 +568,5 @@ ConnectWindow::quit() Gtk::Main::quit(); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index 08560361..a6874dfc 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -31,8 +31,8 @@ #include "Window.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class App; @@ -49,8 +49,8 @@ public: ConnectWindow(BaseObjectType* cobject, Glib::RefPtr xml); - void set_connected_to(SPtr engine); - void start(App& app, Ingen::World* world); + void set_connected_to(SPtr engine); + void start(App& app, ingen::World* world); bool attached() const { return _finished_connecting; } bool quit_flag() const { return _quit_flag; } @@ -110,7 +110,7 @@ private: bool _quit_flag; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_CONNECTWINDOW_HPP diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 6f9969be..be076f6c 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -50,11 +50,11 @@ #include #endif -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { static const int STATUS_CONTEXT_ENGINE = 0; static const int STATUS_CONTEXT_GRAPH = 1; @@ -818,7 +818,7 @@ GraphBox::event_arrange() void GraphBox::event_parent_activated() { - SPtr parent = dynamic_ptr_cast(_graph->parent()); + SPtr parent = dynamic_ptr_cast(_graph->parent()); if (parent) { _app->window_factory()->present_graph(parent, _window); } @@ -918,5 +918,5 @@ GraphBox::event_port_names_toggled() } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp index fd9bf9c0..93599e0b 100644 --- a/src/gui/GraphBox.hpp +++ b/src/gui/GraphBox.hpp @@ -38,17 +38,17 @@ class Atom; class Path; } -namespace Ingen { +namespace ingen { class URI; -namespace Client { +namespace client { class GraphModel; class PortModel; class ObjectModel; } -namespace GUI { +namespace gui { class BreadCrumbs; class LoadGraphBox; @@ -71,13 +71,13 @@ public: ~GraphBox(); static SPtr create( - App& app, SPtr graph); + App& app, SPtr graph); void init_box(App& app); void set_status_text(const std::string& text); - void set_graph(SPtr graph, + void set_graph(SPtr graph, SPtr view); void set_window(GraphWindow* win) { _window = win; } @@ -85,22 +85,22 @@ public: bool documentation_is_visible() { return _doc_scrolledwindow->is_visible(); } void set_documentation(const std::string& doc, bool html); - SPtr graph() const { return _graph; } + SPtr graph() const { return _graph; } SPtr view() const { return _view; } - void show_port_status(const Client::PortModel* port, + void show_port_status(const client::PortModel* port, const Atom& value); void set_graph_from_path(const Raul::Path& path, SPtr view); - void object_entered(const Client::ObjectModel* model); - void object_left(const Client::ObjectModel* model); + void object_entered(const client::ObjectModel* model); + void object_left(const client::ObjectModel* model); private: - void graph_port_added(SPtr port); - void graph_port_removed(SPtr port); + void graph_port_added(SPtr port); + void graph_port_removed(SPtr port); void property_changed(const URI& predicate, const Atom& value); - void show_status(const Client::ObjectModel* model); + void show_status(const client::ObjectModel* model); void error(const Glib::ustring& message, const Glib::ustring& secondary_text=""); @@ -144,7 +144,7 @@ private: void event_clipboard_changed(GdkEventOwnerChange* ev); App* _app; - SPtr _graph; + SPtr _graph; SPtr _view; GraphWindow* _window; @@ -207,7 +207,7 @@ private: bool _enable_signal; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPH_BOX_HPP diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index ed1a7153..37974d1e 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -55,11 +55,11 @@ using std::string; -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { static int port_order(const GanvPort* a, const GanvPort* b, void* data) @@ -291,7 +291,7 @@ ensure_port_labels(GanvNode* node, void* data) if (GANV_IS_MODULE(node)) { Ganv::Module* module = Glib::wrap(GANV_MODULE(node)); for (Ganv::Port* p : *module) { - Ingen::GUI::Port* port = dynamic_cast(p); + ingen::gui::Port* port = dynamic_cast(p); if (port) { port->ensure_label(); } @@ -400,7 +400,7 @@ GraphCanvas::get_port_view(SPtr port) module = dynamic_cast(_views[port->parent()]); if (module) { for (const auto& p : *module) { - GUI::Port* pv = dynamic_cast(p); + gui::Port* pv = dynamic_cast(p); if (pv && pv->model() == port) { return pv; } @@ -419,7 +419,7 @@ GraphCanvas::connection(SPtr arc) Ganv::Port* const head = get_port_view(arc->head()); if (tail && head) { - new GUI::Arc(*this, arc, tail, head); + new gui::Arc(*this, arc, tail, head); } else { _app.log().error(fmt("Unable to find ports to connect %1% => %2%\n") % arc->tail_path() % arc->head_path()); @@ -436,7 +436,7 @@ GraphCanvas::disconnection(SPtr arc) if (tail && head) { remove_edge_between(tail, head); if (arc->head()->is_a(_app.uris().lv2_AudioPort)) { - GUI::Port* const h = dynamic_cast(head); + gui::Port* const h = dynamic_cast(head); if (h) { h->activity(_app.forge().make(0.0f)); // Reset peaks } @@ -451,8 +451,8 @@ GraphCanvas::disconnection(SPtr arc) void GraphCanvas::connect(Ganv::Node* tail, Ganv::Node* head) { - const GUI::Port* const t = dynamic_cast(tail); - const GUI::Port* const h = dynamic_cast(head); + const gui::Port* const t = dynamic_cast(tail); + const gui::Port* const h = dynamic_cast(head); if (t && h) { _app.interface()->connect(t->model()->path(), h->model()->path()); @@ -463,8 +463,8 @@ GraphCanvas::connect(Ganv::Node* tail, Ganv::Node* head) void GraphCanvas::disconnect(Ganv::Node* tail, Ganv::Node* head) { - const GUI::Port* const t = dynamic_cast(tail); - const GUI::Port* const h = dynamic_cast(head); + const gui::Port* const t = dynamic_cast(tail); + const gui::Port* const h = dynamic_cast(head); if (t && h) { _app.interface()->disconnect(t->model()->path(), h->model()->path()); @@ -634,7 +634,7 @@ serialise_arc(GanvEdge* arc, void* data) return; } - GUI::Arc* garc = dynamic_cast(Glib::wrap(GANV_EDGE(arc))); + gui::Arc* garc = dynamic_cast(Glib::wrap(GANV_EDGE(arc))); if (garc) { serialiser->serialise_arc(Sord::Node(), garc->model()); } @@ -895,5 +895,5 @@ GraphCanvas::menu_properties() _app.window_factory()->present_properties(_graph); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index a7340744..86e47faa 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -32,11 +32,11 @@ #include "NodeModule.hpp" -namespace Ingen { +namespace ingen { -namespace Client { class GraphModel; } +namespace client { class GraphModel; } -namespace GUI { +namespace gui { class NodeModule; class PluginMenu; @@ -49,7 +49,7 @@ class GraphCanvas : public Ganv::Canvas { public: GraphCanvas(App& app, - SPtr graph, + SPtr graph, int width, int height); @@ -62,14 +62,14 @@ public: void show_port_names(bool b); bool show_port_names() const { return _show_port_names; } - void add_plugin(SPtr p); + void add_plugin(SPtr p); void remove_plugin(const URI& uri); - void add_block(SPtr bm); - void remove_block(SPtr bm); - void add_port(SPtr pm); - void remove_port(SPtr pm); - void connection(SPtr arc); - void disconnection(SPtr arc); + void add_block(SPtr bm); + void remove_block(SPtr bm); + void add_port(SPtr pm); + void remove_port(SPtr pm); + void connection(SPtr arc); + void disconnection(SPtr arc); void get_new_module_location(double& x, double& y); @@ -97,7 +97,7 @@ private: void menu_new_graph(); void menu_load_graph(); void menu_properties(); - void load_plugin(WPtr weak_plugin); + void load_plugin(WPtr weak_plugin); void build_menus(); @@ -107,7 +107,7 @@ private: Properties get_initial_data(Resource::Graph ctx=Resource::Graph::DEFAULT); - Ganv::Port* get_port_view(SPtr port); + Ganv::Port* get_port_view(SPtr port); void connect(Ganv::Node* tail, Ganv::Node* head); @@ -116,9 +116,9 @@ private: Ganv::Node* head); App& _app; - SPtr _graph; + SPtr _graph; - typedef std::map, Ganv::Module*> Views; + typedef std::map, Ganv::Module*> Views; Views _views; int _auto_position_count; @@ -153,7 +153,7 @@ private: bool _menu_dirty; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPHCANVAS_HPP diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp index 5987b0e3..b5b234c4 100644 --- a/src/gui/GraphPortModule.cpp +++ b/src/gui/GraphPortModule.cpp @@ -34,14 +34,14 @@ #include "WidgetFactory.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { GraphPortModule::GraphPortModule(GraphCanvas& canvas, - SPtr model) + SPtr model) : Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords? , _model(model) , _port(nullptr) @@ -162,5 +162,5 @@ GraphPortModule::set_selected(gboolean b) } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphPortModule.hpp b/src/gui/GraphPortModule.hpp index 97bc2e5b..2e060eae 100644 --- a/src/gui/GraphPortModule.hpp +++ b/src/gui/GraphPortModule.hpp @@ -25,12 +25,12 @@ namespace Raul { class Atom; } -namespace Ingen { namespace Client { +namespace ingen { namespace client { class PortModel; } } -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class GraphCanvas; class Port; @@ -47,7 +47,7 @@ class GraphPortModule : public Ganv::Module public: static GraphPortModule* create( GraphCanvas& canvas, - SPtr model); + SPtr model); App& app() const; @@ -56,11 +56,11 @@ public: void set_name(const std::string& n); - SPtr port() const { return _model; } + SPtr port() const { return _model; } protected: GraphPortModule(GraphCanvas& canvas, - SPtr model); + SPtr model); bool show_menu(GdkEventButton* ev); void set_selected(gboolean b); @@ -69,11 +69,11 @@ protected: void property_changed(const URI& key, const Atom& value); - SPtr _model; + SPtr _model; Port* _port; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPHPORTMODULE_HPP diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp index 1eb6557b..2edf8a44 100644 --- a/src/gui/GraphTreeWindow.cpp +++ b/src/gui/GraphTreeWindow.cpp @@ -24,11 +24,11 @@ #include "ingen/client/GraphModel.hpp" #include "raul/Path.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { GraphTreeWindow::GraphTreeWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -133,7 +133,7 @@ GraphTreeWindow::remove_graph(SPtr pm) Gtk::TreeModel::iterator GraphTreeWindow::find_graph(Gtk::TreeModel::Children root, - SPtr graph) + SPtr graph) { for (Gtk::TreeModel::iterator c = root.begin(); c != root.end(); ++c) { SPtr pm = (*c)[_graph_tree_columns.graph_model_col]; @@ -231,5 +231,5 @@ GraphTreeWindow::graph_moved(SPtr graph) _enable_signal = true; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphTreeWindow.hpp b/src/gui/GraphTreeWindow.hpp index 005f39a8..3991671d 100644 --- a/src/gui/GraphTreeWindow.hpp +++ b/src/gui/GraphTreeWindow.hpp @@ -26,11 +26,11 @@ namespace Raul { class Path; } -namespace Ingen { +namespace ingen { -namespace Client { class ClientStore; class ObjectModel; } +namespace client { class ClientStore; class ObjectModel; } -namespace GUI { +namespace gui { class GraphWindow; class GraphTreeView; @@ -45,18 +45,18 @@ public: GraphTreeWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, Client::ClientStore& store); + void init(App& app, client::ClientStore& store); - void new_object(SPtr object); + void new_object(SPtr object); void graph_property_changed(const URI& key, const Atom& value, - SPtr graph); + SPtr graph); - void graph_moved(SPtr graph); + void graph_moved(SPtr graph); - void add_graph(SPtr pm); - void remove_graph(SPtr pm); + void add_graph(SPtr pm); + void remove_graph(SPtr pm); void show_graph_menu(GdkEventButton* ev); protected: @@ -67,7 +67,7 @@ protected: Gtk::TreeModel::iterator find_graph( Gtk::TreeModel::Children root, - SPtr graph); + SPtr graph); GraphTreeView* _graphs_treeview; @@ -81,7 +81,7 @@ protected: Gtk::TreeModelColumn name_col; Gtk::TreeModelColumn enabled_col; - Gtk::TreeModelColumn > graph_model_col; + Gtk::TreeModelColumn > graph_model_col; }; App* _app; @@ -117,7 +117,7 @@ private: }; // struct GraphTreeView -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPHTREEWINDOW_HPP diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index e6361249..42e19344 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -28,11 +28,11 @@ #include "GraphView.hpp" #include "WidgetFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { GraphView::GraphView(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -150,5 +150,5 @@ GraphView::property_changed(const URI& predicate, const Atom& value) _enable_signal = true; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphView.hpp b/src/gui/GraphView.hpp index 03569831..57a210a3 100644 --- a/src/gui/GraphView.hpp +++ b/src/gui/GraphView.hpp @@ -30,16 +30,16 @@ namespace Raul { class Atom; } -namespace Ingen { +namespace ingen { -namespace Client { +namespace client { class PortModel; class MetadataModel; class GraphModel; class ObjectModel; } -namespace GUI { +namespace gui { class App; class LoadPluginWindow; @@ -63,14 +63,14 @@ public: void init(App& app); SPtr canvas() const { return _canvas; } - SPtr graph() const { return _graph; } + SPtr graph() const { return _graph; } Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; } static SPtr create(App& app, - SPtr graph); + SPtr graph); private: - void set_graph(SPtr graph); + void set_graph(SPtr graph); void process_toggled(); void poly_changed(); @@ -80,7 +80,7 @@ private: App* _app; - SPtr _graph; + SPtr _graph; SPtr _canvas; Gtk::ScrolledWindow* _canvas_scrolledwindow; @@ -92,7 +92,7 @@ private: bool _enable_signal; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPHVIEW_HPP diff --git a/src/gui/GraphWindow.cpp b/src/gui/GraphWindow.cpp index b5a89c79..086886ef 100644 --- a/src/gui/GraphWindow.cpp +++ b/src/gui/GraphWindow.cpp @@ -23,8 +23,8 @@ #include "GraphWindow.hpp" #include "WindowFactory.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { GraphWindow::GraphWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -81,5 +81,5 @@ GraphWindow::on_key_press_event(GdkEventKey* event) return Gtk::Window::on_key_press_event(event); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/GraphWindow.hpp b/src/gui/GraphWindow.hpp index b4e51d7b..69b8a3d4 100644 --- a/src/gui/GraphWindow.hpp +++ b/src/gui/GraphWindow.hpp @@ -26,13 +26,13 @@ #include "GraphBox.hpp" #include "Window.hpp" -namespace Ingen { +namespace ingen { -namespace Client { +namespace client { class GraphModel; } -namespace GUI { +namespace gui { /** A window for a graph. * @@ -48,7 +48,7 @@ public: void init_window(App& app); - SPtr graph() const { return _box->graph(); } + SPtr graph() const { return _box->graph(); } GraphBox* box() const { return _box; } bool documentation_is_visible() { return _box->documentation_is_visible(); } @@ -57,7 +57,7 @@ public: _box->set_documentation(doc, html); } - void show_port_status(const Client::PortModel* model, + void show_port_status(const client::PortModel* model, const Atom& value) { _box->show_port_status(model, value); } @@ -74,7 +74,7 @@ private: int _y; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GRAPH_WINDOW_HPP diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index b02ca510..a8bbd94a 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -34,11 +34,11 @@ #include "Style.hpp" #include "ThreadedLoader.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -88,7 +88,7 @@ LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject, property_select_multiple() = true; // Add global examples directory to "shortcut folders" (bookmarks) - const FilePath examples_dir = Ingen::data_file_path("graphs"); + const FilePath examples_dir = ingen::data_file_path("graphs"); if (Glib::file_test(examples_dir, Glib::FILE_TEST_IS_DIR)) { add_shortcut_folder(examples_dir.string()); } @@ -253,5 +253,5 @@ LoadGraphWindow::selection_changed() } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/LoadGraphWindow.hpp b/src/gui/LoadGraphWindow.hpp index 8ec5ed4b..d4b36a26 100644 --- a/src/gui/LoadGraphWindow.hpp +++ b/src/gui/LoadGraphWindow.hpp @@ -28,11 +28,11 @@ #include "ingen/Node.hpp" #include "ingen/types.hpp" -namespace Ingen { +namespace ingen { -namespace Client { class GraphModel; } +namespace client { class GraphModel; } -namespace GUI { +namespace gui { /** 'Load Graph' Window. * @@ -48,9 +48,9 @@ public: void init(App& app) { _app = &app; } - void set_graph(SPtr graph); + void set_graph(SPtr graph); - void present(SPtr graph, + void present(SPtr graph, bool import, Properties data); @@ -72,7 +72,7 @@ private: Properties _initial_data; - SPtr _graph; + SPtr _graph; Gtk::Label* _symbol_label; Gtk::Entry* _symbol_entry; @@ -89,7 +89,7 @@ private: bool _merge_ports; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_LOADGRAPHWINDOW_HPP diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index bd08f457..743c0f11 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -35,11 +35,11 @@ using std::string; -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -507,5 +507,5 @@ LoadPluginWindow::plugin_property_changed(const URI& plugin, } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index 29314c7a..dcea9d6b 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -33,14 +33,14 @@ #include "Window.hpp" -namespace Ingen { +namespace ingen { -namespace Client { +namespace client { class GraphModel; class PluginModel; } -namespace GUI { +namespace gui { /** 'Load Plugin' window. * @@ -54,12 +54,12 @@ public: LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_graph(SPtr graph); - void set_plugins(SPtr plugins); + void set_graph(SPtr graph); + void set_plugins(SPtr plugins); - void add_plugin(SPtr plugin); + void add_plugin(SPtr plugin); - void present(SPtr graph, + void present(SPtr graph, Properties data); protected: @@ -86,7 +86,7 @@ private: Gtk::TreeModelColumn _col_uri; // Not displayed: - Gtk::TreeModelColumn< SPtr > _col_plugin; + Gtk::TreeModelColumn< SPtr > _col_plugin; }; /** Column for the filter criteria combo box. */ @@ -110,9 +110,9 @@ private: void name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* event); void set_row(Gtk::TreeModel::Row& row, - SPtr plugin); + SPtr plugin); - void new_plugin(SPtr pm); + void new_plugin(SPtr pm); void plugin_property_changed(const URI& plugin, const URI& predicate, @@ -121,14 +121,14 @@ private: void plugin_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* col); void plugin_selection_changed(); - std::string generate_module_name(SPtr plugin, + std::string generate_module_name(SPtr plugin, int offset=0); void load_plugin(const Gtk::TreeModel::iterator& iter); Properties _initial_data; - SPtr _graph; + SPtr _graph; typedef std::map Rows; Rows _rows; @@ -154,7 +154,7 @@ private: Gtk::Entry* _search_entry; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_LOADPLUGINWINDOW_HPP diff --git a/src/gui/MessagesWindow.cpp b/src/gui/MessagesWindow.cpp index 581e732c..2b980a53 100644 --- a/src/gui/MessagesWindow.cpp +++ b/src/gui/MessagesWindow.cpp @@ -21,8 +21,8 @@ #include "App.hpp" #include "MessagesWindow.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { using std::string; MessagesWindow::MessagesWindow(BaseObjectType* cobject, @@ -137,5 +137,5 @@ MessagesWindow::clear_clicked() _clear_button->set_sensitive(false); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp index b83a8047..b3c5114d 100644 --- a/src/gui/MessagesWindow.hpp +++ b/src/gui/MessagesWindow.hpp @@ -28,8 +28,8 @@ #include "Window.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Messages Window. * @@ -64,7 +64,7 @@ private: std::map< LV2_URID, Glib::RefPtr > _tags; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_MESSAGESWINDOW_HPP diff --git a/src/gui/NewSubgraphWindow.cpp b/src/gui/NewSubgraphWindow.cpp index f9dc8fc4..4f8197f2 100644 --- a/src/gui/NewSubgraphWindow.cpp +++ b/src/gui/NewSubgraphWindow.cpp @@ -24,8 +24,8 @@ #include "NewSubgraphWindow.hpp" #include "GraphView.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { NewSubgraphWindow::NewSubgraphWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -47,7 +47,7 @@ NewSubgraphWindow::NewSubgraphWindow(BaseObjectType* cobject, } void -NewSubgraphWindow::present(SPtr graph, +NewSubgraphWindow::present(SPtr graph, Properties data) { set_graph(graph); @@ -60,7 +60,7 @@ NewSubgraphWindow::present(SPtr graph, * This function MUST be called before using the window in any way! */ void -NewSubgraphWindow::set_graph(SPtr graph) +NewSubgraphWindow::set_graph(SPtr graph) { _graph = graph; } @@ -115,5 +115,5 @@ NewSubgraphWindow::cancel_clicked() hide(); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/NewSubgraphWindow.hpp b/src/gui/NewSubgraphWindow.hpp index 395856ba..403faa42 100644 --- a/src/gui/NewSubgraphWindow.hpp +++ b/src/gui/NewSubgraphWindow.hpp @@ -28,11 +28,11 @@ #include "Window.hpp" -namespace Ingen { +namespace ingen { -namespace Client { class GraphModel; } +namespace client { class GraphModel; } -namespace GUI { +namespace gui { /** 'New Subgraph' window. * @@ -46,9 +46,9 @@ public: NewSubgraphWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_graph(SPtr graph); + void set_graph(SPtr graph); - void present(SPtr graph, + void present(SPtr graph, Properties data); private: @@ -57,7 +57,7 @@ private: void cancel_clicked(); Properties _initial_data; - SPtr _graph; + SPtr _graph; Gtk::Entry* _name_entry; Gtk::Label* _message_label; @@ -66,7 +66,7 @@ private: Gtk::Button* _cancel_button; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_NEWSUBGRAPHWINDOW_HPP diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 1fea97f4..45f1e7cd 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -33,11 +33,11 @@ #include "WidgetFactory.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { NodeMenu::NodeMenu(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -51,7 +51,7 @@ NodeMenu::NodeMenu(BaseObjectType* cobject, } void -NodeMenu::init(App& app, SPtr block) +NodeMenu::init(App& app, SPtr block) { ObjectMenu::init(app, block); @@ -249,5 +249,5 @@ NodeMenu::has_control_inputs() return false; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp index 5d9f1e6d..e92e48fc 100644 --- a/src/gui/NodeMenu.hpp +++ b/src/gui/NodeMenu.hpp @@ -27,8 +27,8 @@ #include "ingen/client/BlockModel.hpp" #include "ingen/types.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Menu for a Node. * @@ -40,7 +40,7 @@ public: NodeMenu(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, SPtr block); + void init(App& app, SPtr block); bool has_control_inputs(); @@ -48,8 +48,8 @@ public: sigc::signal signal_embed_gui; protected: - SPtr block() const { - return dynamic_ptr_cast(_object); + SPtr block() const { + return dynamic_ptr_cast(_object); } void add_preset(const URI& uri, const std::string& label); @@ -69,7 +69,7 @@ protected: sigc::connection _preset_connection; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_NODEMENU_HPP diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 6163c1c1..8605e91d 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -43,11 +43,11 @@ #include "WindowFactory.hpp" #include "ingen_config.h" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { NodeModule::NodeModule(GraphCanvas& canvas, SPtr block) @@ -178,7 +178,7 @@ NodeModule::show_human_names(bool b) } for (iterator i = begin(); i != end(); ++i) { - Ingen::GUI::Port* const port = dynamic_cast(*i); + ingen::gui::Port* const port = dynamic_cast(*i); Glib::ustring label(port->model()->symbol().c_str()); if (b) { const Atom& name_property = port->model()->get_property(uris.lv2_name); @@ -235,7 +235,7 @@ void NodeModule::plugin_changed() { for (iterator p = begin(); p != end(); ++p) { - dynamic_cast(*p)->update_metadata(); + dynamic_cast(*p)->update_metadata(); } } @@ -514,5 +514,5 @@ NodeModule::on_selected(gboolean selected) return true; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index 863b6ffb..51692451 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -24,14 +24,14 @@ namespace Raul { class Atom; } -namespace Ingen { namespace Client { +namespace ingen { namespace client { class BlockModel; class PluginUI; class PortModel; } } -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class GraphCanvas; class Port; @@ -48,24 +48,24 @@ class NodeModule : public Ganv::Module public: static NodeModule* create( GraphCanvas& canvas, - SPtr block, + SPtr block, bool human); virtual ~NodeModule(); App& app() const; - Port* port(SPtr model); + Port* port(SPtr model); - void delete_port_view(SPtr model); + void delete_port_view(SPtr model); virtual void store_location(double ax, double ay); void show_human_names(bool b); - SPtr block() const { return _block; } + SPtr block() const { return _block; } protected: - NodeModule(GraphCanvas& canvas, SPtr block); + NodeModule(GraphCanvas& canvas, SPtr block); virtual bool on_double_click(GdkEventButton* ev); @@ -81,7 +81,7 @@ protected: void rename(); void property_changed(const URI& key, const Atom& value); - void new_port_view(SPtr port); + void new_port_view(SPtr port); void port_activity(uint32_t index, const Atom& value); void port_value_changed(uint32_t index, const Atom& value); @@ -90,15 +90,15 @@ protected: bool show_menu(GdkEventButton* ev); - SPtr _block; + SPtr _block; NodeMenu* _menu; - SPtr _plugin_ui; + SPtr _plugin_ui; Gtk::Widget* _gui_widget; Gtk::Window* _gui_window; ///< iff popped up bool _initialised; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_NODEMODULE_HPP diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index bfce4248..7c81adf2 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -25,11 +25,11 @@ #include "WidgetFactory.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { ObjectMenu::ObjectMenu(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -141,5 +141,5 @@ ObjectMenu::on_menu_properties() _app->window_factory()->present_properties(_object); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp index a9b07fd5..b0a0cc10 100644 --- a/src/gui/ObjectMenu.hpp +++ b/src/gui/ObjectMenu.hpp @@ -25,8 +25,8 @@ #include "ingen/client/ObjectModel.hpp" #include "ingen/types.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class ObjectControlWindow; class ObjectPropertiesWindow; @@ -42,9 +42,9 @@ public: ObjectMenu(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, SPtr object); + void init(App& app, SPtr object); - SPtr object() const { return _object; } + SPtr object() const { return _object; } App* app() const { return _app; } protected: @@ -58,7 +58,7 @@ protected: void property_changed(const URI& predicate, const Atom& value); App* _app; - SPtr _object; + SPtr _object; Gtk::MenuItem* _learn_menuitem; Gtk::MenuItem* _unlearn_menuitem; Gtk::CheckMenuItem* _polyphonic_menuitem; @@ -71,7 +71,7 @@ protected: bool _enable_signal; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_OBJECTMENU_HPP diff --git a/src/gui/PluginMenu.cpp b/src/gui/PluginMenu.cpp index fc385773..e85d1da7 100644 --- a/src/gui/PluginMenu.cpp +++ b/src/gui/PluginMenu.cpp @@ -18,10 +18,10 @@ #include "ingen/Log.hpp" #include "ingen/client/PluginModel.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { -PluginMenu::PluginMenu(Ingen::World& world) +PluginMenu::PluginMenu(ingen::World& world) : _world(world) , _classless_menu(nullptr, nullptr) { @@ -62,7 +62,7 @@ PluginMenu::clear() } void -PluginMenu::add_plugin(SPtr p) +PluginMenu::add_plugin(SPtr p) { typedef ClassMenus::iterator iterator; @@ -141,7 +141,7 @@ PluginMenu::build_plugin_class_menu(Gtk::Menu* menu, } void -PluginMenu::add_plugin_to_menu(MenuRecord& menu, SPtr p) +PluginMenu::add_plugin_to_menu(MenuRecord& menu, SPtr p) { const URIs& uris = _world.uris(); LilvWorld* lworld = _world.lilv_world(); @@ -167,10 +167,10 @@ PluginMenu::add_plugin_to_menu(MenuRecord& menu, SPtr p) } void -PluginMenu::load_plugin(WPtr weak_plugin) +PluginMenu::load_plugin(WPtr weak_plugin) { signal_load_plugin.emit(weak_plugin); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp index bc654db5..e4343ed7 100644 --- a/src/gui/PluginMenu.hpp +++ b/src/gui/PluginMenu.hpp @@ -27,11 +27,11 @@ #include "ingen/types.hpp" #include "lilv/lilv.h" -namespace Ingen { +namespace ingen { -namespace Client { class PluginModel; } +namespace client { class PluginModel; } -namespace GUI { +namespace gui { /** Type-hierarchical plugin menu. @@ -41,12 +41,12 @@ namespace GUI { class PluginMenu : public Gtk::Menu { public: - PluginMenu(Ingen::World& world); + PluginMenu(ingen::World& world); void clear(); - void add_plugin(SPtr p); + void add_plugin(SPtr p); - sigc::signal< void, WPtr > signal_load_plugin; + sigc::signal< void, WPtr > signal_load_plugin; private: struct MenuRecord { @@ -65,16 +65,16 @@ private: const LV2Children& children, std::set& ancestors); - void add_plugin_to_menu(MenuRecord& menu, SPtr p); + void add_plugin_to_menu(MenuRecord& menu, SPtr p); - void load_plugin(WPtr weak_plugin); + void load_plugin(WPtr weak_plugin); - Ingen::World& _world; + ingen::World& _world; MenuRecord _classless_menu; ClassMenus _class_menus; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_PLUGINMENU_HPP diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 9742cee3..60e11471 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -36,10 +36,10 @@ #include "ingen_config.h" #include "rgba.hpp" -using namespace Ingen::Client; +using namespace ingen::client; -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { Port* Port::create(App& app, @@ -274,16 +274,16 @@ Port::build_uri_menu() world->lilv_world(), LILV_NS_RDFS "range"); // Get every class in the range of the port's property - RDFS::URISet ranges; + rdfs::URISet ranges; LilvNodes* range = lilv_world_find_nodes( world->lilv_world(), designation, rdfs_range, nullptr); LILV_FOREACH(nodes, r, range) { ranges.insert(URI(lilv_node_as_string(lilv_nodes_get(range, r)))); } - RDFS::classes(world, ranges, false); + rdfs::classes(world, ranges, false); // Get all objects in range - RDFS::Objects values = RDFS::instances(world, ranges); + rdfs::Objects values = rdfs::instances(world, ranges); // Add a menu item for each such class for (const auto& v : values) { @@ -530,5 +530,5 @@ Port::on_selected(gboolean b) return true; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index c714feae..d459f7b3 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -29,13 +29,13 @@ namespace Raul { class Atom; } -namespace Ingen { +namespace ingen { class URI; -namespace Client { class PortModel; } +namespace client { class PortModel; } -namespace GUI { +namespace gui { class App; class GraphBox; @@ -50,12 +50,12 @@ public: static Port* create( App& app, Ganv::Module& module, - SPtr pm, + SPtr pm, bool flip = false); ~Port(); - SPtr model() const { return _port_model.lock(); } + SPtr model() const { return _port_model.lock(); } bool show_menu(GdkEventButton* ev); void update_metadata(); @@ -69,11 +69,11 @@ public: private: Port(App& app, Ganv::Module& module, - SPtr pm, + SPtr pm, const std::string& name, bool flip = false); - static std::string port_label(App& app, SPtr pm); + static std::string port_label(App& app, SPtr pm); Gtk::Menu* build_enum_menu(); Gtk::Menu* build_uri_menu(); @@ -91,12 +91,12 @@ private: void set_type_tag(); App& _app; - WPtr _port_model; + WPtr _port_model; bool _entered : 1; bool _flipped : 1; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_PORT_HPP diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index c6ec8fa1..3a5b510d 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -25,11 +25,11 @@ #include "PortMenu.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { PortMenu::PortMenu(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -148,7 +148,7 @@ PortMenu::on_menu_expose() const std::string label = block->label() + " " + block->port_label(port); const Raul::Path path = Raul::Path(block->path() + Raul::Symbol("_" + port->symbol())); - Ingen::Resource r(*_object.get()); + ingen::Resource r(*_object.get()); r.remove_property(uris.lv2_index, uris.patch_wildcard); r.set_property(uris.lv2_symbol, _app->forge().alloc(path.symbol())); r.set_property(uris.lv2_name, _app->forge().alloc(label.c_str())); @@ -170,5 +170,5 @@ PortMenu::on_menu_expose() } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp index db567980..3de51fae 100644 --- a/src/gui/PortMenu.hpp +++ b/src/gui/PortMenu.hpp @@ -26,8 +26,8 @@ #include "ObjectMenu.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Menu for a Port. * @@ -40,7 +40,7 @@ public: const Glib::RefPtr& xml); void init(App& app, - SPtr port, + SPtr port, bool internal_graph_port = false); private: @@ -60,7 +60,7 @@ private: bool _internal_graph_port; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_PORTMENU_HPP diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 4d47b3ae..80565dd5 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -33,11 +33,11 @@ #include "RDFS.hpp" #include "URIEntry.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { typedef std::set URISet; @@ -109,7 +109,7 @@ PropertiesWindow::add_property(const URI& key, const Atom& value) // Column 0: Property LilvNode* prop = lilv_new_uri(world->lilv_world(), key.c_str()); - std::string name = RDFS::label(world, prop); + std::string name = rdfs::label(world, prop); if (name.empty()) { name = world->rdf_world()->prefixes().qualify(key); } @@ -145,7 +145,7 @@ PropertiesWindow::add_property(const URI& key, const Atom& value) } bool -PropertiesWindow::datatype_supported(const RDFS::URISet& types, +PropertiesWindow::datatype_supported(const rdfs::URISet& types, URI* widget_type) { if (types.find(_app->uris().atom_Int) != types.end()) { @@ -169,7 +169,7 @@ PropertiesWindow::datatype_supported(const RDFS::URISet& types, } bool -PropertiesWindow::class_supported(const RDFS::URISet& types) +PropertiesWindow::class_supported(const rdfs::URISet& types) { World* world = _app->world(); LilvNode* rdf_type = lilv_new_uri( @@ -213,12 +213,12 @@ PropertiesWindow::set_object(SPtr model) world->lilv_world(), LILV_NS_RDFS "Datatype"); // Populate key combo - const URISet props = RDFS::properties(world, model); + const URISet props = rdfs::properties(world, model); std::map entries; for (const auto& p : props) { LilvNode* prop = lilv_new_uri(world->lilv_world(), p.c_str()); - const std::string label = RDFS::label(world, prop); - URISet ranges = RDFS::range(world, prop, true); + const std::string label = rdfs::label(world, prop); + URISet ranges = rdfs::range(world, prop, true); lilv_node_free(prop); if (label.empty() || ranges.empty()) { @@ -227,9 +227,9 @@ PropertiesWindow::set_object(SPtr model) } LilvNode* range = lilv_new_uri(world->lilv_world(), (*ranges.begin()).c_str()); - if (RDFS::is_a(world, range, rdfs_DataType)) { + if (rdfs::is_a(world, range, rdfs_DataType)) { // Range is a datatype, show if type or any subtype is supported - RDFS::datatypes(_app->world(), ranges, false); + rdfs::datatypes(_app->world(), ranges, false); URI widget_type("urn:nothing"); if (datatype_supported(ranges, &widget_type)) { entries.emplace(label, p); @@ -274,12 +274,12 @@ PropertiesWindow::create_value_widget(const URI& key, } URI type(type_uri); - Ingen::World* world = _app->world(); + ingen::World* world = _app->world(); LilvWorld* lworld = world->lilv_world(); // See if type is a datatype we support std::set types{type}; - RDFS::datatypes(_app->world(), types, false); + rdfs::datatypes(_app->world(), types, false); URI widget_type("urn:nothing"); const bool supported = datatype_supported(types, &widget_type); @@ -333,7 +333,7 @@ PropertiesWindow::create_value_widget(const URI& key, : ""); LilvNode* pred = lilv_new_uri(lworld, key.c_str()); - URISet ranges = RDFS::range(world, pred, true); + URISet ranges = rdfs::range(world, pred, true); URIEntry* widget = manage(new URIEntry(_app, ranges, str ? str : "")); widget->signal_changed().connect( sigc::bind(sigc::mem_fun(this, &PropertiesWindow::on_change), key)); @@ -343,7 +343,7 @@ PropertiesWindow::create_value_widget(const URI& key, LilvNode* type_node = lilv_new_uri(lworld, type.c_str()); LilvNode* rdfs_Class = lilv_new_uri(lworld, LILV_NS_RDFS "Class"); - const bool is_class = RDFS::is_a(world, type_node, rdfs_Class); + const bool is_class = rdfs::is_a(world, type_node, rdfs_Class); lilv_node_free(rdfs_Class); lilv_node_free(type_node); @@ -351,7 +351,7 @@ PropertiesWindow::create_value_widget(const URI& key, type == _app->uris().rdfs_Class || is_class) { LilvNode* pred = lilv_new_uri(lworld, key.c_str()); - URISet ranges = RDFS::range(world, pred, true); + URISet ranges = rdfs::range(world, pred, true); const char* str = value.is_valid() ? value.ptr() : ""; URIEntry* widget = manage(new URIEntry(_app, ranges, str)); widget->signal_changed().connect( @@ -511,7 +511,7 @@ PropertiesWindow::key_changed() LilvNode* prop = lilv_new_uri(lworld, key_uri.c_str()); // Try to create a value widget in the range of this property - const URISet ranges = RDFS::range(_app->world(), prop, true); + const URISet ranges = rdfs::range(_app->world(), prop, true); for (const auto& r : ranges) { Gtk::Widget* value_widget = create_value_widget( URI(key_uri), r.c_str(), Atom()); @@ -587,5 +587,5 @@ PropertiesWindow::ok_clicked() Gtk::Window::hide(); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp index f4a8dd0d..0cbd8b91 100644 --- a/src/gui/PropertiesWindow.hpp +++ b/src/gui/PropertiesWindow.hpp @@ -34,11 +34,11 @@ #include "Window.hpp" -namespace Ingen { +namespace ingen { -namespace Client { class ObjectModel; } +namespace client { class ObjectModel; } -namespace GUI { +namespace gui { /** Object properties window. * @@ -52,8 +52,8 @@ public: PropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void present(SPtr model); - void set_object(SPtr model); + void present(SPtr model); + void set_object(SPtr model); private: /** Record of a property (row in the table) */ @@ -106,7 +106,7 @@ private: typedef std::map Records; Records _records; - SPtr _model; + SPtr _model; ComboColumns _combo_columns; Glib::RefPtr _key_store; sigc::connection _property_connection; @@ -123,7 +123,7 @@ private: Gtk::Button* _ok_button; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_PROPERTIES_WINDOW_HPP diff --git a/src/gui/RDFS.cpp b/src/gui/RDFS.cpp index 71b3441a..4ff26914 100644 --- a/src/gui/RDFS.cpp +++ b/src/gui/RDFS.cpp @@ -23,9 +23,9 @@ #include "RDFS.hpp" -namespace Ingen { -namespace GUI { -namespace RDFS { +namespace ingen { +namespace gui { +namespace rdfs { std::string label(World* world, const LilvNode* node) @@ -113,7 +113,7 @@ datatypes(World* world, URISet& types, bool super) } URISet -types(World* world, SPtr model) +types(World* world, SPtr model) { typedef Properties::const_iterator PropIter; typedef std::pair PropRange; @@ -137,16 +137,16 @@ types(World* world, SPtr model) } // Add every superclass of every type, recursively - RDFS::classes(world, types, true); + rdfs::classes(world, types, true); return types; } URISet -properties(World* world, SPtr model) +properties(World* world, SPtr model) { URISet properties; - URISet types = RDFS::types(world, model); + URISet types = rdfs::types(world, model); LilvNode* rdf_type = lilv_new_uri(world->lilv_world(), LILV_NS_RDF "type"); @@ -209,7 +209,7 @@ instances(World* world, const URISet& types) if (!lilv_node_is_uri(object)) { continue; } - const std::string label = RDFS::label(world, object); + const std::string label = rdfs::label(world, object); result.emplace(label, URI(lilv_node_as_string(object))); } lilv_node_free(type); @@ -234,7 +234,7 @@ range(World* world, const LilvNode* prop, bool recursive) } if (recursive) { - RDFS::classes(world, ranges, false); + rdfs::classes(world, ranges, false); } lilv_nodes_free(nodes); @@ -254,6 +254,6 @@ is_a(World* world, const LilvNode* inst, const LilvNode* klass) return is_instance; } -} // namespace RDFS -} // namespace GUI -} // namespace Ingen +} // namespace rdfs +} // namespace gui +} // namespace ingen diff --git a/src/gui/RDFS.hpp b/src/gui/RDFS.hpp index f59bbdf5..8de9076d 100644 --- a/src/gui/RDFS.hpp +++ b/src/gui/RDFS.hpp @@ -24,15 +24,15 @@ #include "ingen/types.hpp" #include "lilv/lilv.h" -namespace Ingen { +namespace ingen { class World; -namespace Client { class ObjectModel; } +namespace client { class ObjectModel; } -namespace GUI { +namespace gui { -namespace RDFS { +namespace rdfs { /** Set of URIs. */ typedef std::set URISet; @@ -60,10 +60,10 @@ void datatypes(World* world, URISet& types, bool super); Objects instances(World* world, const URISet& types); /** Get all the types which `model` is an instance of. */ -URISet types(World* world, SPtr model); +URISet types(World* world, SPtr model); /** Get all the properties with domains appropriate for `model`. */ -URISet properties(World* world, SPtr model); +URISet properties(World* world, SPtr model); /** Return the range (value types) of `prop`. * @param recursive If true, include all subclasses. @@ -73,8 +73,8 @@ URISet range(World* world, const LilvNode* prop, bool recursive); /** Return true iff `inst` is-a `klass`. */ bool is_a(World* world, const LilvNode* inst, const LilvNode* klass); -} // namespace RDFS -} // namespace GUI -} // namespace Ingen +} // namespace rdfs +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_RDF_HPP diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 518f2439..33516c2d 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -26,11 +26,11 @@ #include "App.hpp" #include "RenameWindow.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr& xml) @@ -133,5 +133,5 @@ RenameWindow::ok_clicked() hide(); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp index 36264879..89d90f26 100644 --- a/src/gui/RenameWindow.hpp +++ b/src/gui/RenameWindow.hpp @@ -27,8 +27,8 @@ #include "Window.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Rename window. Handles renaming of any (Ingen) object. * @@ -40,16 +40,16 @@ public: RenameWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void present(SPtr object); + void present(SPtr object); private: - void set_object(SPtr object); + void set_object(SPtr object); void values_changed(); void cancel_clicked(); void ok_clicked(); - SPtr _object; + SPtr _object; Gtk::Entry* _symbol_entry; Gtk::Entry* _label_entry; @@ -58,7 +58,7 @@ private: Gtk::Button* _ok_button; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_RENAMEWINDOW_HPP diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp index 81e6fb6c..3a122e45 100644 --- a/src/gui/Style.cpp +++ b/src/gui/Style.cpp @@ -30,10 +30,10 @@ #include "Style.hpp" #include "Port.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { -using namespace Ingen::Client; +using namespace ingen::client; Style::Style(App& app) // Colours from the Tango palette with modified V @@ -82,7 +82,7 @@ Style::apply_settings() } uint32_t -Style::get_port_color(const Client::PortModel* p) +Style::get_port_color(const client::PortModel* p) { const URIs& uris = _app.uris(); if (p->is_a(uris.lv2_AudioPort)) { @@ -102,5 +102,5 @@ Style::get_port_color(const Client::PortModel* p) return 0x555555FF; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/Style.hpp b/src/gui/Style.hpp index 8e628a3d..bb403ffd 100644 --- a/src/gui/Style.hpp +++ b/src/gui/Style.hpp @@ -20,10 +20,10 @@ #include #include -namespace Ingen { namespace Client { class PortModel; } } +namespace ingen { namespace client { class PortModel; } } -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class App; class Port; @@ -38,7 +38,7 @@ public: void apply_settings(); - uint32_t get_port_color(const Client::PortModel* p); + uint32_t get_port_color(const client::PortModel* p); private: App& _app; @@ -50,7 +50,7 @@ private: uint32_t _string_port_color; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_STYLE_HPP diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp index 6bbcf534..9c836644 100644 --- a/src/gui/SubgraphModule.cpp +++ b/src/gui/SubgraphModule.cpp @@ -28,11 +28,11 @@ #include "SubgraphModule.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { SubgraphModule::SubgraphModule(GraphCanvas& canvas, SPtr graph) @@ -98,5 +98,5 @@ SubgraphModule::menu_remove() app().interface()->del(_graph->uri()); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/SubgraphModule.hpp b/src/gui/SubgraphModule.hpp index 1b8df2fa..44241638 100644 --- a/src/gui/SubgraphModule.hpp +++ b/src/gui/SubgraphModule.hpp @@ -22,14 +22,14 @@ #include "NodeModule.hpp" #include "GraphPortModule.hpp" -namespace Ingen { namespace Client { +namespace ingen { namespace client { class GraphModel; class GraphWindow; class PortModel; } } -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class GraphCanvas; @@ -41,7 +41,7 @@ class SubgraphModule : public NodeModule { public: SubgraphModule(GraphCanvas& canvas, - SPtr graph); + SPtr graph); virtual ~SubgraphModule() {} @@ -52,13 +52,13 @@ public: void browse_to_graph(); void menu_remove(); - SPtr graph() const { return _graph; } + SPtr graph() const { return _graph; } protected: - SPtr _graph; + SPtr _graph; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_SUBGRAPHMODULE_HPP diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 7a80fa6e..cd7b1594 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -27,8 +27,8 @@ using boost::optional; -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { ThreadedLoader::ThreadedLoader(App& app, SPtr engine) : _app(app) @@ -114,7 +114,7 @@ ThreadedLoader::load_graph_event(const FilePath& file_path, } void -ThreadedLoader::save_graph(SPtr model, const URI& uri) +ThreadedLoader::save_graph(SPtr model, const URI& uri) { std::lock_guard lock(_mutex); @@ -127,7 +127,7 @@ ThreadedLoader::save_graph(SPtr model, const URI& uri) } void -ThreadedLoader::save_graph_event(SPtr model, +ThreadedLoader::save_graph_event(SPtr model, const URI& uri) { assert(uri.scheme() == "file"); @@ -144,5 +144,5 @@ ThreadedLoader::save_graph_event(SPtr model, } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index 79ef6466..70e13fce 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -32,11 +32,11 @@ #include "ingen/Serialiser.hpp" #include "raul/Semaphore.hpp" -namespace Ingen { +namespace ingen { class URI; -namespace GUI { +namespace gui { /** Thread for loading graph files. * @@ -63,7 +63,7 @@ public: boost::optional engine_symbol, boost::optional engine_data); - void save_graph(SPtr model, const URI& uri); + void save_graph(SPtr model, const URI& uri); SPtr parser(); @@ -73,7 +73,7 @@ private: boost::optional engine_symbol, boost::optional engine_data); - void save_graph_event(SPtr model, + void save_graph_event(SPtr model, const URI& filename); /** Returns nothing and takes no parameters (because they have all been bound) */ @@ -90,7 +90,7 @@ private: std::thread _thread; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_LOADERRTHREAD_HPP diff --git a/src/gui/URIEntry.cpp b/src/gui/URIEntry.cpp index 0b81afd7..97099b46 100644 --- a/src/gui/URIEntry.cpp +++ b/src/gui/URIEntry.cpp @@ -20,8 +20,8 @@ #include "RDFS.hpp" #include "URIEntry.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { URIEntry::URIEntry(App* app, std::set types, const std::string& value) : Gtk::HBox(false, 4) @@ -52,7 +52,7 @@ URIEntry::build_value_menu() LilvNode* rdfs_Datatype = lilv_new_uri(lworld, LILV_NS_RDFS "Datatype"); LilvNode* rdfs_subClassOf = lilv_new_uri(lworld, LILV_NS_RDFS "subClassOf"); - RDFS::Objects values = RDFS::instances(world, _types); + rdfs::Objects values = rdfs::instances(world, _types); for (const auto& v : values) { const LilvNode* inst = lilv_new_uri(lworld, v.second.c_str()); @@ -111,18 +111,18 @@ URIEntry::build_subclass_menu(const LilvNode* klass) Gtk::Menu* menu = new Gtk::Menu(); // Add "header" item for choosing this class itself - add_leaf_menu_item(menu, klass, RDFS::label(world, klass)); + add_leaf_menu_item(menu, klass, rdfs::label(world, klass)); menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); // Put subclasses/types in a map keyed by label (to sort menu) std::map entries; LILV_FOREACH(nodes, s, subclasses) { const LilvNode* node = lilv_nodes_get(subclasses, s); - entries.emplace(RDFS::label(world, node), node); + entries.emplace(rdfs::label(world, node), node); } LILV_FOREACH(nodes, s, subtypes) { const LilvNode* node = lilv_nodes_get(subtypes, s); - entries.emplace(RDFS::label(world, node), node); + entries.emplace(rdfs::label(world, node), node); } // Add an item (possibly with a submenu) for each subclass/type @@ -188,5 +188,5 @@ URIEntry::menu_button_event(GdkEvent* ev) return true; } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/URIEntry.hpp b/src/gui/URIEntry.hpp index 2f55a3d9..247c4a6d 100644 --- a/src/gui/URIEntry.hpp +++ b/src/gui/URIEntry.hpp @@ -24,8 +24,8 @@ #include "lilv/lilv.h" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { class App; @@ -62,7 +62,7 @@ private: Gtk::Entry* _entry; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_URI_ENTRY_HPP diff --git a/src/gui/WidgetFactory.cpp b/src/gui/WidgetFactory.cpp index afb6a07f..3ca4eec4 100644 --- a/src/gui/WidgetFactory.cpp +++ b/src/gui/WidgetFactory.cpp @@ -22,8 +22,8 @@ #include "WidgetFactory.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { Glib::ustring WidgetFactory::ui_filename = ""; @@ -40,7 +40,7 @@ void WidgetFactory::find_ui_file() { // Try file in bundle (directory where executable resides) - ui_filename = Ingen::bundle_file_path("ingen_gui.ui"); + ui_filename = ingen::bundle_file_path("ingen_gui.ui"); if (is_readable(ui_filename)) { return; } @@ -53,7 +53,7 @@ WidgetFactory::find_ui_file() } // Try the default system installed path - ui_filename = Ingen::data_file_path("ingen_gui.ui"); + ui_filename = ingen::data_file_path("ingen_gui.ui"); if (is_readable(ui_filename)) { return; } @@ -76,5 +76,5 @@ WidgetFactory::create(const std::string& toplevel_widget) } } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/WidgetFactory.hpp b/src/gui/WidgetFactory.hpp index 92f4dffe..e640e2a7 100644 --- a/src/gui/WidgetFactory.hpp +++ b/src/gui/WidgetFactory.hpp @@ -22,8 +22,8 @@ #include #include -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { /** Loads widgets from an XML description. * Purely static. @@ -52,7 +52,7 @@ private: static Glib::ustring ui_filename; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_GLADEFACTORY_HPP diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp index 2a5c9843..6bf5e586 100644 --- a/src/gui/Window.hpp +++ b/src/gui/Window.hpp @@ -20,9 +20,9 @@ #include #include -namespace Ingen { +namespace ingen { -namespace GUI { +namespace gui { class App; @@ -72,7 +72,7 @@ public: App* _app; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_WINDOW_HPP diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index 5dbdbe98..c5f9c089 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -31,11 +31,11 @@ #include "WidgetFactory.hpp" #include "WindowFactory.hpp" -namespace Ingen { +namespace ingen { -using namespace Client; +using namespace client; -namespace GUI { +namespace gui { WindowFactory::WindowFactory(App& app) : _app(app) @@ -298,5 +298,5 @@ WindowFactory::present_properties(SPtr object) _properties_win->present(object); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp index ea8b909b..a6ddb682 100644 --- a/src/gui/WindowFactory.hpp +++ b/src/gui/WindowFactory.hpp @@ -22,15 +22,15 @@ #include "ingen/Node.hpp" #include "ingen/types.hpp" -namespace Ingen { +namespace ingen { -namespace Client { +namespace client { class BlockModel; class ObjectModel; class GraphModel; } -namespace GUI { +namespace gui { class App; class GraphBox; @@ -55,21 +55,21 @@ public: size_t num_open_graph_windows(); - GraphBox* graph_box(SPtr graph); - GraphWindow* graph_window(SPtr graph); - GraphWindow* parent_graph_window(SPtr block); + GraphBox* graph_box(SPtr graph); + GraphWindow* graph_window(SPtr graph); + GraphWindow* parent_graph_window(SPtr block); void present_graph( - SPtr graph, + SPtr graph, GraphWindow* preferred = NULL, SPtr view = SPtr()); - void present_load_plugin(SPtr graph, Properties data=Properties()); - void present_load_graph(SPtr graph, Properties data=Properties()); - void present_load_subgraph(SPtr graph, Properties data=Properties()); - void present_new_subgraph(SPtr graph, Properties data=Properties()); - void present_rename(SPtr object); - void present_properties(SPtr object); + void present_load_plugin(SPtr graph, Properties data=Properties()); + void present_load_graph(SPtr graph, Properties data=Properties()); + void present_load_subgraph(SPtr graph, Properties data=Properties()); + void present_new_subgraph(SPtr graph, Properties data=Properties()); + void present_rename(SPtr object); + void present_properties(SPtr object); bool remove_graph_window(GraphWindow* win, GdkEventAny* ignored = NULL); @@ -80,7 +80,7 @@ public: private: typedef std::map GraphWindowMap; - GraphWindow* new_graph_window(SPtr graph, + GraphWindow* new_graph_window(SPtr graph, SPtr view); App& _app; @@ -93,7 +93,7 @@ private: RenameWindow* _rename_win; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_WINDOWFACTORY_HPP diff --git a/src/gui/ingen_gui.cpp b/src/gui/ingen_gui.cpp index 677296fd..cf1fb88f 100644 --- a/src/gui/ingen_gui.cpp +++ b/src/gui/ingen_gui.cpp @@ -21,11 +21,11 @@ #include "App.hpp" -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { struct GUIModule : public Module { - using SigClientInterface = Client::SigClientInterface; + using SigClientInterface = client::SigClientInterface; void load(World* world) { URI uri(world->conf().option("connect").ptr()); @@ -37,7 +37,7 @@ struct GUIModule : public Module { world->interface()->set_respondee(make_client(world)); } - app = GUI::App::create(world); + app = gui::App::create(world); } void run(World* world) { @@ -49,19 +49,19 @@ struct GUIModule : public Module { return world->engine() ? sci : SPtr(new QueuedInterface(sci)); } - SPtr app; + SPtr app; }; -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen extern "C" { -Ingen::Module* +ingen::Module* ingen_module_load() { Glib::thread_init(); - return new Ingen::GUI::GUIModule(); + return new ingen::gui::GUIModule(); } } // extern "C" diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index 75f67b03..56e07b44 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -31,7 +31,7 @@ #define INGEN_LV2_UI_URI INGEN_NS "GraphUIGtk2" -namespace Ingen { +namespace ingen { /** A sink that writes atoms to a port via the UI extension. */ struct IngenLV2AtomSink : public AtomSink { @@ -71,14 +71,14 @@ struct IngenLV2UI { Forge* forge; World* world; IngenLV2AtomSink* sink; - SPtr app; - SPtr view; + SPtr app; + SPtr view; SPtr engine; SPtr reader; - SPtr client; + SPtr client; }; -} // namespace Ingen +} // namespace ingen static LV2UI_Handle instantiate(const LV2UI_Descriptor* descriptor, @@ -90,12 +90,12 @@ instantiate(const LV2UI_Descriptor* descriptor, const LV2_Feature* const* features) { #if __cplusplus >= 201103L - using Ingen::SPtr; + using ingen::SPtr; #endif - Ingen::set_bundle_path(bundle_path); + ingen::set_bundle_path(bundle_path); - Ingen::IngenLV2UI* ui = new Ingen::IngenLV2UI(); + ingen::IngenLV2UI* ui = new ingen::IngenLV2UI(); LV2_URID_Map* map = nullptr; LV2_URID_Unmap* unmap = nullptr; @@ -110,8 +110,8 @@ instantiate(const LV2UI_Descriptor* descriptor, } } - ui->world = new Ingen::World(map, unmap, log); - ui->forge = new Ingen::Forge(ui->world->uri_map()); + ui->world = new ingen::World(map, unmap, log); + ui->forge = new ingen::Forge(ui->world->uri_map()); ui->world->load_configuration(ui->argc, ui->argv); @@ -120,45 +120,45 @@ instantiate(const LV2UI_Descriptor* descriptor, return nullptr; } - ui->sink = new Ingen::IngenLV2AtomSink( + ui->sink = new ingen::IngenLV2AtomSink( ui->world->uris(), write_function, controller); // Set up an engine interface that writes LV2 atoms - ui->engine = SPtr( - new Ingen::AtomWriter( + ui->engine = SPtr( + new ingen::AtomWriter( ui->world->uri_map(), ui->world->uris(), *ui->sink)); ui->world->set_interface(ui->engine); // Create App and client - ui->app = Ingen::GUI::App::create(ui->world); - ui->client = SPtr( - new Ingen::Client::SigClientInterface()); + ui->app = ingen::gui::App::create(ui->world); + ui->client = SPtr( + new ingen::client::SigClientInterface()); ui->app->set_is_plugin(true); ui->app->attach(ui->client); - ui->reader = SPtr( - new Ingen::AtomReader(ui->world->uri_map(), + ui->reader = SPtr( + new ingen::AtomReader(ui->world->uri_map(), ui->world->uris(), ui->world->log(), *ui->client.get())); // Create empty root graph model - Ingen::Properties props; + ingen::Properties props; props.emplace(ui->app->uris().rdf_type, - Ingen::Property(ui->app->uris().ingen_Graph)); - ui->app->store()->put(Ingen::main_uri(), props); + ingen::Property(ui->app->uris().ingen_Graph)); + ui->app->store()->put(ingen::main_uri(), props); // Create a GraphBox for the root and set as the UI widget - SPtr root = - Ingen::dynamic_ptr_cast( + SPtr root = + ingen::dynamic_ptr_cast( ui->app->store()->object(Raul::Path("/"))); - ui->view = Ingen::GUI::GraphBox::create(*ui->app, root); + ui->view = ingen::gui::GraphBox::create(*ui->app, root); ui->view->unparent(); *widget = ui->view->gobj(); // Request the actual root graph - ui->world->interface()->get(Ingen::main_uri()); + ui->world->interface()->get(ingen::main_uri()); return ui; } @@ -166,7 +166,7 @@ instantiate(const LV2UI_Descriptor* descriptor, static void cleanup(LV2UI_Handle handle) { - Ingen::IngenLV2UI* ui = (Ingen::IngenLV2UI*)handle; + ingen::IngenLV2UI* ui = (ingen::IngenLV2UI*)handle; delete ui; } @@ -177,7 +177,7 @@ port_event(LV2UI_Handle handle, uint32_t format, const void* buffer) { - Ingen::IngenLV2UI* ui = (Ingen::IngenLV2UI*)handle; + ingen::IngenLV2UI* ui = (ingen::IngenLV2UI*)handle; const LV2_Atom* atom = (const LV2_Atom*)buffer; ui->reader->write(atom); } diff --git a/src/gui/rgba.hpp b/src/gui/rgba.hpp index dae3f179..f31e958c 100644 --- a/src/gui/rgba.hpp +++ b/src/gui/rgba.hpp @@ -19,8 +19,8 @@ #include -namespace Ingen { -namespace GUI { +namespace ingen { +namespace gui { static inline uint32_t rgba_to_uint(uint8_t r, uint8_t g, uint8_t b, uint8_t a) @@ -52,7 +52,7 @@ rgba_interpolate(uint32_t c1, uint32_t c2, float f) mono_interpolate(RGBA_A(c1), RGBA_A(c2), f)); } -} // namespace GUI -} // namespace Ingen +} // namespace gui +} // namespace ingen #endif // INGEN_GUI_RGBA_HPP -- cgit v1.2.1