Added more comments and assertions to all classes; clean up

This commit is contained in:
severin
2014-03-19 16:49:24 +01:00
parent c5363c948c
commit 4e7e1e9c45
25 changed files with 223 additions and 83 deletions

View File

@@ -1,7 +1,7 @@
note
description: "[
WSF_NAVLIST_CONTROL encapsulates the linked items provided by bootstrap.
http://getbootstrap.com/components/#list-group-linked
This class encapsulates the linked items provided by bootstrap.
See http://getbootstrap.com/components/#list-group-linked
]"
author: ""
date: "$Date$"
@@ -23,6 +23,7 @@ create
feature {NONE} -- Initialization
make
-- Initialize
do
make_multi_control
add_class ("list-group")

View File

@@ -1,6 +1,6 @@
note
description: "[
WSF_NAVLIST_ITEM_CONTROL represents a menu item in WSF_NAVLIST_CONTROL
This class represents a menu item in WSF_NAVLIST_CONTROL.
]"
author: ""
date: "$Date$"
@@ -25,11 +25,14 @@ create
feature {NONE} -- Initialization
make (link, t: STRING_32)
-- Initialize with the given link and text
do
make_control ("a")
text := t
attributes := "href=%"" + link + "%"";
add_class ("list-group-item")
ensure
text_set: text = t
end
feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
@@ -53,7 +56,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
feature -- Change
set_active (a: BOOLEAN)
-- Set text of that button
-- Set whether this item should be displayed as active or not
do
if active /= a then
active := a
@@ -64,10 +67,14 @@ feature -- Change
end
state_changes.replace (create {JSON_BOOLEAN}.make_boolean (a), "active")
end
ensure
active_set: active = a
state_changes_registered: old active /= active implies state_changes.has_key ("active")
end
feature -- Properties
active: BOOLEAN
-- The active state of this item
end