Skip to content

Commit ac7aefe

Browse files
authored
Merge pull request #17 from Ippokratis/main
Updated the fltk version in Home and GlutWindow chapters
2 parents 4862520 + 4ae9e42 commit ac7aefe

51 files changed

Lines changed: 1506 additions & 1521 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/404.html

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE HTML>
2-
<html lang="en" class="light" dir="ltr">
2+
<html lang="en" class="light sidebar-visible" dir="ltr">
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
@@ -8,7 +8,7 @@
88

99

1010
<!-- Custom HTML head -->
11-
11+
1212
<meta name="description" content="">
1313
<meta name="viewport" content="width=device-width, initial-scale=1">
1414
<meta name="theme-color" content="#ffffff">
@@ -31,15 +31,17 @@
3131

3232
<!-- Custom theme stylesheets -->
3333

34-
</head>
35-
<body class="sidebar-visible no-js">
36-
<div id="body-container">
34+
3735
<!-- Provide site root to javascript -->
3836
<script>
3937
var path_to_root = "";
4038
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
4139
</script>
42-
40+
<!-- Start loading toc.js asap -->
41+
<script src="toc.js"></script>
42+
</head>
43+
<body>
44+
<div id="body-container">
4345
<!-- Work around some values being stored in localStorage wrapped in quotes -->
4446
<script>
4547
try {
@@ -61,19 +63,16 @@
6163
var theme;
6264
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
6365
if (theme === null || theme === undefined) { theme = default_theme; }
64-
var html = document.querySelector('html');
66+
const html = document.documentElement;
6567
html.classList.remove('light')
6668
html.classList.add(theme);
67-
var body = document.querySelector('body');
68-
body.classList.remove('no-js')
69-
body.classList.add('js');
69+
html.classList.add("js");
7070
</script>
7171

7272
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
7373

7474
<!-- Hide / unhide sidebar before it is displayed -->
7575
<script>
76-
var body = document.querySelector('body');
7776
var sidebar = null;
7877
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
7978
if (document.body.clientWidth >= 1080) {
@@ -83,45 +82,25 @@
8382
sidebar = 'hidden';
8483
}
8584
sidebar_toggle.checked = sidebar === 'visible';
86-
body.classList.remove('sidebar-visible');
87-
body.classList.add("sidebar-" + sidebar);
85+
html.classList.remove('sidebar-visible');
86+
html.classList.add("sidebar-" + sidebar);
8887
</script>
8988

9089
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
91-
<div class="sidebar-scrollbox">
92-
<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"><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>
93-
</div>
90+
<!-- populated by js -->
91+
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
92+
<noscript>
93+
<iframe class="sidebar-iframe-outer" src="toc.html"></iframe>
94+
</noscript>
9495
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
9596
<div class="sidebar-resize-indicator"></div>
9697
</div>
9798
</nav>
9899

99-
<!-- Track and set sidebar scroll position -->
100-
<script>
101-
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
102-
sidebarScrollbox.addEventListener('click', function(e) {
103-
if (e.target.tagName === 'A') {
104-
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
105-
}
106-
}, { passive: true });
107-
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
108-
sessionStorage.removeItem('sidebar-scroll');
109-
if (sidebarScrollTop) {
110-
// preserve sidebar scroll position when navigating via links within sidebar
111-
sidebarScrollbox.scrollTop = sidebarScrollTop;
112-
} else {
113-
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
114-
var activeSection = document.querySelector('#sidebar .active');
115-
if (activeSection) {
116-
activeSection.scrollIntoView({ block: 'center' });
117-
}
118-
}
119-
</script>
120-
121100
<div id="page-wrapper" class="page-wrapper">
122101

123102
<div class="page">
124-
<div id="menu-bar-hover-placeholder"></div>
103+
<div id="menu-bar-hover-placeholder"></div>
125104
<div id="menu-bar" class="menu-bar sticky">
126105
<div class="left-buttons">
127106
<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">
@@ -197,6 +176,22 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
197176

198177
</div>
199178

179+
<!-- Livereload script (if served using the cli tool) -->
180+
<script>
181+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
182+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
183+
const socket = new WebSocket(wsAddress);
184+
socket.onmessage = function (event) {
185+
if (event.data === "reload") {
186+
socket.close();
187+
location.reload();
188+
}
189+
};
190+
191+
window.onbeforeunload = function() {
192+
socket.close();
193+
}
194+
</script>
200195

201196

202197

docs/Accessibility.html

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE HTML>
2-
<html lang="en" class="light" dir="ltr">
2+
<html lang="en" class="light sidebar-visible" dir="ltr">
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
66
<title>Accessibility - fltk book</title>
77

88

99
<!-- Custom HTML head -->
10-
10+
1111
<meta name="description" content="">
1212
<meta name="viewport" content="width=device-width, initial-scale=1">
1313
<meta name="theme-color" content="#ffffff">
@@ -30,15 +30,17 @@
3030

3131
<!-- Custom theme stylesheets -->
3232

33-
</head>
34-
<body class="sidebar-visible no-js">
35-
<div id="body-container">
33+
3634
<!-- Provide site root to javascript -->
3735
<script>
3836
var path_to_root = "";
3937
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
4038
</script>
41-
39+
<!-- Start loading toc.js asap -->
40+
<script src="toc.js"></script>
41+
</head>
42+
<body>
43+
<div id="body-container">
4244
<!-- Work around some values being stored in localStorage wrapped in quotes -->
4345
<script>
4446
try {
@@ -60,19 +62,16 @@
6062
var theme;
6163
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
6264
if (theme === null || theme === undefined) { theme = default_theme; }
63-
var html = document.querySelector('html');
65+
const html = document.documentElement;
6466
html.classList.remove('light')
6567
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");
6969
</script>
7070

7171
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
7272

7373
<!-- Hide / unhide sidebar before it is displayed -->
7474
<script>
75-
var body = document.querySelector('body');
7675
var sidebar = null;
7776
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
7877
if (document.body.clientWidth >= 1080) {
@@ -82,45 +81,25 @@
8281
sidebar = 'hidden';
8382
}
8483
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);
8786
</script>
8887

8988
<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>
9394
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
9495
<div class="sidebar-resize-indicator"></div>
9596
</div>
9697
</nav>
9798

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-
12099
<div id="page-wrapper" class="page-wrapper">
121100

122101
<div class="page">
123-
<div id="menu-bar-hover-placeholder"></div>
102+
<div id="menu-bar-hover-placeholder"></div>
124103
<div id="menu-bar" class="menu-bar sticky">
125104
<div class="left-buttons">
126105
<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
325304

326305
</div>
327306

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>
328323

329324

330325

0 commit comments

Comments
 (0)