Re: [fltk.general] 'Smart' label text truncating

2010-07-19 Thread dimatura
> Greg Ercolano wrote: > > dimatura wrote: > >> So I'm wondering if there's a way to find out at runtime the width of a > >> label > > > > There's a few: > > > > fl_measure(): > > > > http://fltk.org/doc-1.3/group__fl__drawings.html#gccd92d0c0521b0aac30dcb856d438dcd > > > > fl_tex

Re: [fltk.general] Fl_File_Icon how to use?

2010-07-19 Thread Duncan Gibson
> md houssy wrote: > snip Ian: > snip Is it just me or is there something slightly weird going on? AFAICT, the original post from md houssy did not show up in the forum [yet?], but Ian's reply did. I will need to check the ML when I get to work tomorrow. This isn't the first time. D. ___

Re: [fltk.general] 'Smart' label text truncating

2010-07-19 Thread imacart...@gmail.com
Greg Ercolano wrote: > dimatura wrote: >> So I'm wondering if there's a way to find out at runtime the width of a label > > There's a few: > > fl_measure(): > > http://fltk.org/doc-1.3/group__fl__drawings.html#gccd92d0c0521b0aac30dcb856d438dcd > > fl_text_extents() >

Re: [fltk.general] Fl_File_Icon how to use?

2010-07-19 Thread imacart...@gmail.com
md houssy wrote: > I have to use icons so I found FL_File Icon class, but I don't know > how to use it, shall I use the constructor or load directly? for the > constructor I didn't understand the parameters needed ? > > > Fl_File_Icon::Fl_File_Icon(const char *p,/* I - Filename pattern > */ i

Re: [fltk.general] 'Smart' label text truncating

2010-07-19 Thread dimatura
> dimatura wrote: > > So I'm wondering if there's a way to find out at runtime the width of a > > label > > There's a few: > > fl_measure(): > > http://fltk.org/doc-1.3/group__fl__drawings.html#gccd92d0c0521b0aac30dcb856d438dcd > > fl_text_extents() > > http://fltk.

Re: [fltk.general] 'Smart' label text truncating

2010-07-19 Thread Greg Ercolano
dimatura wrote: > So I'm wondering if there's a way to find out at runtime the width of a label There's a few: fl_measure(): http://fltk.org/doc-1.3/group__fl__drawings.html#gccd92d0c0521b0aac30dcb856d438dcd fl_text_extents() http://fltk.org/doc-1.3/grou

[fltk.general] Fl_File_Icon how to use?

2010-07-19 Thread md houssy
I have to use icons so I found FL_File Icon class, but I don't know how to use it, shall I use the constructor or load directly? for the constructor I didn't understand the parameters needed ? Fl_File_Icon::Fl_File_Icon(const char *p,/* I - Filename pattern */

[fltk.general] 'Smart' label text truncating

2010-07-19 Thread dimatura
Hi all, I used FLTK 1.1.x to make a simple taskbar for the Ratpoison window manager. It's hosted at http://github.com/dimatura/rpbar . It works fine, but it's still pretty beta. One of the hacks in the code relates to the clipping behavior for the labels. I'll explain. Here's a screenshot: htt

[fltk.general] (no subject)

2010-07-19 Thread md houssy
I have to use icons so I found FL_File Icon class, but I don't know how to use it, shall I use the constructor or load directly? for the constructor I didn't understand the parameters needed ? Fl_File_Icon::Fl_File_Icon(const char *p,/* I - Filename pattern */

Re: [fltk.general] Callbacks are not executed concurrently, right?

2010-07-19 Thread Matthias Melcher
On 19.07.2010, at 06:01, dimatura wrote: > >> If you need to do some really *looong* processing, don't do it from a >> callback, find some other way to manage it (I usually spin of a worker >> thread) to ensure that the GUI stays alive. >> > > Thanks for the answer. By the way, what do you use

Re: [fltk.general] Callbacks are not executed concurrently, right?

2010-07-19 Thread Matthias Melcher
On 19.07.2010, at 06:01, dimatura wrote: > >> If you need to do some really *looong* processing, don't do it from a >> callback, find some other way to manage it (I usually spin of a worker >> thread) to ensure that the GUI stays alive. >> > > Thanks for the answer. By the way, what do you use

Re: [fltk.general] How to change font and its size in a EditorWindow object ?

2010-07-19 Thread Domingo Alvarez Duarte
Here is how I managed to change font and it's size: static void set_textsize_styletable(EditorWindow *w, int fsize){ w->editor->textsize(fsize); int nStyles = sizeof(styletable) / sizeof(styletable[0]); for(int i=0; i< nStyles; i++) styletable[i].size = fsize; w->editor->redraw(); } v

Re: [fltk.general] Callbacks are not executed concurrently, right?

2010-07-19 Thread MacArthur, Ian (SELEX GALILEO, UK)
> > Thanks for the answer. By the way, what do you use for > threads? It seems FLTK doesn't have most of the things you'd > usually use with threads, like locks, monitors, etc. I used to use SAL (http://www.garret.ru/SAL) though there are a great many other similar libs that can be used. Howev