Skip to content

Commit

Permalink
just main remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaji Khan committed Oct 12, 2024
1 parent 4d57580 commit 46ea23b
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 175 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pluginui.o: pluginui.cpp pluginui.h
g++ pluginui.cpp -c $(GTKMM) $(GTK) $(LV2) -Wno-deprecated-declarations

presets.o: presets.cc presets.h
g++ presets.cc -c $(GTKMM) $(GTK) $(OPTIMIZE) $(LV2)
g++ presets.cc -c $(GTKMM) $(GTK) $(OPTIMIZE) $(LV2) -Wno-deprecated-declarations

SharedLibrary.o: SharedLibrary.cpp SharedLibrary.h Plugin.cpp Plugin.h PluginControl.cpp PluginControl.h
g++ SharedLibrary.cpp Plugin.cpp PluginControl.cpp lv2_ext.cpp -c $(LV2) $(OPTIMIZE)
Expand Down
Binary file modified amprack
Binary file not shown.
24 changes: 11 additions & 13 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int main(int argc, char* argv[])
MyWindow * global_window_really_question_mark = nullptr;

void toggle_effects (GtkToggleButton * button, MyWindow * window) {
GtkPaned * pane = window -> pane.gobj();
GtkPaned * pane = window -> pane;

if (gtk_toggle_button_get_active (button)) {
gtk_paned_set_position (pane, 1600) ;
Expand Down Expand Up @@ -74,17 +74,15 @@ MyWindow::MyWindow(GtkApplication * _app)
box = Gtk::Box () ;
set_child (box);

pane = Gtk::Paned () ;
pane = (GtkPaned *)gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
box.set_orientation (Gtk::Orientation::VERTICAL);
pane.set_orientation (Gtk::Orientation::HORIZONTAL);

stack_box = Gtk::Box () ;
stack_box.set_spacing (10);
box.append (stack_box);
stack_box.set_orientation (Gtk::Orientation::VERTICAL);

pane.set_position (370);
pane.set_position (800);
gtk_paned_set_position (pane, 800);
//~ g_signal_connect (pane.gobj (), "notify::position", (GCallback) position_changed, NULL);

stack = Gtk::Stack () ;
Expand All @@ -95,7 +93,7 @@ MyWindow::MyWindow(GtkApplication * _app)
stack_box.append (switcher);

rack = new Rack () ;
stack.add (pane);
gtk_stack_add_child (stack.gobj (), (GtkWidget *)pane);

gtk_window_set_titlebar (gobj (), (GtkWidget *)rack->button_box);

Expand All @@ -107,29 +105,29 @@ MyWindow::MyWindow(GtkApplication * _app)

rack -> presets = (void *) presets;

gtk_notebook_append_page (presets->notebook.gobj (), rack->rack, gtk_label_new ("Effects"));
gtk_notebook_append_page (presets->notebook, rack->rack, gtk_label_new ("Effects"));

presets->my () ;

Settings settings = Settings (rack);
gtk_notebook_append_page (presets->notebook.gobj (), (GtkWidget *)settings . grid, gtk_label_new ("Settings"));
gtk_notebook_append_page (presets->notebook, (GtkWidget *)settings . grid, gtk_label_new ("Settings"));


CB * cb = new CB () ;
cb -> engine = rack -> engine ;
cb -> presets = presets ;

g_signal_connect (presets->add.gobj (), "clicked", (GCallback) save_preset_cb, cb);
g_signal_connect (presets->add, "clicked", (GCallback) save_preset_cb, cb);

Gtk::ScrolledWindow sw = Gtk::ScrolledWindow () ;
gtk_scrolled_window_set_child (sw.gobj (), (GtkWidget *)presets->master.gobj ());
gtk_scrolled_window_set_child (sw.gobj (), (GtkWidget *)presets->master);

pane.set_start_child (sw);
gtk_paned_set_end_child (pane.gobj (), (GtkWidget *)rack->master);
gtk_paned_set_start_child (pane, (GtkWidget *)sw.gobj ());
gtk_paned_set_end_child (pane, (GtkWidget *)rack->master);
g_signal_connect (this->gobj (), "close-request", (GCallback) quit, this);
g_signal_connect (this->gobj (), "show", (GCallback) onshow, this);

presets -> notebook.set_current_page (1);
gtk_notebook_set_current_page (presets->notebook, 1);

GtkEventController * event_controller = gtk_event_controller_key_new ();
g_signal_connect_swapped (event_controller, "key-pressed",
Expand Down
22 changes: 11 additions & 11 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void save_preset_cb (void * w, void * d) {
class MyWindow : public Gtk::Window
{
public:
Gtk::Paned pane ;
GtkPaned * pane ;
Gtk::Stack stack ;
Gtk::StackSwitcher switcher ;
Gtk::Box box, stack_box ;
Expand Down Expand Up @@ -163,24 +163,24 @@ hotkeys (MyWindow *window,
window->destroy ();
break;
case 49:
window -> presets -> notebook.set_current_page (1);
window -> presets -> presets.set_current_page (0);
gtk_notebook_set_current_page (window -> presets -> notebook, 1);
gtk_notebook_set_current_page (window -> presets -> presets, 0);
break ;
case 50:
window -> presets -> notebook.set_current_page (1);
window -> presets -> presets.set_current_page (1);
gtk_notebook_set_current_page (window -> presets -> notebook, 1);
gtk_notebook_set_current_page (window -> presets -> presets, 1);
break ;
case 51:
window -> presets -> notebook.set_current_page (1);
window -> presets -> presets.set_current_page (2);
gtk_notebook_set_current_page (window -> presets -> notebook, 1);
gtk_notebook_set_current_page (window -> presets -> presets, 2);
break ;
case 52:
window -> presets -> notebook.set_current_page (1);
window -> presets -> presets.set_current_page (3);
gtk_notebook_set_current_page (window -> presets -> notebook, 1);
gtk_notebook_set_current_page (window -> presets -> presets, 3);
break ;
case 96:
window -> presets -> notebook.set_current_page (0);
window -> presets -> presets.set_current_page (0);
gtk_notebook_set_current_page (window -> presets -> notebook, 0);
gtk_notebook_set_current_page (window -> presets -> presets, 0);
break ;
}

Expand Down
Binary file modified main.o
Binary file not shown.
2 changes: 1 addition & 1 deletion pluginui.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PluginUI {

void load_preset (std::string);
int get_index ();
Gtk::SpinButton id ;
GtkSpinButton * id ;

PluginUI (Engine * _engine, Plugin * _plugin, GtkBox * _parent, std::string pluginName, int _index, bool has_file_chooser, void * _rack) ;
void remove () ;
Expand Down
Binary file modified pluginui.o
Binary file not shown.
Loading

0 comments on commit 46ea23b

Please sign in to comment.