.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Tickit::Window 3pm" .TH Tickit::Window 3pm "2020-11-08" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" "Tickit::Window" \- a window for drawing operations .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Tickit; \& use Tickit::Pen; \& \& my $tickit = Tickit\->new; \& \& my $rootwin = $tickit\->rootwin; \& \& $rootwin\->bind_event( expose => sub { \& my ( $win, undef, $info ) = @_; \& \& my $rb = $info\->rb; \& \& $rb\->clear; \& \& $rb\->text_at( \& int( $win\->lines / 2 ), int( ($win\->cols \- 12) / 2 ), \& "Hello, world" \& ); \& }); \& $rootwin\->bind_event( geomchange => sub { shift\->expose } ); \& $rootwin\->set_pen( Tickit::Pen\->new( fg => "white" ) ); \& \& $rootwin\->expose; \& $tickit\->run; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides coordination of widget drawing activities. A \f(CW\*(C`Window\*(C'\fR represents a region of the screen that a widget occupies. .PP Windows cannot directly be constructed. Instead they are obtained by sub-division of other windows, ultimately coming from the root window associated with the terminal. .PP Normally all windows are visible, but a window may be hidden by calling the \&\f(CW\*(C`hide\*(C'\fR method. After this, the window will not respond to any of the drawing methods, until it is made visible again with the \f(CW\*(C`show\*(C'\fR method. A hidden window will not receive focus or input events. It may still receive geometry change events if it is resized. .SS "Sub Windows" .IX Subsection "Sub Windows" A division of a window made by calling \f(CW\*(C`make_sub\*(C'\fR or \f(CW\*(C`make_float\*(C'\fR obtains a window that represents some portion of the drawing area of the parent window. Child windows are stored in order; \f(CW\*(C`make_sub\*(C'\fR adds a new child to the end of the list, and \f(CW\*(C`make_float\*(C'\fR adds one at the start. .PP Higher windows (windows more towards the start of the list), will always handle input events before lower siblings. The extent of windows also obscures lower windows; drawing on lower windows may not be visible because higher windows are above it. .SS "Deferred Child Window Operations" .IX Subsection "Deferred Child Window Operations" In order to minimise the chances of ordering-specific bugs in window event handlers that cause child window creation, reordering or deletion, the actual child window list is only mutated after the event processing has finished, by using a Tickit \f(CW\*(C`later\*(C'\fR block. .SH "METHODS" .IX Header "METHODS" .SS "close" .IX Subsection "close" .Vb 1 \& $win\->close .Ve .PP Removes the window from its parent and clears any event handlers set using bind_event. Also recursively closes any child windows. .PP Currently this is an optional method, as child windows are stored as weakrefs, so should be destroyed when the last reference to them is dropped. Widgets should make sure to call this method anyway, because this will be changed in a future version. .SS "make_sub" .IX Subsection "make_sub" .Vb 1 \& $sub = $win\->make_sub( $top, $left, $lines, $cols ) .Ve .PP Constructs a new sub-window of the given geometry, and places it at the end of the child window list; below any other siblings. .SS "make_hidden_sub" .IX Subsection "make_hidden_sub" .Vb 1 \& $sub = $win\->make_hidden_sub( $top, $left, $lines, $cols ) .Ve .PP Constructs a new sub-window like \f(CW\*(C`make_sub\*(C'\fR, but the window starts initially hidden. This avoids having to call \f(CW\*(C`hide\*(C'\fR separately afterwards. .SS "make_float" .IX Subsection "make_float" .Vb 1 \& $float = $win\->make_float( $top, $left, $lines, $cols ) .Ve .PP Constructs a new sub-window of the given geometry, and places it at the start of the child window list; above any other siblings. .SS "make_popup" .IX Subsection "make_popup" .Vb 1 \& $popup = $win\->make_popup( $top, $left, $lines, $cols ) .Ve .PP Constructs a new floating popup window starting at the given coordinates relative to this window. It will be sized to the given limits. .PP This window will have the root window as its parent, rather than the window the method was called on. Additionally, a popup window will steal all keyboard and mouse events that happen, regardless of focus or mouse position. It is possible that, if the window has an \f(CW\*(C`on_mouse\*(C'\fR handler, that it may receive mouse events from outwide the bounds of the window. .SS "bind_event" .IX Subsection "bind_event" .Vb 1 \& $id = $win\->bind_event( $ev, $code, $data ) .Ve .PP Installs a new event handler to watch for the event specified by \f(CW$ev\fR, invoking the \f(CW$code\fR reference when it occurs. \f(CW$code\fR will be invoked with the given window, the event name, an event information object, and the \&\f(CW$data\fR value it was installed with. \f(CW\*(C`bind_event\*(C'\fR returns an \s-1ID\s0 value that may be used to remove the handler by calling \f(CW\*(C`unbind_event_id\*(C'\fR. .PP .Vb 1 \& $ret = $code\->( $win, $ev, $info, $data ) .Ve .PP The type of \f(CW$info\fR will depend on the kind of event that was received, as indicated by \f(CW$ev\fR. The information structure types are documented in Tickit::Event. .SS "bind_event (with flags)" .IX Subsection "bind_event (with flags)" .Vb 1 \& $id = $win\->bind_event( $ev, $flags, $code, $data ) .Ve .PP The \f(CW$code\fR argument may optionally be preceded by an integer of flag values. This should be zero to apply default semantics, or a bitmask of constants. The constants are documented in \&\*(L"bind_event (with flags)\*(R" in Tickit::Term. .SS "unbind_event_id" .IX Subsection "unbind_event_id" .Vb 1 \& $win\->unbind_event_id( $id ) .Ve .PP Removes an event handler that returned the given \f(CW$id\fR value. .SS "raise" .IX Subsection "raise" .Vb 1 \& $win\->raise .Ve .SS "lower" .IX Subsection "lower" .Vb 1 \& $win\->lower .Ve .PP Moves the order of the window in its parent one higher or lower relative to its siblings. .SS "raise_to_front" .IX Subsection "raise_to_front" .Vb 1 \& $win\->raise_to_front .Ve .PP Moves the order of the window in its parent to be the front-most among its siblings. .SS "lower_to_back" .IX Subsection "lower_to_back" .Vb 1 \& $win\->lower_to_back .Ve .PP Moves the order of the window in its parent to be the back-most among its siblings. .SS "parent" .IX Subsection "parent" .Vb 1 \& $parentwin = $win\->parent .Ve .PP Returns the parent window; i.e. the window on which \f(CW\*(C`make_sub\*(C'\fR or \&\f(CW\*(C`make_float\*(C'\fR was called to create this one .SS "subwindows" .IX Subsection "subwindows" .Vb 1 \& @windows = $win\->subwindows .Ve .PP Returns a list of the subwindows of this one. They are returned in order, highest first. .SS "root" .IX Subsection "root" .Vb 1 \& $rootwin = $win\->root .Ve .PP Returns the root window .SS "term" .IX Subsection "term" .Vb 1 \& $term = $win\->term .Ve .PP Returns the Tickit::Term instance of the terminal on which this window lives. .PP Note that it is not guaranteed that this method will return the same Perl-level terminal instance that the root window was constructed with. In particular, if the root window in fact lives on a mock terminal created by Tickit::Test::MockTerm this method may \*(L"forget\*(R" this fact, returning an object instance simply in the \f(CW\*(C`Tickit::Term\*(C'\fR class instead. While the instance will still be useable as a terminal, the fact it was a mock terminal may get forgotten. .SS "tickit" .IX Subsection "tickit" .Vb 1 \& $tickit = $win\->tickit .Ve .PP Returns the Tickit instance with which this window is associated. .SS "show" .IX Subsection "show" .Vb 1 \& $win\->show .Ve .PP Makes the window visible. Allows drawing methods to output to the terminal. Calling this method also exposes the window, invoking the \f(CW\*(C`on_expose\*(C'\fR handler. Shows the cursor if this window currently has focus. .SS "hide" .IX Subsection "hide" .Vb 1 \& $win\->hide .Ve .PP Makes the window invisible. Prevents drawing methods outputting to the terminal. Hides the cursor if this window currently has focus. .SS "is_visible" .IX Subsection "is_visible" .Vb 1 \& $visible = $win\->is_visible .Ve .PP Returns true if the window is currently visible. .SS "resize" .IX Subsection "resize" .Vb 1 \& $win\->resize( $lines, $cols ) .Ve .PP Change the size of the window. .SS "reposition" .IX Subsection "reposition" .Vb 1 \& $win\->reposition( $top, $left ) .Ve .PP Move the window relative to its parent. .SS "change_geometry" .IX Subsection "change_geometry" .Vb 1 \& $win\->change_geometry( $top, $left, $lines, $cols ) .Ve .PP A combination of \f(CW\*(C`resize\*(C'\fR and \f(CW\*(C`reposition\*(C'\fR, to atomically change all the coordinates of the window. Will only invoke \f(CW\*(C`on_geom_changed\*(C'\fR once, rather than twice as would be the case calling the above methods individually. .SS "expose" .IX Subsection "expose" .Vb 1 \& $win\->expose( $rect ) .Ve .PP Marks the given region of the window as having been exposed, to invoke the \&\f(CW\*(C`on_expose\*(C'\fR event handler on itself, and all its child windows. The window's own handler will be invoked first, followed by all the child windows, in screen order (top to bottom, then left to right). .PP If \f(CW$rect\fR is not supplied it defaults to exposing the entire window area. .PP The \f(CW\*(C`on_expose\*(C'\fR event handler isn't invoked immediately; instead, the \&\f(CW\*(C`Tickit\*(C'\fR \f(CW\*(C`later\*(C'\fR method is used to invoke it at the next round of \s-1IO\s0 event handling. Until then, any other window could be exposed. Duplicates are suppressed; so if a window and any of its ancestors are both queued for expose, the actual handler will only be invoked once per unique region of the window. .SS "getctl" .IX Subsection "getctl" .SS "setctl" .IX Subsection "setctl" .Vb 1 \& $value = $win\->getctl( $ctl ) \& \& $success = $win\->setctl( $ctl, $value ) .Ve .PP Accessor and mutator for window control options. \f(CW$ctl\fR should be one of the following options: .IP "cursor-blink (bool)" 4 .IX Item "cursor-blink (bool)" .PD 0 .IP "cursor-shape (int)" 4 .IX Item "cursor-shape (int)" .IP "cursor-visible (bool)" 4 .IX Item "cursor-visible (bool)" .PD Cursor properties to set for the terminal cursor when this window has input focus. .IP "focus-child-notify (bool)" 4 .IX Item "focus-child-notify (bool)" Whether the window will also receive focus events about child windows. .IP "steal-input (bool)" 4 .IX Item "steal-input (bool)" Whether the window is currently stealing input from its siblings. .SS "set_focus_child_notify" .IX Subsection "set_focus_child_notify" .Vb 1 \& $win\->set_focus_child_notify( $notify ) .Ve .PP If set to a true value, the \f(CW\*(C`on_focus\*(C'\fR event handler will also be invoked when descendent windows gain or lose focus, in addition to when it gains or loses focus itself. Defaults to false; meaning the \f(CW\*(C`on_focus\*(C'\fR handler only receives notifications about the window itself. .SS "top" .IX Subsection "top" .SS "bottom" .IX Subsection "bottom" .SS "left" .IX Subsection "left" .SS "right" .IX Subsection "right" .Vb 1 \& $top = $win\->top \& \& $bottom = $win\->bottom \& \& $left = $win\->left \& \& $right = $win\->right .Ve .PP Returns the coordinates of the start of the window, relative to the parent window. .SS "abs_top" .IX Subsection "abs_top" .SS "abs_left" .IX Subsection "abs_left" .Vb 1 \& $top = $win\->abs_top \& \& $left = $win\->abs_left .Ve .PP Returns the coordinates of the start of the window, relative to the root window. .SS "cols" .IX Subsection "cols" .SS "lines" .IX Subsection "lines" .Vb 1 \& $cols = $win\->cols \& \& $lines = $win\->lines .Ve .PP Obtain the size of the window .SS "selfrect" .IX Subsection "selfrect" .Vb 1 \& $rect = $win\->selfrect .Ve .PP Returns a Tickit::Rect containing representing the window's extent within itself. This will have \f(CW\*(C`top\*(C'\fR and \f(CW\*(C`left\*(C'\fR equal to 0. .SS "rect" .IX Subsection "rect" .Vb 1 \& $rect = $win\->rect .Ve .PP Returns a Tickit::Rect containing representing the window's extent relative to its parent .SS "pen" .IX Subsection "pen" .Vb 1 \& $pen = $win\->pen .Ve .PP Returns the current Tickit::Pen object associated with this window .SS "set_pen" .IX Subsection "set_pen" .Vb 1 \& $win\->set_pen( $pen ) .Ve .PP Replace the current Tickit::Pen object for this window with a new one. The object reference will be stored, allowing it to be shared with other objects. If \f(CW\*(C`undef\*(C'\fR is set, then a new, blank pen will be constructed. .SS "getpenattr" .IX Subsection "getpenattr" .Vb 1 \& $val = $win\->getpenattr( $attr ) .Ve .PP Returns a single attribue from the current pen .SS "get_effective_pen" .IX Subsection "get_effective_pen" .Vb 1 \& $pen = $win\->get_effective_pen .Ve .PP Returns a new Tickit::Pen containing the effective pen attributes for the window, combined by those of all its parents. .SS "get_effective_penattr" .IX Subsection "get_effective_penattr" .Vb 1 \& $val = $win\->get_effective_penattr( $attr ) .Ve .PP Returns the effective value of a pen attribute. This will be the value of this window's attribute if set, or the effective value of the attribute from its parent. .SS "scrollrect" .IX Subsection "scrollrect" .Vb 1 \& $success = $win\->scrollrect( $rect, $downward, $rightward ) \& \& $success = $win\->scrollrect( $top, $left, $lines, $cols, $downward, $rightward ) \& \& $success = $win\->scrollrect( ..., $pen ) \& \& $success = $win\->scrollrect( ..., %attrs ) .Ve .PP Attempt to scroll the rectangle of the window (either given by a \&\f(CW\*(C`Tickit::Rect\*(C'\fR or defined by the first four parameters) by an amount given by the latter two. Since most terminals cannot perform arbitrary rectangle scrolling, this method returns a boolean to indicate if it was successful. The caller should test this return value and fall back to another drawing strategy if the attempt was unsuccessful. .PP Optionally, a \f(CW\*(C`Tickit::Pen\*(C'\fR instance or hash of pen attributes may be provided, to override the background colour used for erased sections behind the scroll. .PP The cursor may move as a result of calling this method; its location is undefined if this method returns successful. The terminal pen, in particular the background colour, may be modified by this method even if it fails to scroll the terminal (and returns false). .PP This method will enqueue all of the required expose requests before returning, so in this case the return value is not interesting. .SS "scroll" .IX Subsection "scroll" .Vb 1 \& $success = $win\->scroll( $downward, $rightward ) .Ve .PP A shortcut for calling \f(CW\*(C`scrollrect\*(C'\fR on the entire region of the window. .SS "scroll_with_children" .IX Subsection "scroll_with_children" .Vb 1 \& $win\->scroll_with_children( $downward, $rightward ) .Ve .PP Similar to \f(CW\*(C`scroll\*(C'\fR but ignores child windows of this one, moving all of the terminal content paying attention only to obscuring by newer siblings of ancestor windows. .PP This method is experimental, intended only for use by Tickit::Widget::ScrollBox. After calling this method, the terminal content will have moved and the windows drawing them will be confused unless the window position was also updated. \f(CW\*(C`ScrollBox\*(C'\fR takes care to do this. .SS "cursor_at" .IX Subsection "cursor_at" .Vb 1 \& $win\->cursor_at( $line, $col ) .Ve .PP Sets the position in the window at which the terminal cursor will be placed if this window has focus. This method does \fInot\fR force the window to take the focus though; for that see \f(CW\*(C`take_focus\*(C'\fR. .SS "cursor_visible" .IX Subsection "cursor_visible" .Vb 1 \& $win\->cursor_visible( $visible ) .Ve .PP Sets whether the terminal cursor is visible on the window when it has focus. Normally it is, but passing a false value will make the cursor hidden even when the window is focused. .SS "cursor_shape" .IX Subsection "cursor_shape" .Vb 1 \& $win\->cursor_shape( $shape ) .Ve .PP Sets the shape that the terminal cursor will have if this window has focus. This method does \fInot\fR force the window to take the focus though; for that see \f(CW\*(C`take_focus\*(C'\fR. Valid values for \f(CW$shape\fR are the various \&\f(CW\*(C`CURSORSHAPE_*\*(C'\fR constants from Tickit::Term. .SS "take_focus" .IX Subsection "take_focus" .Vb 1 \& $win\->take_focus .Ve .PP Causes this window to take the input focus, and updates the cursor position to the stored active position given by \f(CW\*(C`cursor_at\*(C'\fR. .SS "focus" .IX Subsection "focus" .Vb 1 \& $win\->focus( $line, $col ) .Ve .PP A convenient shortcut combining \f(CW\*(C`cursor_at\*(C'\fR with \f(CW\*(C`take_focus\*(C'\fR; setting the focus cursor position and taking the input focus. .SS "is_focused" .IX Subsection "is_focused" .Vb 1 \& $focused = $win\->is_focused .Ve .PP Returns true if this window currently has the input focus .SS "is_steal_input" .IX Subsection "is_steal_input" .Vb 1 \& $steal = $win\->is_steal_input .Ve .PP Returns true if this window is currently stealing input from its siblings .SS "set_steal_input" .IX Subsection "set_steal_input" .Vb 1 \& $win\->set_steal_input( $steal ) .Ve .PP Controls whether this window is currently stealing input from its siblings .SH "EVENTS" .IX Header "EVENTS" The following event types are emitted and may be observed by \*(L"bind_event\*(R". .SS "key" .IX Subsection "key" Emitted when a key on the keyboard is pressed while this window or one of its child windows has the input focus, or is set to steal input anyway. .PP The event handler should return a true value if it considers the keypress dealt with, or false to pass it up to its parent window. .PP Before passing it to its parent, a window will also try any other non-focused sibling windows of the currently-focused window in order of creation (though note this order is not necessarily the order the child widgets that own those windows were created or added to their container). .PP If no window actually handles the keypress, then every window will eventually be consulted about it, preferring windows closer to the focused one. .PP This broadcast-like behaviour allows widgets to handle keypresses that should make sense even though their window does not actually have the keyboard focus. This feature should be used sparingly, to only capture one or two keypresses that really make sense; for example to capture the \f(CW\*(C`PageUp\*(C'\fR and \f(CW\*(C`PageDown\*(C'\fR keys in a scrolling list, or a numbered function key that performs some special action. .SS "mouse" .IX Subsection "mouse" Emitted when a mouse button is pressed or released, the cursor moved while a button is held (a dragging event), or the wheel is scrolled. .PP The following event names may be observed: .IP "press" 8 .IX Item "press" A mouse button has been pressed down on this cell .IP "drag_start" 8 .IX Item "drag_start" The mouse was moved while a button was held, and was initially in the given cell .IP "drag" 8 .IX Item "drag" The mouse was moved while a button was held, and is now in the given cell .IP "drag_outside" 8 .IX Item "drag_outside" The mouse was moved outside of the window that handled the \f(CW\*(C`drag_start\*(C'\fR event, and is still being dragged. .IP "drag_drop" 8 .IX Item "drag_drop" A mouse button was released after having been moved, while in the given cell .IP "drag_stop" 8 .IX Item "drag_stop" The drag operation has finished. This event is always given directly to the window that handled the \f(CW\*(C`drag_start\*(C'\fR event, rather than the window on which the mouse release event happened. .IP "release" 8 .IX Item "release" A mouse button was released after being pressed .IP "wheel" 8 .IX Item "wheel" The mouse wheel was moved. \f(CW\*(C`button\*(C'\fR will indicate the wheel direction as a string \f(CW\*(C`up\*(C'\fR or \f(CW\*(C`down\*(C'\fR. .PP The invoked code should return a true value if it considers the mouse event dealt with, or false to pass it up to its parent window. .PP Once a dragging operation has begun via \f(CW\*(C`drag_start\*(C'\fR, the window that handled the event will always receive \f(CW\*(C`drag\*(C'\fR, \f(CW\*(C`drag_outside\*(C'\fR, and an eventual \&\f(CW\*(C`drag_stop\*(C'\fR event even if the mouse moves outside that window. No other window will receive a \f(CW\*(C`drag_outside\*(C'\fR or \f(CW\*(C`drag_stop\*(C'\fR event than the one that started the operation. .SS "geomchange" .IX Subsection "geomchange" Emitted when the window is resized or repositioned; i.e. whenever its geometry changes. .SS "expose" .IX Subsection "expose" Emitted when a region of the window is exposed by the expose method, or implicitly because it or another window has changed size, been shown or hidden, or the stacking order has been changed. .PP When invoked, render buffer passed in the event will have its origin set to that of the window, and its clipping will be set to the damage rectangle. .PP If any child windows overlap the region, these will be exposed first, before the containing window. .SS "focus" .IX Subsection "focus" Emitted when the window gains or loses input focus. .PP If the \f(CW\*(C`focus\-child\-notify\*(C'\fR behavior is enabled, this callback is also invoked for changes of focus on descendent windows. In this case, it is passed an additional argument, being the immediate child window in which the focus chain has now changed (which may or may not be the focused window directly; it could itself be another ancestor). .PP When a window gains focus, any of its ancestors that have \&\f(CW\*(C`focus\-child\-notify\*(C'\fR enabled will be informed first, from the outermost inwards, before the window itself. When one loses focus, it is notified first, and then its parents from the innermost outwards. .SH "AUTHOR" .IX Header "AUTHOR" Paul Evans