2023-01-22 15:20:23 +01:00
|
|
|
(*
|
2023-02-01 14:36:55 +01:00
|
|
|
Copyright 2016, 2021, 2023 Anton Krotov
|
2023-01-22 15:20:23 +01:00
|
|
|
|
|
|
|
This file is part of fb2read.
|
|
|
|
|
|
|
|
fb2read is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
fb2read is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with fb2read. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*)
|
|
|
|
|
|
|
|
MODULE Window;
|
|
|
|
|
|
|
|
IMPORT S := Strings;
|
|
|
|
|
|
|
|
TYPE
|
|
|
|
|
2023-02-01 14:36:55 +01:00
|
|
|
tRect* = RECORD
|
|
|
|
left*, top*, width*, height* : INTEGER
|
|
|
|
END;
|
2023-01-22 15:20:23 +01:00
|
|
|
|
2023-02-01 14:36:55 +01:00
|
|
|
tWindow* = RECORD (tRect)
|
|
|
|
caption* : S.STRING;
|
|
|
|
created* : BOOLEAN;
|
|
|
|
dWidth*, dHeight* : INTEGER
|
|
|
|
END;
|
2023-01-22 15:20:23 +01:00
|
|
|
|
2023-02-01 14:36:55 +01:00
|
|
|
|
|
|
|
PROCEDURE initRect* (VAR Rect: tRect; left, top, width, height: INTEGER);
|
2023-01-22 15:20:23 +01:00
|
|
|
BEGIN
|
2023-02-01 14:36:55 +01:00
|
|
|
Rect.left := left;
|
|
|
|
Rect.top := top;
|
|
|
|
Rect.width := width;
|
|
|
|
Rect.height := height
|
|
|
|
END initRect;
|
|
|
|
|
|
|
|
|
|
|
|
PROCEDURE init* (VAR window: tWindow; left, top, width, height: INTEGER; caption: ARRAY OF CHAR);
|
2023-01-22 15:20:23 +01:00
|
|
|
BEGIN
|
2023-02-01 14:36:55 +01:00
|
|
|
initRect(window, left, top, width, height);
|
|
|
|
window.created := FALSE;
|
|
|
|
window.dWidth := 0;
|
|
|
|
window.dHeight := 0;
|
|
|
|
COPY(caption, window.caption)
|
|
|
|
END init;
|
2023-01-22 15:20:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
END Window.
|