1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
-- Copyright (C) 1999 Daniel Elphick and others
-- Licensed under Eiffel Forum Freeware License, version 1;
-- (see forum.txt)
--
indexing
description: "This class writes the TOP_LEVEL_WINDOWS class"
author: "Oliver Elphick <olly@lfix.co.uk>"
date: "31 October 1999"
cvs: "$Id: top_level_class_writer.e,v 1.5 2001/01/09 15:04:57 elphick Exp $"
class TOP_LEVEL_CLASS_WRITER
inherit
CLASS_WRITER
rename
widget_tree as interface
redefine
write_inherit, write_creation
end
creation
make
feature
name: STRING is "GTK-Interface"
root_features: LINKED_LIST[CAN_BE_CREATED]
inherit_from: STRING is "GTK_APPLICATION%N%N%TTOP_LEVEL_WINDOWS%N%N%TCUSTOMISATION"
make(interface_tree: TAG_TREE; r: LINKED_LIST[CAN_BE_CREATED];
src: STRING) is
-- Writes all the source files
require
valid_r: r /= Void
valid_interface: interface_tree /= Void
valid_src: src /= Void and then not src.is_empty
do
src_dir := src
generate_name("TOP_LEVEL_WINDOWS", False)
interface := interface_tree
root_features := r
ensure
interface /= Void
root_features /= Void
end
write_features is
local
i: INTEGER
code: ARRAY[STRING]
do
from
i := root_features.lower
variant
root_features.count - i
until
i > root_features.upper
loop
!!code.make(0,-1);
(root_features @ i).append_top_level_definition(code)
write_lines(code)
i := i + 1
end
end
write_make_body is
do
end
write_inherit is
do
end
write_creation is
do
end
end -- TOP_LEVEL_CLASS_WRITER
|