CnC_Remastered_Collection

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

SEDITDLG.H (2204B)


      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 #ifdef WOLAPI_INTEGRATION
     17 
     18 //	SEditDlg.h - "SimpleEditDlgClass": An ok/cancel type dialog with a single edit box.
     19 //	ajw 07/21/98
     20 
     21 #include "function.h"
     22 
     23 class SimpleEditDlgClass
     24 {
     25 public:
     26 	SimpleEditDlgClass( int iDialogWidth, const char* szTitle, const char* szPrompt, int iEditCharsAccept,
     27 							const char* szPrompt2 = NULL, int iEditCharsAccept2 = 0 );
     28 	virtual ~SimpleEditDlgClass();
     29 
     30 	const char* Show();					//	Shows dialog, returns text of button pressed.
     31 										//	Unless SetButtons() is used, value will be TXT_OK or TXT_CANCEL string values.
     32 
     33 	void		SetButtons( const char* szOk, const char* szCancel, const char* szMiddle = NULL );
     34 
     35 	char		szEdit[ 300 ];			//	iEditCharsAccept upper limit.
     36 	char		szEdit2[ 300 ];
     37 
     38 protected:
     39 	int			iDialogWidth;			//	X pixels width of entire dialog.
     40 	char*		szTitle;				//	Title of dialog, or NULL for no title.
     41 
     42 	char*		szPrompt;				//	Text appearing to the left of edit box.
     43 	int			iEditCharsAccept;		//	Max length of string allowed in edit, includes null-terminator.
     44 
     45 	char*		szPrompt2;
     46 	int			iEditCharsAccept2;
     47 
     48 	const char*	szOkButton;				//	Text of button that acts like an Ok button. Appears on left.
     49 	const char*	szCancelButton;			//	Text of button that acts like an Cancel button. Appears on right.
     50 	const char* szMiddleButton;			//	Optional middle button text. Null = no middle button.
     51 };
     52 
     53 #endif