Browse code
Finish the menus.
fiddlerwoaroof authored on 27/04/2016 07:46:37
Showing 2 changed files
Showing 2 changed files
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+note |
|
2 |
+ description: "Summary description for {MENU}." |
|
3 |
+ author: "" |
|
4 |
+ date: "$Date$" |
|
5 |
+ revision: "$Revision$" |
|
6 |
+ |
|
7 |
+class |
|
8 |
+ MENU |
|
9 |
+ |
|
10 |
+create |
|
11 |
+ make |
|
12 |
+ |
|
13 |
+feature |
|
14 |
+ parent: detachable MENU |
|
15 |
+ children: LINKED_LIST [MENU] |
|
16 |
+ title: STRING |
|
17 |
+ link: detachable STRING |
|
18 |
+ |
|
19 |
+ resolveLink: detachable STRING |
|
20 |
+ require |
|
21 |
+ parent /= void or link /= void |
|
22 |
+ do |
|
23 |
+ if attached link as a_link then |
|
24 |
+ Result := a_link |
|
25 |
+ elseif attached parent as a_parent then |
|
26 |
+ Result := a_parent.resolveLink |
|
27 |
+ end |
|
28 |
+ end |
|
29 |
+ |
|
30 |
+ setParent (newParent: MENU) |
|
31 |
+ do |
|
32 |
+ parent := newParent |
|
33 |
+ ensure |
|
34 |
+ parent = newParent |
|
35 |
+ end |
|
36 |
+ |
|
37 |
+ addChild (child: MENU) |
|
38 |
+ do |
|
39 |
+ children.put_front (child) |
|
40 |
+ end |
|
41 |
+ |
|
42 |
+feature {NONE} |
|
43 |
+ make (iTitle: STRING iLink: detachable STRING) |
|
44 |
+ do |
|
45 |
+ create children.make |
|
46 |
+ parent := void |
|
47 |
+ title := iTitle |
|
48 |
+ link := iLink |
|
49 |
+ end |
|
50 |
+end |
... | ... |
@@ -1,18 +1,24 @@ |
1 | 1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
2 | 2 |
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-15-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-15-0 http://www.eiffel.com/developers/xml/configuration-1-15-0.xsd" name="menus" uuid="B5FB2A21-2758-42AE-99DB-65DCBF047013"> |
3 | 3 |
<target name="menus"> |
4 |
- <root feature="make" class="APPLICATION"/> |
|
4 |
+ <root class="APPLICATION" feature="make"/> |
|
5 | 5 |
<option warning="true"> |
6 | 6 |
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/> |
7 | 7 |
</option> |
8 | 8 |
<setting name="console_application" value="true"/> |
9 |
- <precompile name="base_pre" location="$ISE_PRECOMP/base-safe.ecf"/> |
|
10 |
- <library name="base" location="$ISE_LIBRARY/library/base/base-safe.ecf"/> |
|
9 |
+ <precompile name="base_pre" location="$ISE_PRECOMP\base-safe.ecf"/> |
|
10 |
+ <library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/> |
|
11 | 11 |
<cluster name="menus" location=".\" recursive="true"> |
12 | 12 |
<file_rule> |
13 |
- <exclude>/EIFGENs$</exclude> |
|
14 | 13 |
<exclude>/.svn$</exclude> |
15 | 14 |
<exclude>/CVS$</exclude> |
15 |
+ <exclude>/EIFGENs$</exclude> |
|
16 |
+ </file_rule> |
|
17 |
+ <file_rule> |
|
18 |
+ <exclude>^menu$</exclude> |
|
19 |
+ </file_rule> |
|
20 |
+ <file_rule> |
|
21 |
+ <exclude>^menu$</exclude> |
|
16 | 22 |
</file_rule> |
17 | 23 |
</cluster> |
18 | 24 |
</target> |