Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: ?Description
21 #if !defined(__AKNSCBUT_H__)
22 #define __AKNSCBUT_H__
25 #include <AknControl.h>
27 // FORWARD DECLARATIONS
29 class CAknScrollIndicator;
32 * Implements a scroll buttons of a scroll bar.
34 * @since Series 60 0.9
36 NONSHARABLE_CLASS(CAknScrollButton) : public CAknControl
40 * Indicates a Scroll button's type
44 /** Scroll button to move the display to the left. */
46 /** Scroll button to move the display up. */
48 /** Scroll button to move the display to the right. */
50 /** Scroll button to move the display down. */
52 /** Scroll button to move the display page to the left. */
54 /** Scroll button to move the display page up. */
56 /** Scroll button to move the display page to the right.*/
58 /** Scroll button to move the display page down. */
60 /** Scroll button to move the display to the home position. */
62 /** Scroll button to move the display to the top. */
64 /** Scroll button to move the display to the end position. */
66 /** Scroll button to move the display to the bottom. */
72 * Indicates a scroll bar's type.
76 /** Normal scroll bar */
78 /** Arrow headed scroll bar */
82 public: // class specific functions
85 * Two-phased constructor.
86 * @param aType scroll button's type.
87 * @return A fully constructed @c CAknScrollButton object.
89 IMPORT_C static CAknScrollButton* NewL(TType aType);
94 IMPORT_C ~CAknScrollButton();
97 * Gets a scroll button's type.
98 * @return The scroll button's type.
100 IMPORT_C TType Type() const;
103 * Creates a window only for arrows.
104 * Sets the container window to be this class.
105 * @param aParent The control to be the parent of this control.
107 IMPORT_C void CreateWindowOnlyForArrowsL(const CCoeControl* aParent);
110 * Determines whether a scroll button is owned by normal scroll bar.
111 * @return @c ETrue if a scroll button is owned by the normal scroll bar,
114 IMPORT_C TBool IsNormalScrollBarUsingButton() const;
117 * Sets the type of scroll bar which owns the button.
118 * @param aTypeOfScrollBar The type of the scroll bar.
120 IMPORT_C void SetTypeOfScrollBarUsingButton(TTypeOfScrollBar aTypeOfScrollBar);
123 * Sets the new focus position in the control and the span length.
124 * @param aFocusPosition The new focus position.
125 * @param aScrollSpan The new span length.
127 IMPORT_C void SetPosition(const TInt aFocusPosition, const TInt aScrollSpan);
130 * Two-phased constructor.
131 * @param aType scroll button's type.
132 * @param aTypeOfScrollBar scroll bar type, this information is needed at construction
133 * time when creating button for double span scroll bar (ie. the parameter is ENormal)
134 * @return A fully constructed @c CAknScrollButton object.
136 IMPORT_C static CAknScrollButton* NewL(TType aType, TTypeOfScrollBar aTypeOfScrollBar);
138 void SetContainerWindowL( const CCoeControl& aControl );
139 TInt CountComponentControls() const;
140 CCoeControl* ComponentControl( TInt aIndex ) const;
142 private: // class specific functions
143 CAknScrollButton(TType aType);
146 void DrawIndicator() const;
147 void ConstructL(TTypeOfScrollBar aTypeOfScrollBar);
148 private: // from CCoeControl
149 virtual void Draw(const TRect& aRect) const;
151 friend class CAknScrollBar;
154 CAknScrollIndicator* iScrollIndicator;