Win32-GUI

 view release on metacpan or  search on metacpan

GUI.pm  view on Meta::CPAN


    ###########################################################################
    # (@)METHOD:List ()
    # Return a list of Listbox::Item.

sub List {
    my $self = shift;
    my $index = shift;
    if(not defined $index) {
        my @list = ();
        for my $i (0..($self->Count-1)) {
            push @list, Win32::GUI::Listbox::Item->new($self, $i);
        }
        return @list;
    } else {
        return Win32::GUI::Listbox::Item->new($self, $index);
    }
}

    ###########################################################################
    # (@)METHOD:Item (INDEX)
    # Return an Listbox::Item.

sub Item { &List; }

###############################################################################
# (@)PACKAGE:Win32::GUI::Listbox::Item
# Create and manipulate listbox entries
#
package Win32::GUI::Listbox::Item;

sub new {
    my($class, $listbox, $index) = @_;
    $self = {
        -parent => $listbox,
        -index  => $index,
        -string => $listbox->GetString($index),
    };
    return bless $self, $class;
}

    ###########################################################################
    # (@)METHOD:Remove()
    # Remove Item.
sub Remove {
    my($self) = @_;
    $self->{-parent}->RemoveItem($self->{-index});
    undef $_[0];
}

    ###########################################################################
    # (@)METHOD:Select()
    # Select Item.
sub Select {
    my($self) = @_;
    $self->{-parent}->Select($self->{-index});
}

###############################################################################
# (@)PACKAGE:Win32::GUI::Combobox
# Create and manipulate combobox controls
#
package Win32::GUI::Combobox;
@ISA = qw(
    Win32::GUI
    Win32::GUI::WindowProps
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::Combobox(PARENT, %OPTIONS)
    # Creates a new Combobox object;
    # can also be called as PARENT->AddCombobox(%OPTIONS).
    #
    # Class specific B<%OPTIONS> are:
    #  -autohscroll => 0/1 (default 0)
    #    Set/Unset autohscroll style
    #  -disablenoscroll => 0/1 (default 0)
    #    Set/Unset disablenoscroll style
    #  -dropdown => 0/1 (default 0)
    #    Set/Unset dropdown style
    #  -dropdownlist => 0/1 (default 0)
    #    Set/Unset dropdownlist style
    #  -hasstring => 0/1 (default 0)
    #    Set/Unset hasstring style
    #  -lowercase => 0/1 (default 0)
    #    Set/Unset lowercase style
    #  -nointegraleheight => 0/1 (default 0)
    #    Set/Unset nointegraleheight style
    #  -simple => 0/1 (default 0)
    #    Set/Unset simple style
    #  -sort => 0/1 (default 0)
    #    Set/Unset sort style
    #  -uppercase => 0/1 (default 0)
    #    Set/Unset uppercase style
    #
    # Only one of -simple, -dropdown and -dropdownlist should be used. If
    # more than one is used, only the last one will be acted on.

sub new {
    return Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__COMBOBOX"), @_);
}

###############################################################################
# (@)PACKAGE:Win32::GUI::ProgressBar
# Create and manipulate progress bar controls
#
package Win32::GUI::ProgressBar;
@ISA = qw(
    Win32::GUI
    Win32::GUI::WindowProps
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::ProgressBar(PARENT, %OPTIONS)
    # Creates a new ProgressBar object;
    # can also be called as PARENT->AddProgressBar(%OPTIONS).
    #
    # Class specific B<%OPTIONS> are:
    #     -smooth   => 0/1 (default 0)
    #         uses a smooth bar instead of the default segmented bar.
    #     -vertical => 0/1 (default 0)

GUI.pm  view on Meta::CPAN

    #
    # Class specific B<%OPTIONS> are:
    #   -buttons => 0/1 (default 0)
    #     Set/Unset buttons style.
    #     Header items look like push buttons and can be clicked.
    #   -dragdrop => 0/1 (default 0)
    #     Set/Unset dragdrop style.
    #   -fulldrag => 0/1 (default 0)
    #     Set/Unset fulldrag style.
    #   -hidden => 0/1 (default 0)
    #     Set/Unset hidden style.
    #   -horizontal => 0/1 (default 0)
    #     Set/Unset horizontal style.
    #   -hottrack => 0/1 (default 0)
    #     Set/Unset hottrack style.
    #   -hottrack => 0/1 (default 0)
    #     Set/Unset hottrack style.
    #   -imagelist => Win32::GUI::ImageList object.
    #     Set imagelist.
sub new {
    return Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__HEADER"), @_);
}

###############################################################################
# (@)PACKAGE:Win32::GUI::Splitter
# Create and manipulate window splitter controls
#
package Win32::GUI::Splitter;
@ISA = qw(
    Win32::GUI
    Win32::GUI::WindowProps
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::Splitter(PARENT, %OPTIONS)
    # Creates a new Splitter object;
    # can also be called as PARENT->AddSplitter(%OPTIONS).
    #
    # Class specific B<%OPTIONS> are:
    #   -horizontal => 0/1 (default 0)
    #     Set/Unset horizontal orientation
    #   -min => VALUE
    #     Set minimum range value.
    #   -max => VALUE
    #     Set maximum range value.
    #   -range => [ MIN, MAX ]
    #     Set range values.

sub new {
    my $new = Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__SPLITTER"), @_);
    if($new) {
        $new->{-tracking} = 0;
        return $new;
    } else {
        return undef;
    }
}

###############################################################################
# (@)PACKAGE:Win32::GUI::ComboboxEx
# Create and manipulate extended combobox controls
#
package Win32::GUI::ComboboxEx;
@ISA = qw(
    Win32::GUI::Combobox
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::ComboboxEx(PARENT, %OPTIONS)
    # Creates a new ComboboxEx object;
    # can also be called as PARENT->AddComboboxEx(%OPTIONS).
    #
    # Class specific B<%OPTIONS> are:
    #   -imagelist => Win32::GUI::ImageList object
    #     Set Imagelist object
    #   -casesensitive => 0/1 (default 0)
    #     Set/Unset casesensitive extended style.
    #   -noeditimage => 0/1 (default 0)
    #     Set/Unset noeditimage extended style.
    #   -noeditimageindent => 0/1 (default 0)
    #     Set/Unset noeditimageindent extended style.
    #   -nosizelimit => 0/1 (default 0)
    #     Set/Unset nosizelimit extended style.
    #
    # Except for images, a ComboboxEx object acts like a Win32::GUI::Combobox
    # object. See also new Win32::GUI::Combobox().
sub new {
    return Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__COMBOBOXEX"), @_);
}

###############################################################################
# (@)PACKAGE:Win32::GUI::DateTime
# Create and manipulate datetime controls
#
package Win32::GUI::DateTime;
@ISA = qw(
    Win32::GUI
    Win32::GUI::WindowProps
);

    ###########################################################################
    # (@)METHOD:new Win32::GUI::DateTime(PARENT, %OPTIONS)
    # Creates a new DateTime object;
    # can also be called as PARENT->AddDateTime(%OPTIONS).
    #
    # Class specific B<%OPTIONS> are:
    #   -align  => 'right'/'left' (default 'left')
    #     The drop-down month calendar alignement.
    #   -format => 'shortdate', 'longdate', 'time'
    #     Control format type (Use local format date/time).
    #   -shownone => 0/1 (default 0)
    #     Allow no datetime (add a prefix checkbox).
    #   -updown   => 0/1 (default 0 for date, 1 for time format)
    #     Use updown control instead of the drop-down month calendar.
sub new {
    return Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__DTPICK"), @_);
}

###############################################################################
# (@)PACKAGE:Win32::GUI::MonthCal
# Create and manipulate MonthCal controls



( run in 2.500 seconds using v1.01-cache-2.11-cpan-2398b32b56e )