]> git.mxchange.org Git - flightgear.git/blob - src/GUI/CanvasWidget.hxx
Fix windows build
[flightgear.git] / src / GUI / CanvasWidget.hxx
1 /*
2  * CanvasWidget.hxx
3  *
4  *  Created on: 03.07.2012
5  *      Author: tom
6  */
7
8 #ifndef CANVASWIDGET_HXX_
9 #define CANVASWIDGET_HXX_
10
11 #include <Main/fg_props.hxx>
12 #include <plib/pu.h>
13
14 #include <simgear/canvas/canvas_fwd.hxx>
15
16 class CanvasMgr;
17
18 class CanvasWidget:
19   public puObject
20 {
21   public:
22     CanvasWidget( int x, int y,
23                   int width, int height,
24                   SGPropertyNode* props,
25                   const std::string& module );
26     virtual ~CanvasWidget();
27
28     virtual void doHit (int button, int updown, int x, int y);
29     virtual int checkKey(int key, int updown);
30
31     virtual void setSize ( int w, int h );
32     virtual void draw(int dx, int dy);
33
34   private:
35
36     CanvasMgr  *_canvas_mgr; // TODO maybe we should store this in some central
37                              // location or make it static...
38
39     simgear::canvas::CanvasPtr _canvas;
40
41     float _last_x,
42           _last_y;
43
44     static SGPropertyNode_ptr _time,
45                               _view_height;
46 };
47
48 #endif /* CANVASWIDGET_HXX_ */