Outer Windows == Description == HOP windows are window managed either by the client window manager (//native// windows) or by the client web Browser (//inner// windows). Native windows can only be used to display complete documents. Inner windows can be used to display partial documents. == Synopsis == === Client === (tab-open arg ...) (window-open arg ...) (window-close [win]) (window-raise win) (window-resize win width height) (window-iconify win) (window-maximize win) (window-x win) (window-x-set! win int) (window-y win) (window-y-set! win int) (window-width win) (window-width-set! win int) (window-height win) (window-height-set! win int) (window-title win) (window-title-set! win title) === Requirements === Documents using //windows// need to load the script ++hop-window.js++. They also might want to load the ++hop-window.hss++ style sheet. Hence, documents using //windows// must include in their header, the following statement: ( :include "hop-window") ~~ Alternative window themes may be loaded. For instance, to load the //red// them, use: ( :include "hop-window" "hop-window-red") ~~ Windows can be //globally// configured by copying the file ++hop-window-red.hss++ into the ++,(hop-rc-directory)/hss/hop-window.hss++ file. When present this file is loaded //after// the regular ++hop-window.hss++. == Examples == window == Client Definitions == === ++(tab-open src)++ === tab-open ^ arguments ^ type ^ description ^ | :src | obj | the content material. | This function creates a new browser tab. === ++(window-open :id :src :parent :title :class ...)++ === window-open ^ arguments ^ type ^ description ^ | :src | obj | the content material. | | :id | string | an optional identifier. | | :title | string | a title. | | :parent | false or obj | an optional parent for the new window. | | :class | string | the CSS class. | | :width | integer | the optional width. | | :height | integer | the optional height. | | :left | integer | the optional X coordinate. | | :top | integer | the optional Y coordinate. | | :background | color | an optional background color. | | :toolbar | bool | shows a toolbar. | | :scrollbars | bool | shows scrollbars. | | :status | bool | shows a status bar. | | :menubar | bool | shows a menu bar. | | :resizable | bool | enables resize. | | :titlebar | bool | shows a title bar. | | :location | bool | shows location information. | | :clip | bool | clip inner windows. | | :prop | string | a window property. | If the optional argument ++:parent++ is present then an //inner// window is created. Otherwise a //native// window is opened. ==== Inner Windows ==== Inner windows cannot be detached from the main browser window. The content of the window, given by the ++:src++ argument, can either be a ,( "service" "service.wiki"), a URL or any HTML tree. The optional argument ++:background++ (also aliases ++:bg++) is effective. The arguments ++:toolbar++, ++:status++, ++:menubar++, ++:titlebar++, and ++:location++ are ignored. ~~ Each time a window title is clicked, its raised to the front of all windows. For that, they use CSS ++z-index++ that varies from 0 to 999. Applications that have to display elements in the top of Iwindows must specify a ++z-index++ greater than 1000. ~~ Inner windows are provided with attributes that control their dynamic behaviors: * ++onclose++: a procedure of zero argument that is invoked after the window is closed. * ++onresize++: a procedure of zero argument that is invoked after the window is resized. * ++resizable++: a boolean that controls whether a window can be resized using GUI events. The inner windows react to the following events: * ++iconify++: an event raised when an inner window is about to be iconified. * ++maximize++: an event raised when an inner window is about to be maximized. * ++close++: an event raised when an inner window is about to be closed. * ++raise++: an event raised when an inner window is about to be raised. * ++resize++: an event raised when an inner window has been resized. * ++drag++: an event raised when an inner window has been dragged. If the listener associated to ++iconify++, ++maximize++, ++close++, and ++raise++ prevent propagation, the default action is not executed. ==== Native Windows ==== Native windows are independent from the main browser window. The content of the window, given by the ++:src++ argument, can either be a ,( "service" "service.wiki") or a URL. The optional argument ++:background++ is ineffective. The arguments ++:toolbar++, ++:status++, ++:menubar++, ++:resizable++, ++:titlebar++, and ++:location++ are effective. In addition the ++:prop++ arguments is used to specified verbatim properties, that is the string value argument following the ++:prop++ keyword is append, //as is//, to the property string of the built window. === ++(window-close [obj])++ === window-close ^ arguments ^ type ^ description ^ | obj | obj | A window identifier or a window. | ~~ This client-side procedure closes a //window//. === ++(window-raise [obj])++ === window-raise ^ arguments ^ type ^ description ^ | obj | obj | A window identifier or a window. | ~~ This client-side procedure raises a //window//. === ++(window-iconify [obj])++ === window-iconify ^ arguments ^ type ^ description ^ | obj | obj | A window identifier or a window. | ~~ This client-side procedure iconifies a //window//. === ++(window-resize obj width height)++ === window-resize ^ arguments ^ type ^ description ^ | obj | obj | A window identifier or a window. | | width | dimension | new window width. | | height | dimension | new window height. | ~~ This client-side procedure resizes a //window//. === ++(window-maximize [obj])++ === window-maximize ^ arguments ^ type ^ description ^ | obj | obj | A window identifier or a window. | ~~ This client-side procedure maximizes a //window//. === ++(window-x win)++ === === ++(window-x-set! win x)++ === === ++(window-y win)++ === === ++(window-y-set! win y)++ === === ++(window-width win)++ === === ++(window-width-set! win width)++ === === ++(window-height win)++ === === ++(window-height-set! win height)++ === window-x window-x-set! window-y window-y-set! window-width window-width-set! window-height window-height-set! ^ arguments ^ type ^ description ^ | win | obj | A window identifier or a window. | The arguments ++x++, ++y++, ++width++, and ++height++ are dimensions. === ++(window-title win)++ === === ++(window-title-set! win title)++ === window-title window-title-set! ^ arguments ^ type ^ description ^ | win | obj | A window identifier or a window. | ~~ This client-side gets (respec. sets) the //window// title. == Style == == See also == TOOLTIP, window