Source Code (Use browser search to find items of interest.)
Class Index
khexedit'SPagePosition (./kdeutils/khexedit/hexbuffer.h:182)
struct SPagePosition
{
SPagePosition( time_t now, uint numLine, uint linePerPage )
{
init( now, numLine, linePerPage );
}
SPagePosition( void )
{
init( 0, 1, 1 );
}
void init( time_t at, uint numLine, uint linePerPage )
{
if( linePerPage == 0 ) { linePerPage = 1; }
now = at;
curPage = 1;
maxPage = numLine / linePerPage + (numLine % linePerPage ? 1 : 0);
if( maxPage < curPage ) { maxPage = curPage; }
}
void step( uint stepSize=1 )
{
curPage += stepSize;
if( curPage > maxPage ) { curPage = maxPage; }
}
uint current( void )
{
return( curPage );
}
uint max( void )
{
return( maxPage );
}
uint curPage;
uint maxPage;
time_t now;
};