1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 Gets the CEikonEnv maintained by the framework for the application.
21 This function should never be run in a thread where such a static Uikon environment
22 does not exist. Code that may run on the server side of an application server
25 @return A static CEikonEnv.
26 @see CCoeEnv::Static()
28 inline CEikonEnv* CEikonEnv::Static()
29 { return((CEikonEnv*)(CCoeEnv::Static())); }
35 inline TInt CEikonEnv::EditableControlStandardHeight() const
36 { return(iEditableControlStandardHeight); }
38 /** Gets the Uikon process that manages the files of applications started in this
41 @return The CEikProcess object. */
42 inline CEikProcess* CEikonEnv::Process() const
45 /** Gets the application UI of the application using this CEikonEnv.
47 @return Pointer to the CEikAppUi. */
48 inline CEikAppUi* CEikonEnv::EikAppUi() const
49 { return((CEikAppUi*)iAppUi); }
50 inline const MEikAlertWin* CEikonEnv::Alert() const
51 { return(iAlertWin); }
53 /** Gets the minus nudge character, this could be the left arrow for example.
55 @return Minus nudge character. */
56 inline TChar CEikonEnv::NudgeCharMinus() const
57 {return(iNudgeChars[0]);}
59 /** Gets the plus nudge character, this could be the right arrow for example.
61 @return Plus nudge character. */
62 inline TChar CEikonEnv::NudgeCharPlus() const
63 {return(iNudgeChars[1]);}
65 /** Gets the physical (TRgb) colour which corresponds to a logical colour.
67 @param aLogicalColor A logical colour value.
68 @return The physical colour which corresponds to aLogicalColor. */
69 inline TRgb CEikonEnv::Color(TLogicalColor aLogicalColor) const
70 {return ColorList().Color(aLogicalColor); }
72 /** Gets the custom colour array.
74 @return The custom colour array. */
75 inline CColorArray& CEikonEnv::CustomColorArray() const
76 {return *(ColorList().ColorArray(TUid::Uid(KEikCustomColorsArrayValue)));}
78 /** Gets the application's colour list.
80 The colour list provides member functions to retrieve and modify colours
81 in the list, and to append new arrays of colours to the colour list.
83 @return The application's colour list */
84 inline CColorList& CEikonEnv::ColorList() const
85 {__ASSERT_DEBUG(iColorList,User::Invariant()); return *iColorList; }
87 /** Sets a mapping in the application's colour list between the logical and physical
90 @param aLogicalColor A logical colour value.
91 @param aColor A physical colour value. */
92 inline void CEikonEnv::SetColor(TLogicalColor aLogicalColor, TRgb aColor)
93 { ColorList().SetColor(aLogicalColor, aColor); }
99 inline void CEikonEnv::SetCDlgDialogFactory(MEikCDlgDialogFactory* aDialogFactory)
100 {iCDlgDialogFactory=aDialogFactory;}
106 inline void CEikonEnv::SetPrintDialogFactory(MEikPrintDialogFactory* aDialogFactory)
107 {iPrintDialogFactory=aDialogFactory;}
113 inline void CEikonEnv::SetFileDialogFactory(MEikFileDialogFactory* aDialogFactory)
114 {iFileDialogFactory=aDialogFactory;}
120 inline void CEikonEnv::SetIrFactory(MEikIrFactory* aIrFactory)
121 {iIrFactory=aIrFactory;}
127 inline MEikCDlgDialogFactory* CEikonEnv::CDlgDialogFactory() const
128 {return iCDlgDialogFactory;}
134 inline MEikPrintDialogFactory* CEikonEnv::PrintDialogFactory() const
135 {return iPrintDialogFactory;}
141 inline MEikFileDialogFactory* CEikonEnv::FileDialogFactory() const
142 {return iFileDialogFactory;}
148 inline MEikIrFactory* CEikonEnv::IrFactory() const
152 inline TInt CEikonEnv::AddLibraryL(TCreateByTypeFunction aControlFactory)
153 {return(AddLibraryL(aControlFactory, NULL));}
154 inline TInt CEikonEnv::AddLibraryL(TFileName* aResourceFile)
155 {return(AddLibraryL(NULL, aResourceFile));}
156 inline void CEikonEnv::RemoveLibrary(TCreateByTypeFunction aControlFactory)
157 {RemoveLibrary(aControlFactory, NULL);}
158 inline void CEikonEnv::RemoveLibrary(TInt aResourceFileOffset)
159 {RemoveLibrary(NULL, aResourceFileOffset);}
166 inline CBase* CEikonEnv::Extension() const
173 inline TInt CEikonEnv::StatusPaneCoreResId() const
174 {return iStatusPaneCoreResId;}
180 inline void CEikonEnv::SetStatusPaneCoreResId(TInt aStatusPaneCoreResId)
181 {iStatusPaneCoreResId=aStatusPaneCoreResId;}
187 inline CEikAutoMenuTitleArray* CEikonEnv::AutoMenuTitleArray() const
188 {return iAutoMenuTitleArray;}
190 inline const CEikDialog* MEikAlertWin::AsEikDialog() const
191 {return (const CEikDialog*)const_cast<MEikAlertWin*>(this)->AsEikDialog();}
193 inline const CCoeControl* MEikAlertWin::AsCoeControl() const
194 {return (const CCoeControl*)const_cast<MEikAlertWin*>(this)->AsCoeControl();}