GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LAYOUT::MANAGER::COMPASS (3)

.ds Aq ’

NAME

Layout::Manager::Compass - Compass based layout

CONTENTS

DESCRIPTION

Layout::Manager::Compass is a layout manager that takes hints based on the four cardinal directions (north, east, south and west) plus a center area that takes up all remaining space (vertically).

In other words, the center area will expand to take up all space that is NOT used by components placed at the edges. Components at the north and south edges will take up the full width of the container.



  +--------------------------------+
  |              north             |
  +-----+--------------------+-----+
  |     |                    |     |
  |  w  |                    |  e  |
  |  e  |       center       |  a  |
  |  s  |                    |  s  |
  |  t  |                    |  t  |
  |     |                    |     |
  +-----+--------------------+-----+
  |              south             |
  +--------------------------------+



Components are placed in the order they are added. If two items are added to the ’north’ position then the first item will be rendered above the second. The height of the north edge will equal the height of both components combined.

Items in the center split the available space, heightwise. Two center components will each take up 50% of the available height and 100% of the available width.

Compass is basically an implementation of Java’s BorderLayout <http://java.sun.com/docs/books/tutorial/uiswing/layout/border.html>

SYNOPSIS



  $cont->add_component($comp1, north);
  $cont->add_component($comp2, east);

  my $lm = Layout::Manager::Compass->new;
  $lm->do_layout($cont);



POSITIONING

When you add a component with add_component the second argument should be one of: <B>northB>, <B>southB>, <B>eastB>, <B>westB> or <B>centerB>. Case doesn’t matter. You can also just provide the first letter of the word and it will do the same thing.

METHODS

    do_layout

Size and position the components in this layout.

AUTHOR

Cory Watson, <gphat@cpan.org>

COPYRIGHT & LICENSE

Copyright 2008 - 2010 Cory G Watson

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LAYOUT::MANAGER::COMPASS (3) 2014-01-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.