diff --git a/Chapters/ch02-a-side-toolbox.xml b/Chapters/ch02-a-side-toolbox.xml index 5773a59..58b1c30 100644 --- a/Chapters/ch02-a-side-toolbox.xml +++ b/Chapters/ch02-a-side-toolbox.xml @@ -320,7 +320,7 @@ ENDPROC -
+
Unexpected movement

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’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 ‘detached’ from the main window.

@@ -397,7 +397,7 @@ ENDPROC -

If you’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 – but not in all situations. We’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’t always be used!

+

If you’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 – but not in all situations. We’ll stick to this universal approach for now, but will return to the subject in in order to investigate a possible optimisation and examine why it can’t always be used!

diff --git a/Chapters/ch05-does-order-matter.xml b/Chapters/ch05-does-order-matter.xml new file mode 100644 index 0000000..36b453f --- /dev/null +++ b/Chapters/ch05-does-order-matter.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + +Chapter05 +Chapter05 + +does-order-matter.php +does-order-matter +Does Order Matter? + +The order in which we open our windows can have some surprising effects – at least on some systems. + +
+

So far, we’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 PROChandle_pane_windows() procedure has always called Wimp_OpenWindow for the different windows in a very specific order.

+ +

Back in 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!

+
+ + +
+Re-creating our toolbar + + +
+
+
\ No newline at end of file diff --git a/Chapters/ch05-the-nested-wimp.xml b/Chapters/ch06-the-nested-wimp.xml similarity index 99% rename from Chapters/ch05-the-nested-wimp.xml rename to Chapters/ch06-the-nested-wimp.xml index b201ec8..a9750c3 100644 --- a/Chapters/ch05-the-nested-wimp.xml +++ b/Chapters/ch06-the-nested-wimp.xml @@ -27,21 +27,21 @@ - -Chapter05 -Chapter05 +Chapter06 +Chapter06 the-nested-wimp.php the-nested-wimp The Nested Wimp -It isn’t necessary to do everything with panes by hand, so let’s see how the Wimp can help us out. +It isn’t necessary to do everything with panes by hand, so let’s see how the Wimp can help us out.

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.

diff --git a/Downloads/Chapter05/NestedFixed/!PaneDemo/!Boot,feb b/Downloads/Chapter06/NestedFixed/!PaneDemo/!Boot,feb similarity index 100% rename from Downloads/Chapter05/NestedFixed/!PaneDemo/!Boot,feb rename to Downloads/Chapter06/NestedFixed/!PaneDemo/!Boot,feb diff --git a/Downloads/Chapter05/NestedFixed/!PaneDemo/!Run,feb b/Downloads/Chapter06/NestedFixed/!PaneDemo/!Run,feb similarity index 100% rename from Downloads/Chapter05/NestedFixed/!PaneDemo/!Run,feb rename to Downloads/Chapter06/NestedFixed/!PaneDemo/!Run,feb diff --git a/Downloads/Chapter05/NestedFixed/!PaneDemo/!RunImage,ffb b/Downloads/Chapter06/NestedFixed/!PaneDemo/!RunImage,ffb similarity index 100% rename from Downloads/Chapter05/NestedFixed/!PaneDemo/!RunImage,ffb rename to Downloads/Chapter06/NestedFixed/!PaneDemo/!RunImage,ffb diff --git a/Downloads/Chapter05/NestedFixed/!PaneDemo/Templates,fec b/Downloads/Chapter06/NestedFixed/!PaneDemo/Templates,fec similarity index 100% rename from Downloads/Chapter05/NestedFixed/!PaneDemo/Templates,fec rename to Downloads/Chapter06/NestedFixed/!PaneDemo/Templates,fec diff --git a/Downloads/Chapter05/NestedScroll/!PaneDemo/!Boot,feb b/Downloads/Chapter06/NestedScroll/!PaneDemo/!Boot,feb similarity index 100% rename from Downloads/Chapter05/NestedScroll/!PaneDemo/!Boot,feb rename to Downloads/Chapter06/NestedScroll/!PaneDemo/!Boot,feb diff --git a/Downloads/Chapter05/NestedScroll/!PaneDemo/!Run,feb b/Downloads/Chapter06/NestedScroll/!PaneDemo/!Run,feb similarity index 100% rename from Downloads/Chapter05/NestedScroll/!PaneDemo/!Run,feb rename to Downloads/Chapter06/NestedScroll/!PaneDemo/!Run,feb diff --git a/Downloads/Chapter05/NestedScroll/!PaneDemo/!RunImage,ffb b/Downloads/Chapter06/NestedScroll/!PaneDemo/!RunImage,ffb similarity index 100% rename from Downloads/Chapter05/NestedScroll/!PaneDemo/!RunImage,ffb rename to Downloads/Chapter06/NestedScroll/!PaneDemo/!RunImage,ffb diff --git a/Downloads/Chapter05/NestedScroll/!PaneDemo/Templates,fec b/Downloads/Chapter06/NestedScroll/!PaneDemo/Templates,fec similarity index 100% rename from Downloads/Chapter05/NestedScroll/!PaneDemo/Templates,fec rename to Downloads/Chapter06/NestedScroll/!PaneDemo/Templates,fec diff --git a/Images/Chapter05/nest-wimp-anchor.png b/Images/Chapter06/nest-wimp-anchor.png similarity index 100% rename from Images/Chapter05/nest-wimp-anchor.png rename to Images/Chapter06/nest-wimp-anchor.png diff --git a/Images/Chapter05/nest-wimp-fixed.png b/Images/Chapter06/nest-wimp-fixed.png similarity index 100% rename from Images/Chapter05/nest-wimp-fixed.png rename to Images/Chapter06/nest-wimp-fixed.png diff --git a/Images/Chapter05/nest-wimp-flags.png b/Images/Chapter06/nest-wimp-flags.png similarity index 100% rename from Images/Chapter05/nest-wimp-flags.png rename to Images/Chapter06/nest-wimp-flags.png diff --git a/Images/Chapter05/nest-wimp-headings.png b/Images/Chapter06/nest-wimp-headings.png similarity index 100% rename from Images/Chapter05/nest-wimp-headings.png rename to Images/Chapter06/nest-wimp-headings.png diff --git a/Images/Chapter05/nest-wimp-paint.png b/Images/Chapter06/nest-wimp-paint.png similarity index 100% rename from Images/Chapter05/nest-wimp-paint.png rename to Images/Chapter06/nest-wimp-paint.png diff --git a/Images/Chapter05/nest-wimp-reminder.png b/Images/Chapter06/nest-wimp-reminder.png similarity index 100% rename from Images/Chapter05/nest-wimp-reminder.png rename to Images/Chapter06/nest-wimp-reminder.png diff --git a/Images/Chapter05/nest-wimp-template.png b/Images/Chapter06/nest-wimp-template.png similarity index 100% rename from Images/Chapter05/nest-wimp-template.png rename to Images/Chapter06/nest-wimp-template.png diff --git a/panes.xml b/panes.xml index 07f0fb1..206a9b5 100644 --- a/panes.xml +++ b/panes.xml @@ -74,6 +74,7 @@ - + +