videditor/VideoEditorUiComponents/inc/VeiTextDisplay.h
branchRCL_3
changeset 3 e0b5df5c0969
parent 0 951a5db380a0
child 5 4c409de21d23
equal deleted inserted replaced
0:951a5db380a0 3:e0b5df5c0969
     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 VEITEXTDISPLAY_H
       
    22 #define VEITEXTDISPLAY_H
       
    23 
       
    24 #include <coecntrl.h>
       
    25 #include <ConeResLoader.h>
       
    26 
       
    27 
       
    28 /**
       
    29  * CVeiTextDisplay control class.
       
    30  */
       
    31 class CVeiTextDisplay : public CCoeControl
       
    32     {
       
    33     public:
       
    34         /**
       
    35          * Destructor.
       
    36          */
       
    37         IMPORT_C virtual ~CVeiTextDisplay();
       
    38 
       
    39 		/** 
       
    40 		 * Static factory method.
       
    41 		 * 
       
    42 		 * @return  the created CVeiTextDisplay object
       
    43 		 */
       
    44 		IMPORT_C static CVeiTextDisplay* NewL( const TRect& aRect, const CCoeControl* aParent );
       
    45 
       
    46 		/** 
       
    47 		 * Static factory method. Leaves the created object in the cleanup
       
    48 		 * stack.
       
    49 		 *
       
    50 		 * @return  the created CVeiCutAudioBar object
       
    51 		 */
       
    52 		IMPORT_C static CVeiTextDisplay* NewLC( const TRect& aRect, const CCoeControl* aParent );
       
    53 
       
    54 
       
    55 	public:
       
    56 
       
    57 		enum TVeiLayout
       
    58 			{
       
    59 			EOnlyName = 0x77,
       
    60 			ENameAndDuration,
       
    61 			EEverything,
       
    62 			ECutInCutOut,
       
    63 			EArrowsHorizontal,
       
    64 			EArrowsVertical,
       
    65 			ERecording,
       
    66 			ERecordingPaused,
       
    67             EOnlyDuration
       
    68 			};
       
    69 			
       
    70     	/**
       
    71 		 * CVeiTextDisplay components.
       
    72 		 */
       
    73 		 enum TTextDisplayComponent
       
    74 			{
       
    75 			EStartTimeText= 1,
       
    76 			EEndTimeText,
       
    77 			EStartTimeIcon,
       
    78 			EEndTimeIcon			
       
    79 			};			
       
    80 
       
    81 		IMPORT_C void SetLandscapeScreenOrientation( TBool aLandscapeScreenOrientation );
       
    82 
       
    83 		IMPORT_C void SetCutIn( const TTimeIntervalMicroSeconds& aCutInTime );
       
    84 		
       
    85 		IMPORT_C void SetCutOut( const TTimeIntervalMicroSeconds& aCutOutTime );
       
    86 
       
    87 		IMPORT_C void SetTime( const TTime& aClipTime );
       
    88 
       
    89 		IMPORT_C void SetLocation( const TDesC& aClipLocation );
       
    90 
       
    91 		IMPORT_C void SetLayout( TVeiLayout aLayout );
       
    92 
       
    93 		IMPORT_C void SetName( const TDesC& aName );
       
    94 
       
    95 		IMPORT_C void SetDuration( const TTimeIntervalMicroSeconds& aDuration );
       
    96 
       
    97 		/** 
       
    98 		 * Control Up arrow visibility.
       
    99 		 * 
       
   100 		 * @param aVisible True/False
       
   101 		 */
       
   102 		IMPORT_C void SetUpperArrowVisibility(TBool aVisible);
       
   103 
       
   104 		/** 
       
   105 		 * Control Lower arrow visibility.
       
   106 		 * 
       
   107 		 * @param aVisible True/False
       
   108 		 */
       
   109 		IMPORT_C void SetLowerArrowVisibility(TBool aVisible);
       
   110 
       
   111 		/** 
       
   112 		 * Control Right arrow visibility.
       
   113 		 * 
       
   114 		 * @param aVisible True/False
       
   115 		 */
       
   116 		IMPORT_C void SetRightArrowVisibility(TBool aVisible);
       
   117 
       
   118 		/** 
       
   119 		 * Control Left arrow visibility.
       
   120 		 * 
       
   121 		 * @param aVisible True/False
       
   122 		 */
       
   123 		IMPORT_C void SetLeftArrowVisibility(TBool aVisible);
       
   124 		
       
   125 		/** 
       
   126 		 * Set slow motion on status.
       
   127 		 * 
       
   128 		 * @param aOn True/False
       
   129 		 */
       
   130 		IMPORT_C void SetSlowMotionOn(TBool aOn);
       
   131 
       
   132 		/** 
       
   133 		 * slow motion on status.
       
   134 		 * 
       
   135 		 * @return aOn True/False
       
   136 		 */
       
   137 		IMPORT_C TBool SlowMotionOn() const;
       
   138 		
       
   139 		/** 
       
   140 		 * Set value of slow motion effect.
       
   141 		 * 
       
   142 		 * @param aPreset
       
   143 		 */
       
   144 		IMPORT_C void SetSlowMotionPreset(TInt aPreset);
       
   145 
       
   146 		/** 
       
   147 		 * Slow motion effect value.
       
   148 		 * 
       
   149 		 * @return value 
       
   150 		 */
       
   151 		IMPORT_C TInt SlowMotionPreset() const;
       
   152 
       
   153 		IMPORT_C void SetArrowSize(const TSize& aArrowSize);
       
   154 
       
   155 		void ParseTimeToMinSec( TDes& aLayoutTime, const TTimeIntervalMicroSeconds& aDuration ) const;
       
   156 		
       
   157 		/** 
       
   158 		 * Sets the rect of a component
       
   159 		 * 
       
   160 		 * @param aComponentIndex specifies the component
       
   161 		 * @param aRect the rect that the component is set
       
   162 		 *
       
   163 		 * @return  the end mark position
       
   164 		 */		
       
   165 		IMPORT_C void SetComponentRect(TTextDisplayComponent aComponentIndex, TRect aRect);
       
   166 
       
   167     private:
       
   168         /**
       
   169          * Default constructor.
       
   170 		 *
       
   171          */
       
   172         void ConstructL( const TRect& aRect, const CCoeControl* aParent );
       
   173 
       
   174         /**
       
   175          * C++ default constructor.
       
   176 		 *
       
   177          */
       
   178 		CVeiTextDisplay::CVeiTextDisplay();
       
   179 
       
   180        /**
       
   181         * From CCoeControl,Draw.
       
   182 		*
       
   183 		* @param aRect  rectangle to draw
       
   184         */
       
   185         void Draw(const TRect& aRect) const;
       
   186 
       
   187 		static TInt UpdateBlinker( TAny* aThis );
       
   188 		void DoUpdateBlinker();
       
   189 		void SizeChanged();
       
   190 
       
   191     private:	// data
       
   192 		HBufC*		iClipName;
       
   193 		TTimeIntervalMicroSeconds iDuration;
       
   194 		TTime		iClipTime;		
       
   195 		HBufC*		iClipLocation;
       
   196 		
       
   197 		TTimeIntervalMicroSeconds	iCutInTime;
       
   198 		TTimeIntervalMicroSeconds	iCutOutTime;
       
   199 
       
   200 		TVeiLayout	iLayout;
       
   201 
       
   202 		CFbsBitmap* iUpperArrow;
       
   203 		CFbsBitmap* iLowerArrow;
       
   204 		CFbsBitmap* iRightArrow;
       
   205 		CFbsBitmap* iLeftArrow;
       
   206 		CFbsBitmap* iUpperArrowMask;
       
   207 		CFbsBitmap* iLowerArrowMask;
       
   208 		CFbsBitmap* iRightArrowMask;
       
   209 		CFbsBitmap* iLeftArrowMask;
       
   210 		CFbsBitmap* iStartMarkIcon;
       
   211 		CFbsBitmap* iStartMarkIconMask;
       
   212 		CFbsBitmap* iEndMarkIcon;
       
   213 		CFbsBitmap* iEndMarkIconMask;
       
   214 
       
   215 		TBool		iUpperArrowVisible;
       
   216 		TBool		iLowerArrowVisible;
       
   217 		TBool		iRightArrowVisible;
       
   218 		TBool		iLeftArrowVisible;
       
   219 
       
   220 		TBool		iLandscapeScreenOrientation;
       
   221 		TBool		iSlowMotionOn;
       
   222 		TInt		iPresetValue;	
       
   223 		
       
   224 		CPeriodic*	iBlinkTimer;
       
   225 		TBool		iBlinkFlag;
       
   226 
       
   227 		TSize		iDynamicArrowSize;
       
   228 		
       
   229 		TPoint 		iUpperArrowPoint;
       
   230 		TPoint 		iLowerArrowPoint;
       
   231 
       
   232 		RConeResourceLoader 	iResLoader;
       
   233 
       
   234 		TRect	iStartTimeIconRect;
       
   235     	TRect	iEndTimeIconRect;
       
   236        	TRect	iStartTimeTextRect;
       
   237     	TRect	iEndTimeTextRect;
       
   238 
       
   239     };
       
   240 #endif
       
   241 
       
   242 // End of File