The library consists of three layers. The first layer is a hand-coded and fast assembler kernel. This layer does the biggest piece of hard work. The second layer implements the API for drawing graphics primitives like lines, rectangles, circles etc. This layer is comparable to Borland BGI API. The third layer is written with C++ and offers a complete object set for the GUI developer. This layer implements objects like edit boxes, windows, buttons, menus, bitmaps etc, with addition of integrated mouse & keyboards support. To create a simple demonstration that draws on the screen a window captioned "HELLO WORLD", a button labelled "Finish" and shows a mouse pointer only, these few lines are required:
#include <fastgl/fastgl.h> #ifdef FG_NAMESPACE using namespace fgl; #endif int main(int argc, char **argv ) { FGApp MyApp(3,argc,argv,CDARK,APP_ENABLEALTX); FGWindow *MyWindow = new FGWindow(&MyWindow, 100, 100,200,100, "Window"); MyWindow->set_fcolor(CRED); MyWindow->printf(54,15,"Hello World!\n"); MyWindow->AddPushButton(60,45,80,21,"Exit app",'F', FGControl::Quit); MyApp.Run(); return 0; }
1.4.0