Ignore:
Timestamp:
Mar 26, 2010, 10:19:31 PM (12 years ago)
Author:
dmik
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/kmk/Lucide/plugins/lupoppler/lupifield.cpp

    r320 r321  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.24
     6 */
     7
     8
    19/* ***** BEGIN LICENSE BLOCK *****
    210 * Version: CDDL 1.0/LGPL 2.1
     
    4856
    4957
     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
    5092SOM_Scope LuInputField_Type  SOMLINK getType(LuPopplerInputField *somSelf,
    5193                                              Environment *ev)
    5294{
    5395    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    54     LuPopplerInputFieldMethodDebug("LuPopplerInputField","getType");
    5596
    56     return (LuPopplerInputField_parent_LuInputField_getType(somSelf,
    57                                                             ev));
     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;
    58107}
    59108
     
    62111{
    63112    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    64     LuPopplerInputFieldMethodDebug("LuPopplerInputField","getRectangle");
    65113
    66     return (LuPopplerInputField_parent_LuInputField_getRectangle(somSelf,
    67                                                                  ev));
     114    LuRectangle *rect = (LuRectangle *)SOMMalloc( sizeof( LuRectangle ) );
     115
     116    somThis->data->getRect(&rect->x1, &rect->y1, &rect->x2, &rect->y2);
     117
     118    return rect;
    68119}
    69120
     
    72123{
    73124    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    74     LuPopplerInputFieldMethodDebug("LuPopplerInputField","getID");
    75125
    76     return (LuPopplerInputField_parent_LuInputField_getID(somSelf,
    77                                                           ev));
     126    return somThis->data->getID();
    78127}
    79128
     
    82131{
    83132    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    84     LuPopplerInputFieldMethodDebug("LuPopplerInputField","isModified");
    85133
    86     return (LuPopplerInputField_parent_LuInputField_isModified(somSelf,
    87                                                                ev));
     134    return somThis->data->isModified();
    88135}
    89136
     
    92139{
    93140    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    94     LuPopplerInputFieldMethodDebug("LuPopplerInputField","isReadOnly");
    95141
    96     return (LuPopplerInputField_parent_LuInputField_isReadOnly(somSelf,
    97                                                                ev));
     142    return somThis->data->isReadOnly();
    98143}
    99144
Note: See TracChangeset for help on using the changeset viewer.