uifw/AvKon/inc/aknemptycontrol.h
changeset 0 2f259fa3e83a
child 5 aabf2c525e0f
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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:  A default dummy non-window owning control. Can be used to
       
    15 *                draw skinned background in in area where not other
       
    16 *                controls exists.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef C_AKNEMPTYCONTROL_H
       
    22 #define C_AKNEMPTYCONTROL_H
       
    23 
       
    24 #include <bacntf.h>
       
    25 #include <coecntrl.h>
       
    26 #include <AknControl.h>
       
    27 
       
    28 
       
    29 /**
       
    30 * Empty control that draws background with skinning.
       
    31 * This control also directs pointer events it receives to it's adjacent
       
    32 * status pane sub-pane to enhance the touch responsivity.
       
    33 * 
       
    34 * This class is not intended for further derivation.
       
    35 *
       
    36 * @since 3.1
       
    37 *
       
    38 * @internal Used by the UI Framework.
       
    39 */
       
    40 NONSHARABLE_CLASS( CAknEmptyControl ) : public CAknControl
       
    41 	{
       
    42 public:
       
    43 
       
    44     /**
       
    45     * Standard constructor.
       
    46     */
       
    47     CAknEmptyControl();
       
    48     
       
    49     /**
       
    50     * Destructor.
       
    51     */
       
    52     ~CAknEmptyControl();
       
    53         
       
    54     /** 
       
    55     * Constructs from resource.
       
    56     *
       
    57     * @param aReader resource reader.
       
    58     */
       
    59     void ConstructFromResourceL( TResourceReader& aReader );
       
    60     
       
    61 public: // From @c CCoeControl.
       
    62     
       
    63     /**
       
    64     * Handles pointer events
       
    65     *
       
    66     * @param aPointerEvent The pointer event.
       
    67     */
       
    68     virtual void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
    69 
       
    70 protected: // From @c CCoeControl.
       
    71 
       
    72     /**
       
    73     * Handles size change events.
       
    74     */
       
    75     void SizeChanged();
       
    76     
       
    77     /**
       
    78     * Handles a change to the control's resources of type aType
       
    79     * which are shared across the environment.
       
    80     * @param aType Event type.
       
    81     */
       
    82     void HandleResourceChange( TInt aType );
       
    83 
       
    84 private: // From @c CCoeControl.
       
    85 
       
    86     /**
       
    87     * Draws the control.
       
    88     */
       
    89     void Draw( const TRect& aRect ) const;
       
    90     
       
    91 private: // New methods.
       
    92     
       
    93     /**
       
    94     * Directs a pointer event received by this control to a pointer
       
    95     * responsive adjacent status pane sub-pane. In this method the
       
    96     * recipient of the pointer event is decided based on the layouts.
       
    97     *
       
    98     * @param aPointerEvent The pointer event.
       
    99     * 
       
   100     * @return  @c ETrue if the pointer event was passed on,
       
   101     *          @c EFalse otherwise.
       
   102     */
       
   103     TBool PassPointerEventToAdjacentControlL(
       
   104         const TPointerEvent& aPointerEvent );
       
   105 
       
   106 private:
       
   107 
       
   108     TInt iSpare;
       
   109     TBool iIsActiveIdle;
       
   110     };
       
   111 
       
   112 #endif // C_AKNEMPTYCONTROL_H
       
   113