mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-24 09:09:35 +00:00
9004346179
2000-03-02 Michael Natterer <mitch@gimp.org> * app/rect_select.[ch]: added a modifier_key_func which gives immediate cursor_update feedback on modifier key events. * app/ellipse_select.c * app/free_select.c * app/fuzzy_select.c * app/rect_selectP.h: call the new function. Added current_[x|y] fields to the tools' structures which get updated from the "motion" functions. They have to appear in the same order in all structures because the modifier_key_func treats them all as rectangular selection tools. This is ugly and cries for a object hierarchy of tools.
47 lines
1.6 KiB
C
47 lines
1.6 KiB
C
/* The GIMP -- an 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 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 __RECT_SELECTP_H__
|
|
#define __RECT_SELECTP_H__
|
|
|
|
#include "draw_core.h"
|
|
|
|
typedef struct _RectSelect RectSelect, EllipseSelect;
|
|
|
|
struct _RectSelect
|
|
{
|
|
DrawCore *core; /* Core select object */
|
|
|
|
SelectOps op; /* selection operation (SELECTION_ADD etc.) */
|
|
|
|
gint current_x; /* these values are updated on every motion event */
|
|
gint current_y; /* (enables immediate cursor updating on modifier
|
|
* key events). */
|
|
|
|
gint x, y; /* upper left hand coordinate */
|
|
gint w, h; /* width and height */
|
|
gint center; /* is the selection being created from the
|
|
* center out? */
|
|
|
|
gint fixed_size;
|
|
gdouble fixed_width;
|
|
gdouble fixed_height;
|
|
guint context_id; /* for the statusbar */
|
|
};
|
|
|
|
#endif /* __RECT_SELECTP_H__ */
|