3 * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of gLabels.
7 * gLabels is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * gLabels is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
26 #include "label-object.h"
30 GL_VIEW_MODE_OBJECT_CREATE
35 GL_VIEW_ARROW_SELECT_REGION,
41 #define GL_TYPE_VIEW (gl_view_get_type ())
42 #define GL_VIEW(obj) \
43 (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_VIEW, glView ))
44 #define GL_VIEW_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass))
46 #define GL_IS_VIEW(obj) \
47 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW))
48 #define GL_IS_VIEW_CLASS(klass) \
49 (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW))
51 typedef struct _glView glView;
52 typedef struct _glViewClass glViewClass;
57 GtkVBox parent_widget;
63 gboolean zoom_to_fit_flag;
68 gboolean update_scheduled_flag;
69 gboolean grid_visible;
72 gboolean markup_visible;
75 glLabelObjectType create_type;
77 gboolean grabbed_flag;
79 /* GL_VIEW_ARROW_MOVE state */
83 /* GL_VIEW_ARROW_SELECT_REGION state */
84 gboolean select_region_visible;
85 glLabelRegion select_region;
87 /* GL_VIEW_ARROW_RESIZE state */
88 glLabelObject *resize_object;
89 glLabelObjectHandle resize_handle;
90 gboolean resize_honor_aspect;
92 /* GL_VIEW_CREATE_DRAG state */
93 glLabelObject *create_object;
100 GtkVBoxClass parent_class;
102 /* Signal to launch a context menu */
103 void (*context_menu_activate) (glView *view,
105 guint32 activate_time,
108 /* Signals to support a status bar */
109 void (*zoom_changed) (glView *view,
112 void (*pointer_moved) (glView *view,
116 void (*pointer_exit) (glView *view,
118 void (*mode_changed) (glView *view,
124 GType gl_view_get_type (void) G_GNUC_CONST;
126 GtkWidget *gl_view_new (glLabel *label);
129 void gl_view_update (glView *view);
131 void gl_view_update_region (glView *view,
133 glLabelRegion *region);
135 void gl_view_show_grid (glView *view);
137 void gl_view_hide_grid (glView *view);
139 void gl_view_show_markup (glView *view);
141 void gl_view_hide_markup (glView *view);
143 void gl_view_arrow_mode (glView *view);
145 void gl_view_object_create_mode (glView *view,
146 glLabelObjectType type);
149 void gl_view_zoom_in (glView *view);
151 void gl_view_zoom_out (glView *view);
153 void gl_view_zoom_to_fit (glView *view);
155 void gl_view_set_zoom (glView *view,
158 gdouble gl_view_get_zoom (glView *view);
160 gboolean gl_view_is_zoom_max (glView *view);
162 gboolean gl_view_is_zoom_min (glView *view);
174 * Local Variables: -- emacs
176 * c-basic-offset: 8 -- emacs
177 * tab-width: 8 -- emacs
178 * indent-tabs-mode: nil -- emacs