epoc32/include/mw/eikbtgpc.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/eikbtgpc.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/eikbtgpc.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,1288 @@
     1.4 -eikbtgpc.h
     1.5 +/*
     1.6 +* Copyright (c) 2002-2007 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:  EIKON button group container class definition.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef __EIKBTGPC_H__
    1.24 +#define __EIKBTGPC_H__
    1.25 +
    1.26 +#include <coecntrl.h>
    1.27 +#include <eikbtgrp.h>
    1.28 +#include <eikcmobs.h>
    1.29 +#include <lafpublc.h>
    1.30 +#include <uikon.hrh>
    1.31 +
    1.32 +#include <akncontrol.h>
    1.33 +
    1.34 +class MEikCommandObserver;
    1.35 +class CEikButtonGroupStack;
    1.36 +class CEikCommandButton;
    1.37 +class CEikListBox;
    1.38 +
    1.39 +/**
    1.40 + * The CEikButtonGroupContainer class provides a wrapper around the different button arrays
    1.41 + * used in pen and no-pen devices. 
    1.42 + *
    1.43 + * @lib eikcoctl.lib 
    1.44 + * @since S60 0.9 
    1.45 + */
    1.46 +NONSHARABLE_CLASS(CEikButtonGroupContainer) : public CAknControl, public MEikCommandObserver
    1.47 +    {
    1.48 +public:
    1.49 +    /** 
    1.50 +     * Declares an object type for a class, in order to allow the object
    1.51 +     * provider mechanism to locate and provide objects from the class.
    1.52 +     */
    1.53 +    DECLARE_TYPE_ID(0x101F4107)
    1.54 +
    1.55 +    /**
    1.56 +     * Describes how the container is being used.
    1.57 +     *
    1.58 +     * The enumeration is used by the system to create the appropriate (UI variant-specific)
    1.59 +     * button group for the specified type.
    1.60 +     */
    1.61 +    enum TUse
    1.62 +        {
    1.63 +        EView          = SLafButtonGroupContainer::EView,         ///< In a view.
    1.64 +        EDialog        = SLafButtonGroupContainer::EDialog,       ///< In a dialog.
    1.65 +        EToolbar       = SLafButtonGroupContainer::EToolbar,      ///< In a toolbar.
    1.66 +        ECba           = SLafButtonGroupContainer::ECba,          ///< In a control button array.
    1.67 +        EDialogButtons = SLafButtonGroupContainer::EDialogButtons ///< In dialog buttons.
    1.68 +        };
    1.69 +        
    1.70 +    /**
    1.71 +     * Describes the orientation of the container.
    1.72 +     */        
    1.73 +    enum TOrientation
    1.74 +        {
    1.75 +        EVertical   = SLafButtonGroupContainer::EVertical,  ///< Buttons are laid out vertically.
    1.76 +        EHorizontal = SLafButtonGroupContainer::EHorizontal ///< Buttons are laid out horizontally.
    1.77 +        };
    1.78 +        
    1.79 +    /**
    1.80 +     * Relative positions of the container and the control which uses it.
    1.81 +     */        
    1.82 +    enum TLocation
    1.83 +        {
    1.84 +        /** The button group is internal to the control which is using it. E.g. dialog buttons. */
    1.85 +        EInternal   = SLafButtonGroupContainer::EInternal, 
    1.86 +        
    1.87 +        /** The button group is external to the control which is using it. E.g. toolbar or cba. */
    1.88 +        EExternal   = SLafButtonGroupContainer::EExternal  
    1.89 +        };
    1.90 +        
    1.91 +    /**
    1.92 +     * Flags for the display of hotkeys.
    1.93 +     */        
    1.94 +    enum THotKeyFlags
    1.95 +        {
    1.96 +        EShowHotKey      = 0x01, ///< Hotkeys for commands should be shown.
    1.97 +        EPlainHotKey     = 0x02  ///< Hotkeys for commands should not be shown.
    1.98 +        };
    1.99 +        
   1.100 +    /** 
   1.101 +     * Additional flags.
   1.102 +     */         
   1.103 +    enum TFlags
   1.104 +        {
   1.105 +        EAddToStack      = 0x01, ///< Not used.
   1.106 +        EDelayActivation = 0x02, ///< If set, the container is not activated during construction.
   1.107 +        EUseMaxSize      = 0x04  ///< Not used.
   1.108 +        };
   1.109 +        
   1.110 +    /**
   1.111 +     * Defines the positions for each command.   
   1.112 +     */   
   1.113 +    enum TCommandPosition
   1.114 +        {
   1.115 +        ELeftSoftkeyPosition    = 0, ///< Position for left softkey.
   1.116 +        ERightSoftkeyPosition   = 2, ///< Position for right softkey.
   1.117 +        EMiddleSoftkeyPosition  = 3  ///< Position for middle softkey.
   1.118 +        };
   1.119 +        
   1.120 +public:
   1.121 +    /**
   1.122 +     * Creates a button group container in its own window.
   1.123 +     *
   1.124 +     * @param aUse The button group's type. 
   1.125 +     * @param aOrientation The button group's orientation. You need specify this 
   1.126 +     *                     only for devices that can layout their buttons either 
   1.127 +     *                     horizontally or vertically.
   1.128 +     * @param aCommandObserver A command observer to be notified of commands on 
   1.129 +     *                         the container.
   1.130 +     * @param aResourceId A resource containing descriptions of buttons in the group. 
   1.131 +     *                    This can be NULL if buttons are to be added dynamically.
   1.132 +     * @param aFlags The button group's flags.
   1.133 +     * @return Button group container object.
   1.134 +     */ 
   1.135 +    IMPORT_C static CEikButtonGroupContainer* NewL(
   1.136 +        TUse aUse,
   1.137 +        TOrientation aOrientation,
   1.138 +        MEikCommandObserver* aCommandObserver,
   1.139 +        TInt aResourceId,
   1.140 +        TUint aFlags = EAddToStack);
   1.141 +
   1.142 +    /**
   1.143 +     * Creates a button group container in its parent control's window.
   1.144 +     *
   1.145 +     * @param aUse The button group's type.
   1.146 +     * @param aOrientation The button group's orientation. You need specify this 
   1.147 +     *                     only for devices that can layout their buttons either 
   1.148 +     *                     horizontally or vertically.
   1.149 +     * @param aCommandObserver A command observer to be notified of commands on 
   1.150 +     *                         the container.
   1.151 +     * @param aResourceId A resource containing descriptions of buttons in the group. 
   1.152 +     *                    This can be NULL if buttons are to be added dynamically.
   1.153 +     * @param aParent The control's parent.
   1.154 +     * @param aFlags The button group's flags.
   1.155 +     * @return Button group container object.
   1.156 +     */         
   1.157 +    IMPORT_C static CEikButtonGroupContainer* NewL(
   1.158 +        TUse aUse,
   1.159 +        TOrientation aOrientation,
   1.160 +        MEikCommandObserver* aCommandObserver,
   1.161 +        TInt aResourceId,
   1.162 +        const CCoeControl& aParent,
   1.163 +        TUint aFlags = EAddToStack);
   1.164 +
   1.165 +    /**
   1.166 +     * Creates a button group container in given window group.
   1.167 +     *
   1.168 +     * @param aUse The button group's type.
   1.169 +     * @param aOrientation The button group's orientation. You need specify this 
   1.170 +     *                     only for devices that can layout their buttons either 
   1.171 +     *                     horizontally or vertically.
   1.172 +     * @param aCommandObserver A command observer to be notified of commands on 
   1.173 +     *                         the container.
   1.174 +     * @param aResourceId A resource containing descriptions of buttons in the group. 
   1.175 +     *                    This can be NULL if buttons are to be added dynamically.
   1.176 +     * @param aParentWg The parent window group.
   1.177 +     * @param aFlags The button group's flags.
   1.178 +     * @return Button group container object.
   1.179 +     */        
   1.180 +    IMPORT_C static CEikButtonGroupContainer* NewL(
   1.181 +        TUse aUse,
   1.182 +        TOrientation aOrientation,
   1.183 +        MEikCommandObserver* aCommandObserver,
   1.184 +        TInt aResourceId,
   1.185 +        RWindowGroup& aParentWg,
   1.186 +        TUint aFlags = EAddToStack);
   1.187 +
   1.188 +    /**
   1.189 +     * Destructor.
   1.190 +     */        
   1.191 +    IMPORT_C ~CEikButtonGroupContainer();
   1.192 +
   1.193 +    /**
   1.194 +     * Gets a pointer to an application's currently active CEikButtonGroupContainer (if any).
   1.195 +     *
   1.196 +     * Returns NULL if there are no containers active or none suitable for sharing. 
   1.197 +     * Ownership of the returned pointer is not transferred.
   1.198 +     *
   1.199 +     * @return Pointer to the button group container.
   1.200 +     */    
   1.201 +    IMPORT_C static CEikButtonGroupContainer* Current();
   1.202 +    
   1.203 +public:
   1.204 +    /**
   1.205 +     * Sets a command button's text label and command ID.
   1.206 +     *
   1.207 +     * @param aPosition The position within the button group of the button to change.
   1.208 +     *                  If the position is out of range this function raises a panic.
   1.209 +     * @param aCommandId Command ID the button will send.
   1.210 +     * @param aText Text for the button.
   1.211 +     */
   1.212 +    inline void SetCommandL(
   1.213 +        TInt aPosition, 
   1.214 +        TInt aCommandId, 
   1.215 +        const TDesC& aText);
   1.216 +
   1.217 +    /**
   1.218 +     * Sets a command button's bitmap and command ID.
   1.219 +     *
   1.220 +     * @param aPosition The position within the button group of the button to change. 
   1.221 +     *                  If the position is out of range this function raises a panic.
   1.222 +     * @param aCommandId Command ID the button will send.
   1.223 +     * @param aBitmap The bitmap for the button.
   1.224 +     * @param aMask The mask bitmap for aBitmap.
   1.225 +     */    
   1.226 +    inline void SetCommandL(
   1.227 +        TInt aPosition, 
   1.228 +        TInt aCommandId, 
   1.229 +        const CFbsBitmap& aBitmap,
   1.230 +        const CFbsBitmap& aMask);
   1.231 +
   1.232 +    /**
   1.233 +     * Sets a command button's bitmap, text and command ID.
   1.234 +     *
   1.235 +     * @param aPosition The position within the button group of the button to change. 
   1.236 +     *                  If the position is out of range, the function raises a panic.
   1.237 +     * @param aCommandId Command ID the button will send.
   1.238 +     * @param aText The text for the button.
   1.239 +     * @param aBitmap The bitmap for the button.
   1.240 +     * @param aMask The mask bitmap for aBitmap.
   1.241 +     */        
   1.242 +    inline void SetCommandL(
   1.243 +        TInt aPosition, 
   1.244 +        TInt aCommandId, 
   1.245 +        const TDesC& aText,
   1.246 +        const CFbsBitmap& aBitmap,
   1.247 +        const CFbsBitmap& aMask);
   1.248 +
   1.249 +    /**
   1.250 +     * Sets a command button's bitmap and command ID. The bitmap and its mask are read
   1.251 +     * from a file.
   1.252 +     *
   1.253 +     * @param aPosition The position within the button group of the button to change.
   1.254 +     *                  If the position is out of range, the function raises a panic.
   1.255 +     * @param aCommandId Command ID the button will send.
   1.256 +     * @param aFile A multi-bitmap file, containing mask and bitmap images.
   1.257 +     * @param aBitmapId ID of the bitmap within aFile.
   1.258 +     * @param aMaskId ID of the mask within aFile.
   1.259 +     */        
   1.260 +    inline void SetCommandL(
   1.261 +        TInt aPosition, 
   1.262 +        TInt aCommandId, 
   1.263 +        const TDesC& aFile,
   1.264 +        TInt aBitmapId,
   1.265 +        TInt aMaskId);
   1.266 +
   1.267 +    /**
   1.268 +     * Sets a command button's bitmap, text label and command ID. The bitmap and its 
   1.269 +     * mask are read from a file.
   1.270 +     *
   1.271 +     * @param aPosition The position within the button group of the button to change.
   1.272 +     *                  If the position is out of range, the function raises a panic.
   1.273 +     * @param aCommandId Command ID the button will send.
   1.274 +     * @param aText The text for the button.
   1.275 +     * @param aFile A multi-bitmap file, containing mask and bitmap images.
   1.276 +     * @param aBitmapId ID of the bitmap within aFile.
   1.277 +     * @param aMaskId ID of the mask within aFile.
   1.278 +     */        
   1.279 +    inline void SetCommandL(
   1.280 +        TInt aPosition, 
   1.281 +        TInt aCommandId, 
   1.282 +        const TDesC& aText,
   1.283 +        const TDesC& aFile,
   1.284 +        TInt aBitmapId,
   1.285 +        TInt aMaskId);
   1.286 +
   1.287 +    /**
   1.288 +     * Sets a command button's bitmap, text label and command ID. The bitmap, mask,
   1.289 +     * text and command ID are all read from resource.
   1.290 +     *
   1.291 +     * @param aPosition The position within the button group of the button to change.
   1.292 +     *                  If the position is out of range, the function raises a panic.
   1.293 +     * @param aResourceId Resource ID specifying the text, bitmaps and command ID.
   1.294 +     */        
   1.295 +    inline void SetCommandL(
   1.296 +        TInt aPosition, 
   1.297 +        TInt aResourceId);
   1.298 +
   1.299 +    /**
   1.300 +     * Sets a command button's text. The button to change is identified by its command ID.
   1.301 +     *
   1.302 +     * @param aCommandId Command ID of the button to change.
   1.303 +     * @param aText The text for the button.
   1.304 +     * @leave KErrNotFound The ID cannot be matched to any button.
   1.305 +     */        
   1.306 +    inline void SetCommandL(
   1.307 +        TInt aCommandId, 
   1.308 +        const TDesC& aText);
   1.309 +
   1.310 +    /**
   1.311 +     * Sets a command button's bitmap and mask. The button to change is identified 
   1.312 +     * by its command ID.
   1.313 +     *
   1.314 +     * @param aCommandId Command ID of the button to change.
   1.315 +     * @param aBitmap Bitmap for the button.
   1.316 +     * @param aMask Mask bitmap for aBitmap.
   1.317 +     * @leave KErrNotFound The ID cannot be matched to any button.
   1.318 +     */        
   1.319 +    inline void SetCommandL(
   1.320 +        TInt aCommandId, 
   1.321 +        const CFbsBitmap& aBitmap,
   1.322 +        const CFbsBitmap& aMask);
   1.323 +
   1.324 +    /**
   1.325 +     * Sets a command button's bitmap, mask and text. The button to change is 
   1.326 +     * identified by its command ID.
   1.327 +     *
   1.328 +     * @param aCommandId Command ID of the button to change.
   1.329 +     * @param aText Text for the button.
   1.330 +     * @param aBitmap Bitmap for the button.
   1.331 +     * @param aMask Mask bitmap for aBitmap.
   1.332 +     */        
   1.333 +    inline void SetCommandL(
   1.334 +        TInt aCommandId, 
   1.335 +        const TDesC& aText,
   1.336 +        const CFbsBitmap& aBitmap,
   1.337 +        const CFbsBitmap& aMask);
   1.338 +
   1.339 +    /**
   1.340 +     * Sets a command button's bitmap and mask. The bitmap and mask are read from 
   1.341 +     * a multi bitmap file. The button to change is identified by its command ID.
   1.342 +     *
   1.343 +     * @param aCommandId Command ID of the button to change.
   1.344 +     * @param aFile A multi-bitmap file, containing mask and bitmap images.
   1.345 +     * @param aBitmapId ID of the bitmap within aFile.
   1.346 +     * @param aMaskId ID of the mask within aFile.
   1.347 +     */        
   1.348 +    inline void SetCommandL(
   1.349 +        TInt aCommandId, 
   1.350 +        const TDesC& aFile,
   1.351 +        TInt aBitmapId,
   1.352 +        TInt aMaskId);
   1.353 +
   1.354 +    /**
   1.355 +     * Sets a command button's bitmap, mask and text. The bitmap and its mask are read 
   1.356 +     * from a multi bitmap file. The button to change is identified by its command ID.
   1.357 +     *
   1.358 +     * @param aCommandId Command ID of the button to change.
   1.359 +     * @param aText Text for the button.
   1.360 +     * @param aFile  A multi-bitmap file, containing mask and bitmap images.
   1.361 +     * @param aBitmapId ID of the bitmap within aFile.
   1.362 +     * @param aMaskId ID of the mask within aFile.
   1.363 +     */        
   1.364 +    inline void SetCommandL(
   1.365 +        TInt aCommandId, 
   1.366 +        const TDesC& aText,
   1.367 +        const TDesC& aFile,
   1.368 +        TInt aBitmapId,
   1.369 +        TInt aMaskId);
   1.370 +
   1.371 +    /**
   1.372 +     * Initialises the group of command buttons from a resource.
   1.373 +     *
   1.374 +     * @param aResourceId ID of the resource structure specifying the command buttons.
   1.375 +     */        
   1.376 +    IMPORT_C void SetCommandSetL(
   1.377 +        TInt aResourceId);   
   1.378 +
   1.379 +    /**
   1.380 +     * Adds a command button with a text label and command ID.
   1.381 +     *
   1.382 +     * @param aPosition The position in the button group for the new button.
   1.383 +     * @param aCommandId Command ID for the new button.
   1.384 +     * @param aText Text for the button.          
   1.385 +     */   
   1.386 +    inline void AddCommandL(
   1.387 +        TInt aPosition, 
   1.388 +        TInt aCommandId,
   1.389 +        const TDesC& aText);
   1.390 +
   1.391 +    /**
   1.392 +     * Adds a command button with a bitmap label and command ID.
   1.393 +     *
   1.394 +     * @param aPosition The position in the button group for the new button.
   1.395 +     * @param aCommandId Command ID for the new button.
   1.396 +     * @param aBitmap Bitmap for the button.
   1.397 +     * @param aMask Mask bitmap for aBitmap.
   1.398 +     */        
   1.399 +    inline void AddCommandL(
   1.400 +        TInt aPosition, 
   1.401 +        TInt aCommandId,
   1.402 +        const CFbsBitmap& aBitmap,
   1.403 +        const CFbsBitmap& aMask);
   1.404 +
   1.405 +    /**
   1.406 +     * Adds a command button with a command ID and a label containing both 
   1.407 +     * a bitmap and text.
   1.408 +     *
   1.409 +     * @param aPosition The position in the button group for the new button.
   1.410 +     * @param aCommandId Command ID for the new button.
   1.411 +     * @param aText Text for the button.
   1.412 +     * @param aBitmap Bitmap for the button.
   1.413 +     * @param aMask Mask bitmap for aBitmap.
   1.414 +     */        
   1.415 +    inline void AddCommandL(
   1.416 +        TInt aPosition, 
   1.417 +        TInt aCommandId,
   1.418 +        const TDesC& aText,
   1.419 +        const CFbsBitmap& aBitmap,
   1.420 +        const CFbsBitmap& aMask);
   1.421 +
   1.422 +    /**
   1.423 +     * Adds a command button with a command ID and a bitmap which is read from a file.
   1.424 +     *
   1.425 +     * @param aPosition The position in the button group for the new button.
   1.426 +     * @param aCommandId Command ID for the new button.
   1.427 +     * @param aFile Multi-bitmap file containing the bitmap and mask.
   1.428 +     * @param aBitmapId ID of the bitmap within aFile.
   1.429 +     * @param aMaskId ID of the mask within aFile.
   1.430 +     */        
   1.431 +    inline void AddCommandL(
   1.432 +        TInt aPosition, 
   1.433 +        TInt aCommandId,
   1.434 +        const TDesC& aFile,
   1.435 +        TInt aBitmapId,
   1.436 +        TInt aMaskId);
   1.437 +
   1.438 +    /**
   1.439 +     * Adds a command button with a command ID and a label containing both a bitmap 
   1.440 +     * and text. The bitmap and mask are read from file.
   1.441 +     *
   1.442 +     * @param aPosition The position in the button group for the new button.
   1.443 +     * @param aCommandId Command ID for the new button.
   1.444 +     * @param aText Text for the button.
   1.445 +     * @param aFile Multi-bitmap file containing the bitmap and mask.
   1.446 +     * @param aBitmapId ID of the bitmap within aFile.
   1.447 +     * @param aMaskId ID of the mask within aFile.
   1.448 +     */        
   1.449 +    inline void AddCommandL(
   1.450 +        TInt aPosition, 
   1.451 +        TInt aCommandId,
   1.452 +        const TDesC& aText,
   1.453 +        const TDesC& aFile,
   1.454 +        TInt aBitmapId,
   1.455 +        TInt aMaskId);
   1.456 +
   1.457 +    /**
   1.458 +     * Pushes a command button with a text label and command ID onto a position's 
   1.459 +     * button stack. This function behaves similarly to SetCommandL() but allows 
   1.460 +     * the previous command button to be retrieved by calling RemoveCommandFromStack().
   1.461 +     *
   1.462 +     * @param aPosition The position in the button group at which to add the command button. 
   1.463 +     * @param aCommandId Command ID the button will send.
   1.464 +     * @param aText Text for the button.
   1.465 +     */        
   1.466 +    inline void AddCommandToStackL(
   1.467 +        TInt aPosition,
   1.468 +        TInt aCommandId,
   1.469 +        const TDesC& aText);
   1.470 +
   1.471 +    /**
   1.472 +     * Pushes a command button with a bitmap, mask and command ID onto a position's 
   1.473 +     * button stack. This function behaves similarly to SetCommandL() but allows the 
   1.474 +     * previous command button to be retrieved by calling RemoveCommandFromStack(). 
   1.475 +     *
   1.476 +     * @param aPosition The position in the button group at which to add the command button.
   1.477 +     * @param aCommandId Command ID the button will send.
   1.478 +     * @param aBitmap Bitmap for the button.
   1.479 +     * @param aMask Mask bitmap for aBitmap.
   1.480 +     */        
   1.481 +    inline void AddCommandToStackL(
   1.482 +        TInt aPosition,
   1.483 +        TInt aCommandId,
   1.484 +        const CFbsBitmap& aBitmap,
   1.485 +        const CFbsBitmap& aMask);
   1.486 +
   1.487 +    /**
   1.488 +     * Pushes a command button with text, bitmap, mask and a command ID onto a position's
   1.489 +     * button stack. This function behaves similarly to SetCommandL() but allows the 
   1.490 +     * previous command button to be retrieved by calling RemoveCommandFromStack().
   1.491 +     *
   1.492 +     * @param aPosition The position in the button group at which to add the command button.
   1.493 +     * @param aCommandId Command ID the button will send.
   1.494 +     * @param aText Text for the button.
   1.495 +     * @param aBitmap Bitmap for the button.
   1.496 +     * @param aMask Mask bitmap for aBitmap.
   1.497 +     */        
   1.498 +    inline void AddCommandToStackL(
   1.499 +        TInt aPosition,
   1.500 +        TInt aCommandId,
   1.501 +        const TDesC& aText,
   1.502 +        const CFbsBitmap& aBitmap,
   1.503 +        const CFbsBitmap& aMask);
   1.504 +
   1.505 +    /**
   1.506 +     * Pushes a command button with a bitmap, mask and command ID onto a position's button 
   1.507 +     * stack. The bitmap and mask are read from a file. This function behaves similarly to 
   1.508 +     * SetCommandL() but allows the previous command button to be retrieved by calling 
   1.509 +     * RemoveCommandFromStack().
   1.510 +     *
   1.511 +     * @param aPosition The position in the button group at which to add the command button.
   1.512 +     * @param aCommandId Command ID the button will send.
   1.513 +     * @param aFile A multi-bitmap file containing mask and bitmap.
   1.514 +     * @param aBitmapId Index into the file of the bitmap.
   1.515 +     * @param aMaskId Index into the file of the bitmap mask.
   1.516 +     */        
   1.517 +    inline void AddCommandToStackL(
   1.518 +        TInt aPosition,
   1.519 +        TInt aCommandId,
   1.520 +        const TDesC& aFile,
   1.521 +        TInt aBitmapId,
   1.522 +        TInt aMaskId);
   1.523 +
   1.524 +    /**
   1.525 +     * Pushes a command button with text, bitmap, mask and command button onto a position's 
   1.526 +     * button stack. The bitmap and mask are read from a file. This function behaves similarly
   1.527 +     * to SetCommandL() but allows the previous command button to be retrieved by calling 
   1.528 +     * RemoveCommandFromStack(). 
   1.529 +     *
   1.530 +     * @param aPosition The position in the button group at which to push the command button.
   1.531 +     * @param aCommandId Command ID the button will send.
   1.532 +     * @param aText Text for the button.
   1.533 +     * @param aFile A multi-bitmap file containing mask and bitmap.
   1.534 +     * @param aBitmapId Index into the file of the bitmap.
   1.535 +     * @param aMaskId Index into the file of the bitmap mask.
   1.536 +     */        
   1.537 +    inline void AddCommandToStackL(
   1.538 +        TInt aPosition,
   1.539 +        TInt aCommandId,
   1.540 +        const TDesC& aText,
   1.541 +        const TDesC& aFile,
   1.542 +        TInt aBitmapId,
   1.543 +        TInt aMaskId);
   1.544 +
   1.545 +    /**
   1.546 +     * Pushes a command button onto a position's button stack. The text, bitmap, mask and 
   1.547 +     * command ID are all read from resource. This function behaves similarly to 
   1.548 +     * SetCommandL() but allows the previous command button to be retrieved by calling 
   1.549 +     * RemoveCommandFromStack().
   1.550 +     *
   1.551 +     * @param aPosition The position in the button group at which to push the command button.
   1.552 +     * @param aResourceId ID of a resource specifying the text, bitmaps and command ID.
   1.553 +     */        
   1.554 +    inline void AddCommandToStackL(
   1.555 +        TInt aPosition,
   1.556 +        TInt aResourceId);
   1.557 +
   1.558 +    /**
   1.559 +     * As with SetCommandL() but for a set of buttons, also allows the previous command 
   1.560 +     * button to be retrieved by calling RemoveCommand().
   1.561 +     *
   1.562 +     * @param aResourceId Resource describing the set of command buttons.
   1.563 +     */        
   1.564 +    IMPORT_C void AddCommandSetToStackL(
   1.565 +        TInt aResourceId);
   1.566 +
   1.567 +    /**
   1.568 +     * Removes the command identified by aCommandId, in position aPosition in the group,
   1.569 +     * from the command stack. Automatically retrieves the previous command details. 
   1.570 +     * Commands are added to the stack by calling AddCommandToStackL.
   1.571 +     *
   1.572 +     * @param aPosition The position in the button group from which to remove the 
   1.573 +     *                  command button.
   1.574 +     * @param aCommandId Command ID.
   1.575 +     */        
   1.576 +    IMPORT_C void RemoveCommandFromStack(TInt aPosition, TInt aCommandId);
   1.577 +
   1.578 +    /**
   1.579 +     * Sets the default command ID for buttons in this container.
   1.580 +     *
   1.581 +     * @param aCommandId Command to issue if no other is specified.
   1.582 +     */    
   1.583 +    IMPORT_C void SetDefaultCommand(TInt aCommandId); 
   1.584 +
   1.585 +    /**
   1.586 +     * Calculates minimum size required to display the buttons defined in the specified
   1.587 +     * resource structure.
   1.588 +     *
   1.589 +     * @param aResourceId The ID of the resource structure describing the button group.
   1.590 +     * @return Minimum size required to display the button group defined in the specified resource structure.
   1.591 +     */    
   1.592 +    IMPORT_C TSize CalcMinimumSizeL(TInt aResourceId) const;    
   1.593 +
   1.594 +    /**
   1.595 +     * Places the command in position aPosition in the group on the cleanup stack. Typically 
   1.596 +     * used when a control or view changes the contents of two or more buttons on receipt of 
   1.597 +     * focus. After altering one command with a call to AddCommandToStackL() the push is made 
   1.598 +     * to guarantee the display will be left in a consistent state if the second (and any 
   1.599 +     * subsequent) calls to AddCommandToStackL() fail. Only a single command can be pushed 
   1.600 +     * for each position.
   1.601 +     *
   1.602 +     * @param aPosition Position in the container of the button to push.
   1.603 +     */    
   1.604 +    IMPORT_C void CleanupCommandPushL(TInt aPosition);
   1.605 +
   1.606 +    /**
   1.607 +     * Removes a command from the cleanup stack without destroying it.
   1.608 +     */    
   1.609 +    inline void CleanupCommandPop();
   1.610 +
   1.611 +    /**
   1.612 +     * Removes one or more commands from the cleanup stack without destroying them.
   1.613 +     *
   1.614 +     * @param aCount Number of commands to pop.
   1.615 +     */    
   1.616 +    IMPORT_C void CleanupCommandPop(TInt aCount);       
   1.617 +
   1.618 +    /**
   1.619 +     * Removes a single command which was pushed onto the cleanup stack. It does this by 
   1.620 +     * calling CleanupCommandPushL(), rolling back to the previous details. The command
   1.621 +     * button popped is destroyed.
   1.622 +     */    
   1.623 +    inline void CleanupCommandPopAndDestroy();
   1.624 +
   1.625 +    /**
   1.626 +     * Removes one or more commands which were pushed onto the cleanup stack. It does this 
   1.627 +     * by calling CleanupCommandPushL(), rolling back to the previous details. The command 
   1.628 +     * buttons popped are destroyed.
   1.629 +     *
   1.630 +     * @param aCount Number of commands to pop and destroy.
   1.631 +     */    
   1.632 +    inline void CleanupCommandPopAndDestroy(TInt aCount);   
   1.633 +
   1.634 +    /**
   1.635 +     * Gets the maximum number of buttons that can be supported by the device.
   1.636 +     *
   1.637 +     * @return The number of command buttons supported.
   1.638 +     */    
   1.639 +    IMPORT_C TInt MaxCommands() const;
   1.640 +
   1.641 +    /**
   1.642 +     * Gets the total number of buttons currently present in the group.
   1.643 +     *
   1.644 +     * @return The number of buttons.
   1.645 +     */    
   1.646 +    IMPORT_C TInt ButtonCount() const;
   1.647 +    
   1.648 +    /**
   1.649 +    * Dims (but doesn't draw) the button with id aCommandId if aDimmed is ETrue. If two 
   1.650 +    * buttons have the same id, the button to be dimmed is undefined.
   1.651 +    *
   1.652 +    * @param aCommandId The id for command to be dimmed.
   1.653 +    * @param aDimmed ETrue for dimming.
   1.654 +    */
   1.655 +    IMPORT_C void DimCommand(TInt aCommandId, TBool aDimmed);
   1.656 +    
   1.657 +    /**
   1.658 +    * Returns ETrue if the button with id aCommandId is dimmed. If two buttons have 
   1.659 +    * the same id, the results of this check are undefined.
   1.660 +    *
   1.661 +    * @param aCommandId The id for command to be checked.
   1.662 +    * @return The state of the button.    
   1.663 +    */
   1.664 +    IMPORT_C TBool IsCommandDimmed(TInt aCommandId) const;
   1.665 +    
   1.666 +    /**
   1.667 +    * Sets the the button with id aCommandId to be visible if aVisible is ETrue. If two 
   1.668 +    * buttons have the same id, the button to be altered is undefined.
   1.669 +    *
   1.670 +    * @param aCommandId The id for command to be made visible.
   1.671 +    * @param aVisible EFalse for making button invisible.
   1.672 +    */
   1.673 +    IMPORT_C void MakeCommandVisible(TInt aCommandId, TBool aVisible);
   1.674 +
   1.675 +    /**
   1.676 +    * Returns ETrue if the button with id aCommandId is visible. If two buttons have 
   1.677 +    * the same id, the results are undefined.
   1.678 +    *
   1.679 +    * @param aCommandId The id for command to be checked.
   1.680 +    * @return The state of the button.     
   1.681 +    */
   1.682 +    IMPORT_C TBool IsCommandVisible(TInt aCommandId) const;
   1.683 +
   1.684 +    /**
   1.685 +    * Animates the button with id aCommandId. If two buttons have the same id, the 
   1.686 +    * button to be animated is undefined.
   1.687 +    *
   1.688 +    * @since S60 3.1
   1.689 +    * @param aCommandId The id for command to be animated.   
   1.690 +    */
   1.691 +    IMPORT_C void AnimateCommand(TInt aCommandId);
   1.692 +    
   1.693 +    /**
   1.694 +    * Dims (but doesn't draw) the button with position aPosition.
   1.695 +    *
   1.696 +    * @since S60 3.1
   1.697 +    * @param aPosition The position for command to be dimmed.
   1.698 +    * @param aDimmed ETrue for dimming.
   1.699 +    */
   1.700 +    IMPORT_C void DimCommandByPosition(TCommandPosition aPosition, TBool aDimmed);
   1.701 +    
   1.702 +    /**
   1.703 +    * Returns ETrue if the button with position aPosition is dimmed.
   1.704 +    *
   1.705 +    * @since S60 3.1
   1.706 +    * @param aPosition The position for command to be checked.
   1.707 +    * @return The state of the button.    
   1.708 +    */
   1.709 +    IMPORT_C TBool IsCommandDimmedByPosition(TCommandPosition aPosition) const;
   1.710 +    
   1.711 +    /**
   1.712 +    * Sets the the button with position aPosition to be visible if aVisible is ETrue.
   1.713 +    *
   1.714 +    * @since S60 3.1
   1.715 +    * @param aPosition The position for command to be made visible.
   1.716 +    * @param aVisible EFalse for making button invisible.
   1.717 +    */
   1.718 +    IMPORT_C void MakeCommandVisibleByPosition(TCommandPosition aPosition, TBool aVisible);
   1.719 +    
   1.720 +    /**
   1.721 +    * Returns ETrue if the button with position aPosition is visible.
   1.722 +    *
   1.723 +    * @since S60 3.1
   1.724 +    * @param aPosition The position for command to be checked.
   1.725 +    * @return The state of the button.     
   1.726 +    */
   1.727 +    IMPORT_C TBool IsCommandVisibleByPosition(TCommandPosition aPosition) const;
   1.728 +    
   1.729 +    /**
   1.730 +    * Animates the button with position aPosition.
   1.731 +    *
   1.732 +    * @since S60 3.1
   1.733 +    * @param aPosition The position for command to be animated.    
   1.734 +    */
   1.735 +    IMPORT_C void AnimateCommandByPosition(TCommandPosition aPosition);
   1.736 +
   1.737 +    /**
   1.738 +     * Gets the button group's location. Typically the button group is external to the 
   1.739 +     * view which is using it. In some cases, such as in dialogs with button panels, 
   1.740 +     * the button group is internal to the control which is using it.
   1.741 +     *
   1.742 +     * @return The button group's location.
   1.743 +     */  
   1.744 +    IMPORT_C TLocation Location() const;
   1.745 +    
   1.746 +    /**
   1.747 +     * Gets a pointer to the command button with the specified command Id.
   1.748 +     *
   1.749 +     * @param aCommandId Command ID of the button.
   1.750 +     * @return Pointer to the command button CEikCommandButton, NULL if there 
   1.751 +     *         was no button with Id aCommandId.
   1.752 +     */      
   1.753 +    IMPORT_C CEikCommandButton* CommandButtonOrNull(TInt aCommandId) const;
   1.754 +    
   1.755 +    /**
   1.756 +     * Sets the boundary rectangle for externally-positioned button groups. 
   1.757 +     * For use by EExternal button groups only.
   1.758 +     * 
   1.759 +     * @param aRect The boundary rectangle to use. The button group attaches 
   1.760 +     *              itself to the inside of this rectangle.
   1.761 +     */    
   1.762 +    IMPORT_C void SetBoundingRect(const TRect& aRect);
   1.763 +
   1.764 +    /**
   1.765 +     * Subtracts the area occupied by the button group from the specified bounding 
   1.766 +     * rectangle. This method should be used in preference to querying the container's 
   1.767 +     * area at all times. For use by EExternal button groups only.
   1.768 +     * 
   1.769 +     * @param aBoundingRect Rectangle to be modified.
   1.770 +     */        
   1.771 +    IMPORT_C void ReduceRect(TRect& aBoundingRect) const;
   1.772 +
   1.773 +    /**
   1.774 +     * Gets a pointer to the control (button) with the specified command ID. 
   1.775 +     * This method is intended to allow access to standard CCoeControl functionality 
   1.776 +     * only. Casting the return value is likely to fail on different devices.
   1.777 +     *
   1.778 +     * @param aCommandId Command ID of the button to get.
   1.779 +     * @return Pointer to a CCoeControl, NULL if there was no button at aCommandId.
   1.780 +     */
   1.781 +    IMPORT_C CCoeControl* ControlOrNull(TInt aCommandId) const;
   1.782 +    
   1.783 +    /**
   1.784 +     * Gets a pointer to the the button with the specified command Id.
   1.785 +     *
   1.786 +     * @param aCommandId Command ID of the button to obtain.
   1.787 +     * @return The button object.
   1.788 +     */    
   1.789 +    IMPORT_C CEikCommandButton* ButtonById(TInt aCommandId) const;
   1.790 +    
   1.791 +    /**
   1.792 +     * Gets the position in the group of the button with the specified command Id.
   1.793 +     * The return value is undefined if two buttons share the same id.
   1.794 +     *
   1.795 +     * @param aCommandId Identifies the command.
   1.796 +     * @return The command's container position.
   1.797 +     */     
   1.798 +    IMPORT_C TInt PositionById(TInt aCommandId) const;
   1.799 +    
   1.800 +    /**
   1.801 +     * Updates a command's hotkey and whether the key is displayed. 
   1.802 +     * This function is only supported by containers being used for dialog buttons.
   1.803 +     *
   1.804 +     * @param aCommandId Identifies the command to update.
   1.805 +     * @param aFlags Whether to display the hotkey.
   1.806 +     * @param aKeyId Hotkey identifier.
   1.807 +     */    
   1.808 +    IMPORT_C void UpdateHotKey(TInt aCommandId, THotKeyFlags aFlags, TInt aKeyId);
   1.809 +    
   1.810 +    /**
   1.811 +     * Changes the command observer for the button at aPos to aCommandObserver. 
   1.812 +     * Panics if an updated observer is already present. This function should be followed 
   1.813 +     * by RemoveCommandObserver() when you need to put back the original observer.
   1.814 +     *
   1.815 +     * @param aPos The button's position.
   1.816 +     * @param aCommandObserver The command observer.
   1.817 +     */    
   1.818 +    IMPORT_C void UpdateCommandObserverL(TInt aPos, MEikCommandObserver& aCommandObserver);
   1.819 +    
   1.820 +    /**
   1.821 +     * Removes the temporary observer for the button at aPos, replacing it with the
   1.822 +     * observer that was present when UpdateCommandObserverL() was called.
   1.823 +     *
   1.824 +     * @param aPos The button's position.
   1.825 +     */    
   1.826 +    IMPORT_C void RemoveCommandObserver(TInt aPos);
   1.827 +    
   1.828 +    /**
   1.829 +     * Checks for existence of updated command observer for the button at aPosition.
   1.830 +     *
   1.831 +     * @since S60 3.2
   1.832 +     * @param aPosition The position for button to be checked.
   1.833 +     * @return ETrue, if updated command observer exists.
   1.834 +     */    
   1.835 +    IMPORT_C TBool UpdatedCommandObserverExists(TCommandPosition aPosition) const;
   1.836 +    
   1.837 +    /**
   1.838 +     * Tests whether the button group has explicitly been instructed to suppress redraws.
   1.839 +     * Some button groups may not activate themselves during construction, in which 
   1.840 +     * case, they need to be activated by the client. This method allows the client 
   1.841 +     * to enquire whether this is necessary.
   1.842 +     *
   1.843 +     * @return ETrue if the button group will suppress redraws, otherwise EFalse.
   1.844 +     */    
   1.845 +    IMPORT_C TBool DelayActivation() const;
   1.846 +    
   1.847 +    /**
   1.848 +     * Returns the container's button group.
   1.849 +     *
   1.850 +     * @return Pointer to the button group object. Ownership is not transferred.
   1.851 +     */    
   1.852 +    inline MEikButtonGroup* ButtonGroup();
   1.853 +    
   1.854 +    /**
   1.855 +     * Returns the button group type.
   1.856 +     *
   1.857 +     * @return The button group type.
   1.858 +     */    
   1.859 +    inline TUse ButtonGroupType();
   1.860 +    
   1.861 +    /**
   1.862 +    * Internal method for setting markable list's MSK observer.
   1.863 +    * This observer is called before default CBA observer if MSK is pressed.
   1.864 +    * Observer is removed by passing NULL as parameter.
   1.865 +    *
   1.866 +    * @since S60 3.1
   1.867 +    * @param aMSKObserverOwner
   1.868 +    * @param aCommandObserver
   1.869 +    */
   1.870 +    void UpdateMSKCommandObserver(
   1.871 +        CEikListBox* aMSKObserverOwner, 
   1.872 +        MEikCommandObserver* aCommandObserver);
   1.873 +    
   1.874 +public: // From CCoeControl.
   1.875 +    /**
   1.876 +     * From CCoeControl.
   1.877 +     * Gets the control's minimum required size.
   1.878 +     *
   1.879 +     * @return The minimum size required by the control.
   1.880 +     */ 
   1.881 +    IMPORT_C TSize MinimumSize();
   1.882 +    
   1.883 +    /**
   1.884 +     * From CCoeControl.
   1.885 +     * Handles key events.
   1.886 +     *
   1.887 +     * @param aKeyEvent The key event. 
   1.888 +     * @param aType The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. 
   1.889 +     * @return Indicates whether or not the key event was used by this control. 
   1.890 +     */     
   1.891 +    IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
   1.892 +    
   1.893 +    /**
   1.894 +     * From CCoeControl.
   1.895 +     * Sets this control as visible or invisible.
   1.896 +     *
   1.897 +     * @param aVisible ETrue to make the control visible, EFalse to make it invisible. 
   1.898 +     */     
   1.899 +    void MakeVisible(TBool aVisible);
   1.900 +    
   1.901 +    /**
   1.902 +     * From CCoeControl.
   1.903 +     * Writes the internal state of the control and its components to aStream.
   1.904 +     * Does nothing in release mode.
   1.905 +     *
   1.906 +     * @param aWriteStream The output stream.
   1.907 +     */     
   1.908 +    IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
   1.909 +    
   1.910 +public:
   1.911 +    /**
   1.912 +     * Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.
   1.913 +     */ 
   1.914 +    IMPORT_C virtual void Reserved_MtsmPosition();
   1.915 +    
   1.916 +    /**
   1.917 +     * Formerly from MTopSetMember<CEikButtonGroupContainer>, now reserved.
   1.918 +     */     
   1.919 +    IMPORT_C virtual void Reserved_MtsmObject();
   1.920 +
   1.921 +public: // New functions for enhanced cba support.
   1.922 +    /**
   1.923 +     * Used to offer list of commands for softkeys.
   1.924 +     *
   1.925 +     * @since S60 3.2
   1.926 +     * @param aCommandList A list of command ids to be offered for softkeys.
   1.927 +     */
   1.928 +    IMPORT_C void OfferCommandListL(const RArray<TInt>& aCommandList);
   1.929 +    
   1.930 +    /**
   1.931 +     * Used to offer list of commands for softkeys.
   1.932 +     *
   1.933 +     * @since S60 3.2
   1.934 +     * @param aResourceId Id for CBA resource that defines enhanced cba buttons.
   1.935 +     */ 
   1.936 +    IMPORT_C void OfferCommandListL(const TInt aResourceId);
   1.937 +
   1.938 +    /**
   1.939 +     * Used to check if a certain command have been approved to the current command set
   1.940 +     *
   1.941 +     * @since S60 3.2
   1.942 +     * @param aCommandId The id for command which existence should be checked.
   1.943 +     * @return ETrue if command is in control group, otherwise EFalse.
   1.944 +     */     
   1.945 +    IMPORT_C TBool IsCommandInGroup(const TInt aCommandId) const;
   1.946 +    
   1.947 +    /**
   1.948 +     * Replaces command with another.
   1.949 +     *
   1.950 +     * @since S60 3.2 
   1.951 +     * @param aCommandId Id for command that should be replaced.
   1.952 +     * @param aResourceId Resource id for new enhanced cba button.
   1.953 +     */     
   1.954 +    IMPORT_C void ReplaceCommand(const TInt aCommandId, const TInt aResourceId);
   1.955 +
   1.956 +private:
   1.957 +    enum TCommandOp {ESet, EAdd, EPush};
   1.958 +    
   1.959 +private:
   1.960 +    class TCmdPos
   1.961 +        {
   1.962 +    public:
   1.963 +        inline TCmdPos();
   1.964 +        inline TCmdPos(TInt aPos, TInt aCmd);
   1.965 +    public:
   1.966 +        TInt iPos;
   1.967 +        TInt iCmd;
   1.968 +        };
   1.969 +        
   1.970 +    class TCmdObserver
   1.971 +        {
   1.972 +    public:
   1.973 +        inline TCmdObserver(TInt aPos, MEikCommandObserver& aObserver);
   1.974 +    public:
   1.975 +        TInt iPos;
   1.976 +        MEikCommandObserver& iObserver;
   1.977 +        };
   1.978 +        
   1.979 +    class CCmdObserverArray : public CArrayFixFlat<TCmdObserver>
   1.980 +        {
   1.981 +    public:
   1.982 +        inline CCmdObserverArray();
   1.983 +        TInt FindIndex(TInt aPos);
   1.984 +        };
   1.985 +        
   1.986 +private:
   1.987 +    CEikButtonGroupContainer(TUse aUse);
   1.988 +    
   1.989 +    void ConstructL(
   1.990 +        TOrientation aOrientation,
   1.991 +        MEikCommandObserver* aCommandObserver,
   1.992 +        TInt aResourceId,
   1.993 +        RWindowGroup* aParentWg,
   1.994 +        TUint aFlags);
   1.995 +        
   1.996 +    IMPORT_C void DoSetCommandL(
   1.997 +        TInt aPosition,
   1.998 +        TInt aCommandId,
   1.999 +        const TDesC* aText,
  1.1000 +        const CFbsBitmap* aBitmap,
  1.1001 +        const CFbsBitmap* aMask,
  1.1002 +        TCommandOp aOp);
  1.1003 +        
  1.1004 +    IMPORT_C void DoSetCommandL(
  1.1005 +        TInt aPosition,
  1.1006 +        TInt aCommandId,
  1.1007 +        const TDesC* aText,
  1.1008 +        const TDesC& aFile,
  1.1009 +        TInt aBitmapId,
  1.1010 +        TInt aMaskId,
  1.1011 +        TCommandOp aOp);
  1.1012 +        
  1.1013 +    IMPORT_C void DoSetCommandL(
  1.1014 +        TInt aCommandId,
  1.1015 +        const TDesC* aText,
  1.1016 +        const CFbsBitmap* aBitmap,
  1.1017 +        const CFbsBitmap* aMask,
  1.1018 +        TCommandOp aOp);
  1.1019 +        
  1.1020 +    IMPORT_C void DoSetCommandL(
  1.1021 +        TInt aCommandId,
  1.1022 +        const TDesC* aText,
  1.1023 +        const TDesC& aFile,
  1.1024 +        TInt aBitmapId,
  1.1025 +        TInt aMaskId,
  1.1026 +        TCommandOp aOp);
  1.1027 +        
  1.1028 +    IMPORT_C void DoSetCommandL(
  1.1029 +        TInt aPosition,
  1.1030 +        TInt aResourceId,
  1.1031 +        TCommandOp aOp);
  1.1032 +    
  1.1033 +    inline CCoeControl* ButtonGroupAsControl() const;
  1.1034 +    void UpdateRect();
  1.1035 +    static void CleanupCommandDestroy(TAny* aPtr);
  1.1036 +    TCmdPos DoCleanupCommandPop();
  1.1037 +    void DoCleanupCommandPopAndDestroy();
  1.1038 +
  1.1039 +private: // from CCoeControl
  1.1040 +    TInt CountComponentControls() const;
  1.1041 +    CCoeControl* ComponentControl(TInt aIndex) const;
  1.1042 +    void SizeChanged();
  1.1043 +
  1.1044 +private: // from MEikCommandObserver
  1.1045 +    void ProcessCommandL(TInt aCommandId);
  1.1046 +    CCoeControl* CreateCustomCommandControlL(TInt aControlType);
  1.1047 +
  1.1048 +private:
  1.1049 +    MEikButtonGroup* iButtonGroup;
  1.1050 +    TUse iUse;
  1.1051 +    CArrayFix<TCmdPos>* iCommandsCleanup;
  1.1052 +    MEikCommandObserver* iCommandObserver;
  1.1053 +    CCmdObserverArray* iObserverArray;
  1.1054 +    TDblQueLink iBtLink;
  1.1055 +    CEikListBox* iMSKObserverOwner;
  1.1056 +    TInt iSpare;
  1.1057 +
  1.1058 +private:
  1.1059 +    friend class CCmdObserverArray;
  1.1060 +    friend class CEikButtonGroupStack;
  1.1061 +    };
  1.1062 +
  1.1063 +
  1.1064 +// Inline function implementations.
  1.1065 +
  1.1066 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1067 +    TInt aPosition,
  1.1068 +    TInt aCommandId,
  1.1069 +    const TDesC& aText)
  1.1070 +    {
  1.1071 +    DoSetCommandL(aPosition, aCommandId, &aText, NULL, NULL, ESet);
  1.1072 +    }
  1.1073 +
  1.1074 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1075 +    TInt aPosition,
  1.1076 +    TInt aCommandId,
  1.1077 +    const CFbsBitmap& aBitmap,
  1.1078 +    const CFbsBitmap& aMask)
  1.1079 +    {
  1.1080 +    DoSetCommandL(aPosition, aCommandId, NULL, &aBitmap, &aMask, ESet);
  1.1081 +    }
  1.1082 +
  1.1083 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1084 +    TInt aPosition,
  1.1085 +    TInt aCommandId,
  1.1086 +    const TDesC& aText,
  1.1087 +    const CFbsBitmap& aBitmap,
  1.1088 +    const CFbsBitmap& aMask)
  1.1089 +    {
  1.1090 +    DoSetCommandL(aPosition, aCommandId, &aText, &aBitmap, &aMask, ESet);
  1.1091 +    }
  1.1092 +
  1.1093 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1094 +    TInt aPosition,
  1.1095 +    TInt aCommandId,
  1.1096 +    const TDesC& aFile,
  1.1097 +    TInt aBitmapId,
  1.1098 +    TInt aMaskId)
  1.1099 +    {
  1.1100 +    DoSetCommandL(aPosition, aCommandId, NULL, aFile, aBitmapId, aMaskId, ESet);
  1.1101 +    }
  1.1102 +
  1.1103 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1104 +    TInt aPosition,
  1.1105 +    TInt aCommandId,
  1.1106 +    const TDesC& aText,
  1.1107 +    const TDesC& aFile,
  1.1108 +    TInt aBitmapId,
  1.1109 +    TInt aMaskId)
  1.1110 +    {
  1.1111 +    DoSetCommandL(aPosition, aCommandId, &aText, aFile, aBitmapId, aMaskId, ESet);
  1.1112 +    }
  1.1113 +
  1.1114 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1115 +    TInt aPosition,
  1.1116 +    TInt aResourceId)
  1.1117 +    {
  1.1118 +    DoSetCommandL(aPosition, aResourceId, ESet);
  1.1119 +    }
  1.1120 +
  1.1121 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1122 +    TInt aCommandId,
  1.1123 +    const TDesC& aText)
  1.1124 +    {
  1.1125 +    DoSetCommandL(aCommandId, &aText, NULL, NULL, ESet);
  1.1126 +    }
  1.1127 +
  1.1128 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1129 +    TInt aCommandId,
  1.1130 +    const CFbsBitmap& aBitmap,
  1.1131 +    const CFbsBitmap& aMask)
  1.1132 +    {
  1.1133 +    DoSetCommandL(aCommandId, NULL, &aBitmap, &aMask, ESet);
  1.1134 +    }
  1.1135 +
  1.1136 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1137 +    TInt aCommandId,
  1.1138 +    const TDesC& aText,
  1.1139 +    const CFbsBitmap& aBitmap,
  1.1140 +    const CFbsBitmap& aMask)
  1.1141 +    {
  1.1142 +    DoSetCommandL(aCommandId, &aText, &aBitmap, &aMask, ESet);
  1.1143 +    }
  1.1144 +
  1.1145 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1146 +    TInt aCommandId,
  1.1147 +    const TDesC& aFile,
  1.1148 +    TInt aBitmapId,
  1.1149 +    TInt aMaskId)
  1.1150 +    {
  1.1151 +    DoSetCommandL(aCommandId, NULL, aFile, aBitmapId, aMaskId, ESet);
  1.1152 +    }
  1.1153 +
  1.1154 +inline void CEikButtonGroupContainer::SetCommandL(
  1.1155 +    TInt aCommandId,
  1.1156 +    const TDesC& aText,
  1.1157 +    const TDesC& aFile,
  1.1158 +    TInt aBitmapId,
  1.1159 +    TInt aMaskId)
  1.1160 +    {
  1.1161 +    DoSetCommandL(aCommandId, &aText, aFile, aBitmapId, aMaskId, ESet);
  1.1162 +    }
  1.1163 +
  1.1164 +inline void CEikButtonGroupContainer::AddCommandL(
  1.1165 +    TInt aPosition,
  1.1166 +    TInt aCommandId,
  1.1167 +    const TDesC& aText)
  1.1168 +    {
  1.1169 +    DoSetCommandL(aPosition, aCommandId, &aText, NULL, NULL, EAdd);
  1.1170 +    }
  1.1171 +
  1.1172 +inline void CEikButtonGroupContainer::AddCommandL(
  1.1173 +    TInt aPosition,
  1.1174 +    TInt aCommandId,
  1.1175 +    const CFbsBitmap& aBitmap,
  1.1176 +    const CFbsBitmap& aMask)
  1.1177 +    {
  1.1178 +    DoSetCommandL(aPosition, aCommandId, NULL, &aBitmap, &aMask, EAdd);
  1.1179 +    }
  1.1180 +
  1.1181 +inline void CEikButtonGroupContainer::AddCommandL(
  1.1182 +    TInt aPosition,
  1.1183 +    TInt aCommandId,
  1.1184 +    const TDesC& aText,
  1.1185 +    const CFbsBitmap& aBitmap,
  1.1186 +    const CFbsBitmap& aMask)
  1.1187 +    {
  1.1188 +    DoSetCommandL(aPosition, aCommandId, &aText, &aBitmap, &aMask, EAdd);
  1.1189 +    }
  1.1190 +
  1.1191 +inline void CEikButtonGroupContainer::AddCommandL(
  1.1192 +    TInt aPosition,
  1.1193 +    TInt aCommandId,
  1.1194 +    const TDesC& aFile,
  1.1195 +    TInt aBitmapId,
  1.1196 +    TInt aMaskId)
  1.1197 +    {
  1.1198 +    DoSetCommandL(aPosition, aCommandId, NULL, aFile, aBitmapId, aMaskId, EAdd);
  1.1199 +    }
  1.1200 +
  1.1201 +inline void CEikButtonGroupContainer::AddCommandL(
  1.1202 +    TInt aPosition,
  1.1203 +    TInt aCommandId,
  1.1204 +    const TDesC& aText,
  1.1205 +    const TDesC& aFile,
  1.1206 +    TInt aBitmapId,
  1.1207 +    TInt aMaskId)
  1.1208 +    {
  1.1209 +    DoSetCommandL(aPosition, aCommandId, &aText, aFile, aBitmapId, aMaskId, EAdd);
  1.1210 +    }
  1.1211 +
  1.1212 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1213 +    TInt aPosition,
  1.1214 +    TInt aCommandId,
  1.1215 +    const TDesC& aText)
  1.1216 +    {
  1.1217 +    DoSetCommandL(aPosition, aCommandId, &aText, NULL, NULL, EPush);
  1.1218 +    }
  1.1219 +
  1.1220 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1221 +    TInt aPosition,
  1.1222 +    TInt aCommandId,
  1.1223 +    const CFbsBitmap& aBitmap,
  1.1224 +    const CFbsBitmap& aMask)
  1.1225 +    {
  1.1226 +    DoSetCommandL(aPosition, aCommandId, NULL, &aBitmap, &aMask, EPush);
  1.1227 +    }
  1.1228 +
  1.1229 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1230 +    TInt aPosition,
  1.1231 +    TInt aCommandId,
  1.1232 +    const TDesC& aText,
  1.1233 +    const CFbsBitmap& aBitmap,
  1.1234 +    const CFbsBitmap& aMask)
  1.1235 +    {
  1.1236 +    DoSetCommandL(aPosition, aCommandId, &aText, &aBitmap, &aMask, EPush);
  1.1237 +    }
  1.1238 +
  1.1239 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1240 +    TInt aPosition,
  1.1241 +    TInt aCommandId,
  1.1242 +    const TDesC& aFile,
  1.1243 +    TInt aBitmapId,
  1.1244 +    TInt aMaskId)
  1.1245 +    {
  1.1246 +    DoSetCommandL(aPosition, aCommandId, NULL, aFile, aBitmapId, aMaskId, EPush);
  1.1247 +    }
  1.1248 +
  1.1249 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1250 +    TInt aPosition,
  1.1251 +    TInt aCommandId,
  1.1252 +    const TDesC& aText,
  1.1253 +    const TDesC& aFile,
  1.1254 +    TInt aBitmapId,
  1.1255 +    TInt aMaskId)
  1.1256 +    {
  1.1257 +    DoSetCommandL(aPosition, aCommandId, &aText, aFile, aBitmapId, aMaskId, EPush);
  1.1258 +    }
  1.1259 +
  1.1260 +inline void CEikButtonGroupContainer::AddCommandToStackL(
  1.1261 +    TInt aPosition,
  1.1262 +    TInt aResourceId)
  1.1263 +    {
  1.1264 +    DoSetCommandL(aPosition, aResourceId, EPush);
  1.1265 +    }
  1.1266 +
  1.1267 +inline void CEikButtonGroupContainer::CleanupCommandPop()
  1.1268 +    {
  1.1269 +    CleanupCommandPop(1);
  1.1270 +    }
  1.1271 +
  1.1272 +inline void CEikButtonGroupContainer::CleanupCommandPopAndDestroy()
  1.1273 +    {
  1.1274 +    CleanupStack::PopAndDestroy();
  1.1275 +    }
  1.1276 +
  1.1277 +inline void CEikButtonGroupContainer::CleanupCommandPopAndDestroy(TInt aCount)
  1.1278 +    {
  1.1279 +    CleanupStack::PopAndDestroy(aCount);
  1.1280 +    }
  1.1281 +
  1.1282 +inline MEikButtonGroup* CEikButtonGroupContainer::ButtonGroup()
  1.1283 +    {
  1.1284 +    return iButtonGroup;
  1.1285 +    }
  1.1286 +
  1.1287 +inline CEikButtonGroupContainer::TUse CEikButtonGroupContainer::ButtonGroupType()
  1.1288 +    {
  1.1289 +    return iUse;
  1.1290 +    }
  1.1291 +
  1.1292 +#endif // __EIKBTGPC_H__