Files
EWF/examples/desktop_app/src/desktop_app.e
Jocelyn Fiat 4b497060a0 Added an example to embed EWF nino service into a Vision2 desktop application.
This is locally consumed via the embedded web browser component.
2014-04-10 15:28:19 +02:00

72 lines
1.7 KiB
Plaintext

note
description: "Objects that represent the Vision2 application.%
%The original version of this class has been generated by EiffelBuild."
generator: "EiffelBuild"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2012-09-29 01:29:13 +0200 (sam., 29 sept. 2012) $"
revision: "$Revision: 89488 $"
class
DESKTOP_APP
inherit
EV_APPLICATION
create
make_and_launch
feature {NONE} -- Initialization
make_and_launch
-- Create `Current', build and display `main_window',
-- then launch the application.
local
l_win: like main_window
l_embeded_services: APP_EMBEDDED_WEB_SERVICE
do
default_create
create l_win.make
main_window := l_win
l_win.show
create l_embeded_services.make
l_embeded_services.set_port_number (0) -- Use first available port number
l_embeded_services.on_launched_actions.force (agent on_web_service_launched (l_win))
l_embeded_services.request_exit_operation_actions.force (agent on_quit)
l_embeded_services.launch
launch
end
on_quit
do
if attached main_window as win then
win.destroy_and_exit_if_last
end
end
on_web_service_launched (a_win: attached like main_window)
do
add_idle_action_kamikaze (agent a_win.open_link)
end
feature {NONE} -- Implementation
main_window: detachable MAIN_WINDOW
-- Main window of `Current'
;note
copyright: "Copyright (c) 1984-2009, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end