2000-02-26 03:41:06 +00:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
2000-01-13 15:39:26 +00:00
|
|
|
*
|
|
|
|
* gimpwidgets.h
|
|
|
|
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>
|
|
|
|
*
|
|
|
|
* 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
|
2000-02-26 03:41:06 +00:00
|
|
|
* version 2 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
|
2000-01-13 15:39:26 +00:00
|
|
|
* 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, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
2000-05-30 23:38:46 +00:00
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
#ifndef __GIMP_WIDGETS_H__
|
|
|
|
#define __GIMP_WIDGETS_H__
|
|
|
|
|
2001-01-24 22:36:18 +00:00
|
|
|
|
|
|
|
#include <libgimpwidgets/gimpwidgetstypes.h>
|
|
|
|
|
2005-05-18 23:48:47 +00:00
|
|
|
#include <libgimpwidgets/gimpbrowser.h>
|
2001-05-06 20:31:46 +00:00
|
|
|
#include <libgimpwidgets/gimpbutton.h>
|
2004-07-26 18:52:35 +00:00
|
|
|
#include <libgimpwidgets/gimpcellrenderercolor.h>
|
2004-07-26 21:09:16 +00:00
|
|
|
#include <libgimpwidgets/gimpcellrenderertoggle.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimpchainbutton.h>
|
|
|
|
#include <libgimpwidgets/gimpcolorarea.h>
|
|
|
|
#include <libgimpwidgets/gimpcolorbutton.h>
|
2002-10-20 10:14:17 +00:00
|
|
|
#include <libgimpwidgets/gimpcolordisplay.h>
|
2003-11-21 21:27:10 +00:00
|
|
|
#include <libgimpwidgets/gimpcolordisplaystack.h>
|
2004-07-26 15:20:18 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorhexentry.h>
|
2002-10-28 13:19:02 +00:00
|
|
|
#include <libgimpwidgets/gimpcolornotebook.h>
|
2007-08-14 16:01:04 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorprofilecombobox.h>
|
|
|
|
#include <libgimpwidgets/gimpcolorprofilestore.h>
|
2002-10-29 23:16:17 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorscale.h>
|
2002-10-28 20:13:17 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorscales.h>
|
2002-10-20 10:14:17 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorselector.h>
|
|
|
|
#include <libgimpwidgets/gimpcolorselect.h>
|
2003-11-10 16:38:37 +00:00
|
|
|
#include <libgimpwidgets/gimpcolorselection.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimpdialog.h>
|
2005-01-21 22:59:51 +00:00
|
|
|
#include <libgimpwidgets/gimpenumcombobox.h>
|
2005-06-24 22:46:42 +00:00
|
|
|
#include <libgimpwidgets/gimpenumlabel.h>
|
2005-01-21 22:59:51 +00:00
|
|
|
#include <libgimpwidgets/gimpenumstore.h>
|
2005-01-29 01:08:20 +00:00
|
|
|
#include <libgimpwidgets/gimpenumwidgets.h>
|
2003-11-21 15:53:57 +00:00
|
|
|
#include <libgimpwidgets/gimpfileentry.h>
|
2004-05-02 20:30:41 +00:00
|
|
|
#include <libgimpwidgets/gimpframe.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimphelpui.h>
|
2006-09-05 21:43:07 +00:00
|
|
|
#include <libgimpwidgets/gimphintbox.h>
|
2004-04-20 00:01:57 +00:00
|
|
|
#include <libgimpwidgets/gimpintcombobox.h>
|
2004-04-20 19:06:37 +00:00
|
|
|
#include <libgimpwidgets/gimpintstore.h>
|
2003-01-05 13:52:14 +00:00
|
|
|
#include <libgimpwidgets/gimpmemsizeentry.h>
|
2007-08-08 18:08:24 +00:00
|
|
|
#include <libgimpwidgets/gimpnumberpairentry.h>
|
2001-05-06 21:51:20 +00:00
|
|
|
#include <libgimpwidgets/gimpoffsetarea.h>
|
2005-06-27 14:14:25 +00:00
|
|
|
#include <libgimpwidgets/gimppageselector.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimppatheditor.h>
|
2002-11-04 22:56:41 +00:00
|
|
|
#include <libgimpwidgets/gimppickbutton.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimppixmap.h>
|
2004-08-30 22:10:26 +00:00
|
|
|
#include <libgimpwidgets/gimppreview.h>
|
2004-07-29 17:10:28 +00:00
|
|
|
#include <libgimpwidgets/gimppreviewarea.h>
|
2005-02-04 20:48:02 +00:00
|
|
|
#include <libgimpwidgets/gimppropwidgets.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimpquerybox.h>
|
2005-07-08 16:07:16 +00:00
|
|
|
#include <libgimpwidgets/gimpscrolledpreview.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimpsizeentry.h>
|
2001-08-04 14:10:58 +00:00
|
|
|
#include <libgimpwidgets/gimpstock.h>
|
2007-02-12 15:29:45 +00:00
|
|
|
#include <libgimpwidgets/gimpstringcombobox.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
#include <libgimpwidgets/gimpunitmenu.h>
|
2005-09-19 22:58:16 +00:00
|
|
|
#include <libgimpwidgets/gimpzoommodel.h>
|
2001-01-24 22:36:18 +00:00
|
|
|
|
2004-04-20 14:37:12 +00:00
|
|
|
#include <libgimpwidgets/gimpoldwidgets.h>
|
|
|
|
|
2001-01-24 22:36:18 +00:00
|
|
|
|
2001-11-22 13:01:26 +00:00
|
|
|
G_BEGIN_DECLS
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
2001-11-28 01:14:06 +00:00
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
/*
|
|
|
|
* Widget Constructors
|
|
|
|
*/
|
|
|
|
|
2003-11-14 20:22:05 +00:00
|
|
|
GtkWidget * gimp_int_radio_group_new (gboolean in_frame,
|
2006-04-12 10:53:28 +00:00
|
|
|
const gchar *frame_title,
|
|
|
|
GCallback radio_button_callback,
|
|
|
|
gpointer radio_button_callback_data,
|
|
|
|
gint initial, /* item_data */
|
2003-11-14 18:05:39 +00:00
|
|
|
|
2006-04-12 10:53:28 +00:00
|
|
|
/* specify radio buttons as va_list:
|
|
|
|
* const gchar *label,
|
|
|
|
* gint item_data,
|
|
|
|
* GtkWidget **widget_ptr,
|
|
|
|
*/
|
2003-11-14 18:05:39 +00:00
|
|
|
|
2006-04-12 10:53:28 +00:00
|
|
|
...) G_GNUC_NULL_TERMINATED;
|
2003-11-14 18:05:39 +00:00
|
|
|
|
2003-11-15 11:27:34 +00:00
|
|
|
void gimp_int_radio_group_set_active (GtkRadioButton *radio_button,
|
|
|
|
gint item_data);
|
|
|
|
|
2003-11-14 23:17:38 +00:00
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
GtkWidget * gimp_radio_group_new (gboolean in_frame,
|
2006-04-12 10:53:28 +00:00
|
|
|
const gchar *frame_title,
|
|
|
|
|
|
|
|
/* specify radio buttons as va_list:
|
|
|
|
* const gchar *label,
|
|
|
|
* GCallback callback,
|
|
|
|
* gpointer callback_data,
|
|
|
|
* gpointer item_data,
|
|
|
|
* GtkWidget **widget_ptr,
|
|
|
|
* gboolean active,
|
|
|
|
*/
|
|
|
|
|
|
|
|
...) G_GNUC_NULL_TERMINATED;
|
2000-01-13 15:39:26 +00:00
|
|
|
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
|
2006-04-12 10:53:28 +00:00
|
|
|
const gchar *frame_title,
|
|
|
|
GCallback radio_button_callback,
|
|
|
|
gpointer radio_button_callback_data,
|
|
|
|
gpointer initial, /* item_data */
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2006-04-12 10:53:28 +00:00
|
|
|
/* specify radio buttons as va_list:
|
|
|
|
* const gchar *label,
|
|
|
|
* gpointer item_data,
|
|
|
|
* GtkWidget **widget_ptr,
|
|
|
|
*/
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2006-04-12 10:53:28 +00:00
|
|
|
...) G_GNUC_NULL_TERMINATED;
|
2003-11-15 11:27:34 +00:00
|
|
|
|
2001-11-22 13:01:26 +00:00
|
|
|
void gimp_radio_group_set_active (GtkRadioButton *radio_button,
|
|
|
|
gpointer item_data);
|
2003-11-14 20:22:05 +00:00
|
|
|
|
2001-11-22 13:01:26 +00:00
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
GtkWidget * gimp_spin_button_new (/* return value: */
|
2006-04-12 10:53:28 +00:00
|
|
|
GtkObject **adjustment,
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2006-04-12 10:53:28 +00:00
|
|
|
gdouble value,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gdouble step_increment,
|
|
|
|
gdouble page_increment,
|
|
|
|
gdouble page_size,
|
|
|
|
gdouble climb_rate,
|
|
|
|
guint digits);
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-02-17 23:48:13 +00:00
|
|
|
#define GIMP_SCALE_ENTRY_LABEL(adj) \
|
2002-03-10 18:31:42 +00:00
|
|
|
(g_object_get_data (G_OBJECT (adj), "label"))
|
2000-02-17 23:48:13 +00:00
|
|
|
|
|
|
|
#define GIMP_SCALE_ENTRY_SCALE(adj) \
|
2002-03-10 18:31:42 +00:00
|
|
|
(g_object_get_data (G_OBJECT (adj), "scale"))
|
2000-02-17 23:48:13 +00:00
|
|
|
#define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \
|
|
|
|
gtk_range_get_adjustment \
|
2001-11-22 13:01:26 +00:00
|
|
|
(GTK_RANGE (g_object_get_data (G_OBJECT (adj), "scale")))
|
2000-02-17 23:48:13 +00:00
|
|
|
|
|
|
|
#define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \
|
2002-03-10 18:31:42 +00:00
|
|
|
(g_object_get_data (G_OBJECT (adj), "spinbutton"))
|
2000-02-17 23:48:13 +00:00
|
|
|
#define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \
|
|
|
|
gtk_spin_button_get_adjustment \
|
2001-11-22 13:01:26 +00:00
|
|
|
(GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (adj), "spinbutton")))
|
2000-02-17 23:48:13 +00:00
|
|
|
|
2002-10-30 16:10:18 +00:00
|
|
|
GtkObject * gimp_scale_entry_new (GtkTable *table,
|
|
|
|
gint column,
|
|
|
|
gint row,
|
|
|
|
const gchar *text,
|
|
|
|
gint scale_width,
|
|
|
|
gint spinbutton_width,
|
2003-02-26 12:48:48 +00:00
|
|
|
gdouble value,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gdouble step_increment,
|
|
|
|
gdouble page_increment,
|
2002-10-30 16:10:18 +00:00
|
|
|
guint digits,
|
|
|
|
gboolean constrain,
|
2003-02-26 12:48:48 +00:00
|
|
|
gdouble unconstrained_lower,
|
|
|
|
gdouble unconstrained_upper,
|
2002-10-30 16:10:18 +00:00
|
|
|
const gchar *tooltip,
|
2003-08-23 19:35:05 +00:00
|
|
|
const gchar *help_id);
|
2002-10-30 16:10:18 +00:00
|
|
|
|
2004-08-28 16:57:37 +00:00
|
|
|
|
2002-10-30 16:10:18 +00:00
|
|
|
GtkObject * gimp_color_scale_entry_new (GtkTable *table,
|
|
|
|
gint column,
|
|
|
|
gint row,
|
|
|
|
const gchar *text,
|
|
|
|
gint scale_width,
|
|
|
|
gint spinbutton_width,
|
2003-02-26 12:48:48 +00:00
|
|
|
gdouble value,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gdouble step_increment,
|
|
|
|
gdouble page_increment,
|
2002-10-30 16:10:18 +00:00
|
|
|
guint digits,
|
|
|
|
const gchar *tooltip,
|
2003-08-23 19:35:05 +00:00
|
|
|
const gchar *help_id);
|
2002-10-30 16:10:18 +00:00
|
|
|
|
2004-08-28 16:57:37 +00:00
|
|
|
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);
|
2002-10-08 17:36:32 +00:00
|
|
|
|
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \
|
2002-03-10 18:31:42 +00:00
|
|
|
(g_object_get_data (G_OBJECT (hbox), "spinbutton"))
|
2000-02-23 15:52:33 +00:00
|
|
|
#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \
|
|
|
|
gtk_spin_button_get_adjustment \
|
2001-11-22 13:01:26 +00:00
|
|
|
(GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (hbox), "spinbutton")))
|
2004-01-31 23:34:56 +00:00
|
|
|
#define GIMP_RANDOM_SEED_TOGGLE(hbox) \
|
|
|
|
(g_object_get_data (G_OBJECT(hbox), "toggle"))
|
2000-02-23 15:52:33 +00:00
|
|
|
|
2003-12-17 14:39:38 +00:00
|
|
|
GtkWidget * gimp_random_seed_new (guint32 *seed,
|
2006-04-12 10:53:28 +00:00
|
|
|
gboolean *random_seed);
|
2000-01-25 17:46:56 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \
|
2002-03-10 18:31:42 +00:00
|
|
|
(g_object_get_data (G_OBJECT (sizeentry), "chainbutton"))
|
2000-02-23 15:52:33 +00:00
|
|
|
|
2000-02-07 20:35:13 +00:00
|
|
|
GtkWidget * gimp_coordinates_new (GimpUnit unit,
|
2006-04-12 10:53:28 +00:00
|
|
|
const gchar *unit_format,
|
|
|
|
gboolean menu_show_pixels,
|
|
|
|
gboolean menu_show_percent,
|
|
|
|
gint spinbutton_width,
|
|
|
|
GimpSizeEntryUpdatePolicy update_policy,
|
|
|
|
|
|
|
|
gboolean chainbutton_active,
|
|
|
|
gboolean chain_constrains_ratio,
|
|
|
|
|
|
|
|
const gchar *xlabel,
|
|
|
|
gdouble x,
|
|
|
|
gdouble xres,
|
|
|
|
gdouble lower_boundary_x,
|
|
|
|
gdouble upper_boundary_x,
|
|
|
|
gdouble xsize_0, /* % */
|
|
|
|
gdouble xsize_100, /* % */
|
|
|
|
|
|
|
|
const gchar *ylabel,
|
|
|
|
gdouble y,
|
|
|
|
gdouble yres,
|
|
|
|
gdouble lower_boundary_y,
|
|
|
|
gdouble upper_boundary_y,
|
|
|
|
gdouble ysize_0, /* % */
|
|
|
|
gdouble ysize_100 /* % */);
|
2000-01-31 20:47:44 +00:00
|
|
|
|
2000-03-14 23:06:21 +00:00
|
|
|
|
2004-07-13 15:59:52 +00:00
|
|
|
#ifndef GIMP_DISABLE_DEPRECATED
|
|
|
|
|
2000-03-14 23:06:21 +00:00
|
|
|
GtkWidget * gimp_pixmap_button_new (gchar **xpm_data,
|
2006-04-12 10:53:28 +00:00
|
|
|
const gchar *text);
|
2000-02-18 13:59:18 +00:00
|
|
|
|
2004-07-13 15:59:52 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
/*
|
|
|
|
* Standard Callbacks
|
|
|
|
*/
|
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button);
|
|
|
|
|
|
|
|
void gimp_toggle_button_update (GtkWidget *widget,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_radio_button_update (GtkWidget *widget,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-05-20 18:39:02 +00:00
|
|
|
void gimp_uint_adjustment_update (GtkAdjustment *adjustment,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-05-20 18:39:02 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-15 15:32:28 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-13 15:39:26 +00:00
|
|
|
|
2000-02-23 15:52:33 +00:00
|
|
|
void gimp_unit_menu_update (GtkWidget *widget,
|
2006-04-12 10:53:28 +00:00
|
|
|
gpointer data);
|
2000-01-14 12:41:00 +00:00
|
|
|
|
2001-01-10 22:49:45 +00:00
|
|
|
|
2000-01-13 15:39:26 +00:00
|
|
|
/*
|
|
|
|
* Helper Functions
|
|
|
|
*/
|
|
|
|
|
2002-03-08 18:30:40 +00:00
|
|
|
GtkWidget * gimp_table_attach_aligned (GtkTable *table,
|
2006-04-12 10:53:28 +00:00
|
|
|
gint column,
|
|
|
|
gint row,
|
|
|
|
const gchar *label_text,
|
|
|
|
gfloat xalign,
|
|
|
|
gfloat yalign,
|
|
|
|
GtkWidget *widget,
|
|
|
|
gint colspan,
|
|
|
|
gboolean left_align);
|
2000-01-27 19:26:00 +00:00
|
|
|
|
2000-05-30 23:38:46 +00:00
|
|
|
|
2004-06-21 13:18:50 +00:00
|
|
|
void gimp_label_set_attributes (GtkLabel *label,
|
|
|
|
...);
|
|
|
|
|
|
|
|
|
2001-11-22 13:01:26 +00:00
|
|
|
G_END_DECLS
|
2000-01-13 15:39:26 +00:00
|
|
|
|
|
|
|
#endif /* __GIMP_WIDGETS_H__ */
|