S60 3rd Edition API Reference: aknutils.h Source File

aknutils.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : AknUtils.h
00004 *  Part of  : Avkon
00005 *
00006 *  Description:
00007 *     General Avkon Utilities. Includes:
00008 *               - listbox utilities
00009 *               - layout utilities
00010 * 
00011 *  Version:
00012 *
00013 *  Copyright © 2002 Nokia Corporation.
00014 *  This material, including documentation and any related 
00015 *  computer programs, is protected by copyright controlled by 
00016 *  Nokia Corporation. All rights are reserved. Copying, 
00017 *  including reproducing, storing,  adapting or translating, any 
00018 *  or all of this material requires the prior written consent of 
00019 *  Nokia Corporation. This material also contains confidential 
00020 *  information which may not be disclosed to others without the 
00021 *  prior written consent of Nokia Corporation.
00022 * ============================================================================
00023 */
00024 
00025 #ifndef __AKNUTILS_H__
00026 #define __AKNUTILS_H__
00027 
00028 #include <eiktxlbm.h>
00029 #include <avkon.hrh>
00030 #include <avkon.rsg>
00031 #include <coedef.h>
00032 #include <coecobs.h>
00033 #include <w32std.h>
00034 #include <gulalign.h>
00035 #include <gulutil.h>
00036 #include <eikenv.h>
00037 #include <biditext.h>
00038 #include <eiksbfrm.h>
00039 #include <AknsConstants.h>
00040 #include <aknenv.h>
00041 
00042 #include <aknlayout.lag>
00043 
00044 // These are for listbox column lengths (These are used to allocate memory from stack while drawing listboxes, they should be as small as possible, but not smaller!)
00045 const TInt KMaxColumnDataLength = 80; // This is maximum length of data for one listbox column -- after that the data is truncated before drawing.
00046 const TInt KMaxTotalDataLength = 8*KMaxColumnDataLength;  // max of 5 columns can have full 80 characters...
00047 
00063 class CCoeControl;
00064 class CEikTextListBox;
00065 class CEikColumnListBox;
00066 class CEikFormattedCellListBox;
00067 class CGulIcon;
00068 class CEikSettingsListBox;
00069 class CAknLAF;
00070 class CEikImage;
00071 class CEikMfne;
00072 class CEikListBox;
00073 class CEikLabel;
00074 class CEikEdwin;
00075 class CEikMenuPane;
00076 class CAknPopupField;
00077 class CListBoxView;
00078 class CAknColumnListBox;
00079 class CEikSecretEditor;
00080 class CFindExtension;
00081 class CAknLayoutFont;
00082 class TAknFontSpecification;
00083 class CAknAppUiBase;
00084 
00089 const TInt  KDefaultClipWidth = -1;
00090 const TUint KDefaultClipChar  = TUint(0x2026);
00091 
00092 #start_since SINCE_3_1_SDK
00093 
00097 const TInt KAknLayoutUtilsDoNotOverride = -1;
00098 #end_since SINCE_3_1_SDK
00099 
00107 class AknTextUtils 
00108     {
00109 public:
00110     enum TClipDirection
00111         {
00112         EDoNotClip,
00113         EClipFromEnd,
00114         EClipFromBeginning
00115         };
00128     IMPORT_C static TBool ClipToFit(TDes& aBuffer, const CFont& aFont, TInt aMaxWidthInPixels, TClipDirection aDir=EClipFromEnd, TInt aClipWidth = KDefaultClipWidth, const TDesC &aClipString=_L("..."));
00129 
00136     IMPORT_C static TBool ClipToFit(TDes& aBuffer, TClipDirection aDir, CEikFormattedCellListBox *aListBox, TInt aItemIndex, TInt aSubCellNumber);
00137 
00144     IMPORT_C static TBool ClipToFit(TDes& aBuffer, TClipDirection aDir, CEikColumnListBox *aListBox, TInt aItemIndex, TInt aColumnNumber);
00145 
00146     // implementation
00147 
00148     static TBool DoClipToFit(
00149         TDes& aBuffer,
00150         const CFont& aFont,
00151         TInt aMaxWidthInPixels,
00152         TClipDirection aDir,
00153         TInt aClipWidth,
00154         const TDesC& aClipString );
00155 
00166     IMPORT_C static void WrapToArrayL( 
00167         const TDesC& aStringToWrap,
00168             const CArrayFix<TInt>& aLineWidthArray,
00169             const CFont& aFont,
00170             CArrayFix<TPtrC>& aWrappedArray);
00171 
00182     IMPORT_C static void WrapToArrayL( 
00183         const TDesC& aStringToWrap,
00184             TInt aLineWidth,
00185             const CFont& aFont,
00186             CArrayFix<TPtrC>& aWrappedArray );
00187 
00204     IMPORT_C static void WrapToArrayAndClipL( 
00205         TDes& aStringToWrap,             
00206             const CArrayFix<TInt>& aLineWidthArray, 
00207             const CFont& aFont,                     
00208             CArrayFix<TPtrC>& aWrappedArray );       
00209         
00227         IMPORT_C static void ChopToArrayAndClipL(
00228                 TDes& aStringToChop,             
00229             const CArrayFix<TInt>& aLineWidthArray, 
00230             const CFont& aFont,                    
00231             CArrayFix<TPtrC>& aChoppedArray);
00232 
00250         IMPORT_C static void ChopToArrayAndClipL(
00251                 TDes& aStringToChop,             
00252             TInt aLineWidth, 
00253             const CFont& aFont,                    
00254             CArrayFix<TPtrC>& aChoppedArray );
00255 
00268     IMPORT_C static void WrapToStringL( 
00269         const TDesC& aStringToWrap,
00270             const CArrayFix<TInt>& aLineWidthArray,
00271             const CFont& aFont,
00272             TDes& aWrappedString );
00273 
00288         IMPORT_C static void WrapToStringAndClipL(
00289             const TDesC& aStringToWrap, 
00290             const CArrayFix<TInt>& aLineWidthArray, 
00291             const CFont& aFont, 
00292             TDes& aWrappedString ); 
00293 
00309     IMPORT_C static void StripCharacters(TDes &aDes, const TDesC &aCharacters);
00310 
00322     IMPORT_C static void ReplaceCharacters(TDes &aDes, const TDesC &aChars, TChar aReplacement);
00323 
00331     IMPORT_C static void PackWhiteSpaces(TDes &aDes, const TDesC &aWhiteSpaceChars);
00332     
00333     // non-exported implementation
00334 
00335     static void WrapToStringL(
00336         const TDesC& aStringToWrap, 
00337             const CArrayFix<TInt>& aLineWidthArray, 
00338             const CFont& aFont, 
00339             TDes& aWrappedString,
00340         TInt aFlags,
00341         TInt aDirectionality );
00342 
00343     static void WrapToArrayL( 
00344         TDes& aStringToWrap,
00345         const CArrayFix<TInt>* aLineWidthArray, 
00346         const CFont& aFont,
00347         CArrayFix<TPtrC>& aWrappedArray,
00348         TInt aLineWidth,
00349         TInt aFlags,
00350         TInt aDirectionality );
00351 
00352     static void ChopToArrayAndClipL(
00353                 TDes& aStringToChop,             
00354             const CArrayFix<TInt>* aLineWidthArray,
00355             const CFont& aFont,                 
00356             CArrayFix<TPtrC>& aChoppedArray,
00357         TInt aLineWidth );    
00358 
00366         static TBool IsEmptyText( const TDesC& aTextToTest );
00367 
00382         IMPORT_C static void LanguageSpecificNumberConversion(TDes &aDes);
00383 
00392     IMPORT_C static void ConvertDigitsTo( TDes& aDes, TDigitType aDigitType );
00393 
00406     IMPORT_C static TBidiText::TDirectionality CurrentScriptDirectionality();
00407 
00414     static TDigitType InputLanguageFilteredDigitType();
00415 
00422     static TDigitType DisplayTextLanguageFilteredDigitType();
00423 
00430         IMPORT_C static TDigitType NumericEditorDigitType();
00431 
00448     IMPORT_C static void DisplayTextLanguageSpecificNumberConversion(TDes &aDes);
00449   
00461     IMPORT_C static TDigitType TextEditorDigitType();
00462 
00463         enum TDigitModeQueryType {
00464                 EDigitModeEditorDefault, // in editors by default whether western or foreign digits are used (gen.editors, both text and numbers)
00465                 EDigitModeUserModifiableEditor, // in editors whether user can modify digitmode with keypad
00466             EDigitModeShownToUser // in all components when displaying digits
00467         };
00482         IMPORT_C static TBool DigitModeQuery(TDigitModeQueryType aQueryType = EDigitModeShownToUser);
00483 
00495     IMPORT_C static HBufC* ConvertFileNameL(const TDesC& aDes);
00496 
00497 
00502     IMPORT_C static HBufC* LoadScalableTextL(CCoeEnv& aCoe, TInt aResourceId);
00503 
00508     IMPORT_C static HBufC* LoadScalableTextLC(CCoeEnv& aCoe, TInt aResourceId);
00509 
00514     IMPORT_C static TInt LoadScalableText(CCoeEnv& aCoe, TInt aResourceId, TDes& aBuffer ); 
00515 
00520     IMPORT_C static HBufC* ClipAccordingScreenOrientationLC(CCoeEnv& aCoe, HBufC* aBuf); 
00521 
00542     IMPORT_C static TPtrC ChooseScalableText(
00543         const TDesC& aText,
00544         const CFont& aFont,
00545         TInt aMaxWidthInPixels );
00546     };
00547 
00548 _LIT(KAknStripTabs, "\t");
00549 _LIT(KAknStripListControlChars, "\t\n");
00550 _LIT(KAknReplaceTabs, "\t");
00551 _LIT(KAknReplaceListControlChars, "\t\n");
00552 _LIT(KAknCommonWhiteSpaceCharacters, " \n\t\r");
00553 
00564 class AknSelectionService
00565     {
00566 public:
00569     IMPORT_C static void HandleSelectionListProcessCommandL(TInt aCommand, CEikListBox* aListBox);
00572     IMPORT_C static void HandleMultiselectionListProcessCommandL(TInt aCommand, CEikListBox* aListBox);
00575     IMPORT_C static void HandleMarkableListProcessCommandL(TInt aCommand, CEikListBox* aListBox);
00576 
00579     IMPORT_C static TKeyResponse HandleMenuListOfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType, CEikListBox* aListBox);
00582     IMPORT_C static void HandleMarkableListDynInitMenuPane(TInt aResourceId, CEikMenuPane *aMenu, CEikListBox *aListBox);
00585     IMPORT_C static void HandleMarkableListDynInitMenuItem(CEikMenuPane *aMenu, CEikListBox *aListBox, TInt aCommandId, TBool aCanBeAppliedToMultipleItems);
00588     IMPORT_C static void HandleMarkableListUpdateAfterCommandExecution(CEikListBox *aListBox);
00589 
00592     IMPORT_C static void HandleItemRemovalAndPositionHighlightL(CEikListBox *aListBox, TInt aValueOfCurrentItemIndexBeforeRemoval, TBool aCurrentItemWasRemoved);
00593     // This one updates selectionindexes too.
00599     IMPORT_C static void HandleItemRemovalAndPositionHighlightL(CEikListBox *aListBox, TInt aValueOfCurrentItemIndexBeforeRemoval, CArrayFix<TInt> &aIndexesOfRemovedItemsBeforeRemoval);
00600     };
00601 
00602 
00603 
00604 class CAknSearchField;
00605 
00618 class AknFind
00619     {
00620 public:
00621 
00622     /*
00623      * Implements the event handlers for the find pane. This method must be
00624      * called when a @c ProcessCommandL event is received and a find pane is on
00625      * the screen.
00626      *
00627      * @param aCommand Command id.
00628      * @param aListBox Pointer to listbox control.
00629      * @param aSearchField Pointer to search field control.
00630      * @param aParentControl Parent control.
00631      */
00632     IMPORT_C static void HandleFindPopupProcessCommandL(
00633                         TInt aCommand, 
00634                         CEikListBox* aListBox, 
00635                         CAknSearchField* aSearchField, 
00636                         CCoeControl* aParentControl);
00637     
00638     /*
00639      * Handles key events for the find pane. This method must be called when
00640      * control receives @c OfferKeyEventL event.
00641      *
00642      * @param aKeyEvent The key event.
00643      * @param aType The type of key event:@c TEventCode.
00644      * @param aListBoxParent Pointer to the parent control.
00645      * @param aListBox Pointer to listbox control.
00646      * @param aSearchField Pointer to search field control.
00647      * @param isFindPopup @c ETrue if popup find pane, @c EFalse if normal find
00648      *        pane.
00649      * @param aNeedRefresh @c ETrue when find pane is redrawn.
00650      */    
00651     IMPORT_C static TKeyResponse HandleFindOfferKeyEventL(
00652                         const TKeyEvent& aKeyEvent, 
00653                         TEventCode aType, 
00654                         CCoeControl* aListBoxParent, 
00655                         CEikListBox* aListBox, 
00656                         CAknSearchField* aSearchField, 
00657                         TBool isFindPopup, 
00658                         TBool &aNeedRefresh);
00659 
00660     /*
00661      * Do not use this method.
00662      *
00663      * @deprecated Use @c AknFind::HandleFixedFindSizeChanged() and 
00664      *             @c AknFind::HandlePopupFindSizeChanged instead.
00665      *        
00666      */
00667     IMPORT_C static void HandleFindSizeChanged(
00668             CCoeControl* aParentControl, 
00669             CEikListBox* aListBox, 
00670             CAknSearchField* aSearchField, 
00671             TBool ispopup = ETrue, 
00672             TInt aFindWindowResourceId = R_AVKON_POPUP_FIND_WINDOW, 
00673             TInt aListAreaId = R_AVKON_LIST_GEN_PANE, 
00674             TInt aListResourceIdWithFindPopup = 
00675                                 R_AVKON_LIST_GEN_PANE_WITH_FIND_POPUP, 
00676             TInt aFindWindowParentResourceId = 
00677                                 R_AVKON_MAIN_PANE_WITH_STATUS_PANE);
00678 
00689     IMPORT_C static void HandleFixedFindSizeChanged(
00690             CCoeControl* aParentControl,
00691                         CAknColumnListBox* aListBox, // only available with column lists
00692                         CAknSearchField* aSearchField);
00693     
00703     IMPORT_C static void HandlePopupFindSizeChanged(
00704                             CCoeControl* aParentControl,
00705                                                     CEikListBox* aListBox,  //available with all lists.
00706                                                     CAknSearchField* aSearchField);
00707     
00723     IMPORT_C static void HandleFindSizeChangedLayouts(
00724                             CCoeControl* aParentControl, 
00725                             CEikListBox* aListBox, 
00726                             CAknSearchField* aSearchField, 
00727                             const TAknWindowLineLayout& aFindWindow,
00728                             const TAknWindowLineLayout& aListArea,
00729                             TBool aIsPopup,
00730                             const TAknWindowLineLayout& aFindWindowParent );
00731 
00732 public:
00733 
00744     IMPORT_C static TBool IsFindMatch(const TDesC& aItemText, 
00745                                       const TDesC& aSearchText);
00746 
00756     IMPORT_C static TBool IsFindWordSeparator(TChar aCh);
00757 
00758 
00768     static void HandleFindPaneVisibility(CAknSearchField* aSearchField, 
00769                                          TBool ispopup, 
00770                                          TBool textchanged, 
00771                                          TBool &aNeedRefresh);
00772     };
00773 
00774 
00779 class AknEditUtils
00780     {
00781     public:
00782     
00784     struct SAknEditorParameters 
00785         {
00787         TInt iEditingSpace;
00788         
00790         TInt iEditingWindow;
00791         
00796         TInt iCharacterCase;
00797         
00802         TInt iJustification;
00803         
00805         TBool iAllowedToMoveInsertionPoint;
00806         
00808         TBool iCursorYesNo;
00809         
00811         TBool iOverflowYesNo;
00812         };
00813 
00814     IMPORT_C static void ConstructEditingL(CEikEdwin* aEdwin, TInt aResourceId);
00815     IMPORT_C static void ConstructEditingL(CEikEdwin* aEdwin, TResourceReader& aReader);
00816     IMPORT_C static void ConstructEditingL(CEikEdwin* aEdwin, const SAknEditorParameters &aParams);
00817 
00836     IMPORT_C static void ConstructEditingL(CEikEdwin* aEdwin, 
00837                                            TInt aEditingSpace, 
00838                        TInt aEditingWindow, 
00839                        TInt aCharacterCase, 
00840                        TInt aJustification, 
00841                        TBool aAllowedToMoveInsertionPoint, 
00842                        TBool aCursorYesNo, 
00843                        TBool aOverflowYesNo);
00844                        
00864     IMPORT_C static void ConstructEditingL(CEikEdwin* aEdwin, 
00865                                               TInt aEditingSpace, 
00866                                               TInt aEditingWindow, 
00867                                               TInt aCharacterCase, 
00868                                               TInt aJustification, 
00869                                               TBool aAllowedToMoveInsertionPoint, 
00870                                               TBool aCursorYesNo, 
00871                                               TBool aOverflowYesNo,
00872                                               TBool aIsResizable);
00873 
00874     };
00875 
00883 class CListBoxNumbers : public CBase
00884         {
00885 public:
00886         IMPORT_C CListBoxNumbers(CEikTextListBox* aListBox);
00887         IMPORT_C void ConstructL();
00888         IMPORT_C void UpdateL();
00889 private:
00890         CEikTextListBox* iListBox;
00891         };
00892 
00893 class CAknListBoxFilterItems;
00894 
00904 class CAknFilteredTextListBoxModel : public CTextListBoxModel, public MDesCArray
00905     {
00906 public: // public interface for apps
00913     IMPORT_C void CreateFilterL(CEikListBox* aListBox, CAknSearchField* aSearchField);
00917     IMPORT_C void RemoveFilter();
00922     IMPORT_C CAknListBoxFilterItems* Filter() const;
00926     IMPORT_C ~CAknFilteredTextListBoxModel();
00927 public: // from CTextListBoxMode
00932     IMPORT_C virtual TInt NumberOfItems() const;
00938     IMPORT_C virtual TPtrC ItemText(TInt aItemIndex) const;
00939 public: // from MEikTextListBoxModel (default filtering string conversions)
00944     IMPORT_C const MDesCArray* MatchableTextArray() const;
00945 
00946 private:
00947     CAknListBoxFilterItems* iFilter; // owned
00948 private: // From MdesCArray (these implement default matchabletextarray for filtering.)
00949     IMPORT_C TInt MdcaCount() const;
00950     IMPORT_C TPtrC MdcaPoint(TInt aIndex) const;
00951 private: // from MListBoxModel
00952         IMPORT_C virtual TAny* MListBoxModel_Reserved();
00953     };
00954 
00972 class CAknListBoxFilterItems : public CBase, public MCoeControlObserver
00973     {
00974 public:
00983     IMPORT_C CAknListBoxFilterItems(CEikListBox *aListBox, CAknSearchField *aSearchField, MListBoxModel *aModel, CListBoxView *aView);
00987     IMPORT_C void ConstructL(); // for setting empty list text.
00991     IMPORT_C void ResetFilteringL();
00996     IMPORT_C void UpdateCachedDataL(); // updates iOldSearchCriteria and selection indexes.
01001     IMPORT_C ~CAknListBoxFilterItems();    
01002 
01003 public: 
01008     IMPORT_C CArrayFix<TInt> *SelectionIndexes();
01014     IMPORT_C void UpdateSelectionIndexesL();
01021     IMPORT_C void UpdateSelectionIndexL(TInt aVisibleIndex);
01022 
01023 public: // Applications should call this in their listbox model implementation
01029     IMPORT_C TInt FilteredNumberOfItems() const;
01036     IMPORT_C TInt FilteredItemIndex(TInt aVisibleItemIndex) const;
01037 
01038 public: // Needed to change the correct item.
01039 
01044     IMPORT_C TInt NonFilteredNumberOfItems() const; // this always returns >= FilteredNumberOfItems()
01051     IMPORT_C TInt VisibleItemIndex(TInt aOriginalIndex) const;
01052 public: 
01059     IMPORT_C TPtrC DefaultMatchableItemFromItem(TPtrC aText);
01060 
01061 public: 
01066     IMPORT_C void HandleOfferkeyEventL();
01070     IMPORT_C void HandleItemArrayChangeL();
01071 
01072 public: // MCoeControlObserver
01077     IMPORT_C void SetObserver(MCoeControlObserver *aObserver);
01083     IMPORT_C void HandleControlEventL(CCoeControl *aControl, TCoeEvent aEventType);
01084 
01085 public: // For FEP
01093     IMPORT_C void DeferredSendKeyEventToFepL(TUint aValue);
01101     static TInt IdleCallBack(TAny *aFilterItems);
01102 
01103 public: // For size changed
01111     IMPORT_C void SetParentControl(CCoeControl *aControl);
01116     IMPORT_C void SetPopup();
01117 
01118 public: // For detaching and attaching list, findbox, model and view...
01124         IMPORT_C void SetListBox(CEikListBox *aListBox);
01130         IMPORT_C void SetSearchField(CAknSearchField *aSearchField);
01136         IMPORT_C void SetModel(MListBoxModel *aModel);
01142         IMPORT_C void SetView(CListBoxView *aView);
01143         
01144 public:
01149     IMPORT_C CCoeControl *FindBox() const;
01150 
01151 private:
01152     void NoCriteriaL(); // remove criteria completely.
01153     void TightenCriteriaL(const TDesC& aCriteria); // slow operation (do when adding new characters to search criteria)
01154     void ReleaseCriteriaL(const TDesC& aCriteria); // very slow operation (do when removing characters from search criteria)
01155     // EmptyListText handling
01156     void InstallEmptyTextL();
01157     void UninstallEmptyTextL();
01158     // Selections -- these methods form a pair, 
01159     // you must call Fetch first and then push.
01160     void FetchSelectionIndexesFromListBoxL();
01161     void PushSelectionIndexesToListBoxL();
01162 
01163     // HandleItemAddition without ResetFilteringL() call
01164     void HandleItemAdditionL();
01165     void HandleItemRemovalL();
01166 private:
01167     TBool IsItemVisible(const TDesC& aMatchableItemString, const TDesC& aSearchText);
01168     static TBool IsSeparatorCharacter(TChar c);
01169     TBool IsItemSelected(TInt aRealIndex) const;
01170 private:
01171     CArrayFix<TInt> *iShownIndexes; // own // uses non-filtered indexes
01172     CArrayFix<TInt> *iSelectionIndexes; // own   // this uses non-filtered indexes
01173     HBufC *iOldSearchCriteria; // own
01174     MListBoxModel *iModel;
01175     CListBoxView *iView;
01176     TInt iOldItemCount;
01177     HBufC* iEmptyListText; // own
01178     CEikListBox* iListBox;
01179     CAknSearchField* iSearchField;
01180     TBuf<256> iMatchableText;
01181     MCoeControlObserver *iObserver;
01182     CFindExtension *iExtension;
01183     TUint iKeyValue;
01184     CCoeControl *iParentControl;
01185     TBool iIsPopup;
01186     TBool iDisableChangesToShownIndexes;
01187     };
01188 
01189 
01196 template<class T>
01197 class NoOptimizationView : public T
01198     {
01199 public:
01200     virtual void VScrollTo(TInt aNewTopItemIndex, TRect& aMinRedrawRect)
01201         {
01202         // AVKON LAF
01203         if (this->RedrawDisabled())
01204                 return;
01205         if (this->iTopItemIndex == aNewTopItemIndex)
01206                 return;
01207         aMinRedrawRect.SetRect(this->iViewRect.iTl,this->iViewRect.Size());
01208         this->SetTopItemIndex(aNewTopItemIndex);
01209         this->Draw(&aMinRedrawRect);
01210         // end of AVKON LAF
01211         }
01212     };
01213 
01214 
01221 class AknLAFUtils 
01222         {
01223 public:
01224         static void DrawLines(CGraphicsContext* aGc, 
01225                               const TRect& mainpane,
01226                               TInt x);
01227         IMPORT_C static void ReplaceColumn(TPtr aTarget, TDesC* aSource, TDesC* aReplacement, TChar aColumnSeparator, TInt aColumn);
01228         };
01229 
01230 
01240 struct SAknLayoutGfx;
01241 struct SAknLayoutText;
01242 struct SAknLayoutCmd;
01243 struct SAknLayoutGfx;
01244 // Not for apps
01245 struct SAknLayoutPos 
01246     {
01247     TInt l, t, r, b, W, H;
01248 
01249     typedef SAknLayoutPos ItemType;
01250     static void ReadResource(TResourceReader& aReader, ItemType& aTarget);    
01251     };
01252 template<class T> class CArrayReader;
01253 class CAknGenericReader : public CBase
01254     {
01255 public:
01256     IMPORT_C void ConstructL(TInt aResourceId);
01257     IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader);
01258     IMPORT_C ~CAknGenericReader();
01259 
01260     IMPORT_C const SAknLayoutGfx* GfxItem(TInt aIndex) const;
01261     IMPORT_C const SAknLayoutText* TextItem(TInt aIndex) const;
01262     IMPORT_C const SAknLayoutCmd* CmdItem(TInt aIndex) const;
01263     IMPORT_C const SAknLayoutGfx* AreaItem(TInt aIndex) const;
01264 
01265     CArrayReader<SAknLayoutGfx>* iGfx;
01266     CArrayReader<SAknLayoutText>* iText;
01267     CArrayReader<SAknLayoutCmd>* iCmd;
01268     CArrayReader<SAknLayoutGfx>* iArea;
01269     };
01270 
01271 
01272 
01273 
01274 
01275 // Use this to mark that the position in LAF specification is empty.
01276 const TInt AknLayoutUtilsNoValue = ELayoutEmpty;
01277 
01309 class AknLayoutUtils
01310     {
01311 public:
01312 
01313     struct SAknLayoutText
01314         {
01315         TInt iFont, iC, iL, iR, iB, iW, iJ;
01316         };
01317     struct SAknLayoutTextMultiline
01318         {
01319         TInt iFont, iC, iL, iR, iB, iW, iJ, iNumberOfLinesShown, iNextLineB;
01320         };
01321     typedef SAknLayoutTextMultiline SAknLayoutLabel;
01322     typedef SAknLayoutTextMultiline SAknLayoutEdwin;
01323     typedef SAknLayoutText SAknLayoutMfne;
01324     typedef SAknLayoutText SAknLayoutSecEd;
01325     struct SAknLayoutRect
01326         {
01327         TInt iC, iL, iT, iR, iB, iW, iH;
01328         };
01329     typedef SAknLayoutRect SAknLayoutControl;
01330     typedef SAknLayoutRect SAknLayoutImage;
01331 
01335     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, TInt aResourceId, const CFont* aCustomFont=0);
01339     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, TResourceReader& aReader, const CFont* aCustomFont=0);
01343     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, const SAknLayoutLabel& aLayout, const CFont *aCustomFont=0);
01347     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, const TAknMultiLineTextLayout& aLayout, const CFont *aCustomFont=0);
01351     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, const TAknTextLineLayout& aLayout, const CFont *aCustomFont=0);
01364     IMPORT_C static void LayoutLabel(CEikLabel* aLabel, const TRect& aLabelParent, TInt font, TInt C, TInt l, TInt r, TInt B, TInt W, TInt J, TInt NextLineB=0, const CFont* aCustomFont=0);
01365 
01369     IMPORT_C static void LayoutEdwin(CEikEdwin* aEdwin, const TRect& aEdwinParent, TInt aResourceId, TInt aNumberOfLines = 0, const CFont* aCustomFont=0, TBool aMinimizeEdwinView=EFalse);
01373     IMPORT_C static void LayoutEdwin(CEikEdwin* aEdwin, const TRect& aEdwinParent, TResourceReader& aReader, TInt aNumberOfLines = 0, const CFont* aCustomFont=0, TBool aMinimizeEdwinView=EFalse);
01374 
01378     IMPORT_C static void LayoutEdwin(CEikEdwin* aEdwin, const TRect& aEdwinParent, const SAknLayoutEdwin& aLayout, const CFont* aCustomFont=0, TBool aMinimizeEdwinView=EFalse);
01383     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01384                                       const TRect& aEdwinParent,
01385                                       const TAknMultiLineTextLayout& aLayout,
01386                                       const CFont* aCustomFont=0,
01387                                       TBool aMinimizeEdwinView=EFalse);
01388 
01389     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01390                                       const TRect& aEdwinParent,
01391                                       const TAknMultiLineTextLayout& aLayout,
01392                                       TAknsQsnTextColorsIndex aOverrideColor,
01393                                       const CFont* aCustomFont=0,
01394                                       TBool aMinimizeEdwinView=EFalse ); 
01395         
01396 
01397 
01398     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01399                                       const TRect& aEdwinParent,
01400                                       const TAknTextLineLayout& aLayout,
01401                                       const CFont* aCustomFont=0,
01402                                       TBool aMinimizeEdwinView=EFalse );
01403 
01404     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01405                                       const TRect& aEdwinParent,
01406                                       const TAknTextLineLayout& aLayout,
01407                                       TAknsQsnTextColorsIndex aOverrideColor,
01408                                       const CFont* aCustomFont=0,
01409                                       TBool aMinimizeEdwinView=EFalse );
01410 
01411 #start_since SINCE_3_1_SDK
01412 
01440     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01441                          const TRect& aEdwinParent,
01442                          const TAknTextLineLayout& aLayout,
01443                          TInt aNumberOfLinesToShowOverRide,
01444                          TInt aBaselineSeparationOverRide,
01445                          TAknsQsnTextColorsIndex aOverrideColor, 
01446                          TInt& aNumberOfVisibleLines );
01447 #end_since SINCE_3_1_SDK
01448                                  
01462     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01463                                       const TRect& aEdwinParent,
01464                                       TInt font,
01465                                       TInt C,
01466                                       TInt l,
01467                                       TInt r,
01468                                       TInt B,
01469                                       TInt W,
01470                                       TInt J,
01471                                       TInt aNumberOfLinesShown,
01472                                       TInt aNextLineBaseline,
01473                                       const CFont* aCustomFont=0 ,
01474                                       TBool aMinimizeEdwinView=EFalse );
01475 
01476     IMPORT_C static void LayoutEdwin( CEikEdwin* aEdwin,
01477                                       const TRect& aEdwinParent,
01478                                       TInt font,
01479                                       TInt C,
01480                                       TInt l,
01481                                       TInt r,
01482                                       TInt B,
01483                                       TInt W,
01484                                       TInt J,
01485                                       TInt aNumberOfLinesShown,
01486                                       TInt aNextLineBaseline,
01487                                       TAknsQsnTextColorsIndex aOverrideColor,
01488                                       const CFont* aCustomFont=0 ,
01489                                       TBool aMinimizeEdwinView=EFalse );
01493     IMPORT_C static TRect MinimizedEdwinRect(const CEikEdwin *aEdwin);
01494 
01495 
01499     IMPORT_C static void LayoutMfne(CEikMfne* aMfne, const TRect& aMfneParent, TInt aResourceId);
01503     IMPORT_C static void LayoutMfne(CEikMfne* aMfne, const TRect& aMfneParent, TResourceReader& aReader);
01504 
01505     IMPORT_C static void LayoutMfne(CEikMfne* aMfne, const TRect& aMfneParent, const SAknLayoutMfne& aLayout);
01506     IMPORT_C static void LayoutMfne(CEikMfne* aMfne, const TRect& aMfneParent, const TAknTextLineLayout& aLayout);
01507     IMPORT_C static void LayoutMfne(CEikMfne* aMfne, const TRect& aMfneParent, TInt font, TInt C, TInt l, TInt r, TInt B, TInt W, TInt J);
01508 
01512     IMPORT_C static void LayoutControl(CCoeControl* aControl, const TRect& aControlParent, TInt aResourceId);
01516     IMPORT_C static void LayoutControl(CCoeControl* aControl, const TRect& aControlParent, TResourceReader& aReader);
01517 
01518     IMPORT_C static void LayoutControl(CCoeControl* aControl, const TRect& aControlParent, const SAknLayoutControl& aLayout);
01519     IMPORT_C static void LayoutControl(CCoeControl* aControl, const TRect& aControlParent, const TAknWindowLineLayout& aLayout);
01520     IMPORT_C static void LayoutControl(CCoeControl* aControl, const TRect& aControlParent, TInt /*C*/, TInt l, TInt t, TInt r, TInt b, TInt W, TInt H);
01521 
01525     IMPORT_C static void LayoutImage(CEikImage* aImage, const TRect& aParent, TInt aResourceId);
01529     IMPORT_C static void LayoutImage(CEikImage* aImage, const TRect& aParent, TResourceReader& aReader);
01530 
01531     IMPORT_C static void LayoutImage(CEikImage* aImage, const TRect& aParent, const SAknLayoutControl& aLayout);
01532     IMPORT_C static void LayoutImage(CEikImage* aImage, const TRect& aParent, const TAknWindowLineLayout& aLayout);
01533     IMPORT_C static void LayoutImage(CEikImage* aImage, const TRect& aParent, TInt C, TInt l, TInt t, TInt r, TInt b, TInt W, TInt H);
01534 
01538     IMPORT_C static void LayoutSecretEditor(CEikSecretEditor* aSecEd, const TRect& aParent, const SAknLayoutText& aLayout);
01539     IMPORT_C static void LayoutSecretEditor(CEikSecretEditor* aSecEd, const TRect& aParent, const TAknTextLineLayout& aLayout);
01540 
01541 public:
01547     IMPORT_C static TRect TextRectFromCoords(const TRect& aParent, const CFont* aFont, TInt l, TInt r, TInt B, TInt W, TInt LB = 0);
01548     IMPORT_C static TRect RectFromCoords(const TRect& aParent, TInt l, TInt t, TInt r, TInt b, TInt W, TInt H);
01549 
01568     IMPORT_C static const CFont* FontFromId(TInt aFontId, const CFont* aCustomFont=0);
01569 
01587     IMPORT_C static const CAknLayoutFont* LayoutFontFromId(TInt aId, const CAknLayoutFont *aCustomFont = 0);
01588 
01598     IMPORT_C static CAknLayoutFont* CreateLayoutFontFromSpecificationL( 
01599         const TAknFontSpecification& aSpec );
01600 
01613     IMPORT_C static CAknLayoutFont* CreateLayoutFontFromSpecificationL( 
01614         const TTypeface& aTypeface, 
01615         const TAknFontSpecification& aSpec);
01616 
01620     IMPORT_C static const CFont* FontFromName(const TDesC& aName); 
01621 
01622         IMPORT_C static CGraphicsContext::TTextAlign TextAlignFromId(TInt aId);
01623     IMPORT_C static TGulAlignment GulAlignFromId(TInt aId);
01624 
01625         IMPORT_C static TInt CursorHeightFromFont(const TFontSpec& aFont);
01626         IMPORT_C static TInt CursorWidthFromFont (const TFontSpec& aFont);
01627         IMPORT_C static TInt CursorAscentFromFont(const TFontSpec& aFont);
01628         IMPORT_C static void CursorExtensionsFromFont(const TFontSpec& /*aFont*/, TInt& aFirstExtension, TInt& aSecondExtension);
01629 
01630         IMPORT_C static TInt HighlightLeftPixelsFromFont (const TFontSpec& aFont);
01631         IMPORT_C static TInt HighlightRightPixelsFromFont(const TFontSpec& aFont);
01632     static void HighlightExtensionsFromFont(const TInt fontid, TInt& aLeft, TInt& aRight, TInt&  aTop, TInt& aBottom);
01633 
01646     static const CAknLayoutFont* MatchFontFromSystemFontArray( 
01647         const TFontSpec& aSpec, MGraphicsDeviceMap* aMap );
01648 
01649         IMPORT_C static TBool LayoutMirrored();
01650 
01651     /*
01652     * This method returns build variant based on which flag is active,
01653     * __AVKON_ELAF__ or __AVKON_APAC__.
01654     *
01655     * If you need to decide which layout to use, do not do it based on this method.
01656     * Instead, use CAknEnv::GetCurrentLayoutId().
01657     *
01658     * @return current variant
01659     */
01660         IMPORT_C static EVariantFlag Variant();
01661 
01662     IMPORT_C static ESubVariantFlag SubVariant();
01663 
01664         IMPORT_C static void OverrideControlColorL(CCoeControl& aControl, TLogicalColor aLogicalColor, TRgb aColor);
01665     
01666     /*
01667     * This method returns the default scrollbar type for the given application. 
01668     * For non-layout aware applications (e.g. legacy apps designed for 176x208 screen) 
01669     * this method returns always EArrowHead. But for layout aware apps the returned type 
01670     * may vary depending on the type of scrollbar which has been set as preferred 
01671     * scrollbar type in the device.
01672     *
01673     * Note that applications may use freely whatever scrollbartype, this method only 
01674     * returns the default scrollbartype for the application.
01675     * 
01676     * 
01677     * @param  aApplication Application of which default scrollbar type is requested.
01678     * @return Default scrollbar type for the given application
01679     */
01680     IMPORT_C static CEikScrollBarFrame::TScrollBarType DefaultScrollBarType(CAknAppUiBase* aApplication);
01681 
01682     /*
01683     * This method sets the layout for vertical scrollbar of the given scrollbar frame. Layout
01684     * can freely only be set for EDoubleSpan type scrollbars.
01685     * 
01686     * 
01687     * @param  aScrollBarFrame   Scrollbarframe of which vertical scrollbar layout will be set.
01688     * @param  aControlParent    Rect of the parent control of the scrollbarframe.
01689     * @param  aLayout           Layout for the vertical scrollbar.
01690     *
01691     *
01692     * This method can also be useful when layout of the scrollbar needs to be changed for scrollbars
01693     * which are owned by some other components such as e.g. ListBoxes, Editors or Grids.
01694     *
01695     * Example of use:
01696     *
01697     *  // Get a pointer to scrollbarframe of the listbox
01698     *  CEikScrollBarFrame* frame = iListBox->ScrollBar();
01699     *  
01700     *  // Get the layout data
01701     *  TAknWindowLineLayout layout = GetMyListBoxLayout();
01702     *  Trect parentRect = GetMyListBoxParentRect();
01703     *
01704     *  // Set the layout
01705     *  AknLayoutUtils::LayoutVerticalScrollBar(frame, parentRect, layout);
01706     *
01707     *  // The layout for scrollbar is now set.
01708     *
01709     */
01710     IMPORT_C static void LayoutVerticalScrollBar(CEikScrollBarFrame* aScrollBarFrame, const TRect& aControlParent, const TAknWindowLineLayout& aLayout);
01711 
01712     /*
01713     * This method sets the layout for horizontal scrollbar of the given scrollbar frame. Layout
01714     * can freely only be set for EDoubleSpan type scrollbars.
01715     * 
01716     * 
01717     * @param  aScrollBarFrame   Scrollbarframe of which horizontal scrollbar layout will be set.
01718     * @param  aControlParent    Rect of the parent control of the scrollbarframe.
01719     * @param  aLayout           Layout for the horizontal scrollbar.
01720     *
01721     *
01722     * Usage of this method is similar as for LayoutVerticalScrollBar().
01723     *
01724     */
01725     IMPORT_C static void LayoutHorizontalScrollBar(CEikScrollBarFrame* aScrollBarFrame, const TRect& aControlParent, const TAknWindowLineLayout& aLayout);
01726 
01727 public:   // Metrics API
01728 
01732     enum TAknLayoutMetrics
01733     {
01735         EScreen,
01736         
01738         EApplicationWindow,
01739         
01741         EStatusPane,
01742         
01744         EMainPane,
01745         
01747         EControlPane,   
01748         
01750         ESignalPane,
01751         
01753         EContextPane,
01754         
01756         ETitlePane,
01757         
01759         EBatteryPane,
01760         
01765         EUniversalIndicatorPane,
01766         
01772                 ENaviPane,
01773         
01777         EFindPane,
01778         
01780         EWallpaperPane,
01781         
01786         EIndicatorPane,
01787         
01789         EAColunm,
01790         
01792         EBColunm,
01793         
01798                 ECColunm,
01799         
01804         EDColunm,
01805         
01807         EStatusPaneSecondary,
01808         
01810         EControlPaneSecondary,
01811         
01813         EStaconTop,
01814         
01816         EStaconBottom,
01817         
01819         EStatusPaneBottom = EStatusPaneSecondary,
01820         
01822         EControlPaneBottom = EControlPaneSecondary,
01823         
01825         EControlPaneTop = EControlPane,
01826         
01828         EStatusPaneTop = EStatusPane
01829     };
01830 
01831 
01845     IMPORT_C static TBool LayoutMetricsRect(TAknLayoutMetrics aParam, TRect& aRect);
01846 
01860     IMPORT_C static TBool LayoutMetricsSize(TAknLayoutMetrics aParam, TSize& aSize);
01861 
01875         IMPORT_C static TBool LayoutMetricsPosition(TAknLayoutMetrics aParan, TPoint& aPos);
01876 public:
01891         static TInt CorrectBaseline(TInt aParentHeight, TInt aBaseline, TInt aFontId);
01892 
01896         static void CorrectFontId(TRect aParent, TInt at, TInt aH, TInt ab, TInt &aFontId);
01897 
01904         IMPORT_C static TBool ScalableLayoutInterfaceAvailable();
01905         
01906         /*
01907         * Enumeration of CBA's possible locations.
01908         * 
01909         */
01910         enum TAknCbaLocation
01911                 {
01912                 EAknCbaLocationBottom, //landscape and portrait
01913                 EAknCbaLocationRight,  //only landscape
01914                 EAknCbaLocationLeft    //only landscape
01915                 };
01916         
01925         IMPORT_C static TAknCbaLocation CbaLocation();
01926 
01933     static TRect HighlightBasedRect( const TRect& aHighlightRect, CCoeControl* aControl );
01934 
01935 #start_since SINCE_3_1_SDK
01936 
01940         enum TAknMainPaneState 
01941                 {
01942                 EAknMainPaneForTinyStatusPane = 0x0001  // for 3x4 grid or app shell list views
01943                 };
01944         IMPORT_C static TAknMainPaneState MainPaneState();
01945 #end_since SINCE_3_1_SDK
01946 
01947 #start_since SINCE_3_1_SDK
01948 
01953     IMPORT_C static TBool PenEnabled();
01954 #end_since SINCE_3_1_SDK
01955     
01956 #start_since SINCE_3_1_SDK
01957 
01962     IMPORT_C static TBool MSKEnabled();
01963 #end_since SINCE_3_1_SDK
01964 
01965 #start_since SINCE_3_1_SDK
01966 
01992     IMPORT_C static void GetEdwinVerticalPositionAndHeightFromLines(
01993         TInt aParentHeight,
01994         const TAknTextLineLayout& aLayout,
01995         TInt aBaselineSeparationOverRide,
01996         TInt aNumberOfLinesToShowOverRide,
01997         TInt& aEdwinVerticalPositionRelativeToParent,
01998         TInt& aEdwinHeight
01999         );
02000 #end_since SINCE_3_1_SDK
02001        
02002 #start_since SINCE_3_1_SDK
02003 
02023     IMPORT_C static TInt EdwinLinesWithinHeight (
02024         const TAknTextLineLayout& aLayout,
02025         TInt aBaselineSeparationOverride,
02026         TInt aMaxHeight,
02027         TInt& aUsedHeight
02028         );
02029 #end_since SINCE_3_1_SDK
02030 };
02031 
02036 class TAknLayoutText
02037     {
02038 public:
02039     IMPORT_C TAknLayoutText();
02044     IMPORT_C void LayoutText(const TRect& aParent, TInt aResourceId, const CFont* aCustomFont=0);
02045     IMPORT_C void LayoutText(const TRect& aParent, TResourceReader& aReader, const CFont* aCustomFont=0);
02046     IMPORT_C void LayoutText(const TRect& aParent, const AknLayoutUtils::SAknLayoutText& aLayout, const CFont* aCustomFont=0);
02047     IMPORT_C void LayoutText(const TRect& aParent, const TAknTextLineLayout& aLayout, const CFont* aCustomFont=0);
02048     IMPORT_C void LayoutText(const TRect& aParent, TInt fontid, TInt C, TInt l, TInt r, TInt B, TInt W, TInt J, const CFont* aCustomFont=0);
02049 
02052     IMPORT_C void DrawText(CGraphicsContext& aGc, const TDesC& aText) const;
02053     
02059     IMPORT_C void DrawText(
02060         CGraphicsContext& aGc,
02061         const TDesC& aText,
02062         TBool aUseLogicalToVisualConversion ) const;
02063 
02064     IMPORT_C void DrawText(
02065         CGraphicsContext& aGc,
02066         const TDesC& aText,
02067         TBool aUseLogicalToVisualConversion,
02068         const TRgb &aColor) const;
02069                            
02070 
02071 public:
02077     IMPORT_C TRect TextRect() const;
02078     const CFont *Font() const { return iFont; }
02079     TRgb Color() const { return AKN_LAF_COLOR_STATIC(iColor); }
02080     CGraphicsContext::TTextAlign Align() const { return iAlign; }
02081 #start_since SINCE_3_1_SDK
02082 
02101     TInt BaselineOffset() const;
02102 #end_since SINCE_3_1_SDK
02103 private:
02104     TRect iTextRect;
02105     const CFont *iFont; // not owned..
02106     TInt iColor;
02107     TInt iOffset;
02108     CGraphicsContext::TTextAlign iAlign;
02109     friend class CBubbleOutlookNumberEntry;
02110     };
02111 
02120 class TAknLayoutRect
02121     {    
02122 public:
02123     IMPORT_C TAknLayoutRect();
02126     IMPORT_C void LayoutRect(const TRect &aParent, TInt aResourceId);
02127     IMPORT_C void LayoutRect(const TRect &aParent, TResourceReader &aReader);
02128     IMPORT_C void LayoutRect(const TRect &aParent, const AknLayoutUtils::SAknLayoutRect &aLayout);
02129     IMPORT_C void LayoutRect(const TRect &aParent, const TAknWindowLineLayout &aLayout);
02130     IMPORT_C void LayoutRect(const TRect &aParent, TInt C, TInt l, TInt t, TInt r, TInt b, TInt W, TInt H);
02131     
02140     IMPORT_C TRgb Color() const;
02143     IMPORT_C TRect Rect() const;
02144         TBool Valid() const;
02145 
02148     IMPORT_C void DrawRect(CWindowGc& aGc) const;
02149     IMPORT_C void DrawOutLineRect(CWindowGc& aGc) const;
02150     IMPORT_C void DrawImage(CBitmapContext& aGc, CFbsBitmap* aBitmap, CFbsBitmap* aMask) const;
02151 private:
02152     TInt iColor;
02153     TRect iRect;
02154     };
02155 
02159 class AknDraw 
02160     {
02161 public:
02168     IMPORT_C static void DrawEmptyList(const TRect& aRect, CWindowGc& aGc, TPtrC aText);
02175     IMPORT_C static void DrawEmptyListForSettingPage(const TRect &aRect, CWindowGc &aGc, TPtrC text); // only for setting page with empty layout.
02182     IMPORT_C static void DrawEmptyListWithFind(const TRect& aClientRect, CWindowGc& aGc, TPtrC aText); // only for fixed find pane used with single graphics listbox..
02189     IMPORT_C static void DrawEmptyListHeading(const TRect &aClientRect, CWindowGc& aGc, TPtrC aText); // only heading style lists.
02190     // The following is optimization for drawing window shadows.
02199     IMPORT_C static void DrawWindowShadow(CWindowGc& aGc, const TAknLayoutRect& aCoverRect, const TAknLayoutRect& aSecondShadowRect, const TAknLayoutRect& aFirstShadowRect, const TAknLayoutRect& aOutlineFrameRect, const TAknLayoutRect& aInsideAreaRect);
02200 public:
02201 
02220     IMPORT_C static void DrawEmptyListImpl( const TRect& aRect,
02221                                             CWindowGc& aGc,
02222                                             TPtrC aText,
02223                                             TInt aLayoutLine1,
02224                                             TInt aLayoutLine2 );
02225     
02226     };
02227 
02231 class AknDrawWithSkins
02232     {
02233 public:
02240     IMPORT_C static void DrawEmptyList(const TRect& aRect, CWindowGc& aGc, TPtrC aText, CCoeControl *aControl);
02247     IMPORT_C static void DrawEmptyListForSettingPage(const TRect &aRect, CWindowGc &aGc, TPtrC text, CCoeControl *aControl); // only for setting page with empty layout.
02254     IMPORT_C static void DrawEmptyListWithFind(const TRect& aClientRect, CWindowGc& aGc, TPtrC aText, CCoeControl *aControl); // only for fixed find pane used with single graphics listbox..
02261     IMPORT_C static void DrawEmptyListHeading(const TRect &aClientRect, CWindowGc& aGc, TPtrC aText, CCoeControl *aControl); // only heading style lists.
02262     // The following is optimization for drawing window shadows.
02271     IMPORT_C static void DrawWindowShadow(CWindowGc& aGc, const TAknLayoutRect& aCoverRect, const TAknLayoutRect& aSecondShadowRect, const TAknLayoutRect& aFirstShadowRect, const TAknLayoutRect& aOutlineFrameRect, const TAknLayoutRect& aInsideAreaRect, CCoeControl *aControl);
02272     
02273     };
02274 
02275 
02276 
02277 
02278 // Browser and calculator fonts will not be placed here. Application
02279 // can use them themselves with CEikonEnv::Static()->Font() call.
02280 IMPORT_C const CFont *LatinPlain12();
02281 IMPORT_C const CFont *LatinBold12();
02282 IMPORT_C const CFont *LatinBold13();
02283 IMPORT_C const CFont *LatinBold16(); // since 2.0
02284 IMPORT_C const CFont *LatinBold17();
02285 IMPORT_C const CFont *LatinBold19(); 
02286 IMPORT_C const CFont *NumberPlain5();
02287 IMPORT_C const CFont *ClockBold30();
02288 IMPORT_C const CFont *LatinClock14();
02289 const CFont *CalcBold21();
02290 const CFont *CalcOperBold21();
02291 const CFont *CalcOperBold13();
02292 
02293 
02294 
02295 IMPORT_C const CFont *ApacPlain12();
02296 IMPORT_C const CFont *ApacPlain16();
02297 
02298 
02325 IMPORT_C TInt CompleteWithAppPath( TDes& aFileName );
02326 
02335 TBool IsParentRelative(TInt aVal);
02336 
02344 IMPORT_C TInt DefaultInputLanguageFromUILanguage(const TInt aUiLanguage);
02345 
02346 #start_since SINCE_3_1_SDK
02347 
02356 IMPORT_C void SetKeyblockMode( TAknKeyBlockMode aMode );
02357 #end_since SINCE_3_1_SDK
02358 
02359 #start_since SINCE_3_1_SDK
02360 
02363 namespace AknDateTimeUtils
02364     {
02375     IMPORT_C void ConvertUtcTimeToHomeTime( TTime& aTime );
02376     }
02377 #end_since SINCE_3_1_SDK
02378 
02379 #start_since SINCE_3_1_SDK
02380 
02383 namespace AknLangUtils
02384     {
02391     IMPORT_C HBufC* DisplayLanguageTagL();
02392     }
02393 #end_since SINCE_3_1_SDK
02394 
02395 //  __AKNUTILS_H__
02396 #endif
02397 
02398 // End of file
02399 
02400 
02401 
02402 
02403 
02404 
02405 
02406 
02407 

Copyright © Nokia Corporation 2001-2007
Back to top