Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

wxPHP

From Wikipedia, the free encyclopedia
PHP library for wxWidgets GUI library
wxPHP
wxPHP logo starting with three colored squares of red, blue, and yellow, and then two letter styles for the 'wx' and then the 'PHP'.
Logo of wxPHP
Developer(s)Mário Soares
Jefferson González
Initial release2003; 22 years ago (2003)
Stable release
3.0.2.0 / May 30, 2015; 9 years ago (2015-05-30)[1]
Repository
Written inC,C++,PHP
Operating systemCross-platform:Windows,Linux,macOS
TypeProgramming library
LicensePHP
Websitewxphp.org

wxPHP (forwxWidgets for PHP) is an extension for thePHPprogramming language thatwraps thewxWidgetslibrary, which allows writingcross-platform software desktop applications that make use of the native graphical components available to the different platforms. It supports the three majoroperating systems:Windows,Linux andmacOS.

History

[edit]

Near 2003, a group of enthusiastic people began writing on mailing lists[2] and forums presenting the idea of aPHP extension that wrapped the wxWidgets library in a similar way to whatPHP-GTK does forGTK+. ASourceForge 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 theConcurrent Versions System (CVS) repository on SourceForge. The first commits consisted of wrapping the wxAppclass, 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 simplecode 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 itsmethods. 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 wxPHPsource 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 theXML output generated byDoxygen 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[update], wxPHP supports around 400wxWidgets classes and thousands of methods, making it usable to develop a desktop commercial application. The project source code is now hosted onGitHub. 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 getcode completion onintegrated development environments (IDEs) likeNetBeans andEclipse. Planning is underway to rewrite the code generator yet again using a modular andobject-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 towxFormBuilder 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.

<?phpclassMainFrameextendswxFrame{functiononQuit(){$this->Destroy();}functiononAbout(){$dlg=newwxMessageDialog($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,newwxSize(350,260));$mb=newwxMenuBar();$mn=newwxMenu();$mn->Append(2,"E&xit","Quit this program");$mb->Append($mn,"&File");$mn=newwxMenu();$mn->AppendCheckItem(4,"&About...","Show about dialog");$mb->Append($mn,"&Help");$this->SetMenuBar($mb);$scite=newwxStyledTextCtrl($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=newmainFrame();$mf->Show();wxEntry();?>

See also

[edit]

References

[edit]
  1. ^"Changes" on GitHub
  2. ^"wxPHP?". Retrieved2012-06-06.
  3. ^"wxPHP has Risen". Retrieved2012-06-06.
  4. ^"wxPHP SourceForge Mailing list". Retrieved2012-06-06.
  5. ^"wxPHP Progress". Archived fromthe original on 2018-03-06. Retrieved2012-06-06.
  6. ^"Working Version". Retrieved2012-06-07.
  7. ^"GCC-XML". Retrieved2012-06-06.
  8. ^"Code Completion Interface File". Retrieved2012-06-06.
  9. ^"PEG: A PHP Extension Generator".

External links

[edit]
Technologies
RAD,GUI
builders
Free software
Proprietary software
Libraries
Bindings
Low-level platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
OnWindows
OnUnix,
underX11
OnBeOS,Haiku
OnAndroid
CLI
Low Level Cross-platform
CLI
C
Java
High-level, platform-specific
OnAmigaOS
OnClassic Mac OS,macOS
Object Pascal
Objective-C,Swift
C++
CLI
OnWindows
CLI
C++
Object Pascal
OnUnix,
underX11
OnAndroid
High-level, cross-platform
C
C++
Objective-C
CLI
Adobe Flash
Go
Haskell
Java
JavaScript
Common Lisp
Lua
Pascal
Object Pascal
Perl
PHP
Python
Ruby
Tcl
XML
shell
Dart
People
Resources
Implementations
Web frameworks
Testing
ORMs
IDEs
Widget toolkit
Retrieved from "https://en.wikipedia.org/w/index.php?title=WxPHP&oldid=1261485528"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp