source: branches/kmk/Lucide/plugins/lupoppler/lupifield.cpp @ 321

Last change on this file since 321 was 321, checked in by dmik, 11 years ago

branches/kmk: Implemented LuPopplerDocument::getInputFields() and LuPopplerInputField?.

  • Property svn:executable set to *
File size: 4.9 KB
Line 
1
2/*
3 *  This file was generated by the SOM Compiler.
4 *  Generated using:
5 *     SOM incremental update: 2.24
6 */
7
8
9/* ***** BEGIN LICENSE BLOCK *****
10 * Version: CDDL 1.0/LGPL 2.1
11 *
12 * The contents of this file are subject to the COMMON DEVELOPMENT AND
13 * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
14 * this file except in compliance with the License. You may obtain a copy of
15 * the License at http://www.sun.com/cddl/
16 *
17 * Software distributed under the License is distributed on an "AS IS" basis,
18 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19 * for the specific language governing rights and limitations under the
20 * License.
21 *
22 * The Initial Developer of the Original Code is
23 * Dmitry A. Kuminov, netlabs.org.
24 * Portions created by the Initial Developer are Copyright (C) 2006
25 * the Initial Developer. All Rights Reserved.
26 *
27 * Contributor(s):
28 *
29 * Alternatively, the contents of this file may be used under the terms of
30 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the LGPL are applicable instead of those
32 * above. If you wish to allow use of your version of this file only under the
33 * terms of the LGPL, and not to allow others to use your version of this file
34 * under the terms of the CDDL, indicate your decision by deleting the
35 * provisions above and replace them with the notice and other provisions
36 * required by the LGPL. If you do not delete the provisions above, a recipient
37 * may use your version of this file under the terms of any one of the CDDL
38 * or the LGPL.
39 *
40 * ***** END LICENSE BLOCK ***** */
41
42
43
44/*
45 *  This file was generated by the SOM Compiler and Emitter Framework.
46 *  Generated using template emitter:
47 *      SOM Emitter emitxtm: 2.23.1.9
48 */
49
50#ifndef SOM_Module_lupifield_Source
51#define SOM_Module_lupifield_Source
52#endif
53#define LuPopplerInputField_Class_Source
54
55#include "lupifield.xih"
56
57
58SOM_Scope void SOMLINK LuPopplerInputField_init(LuPopplerInputField *somSelf,
59                                                 Environment *ev,
60                                                somInitCtrl* ctrl,
61                                                FormWidget* aFormWidget)
62{
63    LuPopplerInputFieldData *somThis; /* set in BeginInitializer */
64    somInitCtrl globalCtrl;
65    somBooleanVector myMask;
66    LuPopplerInputField_BeginInitializer_LuPopplerInputField_init;
67
68    LuPopplerInputField_Init_LuInputField_somDefaultInit(somSelf, ctrl);
69
70    /* local LuPopplerInputField initialization code */
71printf("%s:%d\n", __PRETTY_FUNCTION__, __LINE__);
72
73    somThis->data = aFormWidget;
74}
75
76
77SOM_Scope void SOMLINK somDestruct(LuPopplerInputField *somSelf,
78                                   octet doFree, som3DestructCtrl* ctrl)
79{
80    LuPopplerInputFieldData *somThis; /* set in BeginDestructor */
81    somDestructCtrl globalCtrl;
82    somBooleanVector myMask;
83    LuPopplerInputField_BeginDestructor;
84
85    /* local LuPopplerInputField deinitialization code */
86printf("%s:%d\n", __PRETTY_FUNCTION__, __LINE__);
87
88    LuPopplerInputField_EndDestructor;
89}
90
91
92SOM_Scope LuInputField_Type  SOMLINK getType(LuPopplerInputField *somSelf,
93                                              Environment *ev)
94{
95    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
96
97    LuInputField_Type type = LuInputField_Undefined;
98    switch( somThis->data->getType() ) {
99        case formButton:    type = LuInputField_Button; break;
100        case formText:      type = LuInputField_Text; break;
101        case formChoice:    type = LuInputField_Choice; break;
102        case formSignature: type = LuInputField_Signature; break;
103        default: break;
104    }
105
106    return type;
107}
108
109SOM_Scope LuRectangle*  SOMLINK getRectangle(LuPopplerInputField *somSelf,
110                                              Environment *ev)
111{
112    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
113
114    LuRectangle *rect = (LuRectangle *)SOMMalloc( sizeof( LuRectangle ) );
115
116    somThis->data->getRect(&rect->x1, &rect->y1, &rect->x2, &rect->y2);
117
118    return rect;
119}
120
121SOM_Scope unsigned long  SOMLINK getID(LuPopplerInputField *somSelf,
122                                        Environment *ev)
123{
124    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
125
126    return somThis->data->getID();
127}
128
129SOM_Scope boolean  SOMLINK isModified(LuPopplerInputField *somSelf,
130                                       Environment *ev)
131{
132    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
133
134    return somThis->data->isModified();
135}
136
137SOM_Scope boolean  SOMLINK isReadOnly(LuPopplerInputField *somSelf,
138                                       Environment *ev)
139{
140    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
141
142    return somThis->data->isReadOnly();
143}
144
Note: See TracBrowser for help on using the repository browser.