summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2016-03-22 23:18:21 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2016-03-22 23:18:21 +0100
commitc59183808a7ee451f305f206afef217e7ca03f8e (patch)
tree82463adcd293733a581171802581d621169a2402
parent346821c54a99a709622523cf79f34f204dea2f93 (diff)
Playing around with tab widget.
-rw-r--r--plugingui/Makefile.am3
-rw-r--r--plugingui/Makefile.am.plugingui2
-rw-r--r--plugingui/dgwindow.cc38
3 files changed, 30 insertions, 13 deletions
diff --git a/plugingui/Makefile.am b/plugingui/Makefile.am
index 94d3a9a..40c44bb 100644
--- a/plugingui/Makefile.am
+++ b/plugingui/Makefile.am
@@ -56,8 +56,9 @@ EXTRA_DIST = \
resource_data.h \
scrollbar.h \
slider.h \
+ tabs.h \
textedit.h \
verticalline.h \
widget.h \
window.h \
- lodepng/lodepng.h \ No newline at end of file
+ lodepng/lodepng.h
diff --git a/plugingui/Makefile.am.plugingui b/plugingui/Makefile.am.plugingui
index b8b03be..9915ad2 100644
--- a/plugingui/Makefile.am.plugingui
+++ b/plugingui/Makefile.am.plugingui
@@ -30,6 +30,7 @@ PLUGIN_GUI_SOURCES = \
$(top_srcdir)/plugingui/pluginconfig.cc \
$(top_srcdir)/plugingui/image.cc \
$(top_srcdir)/plugingui/combobox.cc \
+ $(top_srcdir)/plugingui/tabs.cc \
$(top_srcdir)/plugingui/progressbar.cc \
$(top_srcdir)/plugingui/verticalline.cc \
$(top_srcdir)/plugingui/resource.cc \
@@ -62,4 +63,5 @@ PLUGIN_GUI_SOURCES += \
$(top_srcdir)/pugl/pugl/pugl_x11.c
PLUGIN_GUI_CPPFLAGS += -I$(top_srcdir)/pugl/pugl
+PLUGIN_GUI_LIBS += -lX11
endif
diff --git a/plugingui/dgwindow.cc b/plugingui/dgwindow.cc
index 8d9e789..7f9930c 100644
--- a/plugingui/dgwindow.cc
+++ b/plugingui/dgwindow.cc
@@ -29,6 +29,8 @@
#include "knob.h"
#include "verticalline.h"
#include "../version.h"
+#include "slider.h"
+#include "tabs.h"
#include "messagehandler.h"
#include "pluginconfig.h"
@@ -185,27 +187,36 @@ DGWindow::DGWindow(void* native_window, MessageHandler& messageHandler,
l2->resize(width() - 40, vlineSpacing);
layout.addItem(l2);
- HumanizeControls* humanizeControls = new HumanizeControls(this);
+ Tabs* tabs = new Tabs(this);
+
+ HumanizeControls* humanizeControls = new HumanizeControls(tabs);
humanizeControls->resize(80 * 3, 80);
- layout.addItem(humanizeControls);
- CONNECT(&humanizeControls->velocityCheck, stateChangedNotifier,
- this, &DGWindow::velocityCheckClick);
+// layout.addItem(humanizeControls);
+// CONNECT(&humanizeControls->velocityCheck, stateChangedNotifier,
+// this, &DGWindow::velocityCheckClick);
+
+// CONNECT(&humanizeControls->attackKnob, valueChangedNotifier,
+// this, &DGWindow::attackValueChanged);
- CONNECT(&humanizeControls->attackKnob, valueChangedNotifier,
- this, &DGWindow::attackValueChanged);
+// CONNECT(&humanizeControls->falloffKnob, valueChangedNotifier,
+// this, &DGWindow::falloffValueChanged);
- CONNECT(&humanizeControls->falloffKnob, valueChangedNotifier,
- this, &DGWindow::falloffValueChanged);
+ tabs->addTab(*humanizeControls, "Humanize");
// Store pointers for PluginGUI access:
- velocityCheck = &humanizeControls->velocityCheck;
- attackKnob = &humanizeControls->attackKnob;
- falloffKnob = &humanizeControls->falloffKnob;
+// velocityCheck = &humanizeControls->velocityCheck;
+// attackKnob = &humanizeControls->attackKnob;
+// falloffKnob = &humanizeControls->falloffKnob;
VerticalLine *l3 = new VerticalLine(this);
l3->resize(width() - 40, vlineSpacing);
layout.addItem(l3);
+// Slider *sliderTest = new Slider(tabs);
+// sliderTest->resize(100,20);
+// layout.addItem(sliderTest);
+// tabs->addTab(*sliderTest);
+
Label *lbl_version = new Label(this);
lbl_version->setText(".::. v" VERSION " .::. http://www.drumgizmo.org .::. GPLv3 .::.");
lbl_version->resize(width(), 20);
@@ -213,10 +224,13 @@ DGWindow::DGWindow(void* native_window, MessageHandler& messageHandler,
layout.addItem(lbl_version);
// Create file browser
- fileBrowser = new FileBrowser(this);
+ fileBrowser = new FileBrowser(tabs);
fileBrowser->move(0, 0);
fileBrowser->resize(this->width() - 1, this->height() - 1);
fileBrowser->hide();
+ tabs->addTab(*fileBrowser, "File Browser");
+
+ tabs->showTab(0);
}
void DGWindow::repaintEvent(RepaintEvent* repaintEvent)