notepad/notepad1/inc/NpdEdwinLines.h
branchRCL_3
changeset 30 bd7edf625bdd
parent 0 f979ecb2b13e
equal deleted inserted replaced
29:12af337248b1 30:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Declaration of control for papaer lines of editor.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NPDEDWINLINES_H
       
    20 #define NPDEDWINLINES_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class TResourceReader;
       
    27 class CEikDialog;
       
    28 class CAknsFrameBackgroundControlContext;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 * Control for paper lines of the editor.
       
    33 * CNotepadEdwinLines is a control class for paper lines of the editor.
       
    34 *
       
    35 * @lib NpdLib.lib
       
    36 * @see CNotepadEditorDialog,
       
    37 */
       
    38 NONSHARABLE_CLASS(CNotepadEdwinLines) : public CCoeControl
       
    39 	{
       
    40 	public: // Constuctor and destructor
       
    41 
       
    42         	/**
       
    43         	* Constructor.
       
    44         	*
       
    45         	* @param aParent CNotepadEditorDialog.
       
    46         	*/
       
    47         	CNotepadEdwinLines(CEikDialog* aParent);
       
    48 
       
    49         	/**
       
    50         	* Destructor.
       
    51         	*/
       
    52 	virtual ~CNotepadEdwinLines();
       
    53 
       
    54     	protected:
       
    55 
       
    56         	/**
       
    57         	* Attach rectangles for this control's shape and
       
    58         	* Layout if need.
       
    59         	*
       
    60         	* @param aRect for layout.
       
    61         	* @param aRegion for SetShape.
       
    62         	*/
       
    63         	void AddRectsAndLayout(RRegion& aRegion);
       
    64 
       
    65         	/**
       
    66         	* From CCoeControl.
       
    67         	* Construct this control from its resource.
       
    68         	*
       
    69         	* @param aReader resource reader already opened.
       
    70         	*/
       
    71         	void ConstructFromResourceL(TResourceReader& aReader);
       
    72 	        
       
    73         	/**
       
    74         	* From CCoeControl.
       
    75         	* Called when SizeChanged.
       
    76         	*/
       
    77         	void SizeChanged();
       
    78         
       
    79         	void SetContainerWindowL(const CCoeControl& aContainer);
       
    80 
       
    81 	protected:  // Functions from base classes
       
    82 
       
    83         	/**
       
    84         	* From CCoeControl.
       
    85         	* Draw.
       
    86         	*/
       
    87         	void Draw(const TRect& aRect) const;
       
    88 
       
    89 	 /**
       
    90         	* From CCoeControl : Notifier for changing layout
       
    91         	* @param aType : Type of resource change
       
    92         	*/
       
    93 	
       
    94 	void HandleResourceChange(TInt aType);
       
    95 	  
       
    96 	 /**
       
    97         	* From CCoeControl : MopSupplyObject
       
    98         	* @param aId : Supply object type Uid
       
    99         	*/
       
   100 
       
   101         	TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
       
   102 
       
   103     	private:  // Data
       
   104 		RArray<TAknLayoutRect> iRects; // own
       
   105         		CEikDialog* iParent;
       
   106         		CAknsFrameBackgroundControlContext* iBgContext; // Owned
       
   107 	};
       
   108 
       
   109 #endif // NPDEDWINLINES_H
       
   110 
       
   111 // End of File