TEXTBTN.H (3586B)
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\textbtn.h_v 2.18 16 Oct 1995 16:46:54 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 : TEXTBTN.H * 24 * * 25 * Programmer : Joe L. Bostic * 26 * * 27 * Start Date : 01/15/95 * 28 * * 29 * Last Update : January 15, 1995 [JLB] * 30 * * 31 *---------------------------------------------------------------------------------------------* 32 * Functions: * 33 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 34 35 #ifndef TEXTBTN_H 36 #define TEXTBTN_H 37 38 #include "toggle.h" 39 40 41 class TextButtonClass : public ToggleClass 42 { 43 public: 44 TextButtonClass(void); 45 TextButtonClass(unsigned id, char const * text, TextPrintType style, int x, int y, int w=-1, int h=-1, int blackborder=false); 46 TextButtonClass(unsigned id, int text, TextPrintType style, int x, int y, int w=-1, int h=-1, int blackborder=false); 47 virtual int Draw_Me(int forced=false); 48 virtual void Set_Text(char const *text, bool resize = false); 49 virtual void Set_Text(int text, bool resize = false); 50 virtual void Set_Style (TextPrintType style) {PrintFlags = style;} 51 52 protected: 53 54 virtual void Draw_Background(void); 55 virtual void Draw_Text(char const * text); 56 57 unsigned IsBlackBorder:1; 58 59 /* 60 ** This points to a constant string that is used for the button's text. 61 */ 62 char const * String; 63 64 /* 65 ** This is the print flags to use when rendering this button's text. 66 */ 67 TextPrintType PrintFlags; 68 }; 69 70 #endif 71