Skip to content

Garland-g/perl6-libui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libui

Perl6 binding to andlabs/libui

andlabs/libui is currently alpha software. This binding works with the current release, 0.4.1. It does not have full functionality, and is subject to change as andlabs/libui changes underneath it. The raw bindings accessible in Libui::Raw should be feature-complete, but only some widgets have an object-oriented implementation.

Cross-platform: Windows, Mac, Linux

This library provides an object-oriented interface to libui. Shared libraries ui.dll, libui.dylib, and libui.so are provided in resources.

Windows Windows requires a 64-bit Visual C++ Redistributable to properly function.

Linux

Linux requires GTK3.

Debian: apt install libgtk-3-0

Basic Use:

use Libui;

Libui::Init;
my Libui::App $app .= new("test");

#This allows the window to be closed
#when the titlebar's close button is clicked
$app.window.closing.tap({$app.exit});

$app.run();

Widgets Provided:

Widget Description
Button A button with a label
Checkbox A checkbox with a label
Combobox A simple combobox
ColorButton A button for selecting a color
EditableCombobox A combobox that can be edited
Entry Text input, can be disabled
FontButton A button for selecting a font (Incomplete: Cannot set programmatically)
Form A container that takes labels for its contents
Grid A container that aligns widgets for window design
Group A container that provides a title for a set of items
Label Displays a single line of text
Menu Creates a single column of an application menu
MultilineEntry An entry that allows multiple lines
Time and Date Pickers Allows choosing of a date and/or time
ProgressBar Displays a progress bar
RadioButton A set of radio buttons
Separator A simple vertical or horizontal separator
Slider A draggable slider for choosing a value in a range
Spinbox A numerical input with a minimum and maximum range
Tab A set named tabs for placing items in
Window Contains any other widget, cannot be embedded in a container
VBox, HBox A vertical or horizontal box for grouping items

Install from CPAN with:

zef install Libui

Documentation

View on the web: https://github.com/Garland-g/perl6-libui/wiki

Use p6doc: e.g. p6doc Libui::Button

Examples:

Controlgallery Tab: Basic Controls

Linux

./examples/controlgallery-linux.png

Windows

./examples/controlgallery-windows.png

Macos

./examples/controlgallery-macos.png

License

Artistic License 2.0

Author

Travis Gibson

About

Object-Oriented Perl6 bindings to libui

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Other 100.0%