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.

111 lines
15 KiB

  1. {\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
  2. {\f14\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f28\froman\fcharset238\fprq2 Times New Roman CE;}{\f29\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f31\froman\fcharset161\fprq2 Times New Roman Greek;}
  3. {\f32\froman\fcharset162\fprq2 Times New Roman Tur;}{\f33\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f34\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f35\froman\fcharset186\fprq2 Times New Roman Baltic;}
  4. {\f36\fswiss\fcharset238\fprq2 Arial CE;}{\f37\fswiss\fcharset204\fprq2 Arial Cyr;}{\f39\fswiss\fcharset161\fprq2 Arial Greek;}{\f40\fswiss\fcharset162\fprq2 Arial Tur;}{\f41\fswiss\fcharset177\fprq2 Arial (Hebrew);}
  5. {\f42\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f43\fswiss\fcharset186\fprq2 Arial Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
  6. \red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
  7. \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
  8. \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
  9. \b\i\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
  10. \sbasedon0 \snext0 heading 3;}{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive \ul\cf2 \sbasedon10 Hyperlink;}{\*\cs16 \additive \ul\cf12 \sbasedon10 FollowedHyperlink;}}{\info{\title The New Control Panel }{\author Arish Ali (RIS)}
  11. {\operator Arish Ali (RIS)}{\creatim\yr2000\mo11\dy1\hr11\min12}{\revtim\yr2000\mo11\dy1\hr16\min52}{\version5}{\edmins340}{\nofpages3}{\nofwords1066}{\nofchars6079}{\*\company Microsoft}{\nofcharsws7465}{\vern8269}}
  12. \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
  13. \jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1
  14. \pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
  15. \pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang
  16. {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0
  17. \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {The New Control Panel
  18. \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
  19. \par This document gives a brief description of how the new Control Panel is implemented.
  20. \par
  21. \par Note: I\rquote ll use the terms simple view and category view interchangeably to denote the new simplified inductive UI version of the control panel. I\rquote ll use classic view or icon view to denote the traditional defview based control panel.
  22. \par
  23. \par }\pard\plain \s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {The relevant files
  24. \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {Here\rquote s a brief description of all the relevant files, located under the shell\\ext\\webvw\\
  25. dir. (The dhtml files and template are in the rc subdirectory.)
  26. \par
  27. \par }{\b cpframe.htt}{ : This file is used to generate the templates cpsimple.htt and cpicon.htt using a perl script in the build process (see webvw\\dll\\makefile.inc).
  28. \par \tab cpsimple.htt \tab : template for simple view
  29. \par \tab cpicon.htt\tab : template for icon view
  30. \par \tab Both of these files only contain an <iframe> tag. cpsimple.htt loads up cpmain_s.htt by default while cpicon.htt loads cpmain_i.htt by default in that iframe.
  31. \par
  32. \par When you navigate to the control panel, CControlPanelViewCallback::OnGetViewInfo() is called to determine which template is used. We hand out the right template based on the policy restrictions in effe
  33. ct. This saves us from doing the policy check in the script code in the template itself (BIG PERF WIN).
  34. \par
  35. \par We need this outer template file (cpsimple.htt or cpicon.htt), which only contains an iframe tag, so that we can simulate the navigation to the categor
  36. y pages while remaining within the control panel namespace. So while you are navigating to the category pages in the control panel, as far as the Shell is concerned you are still in the Control Panel folder. This saves us from modifying the control panel
  37. namespace, so we can maintain the classic view as it is (for advanced users and legacy reasons), and at the same time provide a two level hierarchy in the simple view.
  38. \par
  39. \par }{\b cpmain_i.htt}{ : This is the template which shows you the icon view (hence the }{\b _i}{ ). It
  40. contains a FileList object like all other folder webview templates. Navigation to icon view is pretty fast as the only script code we need to run is to verify if we are in RTL (mirrored) mode, and adjust accordingly. We also test explorer policy to see if
  41. we need to disable the link to \'93switch to the simple view\'94.
  42. \par
  43. \par }{\b cpmain_s.htt}{ : This is the new simple view (hence the }{\b _s}{ ). The UI is hardcoded html in the page itself. The only script code we run on navigation is the same as that mentioned above. We do not h
  44. ave the FileList object on this page, as we do not need one. When we switch to classic view, we simply navigate to cpmain_i.htt within the parent iframe mentioned earlier. What that means is that switching views is now a navigation, if you do a back, you
  45. \rquote l
  46. l come back to the simple view. Incidentally, this behavior was not only better for perf, but Joelgross wanted it this way too ( I was against treating the switching between the views as a navigation, but was happy to oblige when it helped me improve the
  47. perf).
  48. \par
  49. \par }{\b cpmain.js}{ : Contains script code common to cpmain_s.htt and cpmain_i.htt.
  50. \par
  51. \par }{\b cpcatgry.htt}{ : This template file is used to generate all the category pages, such as cppgat.htt (at = Appearance and Themes), cppgpoh.htt (poh = Printers and Other Hardware), etc. (see webvw\\dll\\
  52. makefile.inc for details). This template contains three CCPTask objects. One each for the Tasks, See Also and Troubleshoot lists on the page. We also generate a table of all the control panel applets which belong to this category page.
  53. \par
  54. \par }{\b cpcommon.js}{ : Script code common to cpmain_s.htt and cpcatgry.htt. Basically this code determines which applets are there in a category.
  55. \par
  56. \par }{\b cpcatgry.js}{ : Script code specific to the category pages.
  57. \par
  58. \par }{\b cpwebvw.css}{ : The style sheet for all the control pan
  59. el pages. This is the common stylesheet that is used by control panel, user accounts and webview. We still need to be able to obtain the right template from the ThemeManager object, but some work needs to be done to package the files correctly with .theme
  60. /.mstheme files. Please see my notes in }{\field{\*\fldinst { HYPERLINK "http://liveraid/?id=103675" }{{\*\datafield
  61. 00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300033003600370035000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
  62. 6100690064002f003f00690064003d003100300033003600370035000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=103675}}}{
  63. \par
  64. \par }{\b cptask.cpp}{ : This implements an activex object which is placed on all the category pages. Each instance of this object displays a list of links,
  65. after checking policies, OS version etc to see if the link should be displayed. The list displayed by each object instance is based on the category and also the class (Task, See Also or Troubleshooter).
  66. \par
  67. \par
  68. \par
  69. \par }\pard\plain \s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {How does it work
  70. \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {When you navigate to the control
  71. panel, either cpSimple.htt or cpIcon.htt are loaded as the template for the folder. As explained earlier these files are identical except for which template they load up as the default file in the <iframe>. This way we do not have to do a script based che
  72. ck and switch of the view based on policy etc. All subsequent navigations to the category pages or switching of views are simply loading up a new file in that <iframe> so we let Trident\rquote s travellog maintain the correct navigation stack for us.
  73. \par
  74. \par If you go to a category page and navigate to some place outside control panel and then do a back, you land up in the correct category page. This was enabled by adding the support to save trident\rquote
  75. s persist history also when persisting history in defview (see CDefViewPersistHistory::SaveHistory() in shell32\\defvphst.cpp).
  76. \par
  77. \par
  78. \par }\pard\plain \s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {So what needs fixin\rquote in there ?
  79. \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b
  80. \par }{Nothing. Wish it were so. The two main bugs that I wished I had resolved before I left are }{\field{\*\fldinst { HYPERLINK "http://liveraid/?id=103675" }{{\*\datafield
  81. 00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300033003600370035000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
  82. 6100690064002f003f00690064003d003100300033003600370035000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=103675}}}{ and }{\field{\*\fldinst { HYPERLINK "http://liveraid/?id=108621" }{{\*\datafield
  83. 00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300038003600320031000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
  84. 6100690064002f003f00690064003d003100300038003600320031000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=108621}}}{
  85. , namely enabling the theming support and fixing the up button navigation from category pages. The theming support got delayed because there was no clear story on how the themed styled sheets should be packaged, there still seems to be some confusion.
  86. \par
  87. \par I have added comments in both the bugs regarding what needs to be done. It\rquote s just that I have run out of the time to do it }{{\field{\*\fldinst SYMBOL 76 \\f "Wingdings" \\s 12}{\fldrslt\f14\fs24}}}{
  88. \par
  89. \par
  90. \par }\pard\plain \s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {How would you go about if you had the time to rewrite the whole thing?
  91. \par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
  92. \par I would probably do something like the webview rewrite rajeshg has done, remove all code from htt files, just use activex objects to spew out all the html. However, I must point out that there is not too much to be gained there. For one, the navigation
  93. perf to the control panel cannot be improved significantly by this method, as the main control panel templates (cpmain_s.htt and cpmain_i.htt) just use raw html with very little script code. Aslo, we would still need to use an outer template file wi
  94. th an <iframe> tag to get the correct navigation behavior, and we will need the same number of indivdual category pages files and outer pages files so that each navigation can be recorded uniquely in the travellog.
  95. \par
  96. \par Once we enable themed style sheets, we will have extra script code to link to the right css file. This may cause a slight additional delay, but I still think that the perf disadvantage will be too slight to merit a rewrite.
  97. \par
  98. \par If you just want to improve navigation perf, you might get better results by looking though the code in ctrlfldr.cpp and control1.cpp and figuring out why do we load so many dlls when navigating to the control panel? Some
  99. of that stuff maybe redundant now.
  100. \par }\pard \ql \li0\ri0\widctlpar\brdrb\brdrs\brdrw15\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
  101. \par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
  102. \par That\rquote s all I can think of right now. If you come up with any issues you need explained, feel free to contact me at }{\field{\*\fldinst { HYPERLINK "mailto:[email protected]" }{{\*\datafield
  103. 00d0c9ea79f9bace118c8200aa004ba90b0200000017000000150000006d00610069006c0074006f003a00610072006900730068004000610063006d002e006f00720067000000e0c9ea79f9bace118c8200aa004ba90b2a0000006d00610069006c0074006f003a00610072006900730068004000610063006d002e006f00
  104. 720067000000}}}{\fldrslt {\cs15\ul\cf2 mailto:[email protected]}}}{ I really want to see this thing ship in good shape and will be willing to help out as much as necessary. GOOD LUCK!
  105. \par
  106. \par - Arish Ali \tab
  107. \par
  108. \par 1}{\super st}{ Nov 2000
  109. \par }}