00001 /* GtkEnhancedScale - A gtk(h)scale with multiple sliders 00002 * Copyright (C) 2001 - Ronald Bultje 00003 * Copyright (C) 2001-2007 Dan Dennedy <dan@dennedy.org> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00018 * USA. 00019 */ 00020 00021 /* Some code used was taken from GtkScale and GtkRange, all part 00022 * of the Gimp Toolkit (Gtk+), http://www.gtk.org/ 00023 */ 00024 00025 #ifndef __GTK_ENHANCED_SCALE_H__ 00026 #define __GTK_ENHANCED_SCALE_H__ 00027 00028 #include <gdk/gdk.h> 00029 #include <gtk/gtkwidget.h> 00030 00031 #ifdef __cplusplus 00032 extern "C" 00033 { 00034 #endif /* __cplusplus */ 00035 00036 #define GTK_ENHANCED_SCALE(obj) GTK_CHECK_CAST (obj, gtk_enhanced_scale_get_type (), GtkEnhancedScale) 00037 #define GTK_ENHANCED_SCALE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_enhanced_scale_get_type (), GtkEnhancedScaleClass) 00038 #define GTK_IS_ENHANCED_SCALE(obj) GTK_CHECK_TYPE (obj, gtk_enhanced_scale_get_type ()) 00039 00040 typedef struct _GtkEnhancedScale GtkEnhancedScale; 00041 typedef struct _GtkEnhancedScaleClass GtkEnhancedScaleClass; 00042 00043 struct _GtkEnhancedScale 00044 { 00045 GtkWidget widget; 00046 00047 GdkWindow *trough; 00048 GdkWindow **slider; 00049 00050 GtkObject **adjustment; 00051 gint num_adjustments; 00052 gint *handler_id; 00053 00054 guint in_child :3; 00055 guint click_child :3; 00056 00057 gint active_slider; 00058 gint clicked_slider; 00059 gint x_click_point; 00060 GArray *breaks; 00061 }; 00062 00063 struct _GtkEnhancedScaleClass 00064 { 00065 GtkWidgetClass parent_class; 00066 00067 gint slider_width; 00068 gint trough_width; 00069 gint stepper_size; 00070 gint stepper_slider_spacing; 00071 gint arrow_width; 00072 gint arrow_height; 00073 00074 guint8 trough; 00075 guint8 slider; 00076 }; 00077 00078 GtkWidget* gtk_enhanced_scale_new ( GtkObject * adjustment[], 00079 gint num_adjustments ); 00080 GType gtk_enhanced_scale_get_type ( void ); 00081 void gtk_enhanced_scale_set_breaks( GtkWidget * widget, GArray * breaks ); 00082 00083 #ifdef __cplusplus 00084 } 00085 #endif /* __cplusplus */ 00086 00087 00088 #endif /* __GTK_ENHANCED_SCALE_H__ */
1.4.2