fltk::TabGroupPager Class Reference

Inherited by MenuTabPager, and ShrinkTabPager.

List of all members.

Public Member Functions

virtual int available_width (TabGroup *g) const
virtual TabGroupPagerclone () const =0
virtual bool draw_tabs (TabGroup *g, int selected, int *tab_pos, int *tab_width)
void noclip (bool v)
int shift () 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

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.

Member Function Documentation

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

return max width available for drawing tab thumbnails

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

virtual copy from a prototype

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

The documentation for this class was generated from the following files: