| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (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, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/main/DLLUiItems.h $ |
| 21 | * $Revision: 1.3 $ |
| 22 | * $Date: 2004/02/09 04:14:49 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * UI helper classes for the DLLs, make sure whatever file you include this in has the following line |
| 26 | * int DLLUIClass_CurrID = 0xE0; |
| 27 | * |
| 28 | * $Log: DLLUiItems.h,v $ |
| 29 | * Revision 1.3 2004/02/09 04:14:49 kevinb |
| 30 | * Added newlines to all headers to reduce number of warnings printed |
| 31 | * |
| 32 | * Made some small changes to get everything compiling. |
| 33 | * |
| 34 | * All Ready to merge the 1.5 tree. |
| 35 | * |
| 36 | * Revision 1.2 2000/05/29 05:03:22 icculus |
| 37 | * Moved class implementation to DLLUiItems.cpp, since statically |
| 38 | * linking the network clients would result in duplicate definitions. |
| 39 | * |
| 40 | * Revision 1.1.1.1 2000/04/18 00:00:30 icculus |
| 41 | * initial checkin |
| 42 | * |
| 43 | * |
| 44 | * 3 10/08/98 4:23p Kevin |
| 45 | * Changed code to comply with memory library usage. Always use mem_malloc |
| 46 | * , mem_free and mem_strdup |
| 47 | * |
| 48 | * 2 8/07/98 12:39p Jeff |
| 49 | * initial creation |
| 50 | * |
| 51 | * $NoKeywords: $ |
| 52 | */ |
| 53 | |
| 54 | extern int DLLUIClass_CurrID; |
| 55 | |
| 56 | class CheckBoxItem { |
| 57 | public: |
| 58 | CheckBoxItem(void *window, char *title, bool initial_state, int x, int y, int flags); |
| 59 | ~CheckBoxItem(); |
| 60 | void SetState(bool checked); |
| 61 | bool GetState(void); |
| 62 | bool Update(int id); |
| 63 | |
| 64 | private: |
| 65 | char *m_Title; |
| 66 | bool m_State; |
| 67 | int m_x, m_y, m_flags; |
| 68 | void *m_textitem_i_off; |
| 69 | void *m_textitem_o_off; |
| 70 | void *m_textitem_i_on; |
| 71 | void *m_textitem_o_on; |
| 72 | void *m_hotspot; |
| 73 | void *m_hWnd; |
| 74 | int m_ID; |
| 75 | }; |
| 76 | |
| 77 | #ifndef DLLUICLASS_H_ |
| 78 | #define DLLUICLASS_H_ |
| 79 | |
| 80 | #define JEFF_RED GR_RGB(255, 40, 40) |
| 81 | #define JEFF_BLUE GR_RGB(40, 40, 255) |
| 82 | #define JEFF_GREEN GR_RGB(40, 255, 40) |
| 83 | |
| 84 | #endif |