![]() |
PortableGUI |
Hosted by SourceForge Project page |
#include <portablegui.h> // Import all PortableGUI include files
class MyWindowListener : public PGWindowListener {
virtual void windowClosing(PGWindow*
wnd);
};
void MyWindowListener::windowClosing(PGWindow*
wnd) {
getPGApplication()->exit(0); //
Exit the application
}
PGMAINPROC { // Mainproc is different for
Windows and GTK
PGApplication app;
PGINIT(app); // Initialize the app using Mainproc args
PGFrame frame("PortableGUI - HelloWorld"); // Create new frame window
MyWindowListener* wl = new
MyWindowListener(); // Create window listener for
frame
frame.addWindowListener(wl); //
Add window listener to frame
frame.pack(); // Use layout
manager
frame.setVisible(TRUE); //
Show the frame
return app.run();
//
Main event loop
}
WinHelloWorld | BeOSHelloWorld |
![]() |
![]() |
GTKHelloWorld | |
![]() |
bash$ tar -xvzf PortableGUI-x.xx.tar.gzYou can clean up the object files with 'make clean'.
bash$ cd pg/demo/helloworld/GTKHelloWorld
bash$ make
bash$ ./helloworld
C:\PortableGUI> NMAKE /f Makefile.vc
... making
C:\PortableGUI> NMAKE /f Makefile.vc CLEAN
... removing objs and precompiled headers
Build | Settings