26
|
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 |
MSwtTextExtension* NewTextExtensionL(MSwtDisplay& aDisplay,
|
|
107 |
TSwtPeer aPeer, MSwtComposite& aParent, TInt aStyle) const;
|
|
108 |
void RunTimedMessageBoxDlgLD(const TDesC& aTitle, const TDesC& aMessage,
|
|
109 |
TInt aStyle, const MSwtImage* aImage) const;
|
|
110 |
HBufC* RunQueryDialogL(const TDesC& aTitle, TInt aStyle,
|
|
111 |
TInt aQueryType, const TDesC& aPromptText, const TDesC& aDefaultValue,
|
|
112 |
TInt aMinimum, TInt aMaximum) const;
|
|
113 |
virtual HBufC* RunQueryDialogConvertDefaultValueL(const TDesC& aString,
|
|
114 |
TInt aQueryType) const;
|
|
115 |
|
|
116 |
// Expanded widgets
|
|
117 |
MSwtClipboard* NewClipboardL(TSwtPeer aPeer) const;
|
|
118 |
MSwtTable* NewTableL(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
119 |
MSwtComposite& aParent, TInt aStyle) const;
|
|
120 |
MSwtTableColumn* NewTableColumnL(TSwtPeer aPeer, MSwtTable& aParent,
|
|
121 |
TInt aStyle, TInt aColumnIndex) const;
|
|
122 |
MSwtTableItem* NewTableItemL(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
123 |
MSwtTable& aParent, TInt aRowIndex) const;
|
|
124 |
MSwtTree* NewTreeL(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
125 |
MSwtComposite& aParent, TInt aStyle) const;
|
|
126 |
TRgb* RunColorDialogL(TRgb* aDefaultColor) const;
|
|
127 |
MSwtDirectoryDialog* NewDirectoryDialogL(const TDesC& aFilterPath,
|
|
128 |
const TDesC& aTitle) const;
|
|
129 |
MSwtBrowser* NewBrowserL(MSwtDisplay& aDisplay, TSwtPeer aPeer,
|
|
130 |
MSwtComposite& aParent, TInt aStyle) const;
|
|
131 |
|
|
132 |
// Graphics
|
|
133 |
MSwtColor* NewColorL(const MSwtDevice& aDevice, const TRgb& aRgb) const;
|
|
134 |
MSwtGc* NewBitmapGcL(MSwtBitmapDrawable& aDrawable, CFbsBitGc* aGc,
|
|
135 |
MSwtGc::TDestructor aDestructor, const TRgb& aPenCol,
|
|
136 |
const TRgb& aBrushCol, const MSwtFont& aFont) const;
|
|
137 |
MSwtGc* NewWindowGcL(MSwtWindowDrawable& aDrawable, CWindowGc* aGc,
|
|
138 |
MSwtGc::TDestructor aDestructor, const TRgb& aPenCol,
|
|
139 |
const TRgb& aBrushCol, const MSwtFont& aFont, const TRect& aBoundaryRect,
|
|
140 |
const TRect& aGcScreenRect) const;
|
|
141 |
MSwtFont* NewFontL(const MSwtDevice& aDevice, const TDesC& aTypefaceName,
|
|
142 |
TInt aHeight, TInt aStyle) const;
|
|
143 |
};
|
|
144 |
|
|
145 |
#endif // SWTFACTORY_H
|