Prima::Grids

Prima::Grids is a Perl module that contains grid widgets.
Download

Prima::Grids Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dmitry Karasik
  • Publisher web site:
  • http://search.cpan.org/~karasik/Prima-1.26/pod/Prima/Widget.pod

Prima::Grids Tags


Prima::Grids Description

Prima::Grids is a Perl module that contains grid widgets. Prima::Grids is a Perl module that contains grid widgets.SYNOPSIS use Prima::Grids; $grid = Prima::Grid-> create( cells => , , , ], onClick => sub { print $_-> get_cell_text( $_-> focusedCell), " is selectedn"; } );The module provides classes for several abstraction layers of grid representation. The classes hierarchy is as follows: AbstractGridViewer AbstractGrid GridViewer GridThe root class, Prima::AbstractGridViewer, provides common interface, while by itself it is not directly usable. The main differences between classes are centered around the way the cell data are stored. The simplest organization of a text-only cell, provided by Prima::Grid, stores data as a two-dimensional array of text scalars. More elaborated storage and representation types are not realized, and the programmer is urged to use the more abstract classes to derive own mechanisms. To organize an item storage, different from Prima::Grid, it is usually enough to overload either the Stringify, Measure, and DrawCell events, or their method counterparts: get_cell_text, columnWidth, rowHeight, and draw_items.The grid widget is designed to contain cells of variable extents, of two types, normal and indent. The indent rows and columns are displayed in grid margins, and their cell are drawn with distinguished colors. An example use for a bottom indent row is a sum row in a spreadsheet application; the top indent row can be used for displaying columns' headers. The normal cells can be selected by the user, scrolled, and selected. The cell selection can only contain rectangular areas, and therefore is operated with two integer pairs with the beginning and the end of the selection.The widget operates in two visual scrolling modes; when the space allows, the scrollbars affect the leftmost and the topmost cell. When the widget is not large enough to accommodate at least one cell and all indent cells, the layout is scrolled pixel-wise. These modes are named 'cell' and 'pixel', after the scrolling units.The widget allows the interactive changing of cell widths and heights by dragging the grid lines between the cells.Prima::AbstractGridViewerPrima::AbstractGridViewer, the base for all grid widgets in the module, provides interface to generic grid browsing functionality, plus functionality for text-oriented grids. The class is not usable directly.Prima::AbstractGridViewer is a descendant of Prima::GroupScroller, and some properties are not described here. See "Prima::GroupScroller" in Prima::IntUtils. Requirements: · Perl


Prima::Grids Related Software