|
|
@ -88,7 +88,7 @@ BOOL CTypeDialog::OnInitDialog()
|
|
|
|
|
|
|
|
|
|
|
|
// Create the type combo
|
|
|
|
// Create the type combo
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelType.Create ("Type:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelType.Create (_T("Type:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelType);
|
|
|
|
initWidget (LabelType);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
@ -101,7 +101,7 @@ BOOL CTypeDialog::OnInitDialog()
|
|
|
|
uint item;
|
|
|
|
uint item;
|
|
|
|
ComboType.ResetContent ();
|
|
|
|
ComboType.ResetContent ();
|
|
|
|
for (item=0; item<CType::TypeCount; item++)
|
|
|
|
for (item=0; item<CType::TypeCount; item++)
|
|
|
|
ComboType.InsertString (-1, CType::getTypeName ((CType::TType)item));
|
|
|
|
ComboType.InsertString (-1, nlUtf8ToTStr(CType::getTypeName ((CType::TType)item)));
|
|
|
|
|
|
|
|
|
|
|
|
ComboType.SetCurSel (0);
|
|
|
|
ComboType.SetCurSel (0);
|
|
|
|
initWidget (ComboType);
|
|
|
|
initWidget (ComboType);
|
|
|
@ -109,7 +109,7 @@ BOOL CTypeDialog::OnInitDialog()
|
|
|
|
|
|
|
|
|
|
|
|
// Create the type combo
|
|
|
|
// Create the type combo
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelUIType.Create ("User Interface:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelUIType.Create (_T("User Interface:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelUIType);
|
|
|
|
initWidget (LabelUIType);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
@ -123,59 +123,59 @@ BOOL CTypeDialog::OnInitDialog()
|
|
|
|
|
|
|
|
|
|
|
|
// Default value
|
|
|
|
// Default value
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelDefault.Create ("Default value:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelDefault.Create (_T("Default value:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelDefault);
|
|
|
|
initWidget (LabelDefault);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
Default.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdDefault, GEORGES_EDIT_BASE_REG_KEY"\\Type Default MemCombo", theApp.RememberListSize);
|
|
|
|
Default.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdDefault, nlUtf8ToTStr(GEORGES_EDIT_BASE_REG_KEY"\\Type Default MemCombo"), theApp.RememberListSize);
|
|
|
|
initWidget (Default);
|
|
|
|
initWidget (Default);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
// Min value
|
|
|
|
// Min value
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelMin.Create ("Min value:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelMin.Create (_T("Min value:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelMin);
|
|
|
|
initWidget (LabelMin);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
Min.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdMin, GEORGES_EDIT_BASE_REG_KEY"\\Type Min MemCombo", theApp.RememberListSize);
|
|
|
|
Min.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdMin, nlUtf8ToTStr(GEORGES_EDIT_BASE_REG_KEY"\\Type Min MemCombo"), theApp.RememberListSize);
|
|
|
|
initWidget (Min);
|
|
|
|
initWidget (Min);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
// Max value
|
|
|
|
// Max value
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelMax.Create ("Max value:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelMax.Create (_T("Max value:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelMax);
|
|
|
|
initWidget (LabelMax);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
Max.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdMax, GEORGES_EDIT_BASE_REG_KEY"\\Type Max MemCombo", theApp.RememberListSize);
|
|
|
|
Max.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdMax, nlUtf8ToTStr(GEORGES_EDIT_BASE_REG_KEY"\\Type Max MemCombo"), theApp.RememberListSize);
|
|
|
|
initWidget (Max);
|
|
|
|
initWidget (Max);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
// Increment value
|
|
|
|
// Increment value
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelIncrement.Create ("Increment value:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelIncrement.Create (_T("Increment value:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelIncrement);
|
|
|
|
initWidget (LabelIncrement);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
setComboSize (currentPos, SmallWidget);
|
|
|
|
Increment.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdIncrement, GEORGES_EDIT_BASE_REG_KEY"\\Type Increment MemCombo", theApp.RememberListSize);
|
|
|
|
Increment.create (WS_CHILD|WS_TABSTOP, currentPos, this, EdIncrement, nlUtf8ToTStr(GEORGES_EDIT_BASE_REG_KEY"\\Type Increment MemCombo"), theApp.RememberListSize);
|
|
|
|
initWidget (Increment);
|
|
|
|
initWidget (Increment);
|
|
|
|
getNextColumn (currentPos);
|
|
|
|
getNextColumn (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
// Predef list value
|
|
|
|
// Predef list value
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
setStaticSize (currentPos);
|
|
|
|
LabelPreDef.Create ("Predefintion list:", WS_VISIBLE, currentPos, this);
|
|
|
|
LabelPreDef.Create (_T("Predefintion list:"), WS_VISIBLE, currentPos, this);
|
|
|
|
initWidget (LabelPreDef);
|
|
|
|
initWidget (LabelPreDef);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
getNextPosLabel (currentPos);
|
|
|
|
|
|
|
|
|
|
|
|
setListSize (currentPos, SmallWidgetNotLimited, 250);
|
|
|
|
setListSize (currentPos, SmallWidgetNotLimited, 250);
|
|
|
|
Predef.create (WS_TABSTOP, currentPos, this, LtPredef);
|
|
|
|
Predef.create (WS_TABSTOP, currentPos, this, LtPredef);
|
|
|
|
Predef.Dialog = this;
|
|
|
|
Predef.Dialog = this;
|
|
|
|
Predef.insertColumn (0, "Label");
|
|
|
|
Predef.insertColumn (0, _T("Label"));
|
|
|
|
Predef.insertColumn (1, "Value");
|
|
|
|
Predef.insertColumn (1, _T("Value"));
|
|
|
|
Predef.recalcColumn ();
|
|
|
|
Predef.recalcColumn ();
|
|
|
|
initWidget (Predef);
|
|
|
|
initWidget (Predef);
|
|
|
|
getNextPos (currentPos);
|
|
|
|
getNextPos (currentPos);
|
|
|
@ -356,7 +356,7 @@ void CTypeDialog::getFromDocument (const NLGEORGES::CType &type)
|
|
|
|
// Insert type string
|
|
|
|
// Insert type string
|
|
|
|
ComboType.ResetContent ();
|
|
|
|
ComboType.ResetContent ();
|
|
|
|
for (item=0; item<CType::TypeCount; item++)
|
|
|
|
for (item=0; item<CType::TypeCount; item++)
|
|
|
|
ComboType.InsertString (-1, CType::getTypeName ((CType::TType)item));
|
|
|
|
ComboType.InsertString (-1, nlUtf8ToTStr(CType::getTypeName ((CType::TType)item)));
|
|
|
|
|
|
|
|
|
|
|
|
// Insert UI types
|
|
|
|
// Insert UI types
|
|
|
|
ComboUIType.ResetContent ();
|
|
|
|
ComboUIType.ResetContent ();
|
|
|
@ -364,7 +364,7 @@ void CTypeDialog::getFromDocument (const NLGEORGES::CType &type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (CType::uiCompatible (type.Type, (CType::TUI)item))
|
|
|
|
if (CType::uiCompatible (type.Type, (CType::TUI)item))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int index = ComboUIType.InsertString (-1, CType::getUIName ((CType::TUI)item));
|
|
|
|
int index = ComboUIType.InsertString(-1, nlUtf8ToTStr(CType::getUIName((CType::TUI)item)));
|
|
|
|
ComboUIType.SetItemData (index, item);
|
|
|
|
ComboUIType.SetItemData (index, item);
|
|
|
|
|
|
|
|
|
|
|
|
if (item == (uint)type.UIType)
|
|
|
|
if (item == (uint)type.UIType)
|
|
|
@ -373,10 +373,10 @@ void CTypeDialog::getFromDocument (const NLGEORGES::CType &type)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ComboType.SetCurSel (type.Type);
|
|
|
|
ComboType.SetCurSel (type.Type);
|
|
|
|
Default.SetWindowText (type.Default.c_str());
|
|
|
|
Default.SetWindowText (nlUtf8ToTStr(type.Default));
|
|
|
|
Min.SetWindowText (type.Min.c_str());
|
|
|
|
Min.SetWindowText (nlUtf8ToTStr(type.Min));
|
|
|
|
Max.SetWindowText (type.Max.c_str());
|
|
|
|
Max.SetWindowText (nlUtf8ToTStr(type.Max));
|
|
|
|
Increment.SetWindowText (type.Increment.c_str());
|
|
|
|
Increment.SetWindowText (nlUtf8ToTStr(type.Increment));
|
|
|
|
|
|
|
|
|
|
|
|
// Disable some windows
|
|
|
|
// Disable some windows
|
|
|
|
bool number = (type.Type == UType::UnsignedInt) || (type.Type == UType::SignedInt) || (type.Type == UType::Double);
|
|
|
|
bool number = (type.Type == UType::UnsignedInt) || (type.Type == UType::SignedInt) || (type.Type == UType::Double);
|
|
|
@ -390,8 +390,8 @@ void CTypeDialog::getFromDocument (const NLGEORGES::CType &type)
|
|
|
|
for (predef=0; predef<type.Definitions.size(); predef++)
|
|
|
|
for (predef=0; predef<type.Definitions.size(); predef++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Add the label and value
|
|
|
|
// Add the label and value
|
|
|
|
Predef.ListCtrl.InsertItem (predef, type.Definitions[predef].Label.c_str());
|
|
|
|
Predef.ListCtrl.InsertItem (predef, nlUtf8ToTStr(type.Definitions[predef].Label));
|
|
|
|
Predef.ListCtrl.SetItemText (predef, 1, type.Definitions[predef].Value.c_str());
|
|
|
|
Predef.ListCtrl.SetItemText (predef, 1, nlUtf8ToTStr(type.Definitions[predef].Value));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -442,7 +442,7 @@ void CTypeDialog::setDefaultToDocument ()
|
|
|
|
Default.UpdateData();
|
|
|
|
Default.UpdateData();
|
|
|
|
Default.GetWindowText(str);
|
|
|
|
Default.GetWindowText(str);
|
|
|
|
|
|
|
|
|
|
|
|
doc->modify (new CActionString (IAction::TypeDefault, str, *doc, "", "",
|
|
|
|
doc->modify(new CActionString(IAction::TypeDefault, nlTStrToUtf8(str), *doc, "", "",
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -461,7 +461,7 @@ void CTypeDialog::setMinToDocument ()
|
|
|
|
Min.UpdateData();
|
|
|
|
Min.UpdateData();
|
|
|
|
Min.GetWindowText(str);
|
|
|
|
Min.GetWindowText(str);
|
|
|
|
|
|
|
|
|
|
|
|
doc->modify (new CActionString (IAction::TypeMin, str, *doc, "", "",
|
|
|
|
doc->modify(new CActionString(IAction::TypeMin, nlTStrToUtf8(str), *doc, "", "",
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -478,7 +478,7 @@ void CTypeDialog::setMaxToDocument ()
|
|
|
|
Max.UpdateData();
|
|
|
|
Max.UpdateData();
|
|
|
|
Max.GetWindowText(str);
|
|
|
|
Max.GetWindowText(str);
|
|
|
|
|
|
|
|
|
|
|
|
doc->modify (new CActionString (IAction::TypeMax, str, *doc, "", "",
|
|
|
|
doc->modify(new CActionString(IAction::TypeMax, nlTStrToUtf8(str), *doc, "", "",
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -494,7 +494,7 @@ void CTypeDialog::setIncrementToDocument ()
|
|
|
|
Increment.UpdateData();
|
|
|
|
Increment.UpdateData();
|
|
|
|
Increment.GetWindowText(str);
|
|
|
|
Increment.GetWindowText(str);
|
|
|
|
|
|
|
|
|
|
|
|
doc->modify (new CActionString (IAction::TypeIncrement, str, *doc, "", "",
|
|
|
|
doc->modify(new CActionString(IAction::TypeIncrement, nlTStrToUtf8(str), *doc, "", "",
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
doc->getLeftView()->getCurrentSelectionId(), 0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|