fbpx
Wikipedia

wxPHP

wxPHP (for wxWidgets for PHP) is an extension the programming language PHP that wraps the wxWidgets library, which allows writing cross-platform software desktop applications that make use of the native graphical components available to the different platforms. It supports the three major operating systems: Windows, Linux, and macOS by using PHP. Applications are written in PHP, which is an interpreted language. Thus, it needs no intermediate compiling step to run an application, if the PHP interpreter has the extension available.

wxPHP
Logo of wxPHP
Developer(s)Mário Soares
Jefferson González
Initial release2003; 21 years ago (2003)
Stable release
3.0.2.0 / May 30, 2015; 8 years ago (2015-05-30)[1]
Repository
  • github.com/wxphp/wxphp
Written inC, C++, PHP
Operating systemCross-platform: Windows, Linux, macOS
TypeProgramming library
LicensePHP
Websitewxphp.org

History edit

Near 2003, a group of enthusiastic people began writing on mailing lists[2] and forums presenting the idea of a PHP extension that wrapped the wxWidgets library in a similar way to what PHP-GTK does for GTK+. A SourceForge project was created[3] and many people joined[4] in an effort to move the cause forward and make it a reality. Despite the will of the project members, no progress was made,[5] until Mário Soares decided to join.[6] After the join, the first commits occurred to the Concurrent Versions System (CVS) repository on SourceForge. The first commits consisted of wrapping the wxApp class, wxFrame, and some other basic controls, this is when wxPHP first saw the light. Inspired by wrapper generators like Simplified Wrapper and Interface Generator (SWIG), development was begun for a simple code generator that read the output of GCCXML[7] ran over wxWidgets and transformed into a serialized PHP array. This helped save much time on the monotonous task of writing the same code repeatedly for each class and its methods. After having some basic functions and controls, an application was written using wxPHP, 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 the maintainer then, offering to make a website to boost wxPHP presence and attract more people and contributors. When the website was up and running, he began working with the wxPHP source code. Later, he decided to enable more methods and classes, discovering on the way that many features were unsupported by the code generator and extension. After several emails, the prior developer had the idea to parse the XML output generated by Doxygen from the wxWidget documentation. He undertook the work and began improving the code generator until it was rewritten, adding missing documentation and many features that would enable adding more wxWidgets functions.

Present edit

As of 2012, wxPHP supports around 400 wxWidgets classes and thousands of methods, making it usable to develop a desktop commercial application. The project source code is now hosted on GitHub. A reference generator was written that serves as the documentation of the functions supported by the wxPHP extension. Also an interface generator[8] has been written to get code completion on integrated development environments (IDEs) like NetBeans and Eclipse. Planning is underway to rewrite the code generator yet again using a modular and object-oriented programming approach that permits others to use it to generate code for other PHP wrappers.[9]

GUI Designer edit

Support for PHP code generation was added to wxFormBuilder to easily create applications, and get people not familiar to the library to get up to speed on learning it.

Example edit

A minimal frame example that shows how to add a menu bar with menu items, button, status bar and connection of click events.

<?php class MainFrame extends wxFrame { function onQuit() { $this->Destroy(); } function onAbout() { $dlg = new wxMessageDialog(  $this,  "Welcome to wxPHP!!\nBased on wxWidgets 3.0.0\n\nThis is a minimal wxPHP sample!",  "About box...",  wxICON_INFORMATION ); $dlg->ShowModal(); } function __construct() { parent::__construct(  null,  null,  "Minimal wxPHP App",  wxDefaultPosition,  new wxSize(350, 260) );  $mb = new wxMenuBar();  $mn = new wxMenu(); $mn->Append(2, "E&xit", "Quit this program"); $mb->Append($mn, "&File");  $mn = new wxMenu(); $mn->AppendCheckItem(4, "&About...", "Show about dialog"); $mb->Append($mn, "&Help");  $this->SetMenuBar($mb);  $scite = new wxStyledTextCtrl($this);  $sbar = $this->CreateStatusBar(2); $sbar->SetStatusText("Welcome to wxPHP...");  $this->Connect(2, wxEVT_COMMAND_MENU_SELECTED, array($this,"onQuit")); $this->Connect(4, wxEVT_COMMAND_MENU_SELECTED, array($this,"onAbout")); } } $mf = new mainFrame(); $mf->Show(); wxEntry(); ?> 

See also edit

  • PHP-GTK, PHP bindings to GTK+
  • PHP-Qt, PHP bindings to the Qt toolkit
  • WinBinder, native window bindings for PHP
  • PHP Desktop, PHP desktop GUI framework with HTML5 Chrome/IE engine

References edit

  1. ^ "Changes" on GitHub
  2. ^ "wxPHP?". Retrieved 2012-06-06.
  3. ^ "wxPHP has Risen". Retrieved 2012-06-06.
  4. ^ "wxPHP SourceForge Mailing list". Retrieved 2012-06-06.
  5. ^ "wxPHP Progress". Retrieved 2012-06-06.
  6. ^ "Working Version". Retrieved 2012-06-07.
  7. ^ "GCC-XML". Retrieved 2012-06-06.
  8. ^ "Code Completion Interface File". Retrieved 2012-06-06.
  9. ^ "PEG: A PHP Extension Generator".

External links edit

wxphp, wxwidgets, extension, programming, language, that, wraps, wxwidgets, library, which, allows, writing, cross, platform, software, desktop, applications, that, make, native, graphical, components, available, different, platforms, supports, three, major, o. wxPHP for wxWidgets for PHP is an extension the programming language PHP that wraps the wxWidgets library which allows writing cross platform software desktop applications that make use of the native graphical components available to the different platforms It supports the three major operating systems Windows Linux and macOS by using PHP Applications are written in PHP which is an interpreted language Thus it needs no intermediate compiling step to run an application if the PHP interpreter has the extension available wxPHPLogo of wxPHPDeveloper s Mario SoaresJefferson GonzalezInitial release2003 21 years ago 2003 Stable release3 0 2 0 May 30 2015 8 years ago 2015 05 30 1 Repositorygithub wbr com wbr wxphp wbr wxphpWritten inC C PHPOperating systemCross platform Windows Linux macOSTypeProgramming libraryLicensePHPWebsitewxphp wbr org Contents 1 History 2 Present 3 GUI Designer 4 Example 5 See also 6 References 7 External linksHistory editNear 2003 a group of enthusiastic people began writing on mailing lists 2 and forums presenting the idea of a PHP extension that wrapped the wxWidgets library in a similar way to what PHP GTK does for GTK A SourceForge project was created 3 and many people joined 4 in an effort to move the cause forward and make it a reality Despite the will of the project members no progress was made 5 until Mario Soares decided to join 6 After the join the first commits occurred to the Concurrent Versions System CVS repository on SourceForge The first commits consisted of wrapping the wxApp class wxFrame and some other basic controls this is when wxPHP first saw the light Inspired by wrapper generators like Simplified Wrapper and Interface Generator SWIG development was begun for a simple code generator that read the output of GCCXML 7 ran over wxWidgets and transformed into a serialized PHP array This helped save much time on the monotonous task of writing the same code repeatedly for each class and its methods After having some basic functions and controls an application was written using wxPHP to assist the code generator on the selection of class methods that it could handle correctly In August 2011 Jefferson Gonzalez wrote an email to the maintainer then offering to make a website to boost wxPHP presence and attract more people and contributors When the website was up and running he began working with the wxPHP source code Later he decided to enable more methods and classes discovering on the way that many features were unsupported by the code generator and extension After several emails the prior developer had the idea to parse the XML output generated by Doxygen from the wxWidget documentation He undertook the work and began improving the code generator until it was rewritten adding missing documentation and many features that would enable adding more wxWidgets functions Present editAs of 2012 update wxPHP supports around 400 wxWidgets classes and thousands of methods making it usable to develop a desktop commercial application The project source code is now hosted on GitHub A reference generator was written that serves as the documentation of the functions supported by the wxPHP extension Also an interface generator 8 has been written to get code completion on integrated development environments IDEs like NetBeans and Eclipse Planning is underway to rewrite the code generator yet again using a modular and object oriented programming approach that permits others to use it to generate code for other PHP wrappers 9 GUI Designer editSupport for PHP code generation was added to wxFormBuilder to easily create applications and get people not familiar to the library to get up to speed on learning it Example editA minimal frame example that shows how to add a menu bar with menu items button status bar and connection of click events lt php class MainFrame extends wxFrame function onQuit this gt Destroy function onAbout dlg new wxMessageDialog this Welcome to wxPHP n Based on wxWidgets 3 0 0 n n This is a minimal wxPHP sample About box wxICON INFORMATION dlg gt ShowModal function construct parent construct null null Minimal wxPHP App wxDefaultPosition new wxSize 350 260 mb new wxMenuBar mn new wxMenu mn gt Append 2 E amp xit Quit this program mb gt Append mn amp File mn new wxMenu mn gt AppendCheckItem 4 amp About Show about dialog mb gt Append mn amp Help this gt SetMenuBar mb scite new wxStyledTextCtrl this sbar this gt CreateStatusBar 2 sbar gt SetStatusText Welcome to wxPHP this gt Connect 2 wxEVT COMMAND MENU SELECTED array this onQuit this gt Connect 4 wxEVT COMMAND MENU SELECTED array this onAbout mf new mainFrame mf gt Show wxEntry gt See also edit nbsp Free and open source software portal PHP GTK PHP bindings to GTK PHP Qt PHP bindings to the Qt toolkit WinBinder native window bindings for PHP PHP Desktop PHP desktop GUI framework with HTML5 Chrome IE engineReferences edit Changes on GitHub wxPHP Retrieved 2012 06 06 wxPHP has Risen Retrieved 2012 06 06 wxPHP SourceForge Mailing list Retrieved 2012 06 06 wxPHP Progress Retrieved 2012 06 06 Working Version Retrieved 2012 06 07 GCC XML Retrieved 2012 06 06 Code Completion Interface File Retrieved 2012 06 06 PEG A PHP Extension Generator External links editwxPHP on GitHub Retrieved from https en wikipedia org w index php title WxPHP amp oldid 1180311017, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.