diff --git a/Chapters/ch08-moving-the-furniture.xml b/Chapters/ch08-moving-the-furniture.xml index d2c0364..44f6b01 100644 --- a/Chapters/ch08-moving-the-furniture.xml +++ b/Chapters/ch08-moving-the-furniture.xml @@ -127,7 +127,7 @@ toolbar%!16 = main%!16 : REM Visible Area Y1 -

In practice, this specific instance does not matter too much: we’re still using visible area for aligning the X0 coordinates, so all that will happen is that we will include one pixel too many at the top end of the horizontal axis. The Wimp will clip this out for us, since child windows can’t extend outside of their parents, and there will be no visible effects. However it can have an effect in some situations, as we’ll see later on.

+

In practice, this specific instance does not matter too much: we’re still using visible area for aligning the X0 coordinates, so the horizontal work area coodinates for the two windows will be aligned and all that will happen is that we will include one pixel too many at the top end of the horizontal axis. The Wimp will clip this out for us, since child windows can’t extend outside of their parents, and there will be no visible effects. However it can have an effect in some situations, as we’ll see later on.

Before we call Wimp_OpenWindow, we will need to ensure that the horizontal extent of the toolbar is sufficient to allow it to extend across the full width of the main window’s work area and the window furniture. To achieve this we take the width of the main window’s work area (main%!52 - main%!44), then add on the width of the main window outline (main_outline%!12 - main_outline%!4) less the width of its visible area (main%!12 - main%!4)). This gives us the required horizontal extent.

@@ -231,7 +231,7 @@ ENDPROC -

One thing to note is that we haven’t had to change the band along the top of the work area of the main window, which allows for the area obscured by the bar. Even though the toolbar has pushed the main window’s vertical scroll bar down, the work area still extends up behind the child window in the same way that it did before.

+

One thing to note is that we haven’t had to change the band along the top of the work area of the main window, which allows for the area obscured by the bar. Even though the toolbar has pushed the main window’s vertical scroll bar down, the work area still extends up behind the child window in the same way that it did before. All that has changed is that the vertical scroll bar no longer extends across the full height of the window’s visible area.

The complete application can be found in .

diff --git a/Images/Chapter08/move-furniture-coordinates.png b/Images/Chapter08/move-furniture-coordinates.png index a57e800..e96b15f 100644 Binary files a/Images/Chapter08/move-furniture-coordinates.png and b/Images/Chapter08/move-furniture-coordinates.png differ