phoneuis/easydialing/inc/easydialinglistbox.h
branchRCL_3
changeset 19 544e34b3255a
parent 9 8871b09be73b
child 39 b8d67d6176f5
equal deleted inserted replaced
17:38529f706030 19:544e34b3255a
    29 // CONSTANTS
    29 // CONSTANTS
    30 
    30 
    31 // Easy dialing specific listbox events
    31 // Easy dialing specific listbox events
    32 const TInt KEasyDialingContactSelected( 0x1001 );
    32 const TInt KEasyDialingContactSelected( 0x1001 );
    33 const TInt KEasyDialingContactLongTapped( 0x1002 );
    33 const TInt KEasyDialingContactLongTapped( 0x1002 );
       
    34 const TInt KEasyDialingScrollingStarted( 0x1003 );
       
    35 const TInt KEasyDialingScrollingStopped( 0x1004 );
    34 
    36 
    35 // FORWARD DECLARATIONS
    37 // FORWARD DECLARATIONS
    36 
    38 
    37 class CEasyDialingListBoxItemDrawer;
    39 class CEasyDialingListBoxItemDrawer;
    38 class CAknsFrameBackgroundControlContext;
    40 class CAknsFrameBackgroundControlContext;
    50  * ==============================================================================
    52  * ==============================================================================
    51  */
    53  */
    52 
    54 
    53 class CEasyDialingListBox : public CEikFormattedCellListBox, 
    55 class CEasyDialingListBox : public CEikFormattedCellListBox, 
    54                             public MAknLongTapDetectorCallBack
    56                             public MAknLongTapDetectorCallBack
    55     {   
    57     {
    56 public:
    58 public:
    57     
    59     
    58     /**
    60     /**
    59     * Constructor.
    61     * Constructor.
    60     */
    62     */
    70     * @param    aFlags  Listbox flags.
    72     * @param    aFlags  Listbox flags.
    71     * @param    aContactDataManager Pointer to contact data manager
    73     * @param    aContactDataManager Pointer to contact data manager
    72     */
    74     */
    73     void ConstructL( TInt aFlags, 
    75     void ConstructL( TInt aFlags, 
    74             CEasyDialingContactDataManager* aContactDataManager );
    76             CEasyDialingContactDataManager* aContactDataManager );
    75 
    77     
    76     /**
    78     /**
    77     * From CEikFormattedCellListBox.
    79     * From CEikFormattedCellListBox.
    78     */
    80     */
    79     virtual CListBoxView* MakeViewClassInstanceL();
    81     virtual CListBoxView* MakeViewClassInstanceL();
    80     
    82     
    84     CEasyDialingListBoxItemDrawer* ItemDrawer() const;
    86     CEasyDialingListBoxItemDrawer* ItemDrawer() const;
    85     
    87     
    86     /**
    88     /**
    87     * From CEikFormattedCellListBox.
    89     * From CEikFormattedCellListBox.
    88     */
    90     */
    89     void Draw(const TRect& aRect) const;
    91     void Draw( const TRect& aRect ) const;
    90     
    92     
    91     /**
    93     /**
    92     * From CEikFormattedCellListBox.
    94     * From CEikFormattedCellListBox.
    93     */
    95     */
    94     void HandleResourceChange(TInt aType);
    96     void HandleResourceChange( TInt aType );
       
    97     
       
    98     /**
       
    99     * From CEikFormattedCellListBox.
       
   100     */
       
   101     void HandleScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType );
    95     
   102     
    96     /**
   103     /**
    97     * From CCoeControl
   104     * From CCoeControl
    98     */
   105     */
    99     void MakeVisible(TBool aVisible);
   106     void MakeVisible( TBool aVisible );
   100     
   107     
   101     /**
   108     /**
   102     * From CCoeControl
   109     * From CCoeControl
   103     */
   110     */
   104     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
   111     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
   105     
   112     
   106     /**
   113     /**
   107      * The the rectangle within which the listbox must always fit.
   114      * The the rectangle within which the listbox must always fit.
   108      * @param   aMaxRect   The largest allowed rect size, given in
   115      * @param   aMaxRect   The largest allowed rect size, given in
   109 	 *                     screen relative coordinate system.
   116      *                     screen relative coordinate system.
   110      */
   117      */
   111     void SetMaxRect( TRect aMaxRect );
   118     void SetMaxRect( TRect aMaxRect );
   112     
   119     
   113     /**
   120     /**
   114      * Adjusts the control rect according to amount of visible contacts. 
   121      * Adjusts the control rect according to amount of visible contacts. 
   123      * @param   aKeyEvent   key event
   130      * @param   aKeyEvent   key event
   124      * @param   aType       key event type
   131      * @param   aType       key event type
   125      * @return  Whether the key was handled or not.
   132      * @return  Whether the key was handled or not.
   126      */
   133      */
   127     TKeyResponse SetFocusedWithKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
   134     TKeyResponse SetFocusedWithKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
   128 
       
   129     
   135     
   130     /**
   136     /**
   131     * Gets the height of the listbox based on the number of items.
   137     * Gets the height of the listbox based on the number of items.
   132     * @param    aNum    Number of items.
   138     * @param    aNum    Number of items.
   133     */
   139     */
   156 protected:
   162 protected:
   157     
   163     
   158     /**
   164     /**
   159     * From CEikFormattedCellListBox.
   165     * From CEikFormattedCellListBox.
   160     */
   166     */
   161     virtual void FocusChanged(TDrawNow aDrawNow);
   167     virtual void FocusChanged( TDrawNow aDrawNow );
   162         
   168         
   163     /**
   169     /**
   164     * From CEikFormattedCellListBox.
   170     * From CEikFormattedCellListBox.
   165     */
   171     */
   166     virtual void CreateItemDrawerL();
   172     virtual void CreateItemDrawerL();
   171     virtual void SizeChanged();
   177     virtual void SizeChanged();
   172         
   178         
   173     /**
   179     /**
   174     * From CCoeControl
   180     * From CCoeControl
   175     */
   181     */
   176     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   182     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
   177     
   183     
   178 private:
   184 private:
   179     
   185     
   180     /** Background control context. Owned. */
   186     /** Background control context. Owned. */
   181     CAknsFrameBackgroundControlContext* iBGContext;
   187     CAknsFrameBackgroundControlContext* iBGContext;
   193     CAknLongTapDetector* iLongTapDetector;
   199     CAknLongTapDetector* iLongTapDetector;
   194     
   200     
   195     /** Flag set when long pointer press has been handled after latest pointer down event.*/
   201     /** Flag set when long pointer press has been handled after latest pointer down event.*/
   196     TBool iPointerLongPressHandled;	
   202     TBool iPointerLongPressHandled;	
   197     };
   203     };
   198     
   204 
   199 #endif // _EASYDIALINGLISTBOX_H
   205 #endif // _EASYDIALINGLISTBOX_H
   200 
       
   201 
       
   202