textrendering/word/SRC/WPDIALGS.H
changeset 0 1fb32624e06b
equal deleted inserted replaced
-1:000000000000 0:1fb32624e06b
       
     1 /*
       
     2 * Copyright (c) 1997-2009 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __WPDIALGS_H__
       
    20 #define __WPDIALGS_H__
       
    21 
       
    22 #if !defined(__TXTFRMAT_H__)
       
    23 #include <txtfrmat.h>
       
    24 #endif
       
    25 
       
    26 #if !defined(__GDI_H__)
       
    27 #include <gdi.h>
       
    28 #endif
       
    29 
       
    30 #if !defined(__BADESCA_H__)
       
    31 #include <badesca.h>
       
    32 #endif
       
    33 
       
    34 #if !defined(__EIKLABEL_H__)
       
    35 #include <techview/eiklabel.h>
       
    36 #endif
       
    37 
       
    38 #if !defined(__EIKDIALG_H__)
       
    39 #include <eikdialg.h>
       
    40 #endif
       
    41 
       
    42 #if !defined(__EIKMFNE_H__)
       
    43 #include <techview/eikmfne.h>
       
    44 #endif
       
    45 
       
    46 #if !defined(__EIKCFDLG_H__)
       
    47 #include <techview/eikcfdlg.h>
       
    48 #endif
       
    49 
       
    50 #if !defined(__APGDOOR_H__)
       
    51 #include <apgdoor.h>
       
    52 #endif
       
    53 
       
    54 #if !defined(__EIKUFSEL_H__)
       
    55 #include <techview/eikufsel.h>
       
    56 #endif
       
    57 
       
    58 class COutlineHListBox;
       
    59 
       
    60 
       
    61 template <class T> class CArrayFix;
       
    62 
       
    63 class CWordBulletDialog : public CEikDialog
       
    64 /**
       
    65 @internalComponent
       
    66 */
       
    67 	{
       
    68 public:
       
    69 	CWordBulletDialog(TBullet* aBullet,TRgb aBackColor,CPrinterDevice* aPrinterDevice,const TDesC& aFontName);
       
    70 	~CWordBulletDialog();
       
    71 private: // from CEikDialog
       
    72 	void PreLayoutDynInitL();
       
    73 	void HandleControlStateChangeL(TInt aControlId);
       
    74 	TBool OkToExitL(TInt aButtonId);
       
    75 private:
       
    76 	TBullet* iWordBullet;
       
    77 	TBullet iBullet;
       
    78 	TRgb iBackColor;
       
    79 	CPrinterDevice* iPrinterDevice;
       
    80 	const TDesC& iFontName;
       
    81 	};
       
    82 
       
    83 class CWordBulletFormatDialog : public CEikDialog
       
    84 /**
       
    85 @internalComponent
       
    86 */
       
    87 	{
       
    88 public:
       
    89 	CWordBulletFormatDialog(TBullet* aBullet,TRgb aBackColor,CPrinterDevice* aPrinterDevice,const TDesC& aFontName);
       
    90 	~CWordBulletFormatDialog();
       
    91 private: // from CEikDialog
       
    92     SEikControlInfo CreateCustomControlL(TInt aControlType);
       
    93 	void PreLayoutDynInitL();
       
    94 	void HandleControlStateChangeL(TInt aControlId);
       
    95 	TBool OkToExitL(TInt aButtonId);
       
    96 private: // new functions
       
    97 	void SetPreviewLabelL(TUint aCharCode);
       
    98 private:
       
    99 	TBullet* iWordBullet;
       
   100 	TBullet iBullet;
       
   101 	TRgb iBackColor;
       
   102 	CArrayFix<TInt>* iTwipsList;
       
   103 	CPrinterDevice* iPrinterDevice;
       
   104 	CDesCArray* iPointsList;
       
   105 	const TDesC& iFontName;
       
   106 	};
       
   107 
       
   108 class CWordBulletPreviewLabel : public CEikLabel
       
   109 /**
       
   110 @internalComponent
       
   111 */
       
   112 	{
       
   113 public:
       
   114 	CWordBulletPreviewLabel();
       
   115 	~CWordBulletPreviewLabel();
       
   116 	void SetFontSpecL(TFontSpec& aFontSpec);
       
   117 private: // from CCoeControl
       
   118 	TSize MinimumSize();
       
   119 	void Draw(const TRect& aRect) const;
       
   120 public:
       
   121 	TRgb iTextColor;
       
   122 	TRgb iBrushColor;
       
   123 	CFont* iPrevFont;
       
   124 	};
       
   125 
       
   126 class CWordGoToDialog : public CEikDialog
       
   127 /**
       
   128 @internalComponent
       
   129 */
       
   130 	{
       
   131 public:
       
   132 	CWordGoToDialog(TInt aMaxPages, TInt* aCurrentPage);
       
   133 private: // from CEikDialog
       
   134 	void PreLayoutDynInitL();
       
   135 	TBool OkToExitL(TInt aButtonId);
       
   136 private:
       
   137 	TInt* iCurrentPage;
       
   138 	TInt iMaxPages;
       
   139 	};
       
   140 
       
   141 class CWordCannotUndoDialog : public CEikDialog
       
   142 /**
       
   143 @internalComponent
       
   144 */
       
   145 	{
       
   146 public:
       
   147 	CWordCannotUndoDialog();
       
   148 private: // from CEikDialog
       
   149 	void PreLayoutDynInitL();
       
   150 	TBool OkToExitL(TInt aButtonId);
       
   151 	};
       
   152 
       
   153 
       
   154 class TNonPrintingCharVisibility;
       
   155 class CWordViewPreferencesDialog : public CEikDialog
       
   156 /**
       
   157 @internalComponent
       
   158 */
       
   159 	{
       
   160 public:
       
   161 	CWordViewPreferencesDialog(TNonPrintingCharVisibility& aVisibility);
       
   162 private:
       
   163 	void WordSetCheckBoxState(CEikButtonBase::TState aState);
       
   164 	void PreLayoutDynInitL();
       
   165 	TBool OkToExitL(TInt aButtonId);
       
   166 private:
       
   167 	TNonPrintingCharVisibility& iVisibility;
       
   168 	};
       
   169 
       
   170 
       
   171 class CWordObjectPreferencesDialog : public CEikDialog
       
   172 /**
       
   173 @internalComponent
       
   174 */
       
   175 	{
       
   176 public:
       
   177 	CWordObjectPreferencesDialog(TBool& aSketchAsGlass,TBool& aGraphAsGlass);
       
   178 private:
       
   179 	void WordSetCheckBoxState(CEikButtonBase::TState aState);
       
   180 	void PreLayoutDynInitL();
       
   181 	TBool OkToExitL(TInt aButtonId);
       
   182 private:
       
   183 	TBool& iSketchAsGlass;
       
   184 	TBool& iGraphAsGlass;
       
   185 	};
       
   186 
       
   187 
       
   188 class CWordRevertToStyleDialog : public CEikDialog
       
   189 /**
       
   190 @internalComponent
       
   191 */
       
   192 	{
       
   193 public:
       
   194 	CWordRevertToStyleDialog(TBool& aSketchAsGlass,TBool& aGraphAsGlass);
       
   195 private:
       
   196 	void WordSetCheckBoxState(CEikButtonBase::TState aState);
       
   197 	void PreLayoutDynInitL();
       
   198 	TBool OkToExitL(TInt aButtonId);
       
   199 private:
       
   200 	TBool& iSketchAsGlass;
       
   201 	TBool& iGraphAsGlass;
       
   202 	};
       
   203 
       
   204 
       
   205 class CWordTempManualZoomDialog : public CEikDialog
       
   206 /**
       
   207 Manual zoom setting dialog
       
   208 @internalComponent
       
   209 */
       
   210 	{
       
   211 public: 
       
   212 	CWordTempManualZoomDialog(TInt& aOrigZoomFactor);
       
   213 private: // from CEikDialog
       
   214 	void PreLayoutDynInitL();
       
   215     TBool OkToExitL(TInt aButtonId);
       
   216 private:
       
   217 	TInt& iOrigZoomFactor;
       
   218 	};
       
   219 
       
   220 
       
   221 
       
   222 
       
   223 class CWordFileOpenDialog : public CEikFileOpenDialog
       
   224 /**
       
   225 Custom File Open dialog
       
   226 @internalComponent
       
   227 */
       
   228 	{
       
   229 public:
       
   230 	CWordFileOpenDialog(TDes* aFileName,TBool& aReadOnly,TInt aTitleId=0);
       
   231 	TBool OkToExitL(TInt aButtonId);
       
   232 	void HandleControlStateChangeL(TInt aControlId);
       
   233 protected:
       
   234 	TBool& iReadOnly;
       
   235 	};
       
   236 
       
   237 
       
   238 class CWordTemplateNewFileDialog : public CEikFileSaveAsDialog
       
   239 /**
       
   240 Custom File New dialog with templates
       
   241 @internalComponent
       
   242 */
       
   243 	{
       
   244 public:
       
   245 	CWordTemplateNewFileDialog(TDes* aFileName, TFileName& aTemplateFileName, TUidType aUid);
       
   246 protected: // from CEikFileSaveAsDialog
       
   247 	TBool OkToExitL(TInt aButtonId);
       
   248 	void PreLayoutDynInitL();
       
   249 private:
       
   250 	SEikControlInfo CreateCustomControlL(TInt aControlType);
       
   251 private:
       
   252 	TFileName& iTemplateFileName;
       
   253 	TUidType iUid;
       
   254 	};
       
   255 
       
   256 
       
   257 class CWordUnifiedFileSelector : public CEikUnifiedFileNameSelector
       
   258 /**
       
   259 Custom CEikUnifiedFileSelector control for word to place Default
       
   260 template at top
       
   261 @internalComponent
       
   262 */
       
   263 	{
       
   264 public:
       
   265 	void BuildFileNameArrayL(const TParse& aParse, MDesCArray* aFileNames);
       
   266 private:
       
   267 	void SortArray(MDesCArray* aFileNames);
       
   268 	};
       
   269 
       
   270 
       
   271 class CWordDeleteTemplateDialog : public CEikDialog
       
   272 /**
       
   273 class CWordDeleteTemplateDialog
       
   274 @internalComponent
       
   275 */
       
   276 	{
       
   277 public:
       
   278 	CWordDeleteTemplateDialog(TFileName& aTemplateFileName, TUidType aUid);
       
   279 private: // from CEikDialog
       
   280 	TBool OkToExitL(TInt aButtonId);
       
   281 	void PreLayoutDynInitL();
       
   282 private:
       
   283 	TFileName& iTemplateFileName;
       
   284 	TUidType iUid;
       
   285 	};
       
   286 
       
   287 
       
   288 class CWordSaveAsTemplateDialog : public CEikDialog
       
   289 /**
       
   290 class CWordSaveAsTemplateDialog
       
   291 @internalComponent
       
   292 */
       
   293 	{
       
   294 public:
       
   295 	CWordSaveAsTemplateDialog(TFileName& aTemplateFileName, TUidType aUid);
       
   296 private: // from CEikDialog
       
   297 	TBool OkToExitL(TInt aButtonId);
       
   298 	void PreLayoutDynInitL();
       
   299 private:
       
   300 	TFileName& iTemplateFileName;
       
   301 	TUidType iUid;
       
   302 	};
       
   303 
       
   304 
       
   305 class CWordOutlineDialog : public CEikDialog
       
   306 /**
       
   307 Outline View dialog
       
   308 @internalComponent
       
   309 */
       
   310 	{
       
   311 public:
       
   312 	CWordOutlineDialog(CRichText* aText, CEikEdwin* aEdWin, TInt& aNewCursorPosition);
       
   313 private:
       
   314 	TBool OkToExitL(TInt aButtonId);
       
   315 	SEikControlInfo CreateCustomControlL(TInt aControlType);
       
   316 private:
       
   317 	COutlineHListBox* iOutlineNav;
       
   318 	CRichText* iText;
       
   319 	CEikEdwin* iEdWin;
       
   320 	TInt& iNewCursorPosition;
       
   321 	};
       
   322 
       
   323 
       
   324 #endif