forked from TheSuperHackers/GeneralsGameCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGadgetRadioButton.h
More file actions
146 lines (131 loc) · 10.2 KB
/
GadgetRadioButton.h
File metadata and controls
146 lines (131 loc) · 10.2 KB
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
/*
** Command & Conquer Generals Zero Hour(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
////////////////////////////////////////////////////////////////////////////////
// //
// (c) 2001-2003 Electronic Arts Inc. //
// //
////////////////////////////////////////////////////////////////////////////////
// FILE: GadgetRadioButton.h //////////////////////////////////////////////////
//-----------------------------------------------------------------------------
//
// Westwood Studios Pacific.
//
// Confidential Information
// Copyright (C) 2001 - All Rights Reserved
//
//-----------------------------------------------------------------------------
//
// Project: RTS3
//
// File name: GadgetRadioButton.h
//
// Created: Colin Day, June 2001
//
// Desc: Helpful interface for RadioButtons
//
// RadioButton IMAGE/COLOR organization
// When control is enabled:
// enabledDrawData[ 0 ] is the background image for the whole enabled control
// enabledDrawData[ 1 ] is the enabled, unselected radio box
// enabledDrawData[ 2 ] is the enabled, selected radio box
//
// When control is disabled:
// disabledDrawData[ 0 ] is the background image for the whole disabled control
// disabledDrawData[ 1 ] is the disabled, unselected radio box
// disabledDrawData[ 2 ] si the disabled, selected radio box
//
// When control is hilited (mouse over it and enabled)
// hiliteDrawData[ 0 ] is the background image for the whole hilited control
// hiliteDrawData[ 1 ] is the hilited, unselected radio box
// hiliteDrawData[ 2 ] is the hilited, selected radio box
//
// GadgetRadioGetEnabledImage // LEFT
// GadgetRadioGetEnabledUncheckedBoxImage // Middle
// GadgetRadioGetEnabledCheckedBoxImage // right
//-----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
#pragma once
// SYSTEM INCLUDES ////////////////////////////////////////////////////////////
// USER INCLUDES //////////////////////////////////////////////////////////////
#include "GameClient/GameWindow.h"
// FORWARD REFERENCES /////////////////////////////////////////////////////////
// TYPE DEFINES ///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// INLINING ///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
extern void GadgetRadioSetText( GameWindow *g, UnicodeString text );
extern void GadgetRadioSetSelection( GameWindow *g, Bool sendMsg );
extern void GadgetRadioSetGroup( GameWindow *g, Int group, Int screen );
inline void GadgetRadioSetEnabledImage( GameWindow *g, const Image *image ) { g->winSetEnabledImage( 0, image ); }
inline void GadgetRadioSetEnabledColor( GameWindow *g, Color color ) { g->winSetEnabledColor( 0, color ); }
inline void GadgetRadioSetEnabledBorderColor( GameWindow *g, Color color ) { g->winSetEnabledBorderColor( 0, color ); }
inline void GadgetRadioSetEnabledUncheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetEnabledImage( 1, image ); }
inline void GadgetRadioSetEnabledUncheckedBoxColor( GameWindow *g, Color color ) { g->winSetEnabledColor( 1, color ); }
inline void GadgetRadioSetEnabledUncheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetEnabledBorderColor( 1, color ); }
inline void GadgetRadioSetEnabledCheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetEnabledImage( 2, image ); }
inline void GadgetRadioSetEnabledCheckedBoxColor( GameWindow *g, Color color ) { g->winSetEnabledColor( 2, color ); }
inline void GadgetRadioSetEnabledCheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetEnabledBorderColor( 2, color ); }
inline const Image *GadgetRadioGetEnabledImage( GameWindow *g ) { return g->winGetEnabledImage( 0 ); }
inline Color GadgetRadioGetEnabledColor( GameWindow *g ) { return g->winGetEnabledColor( 0 ); }
inline Color GadgetRadioGetEnabledBorderColor( GameWindow *g ) { return g->winGetEnabledBorderColor( 0 ); }
inline const Image *GadgetRadioGetEnabledUncheckedBoxImage( GameWindow *g ) { return g->winGetEnabledImage( 1 ); }
inline Color GadgetRadioGetEnabledUncheckedBoxColor( GameWindow *g ) { return g->winGetEnabledColor( 1 ); }
inline Color GadgetRadioGetEnabledUncheckedBoxBorderColor( GameWindow *g ) { return g->winGetEnabledBorderColor( 1 ); }
inline const Image *GadgetRadioGetEnabledCheckedBoxImage( GameWindow *g ) { return g->winGetEnabledImage( 2 ); }
inline Color GadgetRadioGetEnabledCheckedBoxColor( GameWindow *g ) { return g->winGetEnabledColor( 2 ); }
inline Color GadgetRadioGetEnabledCheckedBoxBorderColor( GameWindow *g ) { return g->winGetEnabledBorderColor( 2 ); }
inline void GadgetRadioSetDisabledImage( GameWindow *g, const Image *image ) { g->winSetDisabledImage( 0, image ); }
inline void GadgetRadioSetDisabledColor( GameWindow *g, Color color ) { g->winSetDisabledColor( 0, color ); }
inline void GadgetRadioSetDisabledBorderColor( GameWindow *g, Color color ) { g->winSetDisabledBorderColor( 0, color ); }
inline void GadgetRadioSetDisabledUncheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetDisabledImage( 1, image ); }
inline void GadgetRadioSetDisabledUncheckedBoxColor( GameWindow *g, Color color ) { g->winSetDisabledColor( 1, color ); }
inline void GadgetRadioSetDisabledUncheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetDisabledBorderColor( 1, color ); }
inline void GadgetRadioSetDisabledCheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetDisabledImage( 2, image ); }
inline void GadgetRadioSetDisabledCheckedBoxColor( GameWindow *g, Color color ) { g->winSetDisabledColor( 2, color ); }
inline void GadgetRadioSetDisabledCheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetDisabledBorderColor( 2, color ); }
inline const Image *GadgetRadioGetDisabledImage( GameWindow *g ) { return g->winGetDisabledImage( 0 ); }
inline Color GadgetRadioGetDisabledColor( GameWindow *g ) { return g->winGetDisabledColor( 0 ); }
inline Color GadgetRadioGetDisabledBorderColor( GameWindow *g ) { return g->winGetDisabledBorderColor( 0 ); }
inline const Image *GadgetRadioGetDisabledUncheckedBoxImage( GameWindow *g ) { return g->winGetDisabledImage( 1 ); }
inline Color GadgetRadioGetDisabledUncheckedBoxColor( GameWindow *g ) { return g->winGetDisabledColor( 1 ); }
inline Color GadgetRadioGetDisabledUncheckedBoxBorderColor( GameWindow *g ) { return g->winGetDisabledBorderColor( 1 ); }
inline const Image *GadgetRadioGetDisabledCheckedBoxImage( GameWindow *g ) { return g->winGetDisabledImage( 2 ); }
inline Color GadgetRadioGetDisabledCheckedBoxColor( GameWindow *g ) { return g->winGetDisabledColor( 2 ); }
inline Color GadgetRadioGetDisabledCheckedBoxBorderColor( GameWindow *g ) { return g->winGetDisabledBorderColor( 2 ); }
inline void GadgetRadioSetHiliteImage( GameWindow *g, const Image *image ) { g->winSetHiliteImage( 0, image ); }
inline void GadgetRadioSetHiliteColor( GameWindow *g, Color color ) { g->winSetHiliteColor( 0, color ); }
inline void GadgetRadioSetHiliteBorderColor( GameWindow *g, Color color ) { g->winSetHiliteBorderColor( 0, color ); }
inline void GadgetRadioSetHiliteUncheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetHiliteImage( 1, image ); }
inline void GadgetRadioSetHiliteUncheckedBoxColor( GameWindow *g, Color color ) { g->winSetHiliteColor( 1, color ); }
inline void GadgetRadioSetHiliteUncheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetHiliteBorderColor( 1, color ); }
inline void GadgetRadioSetHiliteCheckedBoxImage( GameWindow *g, const Image *image ) { g->winSetHiliteImage( 2, image ); }
inline void GadgetRadioSetHiliteCheckedBoxColor( GameWindow *g, Color color ) { g->winSetHiliteColor( 2, color ); }
inline void GadgetRadioSetHiliteCheckedBoxBorderColor( GameWindow *g, Color color ) { g->winSetHiliteBorderColor( 2, color ); }
inline const Image *GadgetRadioGetHiliteImage( GameWindow *g ) { return g->winGetHiliteImage( 0 ); }
inline Color GadgetRadioGetHiliteColor( GameWindow *g ) { return g->winGetHiliteColor( 0 ); }
inline Color GadgetRadioGetHiliteBorderColor( GameWindow *g ) { return g->winGetHiliteBorderColor( 0 ); }
inline const Image *GadgetRadioGetHiliteUncheckedBoxImage( GameWindow *g ) { return g->winGetHiliteImage( 1 ); }
inline Color GadgetRadioGetHiliteUncheckedBoxColor( GameWindow *g ) { return g->winGetHiliteColor( 1 ); }
inline Color GadgetRadioGetHiliteUncheckedBoxBorderColor( GameWindow *g ) { return g->winGetHiliteBorderColor( 1 ); }
inline const Image *GadgetRadioGetHiliteCheckedBoxImage( GameWindow *g ) { return g->winGetHiliteImage( 2 ); }
inline Color GadgetRadioGetHiliteCheckedBoxColor( GameWindow *g ) { return g->winGetHiliteColor( 2 ); }
inline Color GadgetRadioGetHiliteCheckedBoxBorderColor( GameWindow *g ) { return g->winGetHiliteBorderColor( 2 ); }
inline const Image *GadgetRadioGetSelectedImage( GameWindow *g ) { return g->winGetHiliteImage( 3 ); }
inline const Image *GadgetRadioGetSelectedUncheckedBoxImage( GameWindow *g ) { return g->winGetHiliteImage( 4 ); }
inline const Image *GadgetRadioGetSelectedCheckedBoxImage( GameWindow *g ) { return g->winGetHiliteImage( 5 ); }
// EXTERNALS //////////////////////////////////////////////////////////////////