2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2005-03-03 02:18:19 +08:00
|
|
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_RECTANGLE_OPTIONS_H__
|
|
|
|
#define __GIMP_RECTANGLE_OPTIONS_H__
|
|
|
|
|
|
|
|
|
2005-09-04 03:48:22 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_0,
|
2006-09-24 04:45:06 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_AUTO_SHRINK,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_SHRINK_MERGED,
|
2005-09-04 03:48:22 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_HIGHLIGHT,
|
2006-06-06 02:50:13 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_GUIDE,
|
2006-09-22 04:16:25 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_X0,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_Y0,
|
2005-09-04 03:48:22 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_FIXED_WIDTH,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_WIDTH,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_FIXED_HEIGHT,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_HEIGHT,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_FIXED_ASPECT,
|
2006-09-15 01:11:24 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_ASPECT_NUMERATOR,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_ASPECT_DENOMINATOR,
|
2005-09-04 03:48:22 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_FIXED_CENTER,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_CENTER_X,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_CENTER_Y,
|
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_UNIT,
|
2006-09-22 04:16:25 +08:00
|
|
|
GIMP_RECTANGLE_OPTIONS_PROP_LAST = GIMP_RECTANGLE_OPTIONS_PROP_UNIT
|
2005-09-04 03:48:22 +08:00
|
|
|
} GimpRectangleOptionsProp;
|
|
|
|
|
|
|
|
|
2005-08-15 22:23:28 +08:00
|
|
|
#define GIMP_TYPE_RECTANGLE_OPTIONS (gimp_rectangle_options_interface_get_type ())
|
|
|
|
#define GIMP_IS_RECTANGLE_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_RECTANGLE_OPTIONS))
|
|
|
|
#define GIMP_RECTANGLE_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_RECTANGLE_OPTIONS, GimpRectangleOptions))
|
|
|
|
#define GIMP_RECTANGLE_OPTIONS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_RECTANGLE_OPTIONS, GimpRectangleOptionsInterface))
|
2005-03-03 02:18:19 +08:00
|
|
|
|
2007-04-01 00:38:55 +08:00
|
|
|
#define GIMP_RECTANGLE_OPTIONS_GET_PRIVATE(obj) (gimp_rectangle_options_get_private (GIMP_RECTANGLE_OPTIONS (obj)))
|
|
|
|
|
2005-03-03 02:18:19 +08:00
|
|
|
|
2005-08-15 22:23:28 +08:00
|
|
|
typedef struct _GimpRectangleOptions GimpRectangleOptions;
|
|
|
|
typedef struct _GimpRectangleOptionsInterface GimpRectangleOptionsInterface;
|
2007-04-01 00:38:55 +08:00
|
|
|
typedef struct _GimpRectangleOptionsPrivate GimpRectangleOptionsPrivate;
|
2005-03-03 02:18:19 +08:00
|
|
|
|
2005-08-15 22:23:28 +08:00
|
|
|
struct _GimpRectangleOptionsInterface
|
2005-03-03 02:18:19 +08:00
|
|
|
{
|
2005-08-15 22:23:28 +08:00
|
|
|
GTypeInterface base_iface;
|
|
|
|
};
|
2005-03-03 02:18:19 +08:00
|
|
|
|
2007-04-01 00:38:55 +08:00
|
|
|
struct _GimpRectangleOptionsPrivate
|
|
|
|
{
|
|
|
|
gboolean auto_shrink;
|
|
|
|
gboolean shrink_merged;
|
|
|
|
|
|
|
|
gboolean highlight;
|
|
|
|
GimpRectangleGuide guide;
|
|
|
|
|
|
|
|
gdouble x0;
|
|
|
|
gdouble y0;
|
|
|
|
|
|
|
|
gboolean fixed_width;
|
|
|
|
gdouble width;
|
|
|
|
|
|
|
|
gboolean fixed_height;
|
|
|
|
gdouble height;
|
|
|
|
|
|
|
|
gboolean fixed_aspect;
|
|
|
|
gdouble aspect_numerator;
|
|
|
|
gdouble aspect_denominator;
|
|
|
|
|
|
|
|
gboolean fixed_center;
|
|
|
|
gdouble center_x;
|
|
|
|
gdouble center_y;
|
|
|
|
|
|
|
|
GimpUnit unit;
|
|
|
|
|
|
|
|
/* options gui */
|
|
|
|
GtkWidget *auto_shrink_button;
|
|
|
|
};
|
|
|
|
|
2005-03-09 07:17:19 +08:00
|
|
|
|
2005-08-15 22:23:28 +08:00
|
|
|
GType gimp_rectangle_options_interface_get_type (void) G_GNUC_CONST;
|
2005-03-09 07:17:19 +08:00
|
|
|
|
2007-04-01 00:38:55 +08:00
|
|
|
GtkWidget * gimp_rectangle_options_gui (GimpToolOptions *tool_options);
|
|
|
|
|
|
|
|
GimpRectangleOptionsPrivate *
|
|
|
|
gimp_rectangle_options_get_private (GimpRectangleOptions *options);
|
2005-03-03 02:18:19 +08:00
|
|
|
|
|
|
|
|
2005-09-04 03:48:22 +08:00
|
|
|
/* convenience functions */
|
|
|
|
|
2007-04-01 00:38:55 +08:00
|
|
|
void gimp_rectangle_options_install_properties (GObjectClass *klass);
|
|
|
|
void gimp_rectangle_options_set_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
void gimp_rectangle_options_get_property (GObject *object,
|
|
|
|
guint property_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec);
|
2005-09-04 03:48:22 +08:00
|
|
|
|
2005-08-15 22:23:28 +08:00
|
|
|
#endif /* __GIMP_RECTANGLE_OPTIONS_H__ */
|