Functions | Variables
slidy.js File Reference

Go to the source code of this file.

Functions

 if (ie &&!ie8) document.write("<iframe id
 
 if (typeof beforePrint!= 'undefined')
 
else if (document.addEventListener) document.addEventListener("DOMContentLoaded"
 
function ieSlidyInit ()
 
 setTimeout (hideSlides, 50)
 
function hideSlides ()
 
function startup ()
 

Variables

var ns_pos = (typeof window.pageYOffset!='undefined')
 
var khtml = ((navigator.userAgent).indexOf("KHTML") >= 0 ? true : false)
 
var opera = ((navigator.userAgent).indexOf("Opera") >= 0 ? true : false)
 
var ie = (typeof document.all != "undefined" && !opera)
 
var ie7 = (!ns_pos && navigator.userAgent.indexOf("MSIE 7") != -1)
 
var ie8 = (!ns_pos && navigator.userAgent.indexOf("MSIE 8") != -1)
 
var slidy_started = false
 
else startup
 
else false
 
var slidenum = 0
 
var slides
 
var slideNumElement
 
var notes
 
var backgrounds
 
var toolbar
 
var title
 
var lastShown = null
 
var eos = null
 
var toc = null
 
var outline = null
 
var selectedTextLen
 
var viewAll = 0
 
var wantToolbar = 1
 
var mouseClickEnabled = true
 
var scrollhack = 0
 
var key_wanted = false
 
var helpAnchor
 
var helpPage = "http://www.w3.org/Talks/Tools/Slidy/help.html"
 
var helpText
 
var sizeIndex = 0
 
var sizeAdjustment = 0
 
var sizes
 
var okayForIncremental = incrementalElementList()
 
var lastWidth = 0
 
var lastHeight = 0
 
var objects
 
var lang = "en"
 
var strings_es
 
var strings_ca
 
var strings_nl
 
var strings_de
 
var strings_pl
 
var strings_fr
 
var strings_hu
 
var strings_it
 
var strings_el
 
var strings_ja
 
var strings_zh
 
var strings_ru
 
var strings_sv
 
var localize
 

Function Documentation

function hideSlides ( )

Definition at line 56 of file slidy.js.

57 {
58  if (document.body)
59  document.body.style.visibility = "hidden";
60  else
62 }
setTimeout(hideSlides, 50)
function hideSlides()
Definition: slidy.js:56
function ieSlidyInit ( )

Definition at line 40 of file slidy.js.

41 {
42  if (//document.readyState == "interactive" ||
43  document.readyState == "complete" ||
44  document.readyState == "loaded")
45  {
46  startup();
47  }
48  else
49  {
50  setTimeout(ieSlidyInit, 100);
51  }
52 }
else startup
Definition: slidy.js:38
setTimeout(hideSlides, 50)
function ieSlidyInit()
Definition: slidy.js:40
if ( ie &&!  ie8)
if (   typeof beforePrint! = 'undefined')

Definition at line 24 of file slidy.js.

25 {
26  window.onbeforeprint = beforePrint;
27  window.onafterprint = afterPrint;
28 }
else if ( document.  addEventListener)
setTimeout ( hideSlides  ,
50   
)
function startup ( )

Definition at line 315 of file slidy.js.

316 {
317  if (slidy_started)
318  {
319  alert("already started");
320  return;
321  }
322  slidy_started = true;
323 
324  // find human language from html element
325  // for use in localizing strings
326  lang = document.body.parentNode.getAttribute("lang");
327 
328  if (!lang)
329  lang = document.body.parentNode.getAttribute("xml:lang");
330 
331  if (!lang)
332  lang = "en";
333 
334  document.body.style.visibility = "visible";
335  title = document.title;
336  toolbar = addToolbar();
337  wrapImplicitSlides();
338  slides = collectSlides();
339  notes = collectNotes();
340  objects = document.body.getElementsByTagName("object");
341  backgrounds = collectBackgrounds();
342  patchAnchors();
343 
344  slidenum = findSlideNumber(location.href);
345  window.offscreenbuffering = true;
346  sizeAdjustment = findSizeAdjust();
347  hideImageToolbar(); // suppress IE image toolbar popup
348  initOutliner(); // activate fold/unfold support
349 
350  if (slides.length > 0)
351  {
352  var slide = slides[slidenum];
353  slide.style.position = "absolute";
354 
355  if (slidenum > 0)
356  {
357  setVisibilityAllIncremental("visible");
358  lastShown = previousIncrementalItem(null);
359  setEosStatus(true);
360  }
361  else
362  {
363  lastShown = null;
364  setVisibilityAllIncremental("hidden");
365  setEosStatus(!nextIncrementalItem(lastShown));
366  }
367 
368  setLocation();
369  }
370 
371  toc = tableOfContents();
372  hideTableOfContents();
373 
374  // bind event handlers
375  document.onclick = mouseButtonClick;
376  document.onmouseup = mouseButtonUp;
377  document.onkeydown = keyDown;
378  if (opera)
379  document.onkeypress = keyPress;
380  window.onresize = resized;
381  window.onscroll = scrolled;
382  window.onunload = unloaded;
383  singleSlideView();
384 
385 
386  setLocation();
387  resized();
388 
389  if (ie7)
390  setTimeout("ieHack()", 100);
391 
392  showToolbar();
393  setInterval("checkLocation()", 200); // for back button detection
394 }
var backgrounds
Definition: slidy.js:68
var objects
Definition: slidy.js:101
var sizeAdjustment
Definition: slidy.js:89
setTimeout(hideSlides, 50)
var lang
Definition: slidy.js:104
var slidy_started
Definition: slidy.js:17
var toc
Definition: slidy.js:73
this prevents interlacing of message information from different threads We call the thread running MessageLoggerScribe see How the Message Service Starts Up the server side All user programatic interaction is on the client but the configuration(driven by the.cfg file) is dealt with on the server side.The path looks like this(each step is detailed below) the constructor of LogInfo constructs a new MessageSender specifying that this is at severity level and that the category is myCategory When the<< x is encountered, that merely sends<< x to the MessageSender.In the line LogInfo("myCategory")<< x;one has created a **temporary **instance of LogInfo--this getsdestructed upon completion of the statement.The whole working of LogInfois in that destruction:Since LogInfo has an auto_ptr to the MessageSender, when LogInfo goes away, the auto_ptr goes away, and this causesa delete of the MessageSender.The destructor of MessageSender is whereall the action--at the client side--happens.The MessageSender instance owns an ErrorObj on the heap;this can be viewedas a receptacle for the severity and category information and a collectionof items sent in by operator<<.The ctor of MessageSender makes a newErrorObj--AND MessageSender NEVER DELETES THAT ErrorObj!!--Instead, the destructor of MessageSender[which, we will remember, isinvoked as soon as the LogInfo("myCategory")<< x;statement has beenexecuted] interacts with the servier side, placing in motion events thatwill lead to the pointer to this ErrorObj to be used and ultimatelydeleted by code on the server side.The ErrorObj is on the heap, so thispointer remains meaningful in the server side it will be used in.The interaction of MessageSender with the server side consists of two steps.First, it uses the MessageDrop instance to supply the module and run/event context.[There is a separate discussion below about the MessageDrop.] The module and context go into the ErrorObj.Second, it invokes the static LOG method of MessageLoggerQ, supplying the pointer to the ErrorObj.Now we leave the client side and go to the server side, which picks up theLOG_A_MESSAGE entry in the course of a consume(opcode, operand) call on theMessageLoggerQ.The run() method of MessageLoggerScribe has an eternaldo, which continually tries to consume from this queue(consume() sleeps onthe queue being empty).The method log() is passed the pointer to the ErrorObj.log() getsa reference to the ELcontextSupplier from the administrator, and setsthe context to that context remembered in the ErrorObj.(This is necessarysince the run/event of the message issuer is known to the client thread, having been provided by the before-module and before-event callbacks of themessage **service **running in the **client **thread, so this information hadneeded to cross the client/server boundary.) log() then parses the categories string and(if there are multiple categories) invokes the ErrorLog for this object for each category in the string.ErrorLog is in the ErrorLogger code;we are not documenting this code here.The effect is to shop the ErrorObj to every destination;in each case thecode for that destination(normally ELoutput) will apply the limits andthresholds, format the message, add header information, and output the message.Finally, the completion of the do in MessageLoggerScribe::run() deletes theErrorObj--completing the promise made when it was passed responsibility forthis heap-resident object.---------------The MessageDrop---------------The purpose of the message drop is to convey framework information to thepoint-of-invocation where a message is issued.The functions issuingmessages may not naturally have access to the ModuleDescription or theEventID(which contains the run and event numbers) or the list(preparedby configuration in MessageLoggerScrivbe) of debug-enabled modules.Theprocess of preparing a message requires this information.In discussing how the MessageDrop works, we will pay attention to the factsthat the MessageLoggerScript will be running in a distinct thread from thecode issuing the message, and that there may be several threads processingevents, each issuing messages independantly.MessageDrop is athread-specific singleton.The following files interact with MessageDrop:In the MessageLogger package:MessageDrop.h MessageDrop.cc MessageLogger.h MessageSender.cc In the MessageService package:MessageLogger.ccMessageDrop.h defines a singleton pattern.The(private) default ctor initializes the public data:ModuleName is""runEvent is"pre-events"debugEnabled is true There is a public instance() methodMessageDrop.cc refines that to be a thread-specific singleton pattern.This is accomplished by replacing the static bare pointer to MessageDrop which would have been present in an ordinary singleton, with a boost::thread_specific_ptr< MessageDrop > The latter is a object that may contain several but only one is accessible in this thread The if the pointer is null
var toolbar
Definition: slidy.js:69
var ie7
Definition: slidy.js:15
var slidenum
Definition: slidy.js:64
var lastShown
Definition: slidy.js:71
var opera
Definition: slidy.js:13
var title
Definition: slidy.js:70
var slides
Definition: slidy.js:65
var notes
Definition: slidy.js:67

Variable Documentation

var backgrounds

Definition at line 68 of file slidy.js.

var eos = null

Definition at line 72 of file slidy.js.

else false

Definition at line 38 of file slidy.js.

var helpAnchor

Definition at line 83 of file slidy.js.

var helpPage = "http://www.w3.org/Talks/Tools/Slidy/help.html"

Definition at line 84 of file slidy.js.

var helpText
Initial value:
= "Navigate with mouse click, space bar, Cursor Left/Right, " +
"or Pg Up and Pg Dn. Use S and B to change font size."

Definition at line 85 of file slidy.js.

var ie = (typeof document.all != "undefined" && !opera)

Definition at line 14 of file slidy.js.

var ie7 = (!ns_pos && navigator.userAgent.indexOf("MSIE 7") != -1)

Definition at line 15 of file slidy.js.

var ie8 = (!ns_pos && navigator.userAgent.indexOf("MSIE 8") != -1)

Definition at line 16 of file slidy.js.

var key_wanted = false

Definition at line 81 of file slidy.js.

var khtml = ((navigator.userAgent).indexOf("KHTML") >= 0 ? true : false)

Definition at line 12 of file slidy.js.

var lang = "en"

Definition at line 104 of file slidy.js.

var lastHeight = 0

Definition at line 96 of file slidy.js.

var lastShown = null

Definition at line 71 of file slidy.js.

var lastWidth = 0

Definition at line 95 of file slidy.js.

var localize
Initial value:
= {
"es":strings_es,
"ca":strings_ca,
"nl":strings_nl,
"de":strings_de,
"pl":strings_pl,
"fr":strings_fr,
"hu":strings_hu,
"it":strings_it,
"el":strings_el,
"jp":strings_ja,
"zh":strings_zh,
"ru":strings_ru,
}
var strings_hu
Definition: slidy.js:194
var strings_ja
Definition: slidy.js:239
var strings_es
Definition: slidy.js:109
var strings_el
Definition: slidy.js:224
var strings_sv
Definition: slidy.js:281
var strings_zh
Definition: slidy.js:253
var strings_ru
Definition: slidy.js:267
var strings_ca
Definition: slidy.js:123
var strings_de
Definition: slidy.js:151
var strings_fr
Definition: slidy.js:179
var strings_nl
Definition: slidy.js:137
var strings_it
Definition: slidy.js:210
var strings_pl
Definition: slidy.js:165

Definition at line 298 of file slidy.js.

var mouseClickEnabled = true

Definition at line 79 of file slidy.js.

var notes

Definition at line 67 of file slidy.js.

var ns_pos = (typeof window.pageYOffset!='undefined')

Definition at line 11 of file slidy.js.

var objects

Definition at line 101 of file slidy.js.

var okayForIncremental = incrementalElementList()

Definition at line 92 of file slidy.js.

var opera = ((navigator.userAgent).indexOf("Opera") >= 0 ? true : false)

Definition at line 13 of file slidy.js.

var outline = null

Definition at line 74 of file slidy.js.

var scrollhack = 0

Definition at line 80 of file slidy.js.

var selectedTextLen

Definition at line 75 of file slidy.js.

var sizeAdjustment = 0

Definition at line 89 of file slidy.js.

var sizeIndex = 0

Definition at line 88 of file slidy.js.

var sizes
Initial value:
= new Array("10pt", "12pt", "14pt", "16pt", "18pt", "20pt",
"22pt", "24pt", "26pt", "28pt", "30pt", "32pt")

Definition at line 90 of file slidy.js.

var slidenum = 0

Definition at line 64 of file slidy.js.

var slideNumElement

Definition at line 66 of file slidy.js.

var slides

Definition at line 65 of file slidy.js.

var slidy_started = false

Definition at line 17 of file slidy.js.

else startup

Definition at line 38 of file slidy.js.

strings_ca[helpText]
Initial value:
= {
"slide":"pàg..",
"help?":"Ajuda",
"contents?":"Índex",
"table of contents":"taula de continguts",
"Table of Contents":"Taula de Continguts",
"restart presentation":"Reiniciar presentació",
"restart?":"Inici"
}

Definition at line 123 of file slidy.js.

strings_de[helpText]
Initial value:
= {
"slide":"Seite",
"help?":"Hilfe",
"contents?":"Übersicht",
"table of contents":"Inhaltsverzeichnis",
"Table of Contents":"Inhaltsverzeichnis",
"restart presentation":"Präsentation neu starten",
"restart?":"Neustart"
}

Definition at line 151 of file slidy.js.

strings_el[helpText]
Initial value:
= {
"slide":"σελίδα",
"help?":"βοήθεια;",
"contents?":"περιεχόμενα;",
"table of contents":"πίνακας περιεχομένων",
"Table of Contents":"Πίνακας Περιεχομένων",
"restart presentation":"επανεκκίνηση παρουσίασης",
"restart?":"επανεκκίνηση;"
}

Definition at line 224 of file slidy.js.

strings_es[helpText]
Initial value:
= {
"slide":"pág.",
"help?":"Ayuda",
"contents?":"Índice",
"table of contents":"tabla de contenidos",
"Table of Contents":"Tabla de Contenidos",
"restart presentation":"Reiniciar presentación",
"restart?":"Inicio"
}

Definition at line 109 of file slidy.js.

strings_fr[helpText]
Initial value:
= {
"slide":"page",
"help?":"Aide",
"contents?":"Index",
"table of contents":"table des matières",
"Table of Contents":"Table des matières",
"restart presentation":"Recommencer l'exposé",
"restart?":"Début"
}

Definition at line 179 of file slidy.js.

strings_hu[helpText]
Initial value:
= {
"slide":"oldal",
"help?":"segítség",
"contents?":"tartalom",
"table of contents":"tartalomjegyzék",
"Table of Contents":"Tartalomjegyzék",
"restart presentation":"bemutató újraindítása",
"restart?":"újraindítás"
}

Definition at line 194 of file slidy.js.

strings_it[helpText]
Initial value:
= {
"slide":"pag.",
"help?":"Aiuto",
"contents?":"Indice",
"table of contents":"indice",
"Table of Contents":"Indice",
"restart presentation":"Ricominciare la presentazione",
"restart?":"Inizio"
}

Definition at line 210 of file slidy.js.

strings_ja[helpText]
Initial value:
= {
"slide":"スライド",
"help?":"ヘルプ",
"contents?":"目次",
"table of contents":"目次を表示",
"Table of Contents":"目次",
"restart presentation":"最初から再生",
"restart?":"最初から"
}

Definition at line 239 of file slidy.js.

strings_nl[helpText]
Initial value:
= {
"slide":"pagina",
"help?":"Help?",
"contents?":"Inhoud?",
"table of contents":"inhoudsopgave",
"Table of Contents":"Inhoudsopgave",
"restart presentation":"herstart presentatie",
"restart?":"Herstart?"
}

Definition at line 137 of file slidy.js.

strings_pl[helpText]
Initial value:
= {
"slide":"slajd",
"help?":"pomoc?",
"contents?":"spis treści?",
"table of contents":"spis treści",
"Table of Contents":"Spis Treści",
"restart presentation":"Restartuj prezentację",
"restart?":"restart?"
}

Definition at line 165 of file slidy.js.

strings_ru[helpText]
Initial value:
= {
"slide":"слайд",
"help?":"помощь?",
"contents?":"содержание?",
"table of contents":"оглавление",
"Table of Contents":"Оглавление",
"restart presentation":"перезапустить презентацию",
"restart?":"перезапуск?"
}

Definition at line 267 of file slidy.js.

strings_sv[helpText]
Initial value:
= {
"slide":"sida",
"help?":"hjälp",
"contents?":"innehåll",
"table of contents":"innehållsförteckning",
"Table of Contents":"Innehållsförteckning",
"restart presentation":"visa presentationen från början",
"restart?":"börja om"
}

Definition at line 281 of file slidy.js.

strings_zh[helpText]
Initial value:
= {
"slide":"幻灯片",
"help?":"帮助?",
"contents?":"内容?",
"table of contents":"目录",
"Table of Contents":"目录",
"restart presentation":"重新启动展示",
"restart?":"重新启动?"
}

Definition at line 253 of file slidy.js.

var title

Definition at line 70 of file slidy.js.

var toc = null

Definition at line 73 of file slidy.js.

var toolbar

Definition at line 69 of file slidy.js.

var viewAll = 0

Definition at line 77 of file slidy.js.

var wantToolbar = 1

Definition at line 78 of file slidy.js.