How to write EDE2 applications
What is edelib
EDE2 uses FLTK1.1 as toolkit and supplies a library that is used by all EDE2 components: edelib. When you're writing EDE2 apps yourself, you should also make use of this library. edelib adds EDE-specific features to you FLTK-code, like edelib::Window for an EDE-style window, D-Bus support, icon themes and configuration file storage.
How to compile edelib programs
Us the following command to compile your EDE programs:
g++ yourprogram.cpp -o yourprogram `pkg-config --cflags --libs edelib-gui` `fltk-config --use-images --ldflags` -lXpm
How to use edelib in your program
For information about how to use the classes in edelib, please refer to API reference. This reference is also installed when you compile edelib (if you have doxygen installed).
edelib::Window example
This program demonstrates the use of the edelib::Window class to create a window.
1 #include <FL/Fl.H> // needed for basic FLTK functions, like Fl::run()
2 #include <edelib/Window.h>
3
4 int main()
5 {
6 //creates new edelib::Window with constructor of the edelib::Window class
7 edelib::Window *win = new edelib::Window(640, 480, "I created my first edelib::Window");
8
9 //puts the window on the screen
10 win->show();
11
12 //starts event loop, so window stays on the screen until you click the close button
13 Fl::run();
14 }
Save this file as test.cxx and compile it with:
g++ test.cxx -o test `pkg-config --cflags --libs edelib-gui` `fltk-config --use-images --ldflags` -lXpm
Then execute it with ./test.

