javauis/lcdui_akn/lcdui/inc/CMIDChoiceGroupListBox.h
branchRCL_3
changeset 19 04becd199f91
child 23 98ccebc37403
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  The CMIDChoiceGroup listbox
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CMIDCHOICEGROUPLISTBOX_H
       
    19 #define CMIDCHOICEGROUPLISTBOX_H
       
    20 
       
    21 #include <lcdui.h>
       
    22 #include <eikclb.h>
       
    23 // using CMIDChoiceGroupModel as parameter of ConstructL function
       
    24 #include "CMIDChoiceGroupModel.h"
       
    25 // CAknColumnListBox inheritance in declaration
       
    26 // using API in CMIDChoiceGroupControl
       
    27 #include <aknlists.h>
       
    28 
       
    29 
       
    30 #ifdef RD_TACTILE_FEEDBACK
       
    31 #include <touchfeedback.h>
       
    32 #endif //RD_TACTILE_FEEDBACK
       
    33 
       
    34 
       
    35 class CAknsFrameBackgroundControlContext;
       
    36 class CMIDChoiceGroupControl;
       
    37 
       
    38 // Shallow frosting around the CAknColumnListBox cake
       
    39 NONSHARABLE_CLASS(CMIDChoiceGroupListBox) : public CAknColumnListBox
       
    40 {
       
    41 public:
       
    42     // c'tor
       
    43     CMIDChoiceGroupListBox(CMIDChoiceGroupControl* aChoiceControl);
       
    44 
       
    45     // d'tor
       
    46     ~CMIDChoiceGroupListBox();
       
    47 
       
    48     // Construct with model from outside. Just sets the model
       
    49     // and calls CAknColumnListBox::ContructL()
       
    50     void ConstructL(
       
    51         const CCoeControl* aParent,
       
    52         TInt aFlags,
       
    53         CMIDChoiceGroupModel* aModel);
       
    54 
       
    55 public:  // from CCoeControl
       
    56     // Overridden, because CEikListBox returns EKeyWasConsumed when
       
    57     // up is pressed on the first item, or down on last. We need to
       
    58     // return not consumed in order to make the form move focus
       
    59     // to other items
       
    60     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
    61 
       
    62     void SizeChanged();
       
    63     void PositionChanged();
       
    64     void Draw(const TRect& aRect) const;
       
    65 
       
    66     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
       
    67     void HandleResourceChange(TInt aType);
       
    68 
       
    69 #ifdef RD_SCALABLE_UI_V2
       
    70     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    71 #endif
       
    72 
       
    73 #ifdef RD_TACTILE_FEEDBACK
       
    74 private:
       
    75     MTouchFeedback* iFeedback;
       
    76 #endif
       
    77 
       
    78 protected:
       
    79     // Overridden to use the CMIDChoiceGroupModel instead of the
       
    80     // normal listbox model. Note that this model is owned outside
       
    81     // the listbox, and must not be deleted by the box
       
    82     virtual void CreateModelL();
       
    83 
       
    84 private:
       
    85     void SetTextColors();
       
    86 
       
    87 private:
       
    88     CMIDChoiceGroupControl* iChoiceControl;
       
    89 
       
    90 #ifdef RD_JAVA_S60_RELEASE_9_2
       
    91     TBool iUpEventSent;
       
    92 #endif // RD_JAVA_S60_RELEASE_9_2
       
    93 };
       
    94 
       
    95 
       
    96 #endif // CMIDCHOICEGROUPLISTBOX_H