ScummVM API documentation
onscreendialog.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 GUI_ONSCREENDIALOG_H
23 #define GUI_ONSCREENDIALOG_H
24 
25 #include "gui/dialog.h"
26 #include "gui/widget.h"
27 
28 namespace GUI {
29 
30 class OnScreenDialog : public Dialog {
31 private:
32  uint32 _lastTime;
33  bool _enableDrag;
34  bool _mouseOver;
35  bool _editDlgShown;
36  Common::Point _dragPoint;
37  GUI::StaticTextWidget *_text;
38  Dialog *_dlg;
39 
40  bool isMouseOver(int x, int y);
41 
42 public:
43  OnScreenDialog(bool recordingMode);
44  ~OnScreenDialog() override;
45  void close() override;
46  bool isVisible() const override;
47  void reflowLayout() override;
48 
49  void setReplayedTime(uint32 newTime);
50 
51  void handleMouseMoved(int x, int y, int button) override;
52  void handleMouseDown(int x, int y, int button, int clickCount) override;
53  void handleMouseUp(int x, int y, int button, int clickCount) override;
54  void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
55 
56  bool isMouseOver();
57  bool isEditDlgVisible();
58  Dialog *getActiveDlg();
59 protected:
60  void releaseFocus() override;
61 };
62 
63 } // End of namespace GUI
64 
65 #endif
Definition: widget.h:205
Definition: system.h:46
Definition: rect.h:45
Definition: dialog.h:49
Definition: onscreendialog.h:30
Definition: object.h:40