Update release

This commit is contained in:
Zihan Chen
2018-04-10 21:46:15 -07:00
parent 0e31b26bcc
commit 8b3c15d97c
25 changed files with 7237 additions and 2758 deletions
+20 -9
View File
@@ -8643,7 +8643,7 @@ GuiResponsiveCompositionBase
auto parent = GetParent();
while (parent)
{
if (responsive = dynamic_cast<GuiResponsiveCompositionBase*>(parent))
if ((responsive = dynamic_cast<GuiResponsiveCompositionBase*>(parent)))
{
break;
}
@@ -8815,7 +8815,7 @@ GuiResponsiveSharedComposition
auto parent = GetParent();
while (parent)
{
if (currentView = dynamic_cast<GuiResponsiveViewComposition*>(parent))
if ((currentView = dynamic_cast<GuiResponsiveViewComposition*>(parent)))
{
break;
}
@@ -9152,7 +9152,7 @@ GuiResponsiveStackComposition
SortedList<GuiResponsiveCompositionBase*> ignored;
while (true)
{
GuiResponsiveCompositionBase* selected = false;
GuiResponsiveCompositionBase* selected = nullptr;
vint size = 0;
FOREACH(GuiResponsiveCompositionBase*, child, availables)
@@ -9507,12 +9507,7 @@ GuiApplication
}
GuiApplication::GuiApplication()
:mainWindow(0)
,sharedTooltipOwnerWindow(0)
,sharedTooltipOwner(0)
,sharedTooltipControl(0)
,sharedTooltipHovering(false)
,sharedTooltipClosing(false)
:locale(Locale::UserDefault())
{
GetCurrentController()->CallbackService()->InstallListener(this);
}
@@ -9592,6 +9587,20 @@ GuiApplication
}
}
Locale GuiApplication::GetLocale()
{
return locale;
}
void GuiApplication::SetLocale(Locale value)
{
if (locale != value)
{
locale = value;
LocaleChanged();
}
}
void GuiApplication::Run(GuiWindow* _mainWindow)
{
if (!mainWindow)
@@ -29975,6 +29984,7 @@ GlobalStringKey
GlobalStringKey GlobalStringKey::_Ref;
GlobalStringKey GlobalStringKey::_Bind;
GlobalStringKey GlobalStringKey::_Format;
GlobalStringKey GlobalStringKey::_Str;
GlobalStringKey GlobalStringKey::_Eval;
GlobalStringKey GlobalStringKey::_Uri;
GlobalStringKey GlobalStringKey::_ControlTemplate;
@@ -29992,6 +30002,7 @@ GlobalStringKey
GlobalStringKey::_Ref = GlobalStringKey::Get(L"ref");
GlobalStringKey::_Bind = GlobalStringKey::Get(L"bind");
GlobalStringKey::_Format = GlobalStringKey::Get(L"format");
GlobalStringKey::_Str = GlobalStringKey::Get(L"str");
GlobalStringKey::_Eval = GlobalStringKey::Get(L"eval");
GlobalStringKey::_Uri = GlobalStringKey::Get(L"uri");
GlobalStringKey::_ControlTemplate = GlobalStringKey::Get(L"ControlTemplate");
+26 -13
View File
@@ -3858,6 +3858,7 @@ Global String Key
static GlobalStringKey _Ref;
static GlobalStringKey _Bind;
static GlobalStringKey _Format;
static GlobalStringKey _Str;
static GlobalStringKey _Eval;
static GlobalStringKey _Uri;
static GlobalStringKey _ControlTemplate;
@@ -7317,7 +7318,7 @@ GuiResponsiveViewComposition
bool CalculateLevelCount();
bool CalculateCurrentLevel();
void OnResponsiveChildLevelUpdated();
void OnResponsiveChildLevelUpdated()override;
public:
GuiResponsiveViewComposition();
@@ -7363,9 +7364,9 @@ Others
bool CalculateLevelCount();
bool CalculateCurrentLevel();
void OnResponsiveChildInserted(GuiResponsiveCompositionBase* child);
void OnResponsiveChildRemoved(GuiResponsiveCompositionBase* child);
void OnResponsiveChildLevelUpdated();
void OnResponsiveChildInserted(GuiResponsiveCompositionBase* child)override;
void OnResponsiveChildRemoved(GuiResponsiveCompositionBase* child)override;
void OnResponsiveChildLevelUpdated()override;
bool ChangeLevel(bool levelDown);
public:
@@ -7389,9 +7390,9 @@ Others
bool CalculateLevelCount();
bool CalculateCurrentLevel();
void OnResponsiveChildInserted(GuiResponsiveCompositionBase* child);
void OnResponsiveChildRemoved(GuiResponsiveCompositionBase* child);
void OnResponsiveChildLevelUpdated();
void OnResponsiveChildInserted(GuiResponsiveCompositionBase* child)override;
void OnResponsiveChildRemoved(GuiResponsiveCompositionBase* child)override;
void OnResponsiveChildLevelUpdated()override;
public:
GuiResponsiveGroupComposition();
@@ -7430,6 +7431,7 @@ GuiResponsiveContainerComposition
#endif
/***********************************************************************
.\GRAPHICSCOMPOSITION\GUIGRAPHICSSPECIALIZEDCOMPOSITION.H
***********************************************************************/
@@ -11124,12 +11126,13 @@ Application
void RightButtonUp(Point position)override;
void ClipboardUpdated()override;
protected:
GuiWindow* mainWindow;
GuiWindow* sharedTooltipOwnerWindow;
GuiControl* sharedTooltipOwner;
GuiTooltip* sharedTooltipControl;
bool sharedTooltipHovering;
bool sharedTooltipClosing;
Locale locale;
GuiWindow* mainWindow = nullptr;
GuiWindow* sharedTooltipOwnerWindow = nullptr;
GuiControl* sharedTooltipOwner = nullptr;
GuiTooltip* sharedTooltipControl = nullptr;
bool sharedTooltipHovering = false;
bool sharedTooltipClosing = false;
collections::List<GuiWindow*> windows;
collections::SortedList<GuiPopup*> openingPopups;
@@ -11145,6 +11148,16 @@ Application
void TooltipMouseEnter(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
void TooltipMouseLeave(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
public:
/// <summary>Locale changed event.</summary>
Event<void()> LocaleChanged;
/// <summary>Returns the selected locale for all windows.</summary>
/// <returns>The selected locale.</returns>
Locale GetLocale();
/// <summary>Set the locale for all windows.</summary>
/// <param name="value">The selected locale.</param>
void SetLocale(Locale value);
/// <summary>Run a <see cref="GuiWindow"/> as the main window and show it. This function can only be called once in the entry point. When the main window is closed or hiden, the Run function will finished, and the application should prepare for finalization.</summary>
/// <param name="_mainWindow">The main window.</param>
void Run(GuiWindow* _mainWindow);
+2861 -1675
View File
File diff suppressed because it is too large Load Diff
+92
View File
@@ -411,6 +411,18 @@ Instance Namespace
GuiResourceTextPos classPosition;
};
class GuiInstanceLocalized : public Object, public Description<GuiInstanceLocalized>
{
public:
GlobalStringKey name;
GlobalStringKey uri;
GuiResourceTextPos tagPosition;
GuiResourceTextPos uriPosition;
bool defaultStrings = false;
WString className;
WString interfaceName;
};
/***********************************************************************
Instance Context
***********************************************************************/
@@ -430,6 +442,7 @@ Instance Context
};
typedef collections::Dictionary<GlobalStringKey, Ptr<NamespaceInfo>> NamespaceMap;
typedef collections::List<Ptr<GuiInstanceParameter>> ParameterList;
typedef collections::List<Ptr<GuiInstanceLocalized>> LocalizedList;
typedef collections::List<Ptr<GuiInstanceStyleContext>> StyleContextList;
class ElementName : public Object
@@ -456,6 +469,7 @@ Instance Context
collections::List<WString> stylePaths;
ParameterList parameters;
LocalizedList localizeds;
WString memberScript;
WString ctorScript;
WString dtorScript;
@@ -599,6 +613,7 @@ namespace vl
extern Ptr<GuiInstanceCompiledWorkflow> WriteWorkflowScript(
Ptr<GuiResourceFolder> precompiledFolder,
const WString& assemblyResourcePath,
const filesystem::FilePath& workflowPath);
extern Ptr<workflow::cppcodegen::WfCppOutput> WriteCppCodesToFile(
@@ -690,6 +705,83 @@ namespace vl
#endif
/***********************************************************************
.\GUIINSTANCELOCALIZEDSTRINGS.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI Reflection: Shared Script
Interfaces:
***********************************************************************/
#ifndef VCZH_PRESENTATION_REFLECTION_GUIINSTANCELOCALIZEDSTRINGS
#define VCZH_PRESENTATION_REFLECTION_GUIINSTANCELOCALIZEDSTRINGS
namespace vl
{
namespace presentation
{
class GuiInstanceLocalizedStrings : public Object, public Description<GuiInstanceLocalizedStrings>
{
public:
struct StringItem
{
public:
WString name;
WString text;
GuiResourceTextPos textPosition;
};
struct Strings
{
using StringItemMap = collections::Dictionary<WString, Ptr<StringItem>>;
collections::List<WString> locales;
StringItemMap items;
GuiResourceTextPos tagPosition;
WString GetLocalesName();
};
WString className;
WString defaultLocale;
collections::List<Ptr<Strings>> strings;
GuiResourceTextPos tagPosition;
using ParameterPair = collections::Pair<Ptr<reflection::description::ITypeInfo>, WString>;
using ParameterList = collections::List<ParameterPair>;
using PositionList = collections::List<vint>;
using TextList = collections::List<WString>;
struct TextDesc
{
ParameterList parameters;
PositionList positions;
TextList texts;
};
using TextDescMap = collections::Dictionary<collections::Pair<Ptr<Strings>, WString>, Ptr<TextDesc>>;
static Ptr<GuiInstanceLocalizedStrings> LoadFromXml(Ptr<GuiResourceItem> resource, Ptr<parsing::xml::XmlDocument> xml, GuiResourceError::List& errors);
Ptr<parsing::xml::XmlElement> SaveToXml();
Ptr<Strings> GetDefaultStrings();
WString GetInterfaceTypeName(bool hasNamespace);
Ptr<TextDesc> ParseLocalizedText(const WString& text, GuiResourceTextPos pos, GuiResourceError::List& errors);
void Validate(TextDescMap& textDescs, GuiResourcePrecompileContext& precompileContext, GuiResourceError::List& errors);
Ptr<workflow::WfFunctionDeclaration> GenerateFunction(Ptr<TextDesc> textDesc, const WString& functionName, workflow::WfClassMemberKind classMemberKind);
Ptr<workflow::WfExpression> GenerateStrings(TextDescMap& textDescs, Ptr<Strings> ls);
Ptr<workflow::WfModule> Compile(GuiResourcePrecompileContext& precompileContext, const WString& moduleName, GuiResourceError::List& errors);
};
}
}
#endif
/***********************************************************************
.\GUIINSTANCELOADER.H
***********************************************************************/
+2
View File
@@ -1351,6 +1351,8 @@ Type Declaration
BEGIN_CLASS_MEMBER(GuiApplication)
CLASS_MEMBER_STATIC_EXTERNALMETHOD(GetApplication, NO_PARAMETER, GuiApplication*(*)(), vl::presentation::controls::GetApplication)
CLASS_MEMBER_EVENT(LocaleChanged)
CLASS_MEMBER_PROPERTY_EVENT_FAST(Locale, LocaleChanged)
CLASS_MEMBER_PROPERTY_READONLY_FAST(MainWindow)
CLASS_MEMBER_PROPERTY_READONLY_FAST(TooltipOwner)
CLASS_MEMBER_PROPERTY_READONLY_FAST(ExecutablePath)
+1 -1
View File
@@ -7084,7 +7084,7 @@ UniscribeParagraph (Caret)
GetVirtualLineIndexFromTextPos(comparingCaret, frontLine, frontVirtualLine, backVirtualLine);
vint virtualLineIndex=preferFrontSide?frontVirtualLine:backVirtualLine;
Ptr<UniscribeVirtualLine> virtualLine=virtualLineIndex==-1?0:line->virtualLines[virtualLineIndex];
Ptr<UniscribeVirtualLine> virtualLine=virtualLineIndex==-1?nullptr:line->virtualLines[virtualLineIndex];
switch(position)
{
+8 -2
View File
@@ -1290,25 +1290,31 @@ Locale
#endif
}
#ifdef VCZH_MSVC
WString Locale::FormatNumber(const WString& number)const
{
#ifdef VCZH_MSVC
int length=GetNumberFormatEx(localeName.Buffer(), 0, number.Buffer(), NULL, NULL, 0);
if(length==0) return L"";
Array<wchar_t> buffer(length);
GetNumberFormatEx(localeName.Buffer(), 0, number.Buffer(), NULL, &buffer[0], (int)buffer.Count());
return &buffer[0];
#elif defined VCZH_GCC
return number;
#endif
}
WString Locale::FormatCurrency(const WString& currency)const
{
#ifdef VCZH_MSVC
int length=GetCurrencyFormatEx(localeName.Buffer(), 0, currency.Buffer(), NULL, NULL, 0);
if(length==0) return L"";
Array<wchar_t> buffer(length);
GetCurrencyFormatEx(localeName.Buffer(), 0, currency.Buffer(), NULL, &buffer[0], (int)buffer.Count());
return &buffer[0];
}
#elif defined VCZH_GCC
return currency;
#endif
}
WString Locale::GetShortDayOfWeekName(vint dayOfWeek)const
{
+1 -2
View File
@@ -6836,7 +6836,7 @@ namespace vl
/// <param name="format">The format to use.</param>
/// <param name="time">The time to convert.</param>
WString FormatTime(const WString& format, DateTime time)const;
#ifdef VCZH_MSVC
/// <summary>Convert a number to a formatted string.</summary>
/// <returns>The formatted string.</returns>
/// <param name="number">The number to convert.</param>
@@ -6845,7 +6845,6 @@ namespace vl
/// <returns>The formatted string.</returns>
/// <param name="currency">The currency to convert.</param>
WString FormatCurrency(const WString& currency)const;
#endif
/// <summary>Get the short display string of a day of week.</summary>
/// <returns>The display string.</returns>
+130 -1
View File
@@ -718,7 +718,7 @@ StateMachine
}
/***********************************************************************
Libraries
Sys
***********************************************************************/
namespace system_sys
@@ -844,6 +844,10 @@ Libraries
DEFINE_COMPARE(DateTime)
#undef DEFINE_COMPARE
/***********************************************************************
Math
***********************************************************************/
#define DEFINE_MINMAX(TYPE)\
TYPE Math::Min(TYPE a, TYPE b)\
{\
@@ -857,6 +861,107 @@ Libraries
REFLECTION_PREDEFINED_PRIMITIVE_TYPES(DEFINE_MINMAX)
DEFINE_MINMAX(DateTime)
#undef DEFINE_MINMAX
/***********************************************************************
Localization
***********************************************************************/
Locale Localization::Invariant()
{
return Locale::Invariant();
}
Locale Localization::System()
{
return Locale::SystemDefault();
}
Locale Localization::User()
{
return Locale::UserDefault();
}
collections::LazyList<Locale> Localization::Locales()
{
auto result = MakePtr<List<Locale>>();
Locale::Enumerate(*result.Obj());
return result;
}
collections::LazyList<WString> Localization::GetShortDateFormats(Locale locale)
{
auto result = MakePtr<List<WString>>();
locale.GetShortDateFormats(*result.Obj());
return result;
}
collections::LazyList<WString> Localization::GetLongDateFormats(Locale locale)
{
auto result = MakePtr<List<WString>>();
locale.GetLongDateFormats(*result.Obj());
return result;
}
collections::LazyList<WString> Localization::GetYearMonthDateFormats(Locale locale)
{
auto result = MakePtr<List<WString>>();
locale.GetYearMonthDateFormats(*result.Obj());
return result;
}
collections::LazyList<WString> Localization::GetLongTimeFormats(Locale locale)
{
auto result = MakePtr<List<WString>>();
locale.GetLongTimeFormats(*result.Obj());
return result;
}
collections::LazyList<WString> Localization::GetShortTimeFormats(Locale locale)
{
auto result = MakePtr<List<WString>>();
locale.GetShortTimeFormats(*result.Obj());
return result;
}
WString Localization::GetShortDayOfWeekName(Locale locale, vint dayOfWeek)
{
return locale.GetShortDayOfWeekName(dayOfWeek);
}
WString Localization::GetLongDayOfWeekName(Locale locale, vint dayOfWeek)
{
return locale.GetLongDayOfWeekName(dayOfWeek);
}
WString Localization::GetShortMonthName(Locale locale, vint month)
{
return locale.GetShortMonthName(month);
}
WString Localization::GetLongMonthName(Locale locale, vint month)
{
return locale.GetLongMonthName(month);
}
WString Localization::FormatDate(Locale locale, const WString& format, DateTime date)
{
return locale.FormatDate(format, date);
}
WString Localization::FormatTime(Locale locale, const WString& format, DateTime date)
{
return locale.FormatTime(format, date);
}
WString Localization::FormatNumber(Locale locale, const WString& number)
{
return locale.FormatNumber(number);
}
WString Localization::FormatCurrency(Locale locale, const WString& number)
{
return locale.FormatCurrency(number);
}
}
}
}
@@ -886,6 +991,7 @@ TypeName
IMPL_TYPE_INFO_RENAME(vl::reflection::description::Sys, system::Sys)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::Math, system::Math)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::Localization, system::Localization)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::CoroutineStatus, system::CoroutineStatus)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::CoroutineResult, system::CoroutineResult)
IMPL_TYPE_INFO_RENAME(vl::reflection::description::ICoroutine, system::Coroutine)
@@ -1005,6 +1111,29 @@ WfLoadLibraryTypes
CLASS_MEMBER_STATIC_METHOD(Trunc, { L"value" })
END_CLASS_MEMBER(Math)
BEGIN_CLASS_MEMBER(Localization)
CLASS_MEMBER_STATIC_METHOD(Invariant, NO_PARAMETER)
CLASS_MEMBER_STATIC_METHOD(System, NO_PARAMETER)
CLASS_MEMBER_STATIC_METHOD(User, NO_PARAMETER)
CLASS_MEMBER_STATIC_METHOD(Locales, NO_PARAMETER)
CLASS_MEMBER_STATIC_METHOD(GetShortDateFormats, { L"locale" })
CLASS_MEMBER_STATIC_METHOD(GetLongDateFormats, { L"locale" })
CLASS_MEMBER_STATIC_METHOD(GetYearMonthDateFormats, { L"locale" })
CLASS_MEMBER_STATIC_METHOD(GetLongTimeFormats, { L"locale" })
CLASS_MEMBER_STATIC_METHOD(GetShortTimeFormats, { L"locale" })
CLASS_MEMBER_STATIC_METHOD(GetShortDayOfWeekName, { L"locale" _ L"dayOfWeek" })
CLASS_MEMBER_STATIC_METHOD(GetLongDayOfWeekName, { L"locale" _ L"dayOfWeek" })
CLASS_MEMBER_STATIC_METHOD(GetShortMonthName, { L"locale" _ L"month" })
CLASS_MEMBER_STATIC_METHOD(GetLongMonthName, { L"locale" _ L"month" })
CLASS_MEMBER_STATIC_METHOD(FormatDate, { L"locale" _ L"format" _ L"date" })
CLASS_MEMBER_STATIC_METHOD(FormatTime, { L"locale" _ L"format" _ L"date" })
CLASS_MEMBER_STATIC_METHOD(FormatNumber, { L"locale" _ L"number" })
CLASS_MEMBER_STATIC_METHOD(FormatCurrency, { L"locale" _ L"number" })
END_CLASS_MEMBER(Localization)
BEGIN_ENUM_ITEM(CoroutineStatus)
ENUM_CLASS_ITEM(Waiting)
ENUM_CLASS_ITEM(Executing)
+26
View File
@@ -623,6 +623,31 @@ Libraries
static double Round(double value) { return round(value); }
static double Trunc(double value) { return trunc(value); }
};
class Localization : public Description<Localization>
{
public:
static Locale Invariant();
static Locale System();
static Locale User();
static collections::LazyList<Locale> Locales();
static collections::LazyList<WString> GetShortDateFormats(Locale locale);
static collections::LazyList<WString> GetLongDateFormats(Locale locale);
static collections::LazyList<WString> GetYearMonthDateFormats(Locale locale);
static collections::LazyList<WString> GetLongTimeFormats(Locale locale);
static collections::LazyList<WString> GetShortTimeFormats(Locale locale);
static WString GetShortDayOfWeekName(Locale locale, vint dayOfWeek);
static WString GetLongDayOfWeekName(Locale locale, vint dayOfWeek);
static WString GetShortMonthName(Locale locale, vint month);
static WString GetLongMonthName(Locale locale, vint month);
static WString FormatDate(Locale locale, const WString& format, DateTime date);
static WString FormatTime(Locale locale, const WString& format, DateTime date);
static WString FormatNumber(Locale locale, const WString& number);
static WString FormatCurrency(Locale locale, const WString& number);
};
}
}
}
@@ -661,6 +686,7 @@ Predefined Types
#define WORKFLOW_LIBRARY_TYPES(F)\
F(Sys) \
F(Math) \
F(Localization) \
F(CoroutineStatus) \
F(CoroutineResult) \
F(ICoroutine) \
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,124 @@
<Folder>
<LocalizedStrings name="StringResource">
<LocalizedStrings ref.Class="demo::StringResource" DefaultLocale="en-US">
<Strings Locales="en-US">
<String Name="ShortDate" Text="ShortDate: $(0:ShortDate)"/>
<String Name="LongDate" Text="LongDate: $(0:LongDate)"/>
<String Name="YearMonthDate" Text="YearMonthDate: $(0:YearMonthDate)"/>
<String Name="ShortTime" Text="ShortTime: $(0:ShortTime)"/>
<String Name="LongTime" Text="LongTime: $(0:LongTime)"/>
<String Name="DateFormat" Text="DateFormat: $(0:Date:yyyy)"/>
<String Name="TimeFormat" Text="TimeFormat: $(0:Time:HH)"/>
<String Name="Number" Text="Number: $(0:Number)"/>
<String Name="Currency" Text="Currency: $(0:Currency)"/>
<String Name="Sentence" Text="$($)Good morning, $(0)!$($)"/>
<String Name="Title" Text="Localization"/>
<String Name="Label" Text="Selected Locale:"/>
</Strings>
<Strings Locales="zh-CN">
<String Name="ShortDate" Text="短日期:$(0:ShortDate)"/>
<String Name="LongDate" Text="长日期:$(0:LongDate)"/>
<String Name="YearMonthDate" Text="年月:$(0:YearMonthDate)"/>
<String Name="ShortTime" Text="短时间:$(0:ShortTime)"/>
<String Name="LongTime" Text="长时间:$(0:LongTime)"/>
<String Name="DateFormat" Text="日期格式:$(0:Date:yyyy)"/>
<String Name="TimeFormat" Text="时间格式: $(0:Time:HH)"/>
<String Name="Number" Text="数字:$(0:Number)"/>
<String Name="Currency" Text="货币:$(0:Currency)"/>
<String Name="Sentence" Text="$($)$(0),早上好!$($)"/>
<String Name="Title" Text="本地化"/>
<String Name="Label" Text="语言设置:"/>
</Strings>
</LocalizedStrings>
</LocalizedStrings>
<Instance name="MainWindowResource">
<Instance ref.CodeBehind="false" ref.Class="demo::LocalizedStringsTabPage">
<ref.Members>
<![CDATA[
func GetLocaleIndex(locale: Locale): int
{
for (i in range (0, listLocales.Items.Count))
{
if (listLocales.Items[i].Text == locale)
{
return i;
}
}
return 0;
}
var dateTime: DateTime = Sys::GetLocalTime();
var number: int = 2147483647;
var currency: double = 1342177.28;
]]>
</ref.Members>
<ref.LocalizedStrings Name="Strings" Uri="res://LocalizedStringsTabPage/StringResource" Default="true"/>
<TabPage ref.Name="self" Text-str="Title()">
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
<att.Rows>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
</att.Rows>
<att.Columns>
<_>composeType:MinSize</_>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
</att.Columns>
<Cell Site="row:0 column:0">
<SolidLabel Font-bind="self.Font" Color="#FFFFFF" Text-str="Label()" VerticalAlignment="Center"/>
</Cell>
<Cell Site="row:0 column:1">
<ComboBox ref.Name="comboLocales">
<att.BoundsComposition-set PreferredMinSize="x:120"/>
<att.SelectedIndex-bind>self.GetLocaleIndex(Application::GetApplication().Locale)</att.SelectedIndex-bind>
<ev.SelectedIndexChanged-eval>
<![CDATA[
{
var index = comboLocales.SelectedIndex;
if (index == -1)
{
index = 0;
}
Application::GetApplication().Locale = cast Locale listLocales.Items[index].Text;
}
]]>
</ev.SelectedIndexChanged-eval>
<att.ListControl>
<TextList ref.Name="listLocales" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
<att.Items>
<_ Text="en-US"/>
<_ Text="zh-CN"/>
</att.Items>
</TextList>
</att.ListControl>
</ComboBox>
</Cell>
<Cell Site="row:1 column:0 columnSpan:3">
<TextList HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<att.Items>
<_ Text-str="ShortDate(self.dateTime)"/>
<_ Text-str="LongDate(self.dateTime)"/>
<_ Text-str="YearMonthDate(self.dateTime)"/>
<_ Text-str="ShortTime(self.dateTime)"/>
<_ Text-str="LongTime(self.dateTime)"/>
<_ Text-str="DateFormat(self.dateTime)"/>
<_ Text-str="TimeFormat(self.dateTime)"/>
<_ Text-str="Number(self.number)"/>
<_ Text-str="Currency(self.currency)"/>
<_ Text-str="Sentence('John Smith')"/>
<_ Text-str="Strings.Sentence('John Smith')"/>
<_ Text-bind="self.Strings.Sentence('John Smith') ?? ''"/>
</att.Items>
</TextList>
</Cell>
</Table>
</TabPage>
</Instance>
</Instance>
</Folder>
@@ -25,12 +25,34 @@
</att.Pages>
</Tab>
</TabPage>
<demo:RepeatTabPage Alt="R"/>
<demo:DocumentTabPage Alt="D"/>
<demo:TextBoxTabPage Alt="D"/>
<demo:ElementTabPage Alt="E"/>
<demo:AnimationTabPage Alt="A"/>
<demo:ResponsiveTabPage Alt="R"/>
<TabPage Alt="L" Text="Layout">
<Tab>
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
<att.Pages>
<demo:RepeatTabPage Alt="R"/>
<demo:ResponsiveTabPage Alt="R"/>
</att.Pages>
</Tab>
</TabPage>
<TabPage Alt="L" Text="Control">
<Tab>
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
<att.Pages>
<demo:DocumentTabPage Alt="D"/>
<demo:TextBoxTabPage Alt="D"/>
</att.Pages>
</Tab>
</TabPage>
<TabPage Alt="M" Text="Misc">
<Tab>
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
<att.Pages>
<demo:ElementTabPage Alt="E"/>
<demo:AnimationTabPage Alt="A"/>
<demo:LocalizedStringsTabPage Alt="L"/>
</att.Pages>
</Tab>
</TabPage>
</att.Pages>
</Tab>
</Window>
@@ -40,16 +62,21 @@
<Instance name="TextListTabPageResource" content="File">TextListTabPage.xml</Instance>
<Instance name="ListViewTabPageResource" content="File">ListViewTabPage.xml</Instance>
<Instance name="TreeViewTabPageResource" content="File">TreeViewTabPage.xml</Instance>
<Instance name="RepeatTabPageResource" content="File">RepeatTabPage.xml</Instance>
<Instance name="DataGridTabPageResource" content="File">DataGridTabPage.xml</Instance>
<Folder name="DataGridComponents" content="Link">DataGridComponents.xml</Folder>
<Instance name="RepeatTabPageResource" content="File">RepeatTabPage.xml</Instance>
<Folder name="ResponsiveTabPage" content="Link">ResponsiveTabPage.xml</Folder>
<Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
<Instance name="DocumentTabPageResource" content="File">DocumentTabPage.xml</Instance>
<Folder name="TextBoxComponents" content="Link">TextBoxTabPage.xml</Folder>
<Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
<Instance name="ElementTabPageResource" content="File">ElementTabPage.xml</Instance>
<Folder name="AnimationTabPage" content="Link">AnimationTabPage.xml</Folder>
<Folder name="ResponsiveTabPage" content="Link">ResponsiveTabPage.xml</Folder>
<Folder name="TextBoxComponents" content="Link">TextBoxTabPage.xml</Folder>
<Folder name="DataGridComponents" content="Link">DataGridComponents.xml</Folder>
<Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
<Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
<Folder name="LocalizedStringsTabPage" content="Link">LocalizedStringsTabPage.xml</Folder>
<Folder name="LargeImages" content="Link">Images/LargeImages.xml</Folder>
<Folder name="SmallImages" content="Link">Images/SmallImages.xml</Folder>
<Folder name="MiscImages" content="Link">Images/MiscImages.xml</Folder>
File diff suppressed because it is too large Load Diff
@@ -63,8 +63,11 @@ namespace vl
IMPL_CPP_TYPE_INFO(demo::GenderVisualizerConstructor)
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindow)
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::IStringResourceStrings)
IMPL_CPP_TYPE_INFO(demo::ListViewTabPage)
IMPL_CPP_TYPE_INFO(demo::ListViewTabPageConstructor)
IMPL_CPP_TYPE_INFO(demo::LocalizedStringsTabPage)
IMPL_CPP_TYPE_INFO(demo::LocalizedStringsTabPageConstructor)
IMPL_CPP_TYPE_INFO(demo::MainWindow)
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::MyCategory)
@@ -83,6 +86,7 @@ namespace vl
IMPL_CPP_TYPE_INFO(demo::ResponsiveTabPageConstructor)
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControl)
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControlConstructor)
IMPL_CPP_TYPE_INFO(demo::StringResource)
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPage)
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPageConstructor)
IMPL_CPP_TYPE_INFO(demo::TextEditor)
@@ -589,6 +593,21 @@ namespace vl
CLASS_MEMBER_FIELD(textUrl)
END_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
BEGIN_INTERFACE_MEMBER(::demo::IStringResourceStrings)
CLASS_MEMBER_METHOD(Currency, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(DateFormat, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(Label, NO_PARAMETER)
CLASS_MEMBER_METHOD(LongDate, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(LongTime, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(Number, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(Sentence, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(ShortDate, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(ShortTime, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(TimeFormat, { L"__vwsn_ls_0" })
CLASS_MEMBER_METHOD(Title, NO_PARAMETER)
CLASS_MEMBER_METHOD(YearMonthDate, { L"__vwsn_ls_0" })
END_INTERFACE_MEMBER(::demo::IStringResourceStrings)
BEGIN_CLASS_MEMBER(::demo::ListViewTabPage)
CLASS_MEMBER_CONSTRUCTOR(::demo::ListViewTabPage*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
@@ -625,6 +644,50 @@ namespace vl
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::ListViewTabPageConstructor)
BEGIN_CLASS_MEMBER(::demo::LocalizedStringsTabPage)
CLASS_MEMBER_CONSTRUCTOR(::demo::LocalizedStringsTabPage*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetLocaleIndex, { L"locale" })
CLASS_MEMBER_METHOD(GetStrings, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetStrings, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(StringsChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_Strings)
CLASS_MEMBER_PROPERTY_EVENT(Strings, GetStrings, SetStrings, StringsChanged)
CLASS_MEMBER_FIELD(currency)
CLASS_MEMBER_FIELD(dateTime)
CLASS_MEMBER_FIELD(number)
END_CLASS_MEMBER(::demo::LocalizedStringsTabPage)
BEGIN_CLASS_MEMBER(::demo::LocalizedStringsTabPageConstructor)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::LocalizedStringsTabPageConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(Strings)
CLASS_MEMBER_FIELD(comboLocales)
CLASS_MEMBER_FIELD(listLocales)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::LocalizedStringsTabPageConstructor)
BEGIN_CLASS_MEMBER(::demo::MainWindow)
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
END_CLASS_MEMBER(::demo::MainWindow)
@@ -640,7 +703,17 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
CLASS_MEMBER_FIELD(__vwsn_precompile_22)
CLASS_MEMBER_FIELD(__vwsn_precompile_23)
CLASS_MEMBER_FIELD(__vwsn_precompile_24)
CLASS_MEMBER_FIELD(__vwsn_precompile_25)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
@@ -958,6 +1031,12 @@ namespace vl
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::ResponsiveViewControlConstructor)
BEGIN_CLASS_MEMBER(::demo::StringResource)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StringResource>(), NO_PARAMETER)
CLASS_MEMBER_STATIC_METHOD(__vwsn_ls_First, { L"__vwsn_ls_formats" })
CLASS_MEMBER_STATIC_METHOD(Get, { L"__vwsn_ls_locale" })
END_CLASS_MEMBER(::demo::StringResource)
BEGIN_CLASS_MEMBER(::demo::TextBoxTabPage)
CLASS_MEMBER_CONSTRUCTOR(::demo::TextBoxTabPage*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(UpdateFont, { L"newFont" })
@@ -1156,8 +1235,11 @@ namespace vl
ADD_TYPE_INFO(::demo::GenderVisualizerConstructor)
ADD_TYPE_INFO(::demo::HyperlinkWindow)
ADD_TYPE_INFO(::demo::HyperlinkWindowConstructor)
ADD_TYPE_INFO(::demo::IStringResourceStrings)
ADD_TYPE_INFO(::demo::ListViewTabPage)
ADD_TYPE_INFO(::demo::ListViewTabPageConstructor)
ADD_TYPE_INFO(::demo::LocalizedStringsTabPage)
ADD_TYPE_INFO(::demo::LocalizedStringsTabPageConstructor)
ADD_TYPE_INFO(::demo::MainWindow)
ADD_TYPE_INFO(::demo::MainWindowConstructor)
ADD_TYPE_INFO(::demo::MyCategory)
@@ -1176,6 +1258,7 @@ namespace vl
ADD_TYPE_INFO(::demo::ResponsiveTabPageConstructor)
ADD_TYPE_INFO(::demo::ResponsiveViewControl)
ADD_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
ADD_TYPE_INFO(::demo::StringResource)
ADD_TYPE_INFO(::demo::TextBoxTabPage)
ADD_TYPE_INFO(::demo::TextBoxTabPageConstructor)
ADD_TYPE_INFO(::demo::TextEditor)
@@ -66,8 +66,11 @@ namespace vl
DECL_TYPE_INFO(::demo::GenderVisualizerConstructor)
DECL_TYPE_INFO(::demo::HyperlinkWindow)
DECL_TYPE_INFO(::demo::HyperlinkWindowConstructor)
DECL_TYPE_INFO(::demo::IStringResourceStrings)
DECL_TYPE_INFO(::demo::ListViewTabPage)
DECL_TYPE_INFO(::demo::ListViewTabPageConstructor)
DECL_TYPE_INFO(::demo::LocalizedStringsTabPage)
DECL_TYPE_INFO(::demo::LocalizedStringsTabPageConstructor)
DECL_TYPE_INFO(::demo::MainWindow)
DECL_TYPE_INFO(::demo::MainWindowConstructor)
DECL_TYPE_INFO(::demo::MyCategory)
@@ -86,6 +89,7 @@ namespace vl
DECL_TYPE_INFO(::demo::ResponsiveTabPageConstructor)
DECL_TYPE_INFO(::demo::ResponsiveViewControl)
DECL_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
DECL_TYPE_INFO(::demo::StringResource)
DECL_TYPE_INFO(::demo::TextBoxTabPage)
DECL_TYPE_INFO(::demo::TextBoxTabPageConstructor)
DECL_TYPE_INFO(::demo::TextEditor)
@@ -94,6 +98,57 @@ namespace vl
DECL_TYPE_INFO(::demo::TextListTabPageConstructor)
DECL_TYPE_INFO(::demo::TreeViewTabPage)
DECL_TYPE_INFO(::demo::TreeViewTabPageConstructor)
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IStringResourceStrings)
::vl::WString Currency(const ::vl::WString& __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(Currency, __vwsn_ls_0);
}
::vl::WString DateFormat(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(DateFormat, __vwsn_ls_0);
}
::vl::WString Label() override
{
INVOKEGET_INTERFACE_PROXY_NOPARAMS(Label);
}
::vl::WString LongDate(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(LongDate, __vwsn_ls_0);
}
::vl::WString LongTime(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(LongTime, __vwsn_ls_0);
}
::vl::WString Number(const ::vl::WString& __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(Number, __vwsn_ls_0);
}
::vl::WString Sentence(const ::vl::WString& __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(Sentence, __vwsn_ls_0);
}
::vl::WString ShortDate(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(ShortDate, __vwsn_ls_0);
}
::vl::WString ShortTime(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(ShortTime, __vwsn_ls_0);
}
::vl::WString TimeFormat(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(TimeFormat, __vwsn_ls_0);
}
::vl::WString Title() override
{
INVOKEGET_INTERFACE_PROXY_NOPARAMS(Title);
}
::vl::WString YearMonthDate(::vl::DateTime __vwsn_ls_0) override
{
INVOKEGET_INTERFACE_PROXY(YearMonthDate, __vwsn_ls_0);
}
END_INTERFACE_PROXY(::demo::IStringResourceStrings)
#endif
extern bool LoadDemoTypes();
Binary file not shown.
@@ -61,127 +61,31 @@ namespace demo
USERIMPL(/* ::demo::MainWindow */)
bool MainWindow::LoadFile(const ::vl::WString& path)
{
stream::FileStream fileStream(path, stream::FileStream::ReadOnly);
if (fileStream.IsAvailable())
{
stream::BomDecoder decoder;
stream::DecoderStream decoderStream(fileStream, decoder);
stream::StreamReader reader(decoderStream);
textBox->SetText(reader.ReadToEnd());
textBox->Select(TextPos(), TextPos());
textBox->SetFocus();
textBox->ClearUndoRedo();
fileName = dialogOpen->GetFileName();
if (INVLOC.EndsWith(fileName, L".xml", Locale::IgnoreCase))
{
SetupXmlConfig();
}
else
{
SetupTextConfig();
}
GetApplication()->InvokeInMainThread(this, [=]()
{
AddRecentFile(path);
});
return true;
}
else
{
return false;
}
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
bool MainWindow::OpenFile(::vl::vint filterIndex)
{
if (CanCloseFile())
{
dialogOpen->SetFilterIndex(filterIndex);
if (dialogOpen->ShowDialog())
{
if (LoadFile(dialogOpen->GetFileName()))
{
return true;
}
else
{
dialogCannotOpen->ShowDialog();
}
}
}
return false;
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
bool MainWindow::SaveFile(bool saveAs)
{
WString targetFileName = fileName;
if (saveAs || targetFileName == L"")
{
dialogSave->SetFilterIndex(isXml ? 1 : 0);
if (dialogSave->ShowDialog())
{
targetFileName = dialogSave->GetFileName();
}
else
{
return false;
}
}
stream::FileStream fileStream(targetFileName, stream::FileStream::WriteOnly);
if (fileStream.IsAvailable())
{
stream::BomEncoder encoder(stream::BomEncoder::Utf16);
stream::EncoderStream encoderStream(fileStream, encoder);
stream::StreamWriter writer(encoderStream);
writer.WriteString(textBox->GetText());
textBox->NotifyModificationSaved();
fileName = targetFileName;
if (INVLOC.EndsWith(fileName, L".xml", Locale::IgnoreCase))
{
SetupXmlConfig();
}
else
{
SetupTextConfig();
}
GetApplication()->InvokeInMainThread(this, [=]()
{
AddRecentFile(targetFileName);
});
return true;
}
else
{
dialogCannotSave->ShowDialog();
}
return false;
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::SetupTextConfig()
{
if (isXml == true)
{
isXml = false;
SetColorizer(textBox, false);
}
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::SetupXmlConfig()
{
if (isXml == false)
{
isXml = true;
SetColorizer(textBox, true);
}
throw ::vl::Exception(L"You should implement this function.");
}
void MainWindow::AddRecentFile(const ::vl::WString& path)
@@ -217,129 +121,109 @@ namespace demo
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileNewText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
if (CanCloseFile())
{
textBox->SetText(L"");
textBox->ClearUndoRedo();
SetupTextConfig();
}
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileNewXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
if (CanCloseFile())
{
textBox->SetText(L"");
textBox->ClearUndoRedo();
SetupXmlConfig();
}
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileOpen_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
OpenFile(dialogOpen->GetFilterIndex());
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileOpenText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
OpenFile(0);
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileOpenXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
OpenFile(1);
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileSave_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
SaveFile(false);
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileSaveAs_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
SaveFile(true);
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandFileExit_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
Close();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditUndo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->Undo();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditRedo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->Redo();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditCut_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->Cut();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditCopy_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->Copy();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditPaste_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->Paste();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditDelete_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->SetSelectionText(L"");
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditSelect_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
textBox->SelectAll();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandEditFind_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
if (!findWindow)
{
auto window = MakePtr<FindWindow>();
window->textBox = textBox;
window->MoveToScreenCenter();
window->GetNativeWindow()->SetParent(GetNativeWindow());
findWindow = window;
}
findWindow->Show();
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::commandAbout_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
{
auto window = new AboutWindow;
window->MoveToScreenCenter();
window->ShowModalAndDelete(this, []() {});
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::MainWindow */)
void MainWindow::window_Closing(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiRequestEventArgs* arguments)
{
arguments->cancel = !CanCloseFile();
throw ::vl::Exception(L"You should implement this function.");
}
MainWindow::MainWindow()
Binary file not shown.
@@ -764,18 +764,32 @@ Closures
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
{
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_opened_ = false;
this->__vwsn_bind_closed_ = false;
}
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
{
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
}
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
{
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
this->__vwsn_bind_activator_();
}
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
{
this->__vwsn_bind_activator_();
}
@@ -786,7 +800,9 @@ Closures
{
(__vwsn_bind_opened_ = true);
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
return true;
}
return false;
@@ -812,8 +828,15 @@ Closures
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
return true;
}
return false;
@@ -825,18 +848,32 @@ Closures
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
{
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_opened_ = false;
this->__vwsn_bind_closed_ = false;
}
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
{
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetName(); } catch(...){ return ::vl::WString(L"", false); } }();
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetName(); } catch(...){ return ::vl::WString(L"", false); } }();
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
}
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
{
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
this->__vwsn_bind_activator_();
}
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
{
this->__vwsn_bind_activator_();
}
@@ -847,7 +884,9 @@ Closures
{
(__vwsn_bind_opened_ = true);
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
return true;
}
return false;
@@ -873,8 +912,15 @@ Closures
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
return true;
}
return false;
@@ -1008,18 +1054,32 @@ Closures
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
{
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_opened_ = false;
this->__vwsn_bind_closed_ = false;
}
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
{
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
}
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
{
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
this->__vwsn_bind_activator_();
}
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
{
this->__vwsn_bind_activator_();
}
@@ -1030,7 +1090,9 @@ Closures
{
(__vwsn_bind_opened_ = true);
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
return true;
}
return false;
@@ -1056,8 +1118,15 @@ Closures
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
if (static_cast<bool>(__vwsn_bind_handler_1_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
return true;
}
return false;
@@ -1129,21 +1198,30 @@ Closures
__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountMenuItemTemplateConstructor* __vwsnctorthis_0)
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
{
this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::AccountButtonViewModel>();
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
this->__vwsn_bind_opened_ = false;
this->__vwsn_bind_closed_ = false;
}
void __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
{
auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->GetName();
auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetName();
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
}
void __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
{
this->__vwsn_bind_activator_();
}
bool __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open()
{
if ((! __vwsn_bind_opened_))
{
(__vwsn_bind_opened_ = true);
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->ViewModel; } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
return true;
}
return false;
@@ -1164,6 +1242,13 @@ Closures
if ((! __vwsn_bind_closed_))
{
(__vwsn_bind_closed_ = true);
if (static_cast<bool>(__vwsn_bind_handler_0_0))
{
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->NameChanged, __vwsn_bind_handler_0_0);
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
}
(__vwsn_bind_cache_0 = ::vl::Ptr<::demo::AccountButtonViewModel>());
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
return true;
}
return false;
@@ -2027,7 +2112,11 @@ Class (::demo::AccountButtonViewModel)
void AccountButtonViewModel::SetController(::vl::presentation::controls::GuiSelectableButton::GroupController* __vwsn_value_)
{
(this->__vwsn_prop_Controller = __vwsn_value_);
if ((this->__vwsn_prop_Controller != __vwsn_value_))
{
(this->__vwsn_prop_Controller = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->ControllerChanged)();
}
}
::vl::WString AccountButtonViewModel::GetName()
@@ -2037,7 +2126,11 @@ Class (::demo::AccountButtonViewModel)
void AccountButtonViewModel::SetName(const ::vl::WString& __vwsn_value_)
{
(this->__vwsn_prop_Name = __vwsn_value_);
if ((this->__vwsn_prop_Name != __vwsn_value_))
{
(this->__vwsn_prop_Name = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->NameChanged)();
}
}
::vl::Ptr<::vl::presentation::INativeImage> AccountButtonViewModel::GetImage()
@@ -2047,7 +2140,11 @@ Class (::demo::AccountButtonViewModel)
void AccountButtonViewModel::SetImage(::vl::Ptr<::vl::presentation::INativeImage> __vwsn_value_)
{
(this->__vwsn_prop_Image = __vwsn_value_);
if ((this->__vwsn_prop_Image.Obj() != __vwsn_value_.Obj()))
{
(this->__vwsn_prop_Image = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->ImageChanged)();
}
}
AccountButtonViewModel::AccountButtonViewModel()
@@ -324,16 +324,19 @@ namespace demo
public:
::vl::presentation::controls::GuiSelectableButton::GroupController* GetController();
void SetController(::vl::presentation::controls::GuiSelectableButton::GroupController* __vwsn_value_);
::vl::Event<void()> ControllerChanged;
private:
::vl::WString __vwsn_prop_Name;
public:
::vl::WString GetName();
void SetName(const ::vl::WString& __vwsn_value_);
::vl::Event<void()> NameChanged;
private:
::vl::Ptr<::vl::presentation::INativeImage> __vwsn_prop_Image;
public:
::vl::Ptr<::vl::presentation::INativeImage> GetImage();
void SetImage(::vl::Ptr<::vl::presentation::INativeImage> __vwsn_value_);
::vl::Event<void()> ImageChanged;
AccountButtonViewModel();
};
@@ -662,11 +665,14 @@ Closures
__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
bool __vwsn_bind_opened_ = false;
bool __vwsn_bind_closed_ = false;
void __vwsn_bind_activator_();
void __vwsn_bind_callback_0_0();
void __vwsn_bind_callback_1_0();
bool Open() override;
bool Update() override;
bool Close() override;
@@ -680,11 +686,14 @@ Closures
__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
bool __vwsn_bind_opened_ = false;
bool __vwsn_bind_closed_ = false;
void __vwsn_bind_activator_();
void __vwsn_bind_callback_0_0();
void __vwsn_bind_callback_1_0();
bool Open() override;
bool Update() override;
bool Close() override;
@@ -734,11 +743,14 @@ Closures
__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
bool __vwsn_bind_opened_ = false;
bool __vwsn_bind_closed_ = false;
void __vwsn_bind_activator_();
void __vwsn_bind_callback_0_0();
void __vwsn_bind_callback_1_0();
bool Open() override;
bool Update() override;
bool Close() override;
@@ -769,9 +781,12 @@ Closures
__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountMenuItemTemplateConstructor* __vwsnctorthis_0);
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_0;
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
bool __vwsn_bind_opened_ = false;
bool __vwsn_bind_closed_ = false;
void __vwsn_bind_activator_();
void __vwsn_bind_callback_0_0();
bool Open() override;
bool Update() override;
bool Close() override;
@@ -79,12 +79,15 @@ namespace vl
CLASS_MEMBER_METHOD(SetController, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetImage, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(ControllerChanged)
CLASS_MEMBER_EVENT(ImageChanged)
CLASS_MEMBER_EVENT(NameChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_Controller)
CLASS_MEMBER_FIELD(__vwsn_prop_Image)
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
CLASS_MEMBER_PROPERTY(Controller, GetController, SetController)
CLASS_MEMBER_PROPERTY(Image, GetImage, SetImage)
CLASS_MEMBER_PROPERTY(Name, GetName, SetName)
CLASS_MEMBER_PROPERTY_EVENT(Controller, GetController, SetController, ControllerChanged)
CLASS_MEMBER_PROPERTY_EVENT(Image, GetImage, SetImage, ImageChanged)
CLASS_MEMBER_PROPERTY_EVENT(Name, GetName, SetName, NameChanged)
END_CLASS_MEMBER(::demo::AccountButtonViewModel)
BEGIN_CLASS_MEMBER(::demo::AccountItemTemplate)