[SCM] calf/master: + GUI: knob and alignment enhancements by Markus Schmidt
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:39:36 UTC 2013
The following commit has been merged in the master branch:
commit 13a0ba852c31dd65bf7e97778613c93e4722fe2f
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Oct 8 23:31:51 2009 +0100
+ GUI: knob and alignment enhancements by Markus Schmidt
diff --git a/src/calf/custom_ctl.h b/src/calf/custom_ctl.h
index 1da5764..73fad88 100644
--- a/src/calf/custom_ctl.h
+++ b/src/calf/custom_ctl.h
@@ -101,13 +101,15 @@ struct CalfKnob
{
GtkRange parent;
int knob_type;
- double start_x, start_y, start_value, last_y;
+ int knob_size;
+ double start_x, start_y, start_value, last_y, last_x;
+ double last_dz;
};
struct CalfKnobClass
{
GtkRangeClass parent_class;
- GdkPixbuf *knob_image;
+ GdkPixbuf *knob_image[4];
};
extern GtkWidget *calf_knob_new();
diff --git a/src/calf/gui.h b/src/calf/gui.h
index de74547..e730e72 100644
--- a/src/calf/gui.h
+++ b/src/calf/gui.h
@@ -207,6 +207,13 @@ struct toggle_param_control: public param_control
virtual GtkWidget *create(plugin_gui *_gui, int _param_no);
virtual void get();
virtual void set();
+ static const int sizes = 2;
+ GdkPixbuf *pb;
+ GdkPixmap *pm_on;
+ GdkPixmap *pm_off;
+ GdkPixbuf *pb_on;
+ GdkPixbuf *pb_off;
+
static void toggle_value_changed(GtkCheckButton *widget, gpointer value);
};
diff --git a/src/gui.cpp b/src/gui.cpp
index 952d2a5..0f49159 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -28,6 +28,7 @@
#include <calf/preset.h>
#include <calf/preset_gui.h>
#include <calf/main_win.h>
+#include <gdk/gdk.h>
#include <iostream>
@@ -480,6 +481,12 @@ GtkWidget *knob_param_control::create(plugin_gui *_gui, int _param_no)
float increment = props.get_increment();
gtk_range_get_adjustment(GTK_RANGE(widget))->step_increment = increment;
CALF_KNOB(widget)->knob_type = get_int("type");
+ CALF_KNOB(widget)->knob_size = get_int("size", 2);
+ if(CALF_KNOB(widget)->knob_size > 4) {
+ CALF_KNOB(widget)->knob_size = 4;
+ } else if (CALF_KNOB(widget)->knob_size < 1) {
+ CALF_KNOB(widget)->knob_size = 1;
+ }
gtk_signal_connect(GTK_OBJECT(widget), "value-changed", G_CALLBACK(knob_value_changed), (gpointer)this);
return widget;
}
@@ -869,7 +876,11 @@ GtkWidget *table_container::create(plugin_gui *_gui, const char *element, xml_at
{
require_int_attribute("rows");
require_int_attribute("cols");
+ int homog = get_int("homogeneous", 0);
GtkWidget *table = gtk_table_new(get_int("rows", 1), get_int("cols", 1), false);
+ if(homog > 0) {
+ gtk_table_set_homogeneous(GTK_TABLE(table), TRUE);
+ }
container = GTK_CONTAINER(table);
return table;
}
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list