25 #include "xnnode.h" |
25 #include "xnnode.h" |
26 #include "xnpropertylist.h" |
26 #include "xnpropertylist.h" |
27 #include "xnproperty.h" |
27 #include "xnproperty.h" |
28 #include "xnuiengine.h" |
28 #include "xnuiengine.h" |
29 #include "xnappuiadapter.h" |
29 #include "xnappuiadapter.h" |
30 #include "xnkeyeventdispatcher.h" |
|
31 #include "xncontroladapter.h" |
30 #include "xncontroladapter.h" |
32 #include "xnpopupcontroladapter.h" |
31 #include "xnpopupcontroladapter.h" |
33 #include "xnmenuadapter.h" |
32 #include "xnmenuadapter.h" |
34 #include "xndomlist.h" |
33 #include "xndomlist.h" |
35 #include "xndomdocument.h" |
34 #include "xndomdocument.h" |
50 #include "xnpanic.h" |
49 #include "xnpanic.h" |
51 #include "xnlistquerydialogadapter.h" |
50 #include "xnlistquerydialogadapter.h" |
52 #include "xneffectmanager.h" |
51 #include "xneffectmanager.h" |
53 #include "xnviewadapter.h" |
52 #include "xnviewadapter.h" |
54 #include "xnbackgroundmanager.h" |
53 #include "xnbackgroundmanager.h" |
|
54 #include "xntexteditor.h" |
55 #include "xnitemactivator.h" |
55 #include "xnitemactivator.h" |
56 |
56 |
57 // Local constants |
57 // Local constants |
58 _LIT8( KId, "id" ); |
58 _LIT8( KId, "id" ); |
59 _LIT8( KName, "name" ); |
59 _LIT8( KName, "name" ); |
335 static CXnNode* FindNextNodeFromRightL( |
335 static CXnNode* FindNextNodeFromRightL( |
336 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
336 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
337 static CXnNode* FindNextNodeFromLeftL( |
337 static CXnNode* FindNextNodeFromLeftL( |
338 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
338 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
339 static CXnNode* FindNextNodeFromBelowL( |
339 static CXnNode* FindNextNodeFromBelowL( |
340 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
340 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse ); |
341 static CXnNode* FindNextNodeFromAboveL( |
341 static CXnNode* FindNextNodeFromAboveL( |
342 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse, CXnUiEngine* aEngine = NULL ); |
342 RPointerArray< CXnNode >& aArray, CXnNode& aNode, TBool stayInNamespace = EFalse ); |
343 static CXnNode* FindPluginNode( CXnNode& aNode ); |
343 static CXnNode* FindPluginNode( CXnNode& aNode ); |
344 static TBool IsPluginNode( CXnNode& aNode ); |
|
345 static TBool DoInternalFocusChangeL( |
344 static TBool DoInternalFocusChangeL( |
346 CXnUiEngine& aEngine, CXnNode& aNode, const TKeyEvent& aKeyEvent, |
345 CXnUiEngine& aEngine, CXnNode& aNode, const TKeyEvent& aKeyEvent, |
347 TEventCode aType ); |
346 TEventCode aType ); |
348 static TBool DoTriggerKeyEventL( |
347 static TBool DoTriggerKeyEventL( |
349 CXnNodeImpl* aThis, CXnUiEngine& aEngine, CXnNode& aNode, |
348 CXnNodeImpl* aThis, CXnUiEngine& aEngine, CXnNode& aNode, |
2934 if( !editorNode && aLayoutNode.Type()->Type() == KTextEditor ) |
2933 if( !editorNode && aLayoutNode.Type()->Type() == KTextEditor ) |
2935 { |
2934 { |
2936 editorNode = &aLayoutNode; |
2935 editorNode = &aLayoutNode; |
2937 } |
2936 } |
2938 |
2937 |
2939 if ( editorNode ) |
2938 if( editorNode ) |
2940 { |
2939 { |
2941 CXnKeyEventDispatcher* eventDispatcher( |
2940 XnTextEditorInterface::MXnTextEditorInterface* editorControl = NULL; |
2942 aEngine.AppUiAdapter().ViewAdapter().EventDispatcher() ); |
|
2943 |
2941 |
2944 if ( eventDispatcher ) |
2942 XnComponentInterface::MakeInterfaceL( editorControl, editorNode->AppIfL() ); |
2945 { |
2943 if( editorControl ) |
2946 if ( aActivate ) |
2944 { |
2947 { |
2945 if( aActivate ) |
2948 eventDispatcher->SetTextEditorActive( editorNode, ETrue ); |
2946 { |
|
2947 editorControl->HandleEditorEvent(CXnTextEditor::KActivateTextEditor); |
2949 } |
2948 } |
2950 else |
2949 else |
2951 { |
2950 { |
2952 eventDispatcher->SetTextEditorActive( NULL, EFalse ); |
2951 editorControl->HandleEditorEvent(CXnTextEditor::KDeactivateTextEditor); |
2953 } |
2952 } |
2954 } |
2953 } |
2955 } |
2954 } |
2956 } |
2955 } |
2957 |
2956 |
2958 // ----------------------------------------------------------------------------- |
2957 // ----------------------------------------------------------------------------- |
2959 // RunEditL |
2958 // RunEditL |
3055 |
3054 |
3056 TBool useEmpty( view->UseEmptyWidget() ); |
3055 TBool useEmpty( view->UseEmptyWidget() ); |
3057 |
3056 |
3058 for ( TInt i = 0; i < plugins.Count(); i++ ) |
3057 for ( TInt i = 0; i < plugins.Count(); i++ ) |
3059 { |
3058 { |
3060 CXnNode* node( plugins[i]->Owner()->LayoutNode() ); |
3059 CXnNode* node( plugins[i]->Owner()->LayoutNode() ); |
3061 TBool editable = plugins[i]->Editable(); |
|
3062 |
|
3063 if( editable ) |
|
3064 { |
|
3065 node->SetStateL( XnPropertyNames::style::common::KEdit ); |
|
3066 } |
|
3067 |
3060 |
|
3061 node->SetStateL( XnPropertyNames::style::common::KEdit ); |
|
3062 |
3068 if ( !plugins[i]->Occupied() && useEmpty ) |
3063 if ( !plugins[i]->Occupied() && useEmpty ) |
3069 { |
3064 { |
3070 // Make empty space visible |
3065 // Make empty space visible |
3071 SetStringPropertyToNodeL( *sp, *node, |
3066 SetStringPropertyToNodeL( *sp, *node, |
3072 XnPropertyNames::style::common::KVisibility, |
3067 XnPropertyNames::style::common::KVisibility, |
3073 XnPropertyNames::style::common::visibility::KVisible ); |
3068 XnPropertyNames::style::common::visibility::KVisible ); |
3074 } |
3069 } |
3075 } |
3070 } |
3076 |
3071 |
3077 aEngine.EditMode()->SetEditModeL( CXnEditMode::EDragAndDrop ); |
3072 aEngine.EditMode()->SetEditModeL( CXnEditMode::EDragAndDrop ); |
3078 aEngine.AppUiAdapter().ViewAdapter().CloseAllPopupsL(); |
3073 aEngine.AppUiAdapter().ViewAdapter().CloseAllPopupsL(); |
3079 |
3074 |
4783 RPointerArray< CXnNode >& aArray, |
4778 RPointerArray< CXnNode >& aArray, |
4784 CXnNode& aNode, |
4779 CXnNode& aNode, |
4785 TBool stayInNamespace, |
4780 TBool stayInNamespace, |
4786 CXnUiEngine* aEngine ) |
4781 CXnUiEngine* aEngine ) |
4787 { |
4782 { |
|
4783 |
4788 CXnNode* nextNode = NULL; |
4784 CXnNode* nextNode = NULL; |
4789 TRect rect = aNode.PaddingRect(); |
4785 TRect rect = aNode.PaddingRect(); |
4790 |
4786 |
4791 for ( TInt i = 0; i < aArray.Count(); ++i ) |
4787 for ( TInt i = 0; i < aArray.Count(); ++i ) |
4792 { |
4788 { |
4933 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
4921 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
4934 { |
4922 { |
4935 // do not shift focus to another view |
4923 // do not shift focus to another view |
4936 continue; |
4924 continue; |
4937 } |
4925 } |
4938 if( aEngine->IsEditMode() ) |
|
4939 { |
|
4940 if( !IsPluginNode( *tmpNode ) ) |
|
4941 { |
|
4942 // move only between "plugin" nodes in edit mode |
|
4943 continue; |
|
4944 } |
|
4945 } |
|
4946 |
4926 |
4947 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
4927 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
4948 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
4928 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
4949 |
4929 |
4950 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
4930 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5055 CXnNode* candidateBelow = NULL; |
5035 CXnNode* candidateBelow = NULL; |
5056 |
5036 |
5057 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5037 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5058 { |
5038 { |
5059 CXnNode* tmpNode = aArray[i]; |
5039 CXnNode* tmpNode = aArray[i]; |
5060 |
|
5061 if ( !IsNodeNavigableL( *tmpNode ) ) |
5040 if ( !IsNodeNavigableL( *tmpNode ) ) |
5062 { |
5041 { |
5063 continue; |
5042 continue; |
5064 } |
5043 } |
5065 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5044 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5066 { |
5045 { |
5067 // do not shift focus to another view |
5046 // do not shift focus to another view |
5068 continue; |
5047 continue; |
5069 } |
5048 } |
5070 if( aEngine->IsEditMode() ) |
|
5071 { |
|
5072 if( !IsPluginNode( *tmpNode ) ) |
|
5073 { |
|
5074 // move only between "plugin" nodes in edit mode |
|
5075 continue; |
|
5076 } |
|
5077 } |
|
5078 |
5049 |
5079 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5050 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5080 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5051 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5081 |
5052 |
5082 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5053 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5388 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5351 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5389 { |
5352 { |
5390 // do not shift focus to another view |
5353 // do not shift focus to another view |
5391 continue; |
5354 continue; |
5392 } |
5355 } |
5393 if( aEngine->IsEditMode() ) |
|
5394 { |
|
5395 if( !IsPluginNode( *tmpNode ) ) |
|
5396 { |
|
5397 // move only between "plugin" nodes in edit mode |
|
5398 continue; |
|
5399 } |
|
5400 } |
|
5401 |
5356 |
5402 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5357 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5403 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5358 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5404 |
5359 |
5405 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5360 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5513 CXnNode* candidateBelow = NULL; |
5468 CXnNode* candidateBelow = NULL; |
5514 |
5469 |
5515 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5470 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5516 { |
5471 { |
5517 CXnNode* tmpNode = aArray[i]; |
5472 CXnNode* tmpNode = aArray[i]; |
5518 |
5473 /* |
|
5474 if ( tmpNode == &aNode ) |
|
5475 { |
|
5476 continue; |
|
5477 } |
|
5478 */ |
5519 if ( !IsNodeNavigableL( *tmpNode ) ) |
5479 if ( !IsNodeNavigableL( *tmpNode ) ) |
5520 { |
5480 { |
5521 continue; |
5481 continue; |
5522 } |
5482 } |
5523 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5483 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5524 { |
5484 { |
5525 // do not shift focus to another view |
5485 // do not shift focus to another view |
5526 continue; |
5486 continue; |
5527 } |
5487 } |
5528 if( aEngine->IsEditMode() ) |
|
5529 { |
|
5530 if( !IsPluginNode( *tmpNode ) ) |
|
5531 { |
|
5532 // move only between "plugin" nodes in edit mode |
|
5533 continue; |
|
5534 } |
|
5535 } |
|
5536 |
5488 |
5537 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5489 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5538 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5490 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5539 |
5491 |
5540 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5492 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5695 // FindNextNodeFromBelowL |
5647 // FindNextNodeFromBelowL |
5696 // ----------------------------------------------------------------------------- |
5648 // ----------------------------------------------------------------------------- |
5697 // |
5649 // |
5698 static CXnNode* FindNextNodeFromBelowL( |
5650 static CXnNode* FindNextNodeFromBelowL( |
5699 RPointerArray< CXnNode >& aArray, |
5651 RPointerArray< CXnNode >& aArray, |
5700 CXnNode& aNode, TBool stayInNamespace, |
5652 CXnNode& aNode, TBool stayInNamespace ) |
5701 CXnUiEngine* aEngine ) |
|
5702 { |
5653 { |
5703 CXnNode* nextNode = NULL; |
5654 CXnNode* nextNode = NULL; |
5704 TRect rect = aNode.PaddingRect(); |
5655 TRect rect = aNode.PaddingRect(); |
5705 |
5656 |
5706 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5657 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5809 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5752 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5810 { |
5753 { |
5811 // do not shift focus to another view |
5754 // do not shift focus to another view |
5812 continue; |
5755 continue; |
5813 } |
5756 } |
5814 if( aEngine->IsEditMode() ) |
|
5815 { |
|
5816 if( !IsPluginNode( *tmpNode ) ) |
|
5817 { |
|
5818 // move only between "plugin" nodes in edit mode |
|
5819 continue; |
|
5820 } |
|
5821 } |
|
5822 |
5757 |
5823 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5758 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5824 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5759 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5825 |
5760 |
5826 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5761 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5888 // FindNextNodeFromAboveL |
5823 // FindNextNodeFromAboveL |
5889 // ----------------------------------------------------------------------------- |
5824 // ----------------------------------------------------------------------------- |
5890 // |
5825 // |
5891 static CXnNode* FindNextNodeFromAboveL( |
5826 static CXnNode* FindNextNodeFromAboveL( |
5892 RPointerArray< CXnNode >& aArray, |
5827 RPointerArray< CXnNode >& aArray, |
5893 CXnNode& aNode, TBool stayInNamespace, |
5828 CXnNode& aNode, TBool stayInNamespace ) |
5894 CXnUiEngine* aEngine ) |
|
5895 { |
5829 { |
5896 CXnNode* nextNode = NULL; |
5830 CXnNode* nextNode = NULL; |
5897 TRect rect = aNode.PaddingRect(); |
5831 TRect rect = aNode.PaddingRect(); |
5898 |
5832 |
5899 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5833 for ( TInt i = 0; i < aArray.Count(); ++i ) |
5910 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5844 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5911 { |
5845 { |
5912 // do not shift focus to another view |
5846 // do not shift focus to another view |
5913 continue; |
5847 continue; |
5914 } |
5848 } |
5915 if( aEngine->IsEditMode() ) |
|
5916 { |
|
5917 if( !IsPluginNode( *tmpNode ) ) |
|
5918 { |
|
5919 // move only between "plugin" nodes in edit mode |
|
5920 continue; |
|
5921 } |
|
5922 } |
|
5923 |
5849 |
5924 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5850 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5925 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5851 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5926 |
5852 |
5927 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5853 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
6001 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
5927 if ( tmpNode->FindViewNode() != tmpNode->UiEngine()->ActiveView() ) |
6002 { |
5928 { |
6003 // do not shift focus to another view |
5929 // do not shift focus to another view |
6004 continue; |
5930 continue; |
6005 } |
5931 } |
6006 if( aEngine->IsEditMode() ) |
|
6007 { |
|
6008 if( !IsPluginNode( *tmpNode ) ) |
|
6009 { |
|
6010 // move only between "plugin" nodes in edit mode |
|
6011 continue; |
|
6012 } |
|
6013 } |
|
6014 |
5932 |
6015 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
5933 const TDesC8& tmpNamespace = tmpNode->Impl()->Namespace(); |
6016 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
5934 const TDesC8& nodeNamespace = aNode.Impl()->Namespace(); |
6017 |
5935 |
6018 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
5936 if ( stayInNamespace && tmpNamespace != nodeNamespace ) |
6099 |
6017 |
6100 return pluginNode; |
6018 return pluginNode; |
6101 } |
6019 } |
6102 |
6020 |
6103 // ----------------------------------------------------------------------------- |
6021 // ----------------------------------------------------------------------------- |
6104 // IsPluginNode |
|
6105 // ----------------------------------------------------------------------------- |
|
6106 // |
|
6107 static TBool IsPluginNode( CXnNode& aNode ) |
|
6108 { |
|
6109 TBool ret = EFalse; |
|
6110 |
|
6111 const TDesC8& nodeType = aNode.DomNode()->Name(); |
|
6112 if( nodeType == KPlugin ) |
|
6113 { |
|
6114 ret = ETrue; |
|
6115 } |
|
6116 |
|
6117 return ret; |
|
6118 } |
|
6119 |
|
6120 // ----------------------------------------------------------------------------- |
|
6121 // DoInternalFocusChangeL |
6022 // DoInternalFocusChangeL |
6122 // ----------------------------------------------------------------------------- |
6023 // ----------------------------------------------------------------------------- |
6123 // |
6024 // |
6124 static TBool DoInternalFocusChangeL( CXnUiEngine& aEngine, |
6025 static TBool DoInternalFocusChangeL( CXnUiEngine& aEngine, |
6125 CXnNode& aNode, const TKeyEvent& aKeyEvent, TEventCode aType ) |
6026 CXnNode& aNode, const TKeyEvent& aKeyEvent, TEventCode aType ) |
6147 |
6048 |
6148 // Handle 'appearance' navigation first, if the current node has |
6049 // Handle 'appearance' navigation first, if the current node has |
6149 // "nav-index: appearance"... |
6050 // "nav-index: appearance"... |
6150 CXnProperty* navind = aNode.NavIndexL(); |
6051 CXnProperty* navind = aNode.NavIndexL(); |
6151 if ( navind && navind->StringValue() == XnPropertyNames::style::common::KAppearance ) |
6052 if ( navind && navind->StringValue() == XnPropertyNames::style::common::KAppearance ) |
6152 { |
6053 { |
6153 CXnAppUiAdapter& appui( aEngine.AppUiAdapter() ); |
|
6154 |
6054 |
6155 CXnPluginData* plugin( appui.ViewManager().ActiveViewData().Plugin( &aNode ) ); |
6055 CXnAppUiAdapter& appui = static_cast< CXnAppUiAdapter& >( *iAvkonAppUi ); |
6156 |
6056 CXnPluginData* plugin( |
|
6057 appui.ViewManager().ActiveViewData().Plugin( &aNode ) ); |
|
6058 |
6157 // find if node is in a widget that contatins some opened popup window |
6059 // find if node is in a widget that contatins some opened popup window |
6158 TBool containsPopUp = ( plugin ? plugin->IsDisplayingPopup() : EFalse ); |
6060 TBool containsPopUp = ( plugin ? plugin->IsDisplayingPopup() : EFalse ); |
6159 |
6061 |
6160 CXnNode* nextNode( NULL ); |
6062 CXnNode* nextNode( NULL ); |
6161 RPointerArray< CXnNode >& array = aEngine.ViewManager()->AppearanceNodes(); |
6063 RPointerArray< CXnNode >& array = aEngine.ViewManager()->AppearanceNodes(); |
6162 if ( aKeyEvent.iScanCode == EStdKeyDownArrow ) |
6064 if ( aKeyEvent.iScanCode == EStdKeyDownArrow ) |
6163 { |
6065 { |
6164 nextNode = FindNextNodeFromBelowL( array, aNode, containsPopUp, &aEngine ); |
6066 nextNode = FindNextNodeFromBelowL( array, aNode, containsPopUp ); |
6165 } |
6067 } |
6166 else if ( aKeyEvent.iScanCode == EStdKeyUpArrow ) |
6068 else if ( aKeyEvent.iScanCode == EStdKeyUpArrow ) |
6167 { |
6069 { |
6168 nextNode = FindNextNodeFromAboveL( array, aNode, containsPopUp, &aEngine ); |
6070 nextNode = FindNextNodeFromAboveL( array, aNode, containsPopUp ); |
6169 } |
6071 } |
6170 else if ( aKeyEvent.iScanCode == EStdKeyRightArrow ) |
6072 else if ( aKeyEvent.iScanCode == EStdKeyRightArrow ) |
6171 { |
6073 { |
6172 nextNode = FindNextNodeFromRightL( array, aNode, containsPopUp, &aEngine ); |
6074 nextNode = FindNextNodeFromRightL( array, aNode, containsPopUp, &aEngine ); |
6173 } |
6075 } |
6174 else if ( aKeyEvent.iScanCode == EStdKeyLeftArrow ) |
6076 else if ( aKeyEvent.iScanCode == EStdKeyLeftArrow ) |
6175 { |
6077 { |
6176 nextNode = FindNextNodeFromLeftL( array, aNode, containsPopUp, &aEngine ); |
6078 nextNode = FindNextNodeFromLeftL( array, aNode, containsPopUp, &aEngine ); |
6177 } |
6079 } |
6178 if ( nextNode ) |
6080 if ( nextNode ) |
6179 { |
6081 { |
|
6082 // focus plugin node if in edit mode |
|
6083 if( aEngine.IsEditMode() ) |
|
6084 { |
|
6085 if( nextNode->Type()->Type() != KPlugin ) |
|
6086 { |
|
6087 CXnNode* pluginNode = FindPluginNode( *nextNode ); |
|
6088 if( pluginNode ) |
|
6089 { |
|
6090 nextNode = pluginNode; |
|
6091 } |
|
6092 } |
|
6093 } |
|
6094 |
6180 if( nextNode && nextNode->ScrollableControl() ) |
6095 if( nextNode && nextNode->ScrollableControl() ) |
6181 { |
6096 { |
6182 nextNode->ScrollableControl()->ShowItem( *nextNode ); |
6097 nextNode->ScrollableControl()->ShowItem( *nextNode ); |
6183 } |
6098 } |
6184 |
|
6185 nextNode->SetStateL( XnPropertyNames::style::common::KFocus ); |
6099 nextNode->SetStateL( XnPropertyNames::style::common::KFocus ); |
6186 return ETrue; |
6100 return ETrue; |
6187 } |
6101 } |
6188 } |
6102 } |
6189 else |
6103 else |
7976 control->SetBlank( EFalse ); |
7890 control->SetBlank( EFalse ); |
7977 |
7891 |
7978 if ( iDropped || !displayed ) |
7892 if ( iDropped || !displayed ) |
7979 { |
7893 { |
7980 // Need to check blank here |
7894 // Need to check blank here |
7981 CXnProperty* prop( VisibilityL() ); |
7895 CXnProperty* visibility( VisibilityL() ); |
7982 |
7896 CXnProperty* display( DisplayL() ); |
7983 if ( prop && prop->StringValue() == |
7897 |
7984 XnPropertyNames::style::common::visibility::KBlank ) |
7898 if ( visibility && visibility->StringValue() == |
|
7899 XnPropertyNames::style::common::visibility::KBlank && |
|
7900 ( !display || display->StringValue() |
|
7901 == XnPropertyNames::style::common::display::KBlock ) ) |
7985 { |
7902 { |
7986 control->SetBlank( ETrue ); |
7903 control->SetBlank( ETrue ); |
7987 control->MakeVisible( EFalse ); |
7904 control->MakeVisible( EFalse ); |
7988 control->SetComponentsToInheritVisibility( EFalse ); |
7905 control->SetComponentsToInheritVisibility( EFalse ); |
7989 control->MakeVisible( ETrue ); |
7906 control->MakeVisible( ETrue ); |
8040 // ----------------------------------------------------------------------------- |
7957 // ----------------------------------------------------------------------------- |
8041 // CXnNodeImpl::SetLaidOutL |
7958 // CXnNodeImpl::SetLaidOutL |
8042 // ----------------------------------------------------------------------------- |
7959 // ----------------------------------------------------------------------------- |
8043 // |
7960 // |
8044 void CXnNodeImpl::SetLaidOutL() |
7961 void CXnNodeImpl::SetLaidOutL() |
8045 { |
7962 { |
8046 if ( !iLayoutCapable || iDropped || !IsNodeDisplayedL( *iNode ) ) |
7963 if ( !iLayoutCapable ) |
8047 { |
7964 { |
8048 iLaidOut = EFalse; |
7965 return; |
8049 } |
7966 } |
8050 else |
7967 |
8051 { |
7968 if ( iDropped || !IsNodeDisplayedL( *iNode ) ) |
8052 iLaidOut = ETrue; |
7969 { |
8053 } |
7970 return; |
|
7971 } |
|
7972 |
|
7973 iLaidOut = ETrue; |
8054 |
7974 |
8055 for ( TInt i = 0; i < iChildren.Count(); i++ ) |
7975 for ( TInt i = 0; i < iChildren.Count(); i++ ) |
8056 { |
7976 { |
8057 iChildren[i]->SetLaidOutL(); |
7977 iChildren[i]->SetLaidOutL(); |
8058 } |
7978 } |
9215 lockedNodes.Reset(); |
9135 lockedNodes.Reset(); |
9216 lockedNodeIndex.Reset(); |
9136 lockedNodeIndex.Reset(); |
9217 CleanupStack::PopAndDestroy( 2 ); // lockedNodes, lockedNodeIndex |
9137 CleanupStack::PopAndDestroy( 2 ); // lockedNodes, lockedNodeIndex |
9218 } |
9138 } |
9219 |
9139 |
9220 /* |
|
9221 // ----------------------------------------------------------------------------- |
9140 // ----------------------------------------------------------------------------- |
9222 // CXnNodeImpl::FindNextNodeL |
9141 // CXnNodeImpl::FindNextNodeL |
9223 // ----------------------------------------------------------------------------- |
9142 // ----------------------------------------------------------------------------- |
9224 // |
9143 // |
9225 CXnNode* CXnNodeImpl::FindNextNodeL( |
9144 CXnNode* CXnNodeImpl::FindNextNodeL( |