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.

AUTHOR

Tom Molesworth <cpan@perlsite.co.uk>

LICENSE

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