epoc32/include/mw/aknslider.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/aknslider.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/aknslider.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,690 @@
     1.4 -aknslider.h
     1.5 +/*
     1.6 +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Slider editor class
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef __AKNSLIDER_H__
    1.24 +#define __AKNSLIDER_H__
    1.25 +
    1.26 +// INCLUDES
    1.27 +#include <eikbctrl.h>
    1.28 +#include <eiklabel.h>
    1.29 +#include <eikimage.h>
    1.30 +#include <avkon.hrh> // For TAknOrientation
    1.31 +
    1.32 +// CONSTANTS
    1.33 +
    1.34 +// The following is max. length of the entire formatted value text including
    1.35 +// number, special characters and supplied text.
    1.36 +const TInt KValueLabelTextMaxLength = 30;
    1.37 +
    1.38 +// Forward declarations
    1.39 +class CGulIcon;
    1.40 +class MAknsSkinInstance;
    1.41 +class CAknSliderExtension;
    1.42 +class CAknSliderData;
    1.43 +struct TAknSliderGfx;
    1.44 +
    1.45 +// CLASS DECLARATION
    1.46 +class CAknSlider : public CEikBorderedControl
    1.47 +    {
    1.48 +public: // Enumerations
    1.49 +    /**
    1.50 +    * Elements that currently support custom graphics.
    1.51 +    *
    1.52 +    * @since 3.2
    1.53 +    */
    1.54 +    enum TSliderGfxElements
    1.55 +        {
    1.56 +        /**
    1.57 +        * Left cap component of the slider, without filling. Left cap equals
    1.58 +        * to bottom cap in vertical layout.
    1.59 +        */
    1.60 +        EElemEmptyLeftCap,
    1.61 +
    1.62 +        /**
    1.63 +        * Right cap component of the slider, without filling. Right cap equals
    1.64 +        * to top cap in vertical layout.
    1.65 +        */
    1.66 +        EElemEmptyRightCap,
    1.67 +        
    1.68 +        /**
    1.69 +        * Line component of the slider, without filling.
    1.70 +        */
    1.71 +        EElemEmptyLine,
    1.72 +        
    1.73 +        /**
    1.74 +        * Line component of the slider, with filling.
    1.75 +        */
    1.76 +        EElemFilledLine,
    1.77 +        
    1.78 +        /**
    1.79 +        * Left cap component of the slider, with filling.
    1.80 +        */
    1.81 +        EElemFilledLeftCap,
    1.82 +        
    1.83 +        /**
    1.84 +        * Right cap component of the slider, with filling.
    1.85 +        */
    1.86 +        EElemFilledRightCap,
    1.87 +        
    1.88 +        /**
    1.89 +        * Marker component of the slider.
    1.90 +        */
    1.91 +        EElemMarker,
    1.92 +        
    1.93 +        /**
    1.94 +        * Tick mark component of the slider. Small evenly spaced lines,
    1.95 +        * placed vertically in relation to slider itself.
    1.96 +        */
    1.97 +        EElemTickMark,
    1.98 +
    1.99 +        /**
   1.100 +        * Marker component of the slider when dragged
   1.101 +        */
   1.102 +        EElemMarkerSelected
   1.103 +        };
   1.104 +
   1.105 +    /**
   1.106 +    * Supported slider position indicators.
   1.107 +    *
   1.108 +    * @since 3.2
   1.109 +    */
   1.110 +    enum
   1.111 +        {
   1.112 +        /**
   1.113 +        * Flag for enabling/disabling line filling. With line filling different
   1.114 +        * graphics will be used for the the slider line's left and right sides
   1.115 +        * (the current marker position as pivot). The left side is considered
   1.116 +        * filled line and the right side empty line.
   1.117 +        *
   1.118 +        * When line filling is enabled the graphics element @c EElemFilledLine
   1.119 +        * is used for the left side and @c EElemEmptyLine for the right. If
   1.120 +        * line filling is disabled @c EElemEmptyLine is used for the whole
   1.121 +        * line.
   1.122 +        */
   1.123 +        EPosFilling  = 0x01,
   1.124 +        /**
   1.125 +        * Flag for enabling/disabling line marker (the knob). While disabled
   1.126 +        * marker is not visible, the marker area will still be used for touch
   1.127 +        * input.
   1.128 +        */
   1.129 +        EPosMarker   = 0x02            
   1.130 +        };
   1.131 +
   1.132 +    /**
   1.133 +    * Event for slider thumb/marker dragging.
   1.134 +    *
   1.135 +    * @since 5.0
   1.136 +    */
   1.137 +    enum
   1.138 +        {
   1.139 +        /**
   1.140 +        * Slider thumb/marker drag start
   1.141 +        */
   1.142 +        EDragMarkerStart  = 1000,
   1.143 +        /**
   1.144 +        * Slider thumb/marker drag end
   1.145 +        */
   1.146 +        EDragMarkerEnd
   1.147 +        };
   1.148 +        
   1.149 +public:
   1.150 +    /**
   1.151 +    * Default Constructor.
   1.152 +    */
   1.153 +    IMPORT_C CAknSlider();
   1.154 +
   1.155 +    /**
   1.156 +    * Destructor.
   1.157 +    */
   1.158 +    IMPORT_C ~CAknSlider();
   1.159 +
   1.160 +    /**
   1.161 +    * Sets the value of the slider control and also updates the iValueLabel
   1.162 +    * text. There are the following constraints on the value:
   1.163 +    *    it must be within the current range,
   1.164 +    *    it must be at a value that is minimum + N * stepsize.
   1.165 +    * If these are not both true, then the method will Panic
   1.166 +    *
   1.167 +    * @param aValue Sets the value of the slider.
   1.168 +    */
   1.169 +    IMPORT_C void SetValueL( TInt aValue );
   1.170 +
   1.171 +    /**
   1.172 +    * Returns the value of the slider control
   1.173 +    *
   1.174 +    * @return Slider value.
   1.175 +    */
   1.176 +    IMPORT_C TInt Value() const;
   1.177 +
   1.178 +    /**
   1.179 +    * Sets the range of the slider control. Maximum value must be greater than
   1.180 +    * the minimum value, or the method will Panic.
   1.181 +    *
   1.182 +    * @param aMinimumValue The minimum value of the slider control
   1.183 +    * @param aMaximumValue The maximum value of the slider control
   1.184 +    */
   1.185 +    IMPORT_C void SetRange( TInt aMinimumValue, TInt aMaximumValue );
   1.186 +
   1.187 +    /**
   1.188 +    * Gets the range of the slider control. Maximum value must be greater than
   1.189 +    * the minimum value, or the method will Panic.
   1.190 +    *
   1.191 +    * @since 3.2
   1.192 +    * @param aMinimumValue The minimum value of the slider control
   1.193 +    * @param aMaximumValue The maximum value of the slider control
   1.194 +    */
   1.195 +    IMPORT_C void GetRange( TInt& aMinimumValue, TInt& aMaximumValue );
   1.196 +    
   1.197 +    /**
   1.198 +    * Sets the step size. The step size must divide evenly into the Range. This
   1.199 +    * routine should be called after SetRange if either is called.
   1.200 +    *
   1.201 +    * @param aStepSize The value of the step size
   1.202 +    */
   1.203 +    IMPORT_C void SetStepSize( TInt aStepSize );
   1.204 +
   1.205 +    /**
   1.206 +    * Sets the text to the minimum label.
   1.207 +    *
   1.208 +    * @param aText The text passed is set to the minimum label
   1.209 +    */
   1.210 +    IMPORT_C void SetMinimumTextL( const TDesC& aText );
   1.211 +
   1.212 +    /**
   1.213 +    * Sets the text to the maximum label.
   1.214 +    *
   1.215 +    * @param aText The text passed is set to the maximum label
   1.216 +    */
   1.217 +    IMPORT_C void SetMaximumTextL( const TDesC& aText );
   1.218 +
   1.219 +    /**
   1.220 +    * Sets the value of decimal places. The legal range is 0 - 9 inclusive.
   1.221 +    *
   1.222 +    * @param aDecimalPlaces The value of the decimal place
   1.223 +    */
   1.224 +    IMPORT_C void SetDecimalPlaces( TInt aDecimalPlaces );
   1.225 +
   1.226 +    /**
   1.227 +    * Returns the value of decimal place.
   1.228 +    *
   1.229 +    * @return the value of decimal place.
   1.230 +    */
   1.231 +    IMPORT_C TInt DecimalPlaces() const;
   1.232 +
   1.233 +    /**
   1.234 +    * Allows setting custom graphics for a certain slider element. Existing
   1.235 +    * icons (custom or default) for the element are discarded. Note that some
   1.236 +    * elements might not be visible until the corresponding functionality is
   1.237 +    * enabled, see @c SetPositionIndicators and @c SetTicksEnabled.
   1.238 +    *
   1.239 +    * Slider takes care of scaling the given icons to the correct size,
   1.240 +    * provided that they have been created with @c AknIconUtils or @c AknsUtils
   1.241 +    * interfaces. It also handles re-scaling the icons if the slider layout
   1.242 +    * changes.
   1.243 +    *
   1.244 +    * If the custom icons are created by using skin items (e.g. using color
   1.245 +    * from skin), remember to change the icons whenever skin changes, see
   1.246 +    * @c CCoeControl::HandleResourceChange. In addition, note that slider can
   1.247 +    * be with horizontal or vertical layout, @see Orientation
   1.248 +    *
   1.249 +    * @param aElement The element ID to which the icons are assigned, one of
   1.250 +    *                 @c TGfxElements.
   1.251 +    *
   1.252 +    * @param aBitmap The icon used for the element, must be non-NULL,
   1.253 +    *                ownership is transferred to slider.
   1.254 +    *
   1.255 +    * @param aMask Optional mask for the aBitmap, can be NULL, ownership
   1.256 +    *              is transferred to slider.
   1.257 +    *
   1.258 +    * @par Exceptions:
   1.259 +    *   Will panic with EAknPanicInvalidValue if the element ID is invalid or
   1.260 +    *   aBitmap is NULL.
   1.261 +    *
   1.262 +    * @since 3.2
   1.263 +    */
   1.264 +    IMPORT_C void SetGraphics( TInt aElement,
   1.265 +                               CFbsBitmap* aBitmap,
   1.266 +                               CFbsBitmap* aMask );
   1.267 +    
   1.268 +    /**
   1.269 +    * Makes an element to use default graphics. Possible custom graphics for
   1.270 +    * the element is discarded.
   1.271 +    *
   1.272 +    * @param aElement The element ID which should use default graphics, one of
   1.273 +    *                 @c TGfxElements.
   1.274 +    *
   1.275 +    * @par Exceptions:
   1.276 +    *   Will panic with EAknPanicInvalidValue if the element index is invalid.
   1.277 +    *
   1.278 +    * @since 3.2
   1.279 +    */
   1.280 +    IMPORT_C void UseDefaultGraphics( TInt aElement );
   1.281 +
   1.282 +    /**
   1.283 +    * Queries whether some element is using default graphics.
   1.284 +    *
   1.285 +    * @param aElement The element ID which should use default graphics, one of
   1.286 +    *                 @c TGfxElements.
   1.287 +    *
   1.288 +    * @return ETrue if default graphics is used for the element, EFalse
   1.289 +    *         otherwise (custom graphics used).
   1.290 +    *
   1.291 +    * @par Exceptions:
   1.292 +    *   Will panic with EAknPanicInvalidValue if the element index is invalid.
   1.293 +    *
   1.294 +    * @since 3.2
   1.295 +    */
   1.296 +    IMPORT_C TBool UsesDefaultGraphics( TInt aElement ) const;
   1.297 +
   1.298 +    /**
   1.299 +    * Configures line position indicators, which display the slider's current
   1.300 +    * position. Possible indicators are defined in @c EPositionIndicator, at
   1.301 +    * least one of them must be defined (to display some position information).
   1.302 +    * Multiple values can be enabled by using bitwise or, e.g. @c EPosFilling |
   1.303 +    * EPosMarker. The new flags will fully override the old values. The default
   1.304 +    * value is @c EPosMarker.
   1.305 +    *
   1.306 +    * @param aFlags Bitmask containing flags from @c EPositionIndicator. At
   1.307 +    *               least one flag should be set.
   1.308 +    *
   1.309 +    * @par Exceptions:
   1.310 +    *   If none of the flags in @c EPositionIndicator is set, the code defaults
   1.311 +    *   silently to @c EPosMarker.
   1.312 +    *
   1.313 +    * @since 3.2
   1.314 +    */
   1.315 +    IMPORT_C void SetPositionIndicators( TUint32 aFlags );
   1.316 +    
   1.317 +   
   1.318 +    /**
   1.319 +    * Queries the current status of position indicators.
   1.320 +    *
   1.321 +    * @return Bitmask containing flags as defined in @c EPositionIndicator
   1.322 +    *
   1.323 +    * @since 3.2
   1.324 +    */
   1.325 +    IMPORT_C TUint32 PositionIndicators() const;
   1.326 +
   1.327 +    /**
   1.328 +    * Queries the current orientation status.
   1.329 +    *
   1.330 +    * @return The current orientation, see @c TAknOrientation.
   1.331 +    *
   1.332 +    * @since 3.2
   1.333 +    */
   1.334 +    IMPORT_C TAknOrientation Orientation() const;
   1.335 +
   1.336 +    /**
   1.337 +    * Enables/disables the tick marks. Tick marks are disabled by default.
   1.338 +    * Enabling tick marks affects only the visual appearance of slider. That is,
   1.339 +    * enabling slider step handling is not changed.
   1.340 +    *
   1.341 +    * @param aStatus ETrue to enable tick marks, EFalse to disable.
   1.342 +    *
   1.343 +    * @since 3.2
   1.344 +    */
   1.345 +    IMPORT_C void SetTicksEnabled( TBool aStatus );
   1.346 +
   1.347 +    /**
   1.348 +    * Queries the current tick mark status.
   1.349 +    *
   1.350 +    * @return ETrue if tick marks are enabled, EFalse otherwise.
   1.351 +    *
   1.352 +    * @since 3.2
   1.353 +    */
   1.354 +    IMPORT_C TBool TicksEnabled() const;
   1.355 +
   1.356 +    /**
   1.357 +    * Sets the tick interval used for drawing the tick marks. Tick interval is
   1.358 +    * in the slider range units (not in pixels). If interval value is set to 0,
   1.359 +    * the slider step size is used as tick interval, see @c SetStepSize. The
   1.360 +    * default interval value is 0.
   1.361 +    *
   1.362 +    * @param aInterval The value set as tick interval, always >= 0.
   1.363 +    *
   1.364 +    * @since 3.2
   1.365 +    */
   1.366 +    IMPORT_C void SetTickInterval( TUint aInterval );
   1.367 +
   1.368 +    /**
   1.369 +    * Queries the current tick interval value.
   1.370 +    *
   1.371 +    * @return Current tick interval, always >= 0.
   1.372 +    *
   1.373 +    * @since 3.2
   1.374 +    */
   1.375 +    IMPORT_C TUint TickInterval() const;
   1.376 +
   1.377 +    /**
   1.378 +    * Returns slider bitmap to "list pane for setting item" (setting option
   1.379 +    * item slider graphic). Ownership of the returned bitmap is transfered to
   1.380 +    * the caller.
   1.381 +    *
   1.382 +    * @param aValue Current value
   1.383 +    * @param aResourceId Slider resource that contains minimum and maximum
   1.384 +    *                    values
   1.385 +    * @return Slider bitmap. Ownership of the bitmap is transfered to the
   1.386 +    *         caller.
   1.387 +    */
   1.388 +    IMPORT_C static CFbsBitmap* CreateBitmapL( TInt aValue,
   1.389 +                                               TInt aResourceId );
   1.390 +
   1.391 +    /**
   1.392 +    * Returns slider bitmap to "list pane for setting item" (setting option
   1.393 +    * item slider graphic). Ownership of the returned bitmap is transfered to
   1.394 +    * the caller.
   1.395 +    *
   1.396 +    * @param aValue Current value
   1.397 +    * @param aMinimumValue Slider minimum value
   1.398 +    * @param aMaximumValue Slider maximum value
   1.399 +    * @return Slider bitmap. Ownership of the bitmap is transfered to the
   1.400 +    *         caller
   1.401 +    */
   1.402 +    IMPORT_C static CFbsBitmap* CreateBitmapL( TInt aValue,
   1.403 +                                               TInt aMinimumValue,
   1.404 +                                               TInt aMaximumValue );
   1.405 +
   1.406 +    /**
   1.407 +    * Returns slider icon to "list pane for setting item" (setting option item
   1.408 +    * slider graphic). Ownership of the returned icon is transfered to the
   1.409 +    * caller.
   1.410 +    *
   1.411 +    * @param aValue Current value
   1.412 +    * @param aResourceId Slider resource that contains minimum and maximum
   1.413 +    *                    values
   1.414 +    * @return Slider icon. Ownership of the icon is transfered to the caller
   1.415 +    */
   1.416 +    IMPORT_C static CGulIcon* CreateSetStyleListBoxIconL( TInt aValue,
   1.417 +                                                          TInt aResourceId );
   1.418 +
   1.419 +    /**
   1.420 +    * Returns slider icon to "list pane for setting item" (setting option item
   1.421 +    * slider graphic). Ownership of the returned icon is transfered to the
   1.422 +    * caller.
   1.423 +    *
   1.424 +    * @param aValue Current value
   1.425 +    * @param aMinimumValue Slider minimum value
   1.426 +    * @param aMaximumValue Slider maximum value
   1.427 +    * @return Slider bitmap. Ownership of the icon is transfered to the caller
   1.428 +    */
   1.429 +    IMPORT_C static CGulIcon* CreateSetStyleListBoxIconL( TInt aValue,
   1.430 +                                                          TInt aMinimumValue,
   1.431 +                                                          TInt aMaximumValue );
   1.432 +    /**
   1.433 +    * Call CCoeControl::EnableDragEvents()
   1.434 +    *
   1.435 +    * @since 3.2
   1.436 +    */                                                      
   1.437 +    IMPORT_C void EnableDrag();
   1.438 +
   1.439 +public:
   1.440 +    /**
   1.441 +    * From CCoeControl, returns the size of the control. And yes, this method
   1.442 +    * is non-const.
   1.443 +    *
   1.444 +    * @return size of the control
   1.445 +    */
   1.446 +    TSize MinimumSize();
   1.447 +
   1.448 +    /**
   1.449 +    * From CCoeControl, Handles key event.
   1.450 +    *
   1.451 +    * @param aKeyEvent The key event.
   1.452 +    * @param aType The type of the event.
   1.453 +    * @return Indicates whether the key event was used by this control or not
   1.454 +    */
   1.455 +    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
   1.456 +                                 TEventCode aType );
   1.457 +
   1.458 +    /**
   1.459 +    * From CCoeControl, essential for Dialog/Form construction.
   1.460 +    *
   1.461 +    * @param aReader which reads the values specified in the resource file
   1.462 +    */
   1.463 +    IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
   1.464 +
   1.465 +    /**
   1.466 +    * This function is used for constructing the control.
   1.467 +    *
   1.468 +    * @param aParent Pointer to the parent control.
   1.469 +    * @paran aValue Current value of the slider control.
   1.470 +    * @param aReader which reads the values specified in the resource file.
   1.471 +    */
   1.472 +    IMPORT_C void ConstructFromResourceL( CCoeControl* aParent,
   1.473 +                                          TInt aValue,
   1.474 +                                          TResourceReader& aReader );
   1.475 +
   1.476 +    /**
   1.477 +    * This function toggles between edit and view modes
   1.478 +    *
   1.479 +    * @param aType Specifies the mode.
   1.480 +    */
   1.481 +    IMPORT_C void HandleResourceChange( TInt aType );
   1.482 +
   1.483 +    /**
   1.484 +     * This function will be called when focus changed.
   1.485 +     *
   1.486 +     * @param aDrawNow if the control needs to call DrawNow().
   1.487 +     */
   1.488 +    IMPORT_C virtual void FocusChanged(TDrawNow aDrawNow);
   1.489 +
   1.490 +public:
   1.491 +    /**
   1.492 +    * This function is used specifically in the forms. (For Forms/Dialogs to
   1.493 +    * use with LAF) Returns the number of lines on the control.
   1.494 +    *
   1.495 +    * @return Number of lines
   1.496 +    */
   1.497 +    IMPORT_C TInt NumberOfLines() const;
   1.498 +
   1.499 +    /**
   1.500 +    * This routine can be used to combine the resource for a Slider with a
   1.501 +    * value to get the same value text that you would get if you had the
   1.502 +    * instantiated control
   1.503 +    *
   1.504 +    * @param aValue The value to format
   1.505 +    * @param aResourceId AKN_SLIDER resource id
   1.506 +    *
   1.507 +    * @return Transfer of ownership of descriptor containing the value text
   1.508 +    */
   1.509 +    IMPORT_C static HBufC* CreateValueTextInHBufCL( TInt aValue,
   1.510 +                                                    TInt aResourceId );
   1.511 +                                                    
   1.512 +    void SuppressDrawing( TBool aSuppress );
   1.513 +
   1.514 +protected:
   1.515 +    /**
   1.516 +    * From CCoeControl, Called by framework when the view size is changed.
   1.517 +    */
   1.518 +    void SizeChanged();
   1.519 +
   1.520 +    /**
   1.521 +    * From CCoeControl, Drawing function which draws the control
   1.522 +    *
   1.523 +    * @param aRect Specified area to be drawn
   1.524 +    */
   1.525 +    void Draw( const TRect& aRect ) const;
   1.526 +
   1.527 +   /**
   1.528 +    * From CCoeControl, Returns number of components.
   1.529 +    *
   1.530 +    * @return Number of component controls
   1.531 +    */
   1.532 +    IMPORT_C virtual TInt CountComponentControls() const;
   1.533 +
   1.534 +    /**
   1.535 +    * From CCoeControl, Returns pointer to particular component
   1.536 +    *
   1.537 +    * @param aIndex Index whose control's pointer has to returned.
   1.538 +    * @return Pointer to component control
   1.539 +    */
   1.540 +    IMPORT_C virtual CCoeControl* ComponentControl( TInt aIndex ) const;
   1.541 +
   1.542 +public:
   1.543 +    /**
   1.544 +    * From CCoeControl. Handles pointer event
   1.545 +    *
   1.546 +    * @param aPointerEvent Pointer event to be handled
   1.547 +    */
   1.548 +    IMPORT_C void HandlePointerEventL( const TPointerEvent& aPointerEvent );
   1.549 +    TInt StepSize() const;
   1.550 +
   1.551 +private:
   1.552 +    /**
   1.553 +    * From CAknControl
   1.554 +    */
   1.555 +    IMPORT_C void* ExtensionInterface( TUid aInterface );
   1.556 +
   1.557 +protected:
   1.558 +    /**
   1.559 +    * Sets the text to the value label
   1.560 +    */
   1.561 +    IMPORT_C void SetValueTextL();
   1.562 +
   1.563 +public:
   1.564 +
   1.565 +    /**
   1.566 +    * Report event for thumb/marker dragging via HandleControlEventL
   1.567 +    *
   1.568 +    * @since 5.0
   1.569 +    */ 
   1.570 +    void ReportMarkerDragEvent( TBool aEnable );
   1.571 +    
   1.572 +private:
   1.573 +    /**
   1.574 +    * This function creates the bitmaps and labels. Also it sets the
   1.575 +    * container window for the labels.
   1.576 +    */
   1.577 +    void ConstructL();
   1.578 +
   1.579 +    void InitializeBitmapsL();
   1.580 +
   1.581 +    /**
   1.582 +    * static routine for setting the value text.
   1.583 +    * @param valueBuf Buffer to hold the result. Must be big enough to hold
   1.584 +    *   value label as formatted from the resources and value provided, though
   1.585 +    *   it is protected from overflow. Contained text will be truncated to
   1.586 +    *   KValueLabelTextMaxLength
   1.587 +    * @param aValue Slider value to format
   1.588 +    * @param aResourceData    resource Id to read from
   1.589 +    */
   1.590 +    static void DoSetValueTextL( TDes& valueBuf, TInt aValue,
   1.591 +                                 const CAknSliderData& aResourceData );
   1.592 +    
   1.593 +    /**
   1.594 +    * This method is used to trap all the accesses to the internal data. It
   1.595 +    * panics with EAknPanicObjectNotFullyConstructed if iData is not
   1.596 +    * constructed, that is, if 2nd stage construction has not taken place (or
   1.597 +    * has failed).
   1.598 +    */
   1.599 +    CAknSliderData* SliderData() const;
   1.600 +
   1.601 +    /**
   1.602 +    * This class is a utility to protect StringLoader::Format from being
   1.603 +    * called without a formatting token.
   1.604 +    *
   1.605 +    * StringLoader is used in current implementation. See StringLoader::Format
   1.606 +    * for the semantics of the parameters.
   1.607 +    *
   1.608 +    * The other thing to note is that the output for descriptor must be able
   1.609 +    * to accept up to KValueLabelTextMaxLength characters.
   1.610 +    *
   1.611 +    * @param aOutput Output of format operation
   1.612 +    * @param aFormat Formatting descriptor.
   1.613 +    * @param aValue  Descriptor to substitute for the %U token potentially
   1.614 +    *                present in the formatting descriptor.
   1.615 +    */
   1.616 +    static void FormatWithOrWithoutTokenL( TDes& aOutput,
   1.617 +                                           const TDesC& aFormat,
   1.618 +                                           const TDesC& aValue );
   1.619 +
   1.620 +    // layout methods
   1.621 +    void FormSliderLayout1();
   1.622 +    void FormSliderLayout2();
   1.623 +    void FormSliderLayout3();
   1.624 +    void SettingsItemSliderLayout();
   1.625 +    void VerticalSliderLayout();
   1.626 +    void HorizontalSliderLayout();
   1.627 +    void MIDPFormSliderLayout();
   1.628 +    
   1.629 +    void SetLabelColor();
   1.630 +
   1.631 +   
   1.632 +    void CreateDecoratorImageFromResourceL( TInt aImageResourceId );
   1.633 +
   1.634 +    // Internal access methods
   1.635 +    TInt Layout() const;
   1.636 +    TInt MaximumValue() const;
   1.637 +    TInt MinimumValue() const;
   1.638 +    TInt Range() const;
   1.639 +
   1.640 +    // Starts a timer for feedback effect visualization.
   1.641 +    void StartTimerL();
   1.642 +
   1.643 +    // Callback for feedback effect.
   1.644 +    static TInt IndicationDrawCallbackL( TAny* aThis );
   1.645 +
   1.646 +    // Implementation of the feedback effect.
   1.647 +    void SmallDirectionIndicationL();
   1.648 +
   1.649 +    void DrawHorizontalTickMarks( CWindowGc& aGc ) const;
   1.650 +    void DrawVerticalTickMarks( CWindowGc& aGc ) const;
   1.651 +
   1.652 +    void TranslateValueL( TInt aDelta, TBool aFeedback = EFalse );
   1.653 +
   1.654 +    void GetMarkerRect( TRect& aRect ) const;
   1.655 +    TSize MarkerSize() const;
   1.656 +    TPoint MarkerPos() const;
   1.657 +
   1.658 +    void DrawHorizontal( TBool aDrawMarker ) const;
   1.659 +    void DrawVertical( TBool aDrawMarker ) const;
   1.660 +
   1.661 +    void DrawHorizontalLine( CWindowGc& aGc ) const;
   1.662 +    void DrawVerticalLine( CWindowGc& aGc ) const;
   1.663 +
   1.664 +    void FetchGfx( TAknSliderGfx& aGfx, TInt aElement, const TSize& aSize ) const;
   1.665 +    
   1.666 +    // calculate the correct value according to the input point
   1.667 +    TInt CalcAlignedValue( const TPoint& aPoint ); 
   1.668 +
   1.669 +private:
   1.670 +    CEikImage* iImage;
   1.671 +    CEikLabel* iValueLabel;
   1.672 +    CEikLabel* iMinLabel;
   1.673 +    CEikLabel* iMaxLabel;
   1.674 +    CFbsBitmap* iMarkerBmp;
   1.675 +    CFbsBitmap* iMarkerMaskBmp;
   1.676 +    TRect iMarkerArea;
   1.677 +    TRect iLineRect;
   1.678 +    TInt iValue;
   1.679 +    TBool iEditable;
   1.680 +    TRgb iColor;
   1.681 +
   1.682 +    // Not used, kept for binary compatibility. Another pointer with same name
   1.683 +    // in iData is really used
   1.684 +    HBufC* iSingularText;
   1.685 +
   1.686 +    CAknSliderData* iData;
   1.687 +    CAknSliderExtension* iExt;
   1.688 +
   1.689 +    TInt iSpare[4];
   1.690 +};
   1.691 +
   1.692 +#endif // __AKNSLIDER_H__
   1.693 +
   1.694 +// End of File