|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 7884 (0x1ecc) Types: TextFile Names: »B«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─ ⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦306851c02⟧ └─⟦this⟧
separate (Puz_Main) procedure Reset is Width : S_Long; Height : S_Long; Box_X : S_Long; Box_Y : S_Long; Tile_Bg_Pixel : X_Pixel; begin ----Tile_Window is that portion of Puzzle_Root that contains -- the sliding pieces; Tile_Bg_Pixel := X_White_Pixel (Dpy, Screen); if Server_Bug then -- seems I need to do this, or the next title window will be obscured -- by the old title window! This must be a server bug, right? -- if "/=" (Title_Window, None_X_Window) then X_Unmap_Window (Dpy, Title_Window); end if; -- if (Title_Window) XDestroyWindow(dpy,Title_Window); */ end if; X_Destroy_Subwindows (Dpy, Puzzle_Root); -- fix the dimensions of Puzzle_Root so the height and width -- of the Tile_Window will work out to be multiples of Puzzle_Size; Tile_Height := (Puzzle_Win_Info.Height - Title_Win_Height - Boundary_Height) / Puzzle_Height; -- Puzzle_Win_Info.height := Tile_Height*Puzzle_Height+Title_Win_Height+Boundary_Height; Tile_Width := Puzzle_Win_Info.Width / Puzzle_Width; -- Puzzle_Win_Info.width := Tile_Width * Puzzle_Width; -- /** fixup the size of Puzzle_Root **/ -- XResizeWindow(dpy,Puzzle_Root,Puzzle_Win_Info.width,Puzzle_Win_Info.height); Old_Width := Puzzle_Win_Info.Width; Old_Height := Puzzle_Win_Info.Height; Tile_Win_Height := Puzzle_Win_Info.Height - Title_Win_Height; if not Geb_Server_Bug then Title_Window := X_Create_Simple_Window (Dpy, Puzzle_Root, 0, 0, U_Short (Puzzle_Win_Info.Width), U_Short (Title_Win_Height), 0, 0, Bg_Pixel); Tile_Window := X_Create_Simple_Window (Dpy, Puzzle_Root, 0, S_Short (Title_Win_Height + Boundary_Height), U_Short (Puzzle_Win_Info.Width), U_Short (Tile_Win_Height), 0, 0, Tile_Bg_Pixel); else declare Xswa : X_Set_Window_Attributes; begin Xswa.Background_Pixel := 0; Xswa.Border_Pixel := Bg_Pixel; Xswa.Event_Mask := X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True, others => False); Title_Window := X_Create_Window (Dpy, Puzzle_Root, 0, 0, U_Short (Puzzle_Win_Info.Width), U_Short (Title_Win_Height), 0, 0, Copy_From_Parent, Copy_From_Parent_Visual, (Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True, others => False), Xswa); Xswa.Background_Pixel := 0; Xswa.Border_Pixel := Tile_Bg_Pixel; Xswa.Event_Mask := X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True, others => False); Tile_Window := X_Create_Window (Dpy, Puzzle_Root, 0, S_Short (Title_Win_Height + Boundary_Height), U_Short (Puzzle_Win_Info.Width), U_Short (Tile_Win_Height), 0, 0, Copy_From_Parent, Copy_From_Parent_Visual, (Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True, others => False), Xswa); end; end if; Rect_Gc := X_Create_Gc (Dpy, Tile_Window.Drawable, None_X_Gc_Components, None_X_Gc_Values); X_Copy_Gc (Dpy, Gc, All_Gc_Components, Rect_Gc); X_Map_Window (Dpy, Title_Window); X_Map_Window (Dpy, Tile_Window); X_Sync (Dpy, False); Repaint_Bar; Repaint_Title (Title_Text); -- /** locate the two check boxes **/ Box_X := Text_X_Start / 2 - Box_Width / 2; Box_Y := Title_Win_Height / 2 - Box_Height / 2; if not Geb_Server_Bug then Scramble_Window := X_Create_Simple_Window (Dpy, Title_Window, S_Short (Box_X), S_Short (Box_Y), U_Short (Box_Width), U_Short (Box_Height), 1, Fg_Pixel, Bg_Pixel); else declare Xswa : X_Set_Window_Attributes; begin Xswa.Background_Pixel := Fg_Pixel; Xswa.Border_Pixel := Bg_Pixel; Xswa.Event_Mask := X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True, others => False); Scramble_Window := X_Create_Window (Dpy, Title_Window, S_Short (Box_X), S_Short (Box_Y), U_Short (Box_Width), U_Short (Box_Height), 1, 0, Copy_From_Parent, Copy_From_Parent_Visual, (Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True, others => False), Xswa); end; end if; Box_X := Puzzle_Win_Info.Width - Box_X - Box_Width; if not Geb_Server_Bug then Solve_Window := X_Create_Simple_Window (Dpy, Title_Window, S_Short (Box_X), S_Short (Box_Y), U_Short (Box_Width), U_Short (Box_Height), 1, Fg_Pixel, Bg_Pixel); else declare Xswa : X_Set_Window_Attributes; begin Xswa.Background_Pixel := Fg_Pixel; Xswa.Border_Pixel := Bg_Pixel; Xswa.Event_Mask := X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True, others => False); Solve_Window := X_Create_Window (Dpy, Title_Window, S_Short (Box_X), S_Short (Box_Y), U_Short (Box_Width), U_Short (Box_Height), 1, 0, Copy_From_Parent, Copy_From_Parent_Visual, (Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True, others => False), Xswa); end; end if; X_Map_Window (Dpy, Scramble_Window); X_Map_Window (Dpy, Solve_Window); X_Sync (Dpy, False); if not Geb_Server_Bug then X_Select_Input (Dpy, Title_Window, (Button_Press_Mask | Exposure_Mask => True, others => False)); X_Select_Input (Dpy, Tile_Window, (Button_Press_Mask | Exposure_Mask | Visibility_Change_Mask => True, others => False)); X_Select_Input (Dpy, Scramble_Window, (Button_Press_Mask | Exposure_Mask => True, others => False)); X_Select_Input (Dpy, Solve_Window, (Button_Press_Mask | Exposure_Mask => True, others => False)); end if; Repaint_Tiles; Repaint_Title (Title_Animated); Calculate_Speed; Calculate_Stepsize; X_Sync (Dpy, False); end Reset;