|
1 | 1 | <!DOCTYPE HTML> |
2 | | -<html lang="en" class="light" dir="ltr"> |
| 2 | +<html lang="en" class="light sidebar-visible" dir="ltr"> |
3 | 3 | <head> |
4 | 4 | <!-- Book generated using mdBook --> |
5 | 5 | <meta charset="UTF-8"> |
6 | 6 | <title>Accessibility - fltk book</title> |
7 | 7 |
|
8 | 8 |
|
9 | 9 | <!-- Custom HTML head --> |
10 | | - |
| 10 | + |
11 | 11 | <meta name="description" content=""> |
12 | 12 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
13 | 13 | <meta name="theme-color" content="#ffffff"> |
|
30 | 30 |
|
31 | 31 | <!-- Custom theme stylesheets --> |
32 | 32 |
|
33 | | - </head> |
34 | | - <body class="sidebar-visible no-js"> |
35 | | - <div id="body-container"> |
| 33 | + |
36 | 34 | <!-- Provide site root to javascript --> |
37 | 35 | <script> |
38 | 36 | var path_to_root = ""; |
39 | 37 | var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light"; |
40 | 38 | </script> |
41 | | - |
| 39 | + <!-- Start loading toc.js asap --> |
| 40 | + <script src="toc.js"></script> |
| 41 | + </head> |
| 42 | + <body> |
| 43 | + <div id="body-container"> |
42 | 44 | <!-- Work around some values being stored in localStorage wrapped in quotes --> |
43 | 45 | <script> |
44 | 46 | try { |
|
60 | 62 | var theme; |
61 | 63 | try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } |
62 | 64 | if (theme === null || theme === undefined) { theme = default_theme; } |
63 | | - var html = document.querySelector('html'); |
| 65 | + const html = document.documentElement; |
64 | 66 | html.classList.remove('light') |
65 | 67 | html.classList.add(theme); |
66 | | - var body = document.querySelector('body'); |
67 | | - body.classList.remove('no-js') |
68 | | - body.classList.add('js'); |
| 68 | + html.classList.add("js"); |
69 | 69 | </script> |
70 | 70 |
|
71 | 71 | <input type="checkbox" id="sidebar-toggle-anchor" class="hidden"> |
72 | 72 |
|
73 | 73 | <!-- Hide / unhide sidebar before it is displayed --> |
74 | 74 | <script> |
75 | | - var body = document.querySelector('body'); |
76 | 75 | var sidebar = null; |
77 | 76 | var sidebar_toggle = document.getElementById("sidebar-toggle-anchor"); |
78 | 77 | if (document.body.clientWidth >= 1080) { |
|
82 | 81 | sidebar = 'hidden'; |
83 | 82 | } |
84 | 83 | sidebar_toggle.checked = sidebar === 'visible'; |
85 | | - body.classList.remove('sidebar-visible'); |
86 | | - body.classList.add("sidebar-" + sidebar); |
| 84 | + html.classList.remove('sidebar-visible'); |
| 85 | + html.classList.add("sidebar-" + sidebar); |
87 | 86 | </script> |
88 | 87 |
|
89 | 88 | <nav id="sidebar" class="sidebar" aria-label="Table of contents"> |
90 | | - <div class="sidebar-scrollbox"> |
91 | | - <ol class="chapter"><li class="chapter-item expanded "><a href="Home.html"><strong aria-hidden="true">1.</strong> Home</a></li><li class="chapter-item expanded "><a href="Setup.html"><strong aria-hidden="true">2.</strong> Setup</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="Cross-Compiling.html"><strong aria-hidden="true">2.1.</strong> Cross Compiling</a></li><li class="chapter-item "><a href="Fluid.html"><strong aria-hidden="true">2.2.</strong> Fluid</a></li></ol></li><li class="chapter-item expanded "><a href="The-App-struct.html"><strong aria-hidden="true">3.</strong> The App struct</a></li><li class="chapter-item expanded "><a href="Windows.html"><strong aria-hidden="true">4.</strong> Windows</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="GlutWindow.html"><strong aria-hidden="true">4.1.</strong> GlutWindow</a></li></ol></li><li class="chapter-item expanded "><a href="Widgets.html"><strong aria-hidden="true">5.</strong> Widgets</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="Buttons.html"><strong aria-hidden="true">5.1.</strong> Buttons</a></li><li class="chapter-item "><a href="Labels.html"><strong aria-hidden="true">5.2.</strong> Labels</a></li><li class="chapter-item "><a href="Group-widgets.html"><strong aria-hidden="true">5.3.</strong> Group widgets</a></li><li class="chapter-item "><a href="Menus.html"><strong aria-hidden="true">5.4.</strong> Menus</a></li><li class="chapter-item "><a href="Input-&-Output.html"><strong aria-hidden="true">5.5.</strong> Input & Output</a></li><li class="chapter-item "><a href="Valuators.html"><strong aria-hidden="true">5.6.</strong> Valuators</a></li><li class="chapter-item "><a href="Text.html"><strong aria-hidden="true">5.7.</strong> Text</a></li><li class="chapter-item "><a href="Browsers.html"><strong aria-hidden="true">5.8.</strong> Browsers</a></li><li class="chapter-item "><a href="Trees.html"><strong aria-hidden="true">5.9.</strong> Trees</a></li><li class="chapter-item "><a href="Tables.html"><strong aria-hidden="true">5.10.</strong> Tables</a></li><li class="chapter-item "><a href="Custom-Widgets.html"><strong aria-hidden="true">5.11.</strong> Custom widgets</a></li></ol></li><li class="chapter-item expanded "><a href="Dialogs.html"><strong aria-hidden="true">6.</strong> Dialogs</a></li><li class="chapter-item expanded "><a href="Images.html"><strong aria-hidden="true">7.</strong> Images</a></li><li class="chapter-item expanded "><a href="Events.html"><strong aria-hidden="true">8.</strong> Events</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="Drag-&-Drop.html"><strong aria-hidden="true">8.1.</strong> Drag & Drop</a></li><li class="chapter-item "><a href="State-Management.html"><strong aria-hidden="true">8.2.</strong> State Management</a></li></ol></li><li class="chapter-item expanded "><a href="Layouts.html"><strong aria-hidden="true">9.</strong> Layouts</a></li><li class="chapter-item expanded "><a href="Style.html"><strong aria-hidden="true">10.</strong> Style</a><a class="toggle"><div>❱</div></a></li><li><ol class="section"><li class="chapter-item "><a href="Colors.html"><strong aria-hidden="true">10.1.</strong> Colors</a></li><li class="chapter-item "><a href="FrameTypes.html"><strong aria-hidden="true">10.2.</strong> FrameTypes</a></li><li class="chapter-item "><a href="Fonts.html"><strong aria-hidden="true">10.3.</strong> Fonts</a></li><li class="chapter-item "><a href="Drawing.html"><strong aria-hidden="true">10.4.</strong> Drawing things</a></li><li class="chapter-item "><a href="Styling.html"><strong aria-hidden="true">10.5.</strong> Styling</a></li></ol></li><li class="chapter-item expanded "><a href="Animations.html"><strong aria-hidden="true">11.</strong> Animations</a></li><li class="chapter-item expanded "><a href="Accessibility.html" class="active"><strong aria-hidden="true">12.</strong> Accessibility</a></li><li class="chapter-item expanded "><a href="FAQ.html"><strong aria-hidden="true">13.</strong> FAQ</a></li></ol> |
92 | | - </div> |
| 89 | + <!-- populated by js --> |
| 90 | + <mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox> |
| 91 | + <noscript> |
| 92 | + <iframe class="sidebar-iframe-outer" src="toc.html"></iframe> |
| 93 | + </noscript> |
93 | 94 | <div id="sidebar-resize-handle" class="sidebar-resize-handle"> |
94 | 95 | <div class="sidebar-resize-indicator"></div> |
95 | 96 | </div> |
96 | 97 | </nav> |
97 | 98 |
|
98 | | - <!-- Track and set sidebar scroll position --> |
99 | | - <script> |
100 | | - var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox'); |
101 | | - sidebarScrollbox.addEventListener('click', function(e) { |
102 | | - if (e.target.tagName === 'A') { |
103 | | - sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop); |
104 | | - } |
105 | | - }, { passive: true }); |
106 | | - var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll'); |
107 | | - sessionStorage.removeItem('sidebar-scroll'); |
108 | | - if (sidebarScrollTop) { |
109 | | - // preserve sidebar scroll position when navigating via links within sidebar |
110 | | - sidebarScrollbox.scrollTop = sidebarScrollTop; |
111 | | - } else { |
112 | | - // scroll sidebar to current active section when navigating via "next/previous chapter" buttons |
113 | | - var activeSection = document.querySelector('#sidebar .active'); |
114 | | - if (activeSection) { |
115 | | - activeSection.scrollIntoView({ block: 'center' }); |
116 | | - } |
117 | | - } |
118 | | - </script> |
119 | | - |
120 | 99 | <div id="page-wrapper" class="page-wrapper"> |
121 | 100 |
|
122 | 101 | <div class="page"> |
123 | | - <div id="menu-bar-hover-placeholder"></div> |
| 102 | + <div id="menu-bar-hover-placeholder"></div> |
124 | 103 | <div id="menu-bar" class="menu-bar sticky"> |
125 | 104 | <div class="left-buttons"> |
126 | 105 | <label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar"> |
@@ -325,6 +304,22 @@ <h2 id="screen-reader-support"><a class="header" href="#screen-reader-support">S |
325 | 304 |
|
326 | 305 | </div> |
327 | 306 |
|
| 307 | + <!-- Livereload script (if served using the cli tool) --> |
| 308 | + <script> |
| 309 | + const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:'; |
| 310 | + const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload"; |
| 311 | + const socket = new WebSocket(wsAddress); |
| 312 | + socket.onmessage = function (event) { |
| 313 | + if (event.data === "reload") { |
| 314 | + socket.close(); |
| 315 | + location.reload(); |
| 316 | + } |
| 317 | + }; |
| 318 | + |
| 319 | + window.onbeforeunload = function() { |
| 320 | + socket.close(); |
| 321 | + } |
| 322 | + </script> |
328 | 323 |
|
329 | 324 |
|
330 | 325 |
|
|
0 commit comments