The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tickit::Widget::Layout::Desktop - provides a holder for "desktop-like" widget behaviour

VERSION

version 0.009

METHODS

position_is_maximise

Returns true if this location is the maximise button.

position_is_close

Returns true if this location is the close button.

mouse_press

Override mouse click events to mark this window as active before continuing with the usual move/resize detection logic.

Provides click-to-raise and click-to-focus behaviour.

with_rb

Runs the given coderef with a Tickit::RenderBuffer, saving and restoring the context around the call.

Returns $self.

content_rect

Represents the inner area of this window, i.e. the content without the frame.

render_to_rb

Returns $self.

change_geometry

Override geometry changes to allow welding and constraints.

We have a set of rules for each widget, of the following form:

 {
  left => [
   left => $w1,
   right => $w2,
  ],
  top => [
   top => $w2
  ]
 }

If the left edge changes, the left edge of $w1 and the right edge of $w2 would move by the same amount.

If the top changes, the top of $w2 would move by the same amount

That's about it. The idea is that edges can be "joined", meaning that resizing applies to multiple widgets at once.

INHERITED METHODS

Tickit::WidgetRole::Movable

export_subs_for, mouse_drag, mouse_release, move, on_mouse, position_is_corner, position_is_edge, position_is_title, resize_from_corner, resize_from_edge, start_moving, start_resize_from_corner, start_resize_from_edge

Tickit::WidgetRole

import

Tickit::SingleChildWidget

add, child, children, set_child

Tickit::ContainerWidget

child_opts, child_resized, find_child, focus_next, remove, set_child_opts, window_lost

Tickit::Widget

get_style_pen, get_style_text, get_style_values, key_focus_next_after, key_focus_next_before, on_pen_changed, pen, redraw, requested_cols, requested_lines, requested_size, resized, set_parent, set_pen, set_requested_size, set_style, set_style_tag, set_window, style_classes, take_focus, window

AUTHOR

Tom Molesworth <cpan@perlsite.co.uk>

LICENSE

Copyright Tom Molesworth 2012-2015. Licensed under the same terms as Perl itself.