WxPHP
   HOME

TheInfoList



OR:

wxPHP stands for "wxWidgets for PHP" and is a PHP extension that wraps the
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with mini ...
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
, which allows writing
multi-platform In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software r ...
desktop applications that make use of the native graphical components available to the different platforms. It supports the three major operating systems:
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
and
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lap ...
by using the PHP language. Applications are written in PHP language, and since it is an interpreted language, it does not require an intermediate compilation step in order to run the application, provided the PHP interpreter has the extension available.


History

Near 2003, a group of enthusiastic people started writing on mailing lists and forums presenting the idea of a PHP extension that wrapped the wxWidgets library in a similar way to what
PHP-GTK PHP-GTK is a set of language bindings for PHP which allow GTK GUI applications to be written in PHP. PHP-GTK provides an object-oriented interface to GTK classes and functions. While PHP-GTK partially supports GTK2, GTK3 is not supported at ...
does for
GTK+ GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and prop ...
. A
SourceForge SourceForge is a web service that offers software consumers a centralized online location to control and manage open-source software projects and research business software. It provides source code repository hosting, bug tracking, mirroring ...
project was created and many people joined in an effort to move the cause forward and make it a reality. Despite the will of the project members, no progress was made until Mário Soares decided to join in. After the join, the first commits were done to the CVS repository on SourceForge. The first commits consisted of wrapping the class, wxFrame and some other basic controls, this is when wxPHP first saw the light. Inspired on wrapper generators like
SWIG The Simplified Wrapper and Interface Generator (SWIG) is an open-source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other la ...
, development was started for a simple code generator that read the output of GCCXML ran over wxWidgets and transformed into a serialized PHP array. This helped save a lot of time on the monotonous task of writing the same code again and again for each class and its methods. After having some basic functionality and controls, an application was written using wxPHP itself, to assist the code generator on the selection of class methods that it could handle correctly. In August 2011 Jefferson González wrote an email to current maintainer offering to make a website in order to boost wxPHP presence as attract more people and contributors. When the website was up and running, he started playing with the wxPHP sources. Later, decided to enable more methods and classes, discovering on the way that many features were not supported by the code generator and extension itself. After several emails previous developer came with the idea of parsing the
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
output generated by
Doxygen Doxygen ( ) is a documentation generator and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code. When used for analysis, Doxyge ...
from the wxWidget documentation. He took the task granted and started improving the code generator until it was re-written, adding lacking documentation and many features that would enable adding more wxWidgets functionality.


Present

wxPHP now supports around 400
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with mini ...
classes and thousands of methods, making it pretty usable to develop a desktop commercial application. The project source code is now hosted on
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, cont ...
. A reference generator was written that serves as the documentation of the functionality supported by the wxPHP extension. Also an interface generator has been written in order to get
code completion Autocomplete, or word completion, is a feature in which an application predicts the rest of a word a user is typing. In Android and iOS smartphones, this is called predictive text. In graphical user interfaces, users can typically press the t ...
on IDE's like
NetBeans NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called ''modules''. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java ...
and
Eclipse An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three c ...
. Planning is undergoing to re-write the code generator yet again using a modular and object oriented approach that permits other people to use it to generate code for other PHP wrappers.


GUI Designer

Support for PHP code generation was added to
wxFormBuilder wxFormBuilder is an open source GUI designer application for wxWidgets toolkit, which allows creating cross-platform applications. A streamlined, easy to use interface enables faster development and easier maintenance of software. It is written ...
in order to easily create applications, and get people not familiar to the library to get up to speed on learning it.


Example

A minimal frame example that shows how to add a menu bar with menu items, button, status bar and connection of click events. Show(); wxEntry(); ?>


See also

*
PHP-GTK PHP-GTK is a set of language bindings for PHP which allow GTK GUI applications to be written in PHP. PHP-GTK provides an object-oriented interface to GTK classes and functions. While PHP-GTK partially supports GTK2, GTK3 is not supported at ...
, PHP bindings to GTK+ * PHP-Qt, PHP bindings to the
Qt toolkit Qt (pronounced "cute") is cross-platform software for creating graphical user interfaces as well as cross-platform applications that run on various software and hardware platforms such as Linux, Windows, macOS, Android or embedded systems wi ...

WinBinder
native window bindings for PHP
PHP Desktop
PHP desktop GUI framework with HTML5 Chrome/IE engine


References

{{DEFAULTSORT:Wxphp Widget toolkits Free computer libraries PHP libraries WxWidgets Software using the PHP license