Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FLTK

12 views
Skip to first unread message

Luka Ćavara

unread,
Aug 21, 2013, 1:12:06 PM8/21/13
to
Kratka uputa za napraviti jednostavan grafički
program koristeći fltk biblioteku

1) *Instaliraj biblioteku:* apt-get install libfltk1.3-dev

2) *Ukopiraj primjer ispod:* gedit fltk1.cpp

#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
using namespace std;

//--------------------------------------------
void but_cb( Fl_Widget* o, void* ) {
Fl_Button* b=(Fl_Button*)o;
b->label("Bravo!"); //redraw not necessary

b->resize(10,150,140,30); //redraw needed
b->redraw();
}

//--------------------------------------------
int main() {

Fl_Window win( 300,200,"Prvi FLTK program" );
win.begin();
Fl_Button but( 10, 150, 70, 30, "Klikni!" );
win.end();
but.callback( but_cb );
win.show();
return Fl::run();
}

3) *Kompiliraj:* fltk-config --compile fltk1.cpp

4) *Izvrši program:* ./fltk1

5) *Uči više:* http://www3.telus.net/public/robark/

--
ɹɥ˙ʇǝuʇɥ˙ƃz@ɐɹɐʌɐɔ˙ɐʞnן
0 new messages