filemanager/App/src/CFileManagerContainerBase.cpp
branchRCL_3
changeset 42 f5c50b8af68c
parent 39 65326cf895ed
child 52 40fb776cbfb3
--- a/filemanager/App/src/CFileManagerContainerBase.cpp	Wed Sep 01 12:31:07 2010 +0100
+++ b/filemanager/App/src/CFileManagerContainerBase.cpp	Tue Sep 14 20:57:31 2010 +0300
@@ -59,6 +59,8 @@
         CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
     iListBox->SetObserver( this );
     iListBox->SetListBoxObserver( this );
+    iListBox->SetMarkingModeObserver( this );
+
     SetIndex( aFocusedIndex );
     iListBox->SetFocus( ETrue );
     iListBox->AddSelectionObserverL( this );
@@ -358,22 +360,29 @@
 // 
 // -----------------------------------------------------------------------------
 // 
-void CFileManagerContainerBase::ProcessCommandL( TInt aCommandId )
+void CFileManagerContainerBase::ProcessCommandL( TInt /* aCommandId */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::MarkingModeStatusChanged()
+//
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::MarkingModeStatusChanged( TBool aActivated )
     {
-    switch ( aCommandId )
-        {
-        case EAknSoftkeyShiftMSK:
-            {
-            static_cast< CAknAppUi* >( ControlEnv()->AppUi() )->
-                ProcessCommandL( EFileManagerToggleMark );
-            break;
-            }
-            
-        default:
-            {
-            break;
-            }
-        }
+    // Set flag to indicate marking model is activated or not
+    iMarkingModeActivated = aActivated;
+    }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::ExitMarkingMode()
+//
+// -----------------------------------------------------------------------------
+//
+TBool CFileManagerContainerBase::ExitMarkingMode() const
+    {
+    return iAllowMarkingModeExit;
     }
 
 // -----------------------------------------------------------------------------
@@ -407,6 +416,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// CFileManagerContainerBase::IsMarkingModeActivated
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CFileManagerContainerBase::IsMarkingModeActivated() const
+    {
+    return iMarkingModeActivated;
+    }
+// -----------------------------------------------------------------------------
 // CFileManagerContainerBase::UpdateCba
 // 
 // -----------------------------------------------------------------------------
@@ -588,4 +606,25 @@
     {
     return 0;
     }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::AllowMarkingModeExit
+// 
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::AllowMarkingModeExit( TBool aAllowExit )
+    {
+    iAllowMarkingModeExit = aAllowExit;
+    }
+
+// -----------------------------------------------------------------------------
+// CFileManagerContainerBase::SetMarkingMode
+// 
+// -----------------------------------------------------------------------------
+//
+void CFileManagerContainerBase::SetMarkingMode( TBool aEnable )
+    {
+    iListBox->SetMarkingMode( aEnable );
+    }
+
 //  End of File