EditConversationDialog.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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_EDITCONVERSATIONDIALOG_H__77BB0B01_5D9E_4BFF_9D25_CE964576950D__INCLUDED_)
  19. #define AFX_EDITCONVERSATIONDIALOG_H__77BB0B01_5D9E_4BFF_9D25_CE964576950D__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. /////////////////////////////////////////////////////////////////////////////
  25. // Forward declarations
  26. /////////////////////////////////////////////////////////////////////////////
  27. class ConversationClass;
  28. class ConversationRemarkClass;
  29. /////////////////////////////////////////////////////////////////////////////
  30. //
  31. // EditConversationDialogClass
  32. //
  33. /////////////////////////////////////////////////////////////////////////////
  34. class EditConversationDialogClass : public CDialog
  35. {
  36. // Construction
  37. public:
  38. EditConversationDialogClass (CWnd *pParent = NULL);
  39. ~EditConversationDialogClass (void);
  40. // Dialog Data
  41. //{{AFX_DATA(EditConversationDialogClass)
  42. enum { IDD = IDD_EDIT_CONVERSATION };
  43. CListCtrl m_ListCtrl;
  44. //}}AFX_DATA
  45. // Overrides
  46. // ClassWizard generated virtual function overrides
  47. //{{AFX_VIRTUAL(EditConversationDialogClass)
  48. protected:
  49. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  50. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. // Generated message map functions
  55. //{{AFX_MSG(EditConversationDialogClass)
  56. afx_msg void OnDblclkRemarkList(NMHDR* pNMHDR, LRESULT* pResult);
  57. afx_msg void OnKeydownRemarkList(NMHDR* pNMHDR, LRESULT* pResult);
  58. virtual void OnOK();
  59. afx_msg void OnAdd();
  60. virtual BOOL OnInitDialog();
  61. afx_msg void OnInsert();
  62. afx_msg void OnItemchangedRemarkList(NMHDR* pNMHDR, LRESULT* pResult);
  63. afx_msg void OnDeleteitemRemarkList(NMHDR* pNMHDR, LRESULT* pResult);
  64. //}}AFX_MSG
  65. DECLARE_MESSAGE_MAP()
  66. public:
  67. /////////////////////////////////////////////////////////////////////////////
  68. // Public methods
  69. /////////////////////////////////////////////////////////////////////////////
  70. void Set_Conversation (ConversationClass *conversation);
  71. ConversationClass * Peek_Conversation (void) { return m_Conversation; }
  72. protected:
  73. /////////////////////////////////////////////////////////////////////////////
  74. // Protected methods
  75. /////////////////////////////////////////////////////////////////////////////
  76. ConversationRemarkClass *Get_Entry_Data (int index);
  77. void Add_Entry (const ConversationRemarkClass &remark, int insert_index = 0xFFFF);
  78. void Update_Button_States (void);
  79. void Update_Enable_State (int orator_index);
  80. void Update_Player_Type_Combos (int orator_index);
  81. void Update_Remarks (int orator_index);
  82. int Get_Orator_Type (int orator_index);
  83. int Find_Combobox_Entry (int orator_type);
  84. /////////////////////////////////////////////////////////////////////////////
  85. // Protected member data
  86. /////////////////////////////////////////////////////////////////////////////
  87. ConversationClass * m_Conversation;
  88. };
  89. //{{AFX_INSERT_LOCATION}}
  90. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  91. #endif // !defined(AFX_EDITCONVERSATIONDIALOG_H__77BB0B01_5D9E_4BFF_9D25_CE964576950D__INCLUDED_)