> João Ricardo Lourenço wrote:
> > As there is no close-tab button, I am trying to implement a button that 
> > does the job.
>
>      Is this basically just adding an 'x' button to the tabs,
>      similar to Firefox's tabs? eg:
>
>          _______________     _______________      _______________
>         /  tab1       X \   / tab2        X \    / tab2        X \
>      __/                 \_/_________________\__/_________________\______
>     |                                                                    |
>
>
>     I imagine the idea would be when you click the 'X', it would basically
>     remove the FLTK group from the tab widget (each tab is usually a separate
>     FLTK group).
>
>     Sounds pretty straight forward. The tabs widget isn't that complicated,
>     so you can probably easily just nab a copy of it and add the button.

Not exactly, I think (re-read: I _think_) adding a button  to the tab would be 
harder and would require me to learn deeper drawing stuff in fltk.

Also, I am currently working with fltk2, so it isn't exactly Fl_Tabs, although 
it seems they are similar, I'll chec them out, thanks.

What I am doing is adding a single button at the end of the tabs list:

          _______________     _______________      _______________     _____
         /  tab1         \   / tab2          \    / tab2          \    | x |
      __/                 \_/_________________\__/_________________\___|_-_|_
     |                                                                       |

SO my idea was to fool the pager into thinking the space available for drawing 
the tabs ended at the cross. Something like:

          _______________     _______________      _______________     _____
         /  tab1         \   / tab2          \    / tab2          \    | x |
      __/                 \_/_________________\__/_________________\___|_-_|_
     |                                                                       |
     <=_______________(fake) Available Width_________________________=>
     <=_______Real available Width, page extended to this___________________=>

I _still_ think messing with update_positions could help, but I couldn't find 
any explanatory (or maybe simple enough for me) documentation.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to