00001 /* 00002 * ============================================================================ 00003 * Name : Eikslb.h 00004 * Part of : Avkon 00005 * Description : implementation of setting list box 00006 * Version : %version: e003sa01#12 % 00007 * 00008 * Copyright © 2002-2006 Nokia Corporation. 00009 * This material, including documentation and any related 00010 * computer programs, is protected by copyright controlled by 00011 * Nokia Corporation. All rights are reserved. Copying, 00012 * including reproducing, storing, adapting or translating, any 00013 * or all of this material requires the prior written consent of 00014 * Nokia Corporation. This material also contains confidential 00015 * information which may not be disclosed to others without the 00016 * prior written consent of Nokia Corporation. 00017 * ============================================================================ 00018 */ 00019 00020 // EIKSLB.H 00021 // 00022 // Copyright (c) 1997-2001 Symbian Ltd. All rights reserved. 00023 // 00024 #if !defined(__EIKSLB_H__) 00025 #define __EIKSLB_H__ 00026 00027 #include <eikfrlb.h> 00028 00029 class MTextListBoxModel; 00030 class CFont; 00031 class CSettingsListBoxData; 00032 class CSettingsListBoxView; 00033 00040 class CSettingsListBoxItemDrawer : public CFormattedCellListBoxItemDrawer 00041 { 00042 public: 00049 IMPORT_C CSettingsListBoxItemDrawer( MTextListBoxModel* aTextListBoxModel, 00050 const CFont* aFont, 00051 CSettingsListBoxData* aSettingsData ); 00052 00056 IMPORT_C ~CSettingsListBoxItemDrawer(); 00057 00061 IMPORT_C CSettingsListBoxData* SettingsData() const; 00062 public: 00071 IMPORT_C void DrawItemText( TInt aItemIndex, 00072 const TRect& aItemTextRect, 00073 TBool aItemIsCurrent, 00074 TBool aViewIsEmphasized, 00075 TBool aItemIsSelected ) const; 00076 private: 00077 IMPORT_C void CFormattedCellListBoxItemDrawer_Reserved(); 00078 00079 }; 00080 00081 00082 00091 class CEikSettingsListBox : public CEikFormattedCellListBox 00092 { 00093 public: 00094 00098 IMPORT_C CEikSettingsListBox(); 00099 00100 public: 00101 00108 IMPORT_C CSettingsListBoxItemDrawer* ItemDrawer() const; 00109 00110 protected: 00111 00115 IMPORT_C void CreateItemDrawerL(); 00116 00117 public: // from CEikListBox 00118 00130 IMPORT_C CListBoxView* MakeViewClassInstanceL(); 00131 00132 public: // from CCoeControl 00133 00141 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00142 00143 protected: 00144 00150 CSettingsListBoxView* View() { return (CSettingsListBoxView*)iView; } 00151 00152 private: 00153 00157 IMPORT_C void* ExtensionInterface( TUid aInterface ); 00158 00159 private: // listbox use only 00160 IMPORT_C virtual void CEikListBox_Reserved(); 00161 00162 }; 00163 00170 class CSettingsListBoxView : public CFormattedCellListBoxView 00171 { 00172 public: // from CListBoxView 00176 CSettingsListBoxView() {} 00177 00182 IMPORT_C void Draw(const TRect* aClipRect = NULL) const; 00183 00188 IMPORT_C void DrawItem(TInt aItemIndex) const; 00189 00193 inline CSettingsListBoxItemDrawer *ItemDrawer() const; 00194 private: // overridden from CListBoxView 00195 IMPORT_C virtual TAny* Reserved_1(); 00196 }; 00197 00198 00199 inline CSettingsListBoxItemDrawer* CSettingsListBoxView::ItemDrawer() const 00200 { return (CSettingsListBoxItemDrawer*)iItemDrawer; } 00201 00202 00203 // __EIKSLB_H__ 00204 #endif 00205 00206 00207