epoc32/include/mw/eikenv.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __EIKENV_INL__
    17 #define __EIKENV_INL__
    18 
    19 /**
    20  Gets the CEikonEnv maintained by the framework for the application. 
    21  
    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 
    24  is one such case.
    25  
    26  @return A static CEikonEnv. 
    27  @see CCoeEnv::Static() 
    28 */
    29 inline CEikonEnv* CEikonEnv::Static()
    30 	{ return((CEikonEnv*)(CCoeEnv::Static())); }
    31 
    32 /** Gets the Uikon process that manages the files of applications started in this 
    33 environment.
    34 
    35 @return The CEikProcess object. */
    36 inline CEikProcess* CEikonEnv::Process() const
    37 	{ return(iProcess); }
    38 
    39 /** Gets the application UI of the application using this CEikonEnv.
    40 
    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); }
    46 
    47 inline const CEikDialog* MEikAlertWin::AsEikDialog() const
    48     {return (const CEikDialog*)const_cast<MEikAlertWin*>(this)->AsEikDialog();}
    49 
    50 inline const CCoeControl* MEikAlertWin::AsCoeControl() const
    51     {return (const CCoeControl*)const_cast<MEikAlertWin*>(this)->AsCoeControl();}
    52 
    53 /** Gets the minus nudge character, this could be the left arrow for example. 
    54 
    55 @return Minus nudge character. */
    56 inline TChar CEikonEnv::NudgeCharMinus() const
    57 	{return(iNudgeChars[0]);}
    58 
    59 /** Gets the plus nudge character, this could be the right arrow for example.
    60 
    61 @return Plus nudge character. */
    62 inline TChar CEikonEnv::NudgeCharPlus() const
    63 	{return(iNudgeChars[1]);}
    64 
    65 /** Gets the physical (TRgb) colour which corresponds to a logical colour.
    66 
    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); }
    71 
    72 /** Gets the custom colour array.
    73 
    74 @return The custom colour array. */
    75 inline CColorArray& CEikonEnv::CustomColorArray() const
    76 	{return *(ColorList().ColorArray(TUid::Uid(KEikCustomColorsArrayValue)));}
    77 
    78 /** Gets the application's colour list. 
    79 
    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.
    82 
    83 @return The application's colour list */
    84 inline CColorList& CEikonEnv::ColorList() const
    85 	{__ASSERT_DEBUG(iColorList,User::Invariant()); return *iColorList; }
    86 
    87 /** Sets a mapping in the application's colour list between the logical and physical 
    88 colours specified.
    89 
    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); }
    94 
    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);}
   103 
   104 /**
   105 @publishedPartner
   106 @deprecated
   107 WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
   108 */
   109 inline CBase* CEikonEnv::Extension() const
   110 	{return iExtension;}
   111 
   112 
   113 
   114 #endif // __EIKENV_INL__
   115