|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : BrCtlSampleAppLayoutObserver.h 00004 * Part of : BrCtlSampleApp 00005 * Interface : Browser Control API 00006 * Description : Handle scrollbar and tab events 00007 * Version : 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 00017 #ifndef BRCTLSAMPLEAPPLAYOUTOBSERVER_H 00018 #define BRCTLSAMPLEAPPLAYOUTOBSERVER_H 00019 00020 // INCLUDES 00021 #include <BrCtlLayoutObserver.h> 00022 #include <BrCtlInterface.h> 00023 00024 // FORWARD DECLARATIONS 00025 class CBrCtlSampleAppContainer; 00026 00027 // CLASS DECLARATION 00028 /** 00029 * CBrCtlSampleAppLayoutObserver class. 00030 * This class inherits from the MBrCtlLayoutObserver interface. Methods on this class will be 00031 * called when layout events occur. 00032 */ 00033 class CBrCtlSampleAppLayoutObserver : public CBase, public MBrCtlLayoutObserver 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * Two-phased constructor. 00039 */ 00040 static CBrCtlSampleAppLayoutObserver* NewL(CBrCtlSampleAppContainer* aContainer); 00041 00042 /** 00043 * Destructor. 00044 */ 00045 ~CBrCtlSampleAppLayoutObserver(); 00046 00047 /** 00048 * Update the position of vertical scrollbar. 00049 * @since 2.8 00050 * @param aDocumentHeight The total height of the markup page 00051 * @param aDisplayHeight The height of the display 00052 * @param aDisplayPosY The current Y position 00053 * @return void 00054 */ 00055 void UpdateBrowserVScrollBarL(TInt aDocumentHeight, 00056 TInt aDisplayHeight, 00057 TInt aDisplayPosY ) ; 00058 00059 /** 00060 * Update the position of horizontal scrollbar. 00061 * @since 2.8 00062 * @param aDocumentWidth The total width of the markup page 00063 * @param aDisplayWidth The width of the display 00064 * @param aDisplayPosX The current X position 00065 * @return void 00066 */ 00067 void UpdateBrowserHScrollBarL(TInt aDocumentWidth, 00068 TInt aDisplayWidth, 00069 TInt aDisplayPosX) ; 00070 00071 /** 00072 * Inform the layout of the page: right to left or left to right. Useful when the application draws the scrollbar itself. 00073 * @since 2.8 00074 * @param aNewLayout RTL or LTR 00075 * @return void 00076 */ 00077 void NotifyLayoutChange( TBrCtlLayout aNewLayout) ; 00078 00079 /** 00080 * Update the title of the page in history view 00081 * @since 3.0 00082 * @param aTitle Title of the page 00083 * @return void 00084 */ 00085 void UpdateTitleL( const TDesC& aTitle ); 00086 00087 private: 00088 /** 00089 * By default Symbian 2nd phase constructor is private. 00090 */ 00091 void ConstructL(CBrCtlSampleAppContainer* aContainer); 00092 00093 private: // data 00094 // Pointer to the container class for our convenience. 00095 CBrCtlSampleAppContainer* iContainer; 00096 }; 00097 00098 #endif // BRCTLSAMPLEAPPLAYOUTOBSERVER_H 00099 00100 // End of File 00101
|
© Nokia 2006 |