gimp/libgimpwidgets/gimpscaleentry.h

90 lines
4.1 KiB
C

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpscaleentry.h
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>,
* 2008 Bill Skaggs <weskaggs@primate.ucdavis.edu>
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_SCALE_ENTRY_H__
#define __GIMP_SCALE_ENTRY_H__
G_BEGIN_DECLS
#define GIMP_SCALE_ENTRY_LABEL(adj) \
(g_object_get_data (G_OBJECT (adj), "label"))
#define GIMP_SCALE_ENTRY_SCALE(adj) \
(g_object_get_data (G_OBJECT (adj), "scale"))
#define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \
gtk_range_get_adjustment \
(GTK_RANGE (g_object_get_data (G_OBJECT (adj), "scale")))
#define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \
(g_object_get_data (G_OBJECT (adj), "spinbutton"))
#define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \
gtk_spin_button_get_adjustment \
(GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (adj), "spinbutton")))
GtkObject * gimp_scale_entry_new (GtkTable *table,
gint column,
gint row,
const gchar *text,
gint scale_width,
gint spinbutton_width,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
guint digits,
gboolean constrain,
gdouble unconstrained_lower,
gdouble unconstrained_upper,
const gchar *tooltip,
const gchar *help_id);
GtkObject * gimp_color_scale_entry_new (GtkTable *table,
gint column,
gint row,
const gchar *text,
gint scale_width,
gint spinbutton_width,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
guint digits,
const gchar *tooltip,
const gchar *help_id);
void gimp_scale_entry_set_sensitive (GtkObject *adjustment,
gboolean sensitive);
void gimp_scale_entry_set_logarithmic (GtkObject *adjustment,
gboolean logarithmic);
gboolean gimp_scale_entry_get_logarithmic (GtkObject *adjustment);
G_END_DECLS
#endif /* __GIMP_SCALE_ENTRY_H__ */