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.

181 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1989-2000 Microsoft Corporation
  3. Module Name:
  4. DBTree.h
  5. Abstract:
  6. Header file for DBTree.cpp which handles the code for handling the trees used
  7. in the application
  8. Author:
  9. kinshu created October 15, 2001
  10. --*/
  11. #include "precomp.h"
  12. /////////////////////// Extern Variables //////////////////////////////////////
  13. extern struct DataBase GlobalDataBase;
  14. extern HIMAGELIST g_hImageList;
  15. extern PDBENTRY g_pEntrySelApp;
  16. extern PDATABASE g_pPresentDataBase;
  17. extern HWND g_hwndEntryTree;
  18. extern UINT g_uNextDataBaseIndex;
  19. extern PDBENTRY g_pSelEntry;
  20. extern HINSTANCE g_hInstance;
  21. extern HWND g_hwndToolBar;
  22. extern HWND g_hwndStatus;
  23. ///////////////////////////////////////////////////////////////////////////////
  24. /*++
  25. The db tree that appears in the LHS
  26. --*/
  27. class DatabaseTree : public CTree {
  28. public:
  29. HWND m_hLibraryTree; // The handle to the db tree
  30. INT m_width; // Width of this tree view
  31. HTREEITEM m_hItemGlobal; // Handle to the "System Database" node
  32. HTREEITEM m_hItemAllInstalled; // Handle to the "Installed Databases" node
  33. HTREEITEM m_hItemAllWorking; // Handle to the "Custom Databases" node
  34. HTREEITEM m_hPerUserHead; // Handle to the "Per User Compatibility Settings" node
  35. void
  36. Init(
  37. HWND hdlg,
  38. INT iHeightToolbar,
  39. INT iHeightStatusbar,
  40. RECT* prcMainClient
  41. );
  42. BOOL
  43. PopulateLibraryTreeGlobal(
  44. void
  45. );
  46. BOOL
  47. AddWorking(
  48. PDATABASE pDataBase
  49. );
  50. BOOL
  51. RemoveDataBase(
  52. HTREEITEM hItemDB,
  53. TYPE typeDB,
  54. BOOL bSelectSibling = TRUE
  55. );
  56. void
  57. RemoveAllWorking(
  58. void
  59. );
  60. BOOL
  61. SetLParam(
  62. HTREEITEM hItem,
  63. LPARAM lParam
  64. );
  65. BOOL
  66. GetLParam(
  67. HTREEITEM hItem,
  68. LPARAM *plParam
  69. );
  70. HTREEITEM
  71. DatabaseTree::
  72. FindChild(
  73. HTREEITEM hItemParent,
  74. LPARAM lParam
  75. );
  76. HTREEITEM
  77. GetAllAppsItem (
  78. HTREEITEM hItemDataBase
  79. );
  80. HTREEITEM
  81. GetFirstAppItem(
  82. HTREEITEM hItemDataBase
  83. );
  84. void
  85. AddNewLayer(
  86. PDATABASE pDataBase,
  87. PLAYER_FIX pLayer,
  88. BOOL bShow = FALSE
  89. );
  90. void
  91. RefreshAllLayers(
  92. PDATABASE pDataBase
  93. );
  94. HTREEITEM
  95. RefreshLayer(
  96. PDATABASE pDataBase,
  97. PLAYER_FIX pLayer
  98. );
  99. BOOL
  100. AddNewExe(
  101. PDATABASE pDataBase,
  102. PDBENTRY pEntry,
  103. PDBENTRY pApp,
  104. BOOL bRepaint = TRUE
  105. );
  106. BOOL
  107. AddInstalled(
  108. PDATABASE pDataBase
  109. );
  110. void
  111. DeleteAppLayer(
  112. PDATABASE pDataBase,
  113. BOOL bApp,
  114. HTREEITEM hItemDelete,
  115. BOOL bRepaint = TRUE
  116. );
  117. void
  118. InsertLayerinTree(
  119. HTREEITEM hItemLayers,
  120. PLAYER_FIX plf,
  121. HWND hwndTree = NULL,
  122. BOOL bRepaint = FALSE
  123. );
  124. BOOL
  125. PopulateLibraryTree(
  126. HTREEITEM hRoot,
  127. PDATABASE pDataBase,
  128. BOOL bLoadOnlyLibrary = FALSE,
  129. BOOL bLoadOnlyApps = FALSE
  130. );
  131. void
  132. AddApp(
  133. PDATABASE pDatabase,
  134. PDBENTRY pApp,
  135. BOOL bUpdate = TRUE
  136. );
  137. HTREEITEM
  138. GetSelection(
  139. void
  140. );
  141. };