Ignore:
Timestamp:
Mar 27, 2010, 12:15:53 PM (12 years ago)
Author:
dmik
Message:

branches/kmk: Implemented LuPopplerInputText? class.

File:
1 edited

Legend:

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

    r321 r323  
    5656
    5757
    58 SOM_Scope void SOMLINK LuPopplerInputField_init(LuPopplerInputField *somSelf,
    59                                                  Environment *ev,
    60                                                 somInitCtrl* ctrl,
    61                                                 FormWidget* aFormWidget)
     58SOM_Scope void SOMLINK init_widget(LuPopplerInputField *somSelf,
     59                                    Environment *ev, somInitCtrl* ctrl,
     60                                   FormWidget* aFormWidget)
    6261{
    6362    LuPopplerInputFieldData *somThis; /* set in BeginInitializer */
    6463    somInitCtrl globalCtrl;
    6564    somBooleanVector myMask;
    66     LuPopplerInputField_BeginInitializer_LuPopplerInputField_init;
     65    LuPopplerInputField_BeginInitializer_init_widget;
    6766
    6867    LuPopplerInputField_Init_LuInputField_somDefaultInit(somSelf, ctrl);
    6968
    7069    /* local LuPopplerInputField initialization code */
    71 printf("%s:%d\n", __PRETTY_FUNCTION__, __LINE__);
    7270
    73     somThis->data = aFormWidget;
     71    somThis->widget = aFormWidget;
     72    somThis->rect.x1 = 0.;
     73    somThis->rect.x2 = 0.;
     74    somThis->rect.y1 = 0.;
     75    somThis->rect.y2 = 0.;
    7476}
    7577
     
    8486
    8587    /* local LuPopplerInputField deinitialization code */
    86 printf("%s:%d\n", __PRETTY_FUNCTION__, __LINE__);
    8788
    8889    LuPopplerInputField_EndDestructor;
     
    9697
    9798    LuInputField_Type type = LuInputField_Undefined;
    98     switch( somThis->data->getType() ) {
     99    switch( somThis->widget->getType() ) {
    99100        case formButton:    type = LuInputField_Button; break;
    100101        case formText:      type = LuInputField_Text; break;
     
    112113    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    113114
    114     LuRectangle *rect = (LuRectangle *)SOMMalloc( sizeof( LuRectangle ) );
    115 
    116     somThis->data->getRect(&rect->x1, &rect->y1, &rect->x2, &rect->y2);
    117 
    118     return rect;
     115    somThis->widget->getRect(&somThis->rect.x1, &somThis->rect.y1,
     116                             &somThis->rect.x2, &somThis->rect.y2);
     117    return &somThis->rect;
    119118}
    120119
     
    124123    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    125124
    126     return somThis->data->getID();
     125    return somThis->widget->getID();
    127126}
    128127
     
    132131    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    133132
    134     return somThis->data->isModified();
     133    return somThis->widget->isModified();
    135134}
    136135
     
    140139    LuPopplerInputFieldData *somThis = LuPopplerInputFieldGetData(somSelf);
    141140
    142     return somThis->data->isReadOnly();
     141    return somThis->widget->isReadOnly();
    143142}
    144143
Note: See TracChangeset for help on using the changeset viewer.