chxavselectsettingsviewwindow.h
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:2k
源码类别:

Symbian

开发平台:

Visual C++

  1. /************************************************************************
  2.  * chxavselectsettingsviewwindow.h
  3.  * -------------------------------
  4.  *
  5.  * Synopsis:
  6.  * Window for the CHXAvSelectSettingsView view.
  7.  *
  8.  *
  9.  * Target:
  10.  * Symbian OS
  11.  *
  12.  *
  13.  * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
  14.  *
  15.  ************************************************************************/
  16. #ifndef _chxavselectsettingsviewwindow_h_
  17. #define _chxavselectsettingsviewwindow_h_
  18. // Symbian includes...
  19. #include <eiklbo.h> // MEikListBoxObserver
  20. #include <aknlists.h>
  21. // Includes fromt this project...
  22. #include "chxbody.h"
  23. #include "chxsmartptr.h"
  24. #include "chxmakesmartptr.h"
  25. #include "chxavrefptr.h"
  26. // forward decl
  27. class CHXAvSelectSettingsView;
  28. // class avSelectSettingsViewWindow
  29. class CHXAvSelectSettingsViewWindow
  30. : public CCoeControl
  31. , public MEikListBoxObserver
  32. , public CHXBody
  33. {
  34. public:
  35. // ctor and dtor
  36.     CHXAvSelectSettingsViewWindow(CHXAvSelectSettingsView* pView);
  37.     virtual ~CHXAvSelectSettingsViewWindow();
  38.     void ConstructL(const TRect& rc, TInt idxInit = 0);
  39.     void UpdateTopAndBottomL();
  40. private:
  41. // disallow assignment and copy
  42.     CHXAvSelectSettingsViewWindow(const CHXAvSelectSettingsViewWindow& rhs);
  43.     CHXAvSelectSettingsViewWindow& operator=(const CHXAvSelectSettingsViewWindow& rhs);
  44. public:
  45. // methods
  46. // CCoeControl
  47.     CCoeControl* ComponentControl( TInt aIndex ) const;
  48.     TInt CountComponentControls() const;
  49.     void SizeChanged();
  50.     void GetHelpContext(TCoeHelpContext& aContext) const;
  51.     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
  52. // MEikListBoxObserver
  53.     void HandleListBoxEventL(CEikListBox* /*aListBox*/,TListBoxEvent aEventType);
  54.     TInt GetCurrentSelectionIndex() const;
  55. private:
  56. // implementation
  57.     
  58.     void ShowMainSelectionListBoxL(TInt idxInit);
  59.     void SetMainSelectionListBoxIconsL();
  60.     CDesCArrayFlat* AllocListItemsL() const;
  61.     void AddItemHelperL(CDesCArrayFlat* pItems, TInt idxIcon, TInt resId) const;
  62. private:
  63. // data
  64.     refptr<CAknSingleLargeStyleListBox> m_spCategoryListBox;
  65.     CHXAvSelectSettingsView* m_wpView;
  66. };
  67. typedef CHXSmartPtr<CHXAvSelectSettingsViewWindow> CHXAvSelectSettingsViewWindowPtr;
  68. #endif // _chxavselectsettingsviewwindow_h_