ExpensesListBox.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. ========================================================================
  3. Name : ExpensesListBox.h
  4. Author : Vishal Dharankar
  5. Copyright : Created by Vishal Dharankar
  6. Description :
  7. ========================================================================
  8. */
  9. #ifndef EXPENSESLISTBOX_H
  10. #define EXPENSESLISTBOX_H
  11. // [[[ begin generated region: do not modify [Generated Includes]
  12. #include <coecntrl.h>
  13. // ]]] end generated region [Generated Includes]
  14. // [[[ begin [Event Handler Includes]
  15. // ]]] end [Event Handler Includes]
  16. // [[[ begin generated region: do not modify [Generated Forward Declarations]
  17. class MEikCommandObserver;
  18. class CAknSingleHeadingStyleListBox;
  19. class CEikTextListBox;
  20. // ]]] end generated region [Generated Forward Declarations]
  21. /**
  22. * Container class for ExpensesListBox
  23. *
  24. * @class CExpensesListBox ExpensesListBox.h
  25. */
  26. class CExpensesListBox : public CCoeControl
  27. {
  28. public:
  29. // constructors and destructor
  30. CExpensesListBox();
  31. static CExpensesListBox* NewL(
  32. const TRect& aRect,
  33. const CCoeControl* aParent,
  34. MEikCommandObserver* aCommandObserver );
  35. static CExpensesListBox* NewLC(
  36. const TRect& aRect,
  37. const CCoeControl* aParent,
  38. MEikCommandObserver* aCommandObserver );
  39. void ConstructL(
  40. const TRect& aRect,
  41. const CCoeControl* aParent,
  42. MEikCommandObserver* aCommandObserver );
  43. virtual ~CExpensesListBox();
  44. public:
  45. // from base class CCoeControl
  46. TInt CountComponentControls() const;
  47. CCoeControl* ComponentControl( TInt aIndex ) const;
  48. TKeyResponse OfferKeyEventL(
  49. const TKeyEvent& aKeyEvent,
  50. TEventCode aType );
  51. void HandleResourceChange( TInt aType );
  52. protected:
  53. // from base class CCoeControl
  54. void SizeChanged();
  55. private:
  56. // from base class CCoeControl
  57. void Draw( const TRect& aRect ) const;
  58. private:
  59. void InitializeControlsL();
  60. void LayoutControls();
  61. CCoeControl* iFocusControl;
  62. MEikCommandObserver* iCommandObserver;
  63. // [[[ begin generated region: do not modify [Generated Methods]
  64. public:
  65. static void AddListBoxItemL(
  66. CEikTextListBox* aListBox,
  67. const TDesC& aString );
  68. static RArray< TInt >* GetSelectedListBoxItemsLC( CEikTextListBox* aListBox );
  69. static void DeleteSelectedListBoxItemsL( CEikTextListBox* aListBox );
  70. CAknSingleHeadingStyleListBox* ListBox();
  71. static void CreateListBoxItemL( TDes& aBuffer,
  72. const TDesC& aHeadingText,
  73. const TDesC& aMainText );
  74. void AddListBoxResourceArrayItemL( TInt aResourceId );
  75. void SetupListBoxIconsL();
  76. TBool HandleMarkableListCommandL( TInt aCommand );
  77. // ]]] end generated region [Generated Methods]
  78. // [[[ begin generated region: do not modify [Generated Type Declarations]
  79. public:
  80. // ]]] end generated region [Generated Type Declarations]
  81. // [[[ begin generated region: do not modify [Generated Instance Variables]
  82. private:
  83. CAknSingleHeadingStyleListBox* iListBox;
  84. // ]]] end generated region [Generated Instance Variables]
  85. // [[[ begin [Overridden Methods]
  86. protected:
  87. // ]]] end [Overridden Methods]
  88. // [[[ begin [User Handlers]
  89. protected:
  90. // ]]] end [User Handlers]
  91. public:
  92. enum TControls
  93. {
  94. // [[[ begin generated region: do not modify [Generated Contents]
  95. EListBox,
  96. // ]]] end generated region [Generated Contents]
  97. // add any user-defined entries here...
  98. ELastControl
  99. };
  100. enum TListBoxImages
  101. {
  102. // [[[ begin generated region: do not modify [Generated Enums]
  103. EListBoxFirstUserImageIndex
  104. // ]]] end generated region [Generated Enums]
  105. };
  106. };
  107. #endif // EXPENSESLISTBOX_H