fltk::TabGroupPager Class Reference

Inherited by MenuTabPager, and ShrinkTabPager.

List of all members.


Detailed Description

This Helper class defines generically the TabGroup behavior when there is more tabs than available horizontal width, i.e it can generates a popup menu or shrink It opens the door to new Pagers creation as left- rights arrows scrolling pagers and others ... To create a new pager, inherits from TabGroupPager and redefines the pure virtual methods of this template.

Public Member Functions

virtual int available_width (TabGroup *g) const
void border (int v)
int border () const
virtual TabGroupPagerclone () const =0
virtual bool draw_tabs (TabGroup *g, int selected, int *tab_pos, int *tab_width)
void extra_space (int v)
int extra_space () const
virtual int id () const =0
virtual const char * mode_name () const =0
void noclip (bool v)
void shift (int v)
int shift () const
void slope (int v)
int slope () const
int spacing () const
virtual int update_positions (TabGroup *g, int numchildren, int &selected, int &cumulated_width, int &available_width, int *tab_pos, int *tab_width)
virtual int which (TabGroup *g, int m_x, int m_y)=0

Member Function Documentation

int TabGroupPager::available_width ( TabGroup g  )  const [virtual]

return max width available for drawing tab thumbnails

References fltk::Rectangle::w().

virtual TabGroupPager* fltk::TabGroupPager::clone (  )  const [pure virtual]

virtual copy from a prototype

Referenced by fltk::TabGroup::default_pager(), fltk::TabGroup::pager(), and fltk::TabGroup::TabGroup().

virtual bool fltk::TabGroupPager::draw_tabs ( TabGroup g,
int  selected,
int *  tab_pos,
int *  tab_width 
) [inline, virtual]

draw the tabs for this custom pager, return false means no custom draw is made

void fltk::TabGroupPager::noclip ( bool  v  )  [inline]

determines if we forbid partial tabs drawing with clipping

int fltk::TabGroupPager::shift (  )  const [inline]

shifting to nth+1 tab to draw, permit to 'keep' a position while changing tabs and tab is in the interval

virtual int fltk::TabGroupPager::update_positions ( TabGroup g,
int  numchildren,
int &  selected,
int &  cumulated_width,
int &  available_width,
int *  tab_pos,
int *  tab_width 
) [inline, virtual]

this method must update the tab positions and width array, returns the selected tab

virtual int fltk::TabGroupPager::which ( TabGroup g,
int  m_x,
int  m_y 
) [pure virtual]

determine and return the index of the child group at the corresponding pos

Referenced by fltk::TabGroup::which().


Wed Sep 10 02:47:48 2008. FLTK ©2007 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.