Commit Graph

3033 Commits

Author SHA1 Message Date
5c8c30112a app: treat a NO_MOTION release like NORMAL one in GimpToolRectangle
which stops unexpected behavior that was there even before the new
code (like a rectangle without a selection).
2017-06-29 16:48:02 +02:00
e7964e499c app: we were leaking a reference in gimp_tool_rectangle_button_release()
because of bailing out early after emitting "response". Instead, don't
ref the object around this function, and move the "response" emission
to the end of the function.
2017-06-29 15:04:13 +02:00
a562860eed app: add boolean property "force-narrow-mode" to GimpToolRectangle
which allows to force outside handles without resorting to hacks.
2017-06-28 14:23:51 +02:00
719f96d89a app: fix gimp_tool_rectangle_frame_item()
it was setting double properties from integers, boom.
2017-06-28 14:13:10 +02:00
94bb1a78c1 app: some cleanup and fixes in GimpToolRectangle
- unset "rect_adjusting" before bailing out on button_release()
- update the integer rectangle when the double properties change
- don't try to show handles with a size of < 3
- remove unused members
- shorten some variable names
2017-06-27 17:46:47 +02:00
8a1d782b42 app: add optional round corners to GimpToolRectangle 2017-06-27 14:19:18 +02:00
75871cfa64 app: add the options to draw an ellipse within GimpToolRectangle 2017-06-27 00:46:55 +02:00
9d042e4de9 app: add gimp_canvas_arc_set() 2017-06-27 00:46:24 +02:00
c07a5f0a61 app: add gimp_tool_widget_add_arc() 2017-06-27 00:45:45 +02:00
3a0aab71b6 app: gimp_tool_widget_get_cursor(): rename "cursor_modifier" to just "modifier"
The same in all subclasses.
2017-06-26 22:13:00 +02:00
a3acb7422d app: move status message setting from GimpBlendTool to GimpToolLine 2017-06-26 21:48:43 +02:00
068f850c03 app: dispatch to the right vfunc in gimp_tool_widget_hover_modifier()
it was copy-paste dispatching to motion_modifier().
2017-06-26 21:39:51 +02:00
be63a4a836 app: add new GimpToolWidget subclass GimpToolRectangle
which is a replacement for GimpRectangleTool. It's a massive piece of
code and I'm not sure everyting works as it should, but it seems to do
crop stuff without any glitches.
2017-06-26 19:19:16 +02:00
1ebf905ed3 app: change gimp_tool_widget_add_corner() to take x, y, width, height
instead of x1, y1, x2, y2.
2017-06-26 19:19:16 +02:00
00ea73f29a app: add a generic GimpToolWidget::response() signal
and a default key_press() handler that emits CONFIRM, CANCEL and RESET
responses. Remove code with the same purpose from all subclasses.

Change tools feed key_press() to the widget and connect to its
"response" instead of implementing key_press() themselves. This will
only be better and less code after the tool side of this is done
generically.
2017-06-25 23:23:27 +02:00
d27359cca2 app: add gimp_tool_widget_add_rectangle(), _rectangle_guides(), _corner() 2017-06-25 21:07:24 +02:00
84e1f757ce app: store the snap offsets in GimpToolWidget
Rename gimp_tool_widget_snap_offsets() to set_snap_offsets(),
and add gimp_tool_widget_get_snap_offsets().

Also rename gimp_tool_widget_status() to set_status(), and
add new function and signal set_status_coords().
2017-06-24 21:09:18 +02:00
d089aa629b app: rename enum GimpRectangleToolFixedRule to GimpRectangleFixedRule 2017-06-24 19:48:09 +02:00
6e2e8a6f08 app: move the rectangle tool enums from tools-enums to display-enums 2017-06-24 19:48:09 +02:00
9c3a2b5021 app: add gimp_canvas_corner_set() which sets everything except the anchor 2017-06-24 19:48:09 +02:00
2192f520da app: add new GimpToolWidget subclass GimpToolPolygon
which is the free select curve.
2017-06-23 01:57:21 +02:00
9e2a3c7aee app: add gimp_tool_widget_add_polygon() and add_polygon_from_coords() 2017-06-23 01:44:56 +02:00
9d8f94375e app: add gimp_canvas_polygon_set_points()
and allow NULL points in both this function and new().
2017-06-23 01:40:35 +02:00
3ab92c7290 app: add GimpToolWidget subclass GimpToolPath, a complete vectors editor 2017-06-21 23:27:20 +02:00
c4d5693903 app: add various handle and vectors hit tests to gimpcanvasitems-utils.[ch]
1:1 copies of the same functions in gimpdrawtool.[ch].
2017-06-21 23:21:26 +02:00
1aca558867 app: forgot to #include "gimptoolpath.h" in gimptoolwidget.c 2017-06-21 02:16:11 +02:00
82e2fa2e5e app: add gimp_tool_widget_add_path(), not used yet 2017-06-21 00:32:14 +02:00
91deb61475 app: add virtual functions GimpToolWidget::key_press() and ::key_release()
and api to call them. Not used anywhere yet.
2017-06-20 23:01:18 +02:00
d2bfbfb748 app: some more cleanup in GimpToolLine
it was already working perfectly, but it's so simple I'd like to make
it "perfect" as a GimpToolWidget implementation example.
2017-06-20 19:07:24 +02:00
625ec4b773 app: add utility function gimp_canvas_handle_calc_size()
which is the code that calculates handle size based on pointer
proximity. Use the new function in GimpToolHandleGrid and
GimpToolLine, and clean up some stuff in GimpToolLine.
2017-06-20 01:02:23 +02:00
6560e3895b app: clear GimpToolTransformGrid's status when we leave proximity 2017-06-20 00:23:25 +02:00
77d516b588 app: another copy/paste error broke moving in GimpToolHandleGrid 2017-06-19 23:45:35 +02:00
055ca325f2 app: manage the preview opacity with an object binding too 2017-06-19 23:39:37 +02:00
0411801765 app: manage the transform tools' grid properties in GimpTransformTool
Simply use g_object_bind_property() to connect the grid properties of
GimpTransformOoptions and GimpToolTransformGrid and remove all other
grid property setting code.
2017-06-19 23:06:39 +02:00
96da8c1505 app: add status message to the handle transform tool
and fix a few glitches from tool widget porting.
2017-06-19 22:53:30 +02:00
546bbe1e14 app: add a transform matrix to GimpCanvasPolygon and all API using it 2017-06-19 21:53:49 +02:00
3ddfd107b9 app: add some newlines in gimpcanvasboundary.c 2017-06-19 21:53:20 +02:00
b1dddcdc8f app: add #defines of standard handle sizes to gimpcanvashandle.h
The same values as in gimpdrawtool.h, tool widgets in display/ must
not include the draw tool header from tools/.
2017-06-19 10:46:05 +02:00
3b21c08b41 app: add proximity-sensitive handles to the handle transform tool
as known from the blend tool.
2017-06-19 08:02:12 +02:00
6bd316e070 app: add new GimpToolTransformGrid subclass GimpToolHandleGrid
which implents the handle transform tool's interaction.
2017-06-19 01:21:06 +02:00
457f6bf952 app: add GimpToolTransformGrid, GimpToolRotateGrid and GimpToolShearGrid
which do all transform tools' (except handle transform) canvas GUI and
their interaction.
2017-06-17 03:04:06 +02:00
44d33bfd3b app: change return value of GimpToolWidget::button_press() from gboolean to gint
so widgets can return which handle was clicked. The values boolean
semantics stay the same so if(retval) gives the same result. This is
useful for the upcoming transform tool widgets.
2017-06-16 20:55:02 +02:00
1bc52dad71 app: return FALSE from gimp_canvas_item_hit() when the item is invisible 2017-06-14 00:16:09 +02:00
013bb4d81f app: add signal GimpToolWidget::snap_offsets() and API to emit it
so widgets can notify their handling tool of snap offsets.
2017-06-14 00:16:09 +02:00
495f90e6e2 app: allow to set an angle on a GimpCanvasHandle in GIMP_HANDLE_CROSS mode 2017-06-14 00:16:09 +02:00
ad660a3c88 app: add gimp_tool_widget_add_transform_guides() 2017-06-14 00:16:09 +02:00
7082fc8b9e app: add x1,y1,x2,y2 parameters to gimp_canvas_transform_guides_set() 2017-06-14 00:16:09 +02:00
Ell
b737463a3b app: fix event reordering during motion compression
... due to commit 5543a9da4f
2017-06-11 18:54:29 -04:00
18fe8f61a5 app: add GimpToolCompass, which is the entire canvas GUI of the measure tool 2017-06-11 23:38:55 +02:00
e05ba83453 app: add signal GimpToolWidget::status() and API to emit it
for subclasses to set status messages.
2017-06-11 23:18:47 +02:00