00001 /* 00002 * ============================================================================== 00003 * Name : Aknscbut.h 00004 * Part of : Avkon 00005 * Interface : ?Interface_category, ?Interface_name 00006 * Description : ?Description 00007 * Version : ?Version 00008 * 00009 * Copyright © 2002-2004 Nokia. All rights reserved. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia. All rights are reserved. Copying, including 00013 * reproducing, storing, adapting or translating, any 00014 * or all of this material requires the prior written consent of 00015 * Nokia. This material also contains confidential 00016 * information which may not be disclosed to others without the 00017 * prior written consent of Nokia. 00018 * ============================================================================== 00019 */ 00020 00021 00022 00023 #if !defined(__AKNSCBUT_H__) 00024 #define __AKNSCBUT_H__ 00025 00026 // INCLUDES 00027 #include <AknControl.h> 00028 00029 // FORWARD DECLARATIONS 00030 00031 class CAknScrollIndicator; 00032 00038 NONSHARABLE_CLASS(CAknScrollButton) : public CAknControl 00039 { 00040 public: 00044 enum TType 00045 { 00047 ENudgeLeft, 00049 ENudgeUp, 00051 ENudgeRight, 00053 ENudgeDown, 00055 EPageLeft, 00057 EPageUp, 00059 EPageRight, 00061 EPageDown, 00063 EHome, 00065 ETop, 00067 EEnd, 00069 EBottom 00070 }; 00071 00072 public: 00076 enum TTypeOfScrollBar 00077 { 00079 ENormal =0x00, 00081 EArrowHead =0x01 00082 }; 00083 00084 public: // class specific functions 00085 00091 IMPORT_C static CAknScrollButton* NewL(TType aType); 00092 00096 IMPORT_C ~CAknScrollButton(); 00097 00102 IMPORT_C TType Type() const; 00103 00109 IMPORT_C void CreateWindowOnlyForArrowsL(const CCoeControl* aParent); 00110 00116 IMPORT_C TBool IsNormalScrollBarUsingButton() const; 00117 00122 IMPORT_C void SetTypeOfScrollBarUsingButton(TTypeOfScrollBar aTypeOfScrollBar); 00123 00129 IMPORT_C void SetPosition(const TInt aFocusPosition, const TInt aScrollSpan); 00130 00138 IMPORT_C static CAknScrollButton* NewL(TType aType, TTypeOfScrollBar aTypeOfScrollBar); 00139 00140 #start_since SINCE_3_1_SDK 00141 00144 void SetContainerWindowL( const CCoeControl& aControl ); 00148 TInt CountComponentControls() const; 00152 CCoeControl* ComponentControl( TInt aIndex ) const; 00153 #end_since SINCE_3_1_SDK 00154 private: // class specific functions 00155 CAknScrollButton(TType aType); 00156 void ConstructL(); 00157 void SizeChanged(); 00158 void DrawIndicator() const; 00159 void ConstructL(TTypeOfScrollBar aTypeOfScrollBar); 00160 private: // from CCoeControl 00161 virtual void Draw(const TRect& aRect) const; 00162 private: 00163 friend class CAknScrollBar; 00164 TType iType; 00165 TInt iFlag; 00166 CAknScrollIndicator* iScrollIndicator; 00167 TRect iOldRect; 00168 }; 00169 00170 00171 #endif