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.

Where can I get edelib

At the moment, edelib is only available via the ede SVN, by using the command:

svn co https://ede.svn.sourceforge.net/svnroot/ede/trunk/edelib

As soon as EDE2 is released, edelib will be part of it, so then you can get it by downloading EDE.

How to compile edelib programs

Us the following command to compile your EDE programs:

g++ yourprogram.cpp -o yourprogram `pkg-config --cflags --libs edelib` `fltk-config --use-images --ldflags` -lXpm

How to use edelib in your program

For information about how to use the classes in edelib, refer to the doxygen documentation. The doxygen documentation is installed when you install edelib. Usually, you can find it at /usr/local/share/doc/edelib-2.0.0/html/


edelib::Window example

This program demonstrates the use of the edelib::Window class to create a window.

#include <FL/Fl.H> // needed for basic FLTK functions, like Fl::run()
#include <edelib/Window.h>

int main()
{
	edelib::Window *Window = new edelib::Window(640, 480, "I created my first edelib::Window"); //creates new edelib::Window with constructor of the edelib::Window class
	Window->show(); //puts the Window on the screen
	Fl::run(); //starts event loop, so Window stays on the screen until you click the close button
}

Save this file as test.cxx and compile it with:

g++ yourprogram.cpp -o yourprogram `pkg-config --cflags --libs edelib` `fltk-config --use-images --ldflags` -lXpm

Then execute it with ./test