Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. (*
  2.     Copyright 2016, 2021 Anton Krotov
  3.  
  4.     This file is part of fb2read.
  5.  
  6.     fb2read is free software: you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation, either version 3 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     fb2read is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with fb2read. If not, see <http://www.gnu.org/licenses/>.
  18. *)
  19.  
  20. MODULE Window;
  21.  
  22. IMPORT S := Strings;
  23.  
  24. TYPE
  25.  
  26.   TRect* = RECORD
  27.     Left*, Top*, Width*, Height* : INTEGER
  28.   END;
  29.  
  30.   TWindow* = RECORD (TRect)
  31.     Caption*             : S.STRING;
  32.     Created*             : BOOLEAN;
  33.     dWidth*, dHeight*    : INTEGER
  34.   END;
  35.  
  36. PROCEDURE InitWindow*(VAR Window: TWindow; Left, Top, Width, Height: INTEGER; Caption: ARRAY OF CHAR);
  37. BEGIN
  38.   Window.Left    := Left;
  39.   Window.Top     := Top;
  40.   Window.Width   := Width;
  41.   Window.Height  := Height;
  42.   Window.Created := FALSE;
  43.   Window.dWidth  := 0;
  44.   Window.dHeight := 0;
  45.   COPY(Caption, Window.Caption)
  46. END InitWindow;
  47.  
  48.  
  49. PROCEDURE InitRect*(VAR Rect: TRect; Left, Top, Width, Height: INTEGER);
  50. BEGIN
  51.   Rect.Left   := Left;
  52.   Rect.Top    := Top;
  53.   Rect.Width  := Width;
  54.   Rect.Height := Height
  55. END InitRect;
  56.  
  57.  
  58. END Window.
  59.