gimp/app/display/display-enums.h

121 lines
3.1 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __DISPLAY_ENUMS_H__
#define __DISPLAY_ENUMS_H__
Bug 496772 – Position shown in the statusbar needs more precision (for 2008-08-20 Michael Natterer <mitch@gimp.org> Bug 496772 – Position shown in the statusbar needs more precision (for some tools) * app/display/display-enums.[ch]: add enum GimpCursorPrecision which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }. * app/display/gimpdisplayshell-cursor.[ch]: add "precision" parameter to gimp_display_shell_update_cursor() and pass it on to the statusbar. * app/display/gimpstatusbar.[ch]: add "precision" parameters to the cursor coordinates APIs, offset the passed coords accordingly and display them with one decimal point if SUBPIXEL is requested and the display's unit is PIXEL. Keep a second floating-point format string around at any time. * app/tools/gimptoolcontrol.[ch]: add a "precision" member and API so tools can configure the precision they need. Defalt to PIXEL_CENTER since that's right for almost all tools. * app/display/gimpdisplayshell-callbacks.c: pass the tool's precision to gimp_display_shell_update_cursor(). * app/tools/gimptool.[ch]: add "precision" parameter to gimp_tool_push_status_coords() and pass it on to the statusbar. * app/tools/gimpaligntool.c * app/tools/gimpblendtool.c * app/tools/gimpcolortool.c * app/tools/gimpcroptool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimpperspectiveclonetool.c * app/tools/gimprectangleselecttool.c * app/tools/gimprectangletool.c * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c: set precision in init() where needed. Adjust the precision in the fly when needed, e.g. while moving guides or when toggling hard-edge on paint tools. Also pass an appropriate precision to gimp_tool_push_status_coords(), which is not always the tool's precision as used for cursor display. svn path=/trunk/; revision=26681
2008-08-21 00:22:09 +08:00
#define GIMP_TYPE_CURSOR_PRECISION (gimp_cursor_precision_get_type ())
GType gimp_cursor_precision_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_CURSOR_PRECISION_PIXEL_CENTER,
GIMP_CURSOR_PRECISION_PIXEL_BORDER,
GIMP_CURSOR_PRECISION_SUBPIXEL
} GimpCursorPrecision;
#define GIMP_TYPE_GUIDES_TYPE (gimp_guides_type_get_type ())
GType gimp_guides_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_GUIDES_NONE, /*< desc="No guides" >*/
GIMP_GUIDES_CENTER_LINES, /*< desc="Center lines" >*/
GIMP_GUIDES_THIRDS, /*< desc="Rule of thirds" >*/
GIMP_GUIDES_FIFTHS, /*< desc="Rule of fifths" >*/
GIMP_GUIDES_GOLDEN, /*< desc="Golden sections" >*/
GIMP_GUIDES_DIAGONALS, /*< desc="Diagonal lines" >*/
GIMP_GUIDES_N_LINES, /*< desc="Number of lines" >*/
GIMP_GUIDES_SPACING /*< desc="Line spacing" >*/
} GimpGuidesType;
#define GIMP_TYPE_HANDLE_TYPE (gimp_handle_type_get_type ())
GType gimp_handle_type_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HANDLE_SQUARE,
GIMP_HANDLE_FILLED_SQUARE,
GIMP_HANDLE_CIRCLE,
GIMP_HANDLE_FILLED_CIRCLE,
GIMP_HANDLE_DIAMOND,
GIMP_HANDLE_FILLED_DIAMOND,
GIMP_HANDLE_CROSS
} GimpHandleType;
#define GIMP_TYPE_HANDLE_ANCHOR (gimp_handle_anchor_get_type ())
GType gimp_handle_anchor_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_HANDLE_ANCHOR_CENTER,
GIMP_HANDLE_ANCHOR_NORTH,
GIMP_HANDLE_ANCHOR_NORTH_WEST,
GIMP_HANDLE_ANCHOR_NORTH_EAST,
GIMP_HANDLE_ANCHOR_SOUTH,
GIMP_HANDLE_ANCHOR_SOUTH_WEST,
GIMP_HANDLE_ANCHOR_SOUTH_EAST,
GIMP_HANDLE_ANCHOR_WEST,
GIMP_HANDLE_ANCHOR_EAST
} GimpHandleAnchor;
#define GIMP_TYPE_PATH_STYLE (gimp_path_style_get_type ())
GType gimp_path_style_get_type (void) G_GNUC_CONST;
typedef enum
{
GIMP_PATH_STYLE_DEFAULT,
GIMP_PATH_STYLE_VECTORS,
GIMP_PATH_STYLE_OUTLINE
} GimpPathStyle;
#define GIMP_TYPE_ZOOM_FOCUS (gimp_zoom_focus_get_type ())
GType gimp_zoom_focus_get_type (void) G_GNUC_CONST;
typedef enum
{
/* Make a best guess */
GIMP_ZOOM_FOCUS_BEST_GUESS,
/* Use the mouse cursor (if within canvas) */
GIMP_ZOOM_FOCUS_POINTER,
/* Use the image center */
GIMP_ZOOM_FOCUS_IMAGE_CENTER,
/* If the image is centered, retain the centering. Else use
* _BEST_GUESS
*/
GIMP_ZOOM_FOCUS_RETAIN_CENTERING_ELSE_BEST_GUESS
} GimpZoomFocus;
#endif /* __DISPLAY_ENUMS_H__ */