Commit Graph

50 Commits

Author SHA1 Message Date
William Skaggs 3e4d8075c7 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.[ch]: add new signal
	"rectangle-changed" and method rectangle_changed.
	Emit them on button release and when dimensions are
	changed in controls.

	* app/tools/gimpnewrectselecttool.c: use rectangle_changed
	method to change selection, undoing previous change if
	necessary.
2006-06-04 17:08:26 +00:00
William Skaggs ac72c78cea Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: move statically declared
	variables into "private" struct.
2006-06-02 22:24:55 +00:00
William Skaggs 84dadb1819 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.[ch]: add new function RECT_INACTIVE
	for cases where no rectangle exists.  This may take some
	tweaking to get right.
2006-06-02 19:34:47 +00:00
William Skaggs 7c90b66c36 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_button_press):
	if function is RECT_CREATING, start a new rectangle.

	* app/tools/gimpnewrectselecttool.c: remove g_printerr statement that
	mitch added for debugging.
2006-06-02 16:12:31 +00:00
Michael Natterer d1a76d93f7 cursors/Makefile.am cursors/cursor-corner-bottom-left.png
2006-06-02  Michael Natterer  <mitch@gimp.org>

	* cursors/Makefile.am
	* cursors/cursor-corner-bottom-left.png
	* cursors/cursor-corner-bottom-right.png
	* cursors/cursor-corner-top-left.png
	* cursors/cursor-corner-top-right.png
	* cursors/cursor-side-bottom.png
	* cursors/cursor-side-left.png
	* cursors/cursor-side-right.png
	* cursors/cursor-side-top.png
	* cursors/xbm/cursor-corner-bottom-left-mask.xbm
	* cursors/xbm/cursor-corner-bottom-left.xbm
	* cursors/xbm/cursor-corner-bottom-right-mask.xbm
	* cursors/xbm/cursor-corner-bottom-right.xbm
	* cursors/xbm/cursor-corner-top-left-mask.xbm
	* cursors/xbm/cursor-corner-top-left.xbm
	* cursors/xbm/cursor-corner-top-right-mask.xbm
	* cursors/xbm/cursor-corner-top-right.xbm
	* cursors/xbm/cursor-side-bottom-mask.xbm
	* cursors/xbm/cursor-side-bottom.xbm
	* cursors/xbm/cursor-side-left-mask.xbm
	* cursors/xbm/cursor-side-left.xbm
	* cursors/xbm/cursor-side-right-mask.xbm
	* cursors/xbm/cursor-side-right.xbm
	* cursors/xbm/cursor-side-top-mask.xbm
	* cursors/xbm/cursor-side-top.xbm: new cursors for edge and corner
	resizing. They perfectly align with the small crosshair and can be
	used together with tool cursors and cursor modifiers.

	* cursors/gimp-tool-cursors.xcf: add them here too.

	* app/widgets/widgets-enums.h: add them to the GimpCursorType enum.

	* app/widgets/gimpcursor.c: add them here too.

	* app/display/gimpdisplayshell-cursor.c: treat them like the small
	crosshair (don't replace them by the small crosshair but use them
	as-is). Also allow the bad modifier with the large crosshair.

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_cursor_update): use the new cursors. Don't
	call gimp_tool_set_cursor() here.

	(gimp_rectangle_tool_response): reset "function" to RECT_CREATING
	when resetting the tool.

	* app/tools/gimpselectiontool.[ch] (struct GimpSelectionTool):
	added boolean member "allow_move" which defalts to TRUE.

	(gimp_selection_tool_oper_update): don't move masks, floating
	selections or anything when "allow_move" is FALSE. Changed
	behavior of click inside a selection to simply create a new
	selection, need to press alt+shift now to drag-float the
	selection. Please test this, it's apretty fundamental change!

	(gimp_selection_tool_cursor_update): use the tool's configured
	cursor instead of always GIMP_CURSOR_MOUSE, so this function can
	be called after gimp_rectangle_tool_cursor_update() to add the
	plus, minus etc. modifiers.

	* app/tools/gimpnewrectselecttool.c: implement
	GimpTool::cursor_update() and call
	gimp_rectangle_tool_cursor_update() from there. Chain up to get
	the plus, minus etc. modifiers added.

	Re-enble selection moving:

	(gimp_new_rect_select_tool_oper_update): set GimpSelectionTool's
	"allow_move" to FALSE unless the rectangle tool is in an idle
	state.

	(gimp_new_rect_select_tool_button_press): allow a selection moving
	to be started if the rectangle tool is idle. Fall back to starting
	a rect select if gimp_selection_tool_start_edit() returned FALSE.
2006-06-02 15:23:47 +00:00
William Skaggs 8387dd98a4 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.[ch]: add "constrain" property
	to specify whether to clip at image bounds when computing
	dimensions.

	* app/tools/gimpcroptool.c
	* app/tools/gimpnewrectselecttool.c: set "constrain" to TRUE.

	* app/tools/gimpellipseselecttool.c: set "constrain" to FALSE.

	Hopefully fixes bug #329817.
2006-05-31 19:45:38 +00:00
Karine Delvare 4d0e186ea9 app/tools/gimpcroptool.c app/tools/gimpnewrectselecttool.c eek, I broke
2006-05-23  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpcroptool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.[ch]: eek, I broke the build.
2006-05-23 17:37:18 +00:00
Karine Delvare f1d058df5e check if the tool has a display before using it
2006-05-16  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangletool.c: check if the tool has a display
	before using it
2006-05-16 17:21:07 +00:00
Karine Delvare 440ee94145 center constraint with control key.
2006-04-08  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangletool.c: center constraint with control
	key.
2006-04-08 10:26:04 +00:00
Karine Delvare 5e69f1fc12 square constraint with shift key.
2006-04-02  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangletool.c: square constraint with shift key.
2006-04-02 20:58:07 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00
Karine Delvare c82adc2231 app/tools/gimpcropoptions.c app/tools/gimprectangleoptions.[ch] moved
2006-03-26  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpcropoptions.c
	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]: moved options gui creation
	from the tool to the options.

	* app/tools/gimpselectionoptions.c
	* app/tools/gimpnewrectselecttool.[ch]
	* app/tools/gimpellipseselecttool.[ch]: ported ellipse selection
	tool to the new rectangle interface.
2006-03-26 13:50:13 +00:00
Michael Natterer 2ed407b54f app/tools/gimptool.[ch] add "gboolean proximity" parameter to
2006-03-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: add "gboolean proximity" parameter
	to GimpTool::oper_update() in order to emphasize its importance
	and to avoid peeking around in the GimpDisplayShell struct.

	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly. Got rid of
	quite some "display/gimpdisplayshell.h" includes.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): pass shell->proximity to
	tool_manager_oper_update_active().
2006-03-25 14:23:09 +00:00
Karine Delvare 8362c190a4 react to highlight notification. Fixes bug #335652.
2006-03-25  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimprectangletool.c: react to highlight notification.
	Fixes bug #335652.
2006-03-25 09:38:59 +00:00
Karine Delvare eec8acf6c9 removed properties that are rather internal states.
2006-03-21  Karine Delvare  <kdelvare@nerim.net>

	* app/tools/gimprectangletool.c: removed properties that are
	rather internal states.
2006-03-21 19:40:32 +00:00
Karine Delvare 85acd1410f app/tools/gimpnewrectselecttool.c app/tools/gimprectangleoptions.[ch] hide
2006-03-21  Karine Delvare  <kdelvare@nerim.net>

	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]: hide properties accessors.
2006-03-21 17:37:24 +00:00
Sven Neumann 5e7ce540c1 app/core/gimpbrush.c app/core/gimpbuffer.c app/core/gimpimagefile.c
2006-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpimagefile.c
	* app/core/gimppattern.c
	* app/dialogs/preferences-dialog.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectselecttool.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpsizebox.c
	* app/widgets/gimptemplateeditor.c
	* plug-ins/imagemap/imap_statusbar.c: use U+00D7 MULTIPLICATION SIGN
	instead of x when displaying sizes.
2006-02-28 12:15:51 +00:00
Karine Delvare b6d61922f6 zero division check should be changed according to the aspect redefinition
2006-02-20  Karine Delvare  <kdelvare@nerim.net>

	* app/tools/gimprectangletool.c: zero division check should be
	changed according to the aspect redefinition
2006-02-20 18:35:01 +00:00
Sven Neumann d6762ee166 applied a patch from Dennis Bjorklund that prevents a possible division by
2006-02-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: applied a patch from Dennis
	Bjorklund that prevents a possible division by zero and fixes the
	calculation of the center point.
2006-02-07 11:38:17 +00:00
Carol Spears 81f0d1230c app/tools/gimprectangletool.c: Applied patch from Joao S. O. Bueno Calligaris
that corrects status bar coordinate display
2006-02-04 05:37:20 +00:00
Karine Delvare 41b9f5af52 aspect ratio should be width / height.
2006-02-03  Karine Delvare  <kdelvare@nerim.net>

	* app/tools/gimprectangletool.c: aspect ratio should be width /
	height.
2006-02-03 19:29:11 +00:00
Karine Delvare 202539a47c app/tools/gimpcroptool.c app/tools/gimpnewrectselecttool.c
2006-01-21  Karine Delvare  <kdelvare@nerim.net>

	* app/tools/gimpcroptool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangletool.c: indentation fixes.
2006-01-21 18:20:26 +00:00
Michael Natterer 8c35465cdb don't call g_free() on a widget pointer. Fixes bug #327639.
2006-01-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c (gimp_rectangle_tool_dispose):
	don't call g_free() on a widget pointer. Fixes bug #327639.
2006-01-19 17:45:22 +00:00
Michael Natterer e1ceed5147 define GIMP_PARAM_STATIC_STRINGS which is G_PARAM_STATIC_NAME|NICK|BLURB.
2006-01-18  Michael Natterer  <mitch@gimp.org>

	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
	GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
	GIMP_PARAM_STATIC_STRINGS.

	* app/*/*.c: use them for all object properties so their
	strings are not copied.
2006-01-18 20:29:40 +00:00
William Skaggs 72a3574bba Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: handle fixed_width,
	fixed_height, and fixed_aspect in a reasonable way.
	Also don't crash when user modifies aspect of a
	nonexistent rectangle, and disconnect notify
	handler in dispose.
2005-11-29 23:32:55 +00:00
William Skaggs 7a316db9e5 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: don't crash when
	user modifies width/height of nonexistent rectangle, and
	make sure to disconnect option notify handlers in dispose.
	Should fix bug #322396.
2005-11-28 22:30:24 +00:00
Karine Delvare 167a9f3481 better looking rectangle boundary.
2005-11-14  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.c: better looking rectangle boundary.
2005-11-14 22:18:29 +00:00
Karine Delvare 9408287c6d better fixed-aspect behavior.
2005-11-09  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.c: better fixed-aspect behavior.
2005-11-09 20:47:57 +00:00
William Skaggs 2eed91bfc7 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: add "notify" callbacks for changes
	of width, height, or aspect entries in the tool options.
2005-10-21 20:17:19 +00:00
William Skaggs 1792475747 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c:
	* app/tools/gimpnewrectselecttool.c Make clicking inside an existing
	selection create rect matching the marching ants.
2005-10-20 21:33:40 +00:00
William Skaggs 4d8dae4f0b Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpcroptool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectangletool.h: move tool_control out of rectangle
	tool and into users of it, and make rect select execute on leaving
	but crop tool not.  Also rename functions and clean up formatting
	a bit.
2005-10-19 21:13:25 +00:00
William Skaggs dd8a46d388 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: "execute" the tool if the
	user switches to a different tool or clicks in a different
	image.  Good for rect select, not so sure about crop.
2005-10-19 19:01:42 +00:00
Karine Delvare 1f50357015 app/tools/gimpcroptool.c app/tools/gimpnewrectselecttool.c added status
2005-10-08  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimpcroptool.c
  * app/tools/gimpnewrectselecttool.c
  * app/tools/gimprectangletool.c: added status bar info to tell the user
  what to do once the rectangle area is drawn. Fixes bug #318267.
2005-10-08 19:20:31 +00:00
Karine Delvare 2e0757fda0 app/tools/gimpcroptool.c app/tools/gimprectangleoptions.c
2005-09-13  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimpcroptool.c
  * app/tools/gimprectangleoptions.c
  * app/tools/gimprectangletool.c
  * app/tools/gimpnewrectselecttool.c: changed the way we stay inside
  images boundaries so each tool decides whether it does or not.
2005-09-15 20:31:49 +00:00
Karine Delvare 9c3bc6f64b don't modify the rectangle while moving, and stick to edges when going out
2005-09-13  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.c: don't modify the rectangle while
  moving, and stick to edges when going out of image boundaries.
2005-09-13 19:07:17 +00:00
Sven Neumann 92f5a8b428 terminate variable argument list. Fixes bug #315255.
2005-09-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimprectangletool.c: terminate variable argument list.
	Fixes bug #315255.
2005-09-05 10:11:19 +00:00
Karine Delvare 0cd174e13b stay within image boundaries.
2005-09-04  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.c: stay within image boundaries.
2005-09-04 14:52:40 +00:00
Karine Delvare b94ecff556 app/tools/gimprectangletool.[ch] code cleanup, replace virtualization
2005-09-03  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.[ch]
  * app/tools/gimprectangleoptions.[ch]: code cleanup, replace
  virtualization functions with interface properties.

  * app/tools/gimpcroptool.[ch]
  * app/tools/gimpnewrectselecttool.[ch]
  * app/tools/gimpcropoptions.[ch]
  * app/tools/gimpnewrectselectoptions.[ch]: code cleanup, use said
  interface properties.
2005-09-03 19:48:22 +00:00
Karine Delvare 0df9d1cdd1 fix canceling the tool.
2005-08-29  Karine Delvare  <kdelvare@nerim.net>

  * app/tools/gimprectangletool.c: fix canceling the tool.
2005-08-29 17:49:16 +00:00
Karine Delvare 5a9f83bd46 app/tools/gimprectangletool.[ch] transform into an interface.
2005-08-15  Karine Delvare  <kdelvare@nerim.net>

        * app/tools/gimprectangletool.[ch]
        * app/tools/gimprectangleoptions.[ch]: transform into an interface.

        * app/tools/gimpcroptool.[ch]
        * app/tools/gimpnewrectselecttool.[ch]: use the rectangletool interface.

        * app/tools/gimpcropoptions.[ch]
        * app/tools/gimpnewrectselectoptions.[ch]: use the rectangleoptions
        interface.

        * app/tools/Makefile.am: added gimpnewrectselectionoptions.[ch]
2005-08-15 14:23:28 +00:00
Michael Natterer d64bf3564f added GimpPickable::get_opacity_at()
2005-07-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimppickable.[ch]: added GimpPickable::get_opacity_at()

	* app/core/gimpchannel.[ch]: removed gimp_channel_value() and
	implement ::get_opacity_at() instead.

	* app/core/gimplayer.[ch]: removed gimp_layer_pick_correlate()
	and implement ::get_opacity_at() instead.

	* app/core/gimpselection.c: GimpChannel::value() doesn't exist
	any more.

	* app/core/gimpprojection.c: implement ::get_opacity_at(), always
	returns OPAQUE.

	* app/core/gimpimage.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.

	* app/pdb/selection_cmds.c: regenerated.
2005-07-11 19:21:52 +00:00
William Skaggs b91651fe8f Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c (gimp_rectangle_tool_motion):
	Don't change function before creating new rectangle;
	cause of problem identified by Karine Delvare.
2005-06-02 22:48:43 +00:00
Sven Neumann 27042a7b36 app/tools/gimppainttool.[ch] unified tool and paint-tool statusbar APIs.
2005-05-07  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppainttool.[ch]
	* app/tools/gimptool.[ch]: unified tool and paint-tool statusbar APIs.

	* app/tools/gimpblendtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimpvectortool.c: changed accordingly.

	* app/tools/gimpselectiontool.c: give more hints in the statusbar.
	Some of the selection tools should probably override these.
2005-05-07 13:24:47 +00:00
William Skaggs b41d8898e9 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpnewrectselecttool.[ch]
	* app/tools/gimprectangletool.[ch]: more work on rectangle
	tool ui.
2005-04-09 18:08:47 +00:00
William Skaggs 3bd8b6d2d3 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpnewrectselecttool.c
	* app/tools/gimprectangletool.[ch]: improve cursor handling and
	other aspects of ui for rectangle tools.
2005-03-14 20:44:18 +00:00
William Skaggs 2a1c63c8dd Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c: lots of code for dealing
	with constraints.  Almost functional now ...
2005-03-10 23:55:24 +00:00
William Skaggs ed9bc27163 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimpsizeentry.[ch]: added function
	gimp_size_entry_show_unit_menu() for convenience.

	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]:  more work on
	controls in Tool Options.  Can now resize rectangle
	by dragging any corner or edge -- move rectangle by
	clicking inside and dragging.
2005-03-09 22:22:38 +00:00
William Skaggs 855809e1aa Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.[ch]
	* app/tools/gimprectangleoptions.[ch]: add size entry in
	options to control dimensions.  Still work in progress.
2005-03-08 23:17:19 +00:00
William Skaggs c31defcbf7 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimprectangletool.c
	* app/tools/gimprectangletool.h
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangleoptions.h: new code for base
	class for rectangle tools.

	* app/tools/gimpnewrectselecttool.[ch]: modified to
	derive from GimpRectangleTool.

	* app/tools/Makefile.am: modified accordingly

	* app/tools/gimpselectionoptions.[ch]: remove stuff
	no longer needed by new rect select tool.

	This is work in progress.
2005-03-02 18:18:19 +00:00