This commit is contained in:
Zihan Chen
2016-12-13 04:25:27 -08:00
parent 71eba09e75
commit c09f06dc77
141 changed files with 4842 additions and 3645 deletions

View File

@@ -1,3 +1,4 @@
#define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h"
#include <Windows.h>

View File

@@ -24,7 +24,7 @@ namespace demo
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
MainWindow::MainWindow(Ptr<demo::IViewModel> ViewModel)
MainWindow::MainWindow(vl::Ptr<demo::IViewModel> ViewModel)
{
InitializeComponents(ViewModel);
OnCreate();
@@ -49,13 +49,13 @@ namespace vl
IMPL_CPP_TYPE_INFO(demo::MainWindow)
BEGIN_CLASS_MEMBER(demo::IViewModel)
CLASS_MEMBER_BASE(vl::reflection::IDescriptable)
CLASS_MEMBER_BASE(::vl::reflection::IDescriptable)
CLASS_MEMBER_METHOD(GetMessageFromName, { L"name" });
END_CLASS_MEMBER(demo::IViewModel)
BEGIN_CLASS_MEMBER(demo::MainWindow)
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(Ptr<demo::IViewModel>), { L"ViewModel" })
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(vl::Ptr<demo::IViewModel>), { L"ViewModel" })
CLASS_MEMBER_PROPERTY_READONLY_FAST(ViewModel)
END_CLASS_MEMBER(demo::MainWindow)

View File

@@ -18,22 +18,22 @@ namespace demo
class IViewModel;
class MainWindow;
class IViewModel : public virtual vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
class IViewModel : public virtual ::vl::reflection::IDescriptable, public vl::reflection::Description<IViewModel>
{
public:
virtual vl::WString GetMessageFromName(vl::WString name) = 0;
virtual ::vl::WString GetMessageFromName(::vl::WString name) = 0;
};
template<typename TImpl>
class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
class MainWindow_ : public ::vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
{
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
private:
Ptr<demo::IViewModel> ViewModel_;
vl::Ptr<demo::IViewModel> ViewModel_;
protected:
vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
::vl::presentation::controls::GuiSinglelineTextBox* textBoxName;
void InitializeComponents(Ptr<demo::IViewModel> ViewModel)
void InitializeComponents(vl::Ptr<demo::IViewModel> ViewModel)
{
ViewModel_ = ViewModel;
if (InitializeFromResource())
@@ -47,13 +47,13 @@ namespace demo
}
public:
MainWindow_()
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
:vl::presentation::GuiInstancePartialClass<::vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
,::vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
,textBoxName(0)
{
}
Ptr<demo::IViewModel> GetViewModel()
vl::Ptr<demo::IViewModel> GetViewModel()
{
return ViewModel_;
}
@@ -85,7 +85,7 @@ namespace demo
void OnDestroy();
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
public:
MainWindow(Ptr<demo::IViewModel> ViewModel);
MainWindow(vl::Ptr<demo::IViewModel> ViewModel);
~MainWindow();
};
}