1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3  *
4  * gimpnavigationeditor.h
5  * Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
6  *
7  * partly based on app/nav_window
8  * Copyright (C) 1999 Andy Thomas <alt@gimp.org>
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef __GIMP_NAVIGATION_EDITOR_H__
25 #define __GIMP_NAVIGATION_EDITOR_H__
26 
27 
28 #include "widgets/gimpeditor.h"
29 
30 
31 #define GIMP_TYPE_NAVIGATION_EDITOR            (gimp_navigation_editor_get_type ())
32 #define GIMP_NAVIGATION_EDITOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_NAVIGATION_EDITOR, GimpNavigationEditor))
33 #define GIMP_NAVIGATION_EDITOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_NAVIGATION_EDITOR, GimpNavigationEditorClass))
34 #define GIMP_IS_NAVIGATION_EDITOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_NAVIGATION_EDITOR))
35 #define GIMP_IS_NAVIGATION_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_NAVIGATION_EDITOR))
36 #define GIMP_NAVIGATION_EDITOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_NAVIGATION_EDITOR, GimpNavigationEditorClass))
37 
38 
39 typedef struct _GimpNavigationEditorClass  GimpNavigationEditorClass;
40 
41 struct _GimpNavigationEditor
42 {
43   GimpEditor        parent_instance;
44 
45   GimpContext      *context;
46   GimpDisplayShell *shell;
47 
48   GimpImageProxy   *image_proxy;
49 
50   GtkWidget        *view;
51   GtkWidget        *zoom_label;
52   GtkAdjustment    *zoom_adjustment;
53 
54   GtkWidget        *zoom_out_button;
55   GtkWidget        *zoom_in_button;
56   GtkWidget        *zoom_100_button;
57   GtkWidget        *zoom_fit_in_button;
58   GtkWidget        *zoom_fill_button;
59   GtkWidget        *shrink_wrap_button;
60 
61   guint             scale_timeout;
62 };
63 
64 struct _GimpNavigationEditorClass
65 {
66   GimpEditorClass  parent_class;
67 };
68 
69 
70 GType       gimp_navigation_editor_get_type  (void) G_GNUC_CONST;
71 
72 GtkWidget * gimp_navigation_editor_new       (GimpMenuFactory  *menu_factory);
73 void        gimp_navigation_editor_popup     (GimpDisplayShell *shell,
74                                               GtkWidget        *widget,
75                                               gint              click_x,
76                                               gint              click_y);
77 
78 
79 #endif  /*  __GIMP_NAVIGATION_EDITOR_H__  */
80