moved wizard under tools/estudio_wizard

This commit is contained in:
2015-03-05 16:01:45 +01:00
parent b26504b4a1
commit f81e5251e8
64 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_BOOLEAN_QUESTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
GRAPHICAL_WIZARD_BOOLEAN_QUESTION
inherit
WIZARD_BOOLEAN_QUESTION
undefine
make
end
GRAPHICAL_WIZARD_QUESTION
create
make
convert
text: {STRING_32},
widget: {EV_WIDGET}
feature {NONE} -- Implementation
initialize
local
b: EV_VERTICAL_BOX
l_field: like input_widget
lab: EV_LABEL
do
create b
b.set_padding_width (5)
create l_field.make_with_text (title)
b.extend (l_field)
b.disable_item_expand (l_field)
if attached description as desc then
create lab.make_with_text (desc)
apply_field_description_style (lab)
append_indented_widget (lab, b)
end
input_widget := l_field
widget := b
end
feature -- Access: UI
widget: EV_VERTICAL_BOX
input_widget: EV_CHECK_BUTTON
feature -- Conversion
text: STRING_32
do
if input_widget.is_selected then
Result := "yes"
else
Result := "no"
end
end
value: BOOLEAN
do
Result := input_widget.is_selected
end
feature -- Element change
set_title (t: READABLE_STRING_GENERAL)
do
create title.make_from_string_general (t)
input_widget.set_text (t)
end
set_text (t: detachable READABLE_STRING_GENERAL)
do
if t = Void then
set_value (False)
else
set_value (t.is_case_insensitive_equal ("yes"))
end
end
set_value (b: BOOLEAN)
do
if b then
input_widget.enable_select
else
input_widget.disable_select
end
end
end

View File

@@ -0,0 +1,102 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_DIRECTORY_QUESTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
GRAPHICAL_WIZARD_DIRECTORY_QUESTION
inherit
WIZARD_DIRECTORY_QUESTION
undefine
make
end
GRAPHICAL_WIZARD_QUESTION
create
make
convert
text: {STRING_32},
widget: {EV_WIDGET}
feature {NONE} -- Initialization
initialize
local
b: EV_VERTICAL_BOX
lab: EV_LABEL
l_field: like input_widget
do
create b
b.set_padding_width (5)
create lab.make_with_text (title)
title_widget := lab
apply_text_style (lab)
b.extend (lab)
b.disable_item_expand (lab)
create l_field.make
l_field.set_browse_for_directory
input_widget := l_field
b.extend (l_field)
b.disable_item_expand (l_field)
if attached description as desc then
create lab.make_with_text (desc)
apply_field_description_style (lab)
append_indented_widget (lab, b)
end
widget := b
end
feature -- Access: UI
widget: EV_VERTICAL_BOX
input_widget: EV_PATH_FIELD
title_widget: detachable EV_LABEL
feature -- Conversion
text: STRING_32
do
Result := input_widget.text
end
value: detachable PATH
do
Result := input_widget.file_path
end
feature -- Element change
set_text (t: detachable READABLE_STRING_GENERAL)
do
if t = Void then
set_value (Void)
else
set_value (create {PATH}.make_from_string (t))
end
end
set_default_start_path (p: PATH)
do
input_widget.set_default_start_path (p)
end
set_value (p: like value)
do
if p = Void then
input_widget.set_text ("")
else
input_widget.set_text (p.name)
end
end
end

View File

@@ -0,0 +1,55 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_INPUT_FIELD}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
GRAPHICAL_WIZARD_INPUT_FIELD
inherit
WIZARD_INPUT_FIELD
GRAPHICAL_WIZARD_STYLER
GRAPHICAL_WIZARD_PAGE_ITEM
feature -- Access
item_id: detachable READABLE_STRING_8
-- Optional id to identify related page item.
do
Result := id
end
feature -- Conversion
data: detachable ANY
do
Result := widget.data
end
feature -- Element change
set_data (d: like data)
do
widget.set_data (d)
end
feature {NONE} -- Implementation
append_cell_to (a_size: INTEGER; a_container: EV_BOX)
local
cl: EV_CELL
do
create cl
if attached {EV_HORIZONTAL_BOX} a_container then
cl.set_minimum_width (a_size)
else
cl.set_minimum_height (a_size)
end
a_container.extend (cl)
a_container.disable_item_expand (cl)
end
end

View File

@@ -0,0 +1,107 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_INTEGER_QUESTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
GRAPHICAL_WIZARD_INTEGER_QUESTION
inherit
WIZARD_INTEGER_QUESTION
undefine
make
end
GRAPHICAL_WIZARD_QUESTION
create
make
convert
text: {STRING_32},
widget: {EV_WIDGET}
feature {NONE} -- Initialization
initialize
local
b: EV_VERTICAL_BOX
lab: EV_LABEL
l_field: like input_widget
do
create b
b.set_padding_width (5)
create lab.make_with_text (title)
title_widget := lab
apply_text_style (lab)
b.extend (lab)
b.disable_item_expand (lab)
create l_field
input_widget := l_field
b.extend (l_field)
b.disable_item_expand (l_field)
if attached description as desc then
create lab.make_with_text (desc)
apply_field_description_style (lab)
append_indented_widget (lab, b)
end
set_validation (agent (pg: WIZARD_PAGE)
do
if not text.is_integer then
pg.report_error ("Invalid value for field ["+ id +"]: must be an integer!")
end
end
)
widget := b
end
feature -- Access: UI
widget: EV_VERTICAL_BOX
input_widget: EV_TEXT_FIELD
title_widget: detachable EV_LABEL
feature -- Conversion
text: STRING_32
do
Result := input_widget.text
end
value: INTEGER
do
if
attached text as l_text and then
l_text.is_integer
then
Result := l_text.to_integer
end
end
feature -- Element change
set_text (t: detachable READABLE_STRING_GENERAL)
do
if t = Void then
set_value (0)
elseif t.is_integer then
set_value (t.to_integer)
else
-- ignore !
end
end
set_value (v: INTEGER)
do
input_widget.set_text (v.out)
end
end

View File

@@ -0,0 +1,40 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_PAGE_WIDGET}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
GRAPHICAL_WIZARD_PAGE_WIDGET
inherit
GRAPHICAL_WIZARD_PAGE_ITEM
create
make_with_widget
feature {NONE} -- Initialization
make_with_widget (w: like widget)
do
widget := w
end
feature -- Access
item_id: detachable READABLE_STRING_8
-- Optional id to identify related page item.
feature -- Element change
set_item_id (a_id: like item_id)
-- Set `item_id' to `a_id'.
do
item_id := a_id
end
feature -- Conversion
widget: EV_WIDGET
end

View File

@@ -0,0 +1,57 @@
note
description: "Summary description for {GRAPHICAL_WIZARD_QUESTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
GRAPHICAL_WIZARD_QUESTION
inherit
WIZARD_QUESTION
redefine
make
end
GRAPHICAL_WIZARD_INPUT_FIELD
rename
make as make_field
undefine
make_field
end
feature {NONE} -- Initialization
make (a_id: like id; a_title: READABLE_STRING_GENERAL; a_optional_description: detachable READABLE_STRING_GENERAL)
-- Create field identified by `a_id', with title `a_title'
-- and optional description `a_optional_description'.
do
Precursor (a_id, a_title, a_optional_description)
initialize
end
initialize
deferred
ensure
widget_created: widget /= Void
end
feature {NONE} -- Implementation
append_indented_widget (w: EV_WIDGET; a_container: EV_BOX)
local
lab: EV_LABEL
hb: EV_HORIZONTAL_BOX
do
create hb
append_cell_to (20, hb)
hb.extend (w)
hb.disable_item_expand (w)
a_container.extend (hb)
a_container.disable_item_expand (hb)
end
end

View File

@@ -0,0 +1,92 @@
note
description: "Summary description for {GWIZARD_STRING_QUESTION}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
GRAPHICAL_WIZARD_STRING_QUESTION
inherit
WIZARD_STRING_QUESTION
undefine
make
end
GRAPHICAL_WIZARD_QUESTION
create
make
convert
text: {STRING_32},
widget: {EV_WIDGET}
feature {NONE} -- Initialization
initialize
local
b: EV_VERTICAL_BOX
lab: EV_LABEL
l_field: like input_widget
do
create b
b.set_padding_width (5)
create lab.make_with_text (title)
title_widget := lab
apply_text_style (lab)
b.extend (lab)
b.disable_item_expand (lab)
create l_field
input_widget := l_field
b.extend (l_field)
b.disable_item_expand (l_field)
if attached description as desc then
create lab.make_with_text (desc)
apply_field_description_style (lab)
append_indented_widget (lab, b)
end
widget := b
end
feature -- Access: UI
widget: EV_VERTICAL_BOX
input_widget: EV_TEXT_FIELD
title_widget: detachable EV_LABEL
feature -- Conversion
text: STRING_32
do
Result := input_widget.text
end
value: detachable STRING_32
do
Result := text
end
feature -- Element change
set_text (t: detachable READABLE_STRING_GENERAL)
do
set_value (t)
end
set_value (v: detachable READABLE_STRING_GENERAL)
do
if v = Void then
input_widget.set_text ("")
else
input_widget.set_text (v)
end
end
end