phonebookui/Phonebook2/UIControls/inc/CPbk2NamesListHiddenState.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phonebook 2 names list not ready state.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2NAMESLISTHIDDENSTATE_H
       
    20 #define CPBK2NAMESLISTHIDDENSTATE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include "MPbk2NamesListState.h"
       
    25 
       
    26 // CLASS DECLARATIONß
       
    27 
       
    28 /**
       
    29  * Phonebook 2 names list not ready state.
       
    30  */
       
    31 NONSHARABLE_CLASS(CPbk2NamesListHiddenState) :
       
    32         public CBase,
       
    33         public MPbk2NamesListState
       
    34     {
       
    35     public:  // Constructors and destructor
       
    36         /**
       
    37          * Creates a new instance of this class.
       
    38          *
       
    39          * @return  A new instance of this class.
       
    40          */
       
    41         static CPbk2NamesListHiddenState* NewLC();
       
    42 
       
    43         /**
       
    44          * Destructor.
       
    45          */
       
    46         ~CPbk2NamesListHiddenState();
       
    47 
       
    48     public: // From MPbk2NamesListState
       
    49         void ActivateStateL();
       
    50         void DeactivateState();
       
    51         TInt CountComponentControls() const;
       
    52         CCoeControl* ComponentControl(
       
    53                 TInt aIndex ) const;
       
    54         void SizeChanged();
       
    55         void MakeComponentsVisible(
       
    56                 TBool aVisible );
       
    57         void ActivateL();
       
    58         void Draw(
       
    59                 const TRect& aRect,
       
    60                 CWindowGc& aGc ) const;
       
    61         TKeyResponse OfferKeyEventL(
       
    62                 const TKeyEvent& aKeyEvent,
       
    63                 TEventCode aType );
       
    64         void HandlePointerEventL(
       
    65                 const TPointerEvent& aPointerEvent );
       
    66         TInt NamesListState() const;
       
    67         void HandleContactViewEventL(
       
    68                 TInt aEvent,
       
    69                 TInt aIndex );
       
    70         void HandleCommandEventL(TInt aEvent, TInt aListboxIndex);                
       
    71         CCoeControl& CoeControl();
       
    72         void HandleControlEventL(
       
    73                 CCoeControl* aControl,
       
    74                 MCoeControlObserver::TCoeEvent aEventType, TInt aParam );
       
    75         const MVPbkViewContact* TopContactL();
       
    76 
       
    77     public: // From MPbk2ContactUiControl
       
    78         MPbk2ContactUiControl* ParentControl() const;
       
    79         TInt NumberOfContacts() const;
       
    80         const MVPbkBaseContact* FocusedContactL() const;
       
    81         const MVPbkViewContact* FocusedViewContactL() const;
       
    82         const MVPbkStoreContact* FocusedStoreContact() const;
       
    83         void SetFocusedContactL(
       
    84                 const MVPbkBaseContact& aContact );
       
    85         void SetFocusedContactL(
       
    86                 const MVPbkContactBookmark& aContactBookmark );
       
    87         void SetFocusedContactL(
       
    88                 const MVPbkContactLink& aContactLink );
       
    89         TInt FocusedContactIndex() const;
       
    90         void SetFocusedContactIndexL(
       
    91                 TInt aIndex );
       
    92         TInt NumberOfContactFields() const;
       
    93         const MVPbkBaseContactField* FocusedField() const;
       
    94         TInt FocusedFieldIndex() const;
       
    95         void SetFocusedFieldIndex(
       
    96                 TInt aIndex );
       
    97         TBool ContactsMarked() const;
       
    98         MVPbkContactLinkArray* SelectedContactsL() const;
       
    99         MVPbkContactLinkArray* SelectedContactsOrFocusedContactL() const;
       
   100         MPbk2ContactLinkIterator* SelectedContactsIteratorL() const;
       
   101         CArrayPtr<MVPbkContactStore>* SelectedContactStoresL() const;
       
   102         void ClearMarks();
       
   103         void SetSelectedContactL(
       
   104                 TInt aIndex,
       
   105                 TBool aSelected );
       
   106         void SetSelectedContactL(
       
   107                 const MVPbkContactBookmark& aContactBookmark,
       
   108                 TBool aSelected );
       
   109         void SetSelectedContactL(
       
   110                 const MVPbkContactLink& aContactLink,
       
   111                 TBool aSelected );
       
   112         
       
   113         void DynInitMenuPaneL(
       
   114                 TInt aResourceId,
       
   115                 CEikMenuPane* aMenuPane ) const;
       
   116         void ProcessCommandL(
       
   117                 TInt aCommandId ) const;
       
   118         void UpdateAfterCommandExecution();
       
   119         TInt GetMenuFilteringFlagsL() const;
       
   120         CPbk2ViewState* ControlStateL() const;
       
   121         void RestoreControlStateL(
       
   122                 CPbk2ViewState* aState );
       
   123         const TDesC& FindTextL();
       
   124         void ResetFindL();
       
   125         void HideThumbnail();
       
   126         void ShowThumbnail();
       
   127         void SetBlank(
       
   128                 TBool aBlank );
       
   129         void RegisterCommand(
       
   130                 MPbk2Command* aCommand );
       
   131         void SetTextL(
       
   132                 const TDesC& aText );
       
   133         TAny* ContactUiControlExtension(TUid aExtensionUid );
       
   134                
       
   135     public: // From MPbk2ContactUiControl2 
       
   136         TInt CommandItemCount() const;
       
   137         const MPbk2UiControlCmdItem& CommandItemAt( TInt aIndex ) const;
       
   138         const MPbk2UiControlCmdItem* FocusedCommandItem() const;
       
   139         void DeleteCommandItemL( TInt aIndex );
       
   140         void AddCommandItemL(MPbk2UiControlCmdItem* aCommand, TInt aIndex);    
       
   141     
       
   142     public: // From MPbk2PointerEventInspector
       
   143         TBool FocusedItemPointed();
       
   144         TBool FocusableItemPointed();
       
   145         TBool SearchFieldPointed();
       
   146 
       
   147     
       
   148     public: // From MPbk2FilteredViewStackObserver
       
   149         void TopViewChangedL( MVPbkContactViewBase& aOldView );
       
   150         void TopViewUpdatedL();
       
   151         void BaseViewChangedL();
       
   152         void ViewStackError( TInt aError );
       
   153         void ContactAddedToBaseView(
       
   154                 MVPbkContactViewBase& aBaseView, TInt aIndex,
       
   155                 const MVPbkContactLink& aContactLink );        
       
   156 
       
   157     private: // Implementation
       
   158         CPbk2NamesListHiddenState();
       
   159 
       
   160     };
       
   161 
       
   162 #endif // CPBK2NAMESLISTHIDDENSTATE_H
       
   163 
       
   164 // End of File