Skip to content

Commit

Permalink
Insert a new Chapter 5, to cover the order of opening panes.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fryatt committed Jun 15, 2022
1 parent fd8a021 commit 7d51cd8
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 7 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 @@ -320,7 +320,7 @@ ENDPROC</code>
</section>


<section>
<section id="sect-side-box-unex">
<title>Unexpected movement</title>

<p>There is one small problem with our application as it stands, though. In order to get the positions in the window stack correct we open the toolbox first, based on the position that we would be requesting that the Wimp would open the main window, then open the main window itself. However, if it isn&rsquo;t possible to open the window where we request, then the Wimp may open the window in a slightly different location. If this happens, it will result in the toolbox becoming &lsquo;detached&rsquo; from the main window.</p>
Expand Down Expand Up @@ -397,7 +397,7 @@ ENDPROC</code>

<download id="dl-side-box-2" file="SideBox2" title="Preventing the pane being detatched" compatibility="armv7"/>

<p>If you&rsquo;re looking at this code and wondering if we could avoid having to open the toolbox pane twice by doing things in a different order, the answer is that we can &ndash; but not in all situations. We&rsquo;ll stick to this universal approach for now, but return to the subject in a later chapter to investigate a possible optimisation and examine why it can&rsquo;t always be used!</p>
<p>If you&rsquo;re looking at this code and wondering if we could avoid having to open the toolbox pane twice by doing things in a different order, the answer is that we can &ndash; but not in all situations. We&rsquo;ll stick to this universal approach for now, but will return to the subject in <reference id="chap-order"/> in order to investigate a possible optimisation and examine why it can&rsquo;t always be used!</p>
</section>


Expand Down
59 changes: 59 additions & 0 deletions Chapters/ch05-does-order-matter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>

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

<!-- Copyright 2021-2022, 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 5
-
- Does Order Matter?
-->

<chapter id="chap-order">
<resources>
<images>Chapter05</images>
<downloads>Chapter05</downloads>
</resources>
<filename>does-order-matter.php</filename>
<uri>does-order-matter</uri>
<title>Does Order Matter?</title>

<summary>The order in which we open our windows can have some surprising effects &ndash; at least on some systems.</summary>

<section>
<p>So far, we&rsquo;ve seen how we can manually create one or more panes on our window, and have then behave in a number of distinct ways. Throughout the examples, however, the <function>PROChandle_pane_windows()</function> procedure has always called <swi>Wimp_OpenWindow</swi> for the different windows in a very specific order.</p>

<p>Back in <reference id="sect-side-box-unex"/> we stated that this order was necessary, but hinted that we might be able to simplify things in some circumstances. Now, with all of the main details covered, it seems like a good time to go back and fill in this missing information!</p>
</section>


<section>
<title>Re-creating our toolbar</title>


</section>
</chapter>
</manual>
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@

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

<!-- Chapter 5
<!-- Chapter 6
-
- The Nested Wimp
-->

<chapter id="chap-nest-wimp">
<resources>
<images>Chapter05</images>
<downloads>Chapter05</downloads>
<images>Chapter06</images>
<downloads>Chapter06</downloads>
</resources>
<filename>the-nested-wimp.php</filename>
<uri>the-nested-wimp</uri>
<title>The Nested Wimp</title>

<summary>It isn&rsquo;t necessary to do everything with panes by hand, so let&rsquo;s see how the Wimp can help us out. </summary>
<summary>It isn&rsquo;t necessary to do everything with panes by hand, so let&rsquo;s see how the Wimp can help us out.</summary>

<section>
<p>Over the past few chapters, we have explored how to use pane windows to add toolboxes and toolbars to our small application. It has been a fairly manual process: setting the windows up and then keeping everything in step whenever things move on screen.</p>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 2 additions & 1 deletion panes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<chapter file="ch02-a-side-toolbox.xml"/>
<chapter file="ch03-a-top-toolbar.xml"/>
<chapter file="ch04-column-headings.xml"/>
<chapter file="ch05-the-nested-wimp.xml"/>
<chapter file="ch05-does-order-matter.xml"/>
<chapter file="ch06-the-nested-wimp.xml"/>

</manual>

0 comments on commit 7d51cd8

Please sign in to comment.