2 * (GLABELS) Label and Business Card Creation program for GNOME
4 * view.h: GLabels View module header file
6 * Copyright (C) 2001-2002 Jim Evins <evins@snaught.com>.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include <libgnomecanvas/libgnomecanvas.h>
29 #include "label-object.h"
33 GL_VIEW_STATE_OBJECT_CREATE
36 #define GL_TYPE_VIEW (gl_view_get_type ())
37 #define GL_VIEW(obj) (GTK_CHECK_CAST((obj), GL_TYPE_VIEW, glView ))
38 #define GL_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass))
39 #define GL_IS_VIEW(obj) (GTK_CHECK_TYPE ((obj), GL_TYPE_VIEW))
40 #define GL_IS_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW))
42 typedef struct _glView glView;
43 typedef struct _glViewClass glViewClass;
45 #include "view-object.h"
48 GtkVBox parent_widget;
55 GnomeCanvasGroup *bg_group; /* Background layer */
56 GnomeCanvasGroup *grid_group; /* Grid layer */
57 GnomeCanvasGroup *markup_group; /* Markup layer */
58 GnomeCanvasGroup *label_group; /* Label layer (user objects) */
59 GnomeCanvasGroup *fg_group; /* Foreground layer */
64 glLabelObjectType create_type;
66 GList *object_list; /* glViewObjects */
67 GList *selected_object_list; /* glViewObjects */
69 /* Clipboard selection stuff */
71 glLabel *selection_data;
78 GtkVBoxClass parent_class;
80 /* Selection changed signal */
81 void (*selection_changed) (glView *view,
84 /* Signals to support a status bar */
85 void (*zoom_changed) (glView *view,
88 void (*pointer_moved) (glView *view,
92 void (*pointer_exit) (glView *view,
94 void (*mode_changed) (glView *view,
100 guint gl_view_get_type (void);
102 GtkWidget *gl_view_new (glLabel *label);
105 void gl_view_raise_fg (glView *view);
108 void gl_view_show_grid (glView *view);
110 void gl_view_hide_grid (glView *view);
112 void gl_view_set_grid_spacing (glView *view,
115 void gl_view_show_markup (glView *view);
117 void gl_view_hide_markup (glView *view);
119 void gl_view_arrow_mode (glView *view);
121 void gl_view_object_create_mode (glView *view,
122 glLabelObjectType type);
125 void gl_view_select_object (glView *view,
126 glViewObject *view_object);
128 void gl_view_unselect_object (glView *view,
129 glViewObject *view_object);
131 void gl_view_select_all (glView *view);
133 void gl_view_unselect_all (glView *view);
135 void gl_view_select_region (glView *view,
141 gboolean gl_view_is_selection_empty (glView *view);
143 gboolean gl_view_is_selection_atomic (glView *view);
145 void gl_view_delete_selection (glView *view);
147 void gl_view_edit_object_props (glView *view);
149 void gl_view_raise_selection (glView *view);
151 void gl_view_lower_selection (glView *view);
153 void gl_view_flip_selection_horiz (glView *view);
155 void gl_view_flip_selection_vert (glView *view);
157 void gl_view_cut (glView *view);
159 void gl_view_copy (glView *view);
161 void gl_view_paste (glView *view);
164 void gl_view_zoom_in (glView *view);
166 void gl_view_zoom_out (glView *view);
168 void gl_view_set_zoom (glView *view,
171 gdouble gl_view_get_zoom (glView *view);
173 gboolean gl_view_is_zoom_max (glView *view);
175 gboolean gl_view_is_zoom_min (glView *view);
178 int gl_view_item_event_handler (GnomeCanvasItem *item,
180 glViewObject *view_object);