Introduction to PHP-GTK and its application-PHP Tutorial-php Tutorial

Source: Internet
Author: User
Introduction and application of PHP-GTK. 1. PHP-GTK introduction 1.1PHP-GTKPHP-GTK is an extension of PHP, which allows programmers to write programs that are executed on the client and are independent of the GUI. This module does not allow display on the browser 1. PHP-GTK introduction
1.1 PHP-GTK
PHP-GTK is an extension of PHP that allows programmers to write programs that are executed on the client and are independent of the GUI. This module does not allow you to view GTK + programs in a browser. it was initially developed to write independent GUI programs.
1.2 GTK
GTK was originally developed for GIMP, a GUI image processing software. GTK + is a set tool of GIMP. GTK + has evolved from here until now it has become the center of Gnome (Gnome is a desktop environment ). Later, GTK + has been promoted to BeOS and Win32, making it the best option for PHP extension modules. to maintain PHP across platforms, PHP can be used as Linux, BeOS, windows and other platforms to develop Windows interface programs.
2. PHP-GTK concepts
2.1 Preface
The next step is to teach you a little bit about the concept of this Chapter. because the concept of this chapter is very important, even if you don't understand it, you still need to understand it slowly, or else you will continue to understand it later. In addition, we do not recommend readers who do not have programming experience to read the following content, because there are many ideas that can be easily confused. Also, I will use English for the next part, so that you will not be overwhelmed when reading foreign documents. come on !! If you have any questions about this chapter, refer
PHP-GTK Manual: http://gtk.php.net/manual/en/
2.2 Widget (s)
Widgets are basic functions and forms in a GUI program. The most common widgets are label, button, window, frame, and text box. All widgets come from an abstract basic class-GtkWidget. Every widget is a class
A Widget has five periods in its life:
1. Creation: declaring an object)
2. Placement: add it to a container (adding it to a container)
3. Signal Connection: receives and performs the action (the action it will perform)
4. Display: whether it is visible (whether it is viewable or not)
5. Destruction: closing of a program)
2.3 Container (s)
Container is a widget that can contain other widgets. Most widgets are container, such as GtkWindow, GtkTable, and GtkBox. Besides this, container is similar to other widgets and can be placed in other container. All container comes from a class-GtkContainer, and its own comes from the class of GtkWidget. Therefore, container is also a type of widget.
2.4 Signal (s)
When a program designer performs an action in the program, the program needs an action to respond to the user's action. Signals allows the program to know that the user has performed the action and can trigger a suitable response.
For example, when a user presses a button that can open a new window (GtkButton), the program recognizes this request and opens a new window. This can be done through signal. When the button is pressed, the widget will issue a signal, and then the signal triggers callbacks to generate a new window (GtkWindow ).

Http://www.bkjia.com/PHPjc/631755.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631755.htmlTechArticle1. PHP-GTK Introduction 1.1 PHP-GTK is an extension of PHP that allows programmers to write programs that are executed on the client and are independent of the GUI. This module cannot be displayed in the browser...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.