Commit Graph

16 Commits

Author SHA1 Message Date
Niels De Graef 06de8abd6e libgimpwidgets: use GtkGestureDrag in ScrolledPreview
This allows us to simplify some of the dragging logic, and makes us a
tiny bit more future-proof for GTK4, which uses a similar construction
with `GtkEventController`s.

While we're at it, stop storing a separate `priv` pointer, which would
allow us to use `G_DECLARE_DERIVABLE_TYPE()` in the future.
2021-12-12 22:27:48 +01:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 4a979995a3 libgimpwidgets: add gimp_scroll_adjustment_values()
and use it in GimpScrolledPreview. It supports smooth scrolling and
does roughly the same as a whole lot of magic code in GtkScrolledWindow
and GtkRange, resulting in the same scrolling behavior as in stock
GTK+ widgets.
2018-05-20 21:06:34 +02:00
Michael Natterer 3e680b9f32 libgimpwidgets: move all GimpScrolledPreview members to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer 843d9e35ad libgimpwidgets: replace GdkGC* with gpointer for an unused struct member 2010-10-14 17:22:56 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 943c4dba85 draw the navigation popup using Cairo, just as we do it in the core now.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.[ch]: draw the navigation
	popup using Cairo, just as we do it in the core now.


svn path=/trunk/; revision=26718
2008-08-22 21:30:33 +00:00
Sven Neumann b614bf5e85 libgimpwidgets/gimpintcombobox.[ch] libgimpwidgets/gimppageselector.[ch]
2006-01-25  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpintcombobox.[ch]
	* libgimpwidgets/gimppageselector.[ch]
	* libgimpwidgets/gimpzoommodel.[ch]: added a priv pointer to the
	instance struct and changed the GET_PRIVATE() macro to access the
	private data via that pointer.

	* libgimpwidgets/gimpscrolledpreview.[ch]
	* libgimpwidgets/gimpwidgets.def: added a priv pointer to the
	instance struct and moved all private data to the
	GimpScrolledPreviewPrivate struct. Added freeze/thaw methods so
	that derived widgets can be implemented without accessing private
	data.

	* libgimp/gimpzoompreview.c: changed accordingly.

	* libgimp/gimpfontselectbutton.[ch]: let the priv pointer be an
	anonymous void pointer.
2006-01-25 14:35:56 +00:00
Sven Neumann f71b4e6aa1 must not set the adjustment value directly. Instead make sure that the
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpscrolledpreview.[ch]
	(gimp_scrolled_preview_set_position): must not set the adjustment
	value directly. Instead make sure that the scrollbar adjustments
	are uptodate and use gtk_adjustment_set_value().
2005-09-28 12:39:30 +00:00
Sven Neumann 9ab6ffa950 added a hbox to the table and the "Update Preview" checkbutton there.
2005-09-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added a hbox to the table and
	the "Update Preview" checkbutton there. Added a function to access
	this control box. Increased default size to 200.

	* libgimpwidgets/gimpscrolledpreview.[ch]: added function
	gimp_scrolled_preview_set_policy() to control when the scrollbars
	should be shown.

	* libgimpwidgets/gimpwidgets.def: updated.

	* libgimp/gimpzoompreview.c: pack the zoom buttons into the
	preview's control box. Commented out the label, it shows a bogus
	zoom factor. Set scrollbar policy to ALWAYS to avoid resizing.
2005-09-28 02:46:06 +00:00
David Odin d9e414fd8d new function: gimp_scrolled_preview_set_position () to set the position of
* libgimpwidgets/gimpscrolledpreview.[ch]: new function:
  gimp_scrolled_preview_set_position () to set the position of the
  preview content wrt the drawable.  This function might be moved to a
  virtual function of GimpPreview in a near future.

* libgimp/gimpdrawablepreview.c: use this function, so a preview
  remembers its position from one invocation to the next.  This is done
  using the current executable name as a key for gimp_set/get_data () so
  each plug-in can have its preview on a different place.

  More informations could be saved this way: the update toggle, the checks, etc.

  Addresses bug #162286.

* libgimpwidgets/gimppreview.c: smallish cleanup.
2005-01-05 22:33:44 +00:00
Michael Natterer 66529903b9 libgimp/gimpaspectpreview.h libgimp/gimpdrawablepreview.h
2004-10-23  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimpaspectpreview.h
	* libgimp/gimpdrawablepreview.h
	* libgimp/gimpprogressbar.h
	* libgimpwidgets/gimpcellrenderercolor.h
	* libgimpwidgets/gimpcellrenderertoggle.h
	* libgimpwidgets/gimpframe.h
	* libgimpwidgets/gimpintcombobox.h
	* libgimpwidgets/gimpintstore.h
	* libgimpwidgets/gimppreview.h
	* libgimpwidgets/gimppreviewarea.h
	* libgimpwidgets/gimpscrolledpreview.h: added padding to all class
	structs which have been added since 2.0.
2004-10-23 19:59:18 +00:00
Sven Neumann c4bf786cc2 libgimpwidgets/gimppreview.[ch] libgimpwidgets/gimpscrolledpreview.[ch]
2004-09-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]
	* libgimpwidgets/gimpscrolledpreview.[ch]
	* libgimpwidgets/gimpwidgets.def: moved the offsets and the
	draw_thumb method back to the GimpPreview class.

	* libgimp/gimpdrawablepreview.c: changed accordingly.

	* plug-ins/common/bumpmap.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/dog.c
	* plug-ins/common/edge.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c
	* plug-ins/common/gauss.c
	* plug-ins/common/grid.c
	* plug-ins/common/mblur.c
	* plug-ins/common/neon.c
	* plug-ins/common/noisify.c
	* plug-ins/common/oilify.c
	* plug-ins/common/photocopy.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/sobel.c
	* plug-ins/common/softglow.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/wind.c: back to using gimp_preview_get_position().

	* libgimp/gimpregioniterator.c (gimp_rgn_iterator_new): corrected
	gtk-doc comment.
2004-09-29 13:39:23 +00:00
David Odin a001920ead libgimpwidgets/gimppreview.c split this widget into itself (more abstract
* libgimpwidgets/gimppreview.c
* libgimpwidgets/gimppreview.h: split this widget into itself (more
  abstract now) and ...

* libgimpwidgets/gimpscrolledpreview.c
* libgimpwidgets/gimpscrolledpreview.h: this widget which also have
  some scrollbars and a nagivation preview.

* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpwidgetstypes.h: changed accordingly.

* libgimp/gimpaspectpreview.c
* libgimp/gimpaspectpreview.h: Added this widget, derived from
  GimpPreview, which has always the same ratio has the given drawable.
  This widget has almost the same api as GimpDrawablePreview, and is
  useful for plug-ins that show the whole (scaled) drawable in their
  preview.

* libgimp/gimpdrawablepreview.c
* libgimp/gimpdrawablepreview.h: GimpDrawablePreview is now derived
  from GimpScrolledPreview.

* libgimp/Makefile.am
* libgimp/gimpui.h
* libgimp/gimpuitypes.h: changed accordingly.

* plug-ins/common/plasma.c: use a GimpAspectPreview.

* plug-ins/common/bumpmap.c
* plug-ins/common/cartoon.c
* plug-ins/common/deinterlace.c
* plug-ins/common/despeckle.c
* plug-ins/common/dog.c
* plug-ins/common/edge.c
* plug-ins/common/engrave.c
* plug-ins/common/exchange.c
* plug-ins/common/gauss.c
* plug-ins/common/grid.c
* plug-ins/common/mblur.c
* plug-ins/common/neon.c
* plug-ins/common/noisify.c
* plug-ins/common/oilify.c
* plug-ins/common/photocopy.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/sharpen.c
* plug-ins/common/shift.c
* plug-ins/common/sobel.c
* plug-ins/common/softglow.c
* plug-ins/common/spread.c
* plug-ins/common/struc.c
* plug-ins/common/unsharp.c
* plug-ins/common/wind.c: use gimp_scrolled_preview_get_position
  instead of gimp_preview_get_position.
2004-09-28 23:23:09 +00:00