williamr@2: /* williamr@2: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Handle scrollbar and tab events williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef BRCTLLAYOUTOBSERVER_H williamr@2: #define BRCTLLAYOUTOBSERVER_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: williamr@2: williamr@2: /** williamr@2: * Defines whether a page is to be read from left-to-right or from right-to-left. williamr@2: */ williamr@2: enum TBrCtlLayout williamr@2: { williamr@2: EOriginTopLeft, ///< Page is to be read from left-to-right williamr@2: EOriginTopRight ///< Page is to be read from right-to-left williamr@2: }; williamr@2: williamr@2: enum TBrCtlTabDirection williamr@2: { williamr@2: ETabLeft, williamr@2: ETabRight, williamr@2: ETabUp, williamr@2: ETabDown williamr@2: }; williamr@2: williamr@2: /** williamr@2: * The MBrCtlLayoutObserver class receives williamr@2: * scrolling events when the host application draws the scrollbar. williamr@2: * williamr@2: * Usage: williamr@2: * williamr@2: * @code williamr@4: * #include williamr@2: * williamr@2: * williamr@2: * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 williamr@2: * @lib BrowserEngine.lib williamr@4: * @file brctllayoutobserver.h williamr@2: * @endcode * williamr@2: */ williamr@2: class MBrCtlLayoutObserver williamr@2: { williamr@2: public: // New functions williamr@2: williamr@2: /** williamr@2: * Update the position of vertical scrollbar. williamr@2: * @since 2.8 williamr@2: * @param aDocumentHeight The total height of the markup page williamr@2: * @param aDisplayHeight The height of the display williamr@2: * @param aDisplayPosY The current Y position williamr@2: * @return void williamr@2: */ williamr@2: virtual void UpdateBrowserVScrollBarL(TInt aDocumentHeight, williamr@2: TInt aDisplayHeight, williamr@2: TInt aDisplayPosY ) = 0; williamr@2: williamr@2: /** williamr@2: * Update the position of horizontal scrollbar. williamr@2: * @since 2.8 williamr@2: * @param aDocumentWidth The total width of the markup page williamr@2: * @param aDisplayWidth The width of the display williamr@2: * @param aDisplayPosX The current X position williamr@2: * @return void williamr@2: */ williamr@2: virtual void UpdateBrowserHScrollBarL(TInt aDocumentWidth, williamr@2: TInt aDisplayWidth, williamr@2: TInt aDisplayPosX ) = 0; williamr@2: williamr@2: /** williamr@2: * Inform the layout of the page: right to left or left to right. williamr@2: * Useful when the application draws the scrollbar itself. williamr@2: * @since 2.8 williamr@2: * @param aNewLayout RTL (right to left) or LTR (left to right) williamr@2: * @return void williamr@2: * @attention This function is useful when the host application draws the scrollbar. williamr@2: * In RTL pages, the scroll bar should be on the left side. williamr@2: */ williamr@2: virtual void NotifyLayoutChange( TBrCtlLayout aNewLayout ) = 0; williamr@2: williamr@2: /** williamr@2: * Update the title of the page in history view williamr@2: * @since 3.0 williamr@2: * @param aTitle Title of the page williamr@2: * @return void williamr@2: */ williamr@2: virtual void UpdateTitleL( const TDesC& aTitle ) = 0; williamr@2: }; williamr@2: williamr@2: #endif // BRCTLLAYOUTOBSERVER_H williamr@2: williamr@2: // End of File