Salome HOME
Update the GUI documentation for SMESH module
[modules/smesh.git] / doc / salome / gui / SMESH / whframes.js
1 //      WebHelp 5.10.001\r
2 // this value should be identical to the value used in whproxy.js\r
3 window.whname = "wh_stub";\r
4 \r
5 // this file will be used by Topic and NavBar and NavPane and other components\r
6 // and this file is used in child frame html.\r
7 // and the whstub.js will be used in the start page.\r
8 // see reference in whstub.js.\r
9 // Internal Area\r
10 var gbInited = false;\r
11 var gWndStubPage = null;\r
12 function getStubPage()\r
13 {\r
14         if (!gbInited)\r
15         {\r
16                 gWndStubPage = getStubPage_inter(window);\r
17                 gbInited = true;\r
18         }\r
19         return gWndStubPage;\r
20 }\r
21 \r
22 function getStubPage_inter(wCurrent) {\r
23         if (null == wCurrent.parent || wCurrent.parent == wCurrent)\r
24                 return null;\r
25 \r
26         if (wCurrent.parent.whname && "wh_stub" == wCurrent.parent.whname) \r
27                 return wCurrent.parent;\r
28         else\r
29                 if (wCurrent.parent.frames.length != 0 && wCurrent.parent != wCurrent)\r
30                         return getStubPage_inter(wCurrent.parent);\r
31                 else \r
32                         return null;\r
33 }\r
34 \r
35 // Public interface begin here................\r
36 function RegisterListener(framename, nMessageId)\r
37 {\r
38         var wStartPage = getStubPage();\r
39         if (wStartPage && wStartPage != this) {\r
40                 return wStartPage.RegisterListener(framename, nMessageId);\r
41         }\r
42         else \r
43                 return false;\r
44 }\r
45 \r
46 function RegisterListener2(oframe, nMessageId)\r
47 {\r
48         var wStartPage = getStubPage();\r
49         if (wStartPage && wStartPage != this) {\r
50                 return wStartPage.RegisterListener2(oframe, nMessageId);\r
51         }\r
52         else \r
53                 return false;\r
54 }\r
55 \r
56 function UnRegisterListener2(oframe, nMessageId)\r
57 {\r
58         var wStartPage = getStubPage();\r
59         if (wStartPage && wStartPage != this && wStartPage.UnRegisterListener2) {\r
60                 return wStartPage.UnRegisterListener2(oframe, nMessageId);\r
61         }\r
62         else \r
63                 return false;\r
64 }\r
65 \r
66 function SendMessage(oMessage)\r
67 {\r
68         var nMsgId = oMessage.nMessageId;\r
69         if (nMsgId == WH_MSG_ISINFRAMESET && oMessage.wSender != this)\r
70                 return true;\r
71         var wStartPage = getStubPage();\r
72         if (wStartPage && wStartPage != this && wStartPage.SendMessage) \r
73         {\r
74                 return wStartPage.SendMessage(oMessage);\r
75         }\r
76         else \r
77                 return false;\r
78 }\r
79 var gbWhProxy=true;