OpendTect-6_4  6.4
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
FlatView::ZoomMgr Class Reference

Manages zoom factors. Will always provide a new zoom when forward() called, using fwdFac(). For back, will stop at initial. More...

Classes

struct  ViewerZoomData
 

Public Types

typedef Geom::Size2D< double > Size
 
typedef Geom::Point2D< double > Point
 

Public Member Functions

 ZoomMgr ()
 
 ~ZoomMgr ()
 
void setNrViewers (int)
 
void init (const Geom::PosRectangle< double > &)
 
void reInit (const Geom::PosRectangle< double > &)
 Will try to keep as many zooms as possible. More...
 
void init (const TypeSet< Geom::PosRectangle< double > > &)
 
void reInit (const TypeSet< Geom::PosRectangle< double > > &)
 
void add (Size, int vieweridx=0)
 
Size current (int vieweridx=0) const
 
Size back (int vieweridx, bool onlyvertical, bool usefwdfac) const
 
Size forward (int vieweridx, bool onlyvertical, bool usefwdfac) const
 
bool atStart (int vieweridx=-1) const
 
void toStart (int vieweridx=-1) const
 
int nrZooms (int vieweridx=0) const
 
Size initialSize (int vieweridx=0) const
 
Point initialCenter (int vieweridx=0) const
 
double fwdFac () const
 
void setFwdFac (double fac)
 

Protected Attributes

TypeSet< int > current_
 
ObjectSet< ViewerZoomDataviewerdata_
 
double fwdfac_
 

Detailed Description

Manages zoom factors. Will always provide a new zoom when forward() called, using fwdFac(). For back, will stop at initial.

Member Typedef Documentation

Constructor & Destructor Documentation

FlatView::ZoomMgr::ZoomMgr ( )
FlatView::ZoomMgr::~ZoomMgr ( )

Member Function Documentation

void FlatView::ZoomMgr::add ( Size  ,
int  vieweridx = 0 
)

Will put this Size at the right place and makes it current. Also removes zooms larger than this one.

bool FlatView::ZoomMgr::atStart ( int  vieweridx = -1) const

If vieweridx is not specified, returns true only if all viewers are at start.

Size FlatView::ZoomMgr::back ( int  vieweridx,
bool  onlyvertical,
bool  usefwdfac 
) const

Never past initial zoom.

Parameters
onlyverticalif true, only the height of current size is multiplied by 1/fwdfac_ to get new size.
usefwdfacif true, multiplies current size by 1/fwdfac_ to get new size. Else returns previous size.
Size FlatView::ZoomMgr::current ( int  vieweridx = 0) const
Size FlatView::ZoomMgr::forward ( int  vieweridx,
bool  onlyvertical,
bool  usefwdfac 
) const

Goes on and on.

Parameters
onlyverticalif true, only the height of current size is multiplied by fwdfac_ to get new size.
usefwdfacif true, or if there is no zoom larger than this one, multiplies current size by fwdfac_ to get new size.
double FlatView::ZoomMgr::fwdFac ( ) const
inline
void FlatView::ZoomMgr::init ( const Geom::PosRectangle< double > &  )
void FlatView::ZoomMgr::init ( const TypeSet< Geom::PosRectangle< double > > &  )
Point FlatView::ZoomMgr::initialCenter ( int  vieweridx = 0) const
Size FlatView::ZoomMgr::initialSize ( int  vieweridx = 0) const
int FlatView::ZoomMgr::nrZooms ( int  vieweridx = 0) const
void FlatView::ZoomMgr::reInit ( const Geom::PosRectangle< double > &  )

Will try to keep as many zooms as possible.

void FlatView::ZoomMgr::reInit ( const TypeSet< Geom::PosRectangle< double > > &  )
void FlatView::ZoomMgr::setFwdFac ( double  fac)

fwdfac_ should be greater than zero and less than one.

void FlatView::ZoomMgr::setNrViewers ( int  )
void FlatView::ZoomMgr::toStart ( int  vieweridx = -1) const

If vieweridx is not specified, all viewers will be back to initial zoom.

Member Data Documentation

TypeSet<int> FlatView::ZoomMgr::current_
mutableprotected
double FlatView::ZoomMgr::fwdfac_
protected
ObjectSet<ViewerZoomData> FlatView::ZoomMgr::viewerdata_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019