Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-form-field.h
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /* this file is part of evince, a gnome document viewer
3  *
4  * Copyright (C) 2006 Julien Rebetez
5  *
6  * Evince is free software; you can redistribute it and/or modify it
7  * 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.
10  *
11  * Evince is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
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.
19  */
20 
21 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
22 #error "Only <evince-document.h> can be included directly."
23 #endif
24 
25 #ifndef EV_FORM_FIELD_H
26 #define EV_FORM_FIELD_H
27 
28 #include <glib-object.h>
29 
30 #include "ev-document.h"
31 #include "ev-link.h"
32 
33 G_BEGIN_DECLS
34 
35 #define EV_TYPE_FORM_FIELD (ev_form_field_get_type())
36 #define EV_FORM_FIELD(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD, EvFormField))
37 #define EV_FORM_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD, EvFormFieldClass))
38 #define EV_IS_FORM_FIELD(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD))
39 #define EV_IS_FORM_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD))
40 #define EV_FORM_FIELD_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD, EvFormFieldClass))
41 
42 #define EV_TYPE_FORM_FIELD_TEXT (ev_form_field_text_get_type())
43 #define EV_FORM_FIELD_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldText))
44 #define EV_FORM_FIELD_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldTextClass))
45 #define EV_IS_FORM_FIELD_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_TEXT))
46 #define EV_IS_FORM_FIELD_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_TEXT))
47 #define EV_FORM_FIELD_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_TEXT, EvFormFieldTextClass))
48 
49 #define EV_TYPE_FORM_FIELD_BUTTON (ev_form_field_button_get_type())
50 #define EV_FORM_FIELD_BUTTON(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButton))
51 #define EV_FORM_FIELD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButtonClass))
52 #define EV_IS_FORM_FIELD_BUTTON(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_BUTTON))
53 #define EV_IS_FORM_FIELD_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_BUTTON))
54 #define EV_FORM_FIELD_BUTTON_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_BUTTON, EvFormFieldButtonClass))
55 
56 #define EV_TYPE_FORM_FIELD_CHOICE (ev_form_field_choice_get_type())
57 #define EV_FORM_FIELD_CHOICE(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoice))
58 #define EV_FORM_FIELD_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoiceClass))
59 #define EV_IS_FORM_FIELD_CHOICE(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_CHOICE))
60 #define EV_IS_FORM_FIELD_CHOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_CHOICE))
61 #define EV_FORM_FIELD_CHOICE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_CHOICE, EvFormFieldChoiceClass))
62 
63 #define EV_TYPE_FORM_FIELD_SIGNATURE (ev_form_field_signature_get_type())
64 #define EV_FORM_FIELD_SIGNATURE(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignature))
65 #define EV_FORM_FIELD_SIGNATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignatureClass))
66 #define EV_IS_FORM_FIELD_SIGNATURE(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_FORM_FIELD_SIGNATURE))
67 #define EV_IS_FORM_FIELD_SIGNATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_FORM_FIELD_SIGNATURE))
68 #define EV_FORM_FIELD_SIGNATURE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_FORM_FIELD_SIGNATURE, EvFormFieldSignatureClass))
69 
70 typedef struct _EvFormField EvFormField;
72 
75 
78 
81 
84 
85 typedef enum
86 {
91 
92 typedef enum
93 {
98 
99 typedef enum
100 {
104 
106 {
107  GObject parent;
108 
109  gint id;
110  gboolean is_read_only;
111  gdouble font_size;
113 
115  gboolean changed;
116 };
117 
119 {
120  GObjectClass parent_class;
121 };
122 
124 {
126 
128 
129  gboolean do_spell_check : 1;
130  gboolean do_scroll : 1;
131  gboolean comb : 1;
132  gboolean is_rich_text : 1;
133  gboolean is_password;
134 
135  gint max_len;
136  gchar *text;
137 };
138 
140 {
142 };
143 
145 {
147 
149 
150  gboolean state;
151 };
152 
154 {
156 };
157 
159 {
161 
163 
164  gboolean multi_select : 1;
165  gboolean is_editable : 1;
166  gboolean do_spell_check : 1;
167  gboolean commit_on_sel_change : 1;
168 
170  gchar *text;
171 };
172 
174 {
176 };
177 
179 {
181 
182  /* TODO */
183 };
184 
186 {
188 };
189 
190 /* EvFormField base class */
191 GType ev_form_field_get_type (void) G_GNUC_CONST;
192 
193 /* EvFormFieldText */
194 GType ev_form_field_text_get_type (void) G_GNUC_CONST;
196  EvFormFieldTextType type);
197 
198 /* EvFormFieldButton */
199 GType ev_form_field_button_get_type (void) G_GNUC_CONST;
201  EvFormFieldButtonType type);
202 
203 /* EvFormFieldChoice */
204 GType ev_form_field_choice_get_type (void) G_GNUC_CONST;
206  EvFormFieldChoiceType type);
207 
208 /* EvFormFieldSignature */
209 GType ev_form_field_signature_get_type (void) G_GNUC_CONST;
211 
212 
213 G_END_DECLS
214 
215 #endif /* !EV_FORM_FIELD_H */
216