|
1 /* |
|
2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * {Description of the file} |
|
16 * |
|
17 */ |
|
18 |
|
19 // Protection against nested includes |
|
20 #ifndef __PREVIEWVIEW_H__ |
|
21 #define __PREVIEWVIEW_H__ |
|
22 |
|
23 // System includes |
|
24 #include <aknview.h> |
|
25 #include <akntoolbarobserver.h> |
|
26 #include <prninf.h> |
|
27 #include <PRNPREV.H> |
|
28 |
|
29 // User includes |
|
30 #include "DirectPrintViewBase.h" |
|
31 |
|
32 // Forward declarations |
|
33 class CDirectPrintPreviewControl; |
|
34 |
|
35 // Class declaration |
|
36 /** |
|
37 * Preview view class |
|
38 * more_complete_description |
|
39 */ |
|
40 class CDirectPrintPreviewView : public CDirectPrintViewBase |
|
41 , public MAknToolbarObserver |
|
42 , public MPrintProcessObserver |
|
43 { |
|
44 public: |
|
45 /** Constructors */ |
|
46 static CDirectPrintPreviewView* NewL(); |
|
47 static CDirectPrintPreviewView* NewLC(); |
|
48 /** Destructor */ |
|
49 ~CDirectPrintPreviewView(); |
|
50 |
|
51 public: |
|
52 /** |
|
53 * From CAknView. |
|
54 * Handles user commands. |
|
55 * |
|
56 * @param aCommand The id of commands. |
|
57 */ |
|
58 void HandleCommandL(TInt aCommand); |
|
59 /** |
|
60 * From CAknView. |
|
61 * Get the id of view. |
|
62 * |
|
63 * @return The id of view. |
|
64 */ |
|
65 TUid Id() const; |
|
66 |
|
67 protected: // from CAknView |
|
68 void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage); |
|
69 void DoDeactivate(); |
|
70 |
|
71 public: |
|
72 /** |
|
73 * From MAknToolbarObserver. |
|
74 * Handles user commands. |
|
75 * |
|
76 * @param aCommand The id of commands. |
|
77 */ |
|
78 void OfferToolbarEventL(TInt aCommand); |
|
79 |
|
80 private: // from MPrintProcessObserver |
|
81 void NotifyPrintStarted(TPrintParameters aPrintParams); |
|
82 void NotifyPrintEnded(TInt anErrorCode); |
|
83 void NotifyBandPrinted(TInt aPercentageOfPagePrinted, TInt aCurrentPageNum, TInt aCurrentCopyNum); |
|
84 |
|
85 private: |
|
86 CDirectPrintPreviewView(); |
|
87 void ConstructL(); |
|
88 |
|
89 void ChangeVisibleState(); |
|
90 |
|
91 private: |
|
92 /** Pointer to preview control. */ |
|
93 CDirectPrintPreviewControl* iPrevCtrl; |
|
94 |
|
95 /** Parameter. */ |
|
96 TPrintParameters iParameters; |
|
97 /** Preview format. */ |
|
98 TPrintPreviewFormat iPrintPreviewFormat; |
|
99 /** Number of pages in document. */ |
|
100 TInt iNumPagesInDoc; |
|
101 /** Display flag. */ |
|
102 TInt iFirstPageToDisplay; |
|
103 /** Number of pages. */ |
|
104 TInt iNumPagesToView; |
|
105 /** Number of bands. */ |
|
106 TInt iNumBands; |
|
107 /** Margin state. */ |
|
108 CPrintPreviewImage::TMarginState iMarginState; |
|
109 }; |
|
110 |
|
111 #endif // __PREVIEWVIEW_H__ |