summaryrefslogtreecommitdiff
path: root/src/avp/win95/gadgets/hudgadg.hpp
blob: 6f5cf289e2d494259245d46225ee0b458bae5a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*
	
	hudgadg.hpp

*/

#ifndef _hudgadg
#define _hudgadg 1

	#ifndef _gadget
	#include "gadget.h"
	#endif

#ifdef __cplusplus
	extern "C" {
#endif

/* Version settings *****************************************************/

/* Constants  ***********************************************************/

/* Macros ***************************************************************/

/* Type definitions *****************************************************/
	#if UseGadgets

		#ifndef GAMEDEF_INCLUDED

			#ifndef MODULE_INCLUDED
			#include "module.h"
			#endif
				// irritatingly, GAMEDEF.H assumes MODULE.H has already been included...

		#include "gamedef.h"
		#endif

		#ifndef _scstring
			#ifdef __cplusplus
				extern "C++" {
					// JH 140298 - C++ header can only be included in C++ source and must have C++ linkage
					#include "scstring.hpp"
				}
			#endif
		#endif

		#ifndef _statpane_h
		#include "statpane.h"
		#endif

	class TextReportGadget; // fully declared in TREPGADG.HPP

	// HUD Gadget is an abstract base class for 3 types of HUD; one for each species
	// It's abstract because the Render() method remains pure virtual
	class HUDGadget : public Gadget
	{
	public:
		static HUDGadget* GetHUD(void);

		// Factory method:
		static HUDGadget* MakeHUD
		(
			I_PLAYER_TYPE IPlayerType_ToMake
		);

		virtual void AddTextReport
		(
			SCString* pSCString_ToAdd
				// ultimately turn into an MCString
		) = 0;

		virtual void ClearTheTextReportQueue(void) = 0;

		
		#if EnableStatusPanels
		virtual void RequestStatusPanel
		(
			enum StatusPanelIndex I_StatusPanel
		) = 0;
		virtual void NoRequestedPanel(void) = 0;
		#endif

		virtual void CharTyped
		(
			char Ch
				// note that this _is _ a char
		) = 0;

		virtual void Key_Backspace(void) = 0;
		virtual void Key_End(void) = 0;
		virtual void Key_Home(void) = 0;
		virtual void Key_Left(void) = 0;
		virtual void Key_Up(void) = 0;
		virtual void Key_Right(void) = 0;
		virtual void Key_Down(void) = 0;
		virtual void Key_Delete(void) = 0;
		virtual void Key_Tab(void) = 0;

		virtual void Jitter(int FixP_Magnitude) = 0;


		// Destructor:
		

	protected:
		// Constructor is protected since an abstract class
		HUDGadget
		(
			#if debug
			char* DebugName
			#endif
		);

	private:
		static HUDGadget* pSingleton;

	#if 0
	// Temporary text feedback implementation:
	protected:
		SCString* pSCString_Current;
	#endif
	
	public:
		virtual ~HUDGadget();
	};

	// Inline methods:
		inline /*static*/ HUDGadget* HUDGadget::GetHUD(void)
		{
			return pSingleton;
		}
	#endif // UseGadgets

/* Exported globals *****************************************************/

/* Function prototypes **************************************************/



/* End of the header ****************************************************/


#ifdef __cplusplus
	};
#endif

#endif