1333 return EFalse; |
1333 return EFalse; |
1334 } |
1334 } |
1335 CXnProperty* tmpProperty = NULL; |
1335 CXnProperty* tmpProperty = NULL; |
1336 TRAP( error, tmpProperty = CXnProperty::NewL( |
1336 TRAP( error, tmpProperty = CXnProperty::NewL( |
1337 KNullDesC8, tmpValue, |
1337 KNullDesC8, tmpValue, |
1338 aNode.UiEngine()->ODT()->DomDocument().StringPool() ); ); |
1338 *aNode.UiEngine()->ODT()->DomDocument().StringPool() ); ); |
1339 if ( error != KErrNone ) |
1339 if ( error != KErrNone ) |
1340 { |
1340 { |
1341 delete tmpValue; |
1341 delete tmpValue; |
1342 return EFalse; |
1342 return EFalse; |
1343 } |
1343 } |
3105 CXnProperty* tmpProperty = NULL; |
3105 CXnProperty* tmpProperty = NULL; |
3106 CleanupStack::PushL( tmpValue ); |
3106 CleanupStack::PushL( tmpValue ); |
3107 tmpProperty = CXnProperty::NewL( |
3107 tmpProperty = CXnProperty::NewL( |
3108 KNullDesC8, |
3108 KNullDesC8, |
3109 tmpValue, |
3109 tmpValue, |
3110 aNode.UiEngine()->ODT()->DomDocument().StringPool() ); |
3110 *aNode.UiEngine()->ODT()->DomDocument().StringPool() ); |
3111 CleanupStack::Pop( tmpValue ); |
3111 CleanupStack::Pop( tmpValue ); |
3112 TSize imageSize = returnValue->SizeInPixels(); |
3112 TSize imageSize = returnValue->SizeInPixels(); |
3113 CleanupStack::PushL( tmpProperty ); |
3113 CleanupStack::PushL( tmpProperty ); |
3114 TInt intValue = static_cast< TInt >( value->FloatValueL() ); |
3114 TInt intValue = static_cast< TInt >( value->FloatValueL() ); |
3115 TInt dividerValue = 0; |
3115 TInt dividerValue = 0; |
3204 CXnDomPropertyValue* nameValue = CXnDomPropertyValue::NewL( |
3204 CXnDomPropertyValue* nameValue = CXnDomPropertyValue::NewL( |
3205 aUiEngine.ODT()->DomDocument().StringPool() ); |
3205 aUiEngine.ODT()->DomDocument().StringPool() ); |
3206 CleanupStack::PushL( nameValue ); |
3206 CleanupStack::PushL( nameValue ); |
3207 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aName ); |
3207 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aName ); |
3208 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::KName, |
3208 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::KName, |
3209 nameValue, aUiEngine.ODT()->DomDocument().StringPool() ); |
3209 nameValue, *aUiEngine.ODT()->DomDocument().StringPool() ); |
3210 CleanupStack::Pop( nameValue ); |
3210 CleanupStack::Pop( nameValue ); |
3211 CleanupStack::PushL( name ); |
3211 CleanupStack::PushL( name ); |
3212 node->SetPropertyL( name ); |
3212 node->SetPropertyL( name ); |
3213 CleanupStack::Pop( name ); |
3213 CleanupStack::Pop( name ); |
3214 CXnDomPropertyValue* valueValue = CXnDomPropertyValue::NewL( |
3214 CXnDomPropertyValue* valueValue = CXnDomPropertyValue::NewL( |
3215 aUiEngine.ODT()->DomDocument().StringPool() ); |
3215 aUiEngine.ODT()->DomDocument().StringPool() ); |
3216 CleanupStack::PushL( valueValue ); |
3216 CleanupStack::PushL( valueValue ); |
3217 valueValue->SetStringValueL( CXnDomPropertyValue::EString, aValue ); |
3217 valueValue->SetStringValueL( CXnDomPropertyValue::EString, aValue ); |
3218 CXnProperty* value = CXnProperty::NewL( XnPropertyNames::action::KValue, |
3218 CXnProperty* value = CXnProperty::NewL( XnPropertyNames::action::KValue, |
3219 valueValue, aUiEngine.ODT()->DomDocument().StringPool() ); |
3219 valueValue, *aUiEngine.ODT()->DomDocument().StringPool() ); |
3220 CleanupStack::Pop( valueValue ); |
3220 CleanupStack::Pop( valueValue ); |
3221 CleanupStack::PushL( value ); |
3221 CleanupStack::PushL( value ); |
3222 node->SetPropertyL( value ); |
3222 node->SetPropertyL( value ); |
3223 CleanupStack::Pop( value ); |
3223 CleanupStack::Pop( value ); |
3224 CleanupStack::Pop( node ); |
3224 CleanupStack::Pop( node ); |
3247 CXnDomPropertyValue* nameValue = |
3247 CXnDomPropertyValue* nameValue = |
3248 CXnDomPropertyValue::NewL( aUiEngine.ODT()->DomDocument().StringPool() ); |
3248 CXnDomPropertyValue::NewL( aUiEngine.ODT()->DomDocument().StringPool() ); |
3249 CleanupStack::PushL( nameValue ); |
3249 CleanupStack::PushL( nameValue ); |
3250 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
3250 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
3251 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::trigger::KName, |
3251 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::trigger::KName, |
3252 nameValue, aUiEngine.ODT()->DomDocument().StringPool() ); |
3252 nameValue, *aUiEngine.ODT()->DomDocument().StringPool() ); |
3253 CleanupStack::Pop( nameValue ); |
3253 CleanupStack::Pop( nameValue ); |
3254 CleanupStack::PushL( name ); |
3254 CleanupStack::PushL( name ); |
3255 node->SetPropertyL( name ); |
3255 node->SetPropertyL( name ); |
3256 CleanupStack::Pop( name ); |
3256 CleanupStack::Pop( name ); |
3257 CXnNode* triggerType = BuildTriggerTypeNodeL( aTriggerValueName, |
3257 CXnNode* triggerType = BuildTriggerTypeNodeL( aTriggerValueName, |
3283 CXnDomPropertyValue* nameValue = |
3283 CXnDomPropertyValue* nameValue = |
3284 CXnDomPropertyValue::NewL( aUiEngine.ODT()->DomDocument().StringPool() ); |
3284 CXnDomPropertyValue::NewL( aUiEngine.ODT()->DomDocument().StringPool() ); |
3285 CleanupStack::PushL( nameValue ); |
3285 CleanupStack::PushL( nameValue ); |
3286 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
3286 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
3287 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::trigger::KName, |
3287 CXnProperty* name = CXnProperty::NewL( XnPropertyNames::action::trigger::KName, |
3288 nameValue, aUiEngine.ODT()->DomDocument().StringPool() ); |
3288 nameValue, *aUiEngine.ODT()->DomDocument().StringPool() ); |
3289 CleanupStack::Pop( nameValue ); |
3289 CleanupStack::Pop( nameValue ); |
3290 CleanupStack::PushL( name ); |
3290 CleanupStack::PushL( name ); |
3291 node->SetPropertyL( name ); |
3291 node->SetPropertyL( name ); |
3292 CleanupStack::Pop( name ); |
3292 CleanupStack::Pop( name ); |
3293 CleanupStack::Pop( node ); |
3293 CleanupStack::Pop( node ); |
3533 // |
3533 // |
3534 CXnNode* CXnControlAdapterImpl::BuildSwipeTriggerNodeLC( |
3534 CXnNode* CXnControlAdapterImpl::BuildSwipeTriggerNodeLC( |
3535 CXnUiEngine& aUiEngine, |
3535 CXnUiEngine& aUiEngine, |
3536 const TDesC8& aDirection ) |
3536 const TDesC8& aDirection ) |
3537 { |
3537 { |
3538 CXnDomStringPool& sp( aUiEngine.ODT()->DomDocument().StringPool() ); |
3538 CXnDomStringPool* sp( aUiEngine.ODT()->DomDocument().StringPool() ); |
3539 |
3539 |
3540 CXnNode* node = CXnNode::NewL(); |
3540 CXnNode* node = CXnNode::NewL(); |
3541 CleanupStack::PushL( node ); |
3541 CleanupStack::PushL( node ); |
3542 |
3542 |
3543 CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger ); |
3543 CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger ); |
3556 CXnDomPropertyValue::EString, |
3556 CXnDomPropertyValue::EString, |
3557 XnPropertyNames::action::trigger::name::KSwipe ); |
3557 XnPropertyNames::action::trigger::name::KSwipe ); |
3558 |
3558 |
3559 CXnProperty* name = CXnProperty::NewL( |
3559 CXnProperty* name = CXnProperty::NewL( |
3560 XnPropertyNames::action::trigger::KName, |
3560 XnPropertyNames::action::trigger::KName, |
3561 nameValue, sp ); |
3561 nameValue, *sp ); |
3562 |
3562 |
3563 CleanupStack::Pop( nameValue ); |
3563 CleanupStack::Pop( nameValue ); |
3564 CleanupStack::PushL( name ); |
3564 CleanupStack::PushL( name ); |
3565 |
3565 |
3566 node->SetPropertyL( name ); |
3566 node->SetPropertyL( name ); |
3571 |
3571 |
3572 reasonValue->SetStringValueL( CXnDomPropertyValue::EString, aDirection ); |
3572 reasonValue->SetStringValueL( CXnDomPropertyValue::EString, aDirection ); |
3573 |
3573 |
3574 CXnProperty* reason = CXnProperty::NewL( |
3574 CXnProperty* reason = CXnProperty::NewL( |
3575 XnPropertyNames::action::trigger::name::swipe::KDirection, |
3575 XnPropertyNames::action::trigger::name::swipe::KDirection, |
3576 reasonValue, sp ); |
3576 reasonValue, *sp ); |
3577 |
3577 |
3578 CleanupStack::Pop( reasonValue ); |
3578 CleanupStack::Pop( reasonValue ); |
3579 |
3579 |
3580 CleanupStack::PushL( reason ); |
3580 CleanupStack::PushL( reason ); |
3581 node->SetPropertyL( reason ); |
3581 node->SetPropertyL( reason ); |
4037 } |
4037 } |
4038 else if ( ( node->MarginRect().Contains( event.iPosition ) && |
4038 else if ( ( node->MarginRect().Contains( event.iPosition ) && |
4039 node->IsStateSet( XnPropertyNames::style::common::KFocus ) && |
4039 node->IsStateSet( XnPropertyNames::style::common::KFocus ) && |
4040 node->IsStateSet( XnPropertyNames::style::common::KPressedDown ) ) ) |
4040 node->IsStateSet( XnPropertyNames::style::common::KPressedDown ) ) ) |
4041 { |
4041 { |
|
4042 #ifdef RD_TACTILE_FEEDBACK |
|
4043 MTouchFeedback* feedback( MTouchFeedback::Instance() ); |
|
4044 |
|
4045 if ( feedback ) |
|
4046 { |
|
4047 feedback->InstantFeedback( ETouchFeedbackBasic ); |
|
4048 } |
|
4049 #endif |
4042 node->SetStateL( XnPropertyNames::style::common::KActive ); |
4050 node->SetStateL( XnPropertyNames::style::common::KActive ); |
4043 } |
4051 } |
4044 } |
4052 } |
4045 |
4053 |
4046 // Remove focus |
4054 // Remove focus |