EditStringDialog.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. ** Command & Conquer Renegade(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. #if !defined(AFX_EDITSTRINGDIALOG_H__E438BDAC_5DB9_11D4_A0A8_00104B791122__INCLUDED_)
  19. #define AFX_EDITSTRINGDIALOG_H__E438BDAC_5DB9_11D4_A0A8_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. #include "presetpicker.h"
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Forward delcarations
  27. /////////////////////////////////////////////////////////////////////////////
  28. class TDBObjClass;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // Utiltity functions
  31. /////////////////////////////////////////////////////////////////////////////
  32. bool Validate_String_ID (HWND wnd, const char *string_id);
  33. /////////////////////////////////////////////////////////////////////////////
  34. //
  35. // EditStringDialogClass
  36. //
  37. /////////////////////////////////////////////////////////////////////////////
  38. class EditStringDialogClass : public CDialog
  39. {
  40. // Construction
  41. public:
  42. EditStringDialogClass(CWnd* pParent = NULL); // standard constructor
  43. // Dialog Data
  44. //{{AFX_DATA(EditStringDialogClass)
  45. enum { IDD = IDD_EDIT_STRING };
  46. // NOTE: the ClassWizard will add data members here
  47. //}}AFX_DATA
  48. // Overrides
  49. // ClassWizard generated virtual function overrides
  50. //{{AFX_VIRTUAL(EditStringDialogClass)
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  53. //}}AFX_VIRTUAL
  54. // Implementation
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(EditStringDialogClass)
  58. virtual void OnOK();
  59. virtual BOOL OnInitDialog();
  60. //}}AFX_MSG
  61. DECLARE_MESSAGE_MAP()
  62. public:
  63. /////////////////////////////////////////////////////////////
  64. // Public methods
  65. /////////////////////////////////////////////////////////////
  66. void Set_Translate_Object (TDBObjClass *object) { m_Object = object; }
  67. TDBObjClass * Get_Translate_Object (void) const { return m_Object; }
  68. private:
  69. /////////////////////////////////////////////////////////////
  70. // Private methods
  71. /////////////////////////////////////////////////////////////
  72. bool Validate_ID (void);
  73. void Convert_Newline_To_Chars (CString &string);
  74. void Convert_Chars_To_Newline (CString &string);
  75. /////////////////////////////////////////////////////////////
  76. // Private member data
  77. /////////////////////////////////////////////////////////////
  78. TDBObjClass * m_Object;
  79. PresetPickerClass m_PresetPicker;
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_EDITSTRINGDIALOG_H__E438BDAC_5DB9_11D4_A0A8_00104B791122__INCLUDED_)