! 概要:

WebBrowser は,Microsoft の Shell Doc Object およびコントロールライブラリ(SHDOCVW.DLL)の Web ブラウザ機能へのアクセスを提供します。

アプリケーションにインターネット,ファイル,ネットワークの参照機能や,ドキュメント表示機能,データのダウンロード機能を追加したりできます。

注意:WebBrowser は SHDOCVW.DLL をラップするので,SHDOCVW.DLL をインストールしておかないと,このコンポーネントを使うことができません。この DLL は,InternetExplorer 4 以降に付属しています。

警告:IE のセキュリティホールを承継する可能性がある(?)。これを使う場合には、MSのセキュリティパッチで最新版にしておく必要があるだろう。SHDOCVW.DLL を書き換えるウィルスもあるようだ(http://www.mcafeesecurity.com/japan/security/virK2002.asp?v=W32/Kilonce.b.worm )。

 require "phi"
 require "webbrowser"
 form = Phi::Form.new
 wb = Phi::WebBrowser.new form
 wb.navigate("http://www.moriq.com/apollo/index.html")
 wb.align = Phi::AL_CLIENT
 form.show
 Phi.mainloop

{{attach_view(1.png)}}

! メソッド

 require "phi"
 require "webbrowser"
 require "methods_for_wiki"
 puts Phi::WebBrowser.methods_for_wiki

!! _dump                 => [[Phi::Component#_dump]]
!! action                => [[Phi::Control#action]]
!! action=               => [[Phi::Control#action=]]
!! action_change         => [[Phi::WinControl#action_change]]
!! address_bar
!! address_bar=
!! adjust_client_rect    => [[Phi::WinControl#adjust_client_rect]]
!! adjust_size           => [[Phi::WinControl#adjust_size]]
!! adjusted_client_rect  => [[Phi::WinControl#adjusted_client_rect]]
!! align                 => [[Phi::Control#align]]
!! align=                => [[Phi::Control#align=]]
!! align_controls        => [[Phi::WinControl#align_controls]]
!! align_disabled        => [[Phi::WinControl#align_disabled]]
!! align_disabled?       => [[Phi::WinControl#align_disabled?]]
!! assign_to             => [[Phi::WinControl#assign_to]]
!! begin_drag            => [[Phi::Control#begin_drag]]
!! bevel_width           => [[Phi::WinControl#bevel_width]]
!! bevel_width=          => [[Phi::WinControl#bevel_width=]]
!! border_width          => [[Phi::WinControl#border_width]]
!! border_width=         => [[Phi::WinControl#border_width=]]
!! bottom                => [[Phi::Control#bottom]]
!! bottom=               => [[Phi::Control#bottom=]]
!! bring_to_front        => [[Phi::Control#bring_to_front]]
!! busy?
!! can_auto_size         => [[Phi::WinControl#can_auto_size]]
!! can_focus             => [[Phi::WinControl#can_focus]]
!! can_resize            => [[Phi::WinControl#can_resize]]
!! change_scale          => [[Phi::WinControl#change_scale]]
!! client_origin         => [[Phi::WinControl#client_origin]]
!! client_rect           => [[Phi::WinControl#client_rect]]
!! client_to_screen      => [[Phi::Control#client_to_screen]]
!! component_count       => [[Phi::Component#component_count]]
!! components            => [[Phi::Component#components]]
!! constrained_resize    => [[Phi::WinControl#constrained_resize]]
!! contains_control      => [[Phi::WinControl#contains_control]]
!! control_at            => [[Phi::WinControl#control_at]]
!! control_at_pos        => [[Phi::WinControl#control_at_pos]]
!! control_count         => [[Phi::WinControl#control_count]]
!! control_extents       => [[Phi::WinControl#control_extents]]
!! control_state         => [[Phi::Control#control_state]]
!! control_state=        => [[Phi::Control#control_state=]]
!! control_style         => [[Phi::Control#control_style]]
!! control_style=        => [[Phi::Control#control_style=]]
!! controls              => [[Phi::WinControl#controls]]
!! controls_aligned      => [[Phi::WinControl#controls_aligned]]
!! create_handle         => [[Phi::WinControl#create_handle]]
!! create_wnd            => [[Phi::WinControl#create_wnd]]
!! ctl3d                 => [[Phi::WinControl#ctl3d]]
!! ctl3d=                => [[Phi::WinControl#ctl3d=]]
!! ctl3d?                => [[Phi::WinControl#ctl3d?]]
!! cursor                => [[Phi::Control#cursor]]
!! cursor=               => [[Phi::Control#cursor=]]
!! custom_align_insert_before  => [[Phi::WinControl#custom_align_insert_before]]
!! def_wnd_proc=         => [[Phi::WinControl#def_wnd_proc=]]
!! define_properties     => [[Phi::WinControl#define_properties]]
!! destroy_handle        => [[Phi::WinControl#destroy_handle]]
!! destroy_window_handle  => [[Phi::WinControl#destroy_window_handle]]
!! destroy_wnd           => [[Phi::WinControl#destroy_wnd]]
!! device_context        => [[Phi::WinControl#device_context]]
!! disable_align         => [[Phi::WinControl#disable_align]]
!! dock_client_count     => [[Phi::WinControl#dock_client_count]]
!! dock_drop             => [[Phi::WinControl#dock_drop]]
!! dock_site             => [[Phi::WinControl#dock_site]]
!! dock_site=            => [[Phi::WinControl#dock_site=]]
!! dock_site?            => [[Phi::WinControl#dock_site?]]
!! double_buffered       => [[Phi::WinControl#double_buffered]]
!! double_buffered=      => [[Phi::WinControl#double_buffered=]]
!! drag_cursor
!! drag_cursor=
!! drag_mode
!! drag_mode=
!! enable_align          => [[Phi::WinControl#enable_align]]
!! event_handle
!! extend                => [[Phi::Persistent#extend]]
!! find_child_control    => [[Phi::WinControl#find_child_control]]
!! find_next_control     => [[Phi::WinControl#find_next_control]]
!! fixup_tab_list        => [[Phi::WinControl#fixup_tab_list]]
!! flip_children         => [[Phi::WinControl#flip_children]]
!! focused               => [[Phi::WinControl#focused]]
!! focused?              => [[Phi::WinControl#focused?]]
!! full_name
!! full_screen
!! full_screen=
!! go_back
!! go_forward
!! go_home
!! go_search
!! handle                => [[Phi::Control#handle]]
!! handle_allocated      => [[Phi::WinControl#handle_allocated]]
!! handle_needed         => [[Phi::WinControl#handle_needed]]
!! height                => [[Phi::Control#height]]
!! height=               => [[Phi::Control#height=]]
!! help_context          => [[Phi::Control#help_context]]
!! help_context=         => [[Phi::Control#help_context=]]
!! help_keyword          => [[Phi::Control#help_keyword]]
!! help_keyword=         => [[Phi::Control#help_keyword=]]
!! help_type             => [[Phi::Control#help_type]]
!! help_type=            => [[Phi::Control#help_type=]]
!! hide                  => [[Phi::Control#hide]]
!! hint                  => [[Phi::Control#hint]]
!! hint=                 => [[Phi::Control#hint=]]
!! ime_mode              => [[Phi::WinControl#ime_mode]]
!! ime_mode=             => [[Phi::WinControl#ime_mode=]]
!! ime_name              => [[Phi::WinControl#ime_name]]
!! ime_name=             => [[Phi::WinControl#ime_name=]]
!! insert_control        => [[Phi::WinControl#insert_control]]
!! invalidate            => [[Phi::Control#invalidate]]
!! key_press             => [[Phi::WinControl#key_press]]
!! left                  => [[Phi::Control#left]]
!! left=                 => [[Phi::Control#left=]]
!! location_name
!! location_url
!! menu_bar
!! menu_bar=
!! name
!! name=                 => [[Phi::Control#name=]]
!! navigate
!! navigate2
!! offline
!! offline=
!! on_before_navigate
!! on_before_navigate2
!! on_before_navigate2=
!! on_before_navigate=
!! on_command_state_change
!! on_command_state_change=
!! on_context_popup      => [[Phi::Control#on_context_popup]]
!! on_context_popup=     => [[Phi::Control#on_context_popup=]]
!! on_document_complete
!! on_document_complete=
!! on_download_begin
!! on_download_begin=
!! on_download_complete
!! on_download_complete=
!! on_drag_drop
!! on_drag_drop=
!! on_drag_over
!! on_drag_over=
!! on_end_drag
!! on_end_drag=
!! on_enter
!! on_enter=
!! on_exit
!! on_exit=
!! on_full_screen
!! on_full_screen=
!! on_menu_bar
!! on_menu_bar=
!! on_navigate_complete
!! on_navigate_complete2
!! on_navigate_complete2=
!! on_navigate_complete=
!! on_new_window2
!! on_new_window2=
!! on_progress_change
!! on_progress_change=
!! on_property_change
!! on_property_change=
!! on_quit
!! on_quit=
!! on_start_drag
!! on_start_drag=
!! on_status_bar
!! on_status_bar=
!! on_status_text_change
!! on_status_text_change=
!! on_theater_mode
!! on_theater_mode=
!! on_title_change
!! on_title_change=
!! on_tool_bar
!! on_tool_bar=
!! on_visible
!! on_visible=
!! paint_controls        => [[Phi::WinControl#paint_controls]]
!! paint_window          => [[Phi::WinControl#paint_window]]
!! palette_changed       => [[Phi::WinControl#palette_changed]]
!! parent                => [[Phi::Control#parent]]
!! parent=               => [[Phi::Control#parent=]]
!! parent_ctl3d          => [[Phi::WinControl#parent_ctl3d]]
!! parent_ctl3d=         => [[Phi::WinControl#parent_ctl3d=]]
!! parent_ctl3d?         => [[Phi::WinControl#parent_ctl3d?]]
!! parent_form           => [[Phi::Control#parent_form]]
!! parent_handle         => [[Phi::WinControl#parent_handle]]
!! parent_show_hint
!! parent_show_hint=
!! parent_show_hint?
!! parent_window         => [[Phi::WinControl#parent_window]]
!! parent_window=        => [[Phi::WinControl#parent_window=]]
!! path
!! perform               => [[Phi::Control#perform]]
!! popup_menu
!! popup_menu=
!! prop_info             => [[Phi::Component#prop_info]]
!! read_state            => [[Phi::WinControl#read_state]]
!! ready_state
!! realign               => [[Phi::WinControl#realign]]
!! recreate_wnd          => [[Phi::WinControl#recreate_wnd]]
!! rect                  => [[Phi::Control#rect]]
!! rect=                 => [[Phi::Control#rect=]]
!! refresh
!! refresh2
!! register_as_browser
!! register_as_browser=
!! register_as_drop_target
!! register_as_drop_target=
!! reload_docked_control  => [[Phi::WinControl#reload_docked_control]]
!! remove_control        => [[Phi::WinControl#remove_control]]
!! repaint               => [[Phi::Control#repaint]]
!! reset_ime             => [[Phi::WinControl#reset_ime]]
!! resizable
!! resizable=
!! right                 => [[Phi::Control#right]]
!! right=                => [[Phi::Control#right=]]
!! scale_by              => [[Phi::WinControl#scale_by]]
!! scale_controls        => [[Phi::WinControl#scale_controls]]
!! screen_to_client      => [[Phi::Control#screen_to_client]]
!! scroll_by             => [[Phi::WinControl#scroll_by]]
!! select_first          => [[Phi::WinControl#select_first]]
!! select_next           => [[Phi::WinControl#select_next]]
!! send_to_back          => [[Phi::Control#send_to_back]]
!! set_bounds            => [[Phi::Control#set_bounds]]
!! set_child_order       => [[Phi::WinControl#set_child_order]]
!! set_focus             => [[Phi::WinControl#set_focus]]
!! set_ime               => [[Phi::WinControl#set_ime]]
!! set_z_order           => [[Phi::WinControl#set_z_order]]
!! show                  => [[Phi::Control#show]]
!! show_control          => [[Phi::WinControl#show_control]]
!! show_hint
!! show_hint=
!! show_hint?
!! showing               => [[Phi::WinControl#showing]]
!! showing?              => [[Phi::WinControl#showing?]]
!! silent
!! silent=
!! site_info             => [[Phi::WinControl#site_info]]
!! status_bar
!! status_bar=
!! status_text
!! status_text=
!! stop_align            => [[Phi::WinControl#stop_align]]
!! tab_order
!! tab_order=
!! tab_order_list        => [[Phi::WinControl#tab_order_list]]
!! tab_stop              => [[Phi::WinControl#tab_stop]]
!! tab_stop=             => [[Phi::WinControl#tab_stop=]]
!! tab_stop?             => [[Phi::WinControl#tab_stop?]]
!! theater_mode
!! theater_mode=
!! tool_bar
!! tool_bar=
!! top                   => [[Phi::Control#top]]
!! top=                  => [[Phi::Control#top=]]
!! top_parent_handle     => [[Phi::WinControl#top_parent_handle]]
!! update                => [[Phi::Control#update]]
!! update_control_state  => [[Phi::WinControl#update_control_state]]
!! use_dock_manager      => [[Phi::WinControl#use_dock_manager]]
!! use_dock_manager=     => [[Phi::WinControl#use_dock_manager=]]
!! use_dock_manager?     => [[Phi::WinControl#use_dock_manager?]]
!! visible
!! visible=
!! visible_dock_client_count  => [[Phi::WinControl#visible_dock_client_count]]
!! width                 => [[Phi::Control#width]]
!! width=                => [[Phi::Control#width=]]
!! window_handle         => [[Phi::WinControl#window_handle]]
!! window_handle=        => [[Phi::WinControl#window_handle=]]
!! write_res_file        => [[Phi::Component#write_res_file]]