OpendTect  7.0
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::Point2D< double > Point
 
typedef Geom::Size2D< double > Size
 

Public Member Functions

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

Protected Attributes

TypeSet< int > current_
 
double fwdfac_
 
ObjectSet< ViewerZoomDataviewerdata_
 

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

◆ Point

◆ Size

Constructor & Destructor Documentation

◆ ZoomMgr()

FlatView::ZoomMgr::ZoomMgr ( )

◆ ~ZoomMgr()

FlatView::ZoomMgr::~ZoomMgr ( )

Member Function Documentation

◆ add()

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.

◆ atStart()

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

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

◆ back()

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

Never past initial zoom.

Parameters
vieweridx
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.

◆ current()

Size FlatView::ZoomMgr::current ( int  vieweridx = 0) const

◆ forward()

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

Goes on and on.

Parameters
vieweridx
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.

◆ fwdFac()

double FlatView::ZoomMgr::fwdFac ( ) const
inline

◆ init() [1/2]

void FlatView::ZoomMgr::init ( const Geom::PosRectangle< double > &  )

◆ init() [2/2]

void FlatView::ZoomMgr::init ( const TypeSet< Geom::PosRectangle< double > > &  )

◆ initialCenter()

Point FlatView::ZoomMgr::initialCenter ( int  vieweridx = 0) const

◆ initialSize()

Size FlatView::ZoomMgr::initialSize ( int  vieweridx = 0) const

◆ nrZooms()

int FlatView::ZoomMgr::nrZooms ( int  vieweridx = 0) const

◆ reInit() [1/2]

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

Will try to keep as many zooms as possible.

◆ reInit() [2/2]

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

◆ setFwdFac()

void FlatView::ZoomMgr::setFwdFac ( double  fac)

fwdfac_ should be greater than zero and less than one.

◆ setNrViewers()

void FlatView::ZoomMgr::setNrViewers ( int  )

◆ toStart()

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

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

Member Data Documentation

◆ current_

TypeSet<int> FlatView::ZoomMgr::current_
mutableprotected

◆ fwdfac_

double FlatView::ZoomMgr::fwdfac_
protected

◆ viewerdata_

ObjectSet<ViewerZoomData> FlatView::ZoomMgr::viewerdata_
protected

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