Salome HOME
Update the GUI documentation for SMESH module
[modules/smesh.git] / doc / salome / gui / SMESH / cshdat_robohelp.htm
1 <html>\r
2 <head>\r
3 <title>SMESH reference manual</title>\r
4 \r
5 <meta name="generator" content="RoboHelp by eHelp Corporation   www.ehelp.com">\r
6 <meta name="description" content="WebHelp 5.50">\r
7 </head>\r
8 <body>\r
9 <script language="JavaScript">\r
10 <!--\r
11 \r
12 var gArrayCsh = new Array();\r
13 \r
14 var gstrWindowOption = "";\r
15 var gstrURL = "";\r
16 var gbWithNavPane = false;\r
17 \r
18 function CshEntityItem(strAliasId, nTopicNum, strUrl) \r
19 {\r
20     this.strAliasId = strAliasId;\r
21     this.nTopicNum = nTopicNum;\r
22     this.strUrl = strUrl;\r
23 }\r
24 \r
25 \r
26 //Try to get to topic number from hash string\r
27 function GetTopicNumberAuto(strMayBeNumber)\r
28 {\r
29    var nNum = -1;\r
30    if (strMayBeNumber.length >= 1)\r
31    {\r
32                 var strTmp = strMayBeNumber;\r
33                 var iEnd = strTmp.length;\r
34                 for (var i=0; i<iEnd; i++)\r
35                 {\r
36                           var ch = strTmp.charAt(i);\r
37                           if (!((ch == "0") || (ch == "1") ||\r
38                                 (ch == "2") || (ch == "3") ||\r
39                                 (ch == "4") || (ch == "5") ||\r
40                                 (ch == "6") || (ch == "7") ||\r
41                                 (ch == "8") || (ch == "9")))\r
42                               return GetTopicNumberById(strTmp);\r
43                 }\r
44                 nNum = parseInt(strTmp);\r
45    }\r
46    return nNum;\r
47 }\r
48 \r
49 function GetTopicNumber(strHashString)\r
50 {\r
51         var nTopicEndPos = strHashString.indexOf(',')\r
52         if (nTopicEndPos == -1) { // no window option.\r
53                 return GetTopicNumberOnly(strHashString);\r
54         }\r
55         else {\r
56                 var strWindowOption = strHashString.substring(nTopicEndPos + 1, strHashString.length);\r
57                 var strWithNavPane = 'withnavpane=true';\r
58                 if (strWindowOption.toLowerCase().indexOf(strWithNavPane) == 0)\r
59                 {\r
60                         if (strWindowOption.length > strWithNavPane.length)\r
61                                 gstrWindowOption = strWindowOption.substring(strWithNavPane.length + 1);\r
62                         else\r
63                                 gstrWindowOption = "";\r
64                         gbWithNavPane = true;\r
65                 }\r
66                 else\r
67                         gstrWindowOption = strWindowOption;\r
68                 return GetTopicNumberOnly(strHashString.substring(0, nTopicEndPos));            \r
69         }\r
70 }\r
71 \r
72 function GetTopicNumberOnly(strTopicString)\r
73 {\r
74         var nEqualPos = strTopicString.indexOf('=');\r
75         if (nEqualPos == -1) {\r
76                 return GetTopicNumberAuto(strTopicString);\r
77         }\r
78         else {\r
79                 var strValue=strTopicString.substring(nEqualPos + 1, strTopicString.length);\r
80                 if (strTopicString.toLowerCase().indexOf("topicnumber") == 0) {\r
81                         return parseInt(strValue);\r
82                 } else if (strTopicString.toLowerCase().indexOf("context") == 0) {\r
83                         return GetTopicNumberById(strValue);\r
84                 } else if (strTopicString.toLowerCase().indexOf("remoteurl") == 0) {\r
85                         gstrURL = strValue;\r
86                         return -1;\r
87                 }\r
88 \r
89         }\r
90 }\r
91 \r
92 //Find HomePage of the WebHelp system\r
93 // we try to get the topic from remote project if it exists.\r
94 function RedirectToHomePage()\r
95 {\r
96         if (parent && parent != this && parent.goNext)\r
97         {\r
98                 var sHome = parent.goNext();\r
99                 if (sHome != "")\r
100                         RedirectTo(sHome);\r
101         }\r
102 }\r
103 \r
104 function getHomePage()\r
105 {\r
106         if (parent && parent != this && parent.getRelHomePage)\r
107         {\r
108                 return parent.getRelHomePage(document.location.href);\r
109         }\r
110         return "";\r
111 }\r
112 \r
113 function addRemoteProject(strPath)\r
114 {\r
115         if (parent && parent != this && parent.addProject)\r
116         {\r
117                 parent.addProject(strPath);\r
118         }\r
119 }\r
120 \r
121 //Redirect page to...\r
122 function RedirectTo(strUrl)\r
123 {\r
124    if (gstrWindowOption.length != 0) {\r
125                 var wnd = window.open(strUrl, "HelpStub", gstrWindowOption);\r
126                 // close current window and rename the stub window to current window.\r
127                 if (wnd)\r
128                         wnd.focus();\r
129                 if (parent)\r
130                         parent.close();\r
131    }\r
132    else {\r
133         parent.document.location.href = strUrl;\r
134         window.focus();\r
135   }\r
136 }\r
137 \r
138 //Prompt the user that we can not find...\r
139 function FailToFind(strMsg)\r
140 {\r
141     RedirectToHomePage();\r
142 }\r
143 \r
144 //Find topic by topic number (defined in h file)\r
145 function FindTopicByTopicNum(nTopicNum)\r
146 {\r
147         var i = 0;\r
148         var iEnd = gArrayCsh.length;\r
149         for (i=0; i<iEnd; i++)\r
150         {\r
151                 if (gArrayCsh[i].nTopicNum == nTopicNum)\r
152                 {\r
153                         var strURL = gArrayCsh[i].strUrl;\r
154                         if (gbWithNavPane)\r
155                         {\r
156                                 var strHomePage = getHomePage();\r
157                                 if (strHomePage.length != 0)\r
158                                         strURL = strHomePage + strURL;\r
159                         }       \r
160                         RedirectTo(strURL);\r
161                         return true;\r
162                 }\r
163         }\r
164         FailToFind("Fail to find topic assocaite with topic number: " + nTopicNum);\r
165         return false;\r
166 }\r
167 \r
168 var oldPrefix = "HelpIdFromHTMLHelp_"\r
169 //Find topic by topic id (alias id defined in ali file)\r
170 function GetTopicNumberById(strTopicId)\r
171 {\r
172    if (strTopicId.indexOf(oldPrefix) == 0)\r
173    {\r
174                 strTopicId = strTopicId.substring(oldPrefix.length);\r
175    }\r
176 \r
177    var i = 0;\r
178    var iEnd = gArrayCsh.length;\r
179    for (i=0; i<iEnd; i++)\r
180    {\r
181         if (gArrayCsh[i].strAliasId.toLowerCase() == strTopicId.toLowerCase())\r
182         {\r
183             return gArrayCsh[i].nTopicNum;\r
184          }\r
185    }\r
186    gstrURL = "";\r
187    return -1;\r
188 }\r
189 \r
190 //Set Context-sensitive help entity...\r
191 function SetCsh(n, strAliasId, nTopicNum, strUrl)\r
192 {\r
193    gArrayCsh[n] = new CshEntityItem(strAliasId,nTopicNum,strUrl);\r
194 }\r
195 \r
196 \r
197 function getHash()\r
198 {\r
199         if (parent && parent != this)\r
200                 return parent.location.hash;\r
201         else\r
202                 return "";\r
203 }\r
204 //-->\r
205 </script>\r
206 <script language="javascript">\r
207 <!--\r
208 \r
209 \r
210 //-->\r
211 </script>\r
212 <script language="javascript">\r
213 <!--\r
214 //Find CSH according to hash string after this page\r
215 if (getHash().length > 0)\r
216 {\r
217    // VH 05/16/00 now support \r
218    // TopicID=\r
219    // TopicNumber=\r
220    // RemoteURL=   \r
221    // and WindowsOptions\r
222    // with the format #a=xxx,b=xxx,c=xxx...\r
223    var strHashString = getHash().toString();\r
224    // change ? to : for remote URL. because java applet have some problem to pass a URL with two : inside the URL so we changed it. \r
225    // so here need to change it back.\r
226    strHashString = strHashString.substring(1,strHashString.length);\r
227    strHashString = strHashString.replace("%072%057%057", "://");\r
228    var nTopicNum = GetTopicNumber(strHashString);\r
229 \r
230    if (nTopicNum != -1)\r
231    {\r
232       FindTopicByTopicNum(nTopicNum);\r
233    }\r
234    else\r
235    {\r
236       if (gstrURL.length > 0) \r
237         RedirectTo(gstrURL);\r
238       else\r
239         RedirectToHomePage();\r
240    }\r
241 }\r
242 else\r
243 {\r
244    RedirectToHomePage();\r
245 }\r
246 //-->\r
247 </script>\r
248 <noscript>\r
249  <p> Your browser does not support JavaScript. WebHelp Context-Sensitive Help requires JavaScript support to run.</p>\r
250 </noscript>\r
251 </body>\r
252 </html>\r
253 \r
254 \r
255 \r
256 \r
257 \r
258 \r