Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2000-2006 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: Uikon legacy labelled button control
18 #if !defined (__EIKLBBUT_H__)
19 #define __EIKLBBUT_H__
21 #if !defined(__COECNTRL_H__)
25 #if !defined(__COECOBS_H__)
29 #include <akncontrol.h>
31 class CEikCommandButtonBase;
35 * This class combines a command button with a label and a hotkey binding.
37 * The label is used to display a text describing a hotkey. The hotkey is set via API or resource, as the ASCII code
38 * of the key that is combined with CTRL to form the hotkey combination. E.g. setting the hotkey to decimal 65
39 * will bind CTRL+'A' as the hotkey. "CTRL+A" will be displayed in the label.
41 * This class does not implement S60 look-and-feel and is not skinned.
46 class CEikLabeledButton : public CAknControl, private MCoeControlObserver
50 * Options for display of the hotkey shortcut
54 EShowHotKey = 0x01, // Hot keys are displayed
55 EPlainHotKey = 0x02 // Hot keys are displayed plain
62 IMPORT_C CEikLabeledButton();
67 IMPORT_C ~CEikLabeledButton();
70 * 2nd Stage constructor
72 * @param aButton Sets the button to use as the active part of the CEikLabeledButton
74 IMPORT_C void ConstructL(CEikCommandButtonBase* aButton,TInt aHotKeyCode,TInt aFlags);
77 * Access to the button component of the labeled button
79 * @return Pointer to the button component. No ownership is transferred.
81 IMPORT_C CEikCommandButtonBase* Button() const;
84 * Access to the label component of the labeled button
86 * @return Pointer to the CEikLabel component. No ownership is transferred.
88 IMPORT_C CEikLabel* Label() const;
91 * Access the hotkey code
93 * @return The hot key code
95 IMPORT_C TInt HotKeyCode() const;
98 * Access to hot key setting
100 * @return EFase iff ShowsHotKeys is not set
102 IMPORT_C TBool ShowsHotKey() const;
105 * Access the key display mode
107 * @return EFalse if the key mode is not set to Plain
109 IMPORT_C TBool PlainHotKey() const;
112 * Cause the button to animate and to generate its command ID
114 IMPORT_C void Animate();
117 * Change the hot key binding
119 * @param aKeyCode Key to use (along with pressing CTRL) as the hotkey
121 IMPORT_C void UpdateHotKey(TInt aKeyCode,TFlags aFlags);
128 * CONE framework is requesting that the passed-in key be handled.
130 * @param aKeyEvent Wserv event type
131 * @param aKeyCode Key code
133 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
138 * Construct the object from resource
140 * @param aReader Fully constructed resource reader
142 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader);
147 * Reports to the caller the minimum size that the control can be, given its contents.
149 * @return The minimum size
151 IMPORT_C TSize MinimumSize();
156 * Sets the control whose window is to be used as a container for this control
158 * @param aContainer control
160 IMPORT_C void SetContainerWindowL(const CCoeControl& aContainer);
165 * Sets the button to be inactive. The button is drawn with a dimmed effect.
167 * @param aDimmed If not EFalse, set the state to dimmed. Otherwise set to non-dimmed
169 IMPORT_C void SetDimmed(TBool aDimmed);
174 * Obtain the list of colors to be used by this control
176 * @param aColorUseList
178 IMPORT_C void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; // not available before Release 005u
183 * This is called when resource or layout or other display-affecting setting has changed.
184 * Change the internals of the control so that it is ready for a subsequent SizeChanged call.
186 * @param aType Type of resource or setting that has changed
188 IMPORT_C void HandleResourceChange(TInt aType); // not available before Release 005u
193 * Report the input capabilities of the control
195 * @return A copy of the object holding the capabilities of this control
197 IMPORT_C TCoeInputCapabilities InputCapabilities() const; // not available before Release 006
202 * Handle a pointer event coming from the CONE framework
204 * @param aPointerEvent Event to handle
206 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
212 * Serialize the state of the control
214 * @param aWriteStream Output stream for the serialization
216 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
222 * Returns the number of component controls
224 * @return Number of component controls
226 TInt CountComponentControls() const;
231 * Return a pointer to the component control at the give index.
233 * @return Pointer to the conponent control. No ownership is transferred
235 CCoeControl* ComponentControl(TInt aIndex) const;
245 IMPORT_C void* ExtensionInterface( TUid aInterface );
248 * from MCoeControlObserver
250 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
253 void UpdateHotKeyL();
256 * Contained command button object.
259 CEikCommandButtonBase* iButton;
262 * Contained label to implement the text
265 CEikLabel* iLabel; // Owned