MythTV  master
Visible.h
Go to the documentation of this file.
1 /* Visible.h
2 
3  Copyright (C) David C. J. Matthews 2004, 2008 dm at prolingua.co.uk
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  as published by the Free Software Foundation; either version 2
8  of the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18  Or, point your browser to http://www.gnu.org/copyleft/gpl.html
19 
20 */
21 
22 #if !defined(VISIBLE_H)
23 #define VISIBLE_H
24 #include <QRegion>
25 
26 #include "Presentable.h"
27 // Dependencies
28 #include "Ingredients.h"
29 #include "Root.h"
30 #include "BaseClasses.h"
31 #include "freemheg.h"
32 
33 class MHEngine;
34 
35 class MHVisible : public MHPresentable
36 {
37  public:
38  MHVisible() = default;
39  MHVisible(const MHVisible &ref);
40  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHIngredient
41  void PrintMe(FILE *fd, int nTabs) const override; // MHIngredient
42 
43  void Preparation(MHEngine *engine) override; // MHIngredient
44  void Destruction(MHEngine *engine) override; // MHIngredient
45  void Activation(MHEngine *engine) override; // MHRoot
46  void Deactivation(MHEngine *engine) override; // MHRoot
47 
48  // Actions.
49  void SetPosition(int nXPosition, int nYPosition, MHEngine *engine) override; // MHRoot
50  void GetPosition(MHRoot *pXPosN, MHRoot *pYPosN) override; // MHRoot
51  void SetBoxSize(int nWidth, int nHeight, MHEngine *engine) override; // MHRoot
52  void GetBoxSize(MHRoot *pWidthDest, MHRoot *pHeightDest) override; // MHRoot
53  void SetPaletteRef(const MHObjectRef newPalette, MHEngine *engine) override; // MHRoot
54  void BringToFront(MHEngine *engine) override; // MHRoot
55  void SendToBack(MHEngine *engine) override; // MHRoot
56  void PutBefore(const MHRoot *pRef, MHEngine *engine) override; // MHRoot
57  void PutBehind(const MHRoot *pRef, MHEngine *engine) override; // MHRoot
58 
59  // Display function.
60  virtual void Display(MHEngine *) = 0;
61  // Get the visible region of this visible. This is the area that needs to be drawn.
62  virtual QRegion GetVisibleArea();
63  // Get the opaque area. This is the area that this visible completely obscures and
64  // is empty if the visible is drawn in a transparent or semi-transparent colour.
65  virtual QRegion GetOpaqueArea() { return QRegion(); }
66 
67  // Reset the position - used by ListGroup.
68  void ResetPosition() override // MHRoot
70 
71  protected:
72  // Exchange attributes
75  int m_nOriginalPosX {0};
76  int m_nOriginalPosY {0};
77  MHObjectRef m_OriginalPaletteRef; // Optional palette ref
78  // Internal attributes
79  int m_nBoxWidth {0};
80  int m_nBoxHeight {0};
81  int m_nPosX {0};
82  int m_nPosY {0};
84 
85  // Return the colour, looking up in the palette if necessary.
86  static MHRgba GetColour(const MHColour &colour);
87 };
88 
89 class MHLineArt : public MHVisible
90 {
91  public:
92  MHLineArt() = default;
93  MHLineArt(const MHLineArt &ref);
94  const char *ClassName() override // MHRoot
95  { return "LineArt"; }
96  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHVisible
97  void PrintMe(FILE *fd, int nTabs) const override; // MHVisible
98  // Only DynamicLineArt and Rectangle are supported
99  void Display(MHEngine *) override {} // MHVisible
100  void Preparation(MHEngine *engine) override; // MHVisible
101 
102  // Actions on LineArt
103  void SetFillColour(const MHColour &colour, MHEngine *engine) override; // MHRoot
104  void SetLineColour(const MHColour &colour, MHEngine *engine) override; // MHRoot
105  void SetLineWidth(int nWidth, MHEngine *engine) override; // MHRoot
106  void SetLineStyle(int nStyle, MHEngine *engine) override; // MHRoot
107 
108  protected:
109  // Exchanged attributes,
110  bool m_fBorderedBBox {true}; // Does it have lines round or not?
115  // Internal attributes
116  int m_nLineWidth {0};
117  int m_LineStyle {0};
119 };
120 
121 class MHRectangle : public MHLineArt
122 {
123  public:
125  MHRectangle(const MHRectangle &ref): MHLineArt(ref) {}
126  const char *ClassName() override // MHLineArt
127  { return "Rectangle"; }
128  void PrintMe(FILE *fd, int nTabs) const override; // MHLineArt
129  // Display function.
130  void Display(MHEngine *engine) override; // MHLineArt
131  QRegion GetOpaqueArea() override; // MHVisible
132  MHIngredient *Clone(MHEngine *) override // MHRoot
133  { return new MHRectangle(*this); } // Create a clone of this ingredient.
134 };
135 
136 // The Interactible class is described as a "mix-in" class. It is used
137 // in various classes which complicates inheritance.
139 {
140  public:
142  : m_parent(parent) {}
143  virtual ~MHInteractible() = default;
144  void Initialise(MHParseNode *p, MHEngine *engine);
145  void PrintMe(FILE *fd, int nTabs) const;
146 
147  virtual void Interaction(MHEngine *engine);
148 
149  // This is called whenever a key is pressed while this
150  // interactible is set to interactive.
151  virtual void KeyEvent(MHEngine * /*engine*/, int /*nCode*/) {}
152  virtual void InteractionCompleted(MHEngine * /*engine*/) {}
153 
154  void InteractSetInteractionStatus(bool newStatus, MHEngine *engine);
156  void InteractSetHighlightStatus(bool newStatus, MHEngine *engine);
158  // InteractDeactivation should be applied in every Deactivation action
159  // of derived classes.
161 
162  protected:
163  // Exchanged attributes
164  bool m_fEngineResp {true};
166  // Internal attributes
167  bool m_fHighlightStatus {false};
168  bool m_fInteractionStatus {false};
169 
170  private:
172 };
173 
174 class MHSlider : public MHVisible, public MHInteractible
175 {
176  public:
178  virtual ~MHSlider() = default;
179  const char *ClassName() override // MHRoot
180  { return "Slider"; }
181  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHVisible
182  void PrintMe(FILE *fd, int nTabs) const override; // MHVisible
183  void Display(MHEngine *) override; // MHVisible
184  void Preparation(MHEngine *engine) override; // MHVisible
185 
186  void Interaction(MHEngine *engine) override; // MHInteractible
187  void InteractionCompleted(MHEngine *engine) override; // MHInteractible
188  void KeyEvent(MHEngine *engine, int nCode) override; // MHInteractible
189 
190  // Implement the actions in the main inheritance line.
191  void SetInteractionStatus(bool newStatus, MHEngine *engine) override // MHRoot
192  { InteractSetInteractionStatus(newStatus, engine); }
193  bool GetInteractionStatus(void) override // MHRoot
194  { return InteractGetInteractionStatus(); }
195  void SetHighlightStatus(bool newStatus, MHEngine *engine) override // MHRoot
196  { InteractSetHighlightStatus(newStatus, engine); }
197  bool GetHighlightStatus(void) override // MHRoot
198  { return InteractGetHighlightStatus(); }
199  void Deactivation(MHEngine */*engine*/) override // MHVisible
200  { InteractDeactivation(); }
201 
202  // Actions
203  void Step(int nbSteps, MHEngine *engine) override; // MHRoot
204  void SetSliderValue(int newValue, MHEngine *engine) override; // MHRoot
205  int GetSliderValue(void) override // MHRoot
206  { return m_slider_value; }
207  void SetPortion(int newPortion, MHEngine *engine) override; // MHRoot
208  int GetPortion(void) override // MHRoot
209  { return m_portion; }
210  // Additional action defined in UK MHEG.
211  void SetSliderParameters(int newMin, int newMax, int newStep, MHEngine *engine) override; // MHRoot
212 
213  // Enumerated type lookup functions for the text parser.
214  static int GetOrientation(const char *str);
215  static int GetStyle(const char *str);
216  protected:
217  void Increment(MHEngine *engine);
218  void Decrement(MHEngine *engine);
219 
220  // Exchanged attributes
221  // Orientation and direction of increasing value.
223  m_orientation {SliderLeft};
229  // Style of slider. Normal represents a mark on a scale,
230  // Thermometer a range from the start up to the mark and Proportional
231  // a range from the slider to the portion.
233  m_style {SliderNormal};
235  // Internal attributes
236  // In UK MHEG min_value, max_value and step_size can be changed.
237  int m_max_value {0};
238  int m_min_value {0};
239  int m_step_size {0};
240  int m_slider_value {0};
241  int m_portion {0};
242 };
243 
244 class MHEntryField : public MHVisible, public MHInteractible
245 {
246  public:
248  virtual ~MHEntryField() = default;
249  const char *ClassName() override // MHRoot
250  { return "EntryField"; }
251  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHVisible
252  void PrintMe(FILE *fd, int nTabs) const override; // MHVisible
253  void Display(MHEngine *) override {} // MHVisible - Not (yet?) supported
254 
255  // Implement the actions in the main inheritance line.
256  void SetInteractionStatus(bool newStatus, MHEngine *engine) override // MHRoot
257  { InteractSetInteractionStatus(newStatus, engine); }
258  bool GetInteractionStatus(void) override // MHRoot
259  { return InteractGetInteractionStatus(); }
260  void SetHighlightStatus(bool newStatus, MHEngine *engine) override // MHRoot
261  { InteractSetHighlightStatus(newStatus, engine); }
262  bool GetHighlightStatus(void) override // MHRoot
263  { return InteractGetHighlightStatus(); }
264  void Deactivation(MHEngine */*engine*/) override // MHVisible
265  { InteractDeactivation(); }
266 };
267 
268 // Button - not needed for UK MHEG.
269 class MHButton : public MHVisible
270 {
271  public:
272  MHButton() = default;
273  virtual ~MHButton() = default;
274  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHVisible
275  void PrintMe(FILE *fd, int nTabs) const override; // MHVisible
276  void Display(MHEngine *) override {} // MHVisible - Not (yet?) supported
277 };
278 
279 // HotSpot - not needed for UK MHEG.
280 class MHHotSpot : public MHButton
281 {
282  public:
283  MHHotSpot() = default;
284  virtual ~MHHotSpot() = default;
285  const char *ClassName() override // MHRoot
286  { return "HotSpot"; }
287  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHButton
288  void PrintMe(FILE *fd, int nTabs) const override; // MHButton
289  void Display(MHEngine *) override {} // MHButton - Not supported
290 };
291 
292 // PushButton - not needed for UK MHEG.
293 class MHPushButton : public MHButton
294 {
295  public:
296  MHPushButton() = default;
297  virtual ~MHPushButton() = default;
298  const char *ClassName() override // MHRoot
299  { return "PushButton"; }
300  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHButton
301  void PrintMe(FILE *fd, int nTabs) const override; // MHButton
302  void Display(MHEngine *) override {} // MHButton - Not supported
303 };
304 
305 // SwitchButton - not needed for UK MHEG.
307 {
308  public:
309  MHSwitchButton() = default;
310  virtual ~MHSwitchButton() = default;
311  const char *ClassName() override // MHPushButton
312  { return "SwitchButton"; }
313  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHPushButton
314  void PrintMe(FILE *fd, int nTabs) const override; // MHPushButton
315  void Display(MHEngine *) override {} // MHPushButton - Not supported
316 };
317 
318 // Actions
319 
320 // Set Line or Fill colour
322 {
323  public:
324  MHSetColour(const char *name): MHElemAction(name), m_ColourType(CT_None) { }
325  void Initialise(MHParseNode *p, MHEngine *engine) override; // MHElemAction
326  void Perform(MHEngine *engine) override; // MHElemAction
327  protected:
328  void PrintArgs(FILE *fd, int nTabs) const override; // MHElemAction
329  virtual void SetColour(const MHColour &colour, MHEngine *engine) = 0;
330  // The colour can be specified as either an index or an absolute colour.
331  // It's optional for the fill colour.
335 };
336 
338  public:
339  MHSetLineColour(): MHSetColour(":SetLineColour") { }
340  protected:
341  void SetColour(const MHColour &colour, MHEngine *engine) override // MHSetColour
342  { Target(engine)->SetLineColour(colour, engine); }
343 };
344 
346  public:
347  MHSetFillColour(): MHSetColour(":SetFillColour") { }
348  protected:
349  void SetColour(const MHColour &colour, MHEngine *engine) override // MHSetColour
350  { Target(engine)->SetFillColour(colour, engine); }
351 };
352 
353 // BringToFront - bring a visible to the front of the display stack.
355 {
356  public:
357  MHBringToFront(): MHElemAction(":BringToFront") {}
358  void Perform(MHEngine *engine) override // MHElemAction
359  { Target(engine)->BringToFront(engine); }
360 };
361 
362 // PutBefore - put a visible in front of another.
364 {
365  public:
367  void CallAction(MHEngine *engine, MHRoot *pTarget, MHRoot *pRef) override // MHActionGenericObjectRef
368  { pTarget->PutBefore(pRef, engine); }
369 };
370 
371 // PutBehind - put a visible behind another.
373 {
374  public:
376  void CallAction(MHEngine *engine, MHRoot *pTarget, MHRoot *pRef) override // MHActionGenericObjectRef
377  { pTarget->PutBehind(pRef, engine); }
378 };
379 
380 // SendToBack - put a visible at the bottom of the display stack.
382 {
383  public:
384  MHSendToBack(): MHElemAction(":SendToBack") {}
385  void Perform(MHEngine *engine) override // MHElemAction
386  { Target(engine)->SendToBack(engine); }
387 };
388 
390 {
391  public:
392  MHSetPosition(): MHActionIntInt(":SetPosition") {}
393  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg1, int nArg2) override // MHActionIntInt
394  { pTarget->SetPosition(nArg1, nArg2, engine); };
395 };
396 
398 {
399  public:
400  MHSetBoxSize(): MHActionIntInt(":SetBoxSize") {}
401  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg1, int nArg2) override // MHActionIntInt
402  { pTarget->SetBoxSize(nArg1, nArg2, engine); }
403 };
404 
405 // Get box size of a visible
407 {
408  public:
409  MHGetBoxSize(): MHActionObjectRef2(":GetBoxSize") {}
410  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pArg1, MHRoot *pArg2) override // MHActionObjectRef2
411  { pTarget->GetBoxSize(pArg1, pArg2); }
412 };
413 
414 // GetPosition of a visible
416 {
417  public:
418  MHGetPosition(): MHActionObjectRef2(":GetPosition") {}
419  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pArg1, MHRoot *pArg2) override // MHActionObjectRef2
420  { pTarget->GetPosition(pArg1, pArg2); }
421 };
422 
424 {
425  public:
426  MHSetLineWidth(): MHActionInt(":SetLineWidth") {}
427  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override // MHActionInt
428  { pTarget->SetLineWidth(nArg, engine); };
429 };
430 
432 {
433  public:
434  MHSetLineStyle(): MHActionInt(":SetLineStyle") {}
435  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override // MHActionInt
436  { pTarget->SetLineStyle(nArg, engine); };
437 };
438 
440 {
441  public:
442  MHSetInteractionStatus(): MHActionBool("SetInteractionStatus") {}
443  void CallAction(MHEngine *engine, MHRoot */*pTarget*/, bool newStatus) override // MHActionBool
444  { Target(engine)->SetInteractionStatus(newStatus, engine); }
445 };
446 
448 {
449  public:
450  MHGetInteractionStatus(): MHActionObjectRef(":GetInteractionStatus") {}
451  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override // MHActionObjectRef
452  { pResult->SetVariableValue(pTarget->GetInteractionStatus());}
453 };
454 
456 {
457  public:
458  MHSetHighlightStatus(): MHActionBool("SetHighlightStatus") {}
459  void CallAction(MHEngine *engine, MHRoot */*pTarget*/, bool newStatus) override // MHActionBool
460  { Target(engine)->SetHighlightStatus(newStatus, engine); }
461 };
462 
464 {
465  public:
466  MHGetHighlightStatus(): MHActionObjectRef(":GetHighlightStatus") {}
467  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override // MHActionObjectRef
468  { pResult->SetVariableValue(pTarget->GetHighlightStatus());}
469 };
470 
471 class MHStep: public MHActionInt
472 {
473  public:
474  MHStep(): MHActionInt(":Step") {}
475  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override // MHActionInt
476  { pTarget->Step(nArg, engine); };
477 };
478 
480 {
481  public:
482  MHSetSliderValue(): MHActionInt(":SetSliderValue") {}
483  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override // MHActionInt
484  { pTarget->SetSliderValue(nArg, engine); };
485 };
486 
488 {
489  public:
490  MHGetSliderValue(): MHActionObjectRef(":GetSliderValue") {}
491  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override // MHActionObjectRef
492  { pResult->SetVariableValue(pTarget->GetSliderValue());}
493 };
494 
496 {
497  public:
498  MHSetPortion(): MHActionInt(":SetPortion") {}
499  void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override // MHActionInt
500  { pTarget->SetPortion(nArg, engine); };
501 };
502 
504 {
505  public:
506  MHGetPortion(): MHActionObjectRef(":GetPortion") {}
507  void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override // MHActionObjectRef
508  { pResult->SetVariableValue(pTarget->GetPortion());}
509 };
510 
512 {
513  public:
514  MHSetSliderParameters(): MHActionInt3(":SetSliderParameters") {}
515  void CallAction(MHEngine *engine, MHRoot *pTarget, int newMin, int newMax, int newStep) override // MHActionInt3
516  { pTarget->SetSliderParameters(newMin, newMax, newStep, engine); };
517 };
518 
519 #endif
const char * ClassName() override
Definition: Visible.h:94
void GetPosition(MHRoot *pXPosN, MHRoot *pYPosN) override
Definition: Visible.cpp:216
void SetPaletteRef(const MHObjectRef newPalette, MHEngine *engine) override
Definition: Visible.cpp:237
void Display(MHEngine *) override
Definition: Visible.h:99
enum MHSlider::SliderStyle SliderNormal
virtual void InteractionCompleted(MHEngine *)
Definition: Visible.h:152
MHVisible()=default
MHInteractible(MHVisible *parent)
Definition: Visible.h:141
virtual void Interaction(MHEngine *engine)
Definition: Visible.cpp:539
bool m_fInteractionStatus
Definition: Visible.h:168
void KeyEvent(MHEngine *engine, int nCode) override
Definition: Visible.cpp:889
MHColour m_OrigFillColour
Definition: Visible.h:114
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1029
void BringToFront(MHEngine *engine) override
Definition: Visible.cpp:243
static int GetStyle(const char *str)
Definition: Visible.cpp:709
void SetLineStyle(int nStyle, MHEngine *engine) override
Definition: Visible.cpp:410
void Initialise(MHParseNode *p, MHEngine *engine)
Definition: Visible.cpp:496
int m_orig_max_value
Definition: Visible.h:226
int m_nOriginalPosX
Definition: Visible.h:75
void Deactivation(MHEngine *) override
Definition: Visible.h:199
QRegion GetOpaqueArea() override
Definition: Visible.cpp:427
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override
Definition: Visible.h:507
void SetSliderValue(int newValue, MHEngine *engine) override
Definition: Visible.cpp:988
int GetSliderValue(void) override
Definition: Visible.h:205
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override
Definition: Visible.h:467
void Deactivation(MHEngine *engine) override
Definition: Visible.cpp:141
MHRectangle(const MHRectangle &ref)
Definition: Visible.h:125
MHRoot * Target(MHEngine *engine)
Definition: BaseActions.cpp:46
bool GetHighlightStatus(void) override
Definition: Visible.h:197
bool GetInteractionStatus(void) override
Definition: Visible.h:258
void ResetPosition() override
Definition: Visible.h:68
void Decrement(MHEngine *engine)
Definition: Visible.cpp:966
void InteractSetInteractionStatus(bool newStatus, MHEngine *engine)
Definition: Visible.cpp:548
void SetPortion(int newPortion, MHEngine *engine) override
Definition: Visible.cpp:1000
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:84
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1075
virtual void SendToBack(MHEngine *)
Definition: Root.h:143
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1047
int m_nBoxWidth
Definition: Visible.h:79
MHObjectRef m_PaletteRef
Definition: Visible.h:83
virtual QRegion GetVisibleArea()
Definition: Visible.cpp:194
void SetLineWidth(int nWidth, MHEngine *engine) override
Definition: Visible.cpp:404
int m_nPosY
Definition: Visible.h:82
MHPutBefore()
Definition: Visible.h:366
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pArg1, MHRoot *pArg2) override
Definition: Visible.h:419
static MHRgba GetColour(const MHColour &colour)
Definition: Visible.cpp:156
bool GetInteractionStatus(void) override
Definition: Visible.h:193
virtual ~MHButton()=default
int m_min_value
Definition: Visible.h:238
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1036
MHColour m_highlightRefColour
Definition: Visible.h:165
MHPutBehind()
Definition: Visible.h:375
int m_orig_min_value
Definition: Visible.h:227
virtual void SetColour(const MHColour &colour, MHEngine *engine)=0
virtual ~MHEntryField()=default
static int GetOrientation(const char *str)
Definition: Visible.cpp:689
void Display(MHEngine *) override
Definition: Visible.cpp:792
void SetPosition(int nXPosition, int nYPosition, MHEngine *engine) override
Definition: Visible.cpp:204
void CallAction(MHEngine *engine, MHRoot *pTarget, int newMin, int newMax, int newStep) override
Definition: Visible.h:515
MHLineArt()=default
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1081
void Display(MHEngine *) override
Definition: Visible.h:289
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1097
bool m_fBorderedBBox
Definition: Visible.h:110
void Preparation(MHEngine *engine) override
Definition: Visible.cpp:782
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1053
const char * ClassName() override
Definition: Visible.h:298
void Display(MHEngine *) override
Definition: Visible.h:253
void SetBoxSize(int nWidth, int nHeight, MHEngine *engine) override
Definition: Visible.cpp:222
void Perform(MHEngine *engine) override
Definition: Visible.cpp:1144
const char * ClassName() override
Definition: Visible.h:126
int m_LineStyle
Definition: Visible.h:117
void SetInteractionStatus(bool newStatus, MHEngine *engine) override
Definition: Visible.h:256
void Perform(MHEngine *engine) override
Definition: Visible.h:358
MHSendToBack()
Definition: Visible.h:384
int m_nOriginalLineWidth
Definition: Visible.h:111
MHIngredient * Clone(MHEngine *) override
Definition: Visible.h:132
MHColour m_LineColour
Definition: Visible.h:118
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override
Definition: Visible.h:475
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override
Definition: Visible.h:491
SliderStyle
Definition: Visible.h:232
void SetFillColour(const MHColour &colour, MHEngine *engine) override
Definition: Visible.cpp:392
void CallAction(MHEngine *engine, MHRoot *pTarget, MHRoot *pRef) override
Definition: Visible.h:367
int m_orig_step_size
Definition: Visible.h:228
const char * ClassName() override
Definition: Visible.h:249
void InteractDeactivation(void)
Definition: Visible.h:160
int m_nPosX
Definition: Visible.h:81
int m_portion
Definition: Visible.h:241
int m_nOriginalBoxWidth
Definition: Visible.h:73
void SetHighlightStatus(bool newStatus, MHEngine *engine) override
Definition: Visible.h:260
MHSlider()
Definition: Visible.h:177
void Display(MHEngine *) override
Definition: Visible.h:276
bool InteractGetHighlightStatus(void)
Definition: Visible.h:157
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:275
bool InteractGetInteractionStatus(void)
Definition: Visible.h:155
MHColour m_FillColour
Definition: Visible.h:118
void Increment(MHEngine *engine)
Definition: Visible.cpp:956
void Display(MHEngine *) override
Definition: Visible.h:315
void Preparation(MHEngine *engine) override
Definition: Visible.cpp:105
MHButton()=default
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:50
const char * ClassName() override
Definition: Visible.h:285
MHColour m_sliderRefColour
Definition: Visible.h:234
enum MHSlider::SliderOrientation SliderLeft
MHVisible * m_parent
Definition: Visible.h:171
void Step(int nbSteps, MHEngine *engine) override
Definition: Visible.cpp:976
void Display(MHEngine *) override
Definition: Visible.h:302
void CallAction(MHEngine *engine, MHRoot *pTarget, MHRoot *pRef) override
Definition: Visible.h:376
virtual ~MHHotSpot()=default
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pArg1, MHRoot *pArg2) override
Definition: Visible.h:410
Definition: Root.h:43
virtual void Display(MHEngine *)=0
enum MHSetColour::@13 m_ColourType
int m_nOriginalPosY
Definition: Visible.h:76
int m_OriginalLineStyle
Definition: Visible.h:113
int FILE
Definition: mythburn.py:110
const char * ClassName() override
Definition: Visible.h:179
virtual QRegion GetOpaqueArea()
Definition: Visible.h:65
void Perform(MHEngine *engine) override
Definition: Visible.h:385
MHStep()
Definition: Visible.h:474
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg1, int nArg2) override
Definition: Visible.h:393
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:319
int m_initial_value
Definition: Visible.h:224
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override
Definition: Visible.h:427
void SendToBack(MHEngine *engine) override
Definition: Visible.cpp:248
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override
Definition: Visible.h:435
void CallAction(MHEngine *, MHRoot *pTarget, MHRoot *pResult) override
Definition: Visible.h:451
MHGetPortion()
Definition: Visible.h:506
void SetColour(const MHColour &colour, MHEngine *engine) override
Definition: Visible.h:341
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override
Definition: Visible.h:483
void SetLineColour(const MHColour &colour, MHEngine *engine) override
Definition: Visible.cpp:398
int m_max_value
Definition: Visible.h:237
void SetColour(const MHColour &colour, MHEngine *engine) override
Definition: Visible.h:349
const char * ClassName() override
Definition: Visible.h:311
int m_initial_portion
Definition: Visible.h:225
void Deactivation(MHEngine *) override
Definition: Visible.h:264
MHSetPortion()
Definition: Visible.h:498
MHObjectRef m_OriginalPaletteRef
Definition: Visible.h:77
void CallAction(MHEngine *engine, MHRoot *, bool newStatus) override
Definition: Visible.h:443
virtual ~MHPushButton()=default
virtual void KeyEvent(MHEngine *, int)
Definition: Visible.h:151
void GetBoxSize(MHRoot *pWidthDest, MHRoot *pHeightDest) override
Definition: Visible.cpp:231
void Display(MHEngine *engine) override
Definition: Visible.cpp:457
MHSetBoxSize()
Definition: Visible.h:400
virtual ~MHInteractible()=default
void SetInteractionStatus(bool newStatus, MHEngine *engine) override
Definition: Visible.h:191
void InteractionCompleted(MHEngine *engine) override
Definition: Visible.cpp:878
MHEntryField()
Definition: Visible.h:247
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:722
virtual void SetFillColour(const MHColour &, MHEngine *)
Definition: Root.h:149
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:417
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:588
SliderOrientation
Definition: Visible.h:222
MHHotSpot()=default
MHRectangle()
Definition: Visible.h:124
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg1, int nArg2) override
Definition: Visible.h:401
virtual void SetLineColour(const MHColour &, MHEngine *)
Definition: Root.h:150
MHColour m_OrigLineColour
Definition: Visible.h:114
MHPushButton()=default
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1059
void Interaction(MHEngine *engine) override
Definition: Visible.cpp:870
void CallAction(MHEngine *engine, MHRoot *, bool newStatus) override
Definition: Visible.h:459
void PrintMe(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1065
void SetSliderParameters(int newMin, int newMax, int newStep, MHEngine *engine) override
Definition: Visible.cpp:1013
int m_step_size
Definition: Visible.h:239
virtual void BringToFront(MHEngine *)
Definition: Root.h:142
void Preparation(MHEngine *engine) override
Definition: Visible.cpp:358
void Destruction(MHEngine *engine) override
Definition: Visible.cpp:122
bool m_fEngineResp
Definition: Visible.h:164
void Activation(MHEngine *engine) override
Definition: Visible.cpp:128
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1108
bool m_fHighlightStatus
Definition: Visible.h:167
int GetPortion(void) override
Definition: Visible.h:208
virtual ~MHSwitchButton()=default
bool GetHighlightStatus(void) override
Definition: Visible.h:262
MHSetColour(const char *name)
Definition: Visible.h:324
void InteractSetHighlightStatus(bool newStatus, MHEngine *engine)
Definition: Visible.cpp:569
int m_nLineWidth
Definition: Visible.h:116
void SetHighlightStatus(bool newStatus, MHEngine *engine) override
Definition: Visible.h:195
int m_nBoxHeight
Definition: Visible.h:80
void PutBefore(const MHRoot *pRef, MHEngine *engine) override
Definition: Visible.cpp:253
MHSwitchButton()=default
void PrintArgs(FILE *fd, int nTabs) const override
Definition: Visible.cpp:1130
MHGenericOctetString m_Absolute
Definition: Visible.h:334
MHGetBoxSize()
Definition: Visible.h:409
virtual ~MHSlider()=default
MHGenericInteger m_Indexed
Definition: Visible.h:333
void PrintMe(FILE *fd, int nTabs) const
Definition: Visible.cpp:522
virtual void SetInteractionStatus(bool, MHEngine *)
Definition: Root.h:184
void PutBehind(const MHRoot *pRef, MHEngine *engine) override
Definition: Visible.cpp:258
void Initialise(MHParseNode *p, MHEngine *engine) override
Definition: Visible.cpp:1091
virtual void SetHighlightStatus(bool, MHEngine *)
Definition: Root.h:186
void CallAction(MHEngine *engine, MHRoot *pTarget, int nArg) override
Definition: Visible.h:499
int m_slider_value
Definition: Visible.h:240
int m_nOriginalBoxHeight
Definition: Visible.h:74