1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #if !defined(DFN_TYPE_H_INCLUDED)
21 #define DFN_TYPE_H_INCLUDED
23 #include "base_dialog.h"
24 #include "edit_list_ctrl.h"
28 #endif // _MSC_VER > 1000
29 // dfn_dialog.h : header file
32 class CGeorgesEditView
;
34 /////////////////////////////////////////////////////////////////////////////
37 class CDfnParentEditListCtrl
: public CEditListCtrl
39 CEditListCtrl::TItemEdit
getItemEditMode (uint item
, uint subItem
);
40 void getMemComboBoxProp (uint item
, uint subItem
, std::string
®Adr
, bool &browse
);
41 void getNewItemText (uint item
, uint subItem
, std::string
&ret
);
42 void getBrowseInfo (uint item
, uint subItem
, std::string
&defExt
, std::string
&defFilename
, std::string
&defDir
, NLMISC::tstring
&filter
);
44 class CDfnDialog
*Dialog
;
47 class CDfnEditListCtrl
: public CEditListCtrl
49 CEditListCtrl::TItemEdit
getItemEditMode (uint item
, uint subItem
);
50 void getComboBoxStrings (uint item
, uint subItem
, std::vector
<std::string
> &retStrings
);
51 void getMemComboBoxProp (uint item
, uint subItem
, std::string
®Adr
, bool &browse
);
52 void getNewItemText (uint item
, uint subItem
, std::string
&ret
);
53 void getBrowseInfo (uint item
, uint subItem
, std::string
&defExt
, std::string
&defFilename
, std::string
&defDir
, NLMISC::tstring
&filter
);
54 void onItemChanged (uint item
, uint subItem
);
56 class CDfnDialog
*Dialog
;
60 * The dialog class for a DFN edition right window.
62 class CDfnDialog
: public CBaseDialog
66 CDfnDialog (); // standard constructor
87 CDfnParentEditListCtrl Parents
;
89 CDfnEditListCtrl Struct
;
93 virtual void OnCancel ();
96 void onOpenSelected ();
100 // Get from document, update rightview UI
101 void getFromDocument (const NLGEORGES::CFormDfn
&type
);
103 // Set to document, update document with rightview UI
104 void setParentsToDocument ();
105 void setStructToDocument ();
107 // Resize widget callback
108 void resizeWidgets ();
110 CWnd
* GetNextDlgTabItem( CWnd
* pWndCtl
, BOOL bPrevious
= FALSE
) const;
113 // ClassWizard generated virtual function overrides
114 //{{AFX_VIRTUAL(CDfnDialog)
116 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
117 virtual LRESULT
WindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
123 // Generated message map functions
124 //{{AFX_MSG(CDfnDialog)
125 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
126 afx_msg BOOL
OnInitDialog();
127 afx_msg
void OnSetFocus(CWnd
* pOldWnd
);
129 DECLARE_MESSAGE_MAP()
132 //{{AFX_INSERT_LOCATION}}
133 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
135 #endif // !defined(DFN_TYPE_H_INCLUDED)