SEDITDLG.H 2.0 KB

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