imageeditor/ImageEditorUI/inc/TControlItem.h
changeset 1 edfc90759b9f
equal deleted inserted replaced
0:57d4cdd99204 1:edfc90759b9f
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef TCONTROLITEM_H
       
    21 #define TCONTROLITEM_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CCoeControl;
       
    28 class CWindowGc;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 *  TIVControlItem class.
       
    33 *
       
    34 *  @lib ImageViewer.dll
       
    35 */
       
    36 NONSHARABLE_CLASS( TControlItem )
       
    37     {
       
    38     public: // Methods used from parent control
       
    39 
       
    40         void SetParent( CCoeControl* aParent );
       
    41         void SetItemRect( const TRect& aRect );
       
    42         void DrawItem( CWindowGc& aGc ) const;
       
    43 
       
    44     protected: // Methods used from derived sub item
       
    45 
       
    46         void DrawNow();
       
    47 
       
    48     private: // Methods implemented in sub item
       
    49 
       
    50         virtual void Draw( CWindowGc& aGc ) const = 0;
       
    51         virtual void SizeChanged() = 0;
       
    52 
       
    53     protected: // Data
       
    54 
       
    55         // Parent control (reference)
       
    56         CCoeControl* iParent;
       
    57 
       
    58         // Sub item rect
       
    59         TRect iRect;
       
    60     };
       
    61 
       
    62 #endif // TCONTROLITEM_H
       
    63 
       
    64 // End of File
       
    65