imageeditor/inc/PreviewControlBase.h
changeset 1 edfc90759b9f
child 12 18b321db4884
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 
       
    21 #ifndef PREVIEWCONTROLBASE_H
       
    22 #define PREVIEWCONTROLBASE_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "ImageEditorControlBase.h"
       
    26 #include "DrawUtils.h"
       
    27 
       
    28 //  FORWARD DECLARATIONS
       
    29 class CFbsBitmap;
       
    30 class CPluginInfo;
       
    31 
       
    32 // CONSTANTS
       
    33 const TInt KDancingAntzTimerDelayInMicroseconds     = 100000;
       
    34 const TInt KDancingAntzTimerIntervalInMicroseconds  = 250000;
       
    35 
       
    36 // These can be replaced in the plug-ins to adjust the movement
       
    37 const TInt KDefaultFastKeyTimerDelayInMicroseconds      = 200000;
       
    38 const TInt KDefaultFastKeyTimerIntervalInMicroseconds   = 50000;
       
    39 const TInt KDefaultFastKeyTimerMultiplyThresholdInTicks = 3;
       
    40 const TInt KDefaultSmallNavigationStepMultiplier        = 1;
       
    41 const TInt KDefaultBigNavigationStepMultiplier          = 6;
       
    42 
       
    43 
       
    44 /*	CLASS: CPreviewControlBase
       
    45 *
       
    46 *   CPreviewControlBase acts as a base class for preview pane Image Editor UI.
       
    47 *
       
    48 */
       
    49 class CPreviewControlBase :		public CImageEditorControlBase
       
    50 {
       
    51 
       
    52 public:
       
    53 
       
    54 /** @name Methods:*/
       
    55 //@{
       
    56 
       
    57 	/*	NewL factory method, pops cleanupstack
       
    58 	*
       
    59 	*	@param aRect - control rectangle
       
    60 	*	@param aParent - pointer to window owning control
       
    61 	*   @return - pointer to newly created CPreviewControlBase
       
    62 	*/
       
    63     IMPORT_C static CPreviewControlBase * NewL (
       
    64 		const TRect &		aRect,
       
    65 		CCoeControl	*		aParent
       
    66 		);
       
    67 
       
    68 	/*	Second phase constructor
       
    69 	*
       
    70 	*	@see CImageEditorControlBase
       
    71 	*/
       
    72     IMPORT_C virtual void ConstructL (
       
    73 		const TRect &		aRect,
       
    74 		CCoeControl	*		aParent
       
    75 		);
       
    76 
       
    77 	/*	Destructor
       
    78 	*
       
    79 	*   @param -
       
    80 	*   @return -
       
    81 	*/
       
    82     IMPORT_C virtual ~CPreviewControlBase();
       
    83 
       
    84 	/*	SetImage
       
    85 	*
       
    86 	*	@see CImageEditorControlBase
       
    87 	*/
       
    88     IMPORT_C virtual void SetImageL (CFbsBitmap * aBitmap);
       
    89     
       
    90     /*	SetImageL
       
    91 	*
       
    92 	*	@see CImageEditorControlBase
       
    93 	*/
       
    94     IMPORT_C virtual void SetImageL (const CFbsBitmap * aBitmap);
       
    95 
       
    96     /*	DrawPreviewImage
       
    97     *
       
    98     *   Draws preview image
       
    99 	*
       
   100 	*   @param aRect - region of control in need of redrawing
       
   101 	*   @return -
       
   102 	*/
       
   103     IMPORT_C virtual void DrawPreviewImage (const TRect & aRect) const;
       
   104     
       
   105 
       
   106 //@}
       
   107 
       
   108 protected:
       
   109 
       
   110 /** @name Methods:*/
       
   111 //@{    
       
   112 //@}
       
   113 
       
   114 /** @name Members:*/
       
   115 //@{
       
   116     /// Preview image
       
   117 	const CFbsBitmap *		        iPreview;
       
   118 //@}
       
   119 
       
   120 private:
       
   121 
       
   122 /** @name Methods:*/
       
   123 //@{
       
   124 
       
   125 	/*	Draw
       
   126 	*
       
   127 	*	@see CImageEditorControlBase
       
   128 	*/
       
   129     IMPORT_C virtual void Draw (const TRect & aRect) const;
       
   130 
       
   131 //@}
       
   132 
       
   133 /** @name Members:*/
       
   134 //@{
       
   135 
       
   136 //@}
       
   137 
       
   138        
       
   139 };
       
   140 
       
   141 
       
   142 #endif
       
   143 
       
   144 // End of File