--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1. Is it possible to build a fullscreen GUI on top of a bare X11 system (no GNOME, no KDE, no desktop environment)?
2. What is the OpenGL support in FLTK best suited for (need examples)? It's not clear for me (and I couldn't find in the docs) what are the upsides and downsides for using OpenGL. And also, how is a OpenGL window, for example, different from a regular FLTK window?
Very simple 'hello world' style FLTK/OpenGL app: "draw an X"
http://seriss.com/people/erco/fltk/#OpenGlSimple
Simple mix of FLTK widgets and OpenGL "X":
http://seriss.com/people/erco/fltk/#OpenGlSimpleWidgets
Very simple static "render a 3D sphere with a single light" that doesn't move:
http://seriss.com/people/erco/fltk/#OpenGLSphereWithLight
A fully rendered and realtime animated spinning 3D cube with texture mapping:
http://seriss.com/people/erco/fltk/#OpenGLTextureMappedImage
3. How customizable are FLTK windows? Is it possible to change the visual appearance of title bars, close/minimize buttons, borders etc.?
If you want to control this yourself, you can make the FLTK window borderless, and then make the titlebar, stow/close buttons, drag behavior etc. yourself.
--
However, I couldn't make the truetype fonts work yet. What I'm doing is:
Fl::set_font(FL_SYMBOL, "verdana");
box->labelfont(FL_SYMBOL);
I tried that for several ttf fonts that I have installed (verdana, liberation, ubuntu, arial etc.) and nothing changes. And the labelsize() calls have no effect either. The only fonts that seem to work are those listed by the xlsfonts shell command, but these are X11 non-truetype fonts. I'm not sure if I need to do something special for ttf support. I use FLTK 1.3.2 compiled with the default options (and the default seems to have font support enabled).
########
You're system needs to have fontconfig enabled and have the dev packages for fontconfig and xft available.
If those dependencies are met then TT fonts should just work.
Try the font-chooser or utf8 sample demos from the test folder, and perhaps the rotated-text and unit test demos too and let us know how you get on. It sounds like fontconfig is not working for you for some reason...
--
Sent, perhaps surprisingly, from my Fairphone FP1
Atm I'm trying to find a way to specify a global font (face, size, color) for the entire app, or at least for a group of boxes (such as a Fl_Pack). It's unhandy to repeat labelfont() and labelcolor() for each label.
#############
There are a couple of ways to go with that;
- the C++ way is to derive your own widget derived from (say) Fl_Box that uses the font / size /colour you like then create all your boxes from that. Then you only have to do the settings once and all the widgets look the way you want.
- the hack sledgehammer way is to note that all widgets are set to FL_HELVETICA by default so if you use Fl:: set_font() to assign a different face to FL_HEKVETICA then *all* widgets get the new font... Similarly you can change the default values for FL_FOREGROUND_COLOR (or whatever) to change the default text colour, and so on... Less controlled than doing it "right" but OK for a quick hack!
Thanks. I try to stay away from quick hacks because sooner or later they'll turn against me or some other dev :)
## OK but it can be useful to know that the options exist, if only for the light they shed on inner workings!
So I went for the OOP way.
## I assume that worked OK?
And related to this, I think that FLTK solves too many things by inheritance. And when I derive an apparently inoffensive Fl_Box, I inherit all the tree up to the Widget base class - and you just never know when one of your methods accidentally overrides some other method up in the chain.
## not sure I understand your concern here. This is just what inheritance does and is true for any body of C++ code, or indeed for any language that implemented its flavour of OOP in that idiom. But only methods that you change are affected of course... If you are "extending" a method then you can have it call the base method then do your extensions. If you are "replacing" a method, well then you want it to override the method up the chain... What is it that is triggering your concerns here?
## I assume that worked OK?
## not sure I understand your concern here. This is just what inheritance does and is true for any body of C++ code, or indeed for any language that implemented its flavour of OOP in that idiom. But only methods that you change are affected of course... If you are "extending" a method then you can have it call the base method then do your extensions. If you are "replacing" a method, well then you want it to override the method up the chain... What is it that is triggering your concerns here?
Does anyone know if, with FLTK, it's possible to:- Use some sort of transitions (like fade-out or fade-in) when hiding / showing a widget?
- Define a widget (e.g. Fl_Box) with a semi-transparent background color (RGBA)?
- Display Unicode symbols inside text widgets? (e.g. ⌚, ☎, ✂ etc.)
Ok, thanks for your answers and information. As a side note, it seems that calling someWindow->fullscreen() has no effect on a 32-bit Fedora (20) with Gnome 3 or Mate desktops.
I'm trying to build and run a FLTK app on a command-line (non-GUI) install of Ubunutu. Everything was compiled ok, but I ran into this: Can't open display. This is probably due to lacking the xorg package (full X Windows System), although I have the libX11-dev and other libs in place (again, compilation works ok, everything is linked).Can someone briefly explain how this works (the relation among FLTKapp > FLTK > X11)? Do I need a full install of X Window System, despite the fact that I won't use it?
I just want my basic app to run in fullscreen, with no X11 window manager or anything.
Okay. So it seems that on a Ubuntu minimal server install with no X, no GUI, just the default Linux console, you only need to apt-get install the "xorg" meta packages (that is comprised of several X11-related packages/dependencies) in order to run a FLTK app. In this case, the startx command will only start the xterm emulator, as there is no window manager.
The initial Linux console in such a setup has no $DISPLAY property as it cannot handle regular graphics (and it's useless to set it to :0 or another value) so it cannot initiate directly any X-based GUI app. First you need to startx, which takes you to xterm, and from there you can execute the FLTK app binary.
####
You can always just tweak the startx script, or make a new script based on it, that spawns your fltk app instead of the xterm when it starts X.
Although I currently use no window manager, I've seen that several system widgets (scrollbars, inputs, buttons) are available. I assume FLTK uses xlib to render those. Has anyone tried to customize a default scrollbar? From what I've tried, you can set its background with color() and the arrow color with labelcolor(). I couldn't change the scrollbar tab color, however.Is there any way to do this? Or perhaps I should simulate my own scrollbar with a box and handle the FL_DRAG event from there?
Is there some way of embedding a command-line text-based program such as lynx or mutt inside a FLTK window? Thanks.