mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-18 09:48:10 +08:00
ControlTemplate/BlackSkin
This commit is contained in:
+35
-137
@@ -633,22 +633,27 @@ GuiApplicationMain
|
||||
}
|
||||
|
||||
GetCurrentController()->InputService()->StartTimer();
|
||||
GuiApplication app;
|
||||
application=&app;
|
||||
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
GetGlobalTypeManager()->Load();
|
||||
#endif
|
||||
GetPluginManager()->Load();
|
||||
theme::SetCurrentTheme(theme.Obj());
|
||||
GuiMain();
|
||||
|
||||
{
|
||||
GuiApplication app;
|
||||
application = &app;
|
||||
GuiMain();
|
||||
}
|
||||
application = nullptr;
|
||||
|
||||
theme::SetCurrentTheme(0);
|
||||
DestroyPluginManager();
|
||||
ThreadLocalStorage::DisposeStorages();
|
||||
FinalizeGlobalStorage();
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
DestroyGlobalTypeManager();
|
||||
#endif
|
||||
ThreadLocalStorage::DisposeStorages();
|
||||
FinalizeGlobalStorage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24694,25 +24699,15 @@ namespace vl
|
||||
using namespace reflection::description;
|
||||
using namespace collections;
|
||||
|
||||
#define INITIALIZE_FACTORY_FROM_TEMPLATE(VARIABLE, PROPERTY)\
|
||||
controlTemplate->PROPERTY##Changed.AttachLambda([this](GuiGraphicsComposition*, GuiEventArgs&)\
|
||||
{\
|
||||
this->VARIABLE = 0;\
|
||||
});\
|
||||
#define GET_FACTORY_FROM_TEMPLATE(TEMPLATE, PROPERTY)\
|
||||
return new TEMPLATE##_StyleProvider(controlTemplate->Get##PROPERTY());\
|
||||
|
||||
#define GET_FACTORY_FROM_TEMPLATE(TEMPLATE, VARIABLE, PROPERTY)\
|
||||
if (!this->VARIABLE)\
|
||||
#define GET_FACTORY_FROM_TEMPLATE_OPT(TEMPLATE, PROPERTY)\
|
||||
if (controlTemplate->Get##PROPERTY() == nullptr)\
|
||||
{\
|
||||
this->VARIABLE = CreateTemplateFactory(controlTemplate->Get##PROPERTY());\
|
||||
return nullptr;\
|
||||
}\
|
||||
return new TEMPLATE##_StyleProvider(this->VARIABLE);\
|
||||
|
||||
#define GET_FACTORY_FROM_TEMPLATE_OPT(TEMPLATE, VARIABLE, PROPERTY)\
|
||||
if (controlTemplate->Get##PROPERTY() == L"")\
|
||||
{\
|
||||
return 0;\
|
||||
}\
|
||||
GET_FACTORY_FROM_TEMPLATE(TEMPLATE, VARIABLE, PROPERTY)\
|
||||
GET_FACTORY_FROM_TEMPLATE(TEMPLATE, PROPERTY)\
|
||||
|
||||
/***********************************************************************
|
||||
GuiControlTemplate_StyleProvider
|
||||
@@ -24880,8 +24875,6 @@ GuiWindowTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiWindowTemplate_StyleProvider::GuiWindowTemplate_StyleProvider()#An instance of GuiWindowTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(tooltipTemplateFactory, TooltipTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(shortcutKeyTemplateFactory, ShortcutKeyTemplate);
|
||||
}
|
||||
|
||||
GuiWindowTemplate_StyleProvider::~GuiWindowTemplate_StyleProvider()
|
||||
@@ -24987,12 +24980,12 @@ GuiWindowTemplate_StyleProvider
|
||||
|
||||
controls::GuiWindow::IStyleController* GuiWindowTemplate_StyleProvider::CreateTooltipStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiWindowTemplate, tooltipTemplateFactory, TooltipTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiWindowTemplate, TooltipTemplate);
|
||||
}
|
||||
|
||||
controls::GuiLabel::IStyleController* GuiWindowTemplate_StyleProvider::CreateShortcutKeyStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiLabelTemplate, shortcutKeyTemplateFactory, ShortcutKeyTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiLabelTemplate, ShortcutKeyTemplate);
|
||||
}
|
||||
|
||||
#undef WINDOW_TEMPLATE_GET
|
||||
@@ -25053,7 +25046,6 @@ GuiToolstripButtonTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiButtonTemplate_StyleProvider::GuiButtonTemplate_StyleProvider()#An instance of GuiToolstripButtonTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(subMenuTemplateFactory, SubMenuTemplate);
|
||||
}
|
||||
|
||||
GuiToolstripButtonTemplate_StyleProvider::~GuiToolstripButtonTemplate_StyleProvider()
|
||||
@@ -25062,7 +25054,7 @@ GuiToolstripButtonTemplate_StyleProvider
|
||||
|
||||
controls::GuiMenu::IStyleController* GuiToolstripButtonTemplate_StyleProvider::CreateSubMenuStyleController()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiMenuTemplate, subMenuTemplateFactory, SubMenuTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiMenuTemplate, SubMenuTemplate);
|
||||
}
|
||||
|
||||
void GuiToolstripButtonTemplate_StyleProvider::SetSubMenuExisting(bool value)
|
||||
@@ -25154,9 +25146,6 @@ GuiDatePickerTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiDatePickerTemplate_StyleProvider::GuiDatePickerTemplate_StyleProvider()#An instance of GuiDatePickerTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(dateButtonTemplateFactory, DateButtonTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(dateTextListTemplateFactory, DateTextListTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(dateComboBoxTemplateFactory, DateComboBoxTemplate);
|
||||
}
|
||||
|
||||
GuiDatePickerTemplate_StyleProvider::~GuiDatePickerTemplate_StyleProvider()
|
||||
@@ -25166,12 +25155,12 @@ GuiDatePickerTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiDatePickerTemplate_StyleProvider::CreateDateButtonStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, dateButtonTemplateFactory, DateButtonTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, DateButtonTemplate);
|
||||
}
|
||||
|
||||
GuiTextListTemplate_StyleProvider* GuiDatePickerTemplate_StyleProvider::CreateTextListStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiTextListTemplate, dateTextListTemplateFactory, DateTextListTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiTextListTemplate, DateTextListTemplate);
|
||||
}
|
||||
|
||||
controls::GuiTextList* GuiDatePickerTemplate_StyleProvider::CreateTextList()
|
||||
@@ -25182,7 +25171,7 @@ GuiDatePickerTemplate_StyleProvider
|
||||
|
||||
controls::GuiComboBoxListControl::IStyleController* GuiDatePickerTemplate_StyleProvider::CreateComboBoxStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiComboBoxTemplate, dateComboBoxTemplateFactory, DateComboBoxTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiComboBoxTemplate, DateComboBoxTemplate);
|
||||
}
|
||||
|
||||
Color GuiDatePickerTemplate_StyleProvider::GetBackgroundColor()
|
||||
@@ -25211,7 +25200,6 @@ GuiDateComboBoxTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiDateComboBoxTemplate_StyleProvider::GuiDateComboBoxTemplate_StyleProvider()#An instance of GuiDateComboBoxTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(datePickerTemplateFactory, DatePickerTemplate);
|
||||
}
|
||||
|
||||
GuiDateComboBoxTemplate_StyleProvider::~GuiDateComboBoxTemplate_StyleProvider()
|
||||
@@ -25225,7 +25213,7 @@ GuiDateComboBoxTemplate_StyleProvider
|
||||
|
||||
controls::GuiDatePicker::IStyleProvider* GuiDateComboBoxTemplate_StyleProvider::CreateDatePickerStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiDatePickerTemplate, datePickerTemplateFactory, DatePickerTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiDatePickerTemplate, DatePickerTemplate);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -25276,8 +25264,6 @@ GuiScrollViewTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiScrollViewTemplate_StyleProvider::GuiScrollViewTemplate_StyleProvider()#An instance of GuiScrollViewTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(hScrollTemplateFactory, HScrollTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(vScrollTemplateFactory, VScrollTemplate);
|
||||
}
|
||||
|
||||
GuiScrollViewTemplate_StyleProvider::~GuiScrollViewTemplate_StyleProvider()
|
||||
@@ -25286,12 +25272,12 @@ GuiScrollViewTemplate_StyleProvider
|
||||
|
||||
controls::GuiScroll::IStyleController* GuiScrollViewTemplate_StyleProvider::CreateHorizontalScrollStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiScrollTemplate, hScrollTemplateFactory, HScrollTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiScrollTemplate, HScrollTemplate);
|
||||
}
|
||||
|
||||
controls::GuiScroll::IStyleController* GuiScrollViewTemplate_StyleProvider::CreateVerticalScrollStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiScrollTemplate, vScrollTemplateFactory, VScrollTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiScrollTemplate, VScrollTemplate);
|
||||
}
|
||||
|
||||
vint GuiScrollViewTemplate_StyleProvider::GetDefaultScrollSize()
|
||||
@@ -25387,8 +25373,6 @@ GuiTextListTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiTextListTemplate_StyleProvider::GuiTextListTemplate_StyleProvider()#An instance of GuiTextListTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(backgroundTemplateFactory, BackgroundTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(bulletTemplateFactory, BulletTemplate);
|
||||
}
|
||||
|
||||
GuiTextListTemplate_StyleProvider::~GuiTextListTemplate_StyleProvider()
|
||||
@@ -25397,7 +25381,7 @@ GuiTextListTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiTextListTemplate_StyleProvider::CreateItemBackground()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, backgroundTemplateFactory, BackgroundTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, BackgroundTemplate);
|
||||
}
|
||||
|
||||
Color GuiTextListTemplate_StyleProvider::GetTextColor()
|
||||
@@ -25412,7 +25396,7 @@ GuiTextListTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiTextListTemplate_StyleProvider::CreateBulletStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiSelectableButtonTemplate, bulletTemplateFactory, BulletTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE_OPT(GuiSelectableButtonTemplate, BulletTemplate);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -25426,8 +25410,6 @@ GuiListViewTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiListViewTemplate_StyleProvider::GuiListViewTemplate_StyleProvider()#An instance of GuiListViewTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(backgroundTemplateFactory, BackgroundTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(columnHeaderTemplateFactory, ColumnHeaderTemplate);
|
||||
}
|
||||
|
||||
GuiListViewTemplate_StyleProvider::~GuiListViewTemplate_StyleProvider()
|
||||
@@ -25436,12 +25418,12 @@ GuiListViewTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiListViewTemplate_StyleProvider::CreateItemBackground()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, backgroundTemplateFactory, BackgroundTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, BackgroundTemplate);
|
||||
}
|
||||
|
||||
controls::GuiListViewColumnHeader::IStyleController* GuiListViewTemplate_StyleProvider::CreateColumnStyle()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiListViewColumnHeaderTemplate, columnHeaderTemplateFactory, ColumnHeaderTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiListViewColumnHeaderTemplate, ColumnHeaderTemplate);
|
||||
}
|
||||
|
||||
Color GuiListViewTemplate_StyleProvider::GetPrimaryTextColor()
|
||||
@@ -25470,8 +25452,6 @@ GuiTreeViewTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiTreeViewTemplate_StyleProvider::GuiTreeViewTemplate_StyleProvider()#An instance of GuiTreeViewTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(backgroundTemplateFactory, BackgroundTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(expandingDecoratorTemplateFactory, ExpandingDecoratorTemplate);
|
||||
}
|
||||
|
||||
GuiTreeViewTemplate_StyleProvider::~GuiTreeViewTemplate_StyleProvider()
|
||||
@@ -25480,12 +25460,12 @@ GuiTreeViewTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiTreeViewTemplate_StyleProvider::CreateItemBackground()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, backgroundTemplateFactory, BackgroundTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, BackgroundTemplate);
|
||||
}
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiTreeViewTemplate_StyleProvider::CreateItemExpandingDecorator()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, expandingDecoratorTemplateFactory, ExpandingDecoratorTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, ExpandingDecoratorTemplate);
|
||||
}
|
||||
|
||||
Color GuiTreeViewTemplate_StyleProvider::GetTextColor()
|
||||
@@ -25633,22 +25613,22 @@ GuiTabTemplate_StyleProvider
|
||||
|
||||
controls::GuiSelectableButton::IStyleController* GuiTabTemplate_StyleProvider::CreateHeaderTemplate()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, headerTemplateFactory, HeaderTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiSelectableButtonTemplate, HeaderTemplate);
|
||||
}
|
||||
|
||||
controls::GuiButton::IStyleController* GuiTabTemplate_StyleProvider::CreateDropdownTemplate()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiButtonTemplate, dropdownTemplateFactory, DropdownTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiButtonTemplate, DropdownTemplate);
|
||||
}
|
||||
|
||||
controls::GuiMenu::IStyleController* GuiTabTemplate_StyleProvider::CreateMenuTemplate()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiMenuTemplate, menuTemplateFactory, MenuTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiMenuTemplate, MenuTemplate);
|
||||
}
|
||||
|
||||
controls::GuiToolstripButton::IStyleController* GuiTabTemplate_StyleProvider::CreateMenuItemTemplate()
|
||||
{
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiToolstripButtonTemplate, menuItemTemplateFactory, MenuItemTemplate);
|
||||
GET_FACTORY_FROM_TEMPLATE(GuiToolstripButtonTemplate, MenuItemTemplate);
|
||||
}
|
||||
|
||||
GuiTabTemplate_StyleProvider::GuiTabTemplate_StyleProvider(Ptr<GuiTemplate::IFactory> factory)
|
||||
@@ -25658,10 +25638,6 @@ GuiTabTemplate_StyleProvider
|
||||
{
|
||||
CHECK_FAIL(L"GuiTabTemplate_StyleProvider::GuiTabTemplate_StyleProvider()#An instance of GuiTabTemplate is expected.");
|
||||
}
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(headerTemplateFactory, HeaderTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(dropdownTemplateFactory, DropdownTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(menuTemplateFactory, MenuTemplate);
|
||||
INITIALIZE_FACTORY_FROM_TEMPLATE(menuItemTemplateFactory, MenuItemTemplate);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
@@ -26368,64 +26344,6 @@ GuiBindableDataEditor
|
||||
Helper Functions
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
class GuiTemplateReflectableFactory : public Object, public virtual GuiTemplate::IFactory
|
||||
{
|
||||
protected:
|
||||
List<ITypeDescriptor*> types;
|
||||
|
||||
public:
|
||||
GuiTemplateReflectableFactory(const List<ITypeDescriptor*>& _types)
|
||||
{
|
||||
CopyFrom(types, _types);
|
||||
}
|
||||
|
||||
GuiTemplate* CreateTemplate(const description::Value& viewModel)override
|
||||
{
|
||||
FOREACH(ITypeDescriptor*, type, types)
|
||||
{
|
||||
auto group = type->GetConstructorGroup();
|
||||
vint count = group->GetMethodCount();
|
||||
for (vint i = 0; i < count; i++)
|
||||
{
|
||||
auto ctor = group->GetMethod(i);
|
||||
if (ctor->GetReturn()->GetDecorator() == ITypeInfo::RawPtr && ctor->GetParameterCount() <= 1)
|
||||
{
|
||||
Array<Value> arguments(ctor->GetParameterCount());
|
||||
if (ctor->GetParameterCount() == 1)
|
||||
{
|
||||
if (!viewModel.CanConvertTo(ctor->GetParameter(0)->GetType()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
arguments[0] = viewModel;
|
||||
}
|
||||
return dynamic_cast<GuiTemplate*>(ctor->Invoke(Value(), arguments).GetRawPtr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WString message = L"Unable to create a template from types {";
|
||||
FOREACH_INDEXER(ITypeDescriptor*, type, index, types)
|
||||
{
|
||||
if (index > 0) message += L", ";
|
||||
message += type->GetTypeName();
|
||||
}
|
||||
message += L"} using view model: ";
|
||||
if (viewModel.IsNull())
|
||||
{
|
||||
message += L"null.";
|
||||
}
|
||||
else
|
||||
{
|
||||
message += viewModel.GetTypeDescriptor()->GetTypeName() + L".";
|
||||
}
|
||||
|
||||
throw ArgumentException(message);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
void SplitBySemicolon(const WString& input, collections::List<WString>& fragments)
|
||||
{
|
||||
const wchar_t* attValue = input.Buffer();
|
||||
@@ -26449,30 +26367,10 @@ Helper Functions
|
||||
fragments.Add(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<GuiTemplate::IFactory> CreateTemplateFactory(const WString& typeValues)
|
||||
{
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
List<ITypeDescriptor*> types;
|
||||
List<WString> typeNames;
|
||||
SplitBySemicolon(typeValues, typeNames);
|
||||
CopyFrom(
|
||||
types,
|
||||
From(typeNames)
|
||||
.Select<ITypeDescriptor*(*)(const WString&)>(&description::GetTypeDescriptor)
|
||||
.Where([](ITypeDescriptor* type){return type != 0; })
|
||||
);
|
||||
|
||||
return new GuiTemplateReflectableFactory(types);
|
||||
#else
|
||||
CHECK_FAIL(L"CreateTemplateFactory(const WString&)#This function cannot be called without reflection enabled.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#undef INITIALIZE_FACTORY_FROM_TEMPLATE
|
||||
#undef GET_FACTORY_FROM_TEMPLATE
|
||||
#undef GET_FACTORY_FROM_TEMPLATE_OPT
|
||||
|
||||
|
||||
+19
-39
@@ -18242,8 +18242,8 @@ Control Template
|
||||
F(GuiWindowTemplate, bool, TitleBar)\
|
||||
F(GuiWindowTemplate, bool, CustomizedBorder)\
|
||||
F(GuiWindowTemplate, bool, Maximized)\
|
||||
F(GuiWindowTemplate, WString, TooltipTemplate)\
|
||||
F(GuiWindowTemplate, WString, ShortcutKeyTemplate)
|
||||
F(GuiWindowTemplate, Ptr<GuiTemplate::IFactory>, TooltipTemplate)\
|
||||
F(GuiWindowTemplate, Ptr<GuiTemplate::IFactory>, ShortcutKeyTemplate)
|
||||
|
||||
GuiWindowTemplate_PROPERTIES(GUI_TEMPLATE_PROPERTY_DECL)
|
||||
};
|
||||
@@ -18279,7 +18279,7 @@ Control Template
|
||||
~GuiToolstripButtonTemplate();
|
||||
|
||||
#define GuiToolstripButtonTemplate_PROPERTIES(F)\
|
||||
F(GuiToolstripButtonTemplate, WString, SubMenuTemplate)\
|
||||
F(GuiToolstripButtonTemplate, Ptr<GuiTemplate::IFactory>, SubMenuTemplate)\
|
||||
F(GuiToolstripButtonTemplate, bool, SubMenuExisting)\
|
||||
F(GuiToolstripButtonTemplate, bool, SubMenuOpening)\
|
||||
F(GuiToolstripButtonTemplate, controls::GuiButton*, SubMenuHost)\
|
||||
@@ -18321,9 +18321,9 @@ Control Template
|
||||
~GuiDatePickerTemplate();
|
||||
|
||||
#define GuiDatePickerTemplate_PROPERTIES(F)\
|
||||
F(GuiDatePickerTemplate, WString, DateButtonTemplate)\
|
||||
F(GuiDatePickerTemplate, WString, DateTextListTemplate)\
|
||||
F(GuiDatePickerTemplate, WString, DateComboBoxTemplate)\
|
||||
F(GuiDatePickerTemplate, Ptr<GuiTemplate::IFactory>, DateButtonTemplate)\
|
||||
F(GuiDatePickerTemplate, Ptr<GuiTemplate::IFactory>, DateTextListTemplate)\
|
||||
F(GuiDatePickerTemplate, Ptr<GuiTemplate::IFactory>, DateComboBoxTemplate)\
|
||||
F(GuiDatePickerTemplate, Color, BackgroundColor)\
|
||||
F(GuiDatePickerTemplate, Color, PrimaryTextColor)\
|
||||
F(GuiDatePickerTemplate, Color, SecondaryTextColor)\
|
||||
@@ -18338,7 +18338,7 @@ Control Template
|
||||
~GuiDateComboBoxTemplate();
|
||||
|
||||
#define GuiDateComboBoxTemplate_PROPERTIES(F)\
|
||||
F(GuiDateComboBoxTemplate, WString, DatePickerTemplate)\
|
||||
F(GuiDateComboBoxTemplate, Ptr<GuiTemplate::IFactory>, DatePickerTemplate)\
|
||||
|
||||
GuiDateComboBoxTemplate_PROPERTIES(GUI_TEMPLATE_PROPERTY_DECL)
|
||||
};
|
||||
@@ -18365,8 +18365,8 @@ Control Template
|
||||
~GuiScrollViewTemplate();
|
||||
|
||||
#define GuiScrollViewTemplate_PROPERTIES(F)\
|
||||
F(GuiScrollViewTemplate, WString, HScrollTemplate)\
|
||||
F(GuiScrollViewTemplate, WString, VScrollTemplate)\
|
||||
F(GuiScrollViewTemplate, Ptr<GuiTemplate::IFactory>, HScrollTemplate)\
|
||||
F(GuiScrollViewTemplate, Ptr<GuiTemplate::IFactory>, VScrollTemplate)\
|
||||
F(GuiScrollViewTemplate, vint, DefaultScrollSize)\
|
||||
|
||||
GuiScrollViewTemplate_PROPERTIES(GUI_TEMPLATE_PROPERTY_DECL)
|
||||
@@ -18404,8 +18404,8 @@ Control Template
|
||||
~GuiTextListTemplate();
|
||||
|
||||
#define GuiTextListTemplate_PROPERTIES(F)\
|
||||
F(GuiTextListTemplate, WString, BackgroundTemplate)\
|
||||
F(GuiTextListTemplate, WString, BulletTemplate)\
|
||||
F(GuiTextListTemplate, Ptr<GuiTemplate::IFactory>, BackgroundTemplate)\
|
||||
F(GuiTextListTemplate, Ptr<GuiTemplate::IFactory>, BulletTemplate)\
|
||||
F(GuiTextListTemplate, Color, TextColor)\
|
||||
|
||||
GuiTextListTemplate_PROPERTIES(GUI_TEMPLATE_PROPERTY_DECL)
|
||||
@@ -18418,8 +18418,8 @@ Control Template
|
||||
~GuiListViewTemplate();
|
||||
|
||||
#define GuiListViewTemplate_PROPERTIES(F)\
|
||||
F(GuiListViewTemplate, WString, BackgroundTemplate)\
|
||||
F(GuiListViewTemplate, WString, ColumnHeaderTemplate)\
|
||||
F(GuiListViewTemplate, Ptr<GuiTemplate::IFactory>, BackgroundTemplate)\
|
||||
F(GuiListViewTemplate, Ptr<GuiTemplate::IFactory>, ColumnHeaderTemplate)\
|
||||
F(GuiListViewTemplate, Color, PrimaryTextColor)\
|
||||
F(GuiListViewTemplate, Color, SecondaryTextColor)\
|
||||
F(GuiListViewTemplate, Color, ItemSeparatorColor)\
|
||||
@@ -18434,8 +18434,8 @@ Control Template
|
||||
~GuiTreeViewTemplate();
|
||||
|
||||
#define GuiTreeViewTemplate_PROPERTIES(F)\
|
||||
F(GuiTreeViewTemplate, WString, BackgroundTemplate)\
|
||||
F(GuiTreeViewTemplate, WString, ExpandingDecoratorTemplate)\
|
||||
F(GuiTreeViewTemplate, Ptr<GuiTemplate::IFactory>, BackgroundTemplate)\
|
||||
F(GuiTreeViewTemplate, Ptr<GuiTemplate::IFactory>, ExpandingDecoratorTemplate)\
|
||||
F(GuiTreeViewTemplate, Color, TextColor)\
|
||||
|
||||
GuiTreeViewTemplate_PROPERTIES(GUI_TEMPLATE_PROPERTY_DECL)
|
||||
@@ -18448,10 +18448,10 @@ Control Template
|
||||
~GuiTabTemplate();
|
||||
|
||||
#define GuiTabTemplate_PROPERTIES(F)\
|
||||
F(GuiTabTemplate, WString, HeaderTemplate)\
|
||||
F(GuiTabTemplate, WString, DropdownTemplate)\
|
||||
F(GuiTabTemplate, WString, MenuTemplate)\
|
||||
F(GuiTabTemplate, WString, MenuItemTemplate)\
|
||||
F(GuiTabTemplate, Ptr<GuiTemplate::IFactory>, HeaderTemplate)\
|
||||
F(GuiTabTemplate, Ptr<GuiTemplate::IFactory>, DropdownTemplate)\
|
||||
F(GuiTabTemplate, Ptr<GuiTemplate::IFactory>, MenuTemplate)\
|
||||
F(GuiTabTemplate, Ptr<GuiTemplate::IFactory>, MenuItemTemplate)\
|
||||
F(GuiTabTemplate, vint, HeaderPadding)\
|
||||
F(GuiTabTemplate, compositions::GuiGraphicsComposition*, HeaderComposition)\
|
||||
|
||||
@@ -18647,8 +18647,6 @@ Control Template
|
||||
protected:
|
||||
GuiWindowTemplate* controlTemplate;
|
||||
controls::GuiWindow* window;
|
||||
Ptr<GuiTemplate::IFactory> tooltipTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> shortcutKeyTemplateFactory;
|
||||
|
||||
public:
|
||||
GuiWindowTemplate_StyleProvider(Ptr<GuiTemplate::IFactory> factory);
|
||||
@@ -18709,7 +18707,6 @@ Control Template
|
||||
, public Description<GuiToolstripButtonTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> subMenuTemplateFactory;
|
||||
GuiToolstripButtonTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18764,9 +18761,6 @@ Control Template
|
||||
, public Description<GuiDatePickerTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> dateButtonTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> dateTextListTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> dateComboBoxTemplateFactory;
|
||||
GuiDatePickerTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18787,7 +18781,6 @@ Control Template
|
||||
, public Description<GuiDateComboBoxTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> datePickerTemplateFactory;
|
||||
GuiDateComboBoxTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18822,8 +18815,6 @@ Control Template
|
||||
, public Description<GuiScrollViewTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> hScrollTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> vScrollTemplateFactory;
|
||||
GuiScrollViewTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18871,8 +18862,6 @@ Control Template
|
||||
, public Description<GuiTextListTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> backgroundTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> bulletTemplateFactory;
|
||||
GuiTextListTemplate* controlTemplate;
|
||||
|
||||
class ItemStyleProvider
|
||||
@@ -18905,8 +18894,6 @@ Control Template
|
||||
, public Description<GuiListViewTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> backgroundTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> columnHeaderTemplateFactory;
|
||||
GuiListViewTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18926,8 +18913,6 @@ Control Template
|
||||
, public Description<GuiTreeViewTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> backgroundTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> expandingDecoratorTemplateFactory;
|
||||
GuiTreeViewTemplate* controlTemplate;
|
||||
|
||||
public:
|
||||
@@ -18945,10 +18930,6 @@ Control Template
|
||||
, public Description<GuiTabTemplate_StyleProvider>
|
||||
{
|
||||
protected:
|
||||
Ptr<GuiTemplate::IFactory> headerTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> dropdownTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> menuTemplateFactory;
|
||||
Ptr<GuiTemplate::IFactory> menuItemTemplateFactory;
|
||||
GuiTabTemplate* controlTemplate;
|
||||
|
||||
compositions::GuiTableComposition* tabBoundsComposition;
|
||||
@@ -19230,7 +19211,6 @@ Helper Functions
|
||||
***********************************************************************/
|
||||
|
||||
extern void SplitBySemicolon(const WString& input, collections::List<WString>& fragments);
|
||||
extern Ptr<GuiTemplate::IFactory> CreateTemplateFactory(const WString& typeValues);
|
||||
|
||||
#pragma warning(pop)
|
||||
}
|
||||
|
||||
+202
-10
@@ -210,11 +210,16 @@ IGuiInstanceLoader
|
||||
return false;
|
||||
}
|
||||
|
||||
Ptr<workflow::WfBaseConstructorCall> IGuiInstanceLoader::CreateRootInstance(const TypeInfo& typeInfo, Ptr<workflow::WfExpression> controlTemplate, collections::List<WString>& errors)
|
||||
Ptr<workflow::WfBaseConstructorCall> IGuiInstanceLoader::CreateRootInstance(const TypeInfo& typeInfo, ArgumentMap& arguments, collections::List<WString>& errors)
|
||||
{
|
||||
CHECK_FAIL(L"IGuiInstanceLoader::CreateControlTemplateArgument(const TypeInfo&, Ptr<workflow::WfExpression>, collections::List<WString>&)#This function is not implemented.");
|
||||
}
|
||||
|
||||
Ptr<workflow::WfStatement> IGuiInstanceLoader::InitializeRootInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Ptr<workflow::WfStatement> IGuiInstanceLoader::CreateInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors)
|
||||
{
|
||||
CHECK_FAIL(L"IGuiInstanceLoader::CreateInstance(const TypeInfo&, GlobalStringKey, ArgumentMap&, collections::List<WString>&)#This function is not implemented.");
|
||||
@@ -4921,6 +4926,7 @@ GuiPredefinedInstanceLoadersPlugin
|
||||
extern void LoadListControls(IGuiInstanceLoaderManager* manager);
|
||||
extern void LoadDocumentControls(IGuiInstanceLoaderManager* manager);
|
||||
extern void LoadCompositions(IGuiInstanceLoaderManager* manager);
|
||||
extern void LoadTemplates(IGuiInstanceLoaderManager* manager);
|
||||
|
||||
class GuiPredefinedInstanceLoadersPlugin : public Object, public IGuiPlugin
|
||||
{
|
||||
@@ -5029,6 +5035,7 @@ GuiPredefinedInstanceLoadersPlugin
|
||||
LoadListControls(manager);
|
||||
LoadDocumentControls(manager);
|
||||
LoadCompositions(manager);
|
||||
LoadTemplates(manager);
|
||||
|
||||
#undef ADD_VIRTUAL_TYPE_LOADER
|
||||
#undef ADD_TEMPLATE_CONTROL
|
||||
@@ -5251,6 +5258,190 @@ Initialization
|
||||
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
INSTANCELOADERS\GUIINSTANCELOADER_TEMPLATES.CPP
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace presentation
|
||||
{
|
||||
namespace instance_loaders
|
||||
{
|
||||
|
||||
/***********************************************************************
|
||||
GuiTemplateInstanceLoader
|
||||
***********************************************************************/
|
||||
|
||||
class GuiTemplateInstanceLoader : public Object, public IGuiInstanceLoader
|
||||
{
|
||||
protected:
|
||||
GlobalStringKey typeName;
|
||||
|
||||
public:
|
||||
GuiTemplateInstanceLoader()
|
||||
{
|
||||
typeName = GlobalStringKey::Get(description::TypeInfo<GuiTemplate>::content.typeName);
|
||||
}
|
||||
|
||||
GlobalStringKey GetTypeName()override
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
void GetConstructorParameters(const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
|
||||
{
|
||||
List<ITypeDescriptor*> tds;
|
||||
tds.Add(typeInfo.typeDescriptor);
|
||||
|
||||
for (vint i = 0; i < tds.Count(); i++)
|
||||
{
|
||||
auto td = tds[i];
|
||||
vint propCount = td->GetPropertyCount();
|
||||
for (vint i = 0; i < propCount; i++)
|
||||
{
|
||||
auto prop = td->GetProperty(i);
|
||||
if (prop->IsWritable() && prop->GetReturn()->GetTypeDescriptor() == description::GetTypeDescriptor<GuiTemplate::IFactory>())
|
||||
{
|
||||
propertyNames.Add(GlobalStringKey::Get(prop->GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
vint baseCount = td->GetBaseTypeDescriptorCount();
|
||||
for (vint i = 0; i < baseCount; i++)
|
||||
{
|
||||
auto baseTd = td->GetBaseTypeDescriptor(i);
|
||||
if (!tds.Contains(baseTd))
|
||||
{
|
||||
tds.Add(baseTd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<GuiInstancePropertyInfo> GetPropertyType(const PropertyInfo& propertyInfo)override
|
||||
{
|
||||
if (auto prop = propertyInfo.typeInfo.typeDescriptor->GetPropertyByName(propertyInfo.propertyName.ToString(), true))
|
||||
{
|
||||
if (prop->IsWritable() && prop->GetReturn()->GetTypeDescriptor() == description::GetTypeDescriptor<GuiTemplate::IFactory>())
|
||||
{
|
||||
auto info = GuiInstancePropertyInfo::Assign(description::GetTypeDescriptor<WString>());
|
||||
info->scope = GuiInstancePropertyInfo::Constructor;
|
||||
info->bindable = false;
|
||||
|
||||
if (prop->GetOwnerTypeDescriptor() != description::GetTypeDescriptor<GuiWindowTemplate>())
|
||||
{
|
||||
info->required = true;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
return IGuiInstanceLoader::GetPropertyType(propertyInfo);
|
||||
}
|
||||
|
||||
bool CanCreate(const TypeInfo& typeInfo)override
|
||||
{
|
||||
if (typeInfo.typeDescriptor->CanConvertTo(description::GetTypeDescriptor<GuiTemplate>()))
|
||||
{
|
||||
auto group = typeInfo.typeDescriptor->GetConstructorGroup();
|
||||
if (group && group->GetMethodCount() == 1)
|
||||
{
|
||||
auto ctor = group->GetMethod(0);
|
||||
if (ctor->GetParameterCount() == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Ptr<workflow::WfStatement> CreateInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors)override
|
||||
{
|
||||
if (!CanCreate(typeInfo))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto block = MakePtr<WfBlockStatement>();
|
||||
{
|
||||
auto createExpr = MakePtr<WfNewClassExpression>();
|
||||
createExpr->type = GetTypeFromTypeInfo(MakePtr<TypeDescriptorTypeInfo>(typeInfo.typeDescriptor, TypeInfoHint::Normal).Obj());
|
||||
|
||||
auto refVariable = MakePtr<WfReferenceExpression>();
|
||||
refVariable->name.value = variableName.ToString();
|
||||
|
||||
auto assignExpr = MakePtr<WfBinaryExpression>();
|
||||
assignExpr->op = WfBinaryOperator::Assign;
|
||||
assignExpr->first = refVariable;
|
||||
assignExpr->second = createExpr;
|
||||
|
||||
auto assignStat = MakePtr<WfExpressionStatement>();
|
||||
assignStat->expression = assignExpr;
|
||||
block->statements.Add(assignStat);
|
||||
}
|
||||
|
||||
if (auto stat = InitializeRootInstance(typeInfo, variableName, arguments, errors))
|
||||
{
|
||||
CopyFrom(block->statements, stat.Cast<WfBlockStatement>()->statements, true);
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
Ptr<workflow::WfStatement> InitializeRootInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors)
|
||||
{
|
||||
if (arguments.Count() > 0)
|
||||
{
|
||||
auto block = MakePtr<WfBlockStatement>();
|
||||
using Helper = GuiTemplateControlInstanceLoader<Value, Value, GuiTemplate>;
|
||||
|
||||
FOREACH_INDEXER(GlobalStringKey, propKey, index, arguments.Keys())
|
||||
{
|
||||
List<ITypeDescriptor*> tds;
|
||||
Helper::GetItemTemplateType(arguments.GetByIndex(index)[0].expression, tds, typeInfo, propKey.ToString(), errors);
|
||||
auto refFactory = Helper::CreateTemplateFactory(tds, errors);
|
||||
|
||||
auto refVariable = MakePtr<WfReferenceExpression>();
|
||||
refVariable->name.value = variableName.ToString();
|
||||
|
||||
auto member = MakePtr<WfMemberExpression>();
|
||||
member->parent = refVariable;
|
||||
member->name.value = propKey.ToString();
|
||||
|
||||
auto assignExpr = MakePtr<WfBinaryExpression>();
|
||||
assignExpr->op = WfBinaryOperator::Assign;
|
||||
assignExpr->first = member;
|
||||
assignExpr->second = refFactory;
|
||||
|
||||
auto assignStat = MakePtr<WfExpressionStatement>();
|
||||
assignStat->expression = assignExpr;
|
||||
block->statements.Add(assignStat);
|
||||
}
|
||||
return block;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
Initialization
|
||||
***********************************************************************/
|
||||
|
||||
void LoadTemplates(IGuiInstanceLoaderManager* manager)
|
||||
{
|
||||
manager->SetLoader(new GuiTemplateInstanceLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
INSTANCELOADERS\GUIINSTANCELOADER_TOOLSTRIP.CPP
|
||||
***********************************************************************/
|
||||
@@ -6734,15 +6925,7 @@ Workflow_GenerateInstanceClass
|
||||
{
|
||||
if (!beforePrecompile)
|
||||
{
|
||||
Ptr<WfExpression> controlTemplate;
|
||||
{
|
||||
vint index = resolvingResult.rootCtorArguments.Keys().IndexOf(GlobalStringKey::_ControlTemplate);
|
||||
if (index != -1)
|
||||
{
|
||||
controlTemplate = resolvingResult.rootCtorArguments.GetByIndex(index)[0].expression;
|
||||
}
|
||||
}
|
||||
if (auto call = resolvingResult.rootLoader->CreateRootInstance(resolvingResult.rootTypeInfo, controlTemplate, errors))
|
||||
if (auto call = resolvingResult.rootLoader->CreateRootInstance(resolvingResult.rootTypeInfo, resolvingResult.rootCtorArguments, errors))
|
||||
{
|
||||
ctor->baseConstructorCalls.Add(call);
|
||||
}
|
||||
@@ -8012,6 +8195,15 @@ WorkflowGenerateCreatingVisitor
|
||||
|
||||
statements->statements.Add(stat);
|
||||
}
|
||||
|
||||
if (resolvingResult.rootCtorArguments.Count() > 0)
|
||||
{
|
||||
if (auto stat = ctorLoader->InitializeRootInstance(ctorTypeInfo, repr->instanceName, resolvingResult.rootCtorArguments, errors))
|
||||
{
|
||||
statements->statements.Add(stat);
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH(Ptr<GuiInstanceParameter>, parameter, resolvingResult.context->parameters)
|
||||
{
|
||||
auto refInstance = MakePtr<WfReferenceExpression>();
|
||||
|
||||
+15
-13
@@ -509,7 +509,8 @@ Instance Loader
|
||||
virtual Ptr<GuiInstancePropertyInfo> GetPropertyType(const PropertyInfo& propertyInfo);
|
||||
|
||||
virtual bool CanCreate(const TypeInfo& typeInfo);
|
||||
virtual Ptr<workflow::WfBaseConstructorCall> CreateRootInstance(const TypeInfo& typeInfo, Ptr<workflow::WfExpression> controlTemplate, collections::List<WString>& errors);
|
||||
virtual Ptr<workflow::WfBaseConstructorCall> CreateRootInstance(const TypeInfo& typeInfo, ArgumentMap& arguments, collections::List<WString>& errors);
|
||||
virtual Ptr<workflow::WfStatement> InitializeRootInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors);
|
||||
virtual Ptr<workflow::WfStatement> CreateInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors);
|
||||
virtual Ptr<workflow::WfStatement> AssignParameters(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors);
|
||||
virtual Ptr<workflow::WfExpression> GetParameter(const PropertyInfo& propertyInfo, GlobalStringKey variableName, collections::List<WString>& errors);
|
||||
@@ -1136,7 +1137,7 @@ GuiVrtualTypeInstanceLoader
|
||||
auto controlTemplateNameExpr = argument.Cast<WfStringExpression>();
|
||||
if (!controlTemplateNameExpr)
|
||||
{
|
||||
errors.Add(L"Precompile: The value of contructor parameter \"" + propertyName + L"\" of type \"" + controlTypeInfo.typeName.ToString() + L"\" should be a constant representing the control template type name.");
|
||||
errors.Add(L"Precompile: The value of contructor parameter \"" + propertyName + L"\" of type \"" + controlTypeInfo.typeName.ToString() + L"\" should be a constant representing control template type names.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1235,21 +1236,22 @@ GuiVrtualTypeInstanceLoader
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<workflow::WfBaseConstructorCall> CreateRootInstance(const TypeInfo& typeInfo, Ptr<workflow::WfExpression> controlTemplate, collections::List<WString>& errors)override
|
||||
Ptr<workflow::WfBaseConstructorCall> CreateRootInstance(const TypeInfo& typeInfo, ArgumentMap& arguments, collections::List<WString>& errors)override
|
||||
{
|
||||
auto controlType = TypeInfoRetriver<TControl>::CreateTypeInfo();
|
||||
|
||||
if (auto createStyleExpr = CreateInstance_ControlTemplate(typeInfo, controlTemplate, errors))
|
||||
auto index = arguments.Keys().IndexOf(GlobalStringKey::_ControlTemplate);
|
||||
if (index != -1)
|
||||
{
|
||||
auto createControl = MakePtr<WfBaseConstructorCall>();
|
||||
createControl->type = GetTypeFromTypeInfo(controlType.Obj());
|
||||
createControl->arguments.Add(createStyleExpr);
|
||||
return createControl;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
auto controlTemplate = arguments.GetByIndex(index)[0].expression;
|
||||
if (auto createStyleExpr = CreateInstance_ControlTemplate(typeInfo, controlTemplate, errors))
|
||||
{
|
||||
auto createControl = MakePtr<WfBaseConstructorCall>();
|
||||
createControl->type = GetTypeFromTypeInfo(controlType.Obj());
|
||||
createControl->arguments.Add(createStyleExpr);
|
||||
return createControl;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Ptr<workflow::WfStatement> CreateInstance(const TypeInfo& typeInfo, GlobalStringKey variableName, ArgumentMap& arguments, collections::List<WString>& errors)override
|
||||
|
||||
+161
-133
@@ -16929,10 +16929,6 @@ WfGenerateExpressionVisitor
|
||||
|
||||
void Visit(WfMemberExpression* node)override
|
||||
{
|
||||
if (node->name.value == L"MyList")
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
auto result = config->manager->expressionResolvings[node];
|
||||
auto parentResult = config->manager->expressionResolvings[node->parent.Obj()];
|
||||
WriteReferenceTemplate(result,
|
||||
@@ -18196,27 +18192,30 @@ namespace vl
|
||||
WritePushCompileOptions(writer);
|
||||
writer.WriteLine(L"");
|
||||
|
||||
if (closureInfos.Count() > 0)
|
||||
{
|
||||
Dictionary<WString, Ptr<WfExpression>> reversedClosures;
|
||||
CopyFrom(
|
||||
reversedClosures,
|
||||
From(closureInfos)
|
||||
.Select([](Pair<Ptr<WfExpression>, Ptr<ClosureInfo>> pair)
|
||||
{
|
||||
return Pair<WString, Ptr<WfExpression>>(pair.value->lambdaClassName, pair.key);
|
||||
})
|
||||
);
|
||||
|
||||
writer.WriteString(L"namespace ");
|
||||
writer.WriteLine(assemblyNamespace);
|
||||
writer.WriteLine(L"{");
|
||||
FOREACH(Ptr<WfExpression>, closure, reversedClosures.Values())
|
||||
Dictionary<WString, Ptr<WfExpression>> reversedLambdaExprs;
|
||||
Dictionary<WString, Ptr<WfNewInterfaceExpression>> reversedClassExprs;
|
||||
SortClosure(reversedLambdaExprs, reversedClassExprs);
|
||||
|
||||
if (reversedLambdaExprs.Count() + reversedClassExprs.Count() > 0)
|
||||
{
|
||||
WriteHeader_ClosurePreDecl(writer, closure);
|
||||
writer.WriteString(L"namespace ");
|
||||
writer.WriteLine(assemblyNamespace);
|
||||
writer.WriteLine(L"{");
|
||||
|
||||
FOREACH(Ptr<WfExpression>, expr, reversedLambdaExprs.Values())
|
||||
{
|
||||
WriteHeader_ClosurePreDecl(writer, expr);
|
||||
}
|
||||
|
||||
FOREACH(Ptr<WfNewInterfaceExpression>, expr, reversedClassExprs.Values())
|
||||
{
|
||||
WriteHeader_ClosurePreDecl(writer, expr);
|
||||
}
|
||||
|
||||
writer.WriteLine(L"}");
|
||||
writer.WriteLine(L"");
|
||||
}
|
||||
writer.WriteLine(L"}");
|
||||
writer.WriteLine(L"");
|
||||
}
|
||||
|
||||
List<WString> nss;
|
||||
@@ -19754,8 +19753,33 @@ namespace vl
|
||||
using namespace reflection;
|
||||
using namespace reflection::description;
|
||||
|
||||
void WfCppConfig::SortClosure(Dictionary<WString, Ptr<WfExpression>>& reversedLambdaExprs, Dictionary<WString, Ptr<WfNewInterfaceExpression>>& reversedClassExprs)
|
||||
{
|
||||
CopyFrom(
|
||||
reversedLambdaExprs,
|
||||
From(lambdaExprs)
|
||||
.Select([](Pair<Ptr<WfExpression>, WString> pair)
|
||||
{
|
||||
return Pair<WString, Ptr<WfExpression>>(pair.value, pair.key);
|
||||
})
|
||||
);
|
||||
|
||||
CopyFrom(
|
||||
reversedClassExprs,
|
||||
From(classExprs)
|
||||
.Select([](Pair<Ptr<WfNewInterfaceExpression>, WString> pair)
|
||||
{
|
||||
return Pair<WString, Ptr<WfNewInterfaceExpression>>(pair.value, pair.key);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteHeader_Global(stream::StreamWriter& writer)
|
||||
{
|
||||
Dictionary<WString, Ptr<WfExpression>> reversedLambdaExprs;
|
||||
Dictionary<WString, Ptr<WfNewInterfaceExpression>> reversedClassExprs;
|
||||
SortClosure(reversedLambdaExprs, reversedClassExprs);
|
||||
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Global Variables and Functions");
|
||||
writer.WriteLine(L"***********************************************************************/");
|
||||
@@ -19796,30 +19820,35 @@ namespace vl
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteLine(L"\t\tstatic " + assemblyName + L"& Instance();");
|
||||
writer.WriteLine(L"\t};");
|
||||
|
||||
if (reversedLambdaExprs.Count() + reversedClassExprs.Count() > 0)
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Closures");
|
||||
writer.WriteLine(L"***********************************************************************/");
|
||||
|
||||
FOREACH(Ptr<WfExpression>, expr, reversedLambdaExprs.Values())
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
WriteHeader_LambdaExprDecl(writer, expr);
|
||||
}
|
||||
|
||||
FOREACH(Ptr<WfNewInterfaceExpression>, expr, reversedClassExprs.Values())
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
WriteHeader_ClassExprDecl(writer, expr);
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteLine(L"}");
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_Global(stream::StreamWriter& writer)
|
||||
{
|
||||
Dictionary<WString, Ptr<WfExpression>> reversedLambdaExprs;
|
||||
CopyFrom(
|
||||
reversedLambdaExprs,
|
||||
From(lambdaExprs)
|
||||
.Select([](Pair<Ptr<WfExpression>, WString> pair)
|
||||
{
|
||||
return Pair<WString, Ptr<WfExpression>>(pair.value, pair.key);
|
||||
})
|
||||
);
|
||||
|
||||
Dictionary<WString, Ptr<WfNewInterfaceExpression>> reversedClassExprs;
|
||||
CopyFrom(
|
||||
reversedClassExprs,
|
||||
From(classExprs)
|
||||
.Select([](Pair<Ptr<WfNewInterfaceExpression>, WString> pair)
|
||||
{
|
||||
return Pair<WString, Ptr<WfNewInterfaceExpression>>(pair.value, pair.key);
|
||||
})
|
||||
);
|
||||
SortClosure(reversedLambdaExprs, reversedClassExprs);
|
||||
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Global Variables");
|
||||
@@ -19885,24 +19914,32 @@ namespace vl
|
||||
writer.WriteLine(assemblyNamespace);
|
||||
writer.WriteLine(L"{");
|
||||
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Global Functions");
|
||||
writer.WriteLine(L"***********************************************************************/");
|
||||
|
||||
FOREACH(Ptr<WfFunctionDeclaration>, decl, funcDecls)
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteString(L"\t");
|
||||
auto returnType = WriteFunctionHeader(writer, decl, assemblyName + L"::" + ConvertName(decl->name.value), true);
|
||||
writer.WriteLine(L"");
|
||||
WriteFunctionBody(writer, decl->statement, L"\t", returnType);
|
||||
}
|
||||
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteLine(L"\t" + assemblyName + L"& " + assemblyName + L"::Instance()");
|
||||
writer.WriteLine(L"\t{");
|
||||
writer.WriteLine(L"\t\treturn Get" + storageName + L"().instance;");
|
||||
writer.WriteLine(L"\t}");
|
||||
|
||||
if (reversedLambdaExprs.Count() + reversedClassExprs.Count() > 0)
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Closure Definitions");
|
||||
writer.WriteLine(L"Closures");
|
||||
writer.WriteLine(L"***********************************************************************/");
|
||||
|
||||
FOREACH(Ptr<WfExpression>, expr, reversedLambdaExprs.Values())
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
WriteCpp_LambdaExprDecl(writer, expr);
|
||||
}
|
||||
|
||||
FOREACH(Ptr<WfNewInterfaceExpression>, expr, reversedClassExprs.Values())
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
WriteCpp_ClassExprDecl(writer, expr);
|
||||
}
|
||||
|
||||
FOREACH(Ptr<WfExpression>, expr, reversedLambdaExprs.Values())
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
@@ -19922,24 +19959,7 @@ namespace vl
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.WriteLine(L"/***********************************************************************");
|
||||
writer.WriteLine(L"Global Functions");
|
||||
writer.WriteLine(L"***********************************************************************/");
|
||||
|
||||
FOREACH(Ptr<WfFunctionDeclaration>, decl, funcDecls)
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteString(L"\t");
|
||||
auto returnType = WriteFunctionHeader(writer, decl, assemblyName + L"::" + ConvertName(decl->name.value), true);
|
||||
writer.WriteLine(L"");
|
||||
WriteFunctionBody(writer, decl->statement, L"\t", returnType);
|
||||
}
|
||||
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteLine(L"\t" + assemblyName + L"& " + assemblyName + L"::Instance()");
|
||||
writer.WriteLine(L"\t{");
|
||||
writer.WriteLine(L"\t\treturn Get" + storageName + L"().instance;");
|
||||
writer.WriteLine(L"\t}");
|
||||
writer.WriteLine(L"}");
|
||||
}
|
||||
}
|
||||
@@ -20138,7 +20158,76 @@ WfCppConfig::WriteCpp
|
||||
writer.WriteLine(L";");
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_ClosureMembers(stream::StreamWriter& writer, Ptr<WfExpression> closure)
|
||||
void WfCppConfig::WriteHeader_LambdaExprDecl(stream::StreamWriter& writer, Ptr<WfExpression> lambda)
|
||||
{
|
||||
if (auto ordered = lambda.Cast<WfOrderedLambdaExpression>())
|
||||
{
|
||||
auto name = lambdaExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tstruct " + name);
|
||||
writer.WriteLine(L"\t{");
|
||||
|
||||
if (WriteCpp_ClosureMembers(writer, lambda))
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
}
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteFunctionHeader(writer, ordered, L"operator()", true);
|
||||
writer.WriteLine(L" const;");
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
else if (auto funcExpr = lambda.Cast<WfFunctionExpression>())
|
||||
{
|
||||
auto name = lambdaExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tstruct " + name);
|
||||
writer.WriteLine(L"\t{");
|
||||
|
||||
if (WriteCpp_ClosureMembers(writer, lambda))
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
}
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteFunctionHeader(writer, funcExpr, L"operator()", true);
|
||||
writer.WriteLine(L" const;");
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteHeader_ClassExprDecl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda)
|
||||
{
|
||||
auto result = manager->expressionResolvings[lambda.Obj()];
|
||||
auto td = result.constructorInfo->GetOwnerTypeDescriptor();
|
||||
auto name = classExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tclass " + name + L" : public ::vl::Object, public virtual " + ConvertType(td));
|
||||
writer.WriteLine(L"\t{");
|
||||
writer.WriteLine(L"\tpublic:");
|
||||
|
||||
if (WriteCpp_ClosureMembers(writer, lambda))
|
||||
{
|
||||
writer.WriteLine(L"");
|
||||
}
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
FOREACH(Ptr<WfClassMember>, member, lambda->members)
|
||||
{
|
||||
GenerateClassMemberDecl(this, writer, name, member, L"\t\t", true);
|
||||
}
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
|
||||
bool WfCppConfig::WriteCpp_ClosureMembers(stream::StreamWriter& writer, Ptr<WfExpression> closure)
|
||||
{
|
||||
auto info = closureInfos[closure.Obj()];
|
||||
|
||||
@@ -20161,6 +20250,8 @@ WfCppConfig::WriteCpp
|
||||
writer.WriteString(L"__vwsnthis_" + itow(index));
|
||||
writer.WriteLine(L";");
|
||||
}
|
||||
|
||||
return info->symbols.Count() + info->thisTypes.Count() > 0;
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_ClosureCtor(stream::StreamWriter& writer, Ptr<WfExpression> closure, const WString& name)
|
||||
@@ -20232,46 +20323,6 @@ WfCppConfig::WriteCpp
|
||||
}
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_LambdaExprDecl(stream::StreamWriter& writer, Ptr<WfExpression> lambda)
|
||||
{
|
||||
if (auto ordered = lambda.Cast<WfOrderedLambdaExpression>())
|
||||
{
|
||||
auto name = lambdaExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tstruct " + name);
|
||||
writer.WriteLine(L"\t{");
|
||||
|
||||
WriteCpp_ClosureMembers(writer, lambda);
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteFunctionHeader(writer, ordered, L"operator()", true);
|
||||
writer.WriteLine(L" const;");
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
else if (auto funcExpr = lambda.Cast<WfFunctionExpression>())
|
||||
{
|
||||
auto name = lambdaExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tstruct " + name);
|
||||
writer.WriteLine(L"\t{");
|
||||
|
||||
WriteCpp_ClosureMembers(writer, lambda);
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteFunctionHeader(writer, funcExpr, L"operator()", true);
|
||||
writer.WriteLine(L" const;");
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_LambdaExprImpl(stream::StreamWriter& writer, Ptr<WfExpression> lambda)
|
||||
{
|
||||
if (auto ordered = lambda.Cast<WfOrderedLambdaExpression>())
|
||||
@@ -20312,29 +20363,6 @@ WfCppConfig::WriteCpp
|
||||
}
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_ClassExprDecl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda)
|
||||
{
|
||||
auto result = manager->expressionResolvings[lambda.Obj()];
|
||||
auto td = result.constructorInfo->GetOwnerTypeDescriptor();
|
||||
auto name = classExprs[lambda.Obj()];
|
||||
writer.WriteLine(L"\tclass " + name + L" : public ::vl::Object, public virtual " + ConvertType(td));
|
||||
writer.WriteLine(L"\t{");
|
||||
writer.WriteLine(L"\tpublic:");
|
||||
|
||||
WriteCpp_ClosureMembers(writer, lambda);
|
||||
writer.WriteLine(L"");
|
||||
writer.WriteString(L"\t\t");
|
||||
WriteCpp_ClosureCtor(writer, lambda, name);
|
||||
writer.WriteLine(L";");
|
||||
writer.WriteLine(L"");
|
||||
|
||||
FOREACH(Ptr<WfClassMember>, member, lambda->members)
|
||||
{
|
||||
GenerateClassMemberDecl(this, writer, name, member, L"\t\t", true);
|
||||
}
|
||||
writer.WriteLine(L"\t};");
|
||||
}
|
||||
|
||||
void WfCppConfig::WriteCpp_ClassExprImpl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda)
|
||||
{
|
||||
auto name = classExprs[lambda.Obj()];
|
||||
|
||||
@@ -2695,12 +2695,12 @@ namespace vl
|
||||
void WriteHeader_Struct(stream::StreamWriter& writer, Ptr<WfStructDeclaration> decl, collections::List<WString>& nss);
|
||||
|
||||
void WriteHeader_ClosurePreDecl(stream::StreamWriter& writer, Ptr<WfExpression> closure);
|
||||
void WriteCpp_ClosureMembers(stream::StreamWriter& writer, Ptr<WfExpression> closure);
|
||||
void WriteHeader_LambdaExprDecl(stream::StreamWriter& writer, Ptr<WfExpression> lambda);
|
||||
void WriteHeader_ClassExprDecl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda);
|
||||
bool WriteCpp_ClosureMembers(stream::StreamWriter& writer, Ptr<WfExpression> closure);
|
||||
void WriteCpp_ClosureCtor(stream::StreamWriter& writer, Ptr<WfExpression> closure, const WString& name);
|
||||
void WriteCpp_ClosureCtorInitList(stream::StreamWriter& writer, Ptr<WfExpression> closure);
|
||||
void WriteCpp_LambdaExprDecl(stream::StreamWriter& writer, Ptr<WfExpression> lambda);
|
||||
void WriteCpp_LambdaExprImpl(stream::StreamWriter& writer, Ptr<WfExpression> lambda);
|
||||
void WriteCpp_ClassExprDecl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda);
|
||||
void WriteCpp_ClassExprImpl(stream::StreamWriter& writer, Ptr<WfNewInterfaceExpression> lambda);
|
||||
|
||||
void WriteHeader_ClassPreDecl(stream::StreamWriter& writer, Ptr<WfClassDeclaration> decl, const WString& name, const WString& prefix);
|
||||
@@ -2711,6 +2711,7 @@ namespace vl
|
||||
bool WriteCpp_ClassMember(stream::StreamWriter& writer, Ptr<WfClassDeclaration> decl, Ptr<WfClassMember> member, collections::List<WString>& nss);
|
||||
void WriteCpp_Class(stream::StreamWriter& writer, Ptr<WfClassDeclaration> decl, collections::List<WString>& nss);
|
||||
|
||||
void SortClosure(collections::Dictionary<WString, Ptr<WfExpression>>& reversedLambdaExprs, collections::Dictionary<WString, Ptr<WfNewInterfaceExpression>>& reversedClassExprs);
|
||||
void WriteHeader_Global(stream::StreamWriter& writer);
|
||||
void WriteCpp_Global(stream::StreamWriter& writer);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -69,7 +69,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);VCZH_DEBUG_NO_REFLECTION</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -118,8 +118,8 @@
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\GacUI\GacUI.vcxproj">
|
||||
<Project>{8018d622-66ba-4e65-9d03-bdac37ea9a54}</Project>
|
||||
<ProjectReference Include="..\..\Lib\GacUILite\GacUILite.vcxproj">
|
||||
<Project>{96c559ca-9718-4bec-a053-28a0ab6a8ca2}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{A7FA6C2B-37E
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GacUILite", "..\Lib\GacUILite\GacUILite.vcxproj", "{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GacUI", "..\Lib\GacUI\GacUI.vcxproj", "{8018D622-66BA-4E65-9D03-BDAC37EA9A54}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -25,16 +23,11 @@ Global
|
||||
{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{96C559CA-9718-4BEC-A053-28A0AB6A8CA2}.Release|Win32.Build.0 = Release|Win32
|
||||
{8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8018D622-66BA-4E65-9D03-BDAC37EA9A54}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{96C559CA-9718-4BEC-A053-28A0AB6A8CA2} = {A7FA6C2B-37E0-4C2B-AC76-6E577A987492}
|
||||
{8018D622-66BA-4E65-9D03-BDAC37EA9A54} = {A7FA6C2B-37E0-4C2B-AC76-6E577A987492}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Reference in New Issue
Block a user