Skip to content

Commit

Permalink
Complete Chapter 3, and add Chapter 4 placeholder.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fryatt committed Dec 26, 2021
1 parent 81ab8d3 commit d762034
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Chapters/ch02-a-side-toolbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ box_height% = toolbox%!16 - toolbox%!8 : REM Visible Area Maximum Y - Minimum Y

<image id="fig-side-box-pos-plane" file="side-box-pos-plane.png" title="The relationship between the main window and its toolbox" />

<p><reference id="fig-side-box-pos-plane"/> shows the relationship between the main window and its pane. The tops of the two windows (<maths>y1</maths> for the two visible areas) should be level, so we can copy the <maths>y1</maths> value from the main window to the pane. The bottom of the pane (its <maths>y0</maths>) is the height of the pane below the top of the main window.</p>
<p><reference id="fig-side-box-pos-plane"/> shows the relationship between the main window and its pane. The tops of the two windows (<maths>Y1</maths> for the two visible areas) should be level, so we can copy the <maths>Y1</maths> value from the main window to the pane. The bottom of the pane (its <maths>Y0</maths>) is the height of the pane below the top of the main window.</p>

<code lang="bbcbasic">toolbox%!16 = main%!16 : REM Visible Area Maximum Y
toolbox%!8 = main%!16 - box_height% : REM Visible Area Minimum Y</code>

<p>In a similar way, the right-hand side of the pane (its <maths>x1</maths>) is on the left-hand side of the main window, while its left-hand side is the width of the pane further to the left.</p>
<p>In a similar way, the right-hand side of the pane (its <maths>X1</maths>) is on the left-hand side of the main window, while its left-hand side is the width of the pane further to the left.</p>

<code lang="bbcbasic">toolbox%!12 = main%!4 : REM Visible Area Maximum X
toolbox%!4 = main%!4 - box_width% : REM Visible Area Minimum X</code>
Expand Down
86 changes: 66 additions & 20 deletions Chapters/ch03-a-top-toolbar.xml

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions Chapters/ch04-column-headings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>

<!DOCTYPE xmlmanual SYSTEM "../panes.dtd">

<!-- Copyright 2021, Stephen Fryatt (info@stevefryatt.org.uk)
-
- This file is part of Pane Tutorial:
-
- http://www.stevefryatt.org.uk/software/
-
- Licensed under the EUPL, Version 1.2 only (the "Licence");
- You may not use this work except in compliance with the
- Licence.
-
- You may obtain a copy of the Licence at:
-
- http://joinup.ec.europa.eu/software/page/eupl
-
- Unless required by applicable law or agreed to in
- writing, software distributed under the Licence is
- distributed on an "AS IS" basis, WITHOUT WARRANTIES
- OR CONDITIONS OF ANY KIND, either express or implied.
-
- See the Licence for the specific language governing
- permissions and limitations under the Licence.
-->

<manual xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xmldoc.xsd" version="1.8.6">

<!-- Chapter 4
-
- Column Headings
-->

<chapter id="chap-col-head">
<resources>
<images>Chapter04</images>
<downloads>Chapter04</downloads>
</resources>
<filename>column-headings.php</filename>
<uri>column-headings</uri>
<title>Column Headings</title>

<summary>So far our toolbar has ignored the main window contents; what if we want it to remain in step with the work area?</summary>

<section>
<p>An alternative to a toolbox at the side of a window, as we <reference id="chap-side-box">created in the last chapter</reference>, is a toolbar across the top of a window. Which to go for is more of a stylistic question than a technical one, and it&rsquo;s possible to have both at the same time. <cite>Ovation&nbsp;Pro</cite> does just this, as seen in <reference id="fig-top-bar-ovation"/>.</p>

<!--image id="fig-top-bar-ovation" file="top-bar-ovation.png" title="Ovation Pro has both a side toolbox and a toolbar at the same time."/ -->

<p>In this chapter, we&rsquo;ll add such a toolbar to our own window, to complement the existing toolbox.</p>


</section>
</chapter>
</manual>

24 changes: 24 additions & 0 deletions Downloads/Chapter03/TopBar4/!PaneDemo/!Boot,feb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
| >!Boot
|
| Copyright 2021, Stephen Fryatt (info@stevefryatt.org.uk)
|
| This file is part of PaneDemo:
|
| http://www.stevefryatt.org.uk/risc-os/panes
|
| Permission is hereby granted, free of charge, to any person obtaining
| a copy of this software and associated documentation files (the
| "Software"), to deal in the Software without restriction, including
| without limitation the rights to use, copy, modify, merge, publish,
| distribute, sublicense, and/or sell copies of the Software, and to
| permit persons to whom the Software is furnished to do so.
|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

If "<PaneDemo$Dir>"="" Then Set PaneDemo$Dir <Obey$Dir>
27 changes: 27 additions & 0 deletions Downloads/Chapter03/TopBar4/!PaneDemo/!Run,feb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
| >!Run
|
| Copyright 2021, Stephen Fryatt (info@stevefryatt.org.uk)
|
| This file is part of PaneDemo:
|
| http://www.stevefryatt.org.uk/risc-os/panes
|
| Permission is hereby granted, free of charge, to any person obtaining
| a copy of this software and associated documentation files (the
| "Software"), to deal in the Software without restriction, including
| without limitation the rights to use, copy, modify, merge, publish,
| distribute, sublicense, and/or sell copies of the Software, and to
| permit persons to whom the Software is furnished to do so.
|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Set PaneDemo$Dir <Obey$Dir>

WimpSlot -min 96K -max 96K
Run <PaneDemo$Dir>.!RunImage
Binary file not shown.
Binary file not shown.
Binary file added Images/Chapter03/top-bar-icon-resize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions panes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@
<chapter file="ch01-an-example-application.xml"/>
<chapter file="ch02-a-side-toolbox.xml"/>
<chapter file="ch03-a-top-toolbar.xml"/>
<chapter file="ch04-column-headings.xml"/>

</manual>

0 comments on commit d762034

Please sign in to comment.