This commit is contained in:
Jocelyn Fiat
2024-06-17 09:09:33 +02:00
commit 6dde6425c2
560 changed files with 81728 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
note
description: "Root class for testing jj_vision cluster."
author: "Jimmy J. Johnson"
date: "21 Apr 06"
class
JJ_VISION_TESTER
inherit
JJ_APPLICATION
redefine
target,
window_anchor
-- target_anchor
end
create
make_and_launch
feature -- Access
target: TEST_RECORD
-- For testing
feature {NONE} -- Implementation (anchors)
target_anchor: TEST_RECORD
-- Not to be called; just used to anchor types.
-- Declared as a feature to avoid adding an attribute.
require else
not_callable: False
do
check
do_not_call: False then
-- Because give no info; simply used as anchor.
end
end
window_anchor: TEST_MAIN_WINDOW
-- Anchor for the type of `first_window'
-- Not to be called; just used to anchor types.
-- Declared as a feature to avoid adding an attribute.
require else
not_callable: False
do
check
do_not_call: False then
-- Because give no info; simply used as anchor.
end
end
end

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-18-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-18-0 http://www.eiffel.com/developers/xml/configuration-1-18-0.xsd" name="jj_vision_tester" uuid="D018D768-B06C-4770-8A27-0AF374F698DF">
<target name="jj_vision_tester">
<root class="JJ_VISION_TESTER" feature="make_and_launch"/>
<option full_class_checking="false" is_attached_by_default="true" is_obsolete_routine_type="true" syntax="standard" manifest_array_type="mismatch_warning">
<assertions precondition="true"/>
</option>
<capability>
<concurrency support="none"/>
<void_safety use="all"/>
</capability>
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf">
<option>
<assertions precondition="true"/>
</option>
</library>
<library name="jj_temporal" location="$JJ_GITHUB\jj_temporal\jj_temporal.ecf" readonly="false">
<option>
<assertions precondition="true"/>
</option>
</library>
<library name="jj_vision" location="..\jj_vision.ecf" readonly="false">
<option>
<assertions precondition="true"/>
</option>
</library>
<library name="vision2" location="$ISE_LIBRARY\library\vision2\vision2.ecf">
<option>
<assertions precondition="true"/>
</option>
</library>
<library name="wel" location="$ISE_LIBRARY\library\wel\wel.ecf"/>
<cluster name="bitmaps" location="$JJ_GITHUB\jj_bitmaps\classes\" recursive="true"/>
<cluster name="tests" location=".\" recursive="true">
<file_rule>
<exclude>/.git$</exclude>
<exclude>/.svn$</exclude>
<exclude>/CVS$</exclude>
<exclude>/EIFGENs$</exclude>
</file_rule>
</cluster>
</target>
</system>

View File

@@ -0,0 +1,100 @@
note
description: "Objects that ..."
author: ""
date: "$Date: 2012-05-31 14:05:35 -0400 (Thu, 31 May 2012) $"
revision: "$Revision: 10 $"
class
TEST_MAIN_WINDOW
inherit
JJ_MAIN_WINDOW
redefine
create_interface_objects,
initialize,
target_imp,
set_target
end
create
default_create,
make
feature {NONE} -- Initialization
create_interface_objects
-- Create objects to be used by `Current' in `initialize'
-- Implemented by descendants to create attached objects
-- in order to adhere to void-safety due to the implementation bridge pattern.
do
Precursor {JJ_MAIN_WINDOW}
create first_tool
create second_tool
create edit_tool
create third_tool
create forth_tool
end
initialize
-- Set up the window
do
Precursor {JJ_MAIN_WINDOW}
-- split_manager.enable_mode_changes
split_manager.set_vertical
split_manager.extend_siblings (first_tool, edit_tool)
check attached {VERTICAL_SPLIT_VIEW} split_manager.last_view as sa1 then
split_manager.extend_siblings (third_tool, forth_tool)
check attached {VERTICAL_SPLIT_VIEW} split_manager.last_view as sa2 then
split_manager.set_horizontal
split_manager.extend_siblings (sa1, sa2)
end
end
-- split_manager.add_horizontal (split_manager.last_split, create {INTERFACE_TABLE_TOOL})
split_manager.enable_mode_changes
split_manager.select_view (first_tool)
end
feature -- Access
first_tool: TEXT_TOOL
-- To place a tool into the window for testing
edit_tool: EDIT_TOOL
-- Tool which manages the views for editting a record.
second_tool: TEST_TOOL
-- To place a second tool into the window for testing.
third_tool: TEST_TOOL
forth_tool: TEST_TOOL
feature -- Element change
set_target (a_target: like target)
-- Change the `target' and pass it to the `tree_tool'.
do
Precursor {JJ_MAIN_WINDOW} (a_target)
first_tool.set_target (a_target)
edit_tool.set_target (a_target)
-- edit_tool.set_schema (target.Default_schema)
edit_tool.draw
end
feature -- Status report
is_editor_tester_main_window_interface_initialized: BOOLEAN_REF
-- Have the interface items for this class been added to the `interface_table'?
once
create Result
-- is this needed?
end
feature {NONE} -- Implementation
target_imp: detachable TEST_RECORD
-- The object being edited
end

View File

@@ -0,0 +1,73 @@
note
description: "[
Used to test EDITOR classes.
]"
instructions: "[
]"
author: "Jimmy J. Johnson"
date: "7 Mar 03"
class
TEST_RECORD
inherit
-- JJ_SYSTEM
-- undefine
-- is_equal
-- redefine
-- default_create
-- end
EDITABLE
redefine
default_create,
Default_schema
end
create
default_create
feature {NONE} -- Initialization
default_create
-- Create an instance for testing
local
s: STRING -- data for testing
d: YMD_TIME -- data for testing
i: INTEGER
do
Precursor {EDITABLE}
create s.make_from_string ("this is a string for testing")
create d.set_now
extend_value (s, "string:")
extend_value (d, "date:")
extend_value (i, "number:")
set_schema (Default_schema)
end
feature -- Access
Default_schema: SCHEMA
-- Create a schema for testing
local
sf: STRING_FIELD
df: YMD_TIME_FIELD
int_f: INTEGER_FIELD
once
create Result
create sf
create df
create int_f
sf.set_label ("string:")
df.set_label ("date:")
int_f.set_label ("number:")
sf.set_y (75)
df.set_y (150)
int_f.set_y (225)
Result.extend (sf)
Result.extend (df)
Result.extend (int_f)
end
end

View File

@@ -0,0 +1,79 @@
note
description: "Objects that ..."
author: ""
date: "$Date: 2013-04-25 18:11:22 -0400 (Thu, 25 Apr 2013) $"
revision: "$Revision: 14 $"
class
TEST_TOOL
inherit
TOOL
redefine
create_interface_objects,
initialize,
build_tool_bars,
add_actions
-- view
end
create
default_create
feature {NONE} -- Initialization
create_interface_objects
-- Create objects to be used by `Current' in `initialize'
-- Implemented by descendants to create attached objects
-- in order to adhere to void-safety due to the implementation bridge pattern.
do
Precursor {TOOL}
create go_previous_button
create go_next_button
go_previous_button.set_pixmap (create {EV_PIXMAP}.make_with_pixel_buffer (Icon_shell_color_buffer))
go_previous_button.set_tooltip ("TEST_TOOL.go_previous_button")
go_next_button.set_pixmap (create {EV_PIXMAP}.make_with_pixel_buffer (Icon_shell_color_buffer))
go_next_button.set_tooltip ("TEST_TOOL.go_next_button")
create view.make ("Test String")
end
initialize
-- Build the interface for this window
do
Precursor {TOOL}
main_container.extend (view)
end
build_tool_bars
-- Create the two toolbars.
do
Precursor {TOOL}
-- Place buttons in toolbar
tool_bar.extend (go_previous_button)
tool_bar.extend (go_next_button)
tool_bar.extend (create {EV_HORIZONTAL_SEPARATOR})
end
add_actions
-- Add functionality to the buttons
do
Precursor {TOOL}
-- go_previous_button.select_actions.extend (agent on_go_previous_button_pressed)
-- go_next_button.select_actions.extend (agent on_go_next_button_pressed)
end
feature -- Access
view: JJ_MODEL_WORLD_CELL_VIEW
-- The view controlled by this tool
feature {NONE} -- Implementation
go_previous_button: EV_BUTTON --EV_TOOL_BAR_BUTTON
-- Button to move to previous record
go_next_button: EV_BUTTON --EV_TOOL_BAR_BUTTON
-- Button to move to next record
end