Skip to content
Perl 6 interface to the IUP toolkit for building graphical user interfaces
Perl 6 C Makefile
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead of dwarring:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
logotype
src
t
.gitignore
.travis.yml
Build.pm
LICENSE
META6.json
README.md
TODO

README.md

Perl 6 IUP IUP Logo

Perl 6 interface to the IUP toolkit for building GUI's.

Operating System Build Status
Linux Build Status

Description

IUP is a multi-platform toolkit for building graphical user interfaces. IUP's purpose is to allow a program source code to be compiled in different systems without any modification. Its main advantages are:

  • It offers a simple API.
  • High performance, due to the fact that it uses native interface elements.
  • Fast learning by the user, due to the simplicity of its API.

Installation

Get the IUP library and install it:

mkdir libiup
cd libiup
curl -L https://sourceforge.net/projects/iup/files/3.25/Linux%20Libraries/iup-3.25_Linux44_64_lib.tar.gz > libiup.tar.gz
tar xvzf libiup.tar.gz
sudo bash install
sudo bash install_dev
cd ..

Install the Perl 6 module with Zef:

zef update
zef install IUP

Synopsis

WARNING:
This module is in its early stages and should be considered a Work in Progress. The interface is not final and may change in the future.

Sample GUI:

Hello World IUP Application

Sample code:

use IUP;

my @argv = ("Test");

#
# initialize iup
#

my $iup = IUP.new();

$iup.image_lib_open();
$iup.open(@argv);

#
# create widgets and set their attributes
#

my $btn = $iup.button("&Ok", "");

$btn.set_callback("ACTION", &exit_callback);

$btn.set_attribute("IMAGE", "IUP_ActionOk");
$btn.set_attribute("EXPAND", "YES");
$btn.set_attribute("TIP", "Exit button");

my $lbl = $iup.label("Hello, world!");

my $vb = $iup.vbox($lbl, $btn);
$vb.set_attribute("MARGIN", "10x10");
$vb.set_attribute("GAP", "10");
$vb.set_attribute("ALIGNMENT", "ACENTER");

my $dlg = $iup.dialog($vb);
$dlg.set_attribute("TITLE", "Hello");

#
# Map widgets and show dialog
#

$dlg.show();

#
# Wait for user interaction
#

$iup.main_loop();

#
# Clean up
#

$dlg.destroy();
$iup.close();

exit();

sub exit_callback() returns Int {
	return IUP_CLOSE;
}

Author

Henrique Dias mrhdias@gmail.com

See Also

License

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

You can’t perform that action at this time.