Subversion Repositories Kolibri OS

Rev

Rev 9896 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. (*
  2.     Copyright 2016, 2021, 2023 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.  
  37. PROCEDURE initRect* (VAR Rect: tRect; left, top, width, height: INTEGER);
  38. BEGIN
  39.         Rect.left   := left;
  40.         Rect.top    := top;
  41.         Rect.width  := width;
  42.         Rect.height := height
  43. END initRect;
  44.  
  45.  
  46. PROCEDURE init* (VAR window: tWindow; left, top, width, height: INTEGER; caption: ARRAY OF CHAR);
  47. BEGIN
  48.         initRect(window, left, top, width, height);
  49.         window.created := FALSE;
  50.         window.dWidth  := 0;
  51.         window.dHeight := 0;
  52.         COPY(caption, window.caption)
  53. END init;
  54.  
  55.  
  56. END Window.
  57.