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.
 
 
 
 
 
 

112 lines
15 KiB

{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\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;}
{\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;}
{\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);}
{\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;
\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{
\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
\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
\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
\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)}
{\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}}
\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1
\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5
\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
{\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
\b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 {The New Control Panel
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\par This document gives a brief description of how the new Control Panel is implemented.
\par
\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.
\par
\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
\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\\
dir. (The dhtml files and template are in the rc subdirectory.)
\par
\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).
\par \tab cpsimple.htt \tab : template for simple view
\par \tab cpicon.htt\tab : template for icon view
\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.
\par
\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
ct. This saves us from doing the policy check in the script code in the template itself (BIG PERF WIN).
\par
\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
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
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.
\par
\par }{\b cpmain_i.htt}{ : This is the template which shows you the icon view (hence the }{\b _i}{ ). It
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
we need to disable the link to \'93switch to the simple view\'94.
\par
\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
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
\rquote l
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
perf).
\par
\par }{\b cpmain.js}{ : Contains script code common to cpmain_s.htt and cpmain_i.htt.
\par
\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\\
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.
\par
\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.
\par
\par }{\b cpcatgry.js}{ : Script code specific to the category pages.
\par
\par }{\b cpwebvw.css}{ : The style sheet for all the control pan
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
/.mstheme files. Please see my notes in }{\field{\*\fldinst { HYPERLINK "http://liveraid/?id=103675" }{{\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300033003600370035000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
6100690064002f003f00690064003d003100300033003600370035000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=103675}}}{
\par
\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,
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).
\par
\par
\par
\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
\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
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
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.
\par
\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
s persist history also when persisting history in defview (see CDefViewPersistHistory::SaveHistory() in shell32\\defvphst.cpp).
\par
\par
\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 ?
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b
\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
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300033003600370035000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
6100690064002f003f00690064003d003100300033003600370035000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=103675}}}{ and }{\field{\*\fldinst { HYPERLINK "http://liveraid/?id=108621" }{{\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001b00000068007400740070003a002f002f006c0069007600650072006100690064002f003f00690064003d003100300038003600320031000000e0c9ea79f9bace118c8200aa004ba90b3600000068007400740070003a002f002f006c006900760065007200
6100690064002f003f00690064003d003100300038003600320031000000}}}{\fldrslt {\cs15\ul\cf2 http://liveraid/?id=108621}}}{
, 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.
\par
\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}}}{
\par
\par
\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?
\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {
\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
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
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.
\par
\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.
\par
\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
of that stuff maybe redundant now.
\par }\pard \ql \li0\ri0\widctlpar\brdrb\brdrs\brdrw15\brsp20 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {
\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
00d0c9ea79f9bace118c8200aa004ba90b0200000017000000150000006d00610069006c0074006f003a00610072006900730068004000610063006d002e006f00720067000000e0c9ea79f9bace118c8200aa004ba90b2a0000006d00610069006c0074006f003a00610072006900730068004000610063006d002e006f00
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!
\par
\par - Arish Ali \tab
\par
\par 1}{\super st}{ Nov 2000
\par }}