-
Notifications
You must be signed in to change notification settings - Fork 0
ThomasFunk/SimpleGtk2
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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
<t.funk@web.de> excepting Gtk2::Ex::Simple::List and
Gtk2::Ex::Simple::Tree.
About
SimpleGtk2 is a wrapper around Perl-Gtk2 to allow RAD
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published