Manages zoom factors. Will always provide a new zoom when forward() called, using fwdFac(). For back, will stop at initial.
More...
Manages zoom factors. Will always provide a new zoom when forward() called, using fwdFac(). For back, will stop at initial.
FlatView::ZoomMgr::ZoomMgr |
( |
| ) |
|
FlatView::ZoomMgr::~ZoomMgr |
( |
| ) |
|
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
-
onlyvertical | if true, only the height of current size is multiplied by 1/fwdfac_ to get new size. |
usefwdfac | if 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
-
onlyvertical | if true, only the height of current size is multiplied by fwdfac_ to get new size. |
usefwdfac | if 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 |
Point FlatView::ZoomMgr::initialCenter |
( |
int |
vieweridx = 0 | ) |
const |
Size FlatView::ZoomMgr::initialSize |
( |
int |
vieweridx = 0 | ) |
const |
int FlatView::ZoomMgr::nrZooms |
( |
int |
vieweridx = 0 | ) |
const |
Will try to keep as many zooms as possible.
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.
TypeSet<int> FlatView::ZoomMgr::current_ |
|
mutableprotected |
double FlatView::ZoomMgr::fwdfac_ |
|
protected |