Source code of Windows XP (NT5)
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.

175 lines
4.6 KiB

  1. /*******************************************************************************
  2. *
  3. * ltpane.h
  4. *
  5. * - declarations for the CLeftPane class
  6. * - the LeftPane class is a public CView derivative that maintains
  7. * two tree views, swapping them
  8. * in and out of it's space as necessary (actually the views are
  9. * disabled/hidden and enabled/shown, but you get the idea...)
  10. *
  11. * copyright notice: Copyright 1997, Citrix Systems Inc.
  12. * Copyright (c) 1998 - 1999 Microsoft Corporation
  13. *
  14. * $Author: donm $ Don Messerli
  15. *
  16. * $Log: N:\nt\private\utils\citrix\winutils\tsadmin\VCS\ltpane.h $
  17. *
  18. * Rev 1.3 16 Feb 1998 16:01:20 donm
  19. * modifications to support pICAsso extension
  20. *
  21. * Rev 1.2 19 Jan 1998 16:47:50 donm
  22. * new ui behavior for domains and servers
  23. *
  24. * Rev 1.1 03 Nov 1997 15:24:44 donm
  25. * added Domains
  26. *
  27. * Rev 1.0 13 Oct 1997 22:33:20 donm
  28. * Initial revision.
  29. *******************************************************************************/
  30. #ifndef _LEFTPANE_H
  31. #define _LEFTPANE_H
  32. #include "treeview.h" // CAdminTreeView
  33. #include "apptree.h" // CAppTreeView
  34. class CLeftPane;
  35. class CTreeTabCtrl : public CTabCtrl
  36. {
  37. friend class CLeftPane;
  38. protected:
  39. CTreeTabCtrl(); // protected constructor used by dynamic creation
  40. void Initialize();
  41. // Attributes
  42. protected:
  43. // Operations
  44. public:
  45. protected:
  46. // Overrides
  47. // ClassWizard generated virtual function overrides
  48. //{{AFX_VIRTUAL(CTreeTabCtrl)
  49. public:
  50. protected:
  51. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. protected:
  55. virtual ~CTreeTabCtrl();
  56. #ifdef _DEBUG
  57. virtual void AssertValid() const;
  58. virtual void Dump(CDumpContext& dc) const;
  59. #endif
  60. // Generated message map functions
  61. protected:
  62. //{{AFX_MSG(CTreeTabCtrl)
  63. afx_msg void OnSize(UINT nType, int cx, int cy);
  64. // afx_msg void OnSelchange(NMHDR* pNMHDR, LRESULT* pResult);
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. };
  68. //////////////////////
  69. // CLASS: CLeftPane
  70. //
  71. class CLeftPane : public CView
  72. {
  73. friend class CTreeTabCtrl;
  74. friend class CAdminTreeView;
  75. friend class CAppTreeView;
  76. private:
  77. CTreeTabCtrl* m_pTabs;
  78. CFont* m_pTabFont;
  79. protected:
  80. CLeftPane(); // protected constructor used by dynamic creation
  81. DECLARE_DYNCREATE(CLeftPane)
  82. // Attributes
  83. protected:
  84. CImageList m_ImageList; // image list associated with the tree control
  85. int m_idxServer; // index of Servers icon image
  86. int m_idxApps; // index of Apps icon image
  87. CAdminTreeView* m_pServerTreeView;
  88. CAppTreeView* m_pAppTreeView;
  89. TREEVIEW m_CurrTreeViewType; // keeps track of currently 'active' view in the left pane
  90. CView *m_CurrTreeView;
  91. // Operations
  92. public:
  93. TREEVIEW GetCurrentTreeViewType() { return m_CurrTreeViewType; }
  94. CView *GetCurrentTreeView() { return m_CurrTreeView; }
  95. protected:
  96. private:
  97. // Builds the image list
  98. void BuildImageList();
  99. // Adds an icon's image to the image list and returns the image's index
  100. int AddIconToImageList(int);
  101. // Overrides
  102. // ClassWizard generated virtual function overrides
  103. //{{AFX_VIRTUAL(CLeftPane)
  104. public:
  105. virtual void OnInitialUpdate();
  106. protected:
  107. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  108. //}}AFX_VIRTUAL
  109. // Implementation
  110. protected:
  111. virtual ~CLeftPane();
  112. #ifdef _DEBUG
  113. virtual void AssertValid() const;
  114. virtual void Dump(CDumpContext& dc) const;
  115. #endif
  116. // Generated message map functions
  117. protected:
  118. //{{AFX_MSG(CLeftPane)
  119. afx_msg LRESULT OnExpandAll(WPARAM, LPARAM);
  120. afx_msg LRESULT OnCollapseAll(WPARAM, LPARAM);
  121. afx_msg LRESULT OnCollapseToServers(WPARAM, LPARAM);
  122. afx_msg LRESULT OnCollapseToDomains(WPARAM, LPARAM);
  123. afx_msg LRESULT OnCollapseToApplications(WPARAM, LPARAM);
  124. afx_msg LRESULT OnAdminAddServer(WPARAM, LPARAM);
  125. afx_msg LRESULT OnAdminRemoveServer(WPARAM, LPARAM);
  126. afx_msg LRESULT OnAdminUpdateServer(WPARAM, LPARAM);
  127. afx_msg LRESULT OnAdminAddWinStation(WPARAM, LPARAM);
  128. afx_msg LRESULT OnAdminUpdateWinStation(WPARAM, LPARAM);
  129. afx_msg LRESULT OnAdminRemoveWinStation(WPARAM, LPARAM);
  130. afx_msg LRESULT OnAdminUpdateDomain(WPARAM, LPARAM);
  131. afx_msg LRESULT OnAdminAddDomain(WPARAM, LPARAM);
  132. afx_msg LRESULT OnExtAddApplication(WPARAM, LPARAM);
  133. afx_msg LRESULT OnExtRemoveApplication(WPARAM, LPARAM);
  134. afx_msg LRESULT OnExtAppChanged(WPARAM, LPARAM);
  135. afx_msg LRESULT OnExtAddAppServer(WPARAM, LPARAM);
  136. afx_msg LRESULT OnExtRemoveAppServer(WPARAM, LPARAM);
  137. afx_msg LRESULT OnAdminViewsReady(WPARAM, LPARAM lParam);
  138. afx_msg void OnTabSelChange(NMHDR* pNMHDR, LRESULT* pResult);
  139. afx_msg void OnSize(UINT nType, int cx, int cy);
  140. afx_msg void OnRClick(NMHDR* pNMHDR, LRESULT* pResult);
  141. //}}AFX_MSG
  142. DECLARE_MESSAGE_MAP()
  143. }; // end class CLeftPane
  144. #endif // _LEFTPANE_H