CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

CHEKLIST.H (3844B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /* $Header:   F:\projects\c&c\vcs\code\cheklist.h_v   2.19   16 Oct 1995 16:46:20   JOE_BOSTIC  $ */
     17 /***************************************************************************
     18  **   C O N F I D E N T I A L --- W E S T W O O D    S T U D I O S        **
     19  ***************************************************************************
     20  *                                                                         *
     21  *                 Project Name : Command & Conquer                        *
     22  *                                                                         *
     23  *                    File Name : CHEKLIST.H                               *
     24  *                                                                         *
     25  *                   Programmer : Bill Randolph                            *
     26  *                                                                         *
     27  *                   Start Date : February 16, 1995                        *
     28  *                                                                         *
     29  *                  Last Update : February 16, 1995   [BR]                 *
     30  *                                                                         *
     31  *-------------------------------------------------------------------------*
     32  *	This class behaves just like the standard list box, except that if the	*
     33  * first character of a list entry is a space, clicking on it toggles the	*
     34  * space with a check-mark ('\3').  This makes each entry in the list box	*
     35  * "toggle-able".																				*
     36  *-------------------------------------------------------------------------*
     37  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     38 
     39 #ifndef CHEKLIST_H
     40 #define CHEKLIST_H
     41 
     42 #include "list.h"
     43 
     44 
     45 class CheckListClass : public ListClass
     46 {
     47 	public:
     48 		/*---------------------------------------------------------------------
     49 		Constructor/Destructor
     50 		---------------------------------------------------------------------*/
     51 		CheckListClass(int id, int x, int y, int w, int h, TextPrintType flags,
     52 			void const * up, void const * down);
     53 		~CheckListClass(void) {};
     54 
     55 		/*---------------------------------------------------------------------
     56 		Checkmark utility functions
     57 		---------------------------------------------------------------------*/
     58 		void Check_Item(int index, int checked);	// sets checked state of item
     59 		int Is_Checked(int index) const;				// gets checked state of item
     60 
     61 		/*---------------------------------------------------------------------
     62 		This defines the ASCII value of the checkmark character & non-checkmark
     63 		character.
     64 		---------------------------------------------------------------------*/
     65 		enum CheckListClassEnum {
     66 			CHECK_CHAR = '\3',
     67 			UNCHECK_CHAR = ' ',
     68 		};
     69 
     70 		void Set_Read_Only(int rdonly) {IsReadOnly = rdonly ? true : false;}
     71 
     72 	protected:
     73 		virtual int Action(unsigned flags, KeyNumType &key);
     74 
     75 	private:
     76 		bool IsReadOnly;
     77 
     78 };
     79 
     80 
     81 
     82 #endif
     83 /************************** end of cheklist.h ******************************/