contrib/gmk_sym: Fix missing break
[geda-gaf.git] / gschem / include / gschem_page_view.h
blobf78425b6d2b8da085def225464a93f5bb2eacd85
1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2019 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 /*!
21 * \file gschem_page_view.h
23 * \brief A widget for viewing a schematic page
26 #define GSCHEM_TYPE_PAGE_VIEW (gschem_page_view_get_type())
27 #define GSCHEM_PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_PAGE_VIEW, GschemPageView))
28 #define GSCHEM_PAGE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_PAGE_VIEW, GschemPageViewClass))
29 #define GSCHEM_IS_PAGE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_PAGE_VIEW))
30 #define GSCHEM_PAGE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_PAGE_VIEW, GschemPageViewClass))
32 typedef struct _GschemPageViewClass GschemPageViewClass;
33 typedef struct _GschemPageView GschemPageView;
35 struct _GschemPageViewClass
37 GtkWindowClass parent_class;
40 struct _GschemPageView
42 GtkWindow parent;
44 GtkAllocation previous_allocation;
46 GtkAdjustment *hadjustment;
47 GtkAdjustment *vadjustment;
49 GHashTable *geometry_table;
51 gboolean configured;
53 gboolean doing_pan; /* mouse pan status flag */
54 int pan_x;
55 int pan_y;
56 int throttle;
58 PAGE *page;
63 GtkAdjustment*
64 gschem_page_view_get_hadjustment (GschemPageView *view);
66 PAGE*
67 gschem_page_view_get_page (GschemPageView *view);
69 GschemPageGeometry*
70 gschem_page_view_get_page_geometry (GschemPageView *view);
72 GType
73 gschem_page_view_get_type ();
75 GtkAdjustment*
76 gschem_page_view_get_vadjustment (GschemPageView *view);
78 void
79 gschem_page_view_invalidate_all (GschemPageView *view);
81 void
82 gschem_page_view_invalidate_object (GschemPageView *view, OBJECT *object);
84 void
85 gschem_page_view_invalidate_screen_rect (GschemPageView *view, int left, int top, int right, int bottom);
87 void
88 gschem_page_view_invalidate_world_rect (GschemPageView *view, int left, int top, int right, int bottom);
90 GschemPageView*
91 gschem_page_view_new_with_page (PAGE *page);
93 void
94 gschem_page_view_pan_general(GschemPageView *page_view, int x, int y, double relativ_zoom_factor);
96 void
97 gschem_page_view_pan(GschemPageView *page_view, int x, int y);
99 void
100 gschem_page_view_pan_mouse(GschemPageView *page_view, int diff_x, int diff_y);
102 void
103 gschem_page_view_pan_start(GschemPageView *page_view, int x, int y);
105 void
106 gschem_page_view_pan_motion (GschemPageView *view, int mousepan_gain, int x, int y);
108 gboolean
109 gschem_page_view_pan_end(GschemPageView *page_view);
111 void
112 gschem_page_view_redraw (GschemPageView *view, GdkEventExpose *event, GschemToplevel *w_current);
115 gschem_page_view_SCREENabs(GschemPageView *view, int val);
117 void
118 gschem_page_view_SCREENtoWORLD (GschemPageView *view, int mx, int my, int *x, int *y);
120 void
121 gschem_page_view_set_hadjustment (GschemPageView *view, GtkAdjustment *hadjustment);
123 void
124 gschem_page_view_set_page (GschemPageView *view, PAGE *page);
126 void
127 gschem_page_view_set_vadjustment (GschemPageView *view, GtkAdjustment *vadjustment);
130 gschem_page_view_WORLDabs(GschemPageView *view, int val);
132 void
133 gschem_page_view_WORLDtoSCREEN (GschemPageView *view, int x, int y, int *px, int *py);
135 void
136 gschem_page_view_zoom_extents (GschemPageView *view, const GList *list);
138 OBJECT*
139 gschem_page_get_page_object(OBJECT *object);
141 void
142 gschem_page_view_zoom_text (GschemPageView *view, OBJECT *object, gboolean zoom_hidden);
144 void
145 gschem_page_view_update_scroll_adjustments (GschemPageView *view);