7777 |
7779 |
7778 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
7780 nameValue->SetStringValueL( CXnDomPropertyValue::EString, aTriggerName ); |
7779 |
7781 |
7780 CXnProperty* name = CXnProperty::NewL( |
7782 CXnProperty* name = CXnProperty::NewL( |
7781 XnPropertyNames::action::trigger::KName, |
7783 XnPropertyNames::action::trigger::KName, |
7782 nameValue, aUiEngine.ODT()->DomDocument().StringPool() ); |
7784 nameValue, *aUiEngine.ODT()->DomDocument().StringPool() ); |
7783 |
7785 |
7784 CleanupStack::Pop( nameValue ); |
7786 CleanupStack::Pop( nameValue ); |
7785 |
7787 |
7786 CleanupStack::PushL( name ); |
7788 CleanupStack::PushL( name ); |
7787 |
7789 |
7836 // Build trigger node for screen device change event |
7838 // Build trigger node for screen device change event |
7837 // ----------------------------------------------------------------------------- |
7839 // ----------------------------------------------------------------------------- |
7838 // |
7840 // |
7839 static CXnNode* BuildScreenDeviceChangeTriggerNodeLC( CXnUiEngine& aUiEngine ) |
7841 static CXnNode* BuildScreenDeviceChangeTriggerNodeLC( CXnUiEngine& aUiEngine ) |
7840 { |
7842 { |
7841 CXnDomStringPool& sp( aUiEngine.ODT()->DomDocument().StringPool() ); |
7843 CXnDomStringPool* sp( aUiEngine.ODT()->DomDocument().StringPool() ); |
7842 |
7844 |
7843 CXnNode* node = CXnNode::NewL(); |
7845 CXnNode* node = CXnNode::NewL(); |
7844 CleanupStack::PushL( node ); |
7846 CleanupStack::PushL( node ); |
7845 |
7847 |
7846 CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger ); |
7848 CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger ); |
7857 |
7859 |
7858 nameValue->SetStringValueL( CXnDomPropertyValue::EString, |
7860 nameValue->SetStringValueL( CXnDomPropertyValue::EString, |
7859 XnPropertyNames::action::trigger::name::KScreenDeviceChange ); |
7861 XnPropertyNames::action::trigger::name::KScreenDeviceChange ); |
7860 |
7862 |
7861 CXnProperty* name = CXnProperty::NewL( |
7863 CXnProperty* name = CXnProperty::NewL( |
7862 XnPropertyNames::action::trigger::KName, nameValue, sp ); |
7864 XnPropertyNames::action::trigger::KName, nameValue, *sp ); |
7863 CleanupStack::Pop( nameValue ); |
7865 CleanupStack::Pop( nameValue ); |
7864 CleanupStack::PushL( name ); |
7866 CleanupStack::PushL( name ); |
7865 |
7867 |
7866 node->SetPropertyL( name ); |
7868 node->SetPropertyL( name ); |
7867 CleanupStack::Pop( name ); |
7869 CleanupStack::Pop( name ); |
9505 // ----------------------------------------------------------------------------- |
9513 // ----------------------------------------------------------------------------- |
9506 // |
9514 // |
9507 void CXnUiEngineImpl::PositionStylusPopupL( CXnNode& aNode, |
9515 void CXnUiEngineImpl::PositionStylusPopupL( CXnNode& aNode, |
9508 CXnNode& aReference, const TPoint& aPosition ) |
9516 CXnNode& aReference, const TPoint& aPosition ) |
9509 { |
9517 { |
9510 CXnDomStringPool& sp( aNode.DomNode()->StringPool() ); |
9518 CXnDomStringPool* sp( aNode.DomNode()->StringPool() ); |
9511 TXnDirtyRegion* dirtyRegion = FindDirtyRegionL( *iCurrentView ); |
9519 TXnDirtyRegion* dirtyRegion = FindDirtyRegionL( *iCurrentView ); |
9512 RRegion region; |
9520 RRegion region; |
9513 region.Copy( dirtyRegion->iRegion ); |
9521 region.Copy( dirtyRegion->iRegion ); |
9514 CleanupClosePushL( region ); |
9522 CleanupClosePushL( region ); |
9515 |
9523 |
9516 // Set initial position to (0, 0) to calculate popup metrics |
9524 // Set initial position to (0, 0) to calculate popup metrics |
9517 CXnProperty* top = CXnProperty::NewL( |
9525 CXnProperty* top = CXnProperty::NewL( |
9518 XnPropertyNames::style::common::KTop, 0, |
9526 XnPropertyNames::style::common::KTop, 0, |
9519 CXnDomPropertyValue::EPx, sp ); |
9527 CXnDomPropertyValue::EPx, *sp ); |
9520 CleanupStack::PushL( top ); |
9528 CleanupStack::PushL( top ); |
9521 aNode.SetPropertyL( top ); |
9529 aNode.SetPropertyL( top ); |
9522 CleanupStack::Pop( top ); |
9530 CleanupStack::Pop( top ); |
9523 top = NULL; |
9531 top = NULL; |
9524 CXnProperty* left = CXnProperty::NewL( |
9532 CXnProperty* left = CXnProperty::NewL( |
9525 XnPropertyNames::style::common::KLeft, 0, |
9533 XnPropertyNames::style::common::KLeft, 0, |
9526 CXnDomPropertyValue::EPx, sp ); |
9534 CXnDomPropertyValue::EPx, *sp ); |
9527 CleanupStack::PushL( left ); |
9535 CleanupStack::PushL( left ); |
9528 aNode.SetPropertyL( left ); |
9536 aNode.SetPropertyL( left ); |
9529 CleanupStack::Pop( left ); |
9537 CleanupStack::Pop( left ); |
9530 left = NULL; |
9538 left = NULL; |
9531 |
9539 |
9532 // Make it visible |
9540 // Make it visible |
9533 CXnProperty* display = CXnProperty::NewL( |
9541 CXnProperty* display = CXnProperty::NewL( |
9534 XnPropertyNames::style::common::KDisplay, |
9542 XnPropertyNames::style::common::KDisplay, |
9535 XnPropertyNames::style::common::display::KBlock, |
9543 XnPropertyNames::style::common::display::KBlock, |
9536 CXnDomPropertyValue::EString, sp ); |
9544 CXnDomPropertyValue::EString, *sp ); |
9537 CleanupStack::PushL( display ); |
9545 CleanupStack::PushL( display ); |
9538 aNode.SetPropertyL( display ); |
9546 aNode.SetPropertyL( display ); |
9539 CleanupStack::Pop( display ); |
9547 CleanupStack::Pop( display ); |
9540 |
9548 |
9541 if ( !aNode.IsLaidOut() || !aReference.IsLaidOut() ) |
9549 if ( !aNode.IsLaidOut() || !aReference.IsLaidOut() ) |
9715 } |
9723 } |
9716 |
9724 |
9717 // Set positions |
9725 // Set positions |
9718 top = CXnProperty::NewL( |
9726 top = CXnProperty::NewL( |
9719 XnPropertyNames::style::common::KTop, tl.iY, |
9727 XnPropertyNames::style::common::KTop, tl.iY, |
9720 CXnDomPropertyValue::EPx, sp ); |
9728 CXnDomPropertyValue::EPx, *sp ); |
9721 CleanupStack::PushL( top ); |
9729 CleanupStack::PushL( top ); |
9722 aNode.SetPropertyL( top ); |
9730 aNode.SetPropertyL( top ); |
9723 CleanupStack::Pop( top ); |
9731 CleanupStack::Pop( top ); |
9724 left = CXnProperty::NewL( |
9732 left = CXnProperty::NewL( |
9725 XnPropertyNames::style::common::KLeft, tl.iX, |
9733 XnPropertyNames::style::common::KLeft, tl.iX, |
9726 CXnDomPropertyValue::EPx, sp ); |
9734 CXnDomPropertyValue::EPx, *sp ); |
9727 CleanupStack::PushL( left ); |
9735 CleanupStack::PushL( left ); |
9728 aNode.SetPropertyL( left ); |
9736 aNode.SetPropertyL( left ); |
9729 CleanupStack::Pop( left ); |
9737 CleanupStack::Pop( left ); |
9730 |
9738 |
9731 // Copy stored region back |
9739 // Copy stored region back |