/* This file is part of Natural Docs, which is Copyright © 2003-2022 Code Clear LLC. Natural Docs is licensed under version 3 of the GNU Affero General Public License (AGPL). Refer to License.txt or www.naturaldocs.org for the complete details. This file may be distributed with documentation files generated by Natural Docs. Such documentation is not covered by Natural Docs' copyright and licensing, and may have its own copyright and distribution terms as decided by its author. */ "use strict";var NDContentPage=new function(){this.Start=function(){this.CalculateWideFormPrototypeWidths();for(var key in this.wideFormPrototypeWidths){if(this.wideFormPrototypeWidths[key]==0){setTimeout("NDContentPage.Start();",200);return;}}this.ReformatPrototypes();window.onresize=function(){NDContentPage.OnResize();};this.toolTipHolder=document.createElement("div");this.toolTipHolder.style.display="none";this.toolTipHolder.style.position="fixed";this.toolTipHolder.style.zIndex=20;document.body.appendChild(this.toolTipHolder);var ttLocation=location.href;var hashIndex=ttLocation.indexOf('#');if(hashIndex!=-1){ttLocation=ttLocation.substr(0,hashIndex);}ttLocation=ttLocation.substr(0,ttLocation.length-5)+"-ToolTips.js";NDCore.LoadJavaScript(ttLocation);};this.OnResize=function(){if(this.reformatPrototypesTimeout==undefined){this.reformatPrototypesTimeout=setTimeout("NDContentPage.ReformatPrototypes()",200);}};this.GetPrototypeIDNumber=function(element){if(element.id.indexOf("NDPrototype")==0){var id=parseInt(element.id.substr(11),10);if(id!=NaN&&id>0){return id;}}return-1;};this.CalculateWideFormPrototypeWidths=function(){var prototypes=document.getElementsByClassName("NDPrototype");for(var i=0;imaxWidth){maxWidth=tableWidth;}}this.wideFormPrototypeWidths[id]=maxWidth;}}}};this.ReformatPrototypes=function(){var prototypes=document.getElementsByClassName("NDPrototype");for(var i=0;i=wideFormWidth&&NDCore.HasClass(prototypes[i],"NarrowForm")){NDCore.ChangePrototypeToWideForm(prototypes[i]);}else if(availableWidthdocument.body.offsetWidth){x=document.body.offsetWidth-this.toolTipHolder.offsetWidth-5;if(x<5){x=5;newWidth=document.body.offsetWidth-10;}}this.toolTipHolder.style.left=x+"px";this.toolTipHolder.style.top=y+"px";if(newWidth!=undefined){this.toolTipHolder.style.width=newWidth+"px";}var prototypes=this.toolTipHolder.getElementsByClassName("NDPrototype");if(prototypes.length>0&&NDCore.HasClass(prototypes[0],"WideForm")&&prototypes[0].scrollWidth>prototypes[0].offsetWidth){NDCore.ChangePrototypeToNarrowForm(prototypes[0]);}if(y+this.toolTipHolder.offsetHeight+25>document.body.parentNode.offsetHeight){var newY=linkOffsets.offsetTop-this.toolTipHolder.offsetHeight-scrollParent.scrollTop-3;if(newY>=3){this.toolTipHolder.style.top=newY+"px";}}this.toolTipHolder.style.visibility="visible";};this.ResetToolTip=function(){if(this.showingToolTip!=undefined){this.toolTipHolder.style.display="none";this.toolTipHolder.style.width=null;this.lastToolTip=this.showingToolTip;this.showingToolTip=undefined;}if(this.toolTipTimeout!=undefined){clearTimeout(this.toolTipTimeout);this.toolTipTimeout=undefined;}};this.wideFormPrototypeWidths={};};