ScummVM API documentation
scalpel_journal.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 SHERLOCK_SCALPEL_JOURNAL_H
23 #define SHERLOCK_SCALPEL_JOURNAL_H
24 
25 #include "sherlock/journal.h"
26 #include "sherlock/saveload.h"
27 #include "common/scummsys.h"
28 #include "common/array.h"
29 #include "common/events.h"
30 #include "common/rect.h"
31 #include "common/str-array.h"
32 #include "common/stream.h"
33 
34 namespace Sherlock {
35 
36 namespace Scalpel {
37 
38 enum JournalButton {
39  BTN_NONE, BTN_EXIT, BTN_BACK10, BTN_UP, BTN_DOWN, BTN_AHEAD110, BTN_SEARCH,
40  BTN_FIRST_PAGE, BTN_LAST_PAGE, BTN_PRINT_TEXT, BTN_BACKWARD, BTN_FORWARD
41 };
42 
43 class ScalpelJournal: public Journal {
44 public:
45  Common::String _fixedTextWatsonsJournal;
46  Common::String _fixedTextExit;
47  Common::String _fixedTextBack10;
48  Common::String _fixedTextUp;
49  Common::String _fixedTextDown;
50  Common::String _fixedTextAhead10;
51  Common::String _fixedTextSearch;
52  Common::String _fixedTextFirstPage;
53  Common::String _fixedTextLastPage;
54  Common::String _fixedTextPrintText;
55 
56  Common::String _fixedTextSearchExit;
57  Common::String _fixedTextSearchBackward;
58  Common::String _fixedTextSearchForward;
59  Common::String _fixedTextSearchNotFound;
60 
61  byte _hotkeySearchExit;
62  byte _hotkeySearchBackward;
63  byte _hotkeySearchForward;
64 
65 private:
69  void loadLocations();
70 
74  void doArrows();
75 
79  int getSearchString(bool printError);
80 
84  JournalButton getHighlightedButton(const Common::Point &pt);
85 
86  Common::Rect getSearchButtonRect(int idx);
87  Common::Point getSearchButtonTextPoint(int idx);
88 public:
90  ~ScalpelJournal() override {}
91 
95  void drawInterface();
96 
101 public:
105  void drawFrame() override;
106 
110  void resetPosition() override;
111 
116  void record(int converseNum, int statementNum, bool replyOnly = false) override;
117 
118  Common::Rect getButtonRect(JournalButton btn);
119  Common::Point getButtonTextPoint(JournalButton btn);
120 };
121 
122 } // End of namespace Scalpel
123 
124 } // End of namespace Sherlock
125 
126 #endif
Definition: str.h:59
void record(int converseNum, int statementNum, bool replyOnly=false) override
Definition: animation.h:29
Definition: rect.h:524
uint32 CustomEventType
Definition: events.h:204
bool handleEvents(Common::CustomEventType action)
Definition: sherlock.h:206
Definition: rect.h:144
Definition: scalpel_journal.h:43
Definition: journal.h:50