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