|
|
@ -47,13 +47,13 @@ function r2:buildEditBox(prop, textRef, entryType, multiLine, maxNumChars, onCha
|
|
|
|
bg_texture="grey_40.tga"
|
|
|
|
bg_texture="grey_40.tga"
|
|
|
|
onchange="lua" onchange_params="getUICaller():setupDisplayText(); getUICaller():find('edit_text'):updateCoords(); getUICaller():getEnclosingContainer().Env.updateSize()"
|
|
|
|
onchange="lua" onchange_params="getUICaller():setupDisplayText(); getUICaller():find('edit_text'):updateCoords(); getUICaller():getEnclosingContainer().Env.updateSize()"
|
|
|
|
onenter="lua" on_focus_lost="lua"]] ..
|
|
|
|
onenter="lua" on_focus_lost="lua"]] ..
|
|
|
|
[[ id= ]] .. strify(prop.Name) ..
|
|
|
|
[[ id= ]] .. strifyXml(prop.Name) ..
|
|
|
|
[[ text_ref = ]] .. strify(textRef) ..
|
|
|
|
[[ text_ref = ]] .. strifyXml(textRef) ..
|
|
|
|
[[ entry_type = ]] .. strify(entryType) ..
|
|
|
|
[[ entry_type = ]] .. strifyXml(entryType) ..
|
|
|
|
[[ multi_line = ]] .. strify(multiLine) ..
|
|
|
|
[[ multi_line = ]] .. strifyXml(multiLine) ..
|
|
|
|
[[ max_num_chars = ]] .. strify(maxNumChars) ..
|
|
|
|
[[ max_num_chars = ]] .. strifyXml(maxNumChars) ..
|
|
|
|
[[ params = ]] .. strify(onChangeAction) ..
|
|
|
|
[[ params = ]] .. strifyXml(onChangeAction) ..
|
|
|
|
[[ on_focus_lost_params = ]] .. strify(onFocusLostAction) ..
|
|
|
|
[[ on_focus_lost_params = ]] .. strifyXml(onFocusLostAction) ..
|
|
|
|
"/>"
|
|
|
|
"/>"
|
|
|
|
return result
|
|
|
|
return result
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -73,13 +73,13 @@ end
|
|
|
|
-- bg_texture="grey_40.tga"
|
|
|
|
-- bg_texture="grey_40.tga"
|
|
|
|
-- onchange="lua" onchange_params="getUICaller():setupDisplayText(); getUICaller():find('edit_text'):updateCoords(); getUICaller():getEnclosingContainer().Env.updateSize()"
|
|
|
|
-- onchange="lua" onchange_params="getUICaller():setupDisplayText(); getUICaller():find('edit_text'):updateCoords(); getUICaller():getEnclosingContainer().Env.updateSize()"
|
|
|
|
-- onenter="lua" on_focus_lost="lua"]] ..
|
|
|
|
-- onenter="lua" on_focus_lost="lua"]] ..
|
|
|
|
-- [[ id= ]] .. strify(prop.Name) ..
|
|
|
|
-- [[ id= ]] .. strifyXml(prop.Name) ..
|
|
|
|
-- [[ text_ref = ]] .. strify(textRef) ..
|
|
|
|
-- [[ text_ref = ]] .. strifyXml(textRef) ..
|
|
|
|
-- [[ entry_type = ]] .. strify(entryType) ..
|
|
|
|
-- [[ entry_type = ]] .. strifyXml(entryType) ..
|
|
|
|
-- [[ multi_line = ]] .. strify(multiLine) ..
|
|
|
|
-- [[ multi_line = ]] .. strifyXml(multiLine) ..
|
|
|
|
-- [[ max_num_chars = ]] .. strify(maxNumChars) ..
|
|
|
|
-- [[ max_num_chars = ]] .. strifyXml(maxNumChars) ..
|
|
|
|
-- [[ params = ]] .. strify(onChangeAction) ..
|
|
|
|
-- [[ params = ]] .. strifyXml(onChangeAction) ..
|
|
|
|
-- [[ on_focus_lost_params = ]] .. strify(onChangeAction) ..
|
|
|
|
-- [[ on_focus_lost_params = ]] .. strifyXml(onChangeAction) ..
|
|
|
|
-- [[ />
|
|
|
|
-- [[ />
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|
|
|
@ -1043,7 +1043,7 @@ r2.WidgetStyles.Number =
|
|
|
|
width1 = tmp
|
|
|
|
width1 = tmp
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local part0 = [[<TD width=]] .. strify(width0) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="80 80 80 127" height="0" align="left" valign="middle" id= "l_]] .. prop.Name .. [[" > ]]
|
|
|
|
local part0 = [[<TD width=]] .. strifyXml(width0) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="80 80 80 127" height="0" align="left" valign="middle" id= "l_]] .. prop.Name .. [[" > ]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local tooltipTextId, tooltipTextIdFound = buildPropTooltipName(className, prop.Name)
|
|
|
|
local tooltipTextId, tooltipTextIdFound = buildPropTooltipName(className, prop.Name)
|
|
|
@ -1051,7 +1051,7 @@ r2.WidgetStyles.Number =
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
instant_help="true"
|
|
|
|
instant_help="true"
|
|
|
|
tooltip=]] .. strify(tooltipTextId) .. ">"
|
|
|
|
tooltip=]] .. strifyXml(tooltipTextId) .. ">"
|
|
|
|
part0 = part0 .. buildCoverAllButton(prop)
|
|
|
|
part0 = part0 .. buildCoverAllButton(prop)
|
|
|
|
|
|
|
|
|
|
|
|
local color = "255 255 255 255"
|
|
|
|
local color = "255 255 255 255"
|
|
|
@ -1066,10 +1066,10 @@ r2.WidgetStyles.Number =
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
part0 = part0 .. [[ <view type="text" y="-2" sizeref="w" over_extend_view_text="true" over_extend_parent_rect="true"]] ..
|
|
|
|
part0 = part0 .. [[ <view type="text" y="-2" sizeref="w" over_extend_view_text="true" over_extend_parent_rect="true"]] ..
|
|
|
|
[[ id = ]] .. strify(prop.Name .. "_Caption") ..
|
|
|
|
[[ id = ]] .. strifyXml(prop.Name .. "_Caption") ..
|
|
|
|
[[ hardtext = ]] .. strify(hardText) ..
|
|
|
|
[[ hardtext = ]] .. strifyXml(hardText) ..
|
|
|
|
[[ color = ]] .. strify(color) ..
|
|
|
|
[[ color = ]] .. strifyXml(color) ..
|
|
|
|
[[ global_color=]] .. strify(globalColor) .. [[ fontsize="12" shadow="true" auto_clamp="true"/> ]]
|
|
|
|
[[ global_color=]] .. strifyXml(globalColor) .. [[ fontsize="12" shadow="true" auto_clamp="true"/> ]]
|
|
|
|
part0 = part0 .. "</group>"
|
|
|
|
part0 = part0 .. "</group>"
|
|
|
|
part0 = part0 .. "</TD>"
|
|
|
|
part0 = part0 .. "</TD>"
|
|
|
|
|
|
|
|
|
|
|
@ -1086,7 +1086,7 @@ r2.WidgetStyles.Number =
|
|
|
|
--
|
|
|
|
--
|
|
|
|
local widgetXml =
|
|
|
|
local widgetXml =
|
|
|
|
string.format([[
|
|
|
|
string.format([[
|
|
|
|
<group posref="TL TL" x="4" y="3" sizeref="w" w="-4" child_resize_h="true" child_resize_hmargin="3" id= ]] .. strify(prop.Name) .. ">" .. [[
|
|
|
|
<group posref="TL TL" x="4" y="3" sizeref="w" w="-4" child_resize_h="true" child_resize_hmargin="3" id= ]] .. strifyXml(prop.Name) .. ">" .. [[
|
|
|
|
<view type="bitmap" id="bk" posref="BL BL" scale="true" y="4" sizeref="w" h="2" texture="W_line_hor2.tga" />
|
|
|
|
<view type="bitmap" id="bk" posref="BL BL" scale="true" y="4" sizeref="w" h="2" texture="W_line_hor2.tga" />
|
|
|
|
<ctrl type="scroll" id="c" posparent="bk" posref="MM MM" x="0" y="-1" sizeref="w" h="12"
|
|
|
|
<ctrl type="scroll" id="c" posparent="bk" posref="MM MM" x="0" y="-1" sizeref="w" h="12"
|
|
|
|
vertical="false" align="L" tracksize="12"
|
|
|
|
vertical="false" align="L" tracksize="12"
|
|
|
@ -1136,14 +1136,14 @@ r2.WidgetStyles.Number =
|
|
|
|
local result =
|
|
|
|
local result =
|
|
|
|
[[
|
|
|
|
[[
|
|
|
|
<group type="combo_box" sizeref="w" w="-2" x="2" y="0" child_resize_h="true" child_resize_hmargin="10" linked_to_db="false" posref="TL TL" id=]]
|
|
|
|
<group type="combo_box" sizeref="w" w="-2" x="2" y="0" child_resize_h="true" child_resize_hmargin="10" linked_to_db="false" posref="TL TL" id=]]
|
|
|
|
.. strify(prop.Name) ..
|
|
|
|
.. strifyXml(prop.Name) ..
|
|
|
|
string.format([[ on_change="lua" on_change_params="if getUICaller().parent.Env.Locked ~= true then r2:requestSetObjectProperty('%s', getUICaller().selection) end"]], prop.Name) ..
|
|
|
|
string.format([[ on_change="lua" on_change_params="if getUICaller().parent.Env.Locked ~= true then r2:requestSetObjectProperty('%s', getUICaller().selection) end"]], prop.Name) ..
|
|
|
|
">"
|
|
|
|
">"
|
|
|
|
result = result .. [[<instance template="combo_box_def1" />]]
|
|
|
|
result = result .. [[<instance template="combo_box_def1" />]]
|
|
|
|
-- append enumerated values
|
|
|
|
-- append enumerated values
|
|
|
|
|
|
|
|
|
|
|
|
for k, v in pairs(prop.Enum) do
|
|
|
|
for k, v in pairs(prop.Enum) do
|
|
|
|
result = result .. [[<combo_text name="]] .. tostring(v) .. [[" />]]
|
|
|
|
result = result .. [[<combo_text name=]] .. strifyXml(tostring(v)) .. [[ />]]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
result = result .. "</group>"
|
|
|
|
result = result .. "</group>"
|
|
|
|
return result, setter
|
|
|
|
return result, setter
|
|
|
@ -1201,10 +1201,10 @@ function r2:createPropertyXmlTable(props, className, posparent, posref, x, y, wi
|
|
|
|
result = result .. value
|
|
|
|
result = result .. value
|
|
|
|
end
|
|
|
|
end
|
|
|
|
add([[<group type="table" sizeparent="parent"]] ..
|
|
|
|
add([[<group type="table" sizeparent="parent"]] ..
|
|
|
|
[[ posparent= ]] .. strify(posparent) ..
|
|
|
|
[[ posparent= ]] .. strifyXml(posparent) ..
|
|
|
|
[[ posref= ]] .. strify(posref) ..
|
|
|
|
[[ posref= ]] .. strifyXml(posref) ..
|
|
|
|
[[ x= ]] .. strify(x) ..
|
|
|
|
[[ x= ]] .. strifyXml(x) ..
|
|
|
|
[[ y= ]] .. strify(y) ..
|
|
|
|
[[ y= ]] .. strifyXml(y) ..
|
|
|
|
[[ id="prop_table" sizeref="w" width="100%" border="0" bgcolor="0 0 0 255"
|
|
|
|
[[ id="prop_table" sizeref="w" width="100%" border="0" bgcolor="0 0 0 255"
|
|
|
|
cellspacing="1"
|
|
|
|
cellspacing="1"
|
|
|
|
cellpadding="0"
|
|
|
|
cellpadding="0"
|
|
|
@ -1249,18 +1249,18 @@ function r2:createPropertyXmlTable(props, className, posparent, posref, x, y, wi
|
|
|
|
|
|
|
|
|
|
|
|
local part0
|
|
|
|
local part0
|
|
|
|
if not captionXmlDesc then
|
|
|
|
if not captionXmlDesc then
|
|
|
|
part0 = [[<TD width=]] .. strify(width0) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="80 80 80 127" height="0" align="left" valign="middle" id= "l_]] .. prop.Name .. [[" > ]]
|
|
|
|
part0 = [[<TD width=]] .. strifyXml(width0) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="80 80 80 127" height="0" align="left" valign="middle" id= "l_]] .. prop.Name .. [[" > ]]
|
|
|
|
|
|
|
|
|
|
|
|
part0 = part0 .. [[<group id="caption_group" sizeref="w" child_resize_h="true" posref="ML ML"
|
|
|
|
part0 = part0 .. [[<group id="caption_group" sizeref="w" child_resize_h="true" posref="ML ML"
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
instant_help="true"
|
|
|
|
instant_help="true"
|
|
|
|
tooltip=]] .. strify(tooltipTextId) .. ">"
|
|
|
|
tooltip=]] .. strifyXml(tooltipTextId) .. ">"
|
|
|
|
part0 = part0 .. [[ <view type="text" y="-2" sizeref="w" over_extend_view_text="true" over_extend_parent_rect="true"]] ..
|
|
|
|
part0 = part0 .. [[ <view type="text" y="-2" sizeref="w" over_extend_view_text="true" over_extend_parent_rect="true"]] ..
|
|
|
|
[[ id = ]] .. strify(prop.Name .. "_Caption") ..
|
|
|
|
[[ id = ]] .. strifyXml(prop.Name .. "_Caption") ..
|
|
|
|
[[ hardtext = ]] .. strify(hardText) ..
|
|
|
|
[[ hardtext = ]] .. strifyXml(hardText) ..
|
|
|
|
[[ color = ]] .. strify(color) ..
|
|
|
|
[[ color = ]] .. strifyXml(color) ..
|
|
|
|
[[ global_color=]] .. strify(globalColor) .. [[ fontsize="12" shadow="true" auto_clamp="true"/> ]]
|
|
|
|
[[ global_color=]] .. strifyXml(globalColor) .. [[ fontsize="12" shadow="true" auto_clamp="true"/> ]]
|
|
|
|
part0 = part0 .. "</group>"
|
|
|
|
part0 = part0 .. "</group>"
|
|
|
|
part0 = part0 .. "</TD>"
|
|
|
|
part0 = part0 .. "</TD>"
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1268,13 +1268,13 @@ function r2:createPropertyXmlTable(props, className, posparent, posref, x, y, wi
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- build the widget
|
|
|
|
-- build the widget
|
|
|
|
local part1 = [[<TD width=]] .. strify(width1) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="64 64 64 127" height="0" align="left" valign="middle" id= "r_]] .. prop.Name .. [[" > ]]
|
|
|
|
local part1 = [[<TD width=]] .. strifyXml(width1) .. [[ ignore_max_width="true" ignore_min_width="true" bgcolor="64 64 64 127" height="0" align="left" valign="middle" id= "r_]] .. prop.Name .. [[" > ]]
|
|
|
|
part1 = part1 .. [[<group id="widget_group" sizeref="w" child_resize_h="true" posref="ML ML"
|
|
|
|
part1 = part1 .. [[<group id="widget_group" sizeref="w" child_resize_h="true" posref="ML ML"
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_parent="win"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
tooltip_posref="auto"
|
|
|
|
tooltip_posref_alt="TL TR"
|
|
|
|
tooltip_posref_alt="TL TR"
|
|
|
|
instant_help="true"
|
|
|
|
instant_help="true"
|
|
|
|
tooltip=]] .. strify(tooltipTextId) .. ">"
|
|
|
|
tooltip=]] .. strifyXml(tooltipTextId) .. ">"
|
|
|
|
part1 = part1 .. widgetXmlDesc .. [[</group></TD>]]
|
|
|
|
part1 = part1 .. widgetXmlDesc .. [[</group></TD>]]
|
|
|
|
|
|
|
|
|
|
|
|
if invertWidget then
|
|
|
|
if invertWidget then
|
|
|
@ -1397,15 +1397,15 @@ function r2:buildPropRolloutXml(caption, id, posparent, posref, props, className
|
|
|
|
-- add the rollout bar
|
|
|
|
-- add the rollout bar
|
|
|
|
if not isForm then
|
|
|
|
if not isForm then
|
|
|
|
result = result ..
|
|
|
|
result = result ..
|
|
|
|
[[ <instance template="rollout_bar" caption=]] .. strify(caption) ..
|
|
|
|
[[ <instance template="rollout_bar" caption=]] .. strifyXml(caption) ..
|
|
|
|
[[ color=]] .. strify(color) ..
|
|
|
|
[[ color=]] .. strifyXml(color) ..
|
|
|
|
[[ global_color=]] .. strify(globalColor) ..
|
|
|
|
[[ global_color=]] .. strifyXml(globalColor) ..
|
|
|
|
[[ content_name="prop_table"/> ]]
|
|
|
|
[[ content_name="prop_table"/> ]]
|
|
|
|
else
|
|
|
|
else
|
|
|
|
result = result ..
|
|
|
|
result = result ..
|
|
|
|
[[ <instance template="form_bar" caption=]] .. strify(caption) ..
|
|
|
|
[[ <instance template="form_bar" caption=]] .. strifyXml(caption) ..
|
|
|
|
[[ color=]] .. strify(color) ..
|
|
|
|
[[ color=]] .. strifyXml(color) ..
|
|
|
|
[[ global_color=]] .. strify(globalColor) ..
|
|
|
|
[[ global_color=]] .. strifyXml(globalColor) ..
|
|
|
|
[[ /> ]]
|
|
|
|
[[ /> ]]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -1475,9 +1475,9 @@ function r2:buildPropertySheetXml(class, className, id, title, isForm)
|
|
|
|
if isForm then -- for forms, closing the form is equivalent to clicking on 'cancel'
|
|
|
|
if isForm then -- for forms, closing the form is equivalent to clicking on 'cancel'
|
|
|
|
add(' resizer="true" ')
|
|
|
|
add(' resizer="true" ')
|
|
|
|
local w = defaulting(class.Width, 500)
|
|
|
|
local w = defaulting(class.Width, 500)
|
|
|
|
add(' pop_min_w=' .. strify(w))
|
|
|
|
add(' pop_min_w=' .. strifyXml(w))
|
|
|
|
add(' pop_max_w=' .. strify(w))
|
|
|
|
add(' pop_max_w=' .. strifyXml(w))
|
|
|
|
add(' w=' .. strify(w))
|
|
|
|
add(' w=' .. strifyXml(w))
|
|
|
|
local cancelCode =
|
|
|
|
local cancelCode =
|
|
|
|
[[ local form = getUICaller()
|
|
|
|
[[ local form = getUICaller()
|
|
|
|
if form.Env.Choice == nil then
|
|
|
|
if form.Env.Choice == nil then
|
|
|
@ -1518,7 +1518,7 @@ function r2:buildPropertySheetXml(class, className, id, title, isForm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add([[id=]] .. strify(id) .. [[
|
|
|
|
add([[id=]] .. strifyXml(id) .. [[
|
|
|
|
>]])
|
|
|
|
>]])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1647,7 +1647,7 @@ function r2:buildPropertySheetXml(class, className, id, title, isForm)
|
|
|
|
</group> <!-- enclosing -->
|
|
|
|
</group> <!-- enclosing -->
|
|
|
|
</group> <!-- content -->
|
|
|
|
</group> <!-- content -->
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<tree node=]] .. strify(id) .. [[ >
|
|
|
|
<tree node=]] .. strifyXml(id) .. [[ >
|
|
|
|
</tree>
|
|
|
|
</tree>
|
|
|
|
]])
|
|
|
|
]])
|
|
|
|
|
|
|
|
|
|
|
|