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.
<>
◆ Point
◆ Size
◆ ZoomMgr()
FlatView::ZoomMgr::ZoomMgr |
( |
| ) |
|
◆ ~ZoomMgr()
FlatView::ZoomMgr::~ZoomMgr |
( |
| ) |
|
◆ 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 | |
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. |
◆ 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 | |
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. |
◆ fwdFac()
double FlatView::ZoomMgr::fwdFac |
( |
| ) |
const |
|
inline |
◆ init() [1/2]
◆ init() [2/2]
◆ 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]
Will try to keep as many zooms as possible.
◆ reInit() [2/2]
◆ 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.
◆ current_
TypeSet<int> FlatView::ZoomMgr::current_ |
|
mutableprotected |
◆ fwdfac_
double FlatView::ZoomMgr::fwdfac_ |
|
protected |
◆ viewerdata_