Extend documentation

This commit is contained in:
hassany
2014-03-12 21:51:15 +01:00
parent 4f7086a6de
commit c5363c948c
3 changed files with 18 additions and 6 deletions

View File

@@ -211,7 +211,7 @@ feature -- Properties
control_name_prefix: STRING_32 assign set_control_name_prefix
-- Used to avoid name conflicts since the children stateful controls of stateless controls are appended to the parent
-- control state and therefore could have the same name
-- control state and therefore could have the same name (Stateless multi controls do not add a hierarchy level)
set_control_name_prefix (p: STRING_32)
-- Set the control name prefix

View File

@@ -1,5 +1,8 @@
note
description: "Summary description for {WSF_DYNAMIC_MULTI_CONTROL}."
description: "[
Dynamic Mutli controls are multicontrols in which the subcontrols can be added or removed
on a callback. This is achived by ''serializing'' the subcrontrols using the tag array.
]"
author: ""
date: "$Date$"
revision: "$Revision$"
@@ -125,10 +128,13 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
feature
create_control_from_tag (tag: STRING_32): detachable G
-- This function should return a control based on the tag string. The output of this function
-- should only be based on the tag argument.
deferred
end
add_control_from_tag (tag: STRING_32)
-- Adds a control based on the tag
local
item: WSF_JSON_OBJECT
do

View File

@@ -55,6 +55,8 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
end
load_subcontrol_state (newstate: JSON_OBJECT)
-- load the new state in to the subcontrols
-- If the subcontrol is a stateless multicontrol x. We load the controls_state in to the subcontrols of x directly. (Stateless multi controls do not add a hierarchy level)
do
across
controls as c
@@ -86,6 +88,8 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
end
read_subcontrol_state (controls_state: JSON_OBJECT)
-- Read add subcontrol state in to the controls_state json object.
-- If the subcontrol is a stateless multicontrol x. We add the state of the subcontrols of x directly to controls_state. (Stateless multi controls do not add a hierarchy level)
do
across
controls as c
@@ -99,7 +103,7 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
end
read_state_changes (states: WSF_JSON_OBJECT)
-- Read states_changes in subcontrols
-- Read states_changes in subcontrols and add them to the states json object under `control name > "controls"
local
sub_states: WSF_JSON_OBJECT
control_state: WSF_JSON_OBJECT
@@ -118,15 +122,17 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- State management
end
end
read_subcontrol_state_changes (states: WSF_JSON_OBJECT)
read_subcontrol_state_changes (sub_states: WSF_JSON_OBJECT)
-- Read add subcontrol changes in to the sub_states json object.
-- If the subcontrol is a stateless multicontrol x. We add the state changes of subcontrols of x directly to sub_states. (Stateless multi controls do not add a hierarchy level)
do
across
controls as c
loop
if attached {WSF_STATELESS_MULTI_CONTROL [WSF_STATELESS_CONTROL]} c.item as cont then
cont.read_subcontrol_state_changes (states)
cont.read_subcontrol_state_changes (sub_states)
elseif attached {WSF_CONTROL} c.item as cont then
cont.read_state_changes (states)
cont.read_state_changes (sub_states)
end
end
end