williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Handle scrollbar and tab events
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef BRCTLLAYOUTOBSERVER_H
|
williamr@2
|
20 |
#define BRCTLLAYOUTOBSERVER_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
#include <e32std.h>
|
williamr@2
|
24 |
#include <e32base.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
|
williamr@2
|
27 |
/**
|
williamr@2
|
28 |
* Defines whether a page is to be read from left-to-right or from right-to-left.
|
williamr@2
|
29 |
*/
|
williamr@2
|
30 |
enum TBrCtlLayout
|
williamr@2
|
31 |
{
|
williamr@2
|
32 |
EOriginTopLeft, ///< Page is to be read from left-to-right
|
williamr@2
|
33 |
EOriginTopRight ///< Page is to be read from right-to-left
|
williamr@2
|
34 |
};
|
williamr@2
|
35 |
|
williamr@2
|
36 |
enum TBrCtlTabDirection
|
williamr@2
|
37 |
{
|
williamr@2
|
38 |
ETabLeft,
|
williamr@2
|
39 |
ETabRight,
|
williamr@2
|
40 |
ETabUp,
|
williamr@2
|
41 |
ETabDown
|
williamr@2
|
42 |
};
|
williamr@2
|
43 |
|
williamr@2
|
44 |
/**
|
williamr@2
|
45 |
* The MBrCtlLayoutObserver class receives
|
williamr@2
|
46 |
* scrolling events when the host application draws the scrollbar.
|
williamr@2
|
47 |
*
|
williamr@2
|
48 |
* Usage:
|
williamr@2
|
49 |
*
|
williamr@2
|
50 |
* @code
|
williamr@4
|
51 |
* #include <brctllayoutobserver.h>
|
williamr@2
|
52 |
*
|
williamr@2
|
53 |
*
|
williamr@2
|
54 |
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
|
williamr@2
|
55 |
* @lib BrowserEngine.lib
|
williamr@4
|
56 |
* @file brctllayoutobserver.h
|
williamr@2
|
57 |
* @endcode *
|
williamr@2
|
58 |
*/
|
williamr@2
|
59 |
class MBrCtlLayoutObserver
|
williamr@2
|
60 |
{
|
williamr@2
|
61 |
public: // New functions
|
williamr@2
|
62 |
|
williamr@2
|
63 |
/**
|
williamr@2
|
64 |
* Update the position of vertical scrollbar.
|
williamr@2
|
65 |
* @since 2.8
|
williamr@2
|
66 |
* @param aDocumentHeight The total height of the markup page
|
williamr@2
|
67 |
* @param aDisplayHeight The height of the display
|
williamr@2
|
68 |
* @param aDisplayPosY The current Y position
|
williamr@2
|
69 |
* @return void
|
williamr@2
|
70 |
*/
|
williamr@2
|
71 |
virtual void UpdateBrowserVScrollBarL(TInt aDocumentHeight,
|
williamr@2
|
72 |
TInt aDisplayHeight,
|
williamr@2
|
73 |
TInt aDisplayPosY ) = 0;
|
williamr@2
|
74 |
|
williamr@2
|
75 |
/**
|
williamr@2
|
76 |
* Update the position of horizontal scrollbar.
|
williamr@2
|
77 |
* @since 2.8
|
williamr@2
|
78 |
* @param aDocumentWidth The total width of the markup page
|
williamr@2
|
79 |
* @param aDisplayWidth The width of the display
|
williamr@2
|
80 |
* @param aDisplayPosX The current X position
|
williamr@2
|
81 |
* @return void
|
williamr@2
|
82 |
*/
|
williamr@2
|
83 |
virtual void UpdateBrowserHScrollBarL(TInt aDocumentWidth,
|
williamr@2
|
84 |
TInt aDisplayWidth,
|
williamr@2
|
85 |
TInt aDisplayPosX ) = 0;
|
williamr@2
|
86 |
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
* Inform the layout of the page: right to left or left to right.
|
williamr@2
|
89 |
* Useful when the application draws the scrollbar itself.
|
williamr@2
|
90 |
* @since 2.8
|
williamr@2
|
91 |
* @param aNewLayout RTL (right to left) or LTR (left to right)
|
williamr@2
|
92 |
* @return void
|
williamr@2
|
93 |
* @attention This function is useful when the host application draws the scrollbar.
|
williamr@2
|
94 |
* In RTL pages, the scroll bar should be on the left side.
|
williamr@2
|
95 |
*/
|
williamr@2
|
96 |
virtual void NotifyLayoutChange( TBrCtlLayout aNewLayout ) = 0;
|
williamr@2
|
97 |
|
williamr@2
|
98 |
/**
|
williamr@2
|
99 |
* Update the title of the page in history view
|
williamr@2
|
100 |
* @since 3.0
|
williamr@2
|
101 |
* @param aTitle Title of the page
|
williamr@2
|
102 |
* @return void
|
williamr@2
|
103 |
*/
|
williamr@2
|
104 |
virtual void UpdateTitleL( const TDesC& aTitle ) = 0;
|
williamr@2
|
105 |
};
|
williamr@2
|
106 |
|
williamr@2
|
107 |
#endif // BRCTLLAYOUTOBSERVER_H
|
williamr@2
|
108 |
|
williamr@2
|
109 |
// End of File
|