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.

113 lines
3.2 KiB

  1. This file contains random notes on the implementation of a shell name space
  2. extension.
  3. The shareui name space extension mostly independent of the shell, and only uses
  4. a few shell interfaces that are internal, particularly the standard shell
  5. folder view, using SHCreateShellFolderViewEx.
  6. Menus
  7. =================================================
  8. Menus appear in several places:
  9. 1. Context-menus on a selection
  10. 2. Context-menu on the background
  11. 3. The menu bar, with a selection
  12. 4. The menu bar, with nothing selected
  13. =======
  14. For (1), the menu is:
  15. Delete
  16. ------
  17. Properties
  18. and the default is Properties. Properties is grayed if there is more than one
  19. item selected.
  20. =======
  21. For (2), the menu is the standard shell folder view menu, plus a "New" item:
  22. View
  23. Large Icons
  24. Small Icons
  25. List
  26. Details
  27. -------
  28. Arrange Icons
  29. by Name
  30. by Comment
  31. by Max Uses -- only for administrators
  32. by Current Uses -- only for administrators
  33. by Path -- only for administrators
  34. -------
  35. Auto Arrange
  36. Line up Icons
  37. -------
  38. Paste -- always grayed
  39. Paste Shortcut -- always grayed
  40. -------
  41. New
  42. Share
  43. =======
  44. For (3), the File menu should be:
  45. New
  46. Share
  47. -------
  48. Create Shortcut -- always grayed
  49. Delete
  50. Rename -- always grayed
  51. Properties
  52. -------
  53. Close
  54. and the View->Arrange Icons menu should be:
  55. by Name
  56. by Comment
  57. by Max Uses -- only for administrators
  58. by Current Uses -- only for administrators
  59. by Path -- only for administrators
  60. -------
  61. Auto Arrange
  62. As with (1), Properties will be the default, and will be grayed if the
  63. selection includes more than one item.
  64. =======
  65. For (4), the File menu should be:
  66. New
  67. Share
  68. -------
  69. Create Shortcut -- always grayed
  70. Delete -- grayed
  71. Rename -- always grayed
  72. Properties -- grayed
  73. -------
  74. Close
  75. and the View->Arrange Icons menu should be the same as in (3).
  76. =======
  77. The implementation for these various menus occurs in several different places
  78. and should be synchronized to make sure the menus all do the same thing.
  79. Case (1) is implemented by the shell calling IShellFolder::GetUIObjectOf asking
  80. for IContextMenu.
  81. Case (2) is implemented by the shell calling IShellFolder::CreateViewObject
  82. asking for IContextMenu.
  83. Case (3) is implemented by the shell calling IShellFolder::GetUIObjectOf asking
  84. for IContextMenu. The context-menu is created. Also, the ...?
  85. Case (4) is implemented as follows. When a shell folder view created using
  86. SHCreateShellFolderViewEx is created, it calls back the passed-in callback
  87. function with the message DVM_MERGEMENU. At this point, the background menus
  88. are created.
  89. The IContextMenu interfaces are also invoked for other uses, namely performing operations from the toolbar. The toolbar calls IShellFolder::GetUIObjectOf
  90. asking for IContextMenu when it needs to call properties or delete an item.
  91. It calls IContextMenu::InvokeCommand with string commands "delete" or
  92. "properties" in these cases.