equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
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 |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
20 #ifndef __AKNTOOLBAR_H__ |
20 #ifndef __AKNTOOLBAR_H__ |
21 #define __AKNTOOLBAR_H__ |
21 #define __AKNTOOLBAR_H__ |
22 |
22 |
23 // INCLUDES |
23 // INCLUDES |
24 #include <avkon.hrh> // TAknOrientation |
24 #include <avkon.hrh> // TAknOrientation |
25 #include <akncontrol.h> // CCoeControl |
25 #include <AknControl.h> // CCoeControl |
26 #include <coecobs.h> // MCoeControlObserver |
26 #include <coecobs.h> // MCoeControlObserver |
27 #include <eikcmobs.h> // MEikCommandObserver |
27 #include <eikcmobs.h> // MEikCommandObserver |
28 #include <aknpopupfader.h> |
28 #include <AknPopupFader.h> |
29 #include <babitflags.h> |
29 #include <babitflags.h> |
|
30 #include <AknsItemID.h> |
30 |
31 |
31 // FORWARD DECLARATIONS |
32 // FORWARD DECLARATIONS |
32 class CAknButton; |
33 class CAknButton; |
33 class CAknToolbarItem; |
34 class CAknToolbarItem; |
34 class CAknToolbarExtension; |
35 class CAknToolbarExtension; |
536 * |
537 * |
537 * @param aHide ETrue if hiding items, EFalse if unhiding. |
538 * @param aHide ETrue if hiding items, EFalse if unhiding. |
538 * @param aPriority Ordinal priority of toolbar window. |
539 * @param aPriority Ordinal priority of toolbar window. |
539 */ |
540 */ |
540 IMPORT_C void HideItemsAndDrawOnlyBackground( TBool aHide, TInt aPriority ); |
541 IMPORT_C void HideItemsAndDrawOnlyBackground( TBool aHide, TInt aPriority ); |
|
542 /** |
|
543 * Sets the skin background for fixed toolbar. The new background is used |
|
544 * for all the subsequent drawing operations. This method does not itself |
|
545 * cause a repaint. |
|
546 * |
|
547 * @internal |
|
548 * |
|
549 * @param aIID Skin item ID of the new background. This is one of the constants |
|
550 * defined in AknsConstants.h, and the usual values are KAknsIIDQsnBgScreen |
|
551 * @since S60 5.0 |
|
552 */ |
|
553 IMPORT_C void SetSkinBackgroundId( const TAknsItemID& aIID ); |
541 |
554 |
542 |
555 |
543 protected: // From base class |
556 protected: // From base class |
544 |
557 |
545 /** |
558 /** |
810 /** |
823 /** |
811 * Callback for delayed toolbar showing. |
824 * Callback for delayed toolbar showing. |
812 */ |
825 */ |
813 static TInt ShowDelayedToolbar( TAny* aThis ); |
826 static TInt ShowDelayedToolbar( TAny* aThis ); |
814 |
827 |
815 /** |
|
816 * Modifies highlight bitmap that is 50% transparent to use when drawing |
|
817 * highlight for small transparent toolbar. |
|
818 */ |
|
819 void ModifyHighlightMaskL( TBool aCreateBitmaps ); |
|
820 |
828 |
821 /** |
829 /** |
822 * Fades behind toolbar |
830 * Fades behind toolbar |
823 * @param aFade if ETrue then fade |
831 * @param aFade if ETrue then fade |
824 */ |
832 */ |
865 * Updates control visibility based on toolbar visibility and |
873 * Updates control visibility based on toolbar visibility and |
866 * buttons visibility inside toolbar. |
874 * buttons visibility inside toolbar. |
867 */ |
875 */ |
868 void UpdateControlVisibility(); |
876 void UpdateControlVisibility(); |
869 |
877 |
|
878 /* |
|
879 * Update item tooltip position |
|
880 */ |
|
881 void UpdateItemTooltipPosition(); |
|
882 |
870 private: // Member variables |
883 private: // Member variables |
871 |
884 |
872 // Array for toolbar items |
885 // Array for toolbar items |
873 RPointerArray<CAknToolbarItem> iItems; |
886 RPointerArray<CAknToolbarItem> iItems; |
874 |
887 |
911 // Toolbar orientation |
924 // Toolbar orientation |
912 TAknOrientation iOrientation; |
925 TAknOrientation iOrientation; |
913 |
926 |
914 // Transparency bitmap |
927 // Transparency bitmap |
915 // own |
928 // own |
|
929 // this member variable is deserted |
916 CFbsBitmap* iBgBitmap; |
930 CFbsBitmap* iBgBitmap; |
917 |
931 |
918 // This is used to call ShowToolbarForBackgroundChange after toolbar has |
932 // This is used to call ShowToolbarForBackgroundChange after toolbar has |
919 // been hidden |
933 // been hidden |
920 // own |
934 // own |
921 CIdle* iIdle; |
935 CIdle* iIdle; |
922 |
936 |
923 // Highlight bitmap |
937 // Highlight bitmap |
|
938 // this member variable is deserted |
924 CFbsBitmap* iHighlightBitmap; |
939 CFbsBitmap* iHighlightBitmap; |
925 |
940 |
926 // Highlight mask |
941 // Highlight mask |
|
942 // this member variable is deserted |
927 CFbsBitmap* iHighlightMask; |
943 CFbsBitmap* iHighlightMask; |
928 |
944 |
929 // event modifiers |
945 // event modifiers |
930 TInt iEventModifiers; |
946 TInt iEventModifiers; |
931 |
947 |
936 TInt iSoftkeyResource; |
952 TInt iSoftkeyResource; |
937 |
953 |
938 // Used to store previous item that had pointerevents |
954 // Used to store previous item that had pointerevents |
939 TInt iPreviousItem; |
955 TInt iPreviousItem; |
940 |
956 |
|
957 // Item that catches point down event |
|
958 TInt iDownItem; |
|
959 |
941 // Step for toolbar sliding |
960 // Step for toolbar sliding |
942 TInt iStep; |
961 TInt iStep; |
943 |
962 |
944 // End position for toolbar sliding |
963 // End position for toolbar sliding |
945 TInt iEndPos; |
964 TInt iEndPos; |
952 TRect iBgRect; |
971 TRect iBgRect; |
953 |
972 |
954 // Toolbar window priority if set in HideItemsAndDrawOnlyBackground |
973 // Toolbar window priority if set in HideItemsAndDrawOnlyBackground |
955 TInt iDrawingPriority; |
974 TInt iDrawingPriority; |
956 |
975 |
|
976 /* |
|
977 * Background theme ID user defined. And in default, its value is |
|
978 * KAknsIIDNone is used and toolbar draw background with the current skin |
|
979 */ |
|
980 TAknsItemID iBgIID; |
957 }; |
981 }; |
958 |
982 |
959 #endif // __AKNTOOLBAR_H__ |
983 #endif // __AKNTOOLBAR_H__ |
960 |
984 |
961 // End of File |
985 // End of File |