ScummVM API documentation
about.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ABOUT_DIALOG_H
23 #define ABOUT_DIALOG_H
24 
25 #include "gui/dialog.h"
26 #include "common/str.h"
27 #include "common/ustr.h"
28 #include "common/array.h"
29 #include "common/keyboard.h"
30 
31 namespace GUI {
32 
33 class EEHandler;
34 class ScrollBarWidget;
35 class ButtonWidget;
36 class FluidScroller;
37 
38 class AboutDialog : public Dialog {
39 protected:
40  float _scrollPos;
41  uint32 _scrollTime;
43  uint32 _lineHeight;
44  bool _willClose;
45  bool _autoScroll;
46 
47  int _xOff, _yOff;
48  bool _inGame;
49  bool _isDragging;
50  int _dragLastY;
51 
52  FluidScroller *_fluidScroller;
53  ScrollBarWidget *_scrollbar;
54  ButtonWidget *_closeButton;
55  Common::Rect _textRect;
56 
57  void addLine(const Common::U32String &str);
58  void buildLines();
59 
60  EEHandler *_eeHandler;
61 
62 public:
63  AboutDialog(bool inGame = false);
64  ~AboutDialog() override;
65 
66  void open() override;
67  void close() override;
68  void drawDialog(DrawLayer layerToDraw) override;
69  void handleTickle() override;
70  void handleMouseDown(int x, int y, int button, int clickCount) override;
71  void handleMouseUp(int x, int y, int button, int clickCount) override;
72  void handleMouseMoved(int x, int y, int button) override;
73  void handleMouseWheel(int x, int y, int direction) override;
74  void handleKeyDown(Common::KeyState state) override;
75  void handleKeyUp(Common::KeyState state) override;
76  void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
77 
78  void reflowLayout() override;
79 };
80 
81 } // End of namespace GUI
82 
83 #endif
Definition: array.h:52
Definition: FluidScroll.h:34
Definition: rect.h:524
Definition: scrollbar.h:34
Definition: printman.h:30
Definition: about.h:38
void drawDialog(DrawLayer layerToDraw) override
Definition: ustr.h:57
Definition: dialog.h:49
Definition: keyboard.h:294
Definition: widget.h:234
Definition: object.h:40