sp-color-slider.cpp revision 57d4715f4806f2a8caac4bca519d878381a3356c
0N/A#define __SP_COLOR_SLIDER_C__
0N/A#include "sp-color-scales.h"
0N/Astatic void sp_color_slider_adjustment_changed (GtkAdjustment *adjustment, SPColorSlider *slider);
0N/Astatic void sp_color_slider_adjustment_value_changed (GtkAdjustment *adjustment, SPColorSlider *slider);
0N/Astatic const guchar *sp_color_slider_render_gradient (gint x0, gint y0, gint width, gint height,
0N/Asp_color_slider_get_type (void)
0N/A sizeof (SPColorSlider),
0N/A sizeof (SPColorSliderClass),
868N/A GTK_TYPE_NONE, 0);
763N/A GTK_TYPE_NONE, 0);
204N/A GTK_TYPE_NONE, 0);
112N/A GTK_TYPE_NONE, 0);
797N/A widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
0N/A gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height);
797N/A ColorScales::setScaled( slider->adjustment, CLAMP ((gfloat) (event->x - cx) / cw, 0.0, 1.0) );
797N/A if (slider->value != slider->oldvalue) gtk_signal_emit (GTK_OBJECT (slider), slider_signals[CHANGED]);
797N/A ColorScales::setScaled( slider->adjustment, CLAMP ((gfloat) (event->x - cx) / cw, 0.0, 1.0) );
797N/A if (!adjustment) {
0N/A b = sp_color_slider_render_map (cpaint.x - carea.x, cpaint.y - carea.y, cpaint.width, cpaint.height,
0N/A b = sp_color_slider_render_gradient (cpaint.x - carea.x, cpaint.y - carea.y, wi, cpaint.height,