Curses-UI-POE

 view release on metacpan or  search on metacpan

examples/color_editor  view on Meta::CPAN

}

# We don't want STDERR output to clutter the screen.
#
# Hint: If you need STDERR, write it out to a file and put 
# a tail on that file to see the STDERR output. Example:
#open STDERR, ">>/tmp/editor_errors.$$";
open STDERR, ">/dev/null";

# ----------------------------------------------------------------------
# Menu definition
# ----------------------------------------------------------------------

my @menu = (
  { -label => 'File', 
    -submenu => [
      { -label => 'Open file ^O', -value => \&open_dialog  },
      { -label => 'Save file ^S', -value => \&save_dialog  },
      { -label => 'Exit      ^Q', -value => \&exit_dialog  }
    ]
  },

examples/color_editor  view on Meta::CPAN


# Create the root. Everything else will be built up from here.
use Curses::UI::POE;
my $cui = new Curses::UI::POE ( 
	-clear_on_exit => 1,
	-color_support => 1
);

# Add the menu to the root.
my $menu = $cui->add(
	'menu','Menubar', 
	-fg   => "white",
        -bg   => "blue",
	-menu => \@menu,
);

# Create the screen for the editor.
my $screen = $cui->add(
	'screen', 'Window',
	-padtop          => 1, # leave space for the menu
	-border		 => 0,

examples/demo-widgets  view on Meta::CPAN

    { -label => '------------',       -value   => sub{}              },
    { -label => 'Next demo',          -value   => \&goto_next_demo   },
    { -label => 'Previous demo',      -value   => \&goto_prev_demo   },
];

my $menu = [
    { -label => 'File',               -submenu => $file_menu         },
    { -label => 'Select demo',        -submenu => $demo_menu         },
];

$cui->add('menu', 'Menubar', -menu => $menu);

# ----------------------------------------------------------------------
# Create the explanation window
# ----------------------------------------------------------------------

my $w0 = $cui->add(
    'w0', 'Window', 
    -border        => 1, 
    -y             => -1, 
    -height        => 3,

examples/editor  view on Meta::CPAN

}

# We don't want STDERR output to clutter the screen.
#
# Hint: If you need STDERR, write it out to a file and put 
# a tail on that file to see the STDERR output. Example:
#open STDERR, ">>/tmp/editor_errors.$$";
open STDERR, ">/dev/null";

# ----------------------------------------------------------------------
# Menu definition
# ----------------------------------------------------------------------

my @menu = (
  { -label => 'File', 
    -submenu => [
      { -label => 'Open file ^O', -value => \&open_dialog  },
      { -label => 'Save file ^S', -value => \&save_dialog  },
      { -label => 'Exit      ^Q', -value => \&exit_dialog  }
    ]
  },

examples/editor  view on Meta::CPAN

# ----------------------------------------------------------------------

# Create the root. Everything else will be built up from here.
use Curses::UI::POE;
my $cui = new Curses::UI::POE ( 
	-clear_on_exit => 1 
);

# Add the menu to the root.
my $menu = $cui->add(
	'menu','Menubar', 
	-menu => \@menu,
);

# Create the screen for the editor.
my $screen = $cui->add(
	'screen', 'Window',
	-padtop          => 1, # leave space for the menu
	-border		 => 0,
	-ipad		 => 0,
);

examples/irc_client  view on Meta::CPAN


#    $viewer->{-ypos} = @Channel;
#    $viewer->layout_content;

    $curses->draw;
}

sub TIEHANDLE { 
    my $curses = $_[-1];

    # Main Menu
    my $menu = $curses->add
        ( 'menu','Menubar', 
          -fg   => "white",
          -bg   => "blue",
          -menu => [
            { -label => 'File', 
              -submenu => [
                { -label => 'Exit      ^Q', -value => sub { exit } }
              ]
            },
            { -label => 'Help', 
              -submenu => [

examples/tutorial  view on Meta::CPAN


my @menu = (
  { -label => 'File', 
    -submenu => [
      { -label => 'Exit      ^Q', -value => \&exit_dialog  }
    ]
  },
);
 
my $menu = $cui->add(
	'menu','Menubar', 
	-menu => \@menu,
	-fg  => "blue",
);

my $win1 = $cui->add(
		     'win1', 'Window',
		     -border => 1,
		     -y    => 1,
		     -bfg  => 'red',
		     );

t/widget_classes.t  view on Meta::CPAN

use strict;
use Test;

BEGIN { plan tests => 14 }

foreach my $class (qw(
    Curses::UI::Checkbox
    Curses::UI::Calendar
    Curses::UI::Label
    Curses::UI::Menubar
    Curses::UI::Progressbar
    Curses::UI::PasswordEntry
    Curses::UI::Buttonbox
    Curses::UI::Listbox
    Curses::UI::Popupmenu
    Curses::UI::TextEditor
    Curses::UI::TextEntry
    Curses::UI::TextViewer
    Curses::UI::Window
    Curses::UI::Radiobuttonbox )) {



( run in 1.551 second using v1.01-cache-2.11-cpan-49f99fa48dc )