Forum > General
is there any interest in fltk (Fast Light Toolkit)?
toby:
sure, i'd be glad to try to help
if we could get this to run in fpc - i think it would be a great first step
--- Code: C [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---/* Build with: g++ test.cpp -o test -lfltk */ // for fltk /tmp highlight bug #include <cstdlib>#include <unistd.h> #include <FL/Fl.H>#include <FL/Fl_Window.H>#include <FL/Fl_Button.H>#include <FL/Fl_File_Chooser.H> void cb_file_select(Fl_Widget *o, void *v){ char msg[256]; char *newfile = fl_file_chooser("Choose a file", NULL, NULL); if (newfile != NULL) { sprintf(msg, "You choose %s", newfile); fl_message(msg); }} int main (int argc, char ** argv){// chdir("/tmp");// chdir("/html");// Fl_Window *window = new Fl_Window(300, 300, 200, 200, "Foo"); Fl_Window *window = new Fl_Window(300, 300, 200, 200, "fltk.c++"); Fl_Button *button = new Fl_Button(60, 40, 80, 40, "Select file"); button->callback(cb_file_select); window->end(); window->show(argc, argv); return(Fl::run());}
a simple lib unit fltku.pas as first step?
marcov:
--- Quote from: toby on July 09, 2024, 06:25:21 pm ---\
--- Code: C [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---... Fl_Window *window = new Fl_Window(300, 300, 200, 200, "fltk.c++");...
a simple lib unit fltku.pas as first step?
--- End quote ---
That is not plain C but C++, and as Thaddy said that cannot be represented in FPC.
toby:
you astutely observered that this program is indeed written in c++
i gave that program as a simple fltk example program that i would like to have fpc duplicate functionally using the fltk c library
Thaddy did not say
'as Thaddy said that cannot be represented in FPC.'
didn't you write the CinFreePascal.pdf?
so what you are implying seems to me to contradict your section 4 in your pdf
in fact i have a fpc that runs c++ library code - it is called hello.c++ and i got it from your document
PascalDragon:
--- Quote from: toby on July 09, 2024, 10:36:26 pm ---you astutely observered that this program is indeed written in c++
i gave that program as a simple fltk example program that i would like to have fpc duplicate functionally using the fltk c library
Thaddy did not say
'as Thaddy said that cannot be represented in FPC.'
didn't you write the CinFreePascal.pdf?
so what you are implying seems to me to contradict your section 4 in your pdf
in fact i have a fpc that runs c++ library code - it is called hello.c++ and i got it from your document
--- End quote ---
If you would have read CInFreePascal.pdf you'd know that you'd need to write wrapper code in C or C++ to provided flattened C code so that FPC can correctly import it.
toby:
not only did i read the pdf but i did all the coding in it - i know full well what was needed to 'wrap' c and c++ libraries and i even did the c libapl to work with fpc
didn't you bother reading that i did the hello.c++ code from the pdf?
Navigation
[0] Message Index
[#] Next page
[*] Previous page