NAME

Curses::UI::Grid::Cell - Create and manipulate cell in grid model.

CLASS HIERARCHY

Curses::UI::Grid
   |
   +----Curses::UI::Cell

SYNOPSIS

    use Curses::UI;
    my $cui = new Curses::UI;
    my $win = $cui->add('window_id', 'Window');
    my $grid =$win->add('mygrid','Grid');

    my $row1=$grid->add_cell( -id=>'cell1'
		             ,-fg=>'blue'
			     ,-bg->'red'
			     ,-frozen=>1
			     ,-align => 'R'
			   );

DESCRIPTION

 Curses::UI::Grid::Cell is a widget that can be 
 used to manipulate cell in grid model


See exampes/grid-demo.pl in the distribution for a short demo.

STANDARD OPTIONS

-parent,-fg,-bg,-focusable,-width

For an explanation of these standard options, see Curses::UI::Widget.

WIDGET-SPECIFIC OPTIONS

  • -id ( ID )

    This option will be contain the cell id.

  • -frozen < BOOLEAN >

    This option will make the cell visible on the same place even if vertical scroll occurs.

    <B>Note Only first X column (from right) could be frozen.

  • -align < ALIGN >

    This option will make apropriate align for the data cell. ALIGN could be either R or L. R - rigth align; L - left align;

  • -overwrite < BOOLEAN >

    If BOOLEAN is true, and when add_string method is called first time after the cell becomes focused the old value will be cleared unless the function key will be pressed earlier. (cursor_left,cursor_to_end,etc.)

METHODS

  • new ( OPTIONS )

    Constructs a new grid object using options in the hash OPTIONS.

  • layout ( )

    Lays out the cell, makes sure it fits on the available screen.

  • draw ( BOOLEAN )

    Draws the cell object. If BOOLEAN is true, the screen is not updated after drawing.

    By default, BOOLEAN is true so the screen is updated.

WIDGET-SPECIFIC METHODS

  • layout_cell ( )

    Lays out the cell, makes sure it fits on the available screen.

  • draw_cell ( BOOLEAN )

    Draws the cell object. If BOOLEAN is true, the screen is not updated after drawing.

    By default, BOOLEAN is true so the screen is updated.

  • fg ( COLOR )

    Thid routine could set or get foreground color using -fg_ option . If -fg_ is NULL then -fg or parent fg color is return.

  • bg ( COLOR )

    Thid routine could set or get background color using -bg_ option. If -bg_ is NULL then -bg or parent bg color is return.

  • text ( TEXT )

    Thid routine could set or get text value for given cell and active row.

SEE ALSO Curses::UI::Grid::Row Curses::UI::Grid

AUTHOR

Copyright (c) 2004 by Adrian Witas. All rights reserved.

COPYRIGHT AND LICENSE

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

User Interfaces

1;