Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.5 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // ViewsUI.h
  4. //
  5. ///////////////////////////////////////////////////////////////////////////////
  6. // Bring in only once
  7. #pragma once
  8. #include "oerules.h"
  9. #include "ruledesc.h"
  10. // Views Manager UI Class
  11. class COEViewsMgrUI
  12. {
  13. private:
  14. enum
  15. {
  16. STATE_UNINIT = 0x00000000,
  17. STATE_INITIALIZED = 0x00000001,
  18. STATE_DIRTY = 0x00000002
  19. };
  20. private:
  21. HWND m_hwndOwner;
  22. DWORD m_dwFlags;
  23. DWORD m_dwState;
  24. HWND m_hwndDlg;
  25. HWND m_hwndList;
  26. HWND m_hwndDescript;
  27. CRuleDescriptUI * m_pDescriptUI;
  28. RULEID * m_pridRule;
  29. IOERule * m_pIRuleDownloaded;
  30. BOOL m_fApplyAll;
  31. public:
  32. // Constructor/destructor
  33. COEViewsMgrUI();
  34. ~COEViewsMgrUI();
  35. // Main UI methods
  36. HRESULT HrInit(HWND hwndOwner, DWORD dwFlags, RULEID * pridRule);
  37. HRESULT HrShow(BOOL * pfApplyAll);
  38. // Dialog methods
  39. static INT_PTR CALLBACK FOEViewMgrDlgProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
  40. // Message handling methods
  41. BOOL FOnInitDialog(HWND hwndDlg);
  42. BOOL FOnCommand(UINT uiNotify, INT iCtl, HWND hwndCtl);
  43. BOOL FOnNotify(INT iCtl, NMHDR * pnmhdr);
  44. BOOL FOnDestroy(VOID);
  45. private:
  46. BOOL _FInitListCtrl(VOID);
  47. BOOL _FLoadListCtrl(VOID);
  48. BOOL _FAddViewToList(DWORD dwIndex, RULEID ridRule, IOERule * pIRule, BOOL fSelect);
  49. VOID _EnableButtons(INT iSelected);
  50. VOID _EnableView(INT iSelected);
  51. // For dealing with the description field
  52. VOID _LoadView(INT iSelected);
  53. BOOL _FSaveView(INT iSelected);
  54. // Functions to deal with the basic actions
  55. VOID _NewView(VOID);
  56. VOID _EditView(INT iSelected);
  57. VOID _RemoveView(INT iSelected);
  58. VOID _CopyView(INT iSelected);
  59. VOID _DefaultView(INT iSelected);
  60. BOOL _FOnOK(VOID);
  61. BOOL _FOnCancel(VOID);
  62. BOOL _FGetDefaultItem(IOERule ** ppIRuleDefault, RULEID * pridDefault);
  63. BOOL _FOnLabelEdit(BOOL fBegin, NMLVDISPINFO * pdi);
  64. };
  65. BOOL FIsFilterReadOnly(RULEID ridFilter);