ScummVM API documentation
pet_remote_glyphs.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 TITANIC_PET_REMOTE_GLYPHS_H
23 #define TITANIC_PET_REMOTE_GLYPHS_H
24 
25 #include "titanic/pet_control/pet_glyphs.h"
26 #include "titanic/pet_control/pet_gfx_element.h"
27 
28 namespace Titanic {
29 
30 enum RemoteGlyph {
31  GLYPH_SUMMON_ELEVATOR = 0, GLYPH_SUMMON_PELLERATOR = 1,
32  GLYPH_TELEVISION_CONTROL = 2, GLYPH_ENTERTAINMENT_DEVICE = 3,
33  GLYPH_OPERATE_LIGHTS = 4, GLYPH_DEPLOY_FLORAL = 5,
34  GLYPH_DEPLOY_FULLY_RELAXATION = 6, GLYPH_DEPLOY_COMFORT = 7,
35  GLYPH_DEPLOY_MINOR_STORAGE = 8, GLYPH_DEPLOY_MAJOR_RELAXATION = 9,
36  GLYPH_INFLATE_RELAXATION = 10, GLYPH_DEPLOY_MAINTENANCE = 11,
37  GLYPH_DEPLOY_WORK_SURFACE = 12, GLYPH_DEPLOY_MINOR_RELAXATION = 13,
38  GLYPH_DEPLOY_SINK = 14, GLYPH_DEPLOY_MAJOR_STORAGE = 15,
39  GLYPH_SUCCUBUS_DELIVERY = 16, GLYPH_NAVIGATION_CONTROLLER = 17,
40  GLYPH_SKIP_NAVIGATION = 18, GLYPH_GOTO_BOTTOM_OF_WELL = 19,
41  GLYPH_GOTO_TOP_OF_WELL = 20, GLYPH_GOTO_STATEROOM = 21,
42  GLYPH_GOTO_BAR = 22, GLYPH_GOTO_PROMENADE = 23, GLYPH_GOTO_ARBORETUM = 24,
43  GLYPH_GOTO_MUSIC_ROOM = 25, GLYPH_GOTO_RESTAURANT = 26
44 };
45 
46 enum RemoteMessage {
47  RMSG_LEFT = 0, RMSG_RIGHT = 1, RMSG_UP = 2, RMSG_DOWN = 3, RMSG_ACTIVATE = 4
48 };
49 
50 class CPetRemote;
51 
52 class CPetRemoteGlyphs : public CPetGlyphs {
53 public:
57  CPetRemote *getOwner() const;
58 
62  void generateMessage(RemoteMessage msgNum, const CString &name, int num = -1);
63 };
64 
65 class CPetRemoteGlyph : public CPetGlyph {
66 protected:
67  CPetGfxElement *_callButton;
68 protected:
69  CPetRemoteGlyph() : CPetGlyph(), _callButton(nullptr) {}
70 
74  void setDefaults(const CString &name, CPetControl *petControl);
75 
79  CPetRemoteGlyphs *getOwner() const;
80 
84  CPetGfxElement *getElement(uint id) const;
85 };
86 
88 private:
89  CString _gfxName, _tooltip, _msgString;
90 public:
91  CBasicRemoteGlyph(const CString &gfxName, const CString &tooltip,
92  const CString &msgString) : CPetRemoteGlyph(),
93  _gfxName(gfxName), _tooltip(tooltip), _msgString(msgString) {}
94 
98  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
99 
103  void draw2(CScreenManager *screenManager) override;
104 
108  bool MouseButtonDownMsg(const Point &pt) override;
109 
113  bool MouseButtonUpMsg(const Point &pt) override;
114 
118  void getTooltip(CTextControl *text) override;
119 };
120 
122 protected:
123  CPetGfxElement *_toggle;
124  bool _toggleFlag;
125 public:
126  CToggleRemoteGlyph() : CPetRemoteGlyph(), _toggle(nullptr), _toggleFlag(false) {}
127 
131  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
132 
136  void draw2(CScreenManager *screenManager) override;
137 
141  bool elementMouseButtonDownMsg(const Point &pt, int petNum);
142 
146  bool elementMouseButtonUpMsg(const Point &pt, int petNum);
147 };
148 
150 protected:
151  int _roomIndex;
152  CPetGfxElement *_goButton;
153  CString _gfxName, _tooltip;
154 public:
155  CRemoteGotoGlyph() : CPetRemoteGlyph(), _goButton(nullptr), _roomIndex(21) {}
156  CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip, int roomIndex) :
157  CPetRemoteGlyph(), _gfxName(gfxName), _tooltip(tooltip), _roomIndex(roomIndex),
158  _goButton(nullptr) {}
159 
163  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
164 
168  void draw2(CScreenManager *screenManager) override;
169 
173  bool MouseButtonDownMsg(const Point &pt) override;
174 
178  bool MouseButtonUpMsg(const Point &pt) override;
179 
183  void getTooltip(CTextControl *text) override;
184 };
185 
187 public:
189 };
190 
192 public:
194 };
195 
197 private:
198  bool _flag;
199  CPetGfxElement *_up, *_down, *_onOff;
200 public:
201  CTelevisionControlGlyph() : CPetRemoteGlyph(), _flag(false),
202  _up(nullptr), _down(nullptr), _onOff(nullptr) {}
203 
207  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
208 
212  void draw2(CScreenManager *screenManager) override;
213 
217  bool MouseButtonDownMsg(const Point &pt) override;
218 
222  bool MouseButtonUpMsg(const Point &pt) override;
223 
227  void getTooltip(CTextControl *text) override;
228 };
229 
231 public:
232  bool _flag2;
233  CPetGfxElement *_up, *_down;
234 public:
236  _flag2(false), _up(nullptr), _down(nullptr) {}
237 
241  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
242 
246  void draw2(CScreenManager *screenManager) override;
247 
251  bool MouseButtonDownMsg(const Point &pt) override;
252 
256  bool MouseButtonUpMsg(const Point &pt) override;
257 
261  void getTooltip(CTextControl *text) override;
262 };
263 
264 
266 public:
267  CPetGfxElement *_left, *_right, *_up, *_down, *_activate;
268 public:
269  COperateLightsGlyph() : CPetRemoteGlyph(), _left(nullptr), _right(nullptr),
270  _up(nullptr), _down(nullptr), _activate(nullptr) {}
271 
275  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
276 
280  void draw2(CScreenManager *screenManager) override;
281 
285  bool MouseButtonDownMsg(const Point &pt) override;
286 
290  bool MouseButtonUpMsg(const Point &pt) override;
291 
295  void getTooltip(CTextControl *text) override;
296 };
297 
299 public:
303  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
304 
308  bool MouseButtonDownMsg(const Point &pt) override {
309  return elementMouseButtonDownMsg(pt, 0);
310  }
311 
315  bool MouseButtonUpMsg(const Point &pt) override {
316  return elementMouseButtonUpMsg(pt, 0);
317  }
318 
322  void getTooltip(CTextControl *text) override;
323 };
324 
326 public:
330  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
331 
335  bool MouseButtonDownMsg(const Point &pt) override {
336  return elementMouseButtonDownMsg(pt, 1);
337  }
338 
342  bool MouseButtonUpMsg(const Point &pt) override {
343  return elementMouseButtonUpMsg(pt, 1);
344  }
345 
349  void getTooltip(CTextControl *text) override;
350 };
351 
353 public:
357  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
358 
362  bool MouseButtonDownMsg(const Point &pt) override {
363  return elementMouseButtonDownMsg(pt, 2);
364  }
365 
369  bool MouseButtonUpMsg(const Point &pt) override {
370  return elementMouseButtonUpMsg(pt, 2);
371  }
372 
376  void getTooltip(CTextControl *text) override;
377 };
378 
380 public:
384  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
385 
389  bool MouseButtonDownMsg(const Point &pt) override {
390  return elementMouseButtonDownMsg(pt, 3);
391  }
392 
396  bool MouseButtonUpMsg(const Point &pt) override {
397  return elementMouseButtonUpMsg(pt, 3);
398  }
399 
403  void getTooltip(CTextControl *text) override;
404 };
405 
407 public:
411  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
412 
416  bool MouseButtonDownMsg(const Point &pt) override {
417  return elementMouseButtonDownMsg(pt, 5);
418  }
419 
423  bool MouseButtonUpMsg(const Point &pt) override {
424  return elementMouseButtonUpMsg(pt, 5);
425  }
426 
430  void getTooltip(CTextControl *text) override;
431 };
432 
434 public:
438  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
439 
443  bool MouseButtonDownMsg(const Point &pt) override {
444  return elementMouseButtonDownMsg(pt, 6);
445  }
446 
450  bool MouseButtonUpMsg(const Point &pt) override {
451  return elementMouseButtonUpMsg(pt, 6);
452  }
453 
457  void getTooltip(CTextControl *text) override;
458 };
459 
461 public:
465  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
466 
470  bool MouseButtonDownMsg(const Point &pt) override {
471  return elementMouseButtonDownMsg(pt, 7);
472  }
473 
477  bool MouseButtonUpMsg(const Point &pt) override {
478  return elementMouseButtonUpMsg(pt, 7);
479  }
480 
484  void getTooltip(CTextControl *text) override;
485 };
486 
488 public:
492  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
493 
497  bool MouseButtonDownMsg(const Point &pt) override {
498  return elementMouseButtonDownMsg(pt, 8);
499  }
500 
504  bool MouseButtonUpMsg(const Point &pt) override {
505  return elementMouseButtonUpMsg(pt, 8);
506  }
507 
511  void getTooltip(CTextControl *text) override;
512 };
513 
515 public:
519  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
520 
524  bool MouseButtonDownMsg(const Point &pt) override {
525  return elementMouseButtonDownMsg(pt, 9);
526  }
527 
531  bool MouseButtonUpMsg(const Point &pt) override {
532  return elementMouseButtonUpMsg(pt, 9);
533  }
534 
538  void getTooltip(CTextControl *text) override;
539 };
540 
542 public:
546  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
547 
551  bool MouseButtonDownMsg(const Point &pt) override {
552  return elementMouseButtonDownMsg(pt, 10);
553  }
554 
558  bool MouseButtonUpMsg(const Point &pt) override {
559  return elementMouseButtonUpMsg(pt, 10);
560  }
561 
565  void getTooltip(CTextControl *text) override;
566 };
567 
569 public:
573  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
574 
578  bool MouseButtonDownMsg(const Point &pt) override {
579  return elementMouseButtonDownMsg(pt, 11);
580  }
581 
585  bool MouseButtonUpMsg(const Point &pt) override {
586  return elementMouseButtonUpMsg(pt, 11);
587  }
588 
592  void getTooltip(CTextControl *text) override;
593 };
594 
596 private:
597  CPetGfxElement *_send, *_receive;
598 public:
600  _send(nullptr), _receive(nullptr) {}
601 
605  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
606 
610  void draw2(CScreenManager *screenManager) override;
611 
615  bool MouseButtonDownMsg(const Point &pt) override;
616 
620  bool MouseButtonUpMsg(const Point &pt) override;
621 
625  void getTooltip(CTextControl *text) override;
626 };
627 
629 private:
630  bool _flag;
631  CPetGfxElement *_gfxElement;
632 public:
634  _flag(false), _gfxElement(nullptr) {}
635 
639  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
640 
644  void draw2(CScreenManager *screenManager) override;
645 
649  bool MouseButtonDownMsg(const Point &pt) override;
650 
654  bool MouseButtonUpMsg(const Point &pt) override;
655 
659  void getTooltip(CTextControl *text) override;
660 };
661 
663 public:
665 };
666 
668 public:
670 };
671 
673 public:
675 };
676 
678 public:
679  CGotoBarGlyph();
680 };
681 
683 public:
685 };
686 
688 public:
690 };
691 
693 public:
695 };
696 
698 public:
700 };
701 
703 protected:
704  CPetGfxElement *_button;
705 public:
706  CSkipNavigationGlyph() : CPetRemoteGlyph(), _button(nullptr) {}
707 
711  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
712 
716  void draw2(CScreenManager *screenManager) override;
717 
721  bool MouseButtonDownMsg(const Point &pt) override;
722 
726  bool MouseButtonUpMsg(const Point &pt) override;
727 
731  void getTooltip(CTextControl *text) override;
732 };
733 
734 } // End of namespace Titanic
735 
736 #endif /* TITANIC_PET_REMOTE_GLYPHS_H */
Definition: pet_remote_glyphs.h:196
Definition: pet_remote_glyphs.h:325
Definition: pet_remote_glyphs.h:672
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:558
Definition: pet_remote_glyphs.h:460
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:396
Definition: pet_remote_glyphs.h:677
Definition: text_control.h:35
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:389
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:470
Definition: pet_remote_glyphs.h:406
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:578
Definition: pet_remote_glyphs.h:230
Definition: pet_remote_glyphs.h:433
Definition: pet_remote_glyphs.h:667
Definition: pet_remote_glyphs.h:692
Definition: pet_remote_glyphs.h:298
Definition: pet_remote_glyphs.h:379
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:308
Definition: pet_remote_glyphs.h:514
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:369
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:423
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:477
Definition: pet_remote_glyphs.h:265
Definition: pet_remote_glyphs.h:682
Definition: pet_remote_glyphs.h:87
Definition: pet_remote_glyphs.h:191
Definition: screen_manager.h:49
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:551
Definition: pet_gfx_element.h:29
Definition: pet_remote_glyphs.h:702
Definition: pet_remote.h:33
Definition: pet_glyphs.h:53
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:504
Definition: pet_remote_glyphs.h:541
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:450
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:416
Definition: pet_remote_glyphs.h:662
Definition: pet_remote_glyphs.h:121
Definition: rect.h:45
Definition: arm.h:30
Definition: string.h:40
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:585
Definition: pet_glyphs.h:244
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:315
virtual void setup(int numVisible, CPetSection *owner)
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:362
Definition: pet_remote_glyphs.h:52
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:335
CPetRemote * getOwner() const
Definition: pet_remote_glyphs.h:487
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:497
Definition: pet_remote_glyphs.h:352
Definition: pet_remote_glyphs.h:186
bool MouseButtonDownMsg(const Point &pt)
bool MouseButtonUpMsg(const Point &pt)
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:443
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:531
Definition: pet_remote_glyphs.h:595
bool MouseButtonUpMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:342
Definition: pet_remote_glyphs.h:149
Definition: pet_remote_glyphs.h:687
bool MouseButtonDownMsg(const Point &pt) override
Definition: pet_remote_glyphs.h:524
void generateMessage(RemoteMessage msgNum, const CString &name, int num=-1)
Definition: pet_remote_glyphs.h:65
Definition: pet_remote_glyphs.h:628
Definition: pet_control.h:45
Definition: pet_remote_glyphs.h:568
Definition: pet_remote_glyphs.h:697