[fltk.general] Re: Custom background for fltk widget

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: Custom background for fltk widget Ian MacArthur 03:31 Oct 04 top right image
 
On Sunday, 3 October 2021 at 16:16:33 UTC+1 anmol.... wrote:

However, for other classes - like Fl_Text_Editor and Fl_help_View this method is not useful as these are not derived from Fl_Image

Yes... this is beyond what the "complex" fltk widgets will support. The "fast and light" ethos means these widgets don't have any way to do that really... I'm not sure about Fl_Help_View, but for Fl_Text_Editor, you'd basically have to derive your own class, then implement the ::draw and ::draw_*** methods yourself (copying the draw_*** code from Fl_Text_Display) and create a suitable background surface that way.
But even that would be a lot of work - there are several ::draw_*** methods involved, several of which will overwrite the background (text strings in the fltk text editor have both foreground and background attributes) so it would be hard to make that work out well, I suspect.

I'd speculate that, if you need that sort of visual effect, one of the more elaborate GUI toolkits might be your better choice, TBH, as they may have that ability already.

--
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/3a10f3b1-2f68-4ed3-85e8-13617f337d57n%40googlegroups.com.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

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