epoc32/include/mw/brctllayoutobserver.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/brctllayoutobserver.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/brctllayoutobserver.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,109 @@
     1.4 -brctllayoutobserver.h
     1.5 +/*
     1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Handle scrollbar and tab events
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef BRCTLLAYOUTOBSERVER_H
    1.24 +#define BRCTLLAYOUTOBSERVER_H
    1.25 +
    1.26 +//  INCLUDES
    1.27 +#include <e32std.h>
    1.28 +#include <e32base.h>
    1.29 +
    1.30 +
    1.31 +/**
    1.32 +* Defines whether a page is to be read from left-to-right or from right-to-left.
    1.33 +*/
    1.34 +enum TBrCtlLayout
    1.35 +  {
    1.36 +  EOriginTopLeft, ///< Page is to be read from left-to-right
    1.37 +  EOriginTopRight ///< Page is to be read from right-to-left
    1.38 +  };
    1.39 +
    1.40 +enum TBrCtlTabDirection
    1.41 +    {
    1.42 +    ETabLeft,
    1.43 +    ETabRight,
    1.44 +    ETabUp,
    1.45 +    ETabDown
    1.46 +    };
    1.47 +
    1.48 +/**
    1.49 +* The MBrCtlLayoutObserver class receives 
    1.50 +* scrolling events when the host application draws the scrollbar. 
    1.51 +*
    1.52 +* Usage:
    1.53 +*
    1.54 +* @code
    1.55 +*  #include <BrCtlLayoutObserver.h>
    1.56 +*
    1.57 +*  
    1.58 +* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
    1.59 +* @lib BrowserEngine.lib
    1.60 +* @file BrCtlLayoutObserver.h
    1.61 +* @endcode     *
    1.62 +*/
    1.63 +class MBrCtlLayoutObserver
    1.64 +    {
    1.65 +    public: // New functions
    1.66 +        
    1.67 +        /**
    1.68 +        * Update the position of vertical scrollbar.
    1.69 +        * @since 2.8
    1.70 +        * @param aDocumentHeight The total height of the markup page
    1.71 +        * @param aDisplayHeight The height of the display
    1.72 +        * @param aDisplayPosY The current Y position
    1.73 +        * @return void
    1.74 +        */
    1.75 +        virtual void UpdateBrowserVScrollBarL(TInt aDocumentHeight, 
    1.76 +                                              TInt aDisplayHeight,
    1.77 +                                              TInt aDisplayPosY ) = 0;
    1.78 +
    1.79 +        /**
    1.80 +        * Update the position of horizontal scrollbar.
    1.81 +        * @since 2.8
    1.82 +        * @param aDocumentWidth The total width of the markup page
    1.83 +        * @param aDisplayWidth The width of the display
    1.84 +        * @param aDisplayPosX The current X position
    1.85 +        * @return void
    1.86 +        */
    1.87 +        virtual void UpdateBrowserHScrollBarL(TInt aDocumentWidth, 
    1.88 +                                              TInt aDisplayWidth,
    1.89 +                                              TInt aDisplayPosX ) = 0;
    1.90 +
    1.91 +        /**
    1.92 +        * Inform the layout of the page: right to left or left to right. 
    1.93 +        * Useful when the application draws the scrollbar itself.
    1.94 +        * @since 2.8
    1.95 +        * @param aNewLayout RTL (right to left) or LTR (left to right)
    1.96 +        * @return void
    1.97 +        * @attention This function is useful when the host application draws the scrollbar.
    1.98 +        * In RTL pages, the scroll bar should be on the left side. 
    1.99 +        */
   1.100 +        virtual void NotifyLayoutChange( TBrCtlLayout aNewLayout ) = 0;
   1.101 +        
   1.102 +        /**
   1.103 +        * Update the title of the page in history view
   1.104 +        * @since 3.0
   1.105 +        * @param aTitle Title of the page
   1.106 +        * @return void
   1.107 +        */
   1.108 +        virtual void UpdateTitleL( const TDesC& aTitle ) = 0;        
   1.109 +    };
   1.110 +
   1.111 +#endif      // BRCTLLAYOUTOBSERVER_H
   1.112 +            
   1.113 +// End of File