|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : datamobilityappmenucontainer.h 00004 * Part of : datamobility 00005 * Description : Declares the menu container class. 00006 * 00007 * Copyright (c) 2007 Nokia Corporation. 00008 * This material, including documentation and any related 00009 * computer programs, is protected by copyright controlled by 00010 * Nokia Corporation. 00011 * ============================================================================ 00012 */ 00013 00014 #ifndef DATAMOBILITYAPPMENUCONTAINER_H 00015 #define DATAMOBILITYAPPMENUCONTAINER_H 00016 00017 // INCLUDES 00018 #include <coecntrl.h> 00019 #include <eiklbo.h> 00020 00021 // FORWARD DECLARATIONS 00022 class CEikTextListBox; 00023 00024 // CLASS DECLARATION 00025 00026 /** 00027 * CDataMobilityAppMenuContainer container control class. 00028 * 00029 */ 00030 class CDataMobilityAppMenuContainer : public CCoeControl, public MEikListBoxObserver 00031 { 00032 public: // Constructors and destructor 00033 00034 /** 00035 * Symbian OS default constructor. 00036 * @param aRect Frame rectangle for container. 00037 */ 00038 void ConstructL(const TRect& aRect); 00039 00040 /** 00041 * Destructor. 00042 */ 00043 ~CDataMobilityAppMenuContainer(); 00044 00045 public: // New functions 00046 00047 /** 00048 * Get currently selected items index. 00049 * @return Current item index. 00050 */ 00051 TInt GetActiveLine() const; 00052 00053 /** 00054 * Method HandleSelectedListItemL handles valid index. 00055 * @param aIndex Current item index. 00056 */ 00057 void HandleSelectedListItemL( TInt aIndex ) const; 00058 00059 private: // Functions from base classes 00060 00061 /** 00062 * From CoeControl,SizeChanged. 00063 * Called by framework when the view size is changed. 00064 */ 00065 void SizeChanged(); 00066 00067 /** 00068 * From CoeControl,CountComponentControls. 00069 * @return Number of controls indside this container. 00070 */ 00071 TInt CountComponentControls() const; 00072 00073 /** 00074 * From CCoeControl,ComponentControl. 00075 * Gets the specified component of a compound control. 00076 * @param aIndex The index of the control to get. 00077 * @return The component control with an index of aIndex. 00078 */ 00079 CCoeControl* ComponentControl(TInt aIndex) const; 00080 00081 /** 00082 * Handles list box events. 00083 * @param aListBox The originating list box. 00084 * @param aEventType A code for the event. Further information may be 00085 * obtained by accessing the list box itself. 00086 */ 00087 void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType); 00088 00089 /** 00090 * From CCoeControl,OfferKeyEventL 00091 * Handles key events. 00092 * @param aKeyEvent The key event. 00093 * @param aType The type of key event. 00094 * @return Indicates whether or not the key event was used 00095 * by this control. 00096 */ 00097 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); 00098 00099 /** 00100 * From CCoeControl,OfferKeyEventL 00101 * Called by framework when the view layout is changed. 00102 * @param aType The type of resource change. 00103 */ 00104 virtual void HandleResourceChange(TInt aType); 00105 00106 private: //data 00107 00108 CEikTextListBox* iListBox; 00109 }; 00110 00111 #endif // DATAMOBILITYAPPMENUCONTAINER_H 00112 00113 // End of File
|
© Nokia 2009 |