|
1 /******************************************************************************* |
|
2 * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 |
|
13 #ifndef SWTFACTORY_H |
|
14 #define SWTFACTORY_H |
|
15 |
|
16 |
|
17 #include "eswtwidgetscore.h" |
|
18 #include "eswtmobileextensions.h" |
|
19 #include "eswtwidgetsexpanded.h" |
|
20 #include "eswtgraphics.h" |
|
21 |
|
22 |
|
23 /** |
|
24 * CSwtFactory |
|
25 * @lib eswt |
|
26 */ |
|
27 NONSHARABLE_CLASS(CSwtFactory) |
|
28 : public CBase |
|
29 , public MSwtFactory |
|
30 { |
|
31 // Own methods |
|
32 public: |
|
33 static CSwtFactory* NewL(); |
|
34 CSwtFactory(); |
|
35 ~CSwtFactory(); |
|
36 void ConstructL(); |
|
37 |
|
38 // From MSwtFactory |
|
39 public: |
|
40 // Core widgets |
|
41 MSwtUiUtils* NewUiUtilsL(MSwtDisplay& aDisplay) const; |
|
42 MSwtCanvas* NewCanvasL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
43 MSwtComposite& aParent, TInt aStyle) const; |
|
44 MSwtComposite* NewCompositeL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
45 MSwtComposite& aParent, TInt aStyle) const; |
|
46 MSwtDecorations* NewDecorationsL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
47 MSwtComposite& aParent, TInt aStyle) const; |
|
48 MSwtShell* NewShellL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
49 MSwtShell* aParent, TInt aStyle) const; |
|
50 MSwtMenu* NewMenuL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
51 TInt aStyle) const; |
|
52 MSwtMenuItem* NewMenuItemL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
53 MSwtMenu& aParent, TInt aIndex, TInt aStyle) const; |
|
54 MSwtMenuArranger* NewMenuArrangerL(MSwtDisplay& aDisplay) const; |
|
55 MSwtLink* NewLinkL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
56 MSwtComposite& aParent, TInt aStyle) const; |
|
57 MSwtList* NewListL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
58 MSwtComposite& aParent, TInt aStyle) const; |
|
59 MSwtLabel* NewLabelL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
60 MSwtComposite& aParent, TInt aStyle) const; |
|
61 MSwtButton* NewButtonL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
62 MSwtComposite& aParent, TInt aStyle) const; |
|
63 MSwtText* NewTextL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
64 MSwtComposite& aParent, TInt aStyle) const; |
|
65 MSwtProgressBar* NewProgressBarL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
66 MSwtComposite& aParent, TInt aStyle) const; |
|
67 MSwtSlider* NewSliderL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
68 MSwtComposite& aParent, TInt aStyle) const; |
|
69 MSwtCombo* NewComboL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
70 MSwtComposite& aParent, TInt aStyle) const; |
|
71 MSwtFileDialog* NewFileDialogL(const TDesC& aInitPath, |
|
72 const TDesC& aTitle, TInt aStyle) const; |
|
73 MSwtCommand* NewCommandL(MSwtDisplay& aDisplay, TSwtPeer aPeerRef, |
|
74 MSwtControl& aParentControl, MSwtCommand* aParentCommand, TInt aType, |
|
75 TInt aPriority) const; |
|
76 MSwtCommandArranger* NewCommandArrangerL(MSwtDisplay& aDisplay) const; |
|
77 |
|
78 // Mobile widgets |
|
79 MSwtCaptionedControl* NewCaptionedControlL(MSwtDisplay& aDisplay, |
|
80 TSwtPeer aPeer, MSwtComposite& aParent, TInt aStyle) const; |
|
81 MSwtConstrainedText* NewConstrainedTextL(MSwtDisplay& aDisplay, |
|
82 TSwtPeer aPeer, MSwtComposite& aParent, TInt aStyle) const; |
|
83 MSwtDateEditor* NewDateEditorL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
84 MSwtComposite& aParent, TInt aStyle) const; |
|
85 MSwtMobileShell* NewMobileShellL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
86 MSwtShell* aParent, TInt aStyle) const; |
|
87 MSwtMobileDevice* NewMobileDeviceL(MSwtDisplay& aDisplay, |
|
88 TSwtPeer aPeer) const; |
|
89 MSwtInput* NewInputL(TSwtPeer aPeer, TInt aInputId) const; |
|
90 MSwtScreen* NewScreenL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
91 TInt aScreenId) const; |
|
92 MSwtMultiPagePager* NewMultiPagePagerL(MSwtDisplay& aDisplay, |
|
93 TSwtPeer aPeer, MSwtShell& aParent) const; |
|
94 MSwtMultiPageTabGroup* NewMultiPageTabGroupL(MSwtDisplay& aDisplay, |
|
95 TSwtPeer aPeer, MSwtShell& aParent) const; |
|
96 MSwtMultiPageDialog* NewMultiPageDialogL(MSwtDisplay& aDisplay, |
|
97 TSwtPeer aPeer, MSwtShell& aParent) const; |
|
98 MSwtHyperLink* NewHyperLinkL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
99 MSwtComposite& aParent, TInt aStyle) const; |
|
100 MSwtListBox* NewListBoxL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
101 MSwtComposite& aParent, TInt aStyle) const; |
|
102 MSwtListView* NewListViewL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
103 MSwtComposite& aParent, TInt aStyle) const; |
|
104 MSwtSortedList* NewSortedListL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
105 MSwtComposite& aParent, TInt aStyle) const; |
|
106 MSwtTaskTip* NewTaskTipL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
107 TInt aStyle) const; |
|
108 MSwtTextExtension* NewTextExtensionL(MSwtDisplay& aDisplay, |
|
109 TSwtPeer aPeer, MSwtComposite& aParent, TInt aStyle) const; |
|
110 void RunTimedMessageBoxDlgLD(const TDesC& aTitle, const TDesC& aMessage, |
|
111 TInt aStyle, const MSwtImage* aImage) const; |
|
112 HBufC* RunQueryDialogL(const TDesC& aTitle, TInt aStyle, |
|
113 TInt aQueryType, const TDesC& aPromptText, const TDesC& aDefaultValue, |
|
114 TInt aMinimum, TInt aMaximum) const; |
|
115 virtual HBufC* RunQueryDialogConvertDefaultValueL(const TDesC& aString, |
|
116 TInt aQueryType) const; |
|
117 |
|
118 // Expanded widgets |
|
119 MSwtClipboard* NewClipboardL(TSwtPeer aPeer) const; |
|
120 MSwtTable* NewTableL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
121 MSwtComposite& aParent, TInt aStyle) const; |
|
122 MSwtTableColumn* NewTableColumnL(TSwtPeer aPeer, MSwtTable& aParent, |
|
123 TInt aStyle, TInt aColumnIndex) const; |
|
124 MSwtTableItem* NewTableItemL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
125 MSwtTable& aParent, TInt aRowIndex) const; |
|
126 MSwtTree* NewTreeL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
127 MSwtComposite& aParent, TInt aStyle) const; |
|
128 TRgb* RunColorDialogL(TRgb* aDefaultColor) const; |
|
129 MSwtFontDialog* NewFontDialogL() const; |
|
130 MSwtDirectoryDialog* NewDirectoryDialogL(const TDesC& aFilterPath, |
|
131 const TDesC& aTitle) const; |
|
132 MSwtBrowser* NewBrowserL(MSwtDisplay& aDisplay, TSwtPeer aPeer, |
|
133 MSwtComposite& aParent, TInt aStyle) const; |
|
134 |
|
135 // Graphics |
|
136 MSwtColor* NewColorL(const MSwtDevice& aDevice, const TRgb& aRgb) const; |
|
137 MSwtGc* NewBitmapGcL(MSwtBitmapDrawable& aDrawable, CFbsBitGc* aGc, |
|
138 MSwtGc::TDestructor aDestructor, const TRgb& aPenCol, |
|
139 const TRgb& aBrushCol, const MSwtFont& aFont) const; |
|
140 MSwtGc* NewWindowGcL(MSwtWindowDrawable& aDrawable, CWindowGc* aGc, |
|
141 MSwtGc::TDestructor aDestructor, const TRgb& aPenCol, |
|
142 const TRgb& aBrushCol, const MSwtFont& aFont, const TRect& aBoundaryRect, |
|
143 const TRect& aGcScreenRect) const; |
|
144 MSwtFont* NewFontL(const MSwtDevice& aDevice, const TDesC& aTypefaceName, |
|
145 TInt aHeight, TInt aStyle) const; |
|
146 }; |
|
147 |
|
148 #endif // SWTFACTORY_H |