thomasfunk / simplegtk2 Goto Github PK
View Code? Open in Web Editor NEWSimpleGtk2 is a wrapper around Perl-Gtk2 to allow RAD
SimpleGtk2 is a wrapper around Perl-Gtk2 to allow RAD
SimpleGtk2 version 0.68 ======================= SimpleGtk2 is a wrapper around Perl-Gtk2 to allow RAD (Rapid Application Development). It is based on GtkFixed container which allows creating applications with a minimal effort. The most needed widgets are implemented with its common functions. But it is also possible to use the original functions provided by Perl-Gtk2. The following widgets are implemented: Windows - GtkWindow (toplevel) - GtkDialog (planned) - GtkMessageDialog (normal, simple and standalone simple) - GtkAboutDialog (planned) - GtkAssistant (planned) Display Widgets - GtkImage - GtkLabel - GtkProgressBar (planned) - GtkStatusbar - GtkStatusIcon (perhaps) Buttons and Toggles - GtkButton - GtkCheckButton - GtkRadioButton - GtkLinkButton - GtkFontButton - GtkFilechooserButton Numeric/Text Data Entry - GtkEntry - GtkSlider (GtkHScale & GtkVScale) - GtkSpinButton Multiline Text Editor - GtkTextView Tree, List and Icon Grid Widgets - GtkTreeView (in progress) - GtkListView (in progress) Menus, Combo Box, Toolbar - GtkComboBox - GtkMenu - GtkMenuBar - GtkMenuItem - GtkImageMenuItem - GtkRadioMenuItem - GtkCheckMenuItem - GtkSeparatorMenuItem - GtkTearoffMenuItem - GtkToolbar (planned) Selectors (File/Font/Color) - GtkColorSelectionDialog (planned) - GtkFileChooserDialog (normal and simple) - GtkFontSelectionDialog (normal and simple) Layout Containers - GtkNotebook - GtkNotebookPage Ornaments - GtkFrame - GtkSeparator (GtkHSeparator & GtkVSeparator) Scrolling - GtkScrollbar (GtkHScrollbar & GtkVScrollbar) Printing - GtkPrintUnixDialog (perhaps) - GtkPageSetupUnixDialog (perhaps) Miscellaneous - GtkTooltip EXAMPLE The 'Hello World' example ;-) Original with Perl-Gtk2: #! /usr/bin/perl -w use strict; use Gtk2 -init; # toplevel window my $window = Gtk2::Window->new('toplevel'); $window->signal_connect(delete_event => sub { Gtk2->main_quit }); # button my $button = Gtk2::Button->new('Action'); $button->signal_connect(clicked => sub{print("Hello Gtk2-Perl\n");}); # add button and show window $window->add($button); $window->show_all(); Gtk2->main; With SimpleGtk2: #! /usr/bin/perl -w use strict; use SimpleGtk2; # toplevel window my $window = SimpleGtk2->new_window(Type => 'toplevel', Name => 'main', Title => 'Hello World'); $window->add_signal_handler('main', 'delete_event', sub { Gtk2->main_quit; }); # button $window->add_button(Name => 'button', Pos => [20, 40], Title => "Action", Sig => 'clicked', Func => sub {print("Hello Gtk2-Perl\n");}); # show window $window->show_and_run(); INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Test Perl-Gtk2 COPYRIGHT AND LICENCE Copyright (C) 2015 by Thomas Funk for SimpleGtk2 Copyright (C) 2004 by the Gtk2-Perl team for Gtk2::Ex::Simple::List and Gtk2::Ex::Simple::Tree These libraries are free software; you can redistribute them and/or modify them under the same terms as GPL V2 or higher. BUGS Please send me bug reports or suggestions for improvements to <[email protected]> excepting Gtk2::Ex::Simple::List and Gtk2::Ex::Simple::Tree.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.