Etk-Perl

 view release on metacpan or  search on metacpan

lib/Etk/Constants.pm  view on Meta::CPAN

package Etk::Constants;

=head1 NAME

Etk::Constants - Constants to use with Etk

=head1 SYNOPSIS

   use Etk::Constants qw/ButtonsOk ButtonsClose/;
   # 
   use Etk::Constants qw/:messagedialog/;
   # 
   use Etk::Constants qw/:all/;

=head1 DESCRIPTION

This module contains constants to use while building Etk apps.
The constants have numerical values which can be used instead.

=head1 EXPORT

None by default.

=head1 EXPORTABLE

   box combobox fillpolicy messagedialog progressbar scrolledview
   toplevelwidget tree textblock table colorpicker mouse toolbar
   button shadow image entry popupwindow window swallow slider all
 
=cut

require Exporter;
our @ISA = qw/Exporter/;

our %EXPORT_TAGS = (
   box		=> [qw/BoxStart BoxEnd BoxNone BoxExpand BoxFill BoxExpandFill/],
   combobox	=> [qw/ColumnTypeLabel ColumnTypeImage ColumnTypeOther EntryImage EntryLabel EntryOther
    EntryNone EntryExpand EntryFill EntryExpandFill/],
   fillpolicy	=> [qw/FillNone HFill VFill HExpand VExpand/],
   messagedialog=> [qw/None Warning Question Error
    ButtonsNone ButtonsOk ButtonsClose ButtonsCancel ButtonsYesNo ButtonsOkCancel/],
   progressbar	=> [qw/LeftToRight RightToLeft/],
   scrolledview	=> [qw/PolicyShow PolicyHide PolicyAuto/],
   toplevelwidget=>[qw/PointerDefault PointerMove PointerHDoubleArrow 
    PointerVDoubleArrow PointerResize PointerResizeTL PointerResizeT 
    PointerResizeTR PointerResizeR PointerResizeBR PointerResizeB 
    PointerResizeBL PointerResizeL PointerTextEdit PointerDndDrop/],
   tree		=> [qw/ModeList ModeTree FromFile FromEdje/],
   textblock	=> [qw/GravityLeft GravityRight/],
   table	=> [qw/TableNone TableHFill TableVFill TableHExpand TableVExpand
    TableFill TableExpand TableExpandFill/],
   colorpicker	=> [qw/ModeH ModeS ModeV ModeR ModeG ModeB/],
   mouse	=> [qw/ModifierNone ModifierCtrl ModifierAlt ModifierShift ModifierWin
    LockNone LockNum LockCaps LockScroll
    MouseNone MouseDoubleClick MouseTripleClick/],
   toolbar	=> [qw/ToolbarIcons ToolbarText ToolbarBothVert ToolbarBothHoriz 
    ToolbarDefault ToolbarHoriz ToolbarVert/],
   button	=> [qw/ButtonIcon ButtonText ButtonBothVert ButtonBothHoriz/],
   shadow	=> [qw/ShadowNone ShadowInside ShadowOutside ShadowNoEdge ShadowLeft ShadowAll
    ShadowRight ShadowTop ShadowBottom ShadowLeftRight ShadowTopBottom/],
   image	=> [qw/ImageFile ImageEdje ImageStock ImageEvasObject ImageData/],
   entry	=> [qw/ImagePrimary ImageSecondary/],
   popupwindow	=> [qw/BelowRight BelowLeft AboveRight AboveLeft/],
   window	=> [qw/Normal Above Below/],
   swallow	=> [qw/None IncompatibleParent NotRealized NoPart/],
   slider	=> [qw/Continuous Discontinuous Delayed/],
   );

my @all = ();
push @all, map { @{$EXPORT_TAGS{$_}} } keys %EXPORT_TAGS;

$EXPORT_TAGS{all} = [@all];

our @EXPORT_OK = @all;

# Box constants
use constant
{
   BoxStart	=> 0,
   BoxEnd	=> 1,

   BoxNone	=> 0,
   BoxExpand	=> 1 << 0,
   BoxFill	=> 1 << 1,
   BoxExpandFill=> (1 << 0) | (1 << 1)

};

# Combobox Constants
use constant
{
    ColumnTypeLabel => 0,
    ColumnTypeImage => 1,
    ColumnTypeOther => 2,
    EntryLabel	=> 0,
    EntryImage	=> 1,
    EntryOther	=> 2,



( run in 0.701 second using v1.01-cache-2.11-cpan-2398b32b56e )