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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __EIKENV_INL__
17 #define __EIKENV_INL__
20 Gets the CEikonEnv maintained by the framework for the application.
22 This function should never be run in a thread where such a static Uikon environment
23 does not exist. Code that may run on the server side of an application server
26 @return A static CEikonEnv.
27 @see CCoeEnv::Static()
29 inline CEikonEnv* CEikonEnv::Static()
30 { return((CEikonEnv*)(CCoeEnv::Static())); }
32 /** Gets the Uikon process that manages the files of applications started in this
35 @return The CEikProcess object. */
36 inline CEikProcess* CEikonEnv::Process() const
39 /** Gets the application UI of the application using this CEikonEnv.
41 @return Pointer to the CEikAppUi. */
42 inline CEikAppUi* CEikonEnv::EikAppUi() const
43 { return((CEikAppUi*)iAppUi); }
44 inline const MEikAlertWin* CEikonEnv::Alert() const
45 { return(iAlertWin); }
47 inline const CEikDialog* MEikAlertWin::AsEikDialog() const
48 {return (const CEikDialog*)const_cast<MEikAlertWin*>(this)->AsEikDialog();}
50 inline const CCoeControl* MEikAlertWin::AsCoeControl() const
51 {return (const CCoeControl*)const_cast<MEikAlertWin*>(this)->AsCoeControl();}
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); }
95 inline TInt CEikonEnv::AddLibraryL(TCreateByTypeFunction aControlFactory)
96 {return(AddLibraryL(aControlFactory, NULL));}
97 inline TInt CEikonEnv::AddLibraryL(TFileName* aResourceFile)
98 {return(AddLibraryL(NULL, aResourceFile));}
99 inline void CEikonEnv::RemoveLibrary(TCreateByTypeFunction aControlFactory)
100 {RemoveLibrary(aControlFactory, NULL);}
101 inline void CEikonEnv::RemoveLibrary(TInt aResourceFileOffset)
102 {RemoveLibrary(NULL, aResourceFileOffset);}
107 WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
109 inline CBase* CEikonEnv::Extension() const
114 #endif // __EIKENV_INL__