Pan widget == Description == ~~ These markups implement //Pans// in HOP documents. A //pan// is a container. It is built using the ++++ constructor. A //paned// contains two ++++s whose size can be interactively adjusted. ~~ Note: ,( :style { font-weight: bold; color: red } [ The markups presented in this page are not yet supported on client side programming. They are only supported on server side.]) == Synopsis == === Server === ( arg ...) ( arg ...) === Client === (paned-fraction paned) (paned-fraction-set! paned integer) (paned-onresize paned) (paned-onresize-set! paned procedure) === Requirements === ~~ Client codes using //Paneds// need to load the script ++hop-paned.js++. They also need to load the ++hop-paned.css++ style sheet. Hence, documents using //Paneds// must include in their header, the following statement: ( :include "hop-paned") == Examples == == Server Definitions == === ++++ === ^ attributes ^ type ^ default ^ short description ^ | :id | string | //random// | element identifier. | | :class | string | //random// | the class of the element. | | :fraction | integer | _ | the split ratio. | | :orientation | symbol | ++vertical++ | the paned orientation. | | :onresize | script | _ | the action to execute on resize. | | body | element | empty | the body. | ~~ This markup creates //paned//s. The orientation may either be ++vertical++ or ++horizontal++. ~~ Paned elements react to a //resize// event that is raised when the cursor is moved or when the fraction value is changed at runtime. This handler can be specified using the ++:onresize++ field or using the ++"resize"++ event name in a client side expression such as: (add-event-listener! pan "resize" (lambda (e) ...)) === ++++ === ^ attributes ^ type ^ default ^ short description ^ | :id | string | //random// | element identifier. | | :class | string | //random// | the class of the element. | | body | element | empty | the body. | This markup creates //pan//s. == Client Definitions == === ++(paned-fraction paned)++ === paned-fraction ^ arguments ^ type ^ short description ^ | paned | string or paned | the paned. | This function returns the current fraction of the //paned//. === ++(paned-fraction-set! paned fraction)++ === paned-fraction-set! ^ arguments ^ type ^ short description ^ | paned | string or paned | the paned. | | fraction | integer or string | the new fraction. | This function sets a new fraction to the //paned//. If the argument ++fraction++ is an integer, it denotes the width of the left (respectively top) pan as a percentage of the overall //paned// width. If the argument ++fraction++ is a string, it denotes an absolute width for the left (respec. top) pan. === ++(paned-onresize paned)++ === paned-onresize ^ arguments ^ type ^ short description ^ | paned | string or paned | the paned. | This function returns the current ++onresize++ function of the //paned//. === ++(paned-onresize-set! paned onresize)++ === paned-onresize-set! ^ arguments ^ type ^ short description ^ | paned | string or paned | the paned. | | onresize | procedure | the new onresize. | This function sets a new onresize fnction to the //paned//. == Style == == See also == ,