HomePHP Building Your Own Desktop Notepad Application Using PHP-GTK
Building Your Own Desktop Notepad Application Using PHP-GTK
If you think building a desktop application such as Notepad is difficult, think again. If you use PHP-GTK, it's almost ridiculously easy. This article will show you how. By the time you're done, you'll have a full cross-platform application in about 100 lines.
So, what's next? You might be wondering. Where do you go from here?
A real-life application with complete sample code
This article will show you how easy it is to build a desktop Notepad application similar to the default Notepad application in a Windows system.
I will explain to you all the core components, and how each component ties in with the others.
You will see how signal handling is being used in real life, how menu items are processed, how to change the font of the editor, and how to open and save the text document.
At the end of the article, you will also be presented with the complete sample code. You will be surprised that the entire code is just 100+ lines - a desktop notepad application written using the PHP with which you're so familiar!
I'm using the Windows Notepad application as the example for this article because this is one application with which most people are familiar. Of course the sample code in this article can be run on Windows, Linux or MacOS. Just like PHP, PHP-GTK is cross-platform!