Toolbox_ShowObject child windows

Christian Ludlam christian at recoil.org
Wed Nov 28 18:00:43 GMT 2007


Hi,

The window module is capable of embedding a window in a parent given
appropriate flags to Toolbox_ShowObject. Here's one way of supporting this in
OSLib - it creates a new structure, toolbox_child, identical to toolbox_full
but adding the child window fields, and a definition for the new show flag.

I haven't been able to test this, do you not support building under RISC OS
any more?

--- Toolbox 2007-11-28 17:18:54.0 +0000
+++ ToolboxNew 2007-11-28 17:18:54.0 +0000
@@ -14,10 +14,14 @@
          specifying a position",
    Toolbox_Full = .Struct (OS_Box: visible, .Int: xscroll, .Int: yscroll,
          Wimp_W: next) "One way of specifying a position",
+   Toolbox_Child = .Struct (OS_Box: visible, .Int: xscroll, .Int: yscroll,
+         Wimp_W: next, Wimp_WindowFlags: flags, Wimp_W: parent, 
+         Wimp_WindowNestingFlags: linkage) "One way of specifying a position",
    Toolbox_Position =
       .Union
       (  OS_Coord: top_left,
-         Toolbox_Full: full "A distributed union for each object type"
+         Toolbox_Full: full "A distributed union for each object type",
+         Toolbox_Child: child
       ) "One way of specifying a position";
 
 CONST
@@ -206,8 +210,9 @@
 //   )  );
 
 TYPE Toolbox_ShowFlags = .Bits;
-CONST Toolbox_ShowAsMenu = Toolbox_ShowFlags: 1,
-   Toolbox_ShowAsSubMenu = Toolbox_ShowFlags: 2;
+CONST Toolbox_ShowAsMenu     = Toolbox_ShowFlags: 1,
+   Toolbox_ShowAsSubMenu     = Toolbox_ShowFlags: 2,
+   Toolbox_ShowAsChildWindow = Toolbox_ShowFlags: 4;
 SWI Toolbox_ShowObject =
    (  NUMBER 0x44EC3 "Shows an object on the screen",
       ENTRY


-- 
Christian Ludlam
christian at recoil.org



More information about the oslib-user mailing list