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(AFX_BASE_DIALOG_H__C9035AC0_2958_4540_9FFD_D1DD434CFF9F__INCLUDED_)
21 #define AFX_BASE_DIALOG_H__C9035AC0_2958_4540_9FFD_D1DD434CFF9F__INCLUDED_
23 #include "nel/misc/types_nl.h"
27 #endif // _MSC_VER > 1000
28 // base_dialog.h : header file
31 class CGeorgesEditView
;
33 /////////////////////////////////////////////////////////////////////////////
38 class CDoomyControl
: public CStatic
43 void OnSetFocus( CWnd
* pOldWnd
);
47 class CBaseDialog
: public CDialog
51 CBaseDialog(int accelResource
); // standard constructor
54 //{{AFX_DATA(CBaseDialog)
55 enum { IDD
= IDD_BASE_DIALOG
};
56 // NOTE: the ClassWizard will add data members here
59 CGeorgesEditView
*View
;
72 WidgetSpaceWidth
= 20,
73 WidgetSpaceHeight
= 15,
82 ComboDropDownHeight
= 100,
98 void resizeWidgets (uint virtualWidth
, uint evaluatedHeight
);
100 void initWidget (CWnd
&wnd
);
102 void getFirstItemPos (RECT
&rect
);
103 void getNextPos (RECT
&rect
);
104 void getNextPosLabel (RECT
&rect
);
105 void getNextColumn (RECT
&rect
);
106 void getFirstColumn (RECT
&rect
);
107 void getNextSpinPos (RECT
&rect
);
108 void getNextBrowsePos (RECT
&rect
);
109 void getNextColorPos (RECT
&rect
);
111 void setComboSize (RECT
&rect
, uint width
, uint height
=ComboHeight
);
112 void setComboSpinSize (RECT
&rect
);
113 void setComboBrowseSize (RECT
&rect
);
114 void adjusteComboSize (RECT
&rect
);
115 void setButtonSize (RECT
&rect
, uint width
, uint height
=ButtonHeight
);
116 void setStaticSize (RECT
&rect
);
117 void setEditSize (RECT
&rect
, uint width
, uint height
=EditHeight
);
118 void setColorSize (RECT
&rect
, uint width
, uint height
=ColorHeight
);
119 void setBigEditSize (RECT
&rect
, uint width
, uint height
=BigEditHeight
);
120 void setEditSpinSize (RECT
&rect
, uint width
, uint height
=EditHeight
);
121 void setListSize (RECT
&rect
, uint width
, uint height
=ListHeight
);
122 void setSpinSize (RECT
&rect
, uint width
=SpinWidth
, uint height
=SpinHeight
);
123 void setBrowseSize (RECT
&rect
, uint width
=BrowseWidth
, uint height
=BrowseHeight
);
124 void setResetColorSize (RECT
&rect
, uint width
=ResetColorWidth
, uint height
=ColorHeight
);
126 virtual void onFirstFocus ()=0;
127 virtual void onLastFocus ()=0;
129 void registerLastControl ();
130 void unRegisterLastControl ();
132 static void setEditTextMultiLine (CEdit
&edit
, const char *text
);
134 virtual void onOpenSelected ();
135 virtual void setFocusLastWidget ();
137 virtual void OnOK ();
138 virtual void OnCancel ();
142 CDoomyControl DummyStatic0
;
143 CDoomyControl DummyStatic1
;
145 uint Width
, SmallWidget
, SmallWidgetNotLimited
, AdjusteHeight
;
148 // ClassWizard generated virtual function overrides
149 //{{AFX_VIRTUAL(CBaseDialog)
151 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
153 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
159 // Generated message map functions
160 //{{AFX_MSG(CBaseDialog)
161 virtual BOOL
OnInitDialog();
162 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
164 DECLARE_MESSAGE_MAP()
167 //{{AFX_INSERT_LOCATION}}
168 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
170 #endif // !defined(AFX_BASE_DIALOG_H__C9035AC0_2958_4540_9FFD_D1DD434CFF9F__INCLUDED_)