Methods for getting the zoom state.

This commit is contained in:
fendrin 2013-04-01 03:54:42 +02:00
parent 9cf3f41291
commit a759792595
2 changed files with 13 additions and 0 deletions

View file

@ -1817,6 +1817,16 @@ bool display::scroll(int xmove, int ymove, bool force)
return true;
}
bool display::zoom_at_max() const
{
return zoom_ == MaxZoom;
}
bool display::zoom_at_min() const
{
return zoom_ == MinZoom;
}
void display::set_zoom(int amount)
{
int new_zoom = zoom_ + amount;

View file

@ -480,6 +480,9 @@ public:
*/
void set_zoom(int amount);
bool zoom_at_max() const;
bool zoom_at_min() const;
/** Sets the zoom amount to the default. */
void set_default_zoom();