FLTK logo

Re: [fltk.general] Re: can I change the default attributes so I can set"global attributes"

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: can I change the default attributes so I can set"global attributes" roger tunnicliffe Oct 01, 2022  
  My apologies, I am new to Fltk.
What I meant was....
I have a project/system/executable (whatever you want to call it) and it might comprise of 2 or windows and lots of widgets. 
Instead of having to set - say the fontsize (or color or any other attribute) - individually I want to be able to say "make all font sizes 11".
I know that they seem to default to 14 (correct me if i am wrong) so there must be some way to do it.
Does that make it any clearer. ?

Thanks in advance.
Cheers
Roger


On Saturday, October 1, 2022 at 10:12:27 PM UTC+10 Ian MacArthur wrote:
On 1 Oct 2022, at 13:07, Albrecht Schlosser wrote:
>
> On 10/1/22 12:38 Ian MacArthur wrote:
>> I suppose it wouldn’t be that tricky to write a loop that would take a window pointer, loop through all it’s children and set the face / size for each?
>
> Probably not possible w/o RTTI since not all widgets support all text/font related settings in the same way. The basics like textsize() and labelsize() would certainly work (i.e. all methods that are defined in Fl_Widget) but I doubt that this would be enough.

Yeah, fair enough.
I was really only thinking about the properties inherited from Fl_Widget, but there may well be others you’d want to set “globally” per-window and that could get complicated really fast...
The basics, like font settings, might still be “trivial” though.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/299b3b25-6e08-4fb9-ab7d-64c96a05e714n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.