190 |
190 |
}
|
191 |
191 |
|
192 |
192 |
template <class T>
|
193 |
|
void CtrlLayout(T& ctrl) {
|
|
193 |
void CtrlLayout(T& ctrl, bool zoom = true) {
|
194 |
194 |
InitLayout(ctrl, ctrl, ctrl, ctrl);
|
195 |
|
Size sz = ctrl.AddFrameSize(T::GetLayoutSize());
|
|
195 |
Size sz = ctrl.AddFrameSize(T::GetLayoutSize(zoom));
|
196 |
196 |
ctrl.SetMinSize(sz);
|
197 |
197 |
ctrl.SetRect(sz);
|
198 |
198 |
}
|
199 |
199 |
|
200 |
200 |
template <class T>
|
201 |
|
void CtrlLayout(T& ctrl, const char *title) {
|
202 |
|
CtrlLayout(ctrl);
|
|
201 |
void CtrlLayout(T& ctrl, const char *title, bool zoom = true) {
|
|
202 |
CtrlLayout(ctrl, zoom);
|
203 |
203 |
ctrl.Title(title);
|
204 |
204 |
}
|
205 |
205 |
|
206 |
206 |
template <class T>
|
207 |
|
void CtrlLayoutOK(T& ctrl, const char *title) {
|
208 |
|
CtrlLayout(ctrl, title);
|
|
207 |
void CtrlLayoutOK(T& ctrl, const char *title, bool zoom = true) {
|
|
208 |
CtrlLayout(ctrl, title, zoom);
|
209 |
209 |
ctrl.Acceptor(ctrl.ok, IDOK);
|
210 |
210 |
ctrl.ok.Ok();
|
211 |
211 |
}
|
212 |
212 |
|
213 |
213 |
template <class T>
|
214 |
|
void CtrlLayoutCancel(T& ctrl, const char *title) {
|
215 |
|
CtrlLayout(ctrl, title);
|
|
214 |
void CtrlLayoutCancel(T& ctrl, const char *title, bool zoom = true) {
|
|
215 |
CtrlLayout(ctrl, title, zoom);
|
216 |
216 |
ctrl.Rejector(ctrl.cancel, IDCANCEL);
|
217 |
217 |
ctrl.cancel.Cancel();
|
218 |
218 |
}
|
219 |
219 |
|
220 |
220 |
template <class T>
|
221 |
|
void CtrlLayoutOKCancel(T& ctrl, const char *title) {
|
222 |
|
CtrlLayoutOK(ctrl, title);
|
|
221 |
void CtrlLayoutOKCancel(T& ctrl, const char *title, bool zoom = true) {
|
|
222 |
CtrlLayoutOK(ctrl, title, zoom);
|
223 |
223 |
ctrl.Rejector(ctrl.cancel, IDCANCEL);
|
224 |
224 |
ctrl.cancel.Cancel();
|
225 |
225 |
ArrangeOKCancel(ctrl.ok, ctrl.cancel);
|
226 |
226 |
}
|
227 |
227 |
|
228 |
228 |
template <class T>
|
229 |
|
void CtrlLayoutExit(T& ctrl, const char *title) {
|
230 |
|
CtrlLayout(ctrl, title);
|
|
229 |
void CtrlLayoutExit(T& ctrl, const char *title, bool zoom = true) {
|
|
230 |
CtrlLayout(ctrl, title, zoom);
|
231 |
231 |
ctrl.Acceptor(ctrl.exit, IDEXIT);
|
232 |
232 |
ctrl.exit.Exit();
|
233 |
233 |
}
|