Initial implementation with Hooks, Regions and Templates
Updated Modules to support hooks, still work in progress.
This commit is contained in:
@@ -29,13 +29,22 @@ feature -- status report
|
||||
end
|
||||
|
||||
is_expanded: BOOLEAN
|
||||
-- Is expanded and visually expanded?
|
||||
deferred
|
||||
end
|
||||
|
||||
is_collapsed: BOOLEAN
|
||||
-- Is expanded, but visually collapsed?
|
||||
deferred
|
||||
ensure
|
||||
Result implies is_expandable
|
||||
end
|
||||
|
||||
is_expandable: BOOLEAN
|
||||
-- Is expandable?
|
||||
deferred
|
||||
end
|
||||
|
||||
|
||||
has_children: BOOLEAN
|
||||
deferred
|
||||
end
|
||||
|
||||
@@ -40,6 +40,12 @@ feature -- Status report
|
||||
Result := is_expandable and then internal_is_expanded
|
||||
end
|
||||
|
||||
is_collapsed: BOOLEAN
|
||||
-- Is expanded, but visually collapsed?
|
||||
do
|
||||
Result := is_expandable and then internal_is_collapsed
|
||||
end
|
||||
|
||||
is_expandable: BOOLEAN
|
||||
do
|
||||
Result := internal_is_expandable or internal_is_expanded or has_children
|
||||
@@ -58,6 +64,8 @@ feature -- Status report
|
||||
|
||||
internal_is_expanded: BOOLEAN
|
||||
|
||||
internal_is_collapsed: BOOLEAN
|
||||
|
||||
feature -- Element change
|
||||
|
||||
add_link (lnk: CMS_LINK)
|
||||
@@ -90,11 +98,24 @@ feature -- Element change
|
||||
children := lst
|
||||
end
|
||||
|
||||
|
||||
set_expanded (b: like is_expanded)
|
||||
do
|
||||
if b then
|
||||
set_expandable (True)
|
||||
set_collapsed (False)
|
||||
end
|
||||
internal_is_expanded := b
|
||||
end
|
||||
|
||||
set_collapsed (b: like is_collapsed)
|
||||
do
|
||||
if b then
|
||||
set_expanded (False)
|
||||
end
|
||||
internal_is_collapsed := b
|
||||
end
|
||||
|
||||
set_expandable (b: like is_expandable)
|
||||
do
|
||||
internal_is_expandable := b
|
||||
|
||||
Reference in New Issue
Block a user