Help language development. Donate to The Perl Foundation

GTK::Glade cpan:MARTIMM last updated on 2019-02-18

gtk-glade-0.7.2.1/

GTK::Glade - Accessing Gtk using Glade

[![License](http://martimm.github.io/label/License-label.svg)](http://www.perlfoundation.org/artistic_license_2_0) 6d763fd70fec81d2251d10af5fa07dfd dd9354cc474e119e09084aed95fc64d4 With the modules from package `GTK::Simple` you can build a user interface and interact with it. This package however, is meant to load a user interface description saved by an external designer program. The program used is glade which saves an XML description of the made design. The user must provide a class which holds the methods needed to receive signals defined in the user interface design. Then only two lines of code (besides the loading of modules) is needed to let the user interface appear and enter the main loop. 57050372014f263b6b399b9fb49637b6 (Many things shown below will be changed shortly!!) 98be3808e98d507a85e40fd6ea11b2c0 The first thing to do is designing a ui and save it. A part of the saved result is shown below. It shows the part of an exit button. Assume that this file is saved in **example.glade**. 689daee85d00ec9fcc531d5d7e54ac51 bd8900400f5a6abc54a0b5c4dbeda1b0 Then write code to handle all signals which are defined by the user interface. Don't have to write every handler at once. You will be notified about a missing handler as soon as an event is fired for it. Only the method to handle a click event from the quit button is shown. This file is saved in **lib/MyEngine.pm6**. 51ccc2239c15c46b9b3277f25bec4934 Above are a few examples of gtk subroutines which are mostly defined in ` GTK::Glade::NativeGtk` which is pinched largely from the GTK::Simple package. A few missing subs were added and others were modified or removed. Examples used above are `gtk_button_get_label()`, `gtk_widget_get_name()` and `gtk_main_quit()`. 4f541bb908f5053a6d0936544ca6a8f5 The rest is a piece of cake. cb784498c947534a196f37c7d0cafa1a f94405e48a855ab83a34772ddd7c1b48 173bc206aef842e5787aa629295eea1a bf6dd20a74dc66257fd7438d0b7048dd 49d8b082f1bab38dc80da86290376015 5b2cbfbf3f38aa0f93777ed511b92b8c b6b5b388f7940d26b9502a57751812b0 e0b5bebd3517a99d214b41188fdb7999 eef7004af8dd7795ec1b20a6729b2174 06c38d68e2b30bcde88ada4dc263b6c0 7d4feebb996d5a5dee25b83a92c5687a ab070d08b4b557e508a6cd45b823b453 `zef install GTK::Glade` 40f96655cf9136b460214bf316922858 Name: **Marcel Timmerman** Github account name: Github account MARTIMM