-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
165 lines (118 loc) · 3.6 KB
/
README
File metadata and controls
165 lines (118 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
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.