epoc32/include/mw/eikspane.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
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 /*
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  EIKON Status Pane control.
    15 *
    16 */
    17 
    18 
    19 #ifndef __EIKSPANE_H__
    20 #define __EIKSPANE_H__
    21 
    22 #include <eikspmod.h>
    23 #include <coecntrl.h>
    24 #include <coecobs.h>
    25 
    26 class CCoeBrushAndPenContext;
    27 class CEikStatusPaneContainer;
    28 class CEikStatusPaneBaseExtension;
    29 class CAknStatuspaneClearer;
    30 class CAknDelayedForegroundObserver;
    31 class CAknStatusPaneDataSubscriber;
    32 class TAknsItemID;
    33 
    34 /**
    35 * Status pane flag indicating that a sub-pane exists
    36 * in the status pane.
    37 */
    38 const TInt KStatusPaneCapsPresentBit         = 1;
    39 
    40 /**
    41 * Status pane flag indicating that a sub-pane is owned
    42 * by the application side status pane.
    43 */
    44 const TInt KStatusPaneCapsAppOwnedBit        = 2;
    45 
    46 /**
    47 * Status pane flag indicating that a sub-pane is part of
    48 * a specific status pane layout.
    49 */
    50 const TInt KStatusPaneCapsInCurrentLayoutBit = 4;
    51 
    52 /**
    53  * The @c MEikStatusPaneObserver interface allows a status pane observer to
    54  * pick up changes in the size or position of the status pane. Such events
    55  * will be as a result of layout changes which cause an actual change in the
    56  * status pane rectangle.
    57  */
    58 class MEikStatusPaneObserver
    59 	{
    60 public:
    61 	virtual void HandleStatusPaneSizeChange() = 0;
    62 	};
    63 
    64 /**
    65  * The base class for status panes.
    66  */
    67 class CEikStatusPaneBase : public CBase
    68 	{
    69 	
    70 public:
    71 
    72     /**
    73      * Describes the capabilities of a subpane.
    74      */
    75     class TPaneCapabilities
    76         {
    77 
    78     public:
    79         
    80         /**
    81         * Constructor.
    82         */
    83         TPaneCapabilities();
    84         
    85         /**
    86         * Tests whether the subpane exists in the status pane.
    87         * 
    88         * @return @c ETrue if the subpane exists and can be used by the
    89         *            application, even if the subpane is not visible.
    90         */
    91         inline TBool IsPresent() const;
    92         
    93         /**
    94         * Tests whether the pane is owned by the application or the server.
    95         * Applications can only interact directly with application owned
    96         * subpanes.
    97         *
    98         * @return @c ETrue if the subpane is owned by the application.
    99         */
   100         inline TBool IsAppOwned() const;
   101         
   102         /**
   103         * Tests if this pane is part of the current status pane layout.
   104         *
   105         * @return @c ETrue if pane is part of the current status pane layout.
   106         */
   107         inline TBool IsInCurrentLayout() const;
   108 
   109     private:
   110 
   111         inline void SetPresent();
   112         inline void SetAppOwned();
   113         inline void SetInCurrentLayout();
   114 
   115     private:
   116 
   117         TInt iFlags;
   118 
   119     private:
   120 
   121         friend class CEikStatusPaneBase;
   122         };
   123 
   124 public:
   125 
   126     /**
   127     * Destructor.
   128     */
   129     IMPORT_C ~CEikStatusPaneBase();
   130 
   131     /**
   132     * Gets a pointer to the thread's currently active status pane
   133     * without transferring ownership. 
   134     *
   135     * @return Pointer to currently active status pane.
   136     *         Returns @c NULL if no such pane exists.
   137     */
   138     IMPORT_C static CEikStatusPaneBase* Current();
   139 	
   140     /**
   141     * Sets the status pane observer.
   142     *
   143     * @param  aObserver  Pointer to status pane observer.
   144     */
   145     inline void SetObserver( MEikStatusPaneObserver* aObserver );
   146 	
   147     /**
   148     * Modifies the bounding rectangle so that it lies next to the
   149     * status pane rectangle.
   150     *
   151     * The status pane always places itself along the edge of the screen, so 
   152     * that it is consistent across applications and the server. It is 
   153     * assumed that the given bounding rectangle does not extend beyond 
   154     * the screen area.
   155     *
   156     * @param[in,out]  aBoundingRect  The bounding rectangle.
   157     */
   158     IMPORT_C void ReduceRect( TRect& aBoundingRect ) const;
   159 	
   160     /**
   161     * Adds and removes pane rectangles from @c aRegion.
   162     *
   163     * @param  aRegion              The two-dimensional area from where
   164     *                              rectangles are removed from or where
   165     *                              rectangles are added to.
   166     * @param  aIncludeAppPanes     If @c ETrue, app panes are added, otherwise
   167     *                              removed.
   168     * @param  aIncludeServerPanes  If @c ETrue, server panes are added, 
   169     *                              otherwise removed.
   170     */
   171     IMPORT_C void GetShapeL( TRegion& aRegion, 
   172                              TBool aIncludeAppPanes, 
   173                              TBool aIncludeServerPanes ) const;
   174 
   175     /**
   176     * Switches to the specified status pane layout.
   177     *
   178     * The actual layout to which this method switches may not be the
   179     * same as specified in @c aLayoutResourceId parameter.
   180     * Eg. if landscape mode status pane layout is set with this method,
   181     * while in portrait mode, it's mapped to the corresponding layout
   182     * in the portrait mode. This should be noted when using
   183     * @c CEikStatusPaneBase::CurrentLayoutResId().
   184     *
   185     * From release 3.2 on the old status pane layouts are also mapped
   186     * to the new layouts, ie.
   187     *  @c R_AVKON_STATUS_PANE_LAYOUT_USUAL ->
   188     *      @c R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT
   189     *
   190     *  @c R_AVKON_STATUS_PANE_LAYOUT_IDLE  ->
   191     *      @c R_AVKON_STATUS_PANE_LAYOUT_IDLE_EXT
   192     *
   193     * @param aLayoutResourceId Layout resource ID. This must be one of the
   194     *                          layouts identified in the status pane
   195     *                          resource structures, otherwise the function
   196     *                          leaves @c KErrNotFound.
   197     *                          @see avkon.rsg
   198     *
   199     * @leave KErrNotFound      The specified layout does not exist in the
   200     *                          status pane resource structures.
   201     */
   202     IMPORT_C virtual void SwitchLayoutL( TInt aLayoutResourceId );
   203 	
   204     /**
   205     * Sets the visibility of the status pane and it's contents.
   206     *
   207     * @param  aVisible  If @c ETrue the status pane and it's contents are set
   208     *                   visible.
   209     */
   210     IMPORT_C virtual void MakeVisible( TBool aVisible );
   211 	
   212     /**
   213     * Sets the status pane and it's contents to dimmed state.
   214     *
   215     * @param  aDimmed  If @c ETrue the status pane and it's contents are
   216     *                  set to dimmed state.
   217     */
   218     IMPORT_C virtual void SetDimmed( TBool aDimmed );
   219 	
   220     /**
   221     * Not implemented.
   222     *
   223     * @param aFaded Not used.
   224     */
   225     IMPORT_C virtual void SetFaded( TBool aFaded );
   226 	
   227     /**
   228     * Handles changes in resources which are shared across the environment.
   229     * This function responds to the changes in resources by propagating them
   230     * to sub-parts of the status pane.
   231     *
   232     * @param  aType  A message type.
   233     */
   234     IMPORT_C virtual void HandleResourceChange( TInt aType );
   235 	
   236     /**
   237     * Returns always @c ETrue. 
   238     *
   239     * @return @c ETrue.
   240     */
   241     IMPORT_C virtual TBool OkToChangeStatusPaneNow();
   242 
   243     /**
   244     * Sets all the visual flags at once
   245     * (@c KEikStatusPaneBaseVisibleBit and
   246     *  @c KEikStatusPaneBaseDimmedBit).
   247     * 
   248     * @param  aFlags  Flags to be set.
   249     */
   250     IMPORT_C void SetFlags( TInt aFlags );
   251 	
   252     /**
   253     * Gets status pane settings.
   254     *
   255     * @return Flags used by status pane base class.
   256     */
   257     IMPORT_C TInt Flags() const;
   258 	
   259     /**
   260     * Gets the visibility of the status pane.
   261     * 
   262     * @return @c ETrue if the status pane is visible.
   263     */
   264     IMPORT_C TBool IsVisible() const;
   265 	
   266     /**
   267     * Gets the dimmed state of the status pane.
   268     * 
   269     * @return @c ETrue if the status pane is dimmed.
   270     */
   271     IMPORT_C TBool IsDimmed() const;
   272 	
   273     /**
   274     * Gets the fade status of the status pane.
   275     * 
   276     * @return @c ETrue if status pane is faded.
   277     */
   278     IMPORT_C TBool IsFaded() const;
   279 
   280     /**
   281     * Gets the capabilities of a sub-pane in the status pane.
   282     * 
   283     * @param   aPaneId  Sub-pane ID.
   284     *
   285     * @return Capabilities of the pane.
   286     */
   287     IMPORT_C TPaneCapabilities PaneCapabilities( TPaneId aPaneId ) const;
   288 	
   289     /**
   290     * Provides the screen rectangle of a sub-pane.
   291     * This can be used to set the size of a new control which you want
   292     * to place in the status pane.
   293     * 
   294     * @param   aPaneId  Sub-pane ID.
   295     *
   296     * @return The sub-pane rectangle.
   297     *
   298     * @leave  KErrNotFound The sub-pane ID is not valid.
   299     */
   300     IMPORT_C TRect PaneRectL( TPaneId aPaneId ) const;
   301 	
   302     /**
   303     * Provides the control currently inside a sub-pane.
   304     * This gives the application direct access to the contents of a pane.
   305     *
   306     * @param   aPaneId  Sub-pane ID.
   307     *
   308     * @return Pointer to the control instance inside the sub-pane.
   309     *
   310     * @leave  KErrNotFound The sub-pane ID is not valid.
   311     */
   312     IMPORT_C CCoeControl* ControlL( TPaneId aPaneId ) const;
   313 	
   314     /**
   315     * Swaps the control currently inside a sub-pane.
   316     * The new control must be a fully constructed control.
   317     * It will be placed inside the status pane, and the current
   318     * content will be returned to the caller. 
   319     * 
   320     * @param  aPaneId      ID of the sub-pane.
   321     * @param  aNewControl  A fully constructed control to
   322     *                      place at @c aPaneId.
   323     *
   324     * @return The control  which was at @c aPaneId.
   325     *
   326     * @leave  KErrNotFound This can occur before ownership of the new
   327     *                      control is taken, if the subpane ID is not valid.
   328     */
   329     IMPORT_C CCoeControl* SwapControlL( TPaneId aPaneId,
   330                                         CCoeControl* aNewControl );
   331 	
   332     /**
   333     * Provides access to the container control of a sub-pane.
   334     * You will need access to the container of a sub pane if you want 
   335     * to swap in a new control. The container control should be set as the
   336     * parent window of the new control.
   337     * It also provides a fast way to get the rectangle of the sub-pane 
   338     * (@see PaneRect()).
   339     *
   340     * @param   aPaneId  ID of the sub-pane.
   341     *
   342     * @return Pointer to the new container control for the sub-pane.
   343     *
   344     * @leave  KErrNotFound The sub-pane ID is not valid.
   345     */
   346     IMPORT_C CCoeControl* ContainerControlL( TPaneId aPaneId ) const;
   347 	
   348     /**
   349     * Provides access to a server-side window group.
   350     *
   351     * @return Pointer to the window group.
   352     */
   353     inline RWindowGroup* WindowGroup() const;
   354 	
   355     /**
   356     * Draws the control.
   357     */
   358     IMPORT_C void DrawNow();
   359 	
   360     /**
   361     * Gets the resource ID of the current layout.
   362     *
   363     * @return The resource ID of the current layout.
   364     *         @see avkon.rsg
   365     */
   366     IMPORT_C TInt CurrentLayoutResId() const;
   367     
   368     /**
   369     * Status pane drawing commands.
   370     */
   371     enum TDrawCmd 
   372         { 
   373         /** Do not draw. */
   374         ENoDraw, 
   375 
   376         /** Draw immediately. */
   377         EDrawNow, 
   378         
   379         /** Draw with low priority. */
   380         EDrawDeferred 
   381         };
   382 
   383     /**
   384     * Sets the skin background ID of sub-panes which
   385     * are in the CBA area.
   386     * @internal This method is not exported.
   387     *
   388     * @param  aBgID     The skin background ID to be set.
   389     * @param  aDrawCmd  Whether the status pane is drawn
   390     *                   when updating the background context,
   391     *                   (@see @c TDrawCmd).
   392     */
   393     void SetCbaAreaBackgroundID( const TAknsItemID& aBgID,
   394                                  CEikStatusPaneBase::TDrawCmd aDrawCmd );
   395     
   396     /**
   397     * Returns the current skin background ID of the sub-panes
   398     * which are in the CBA area.
   399     * @internal This method is not exported.
   400     *
   401     * @return  The skin background ID.
   402     */
   403     TAknsItemID CbaAreaBackgroundID();
   404 
   405 protected:
   406 
   407     /**
   408     * C++ default constructor.
   409     *
   410     * @param  aEikEnv  An environment for creating controls and utility 
   411     *                  functions for manipulating them.
   412     * @param  aParent  Pointer to the parent window group.
   413     */
   414     IMPORT_C CEikStatusPaneBase( CEikonEnv& aEikEnv, RWindowGroup* aParent );
   415 	
   416     /**
   417     * Initializes the status pane with standard values. 
   418     * 
   419     * @param  aCoreResId  ID of the status pane resource.
   420     */
   421     IMPORT_C void BaseConstructL( TInt aCoreResId );
   422 
   423     /**
   424     * Creates a new model for the status pane.
   425     *
   426     * @param  aCoreResId  ID of the status pane resource.
   427     *
   428     * @return Pointer to the new status pane model instance.
   429     */
   430     virtual CEikStatusPaneModelBase* CreateModelL( TInt aCoreResId ) const = 0;
   431 	
   432     /**
   433     * Creates the sub-panes to the status pane.
   434     */
   435     void CreatePanesL();
   436 	
   437     /**
   438     * Creates a sub-pane.
   439     *
   440     * @param[in]  aPaneInit  Initial values for the sub-pane.
   441     */
   442     void CreatePaneL( const TEikStatusPaneInit& aPaneInit );
   443 	
   444     /**
   445     * Gets a container of a specified sub-pane.
   446     *
   447     * @param  aPaneId  The sub-pane ID.
   448     *
   449     * @return Pointer to the container of the sub-pane with a given ID.
   450     */
   451     CEikStatusPaneContainer* Find( TPaneId aPaneId ) const;
   452 
   453     /**
   454     * Can be used to determine whether or not the status pane is on
   455     * application side or server side.
   456     *
   457     * @return @c ETrue if the status pane resides in the application side,
   458     *         @c EFalse if it's on the server side.
   459     */
   460     virtual TBool IsApp() const = 0;
   461 	
   462     /**
   463     * Gets the rectangle of the status pane.
   464     *
   465     * @return The rectangle used by the status pane.
   466     */
   467     inline TRect Rect() const;
   468 	
   469     /**
   470     * Calls @c CCoeControl's @c DrawNow() or @c DrawDeferred() to draw the 
   471     * status pane. If @c aDraw is @c ENoDraw status pane is not drawed.
   472     * 
   473     * @param  aDraw  Status pane drawing command.
   474     */
   475     void DoDrawNow( TDrawCmd aDraw );
   476 	
   477     /**
   478     * Gets the status pane clearer.
   479     *
   480     * @return Pointer to the status pane clearer instance.
   481     */
   482     CAknStatuspaneClearer* Clearer();
   483 	
   484     /**
   485     * Disables the status pane clearer. 
   486     *
   487     * @param  aDisabled  Disabled if @c ETrue.
   488     */
   489     IMPORT_C void DisableClearer( TBool aDisabled );
   490 	
   491     /**
   492     * Prepares the status pane for the application exit.
   493     * Clears the status pane.
   494     */
   495     IMPORT_C void CommonPrepareForAppExit();
   496 
   497 private:
   498 
   499     void DoSwitchLayoutL( TInt aLayoutResourceId, TDrawCmd aDraw );
   500     void ApplyLayoutL( CEikStatusPaneLayout* aLayout, TDrawCmd aDraw );
   501     void SetAllInvisible();
   502     void SetNotNeededInvisible();
   503 
   504 public:
   505     
   506     /**
   507     * Notifies the command button area and status pane observer about the
   508     * status pane size change. If the status pane is an embedded application,
   509     * also this application is notified.
   510     */
   511     void ReportSizeChange();
   512 
   513 private:
   514 
   515     class TSetRectAndVisibility : public MEikStatusPaneLayoutTreeVisitor
   516         {    
   517     public:
   518     
   519         TSetRectAndVisibility( TBool aIsApp, CEikStatusPaneBase* aStatusPane );
   520         void VisitL( CEikStatusPaneLayoutTree* aNode );
   521     
   522     private:
   523     
   524         TBool iIsApp;
   525         CEikStatusPaneBase* iStatusPane;
   526         };
   527 	
   528 	friend class TSetRectAndVisibility;
   529 
   530 private:
   531 
   532     void  SetLastUsedResourceId( TInt aResourceId );
   533     TInt  LastUsedResourceId();
   534     TInt  ReadInitialUsedResourceIdL( TInt aCoreResId );    
   535     TInt  InitialUsedResourceId();
   536     TRect LargestBoundingRect( TRegion& aWholeRegion,
   537                                TRegion& aRemovedRegion ) const;
   538     void SetCombinedPaneVisibilityL( TBool aVisible );
   539 
   540 protected:
   541 
   542     /**
   543     * Gets the status pane data subscriber.
   544     *
   545     * @return Pointer to the status pane data subscriber.
   546     */
   547 	CAknStatusPaneDataSubscriber* DataSubscriber() const;
   548 
   549     /**
   550     * Sets the initial status pane resource ID to an extension class 
   551     * @c CEikStatusPaneBaseExtension.
   552     *
   553     * @param  aResourceId  The initial status pane resource ID.
   554     */
   555     void SetInitialUsedResourceId( TInt aResourceId );
   556     
   557     /**
   558     * Optimizes the status pane region which cleared during
   559     * status pane layout change.
   560     *
   561     * @param         aOldResourceId  Old status pane resource ID.
   562     * @param         aNewResourceId  New status pane resource ID.
   563     * @param[in,out] aRegion         Status pane region.
   564     *                                On return contains only
   565     *                                the region that needs to be cleared.
   566     */
   567 	void OptimizeClearerWindowShape( TInt aOldResourceId,
   568 	                                 TInt aNewResourceId,
   569 	                                 TRegion& aRegion );
   570 
   571 	/**
   572 	* Sets redraw storing state of the window.
   573 	*
   574 	* @param  aWindow  The window whose redraw storing state is to be set.
   575 	* @param  aOn      @c ETrue to turn redraw storing on.
   576 	*/	
   577 	void SetStoreHandler( RWindow* aWindow, TBool aOn );
   578 
   579 protected:
   580 
   581     /**
   582     * An environment for creating controls and utility functions for 
   583     * manipulating them.
   584     */
   585     CEikonEnv& iEikEnv;
   586 	
   587     /**
   588     * Status pane model class. <br>
   589     * Own.
   590     */
   591     CEikStatusPaneModelBase* iModel;
   592 
   593     /**
   594     * Flags for the status pane.
   595     */
   596     TInt iFlags;
   597 
   598 protected:
   599 
   600 	typedef CArrayPtrFlat<CEikStatusPaneContainer> CContainerControls;
   601 	CContainerControls* iControls;
   602 	
   603 private:
   604 
   605 	MEikStatusPaneObserver* iObserver;
   606 	RWindowGroup* iParentWindowGroup;
   607 	CEikStatusPaneBaseExtension* iExtension;
   608 	};
   609 
   610 /**
   611  * Application side status pane class.
   612  *
   613  * @c CEikStatusPane is the interface through which applications use the
   614  * status pane. This class synchronises the status pane layout with the
   615  * server side status pane object. To do this, the @c ApplyCurrentSettingsL()
   616  * method must be called whenever the owner application switches to the
   617  * foreground.
   618  */
   619 NONSHARABLE_CLASS( CEikStatusPane ) : public CEikStatusPaneBase,
   620                                       public MCoeForegroundObserver
   621 	{
   622 public:
   623 
   624     /**
   625     * Two-phased constructor.
   626     *
   627     * @param  aEikEnv                    An environment for creating controls
   628     *                                    and utility functions for
   629     *                                    manipulating them.
   630     * @param  aParent                    Pointer to the parent window group.
   631     * @param  aCoreStatusPaneModelResId  Status pane core resource ID.
   632     * @param  aAppStatusPaneModelResId   Resource ID of the application's
   633     *                                    status pane.
   634     *
   635     * @return Pointer to the created @c CEikStatusPane object.
   636     */
   637 	IMPORT_C static CEikStatusPane* NewL(
   638         CEikonEnv& aEikEnv,
   639         RWindowGroup* aParent,
   640         TInt aCoreStatusPaneModelResId,
   641         TInt aAppStatusPaneModelResId = EEikStatusPaneUseDefaults );
   642 
   643     /**
   644     * Destructor.
   645     */
   646 	IMPORT_C ~CEikStatusPane();
   647     
   648     /**
   649     * Synchronises the server status pane layout with the
   650     * application status pane.
   651     */
   652 	IMPORT_C void ApplyCurrentSettingsL();
   653 	
   654 	/**
   655     * Prepares the status pane for the application exit.
   656     * Clears the status pane.
   657     */
   658 	IMPORT_C void PrepareForAppExit();
   659 
   660 	/**
   661     * Sets the visiblility of the status pane and its contents.
   662     * From @c CEikStatusPaneBase.
   663     *
   664     * @param aVisible If @c ETrue the status pane and its
   665     *                 contents are set visible.
   666     */
   667 	IMPORT_C virtual void MakeVisible( TBool aVisible );
   668 	
   669 	/**
   670     * Sets the status pane and its contents to dimmed state.
   671     * From @c CEikStatusPaneBase.
   672     *
   673     * @param aDimmed If @c ETrue the status pane and its
   674     *                contents are set to dimmed state.
   675     */
   676 	IMPORT_C virtual void SetDimmed( TBool aDimmed );
   677 	
   678 	/**
   679     * Not implemented.
   680     * From @c CEikStatusPaneBase.
   681     *
   682     * @param aFaded Not used.
   683     */
   684 	IMPORT_C virtual void SetFaded( TBool aFaded );
   685 	
   686 	/**
   687     * Handles changes in resources which are shared across the environment.
   688     * This function responds to the changes in resources by propagating them
   689     * to sub-parts of the status pane.
   690     * From @c CEikStatusPaneBase.
   691     *
   692     * @param  aType  A message type.
   693     */
   694 	IMPORT_C virtual void HandleResourceChange( TInt aType );
   695 	
   696 	/**
   697     * Returns always @c ETrue. 
   698     * From @c CEikStatusPaneBase.
   699     *
   700     * @return @c ETrue.
   701     */
   702 	IMPORT_C virtual TBool OkToChangeStatusPaneNow();
   703 
   704 private:
   705 
   706     /**
   707     * Default C++ constructor.
   708     *
   709     * @param  aEikEnv                    An environment for creating controls
   710     *                                    and utility functions for
   711     *                                    manipulating them.
   712     * @param  aParent                    Pointer to the parent window group.
   713     * @param  aAppStatusPaneModelResId   Resource ID of the application's
   714     *                                    status pane.
   715     */
   716 	CEikStatusPane( CEikonEnv& aEikEnv,
   717 	                RWindowGroup* aParent,
   718 	                TInt aAppStatusPaneModelId );
   719 
   720     /**
   721     * Second-phase constructor.
   722     *
   723     * @param  aCoreStatusPaneModelResId  Status pane core resource ID.
   724     */
   725 	void ConstructL( TInt aCoreStatusPaneModelResId );
   726 
   727     /**
   728     * Creates the application side status pane model.
   729     *
   730     * @param  aCoreResId  Status pane core resource ID.
   731     */
   732 	virtual CEikStatusPaneModelBase* CreateModelL( TInt aCoreResId ) const;
   733 	
   734 	/**
   735     * Can be used to determine whether or not the status pane is on
   736     * application side or server side.
   737     *
   738     * @return @c ETrue
   739     */
   740 	TBool IsApp() const;
   741 
   742     /**
   743     * Applies the current status pane flags.
   744     */
   745 	void ApplyCurrentFlags();
   746 	
   747 	/**
   748 	* Hides all the sub-panes owned by the application
   749 	* side status pane.
   750 	*/
   751 	void HideAppPanes( TBool aHide );
   752 
   753 private: // From base class @c MCoeForegroundObserver.
   754 
   755     /**
   756     * Handles foreground gain events.
   757     */
   758 	void HandleGainingForeground();
   759 	
   760 	/**
   761     * Handles foreground lose events.
   762     */
   763 	void HandleLosingForeground();
   764 	
   765 private:
   766 	
   767 	/**
   768     * Reads the initial status pane layout from the status pane resources.
   769     *
   770     * @param  aCoreResId                Status pane core resource ID.
   771     * @param  aAppStatusPaneModelResId  Resource ID specified by the
   772     *                                   application.
   773     */
   774     TInt ReadInitialUsedResourceIdL( TInt aCoreResId,
   775                                      TInt aAppStatusPaneModelResId );
   776 
   777     /**
   778     * Handles foreground lose events.
   779     */
   780     void DoHandleLosingForegroundL();
   781 
   782 private:
   783 
   784 	TInt iAppDeclId;
   785 	
   786 	/** Formerly TEikStatusPaneSyncDrawer* iSyncDrawer */
   787 	TAny* iSpare;
   788 	
   789 	/** Formerly iServerSpWgId */
   790 	CAknDelayedForegroundObserver* iDelayedForegroundObserver;
   791 	};
   792 
   793 /**
   794 * Checks if the pane exists in this status pane.
   795 * Note: this will return @c ETrue if the pane can be used,
   796 * even if it is not visible.
   797 */
   798 inline TBool CEikStatusPaneBase::TPaneCapabilities::IsPresent() const
   799     {
   800     return iFlags & KStatusPaneCapsPresentBit;
   801     }
   802     
   803 /**
   804 * Checks if this pane is owned by application rather than the server.
   805 * Applications can only interact directly with application owned panes.
   806 */
   807 inline TBool CEikStatusPaneBase::TPaneCapabilities::IsAppOwned() const
   808     {
   809     return iFlags & KStatusPaneCapsAppOwnedBit;
   810     }
   811     
   812 /**
   813 * Checks if this pane is part of the current status pane layout.
   814 */
   815 inline TBool CEikStatusPaneBase::TPaneCapabilities::IsInCurrentLayout() const
   816     {
   817     return iFlags & KStatusPaneCapsInCurrentLayoutBit;
   818     }
   819 
   820 /**
   821 * Set the status pane observer.
   822 */
   823 inline void CEikStatusPaneBase::SetObserver( MEikStatusPaneObserver* aObserver )
   824     {
   825     iObserver = aObserver;
   826     }
   827 
   828 /**
   829 * Gets the status pane rectangle.
   830 */
   831 inline TRect CEikStatusPaneBase::Rect() const
   832     {
   833     return iModel->CurrentLayout()->Rect();
   834     }
   835 
   836 /**
   837 * Gets the window group that this status pane belongs to.
   838 */
   839 inline RWindowGroup* CEikStatusPaneBase::WindowGroup() const
   840     {
   841     return iParentWindowGroup;
   842     }
   843 
   844 #endif // __EIKSPANE_H__