md houssy wrote: > hi, I am workin on a GUI and I have 4 simple questions > > 1/ I wonder to have a window with a background which is transparent, > is it possible with fltk??
That depends on what you are trying to do. If you simply want to create a window that does not draw it's background, then simply setting the windows box-type to FL_NO_BOX will work. However, that's not quite the same thing as the window being transparent (this is the window having a transparent alpha.) With modern compositing window managers, it is possible to have windows with transparency in that sense, but it is not a simple thing to do in a cross-platform way and fltk does not support it directly (though you can make native system calls to attain the desired effect if necessary, of course.) > 2/ for the class Fl_Input how can we get the string passed into the > Fl_input ? Fl_input->value returns a const char*; so how can I get > all the text typed into the Fl_Input label ? I don't understand the question - a char* is a text string, it holds all the characters that are in the Fl_Input... What is it that you are asking? > 3/ can we get the size of the screen we use? That's in the docs, so I'm surprised you did not see it: Fl::w() - returns the screen width. Fl::h() - returns the screen height. Note that these return the area that the window manager deems "available" real-estate for user space programs, so will often be smaller than the full desktop area, if you have a taskbar or menubar that takes some screen area. You can also use the various Fl:screen_xywh(...) methods, which might be more useful if you have multiple monitors, as they can be used to query each separate display. > 4/ can we resize the images already downloaded? You said you had *simple* questions! This one is a hard question. I suppose the simple answer is that yes, you can resize images you have downloaded, but that there are *no* methods in fltk for doing that, so you need to provide you own image manipulation methods. As I said to you in a previous reply, it is possible to do a crude resize of an image in fltk using the image->copy() method, but it is a lossy mechanism and will probably degrade the image quality if you zoom in and out a few times. Your best bet might be to load the image into a GL texture and then let the GL driver sort out the image scaling for you as you zoom in and out, actually - that may be easier than doing a proper image interpolation thing. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

