GimpUi.Preview¶
- Subclasses:
 
Methods¶
- Inherited:
 Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
 Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Properties¶
- Inherited:
 Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/c  | 
Whether the preview should update automatically  | 
Child Properties¶
- Inherited:
 
Style Properties¶
- Inherited:
 
Name  | 
Type  | 
Default  | 
Flags  | 
Short Description  | 
|---|---|---|---|---|
  | 
  | 
r  | 
The preview’s size  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class GimpUi.Preview(*args, **kwargs)¶
 - Bases:
 - Abstract:
 Yes
- Structure:
 
A widget providing a
GimpUi.PreviewAreaplus framework to update the preview.- draw()¶
 Calls the
GimpUi.Preview::drawmethod.GimpUi.Previewitself doesn’t implement a default draw method so the behavior is determined by the derived class implementing this method.GimpUi.DrawablePreviewimplementsGimpUi.Preview.draw() by drawing the original, unmodified drawable to the self.New in version 2.2.
- draw_buffer(buffer, rowstride)¶
 - Parameters:
 
Calls the GimpPreview::draw_buffer method.
GimpUi.Previewitself doesn’t implement this method so the behavior is determined by the derived class implementing this method.New in version 2.2.
- get_area()¶
 - Returns:
 a pointer to the
GimpUi.PreviewAreaused in the self.- Return type:
 
In most cases, you shouldn’t need to access the
GimpUi.PreviewAreathat is being used in the self. Sometimes however, you need to. For example if you want to receive mouse events from the area. In such cases, useGimpUi.Preview.get_area().New in version 2.4.
- get_bounds()¶
 
- get_controls()¶
 - 
Gives access to the horizontal
Gtk.Boxat the bottom of the preview that contains the update toggle. Derived widgets can use this function if they need to add controls to this area.New in version 2.4.
 
- get_default_cursor()¶
 - Returns:
 The self's default
Gdk.Cursor.- Return type:
 
See
GimpUi.Preview.set_default_cursor():New in version 3.0.
- get_frame()¶
 - Returns:
 a pointer to the
Gtk.AspectFrameused in the self.- Return type:
 
New in version 3.0.
- get_grid()¶
 - 
New in version 3.0.
 
- get_position()¶
 - Returns:
 - x:
 return location for the horizontal offset
- y:
 return location for the vertical offset
- Return type:
 
New in version 2.2.
- get_size()¶
 - Returns:
 - width:
 return location for the preview area width
- height:
 return location for the preview area height
- Return type:
 
New in version 2.2.
- get_update()¶
 - Returns:
 the state of the “Preview” check button.
- Return type:
 
New in version 2.2.
- invalidate()¶
 This function starts or renews a short low-priority timeout. When the timeout expires, the
GimpUi.Preview::invalidatedsignal is emitted which will usually cause the self to be updated.This function does nothing unless the “Preview” button is checked.
During the emission of the signal a busy cursor is set on the toplevel window containing the self and on the preview area itself.
New in version 2.2.
- set_bounds(xmin, ymin, xmax, ymax)¶
 - Parameters:
 
Sets the lower and upper limits for the previewed area. The difference between the upper and lower value is used to set the maximum size of the
GimpUi.PreviewAreaused in the self.New in version 2.2.
- set_default_cursor(cursor)¶
 - Parameters:
 cursor (
Gdk.Cursor) – aGdk.CursororNone
Sets the default mouse cursor for the preview. Note that this will be overridden by a
Gdk.CursorType.FLEURif the preview has scrollbars, or by aGdk.CursorType.WATCHwhen the preview is invalidated.New in version 2.2.
- set_update(update)¶
 - Parameters:
 update (
bool) –Trueif the preview should invalidate itself when being scrolled or whenGimpUi.Preview.invalidate() is being called
Sets the state of the “Preview” check button.
New in version 2.2.
- transform(src_x, src_y)¶
 - Parameters:
 - Returns:
 - dest_x:
 returns the transformed horizontal position
- dest_y:
 returns the transformed vertical position
- Return type:
 
Transforms from image to widget coordinates.
New in version 2.4.
- untransform(src_x, src_y)¶
 - Parameters:
 - Returns:
 - dest_x:
 returns the untransformed horizontal position
- dest_y:
 returns the untransformed vertical position
- Return type:
 
Transforms from widget to image coordinates.
New in version 2.4.
- do_draw() virtual¶
 Calls the
GimpUi.Preview::drawmethod.GimpUi.Previewitself doesn’t implement a default draw method so the behavior is determined by the derived class implementing this method.GimpUi.DrawablePreviewimplementsGimpUi.Preview.draw() by drawing the original, unmodified drawable to the preview.New in version 2.2.
- do_draw_buffer(buffer, rowstride) virtual¶
 - Parameters:
 
Calls the GimpPreview::draw_buffer method.
GimpUi.Previewitself doesn’t implement this method so the behavior is determined by the derived class implementing this method.New in version 2.2.
- do_draw_thumb(area, width, height) virtual¶
 - Parameters:
 area (
GimpUi.PreviewArea) –width (
int) –height (
int) –
- do_invalidated() virtual¶
 
- do_set_cursor() virtual¶
 
- do_transform(src_x, src_y) virtual¶
 - Parameters:
 - Returns:
 - dest_x:
 returns the transformed horizontal position
- dest_y:
 returns the transformed vertical position
- Return type:
 
Transforms from image to widget coordinates.
New in version 2.4.
- do_untransform(src_x, src_y) virtual¶
 - Parameters:
 - Returns:
 - dest_x:
 returns the untransformed horizontal position
- dest_y:
 returns the untransformed vertical position
- Return type:
 
Transforms from widget to image coordinates.
New in version 2.4.
Signal Details¶
- GimpUi.Preview.signals.invalidated(preview)¶
 - Signal Name:
 invalidated- Flags:
 - Parameters:
 preview (
GimpUi.Preview) – The object which received the signal