javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingscontainer.h
changeset 21 2a9601315dfc
child 23 98ccebc37403
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 /*
       
     2 * Copyright (c) 2003-2008 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:  Declares container control for application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef APPMNGR2MIDLETSETTINGSCONTAINER_H
       
    20 #define APPMNGR2MIDLETSETTINGSCONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "appmngr2midletsettingsview.h"         // CAppMngr2MidletSettingsView
       
    24 #include "appmngr2midletsettingsutil.h"
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CAppMngr2MidletSettingsView;
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * MIDlet suite settings container control class.
       
    36  *
       
    37  * @lib appmngr2midletplugin.dll
       
    38  * @since S60 v9.2
       
    39  */
       
    40 class CAppMngr2MidletSettingsContainer : public CCoeControl
       
    41 {
       
    42 public: // Constructors and destructor
       
    43 
       
    44     /**
       
    45     * C++ constructor.
       
    46     */
       
    47     CAppMngr2MidletSettingsContainer::CAppMngr2MidletSettingsContainer(
       
    48         CAppMngr2MidletSettingsView& aView);
       
    49 
       
    50     /**
       
    51     * EPOC default constructor.
       
    52     * @param aRect Frame rectangle for container.
       
    53     */
       
    54     void ConstructL(const TRect& aRect);
       
    55 
       
    56     /**
       
    57     * Destructor.
       
    58     */
       
    59     virtual ~CAppMngr2MidletSettingsContainer();
       
    60 
       
    61 public: // New functions
       
    62     /**
       
    63         * Return pointer to the listbox
       
    64         */
       
    65     inline CEikTextListBox* ListBox() const
       
    66     {
       
    67         return iListbox;
       
    68     };
       
    69 
       
    70     /**
       
    71         * Initializes the contents of the list box
       
    72         */
       
    73     void InitListBoxContentL(const std::vector<ListItem>& aListItems);
       
    74 
       
    75     /**
       
    76     * Refreshes the contents of the listbox
       
    77     */
       
    78     void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex);
       
    79 
       
    80     /**
       
    81     * Refreshes the contents of the listbox
       
    82     */
       
    83     void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex, const ListItem& aListItem);
       
    84 
       
    85     /**
       
    86     * Refreshes the contents of the listbox
       
    87     */
       
    88     void RefreshListBoxContentL(int aListBoxContentIndex, int aSelectedItemIndex, bool aAllEnabled);
       
    89 
       
    90     /**
       
    91     * Refreshes the contents of the listbox
       
    92     */
       
    93     void RefreshListBoxContentL(const ListItem& aOldItem, const ListItem& aNewItem);
       
    94 
       
    95     /**
       
    96     * Getter for a single list box item
       
    97     */
       
    98     const ListItem& GetListBoxItem(int aListBoxItemIndex);
       
    99 
       
   100     /**
       
   101     * Setter for a single list box item
       
   102     */
       
   103     void SetListBoxItemValue(int aListBoxItemIndex, int aValue);
       
   104 
       
   105 public: // Functions from base classes
       
   106 
       
   107     /**
       
   108     * From CCoeControl
       
   109     */
       
   110     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
       
   111 
       
   112 private: // Functions from base classes
       
   113 
       
   114     /**
       
   115      * From CoeControl,SizeChanged.
       
   116      */
       
   117     void SizeChanged();
       
   118 
       
   119     /**
       
   120       * From CoeControl,FocusChanged.
       
   121       */
       
   122     void FocusChanged(TDrawNow aDrawNow);
       
   123 
       
   124     /**
       
   125      * From CoeControl,CountComponentControls.
       
   126      */
       
   127     TInt CountComponentControls() const;
       
   128 
       
   129     /**
       
   130      * From CCoeControl,ComponentControl.
       
   131      */
       
   132     CCoeControl* ComponentControl(TInt aIndex) const;
       
   133 
       
   134     /**
       
   135      * From CCoeControl
       
   136      * Get the help context for this control.
       
   137      */
       
   138     void GetHelpContext(TCoeHelpContext& aContext) const;
       
   139 
       
   140     /**
       
   141     * From CCoeControl
       
   142     */
       
   143     void HandleResourceChange(TInt aType);
       
   144 
       
   145 private: //data
       
   146 
       
   147     /**
       
   148      * MIDlet suite settings view
       
   149      * Not owned
       
   150      */
       
   151     CAppMngr2MidletSettingsView& iView;
       
   152 
       
   153     /**
       
   154      * List box
       
   155      * Owned
       
   156      */
       
   157     CAknSettingStyleListBox* iListbox;
       
   158 
       
   159     /**
       
   160      * List box content
       
   161      * Owned
       
   162      */
       
   163     std::vector<ListItem> iListBoxContent;
       
   164 public:
       
   165 };
       
   166 
       
   167 #endif // APPMNGR2MIDLETSETTINGSCONTAINER_H
       
   168 
       
   169 // End of File