Minsky
equationDisplay.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2023
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef EQUATION_DISPLAY_H
21 #define EQUATION_DISPLAY_H
22 #include "renderNativeWindow.h"
23 #include "classdesc_access.h"
24 
25 namespace minsky
26 {
27  class Minsky;
28  // handle the display of rendered equations on the screen
30  {
32  double m_width=0, m_height=0;
33  bool redraw(int x0, int y0, int width, int height) override;
35  public:
36  float offsx=0, offsy=0, m_zoomFactor=1 ; // pan & zooming controls
37  double width() const {return m_width;}
38  double height() const {return m_height;}
41  EquationDisplay(const EquationDisplay&)=default;
42  void requestRedraw() {if (surface.get()) surface->requestRedraw();}
43  bool hasScrollBars() const override {return true;}
44  };
45 
46 }
47 
48 #include "equationDisplay.cd"
49 #endif
EquationDisplay & operator=(const EquationDisplay &x)
bool redraw(int x0, int y0, int width, int height) override
bool hasScrollBars() const override
return whether this window has scrollbars (needed for MacOSX).
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky&#39;s state cha...
Definition: constMap.h:22
CLASSDESC_ACCESS(EquationDisplay)
RenderNativeWindow & operator=(const RenderNativeWindow &x)