FLTK logo

STR #1844

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #1844

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:fltk1.1.x: Add a clip() method to Fl_Group
Version:1.1-current
Created By:greg.ercolano
Assigned To:mike
Fix Version:1.1-current (SVN: v5994)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 mike
08:44 Dec 15, 2007
str1844.patch
3k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 greg.ercolano
08:22 Dec 12, 2007
Regarding the "Re: Make child widget doesn't erase borders ?"
thread on fltk.general (ending 12/08/2007), it was determined that it's pretty hard to make a group clip its children.

Seems it would help folks if Fl_Group had an easy way for to let the user easily turn on clipping for the group's children.

Might be useful if Fl_Group had two new methods:

             clip(flag): enable/disable clipping. If enabled, by default
             it would clip to the widget's own xywh, so a group could
             be a child of a window, and children would clip within that
             region.

             clip(x,y,w,h): set the actual clip region for drawing
             children, so it can be smaller than xywh. If set, it would
             enable an fl_push/pop_clip around the draw_children() call.

Mike's comments on fltk.development were:

    "This should be pretty straight forward."
 
 
#2 mike
08:44 Dec 15, 2007
Fixed in Subversion repository.

Only a clip on/off method was implemented, as an X,Y,W,H method would not be binary-compatible.

That said, subclasses can do:

    fl_push_clip(X,Y,W,H);
    draw_children();
    fl_pop_clip();

when they need different kinds of clipping.
 
     

Return to Bugs & Features ]

 
 

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'.