mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: LayDes now has 'struct' option in code generator
git-svn-id: svn://ultimatepp.org/upp/trunk@3936 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9160b49d4b
commit
25232be486
2 changed files with 20 additions and 6 deletions
|
|
@ -57,7 +57,7 @@ LAYOUT(InsertLangLayout, 252, 68)
|
|||
END_LAYOUT
|
||||
|
||||
LAYOUT(VisGenLayout, 724, 488)
|
||||
ITEM(Switch, type, SetLabel(t_("Dialog class\nModal classless dialog\nCtrl list\nCtrl list pairs")).LeftPosZ(8, 156).TopPosZ(8, 76))
|
||||
ITEM(Switch, type, SetLabel(t_("Dialog class\nDialog struct\nModal classless dialog\nCtrl list\nCtrl list pairs")).LeftPosZ(8, 156).TopPosZ(8, 76))
|
||||
ITEM(Label, name_lbl, SetLabel(t_("Name")).LeftPosZ(8, 32).TopPosZ(96, 19))
|
||||
ITEM(EditString, name, LeftPosZ(44, 120).TopPosZ(96, 19))
|
||||
ITEM(Option, pars, SetLabel(t_("Parenthesis")).LeftPosZ(8, 152).TopPosZ(124, 15))
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@ void VisGenDlg::Refresh()
|
|||
oce << "Cancel";
|
||||
if(HasItem("exit"))
|
||||
oce << "Exit";
|
||||
String n = ~name;
|
||||
if(IsNull(n))
|
||||
n = GetName();
|
||||
if(q == 0) {
|
||||
String n = ~name;
|
||||
if(IsNull(n))
|
||||
n = GetName();
|
||||
s << "class " << n << " : public With" << layout.name << "<TopWindow> {\n"
|
||||
<< "\ttypedef " << n << " CLASSNAME;\n"
|
||||
<< "\n"
|
||||
|
|
@ -69,6 +69,19 @@ void VisGenDlg::Refresh()
|
|||
}
|
||||
else
|
||||
if(q == 1) {
|
||||
s << "struct " << n << " : With" << layout.name << "<TopWindow> {\n"
|
||||
<< "\ttypedef " << n << " CLASSNAME;\n"
|
||||
<< "\t" << n << "();\n"
|
||||
<< "};\n"
|
||||
<< "\n"
|
||||
<< n << "::" << n << "()\n"
|
||||
<< "{\n"
|
||||
<< oce;
|
||||
s << "(*this, \"\");\n";
|
||||
s << "}\n";
|
||||
}
|
||||
else
|
||||
if(q == 2) {
|
||||
String n = ~name;
|
||||
if(IsNull(n))
|
||||
n = "dlg";
|
||||
|
|
@ -91,7 +104,7 @@ void VisGenDlg::Refresh()
|
|||
s << ToUpper(id);
|
||||
else
|
||||
s << id;
|
||||
if(q == 3) {
|
||||
if(q == 4) {
|
||||
s << ", ";
|
||||
if(name2 && !IsNull(~name))
|
||||
s << ~name << '.';
|
||||
|
|
@ -113,9 +126,10 @@ void VisGenDlg::Type()
|
|||
String n = GetName();
|
||||
switch((int)~type) {
|
||||
case 0:
|
||||
case 1:
|
||||
name <<= GetName();
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
name <<= "dlg";
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue