mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-17 23:38:47 +08:00
Upgrade Tutorial\GacUI_HelloWorlds
This commit is contained in:
+643
-487
File diff suppressed because it is too large
Load Diff
+86
-61
@@ -3274,7 +3274,6 @@ Resource Image
|
||||
protected:
|
||||
Ptr<INativeImage> image;
|
||||
vint frameIndex;
|
||||
WString filePath;
|
||||
|
||||
public:
|
||||
/// <summary>Create an empty image data.</summary>
|
||||
@@ -3283,7 +3282,7 @@ Resource Image
|
||||
/// <param name="_image">The specified image.</param>
|
||||
/// <param name="_frameIndex">The specified frame index.</param>
|
||||
/// <param name="_filePath">The file path of the image. This parameter is only for metadata, it will not affect the content of the image.</param>
|
||||
GuiImageData(Ptr<INativeImage> _image, vint _frameIndex, const WString& _filePath = L"");
|
||||
GuiImageData(Ptr<INativeImage> _image, vint _frameIndex);
|
||||
~GuiImageData();
|
||||
|
||||
/// <summary>Get the specified image.</summary>
|
||||
@@ -3292,9 +3291,6 @@ Resource Image
|
||||
/// <summary>Get the specified frame index.</summary>
|
||||
/// <returns>The specified frame index.</returns>
|
||||
vint GetFrameIndex();
|
||||
/// <summary>Get the file path.</summary>
|
||||
/// <returns>The file path.</returns>
|
||||
const WString& GetFilePath();
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
@@ -3331,6 +3327,7 @@ Resource Structure
|
||||
GuiResourceFolder* parent;
|
||||
WString name;
|
||||
WString fileContentPath;
|
||||
WString fileAbsolutePath;
|
||||
|
||||
public:
|
||||
GuiResourceNodeBase();
|
||||
@@ -3342,15 +3339,67 @@ Resource Structure
|
||||
/// <summary>Get the name of this resource node.</summary>
|
||||
/// <returns>The name of this resource node .</returns>
|
||||
const WString& GetName();
|
||||
/// <summary>Get the resource path of this resource node. When saving the resource, if the path is not empty, the path will be serialized instead of the content.</summary>
|
||||
/// <summary>Get the resource path of this resource node</summary>
|
||||
/// <returns>The resource path of this resource node .</returns>
|
||||
WString GetResourcePath();
|
||||
/// <summary>Get the file content path of this resource node. When saving the resource, if the path is not empty, the path will be serialized instead of the content.</summary>
|
||||
/// <returns>The file content path of this resource node .</returns>
|
||||
const WString& GetFileContentPath();
|
||||
/// <summary>Get the absolute file content path of this resource node. This path points to an existing file containing the content.</summary>
|
||||
/// <returns>The file absolute path of this resource node .</returns>
|
||||
const WString& GetFileAbsolutePath();
|
||||
/// <summary>Set the file content path of this resource node.</summary>
|
||||
/// <param name="value">The file content path of this resource node .</param>
|
||||
void SetFileContentPath(const WString& value);
|
||||
void SetFileContentPath(const WString& content, const WString& absolute);
|
||||
};
|
||||
|
||||
struct GuiResourceLocation
|
||||
{
|
||||
WString resourcePath;
|
||||
WString filePath;
|
||||
|
||||
GuiResourceLocation() = default;
|
||||
GuiResourceLocation(const WString& _resourcePath, const WString& _filePath);
|
||||
GuiResourceLocation(Ptr<GuiResourceNodeBase> node);
|
||||
|
||||
bool operator==(const GuiResourceLocation& b)const { return resourcePath == b.resourcePath && filePath == b.filePath; }
|
||||
bool operator!=(const GuiResourceLocation& b)const { return !(*this == b); }
|
||||
};
|
||||
|
||||
struct GuiResourceTextPos
|
||||
{
|
||||
GuiResourceLocation originalLocation;
|
||||
vint row = parsing::ParsingTextPos::UnknownValue;
|
||||
vint column = parsing::ParsingTextPos::UnknownValue;
|
||||
|
||||
GuiResourceTextPos() = default;
|
||||
GuiResourceTextPos(GuiResourceLocation location, parsing::ParsingTextPos position);
|
||||
|
||||
bool operator==(const GuiResourceTextPos& b)const { return originalLocation == b.originalLocation && row == b.row && column == b.column; }
|
||||
bool operator!=(const GuiResourceTextPos& b)const { return !(*this == b); }
|
||||
};
|
||||
|
||||
struct GuiResourceError
|
||||
{
|
||||
public:
|
||||
using List = collections::List<GuiResourceError>;
|
||||
|
||||
GuiResourceLocation location;
|
||||
GuiResourceTextPos position;
|
||||
WString message;
|
||||
|
||||
GuiResourceError() = default;
|
||||
GuiResourceError(GuiResourceTextPos _position, const WString& _message);
|
||||
GuiResourceError(GuiResourceLocation _location, const WString& _message);
|
||||
GuiResourceError(GuiResourceLocation _location, GuiResourceTextPos _position, const WString& _message);
|
||||
|
||||
bool operator==(const GuiResourceError& b)const { return location == b.location && position == b.position && message == b.message; }
|
||||
bool operator!=(const GuiResourceError& b)const { return !(*this == b); }
|
||||
|
||||
static void Transform(GuiResourceLocation _location, GuiResourceError::List& errors, collections::List<Ptr<parsing::ParsingError>>& parsingErrors);
|
||||
static void Transform(GuiResourceLocation _location, GuiResourceError::List& errors, collections::List<Ptr<parsing::ParsingError>>& parsingErrors, parsing::ParsingTextPos offset, parsing::ParsingTextPos offsetFix = { 0,0 });
|
||||
static void Transform(GuiResourceLocation _location, GuiResourceError::List& errors, collections::List<Ptr<parsing::ParsingError>>& parsingErrors, GuiResourceTextPos offset, parsing::ParsingTextPos offsetFix = { 0,0 });
|
||||
static void SortAndLog(List& errors, collections::List<WString>& output, const WString& workingDirectory = WString::Empty);
|
||||
};
|
||||
|
||||
class DocumentModel;
|
||||
@@ -3419,12 +3468,12 @@ Resource Structure
|
||||
ItemMap items;
|
||||
FolderMap folders;
|
||||
|
||||
void LoadResourceFolderFromXml(DelayLoadingList& delayLoadings, const WString& containingFolder, Ptr<parsing::xml::XmlElement> folderXml, collections::List<WString>& errors);
|
||||
void LoadResourceFolderFromXml(DelayLoadingList& delayLoadings, const WString& containingFolder, Ptr<parsing::xml::XmlElement> folderXml, GuiResourceError::List& errors);
|
||||
void SaveResourceFolderToXml(Ptr<parsing::xml::XmlElement> xmlParent);
|
||||
void CollectTypeNames(collections::List<WString>& typeNames);
|
||||
void LoadResourceFolderFromBinary(DelayLoadingList& delayLoadings, stream::internal::ContextFreeReader& reader, collections::List<WString>& typeNames, collections::List<WString>& errors);
|
||||
void LoadResourceFolderFromBinary(DelayLoadingList& delayLoadings, stream::internal::ContextFreeReader& reader, collections::List<WString>& typeNames, GuiResourceError::List& errors);
|
||||
void SaveResourceFolderToBinary(stream::internal::ContextFreeWriter& writer, collections::List<WString>& typeNames);
|
||||
void PrecompileResourceFolder(GuiResourcePrecompileContext& context, IGuiResourcePrecompileCallback* callback, collections::List<WString>& errors);
|
||||
void PrecompileResourceFolder(GuiResourcePrecompileContext& context, IGuiResourcePrecompileCallback* callback, GuiResourceError::List& errors);
|
||||
void InitializeResourceFolder(GuiResourceInitializeContext& context);
|
||||
public:
|
||||
/// <summary>Create a resource folder.</summary>
|
||||
@@ -3501,7 +3550,7 @@ Resource
|
||||
protected:
|
||||
WString workingDirectory;
|
||||
|
||||
static void ProcessDelayLoading(Ptr<GuiResource> resource, DelayLoadingList& delayLoadings, collections::List<WString>& errors);
|
||||
static void ProcessDelayLoading(Ptr<GuiResource> resource, DelayLoadingList& delayLoadings, GuiResourceError::List& errors);
|
||||
public:
|
||||
/// <summary>Create a resource.</summary>
|
||||
GuiResource();
|
||||
@@ -3516,13 +3565,13 @@ Resource
|
||||
/// <param name="xml">The xml document.</param>
|
||||
/// <param name="workingDirectory">The working directory for loading image files.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<GuiResource> LoadFromXml(Ptr<parsing::xml::XmlDocument> xml, const WString& workingDirectory, collections::List<WString>& errors);
|
||||
static Ptr<GuiResource> LoadFromXml(Ptr<parsing::xml::XmlDocument> xml, const WString& filePath, const WString& workingDirectory, GuiResourceError::List& errors);
|
||||
|
||||
/// <summary>Load a resource from an xml file. If the xml file refers other files, they will be loaded as well.</summary>
|
||||
/// <returns>The loaded resource.</returns>
|
||||
/// <param name="filePath">The file path of the xml file.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<GuiResource> LoadFromXml(const WString& filePath, collections::List<WString>& errors);
|
||||
static Ptr<GuiResource> LoadFromXml(const WString& filePath, GuiResourceError::List& errors);
|
||||
|
||||
/// <summary>Save the resource to xml.</summary>
|
||||
/// <returns>The xml.</returns>
|
||||
@@ -3532,7 +3581,12 @@ Resource
|
||||
/// <returns>The loaded resource.</returns>
|
||||
/// <param name="stream">The stream.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<GuiResource> LoadPrecompiledBinary(stream::IStream& stream, collections::List<WString>& errors);
|
||||
static Ptr<GuiResource> LoadPrecompiledBinary(stream::IStream& stream, GuiResourceError::List& errors);
|
||||
|
||||
/// <summary>Load a precompiled resource from a stream. This function will hit an assert if there are errors.</summary>
|
||||
/// <returns>The loaded resource.</returns>
|
||||
/// <param name="stream">The stream.</param>
|
||||
static Ptr<GuiResource> LoadPrecompiledBinary(stream::IStream& stream);
|
||||
|
||||
/// <summary>Save the precompiled resource to a stream.</summary>
|
||||
/// <param name="stream">The stream.</param>
|
||||
@@ -3541,7 +3595,7 @@ Resource
|
||||
/// <summary>Precompile this resource to improve performance.</summary>
|
||||
/// <param name="callback">A callback to receive progress.</param>
|
||||
/// <param name="errors">All collected errors during precompiling a resource.</param>
|
||||
void Precompile(IGuiResourcePrecompileCallback* callback, collections::List<WString>& errors);
|
||||
void Precompile(IGuiResourcePrecompileCallback* callback, GuiResourceError::List& errors);
|
||||
|
||||
/// <summary>Initialize a precompiled resource.</summary>
|
||||
/// <param name="usage">In which role an application is initializing this resource.</param>
|
||||
@@ -3728,11 +3782,11 @@ Resource Type Resolver
|
||||
/// <param name="resource">The resource to precompile.</param>
|
||||
/// <param name="context">The context for precompiling.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual void PerResourcePrecompile(Ptr<GuiResourceItem> resource, GuiResourcePrecompileContext& context, collections::List<WString>& errors) = 0;
|
||||
virtual void PerResourcePrecompile(Ptr<GuiResourceItem> resource, GuiResourcePrecompileContext& context, GuiResourceError::List& errors) = 0;
|
||||
/// <summary>Precompile for a pass.</summary>
|
||||
/// <param name="context">The context for precompiling.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual void PerPassPrecompile(GuiResourcePrecompileContext& context, collections::List<WString>& errors) = 0;
|
||||
virtual void PerPassPrecompile(GuiResourcePrecompileContext& context, GuiResourceError::List& errors) = 0;
|
||||
};
|
||||
|
||||
class IGuiResourcePrecompileCallback : public virtual IDescriptable, public Description<IGuiResourcePrecompileCallback>
|
||||
@@ -3774,19 +3828,19 @@ Resource Type Resolver
|
||||
/// <summary>Serialize a resource to an xml element. This function is called if this type resolver does not have a preload type.</summary>
|
||||
/// <returns>The serialized xml element.</returns>
|
||||
/// <param name="resource">The resource.</param>
|
||||
virtual Ptr<parsing::xml::XmlElement> Serialize(Ptr<DescriptableObject> resource) = 0;
|
||||
virtual Ptr<parsing::xml::XmlElement> Serialize(Ptr<GuiResourceItem> resource, Ptr<DescriptableObject> content) = 0;
|
||||
|
||||
/// <summary>Load a resource for a type inside an xml element.</summary>
|
||||
/// <returns>The resource.</returns>
|
||||
/// <param name="element">The xml element.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual Ptr<DescriptableObject> ResolveResource(Ptr<parsing::xml::XmlElement> element, collections::List<WString>& errors) = 0;
|
||||
virtual Ptr<DescriptableObject> ResolveResource(Ptr<GuiResourceItem> resource, Ptr<parsing::xml::XmlElement> element, GuiResourceError::List& errors) = 0;
|
||||
|
||||
/// <summary>Load a resource for a type from a file.</summary>
|
||||
/// <returns>The resource.</returns>
|
||||
/// <param name="path">The file path.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual Ptr<DescriptableObject> ResolveResource(const WString& path, collections::List<WString>& errors) = 0;
|
||||
virtual Ptr<DescriptableObject> ResolveResource(Ptr<GuiResourceItem> resource, const WString& path, GuiResourceError::List& errors) = 0;
|
||||
};
|
||||
|
||||
/// <summary>Represents a symbol type for loading a resource without a preload type.</summary>
|
||||
@@ -3796,13 +3850,13 @@ Resource Type Resolver
|
||||
/// <summary>Serialize a precompiled resource to a stream.</summary>
|
||||
/// <param name="resource">The resource.</param>
|
||||
/// <param name="stream">The stream.</param>
|
||||
virtual void SerializePrecompiled(Ptr<DescriptableObject> resource, stream::IStream& stream) = 0;
|
||||
virtual void SerializePrecompiled(Ptr<GuiResourceItem> resource, Ptr<DescriptableObject> content, stream::IStream& stream) = 0;
|
||||
|
||||
/// <summary>Load a precompiled resource from a stream.</summary>
|
||||
/// <returns>The resource.</returns>
|
||||
/// <param name="stream">The stream.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual Ptr<DescriptableObject> ResolveResourcePrecompiled(stream::IStream& stream, collections::List<WString>& errors) = 0;
|
||||
virtual Ptr<DescriptableObject> ResolveResourcePrecompiled(Ptr<GuiResourceItem> resource, stream::IStream& stream, GuiResourceError::List& errors) = 0;
|
||||
};
|
||||
|
||||
/// <summary>Represents a symbol type for loading a resource with a preload type.</summary>
|
||||
@@ -3819,14 +3873,14 @@ Resource Type Resolver
|
||||
/// <summary>Serialize a resource to a resource in preload type.</summary>
|
||||
/// <returns>The serialized resource.</returns>
|
||||
/// <param name="resource">The resource.</param>
|
||||
virtual Ptr<DescriptableObject> Serialize(Ptr<DescriptableObject> resource) = 0;
|
||||
virtual Ptr<DescriptableObject> Serialize(Ptr<GuiResourceItem> resource, Ptr<DescriptableObject> content) = 0;
|
||||
|
||||
/// <summary>Load a resource for a type from a resource loaded by the preload type resolver.</summary>
|
||||
/// <returns>The resource.</returns>
|
||||
/// <param name="resource">The resource.</param>
|
||||
/// <param name="resolver">The path resolver. This is only for delay load resource.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual Ptr<DescriptableObject> ResolveResource(Ptr<DescriptableObject> resource, Ptr<GuiResourcePathResolver> resolver, collections::List<WString>& errors) = 0;
|
||||
virtual Ptr<DescriptableObject> ResolveResource(Ptr<GuiResourceItem> resource, Ptr<GuiResourcePathResolver> resolver, GuiResourceError::List& errors) = 0;
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
@@ -4243,29 +4297,11 @@ Rich Content Document (model)
|
||||
/// <param name="xml">The xml document.</param>
|
||||
/// <param name="resolver">A document resolver to resolve symbols in non-embedded objects like image.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<DocumentModel> LoadFromXml(Ptr<parsing::xml::XmlDocument> xml, Ptr<GuiResourcePathResolver> resolver, collections::List<WString>& errors);
|
||||
|
||||
/// <summary>Load a document model from an xml.</summary>
|
||||
/// <returns>The loaded document model.</returns>
|
||||
/// <param name="xml">The xml document.</param>
|
||||
/// <param name="workingDirectory">The working directory for loading image files.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<DocumentModel> LoadFromXml(Ptr<parsing::xml::XmlDocument> xml, const WString& workingDirectory, collections::List<WString>& errors);
|
||||
|
||||
/// <summary>Load a document model from an xml.</summary>
|
||||
/// <returns>The loaded document model.</returns>
|
||||
/// <param name="filePath">The file path of the xml document.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
static Ptr<DocumentModel> LoadFromXml(const WString& filePath, collections::List<WString>& errors);
|
||||
static Ptr<DocumentModel> LoadFromXml(Ptr<GuiResourceItem> resource, Ptr<parsing::xml::XmlDocument> xml, Ptr<GuiResourcePathResolver> resolver, GuiResourceError::List& errors);
|
||||
|
||||
/// <summary>Save a document model to an xml.</summary>
|
||||
/// <returns>The saved xml document.</returns>
|
||||
Ptr<parsing::xml::XmlDocument> SaveToXml();
|
||||
|
||||
/// <summary>Save a document model to an xml.</summary>
|
||||
/// <returns>Returns true if this operation succeeded.</returns>
|
||||
/// <param name="filePath">The file path of the xml document.</param>
|
||||
bool SaveToXml(const WString& filePath);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -19343,7 +19379,6 @@ External Functions
|
||||
extern Ptr<presentation::INativeImage> INativeImage_Constructor(const WString& path);
|
||||
extern presentation::INativeCursor* INativeCursor_Constructor1();
|
||||
extern presentation::INativeCursor* INativeCursor_Constructor2(presentation::INativeCursor::SystemCursorType type);
|
||||
extern Ptr<presentation::DocumentModel> DocumentModel_Constructor(const WString& path);
|
||||
|
||||
template<typename T>
|
||||
Ptr<T> Element_Constructor()
|
||||
@@ -21953,16 +21988,16 @@ Parser
|
||||
/// <returns>The parsed object. Returns null if failed to parse.</returns>
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="errors">All collected errors during loading a resource.</param>
|
||||
virtual Ptr<Object> Parse(const WString& text, collections::List<WString>& errors)=0;
|
||||
virtual Ptr<Object> Parse(const WString& text, collections::List<Ptr<parsing::ParsingError>>& errors)=0;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class IGuiParser : public IGuiGeneralParser
|
||||
{
|
||||
public:
|
||||
virtual Ptr<T> TypedParse(const WString& text, collections::List<WString>& errors)=0;
|
||||
virtual Ptr<T> TypedParse(const WString& text, collections::List<Ptr<parsing::ParsingError>>& errors)=0;
|
||||
|
||||
Ptr<Object> Parse(const WString& text, collections::List<WString>& errors)override
|
||||
Ptr<Object> Parse(const WString& text, collections::List<Ptr<parsing::ParsingError>>& errors)override
|
||||
{
|
||||
return TypedParse(text, errors);
|
||||
}
|
||||
@@ -22030,7 +22065,7 @@ Strong Typed Table Parser
|
||||
{
|
||||
}
|
||||
|
||||
Ptr<T> TypedParse(const WString& text, collections::List<WString>& errors)override
|
||||
Ptr<T> TypedParse(const WString& text, collections::List<Ptr<parsing::ParsingError>>& errors)override
|
||||
{
|
||||
if(!table)
|
||||
{
|
||||
@@ -22040,23 +22075,13 @@ Strong Typed Table Parser
|
||||
{
|
||||
collections::List<Ptr<parsing::ParsingError>> parsingErrors;
|
||||
auto result = function(text, table, parsingErrors, -1);
|
||||
if (!result)
|
||||
if (parsingErrors.Count() > 0)
|
||||
{
|
||||
errors.Add(L"Failed to parse the following input as format \"" + name + L"\":");
|
||||
errors.Add(text);
|
||||
}
|
||||
for (vint i = 0; i < parsingErrors.Count(); i++)
|
||||
{
|
||||
auto error = parsingErrors[i];
|
||||
errors.Add(
|
||||
L"Format: " + name +
|
||||
L", Row: " + itow(error->codeRange.start.row + 1) +
|
||||
L", Column: " + itow(error->codeRange.start.column + 1) +
|
||||
L", Message: " + error->errorMessage);
|
||||
errors.Add(parsingErrors[0]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+885
-476
File diff suppressed because it is too large
Load Diff
+281
-199
File diff suppressed because it is too large
Load Diff
+25
-10
@@ -96,9 +96,9 @@ Compiled Workflow Type Resolver (Workflow)
|
||||
return this;
|
||||
}
|
||||
|
||||
void SerializePrecompiled(Ptr<DescriptableObject> resource, stream::IStream& stream)override
|
||||
void SerializePrecompiled(Ptr<GuiResourceItem> resource, Ptr<DescriptableObject> content, stream::IStream& stream)override
|
||||
{
|
||||
if (auto obj = resource.Cast<GuiInstanceCompiledWorkflow>())
|
||||
if (auto obj = content.Cast<GuiInstanceCompiledWorkflow>())
|
||||
{
|
||||
internal::ContextFreeWriter writer(stream);
|
||||
|
||||
@@ -114,7 +114,7 @@ Compiled Workflow Type Resolver (Workflow)
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<DescriptableObject> ResolveResourcePrecompiled(stream::IStream& stream, collections::List<WString>& errors)override
|
||||
Ptr<DescriptableObject> ResolveResourcePrecompiled(Ptr<GuiResourceItem> resource, stream::IStream& stream, GuiResourceError::List& errors)override
|
||||
{
|
||||
internal::ContextFreeReader reader(stream);
|
||||
|
||||
@@ -649,25 +649,42 @@ Type Declaration
|
||||
END_CLASS_MEMBER(DocumentStyle)
|
||||
|
||||
BEGIN_CLASS_MEMBER(DocumentModel)
|
||||
CLASS_MEMBER_EXTERNALCTOR(Ptr<DocumentModel>(const WString&), {L"filePath"}, vl::reflection::description::DocumentModel_Constructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(Ptr<DocumentModel>(), NO_PARAMETER)
|
||||
|
||||
CLASS_MEMBER_FIELD(paragraphs)
|
||||
CLASS_MEMBER_FIELD(styles)
|
||||
|
||||
CLASS_MEMBER_METHOD_OVERLOAD(GetText, {L"skipNonTextContent"}, WString(DocumentModel::*)(bool))
|
||||
CLASS_MEMBER_STATIC_METHOD_OVERLOAD(LoadFromXml, {L"xml" _ L"workingDirectory" _ L"errors"}, Ptr<DocumentModel>(*)(Ptr<XmlDocument>, const WString&, List<WString>&))
|
||||
CLASS_MEMBER_STATIC_METHOD_OVERLOAD(LoadFromXml, {L"filePath" _ L"errors"}, Ptr<DocumentModel>(*)(const WString&, List<WString>&))
|
||||
CLASS_MEMBER_STATIC_METHOD(LoadFromXml, {L"resource" _ L"xml" _ L"workingDirectory" _ L"errors"})
|
||||
CLASS_MEMBER_METHOD_OVERLOAD(SaveToXml, NO_PARAMETER, Ptr<XmlDocument>(DocumentModel::*)())
|
||||
CLASS_MEMBER_METHOD_OVERLOAD(SaveToXml, {L"filePath"}, bool(DocumentModel::*)(const WString&))
|
||||
END_CLASS_MEMBER(DocumentModel)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiResourceNodeBase)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Parent)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Name)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(ResourcePath)
|
||||
CLASS_MEMBER_PROPERTY_FAST(FileContentPath)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(FileContentPath)
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(FileAbsolutePath)
|
||||
CLASS_MEMBER_METHOD(SetFileContentPath, { L"content" _ L"absolute" })
|
||||
END_CLASS_MEMBER(GuiResourceNodeBase)
|
||||
|
||||
BEGIN_STRUCT_MEMBER(GuiResourceLocation)
|
||||
STRUCT_MEMBER(resourcePath)
|
||||
STRUCT_MEMBER(filePath)
|
||||
END_STRUCT_MEMBER(GuiResourceLocation)
|
||||
|
||||
BEGIN_STRUCT_MEMBER(GuiResourceTextPos)
|
||||
STRUCT_MEMBER(originalLocation)
|
||||
STRUCT_MEMBER(row)
|
||||
STRUCT_MEMBER(column)
|
||||
END_STRUCT_MEMBER(GuiResourceTextPos)
|
||||
|
||||
BEGIN_STRUCT_MEMBER(GuiResourceError)
|
||||
STRUCT_MEMBER(location)
|
||||
STRUCT_MEMBER(position)
|
||||
STRUCT_MEMBER(message)
|
||||
END_STRUCT_MEMBER(GuiResourceError)
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiResourceItem)
|
||||
CLASS_MEMBER_BASE(GuiResourceNodeBase)
|
||||
|
||||
@@ -701,8 +718,6 @@ Type Declaration
|
||||
|
||||
BEGIN_CLASS_MEMBER(GuiResource)
|
||||
CLASS_MEMBER_CONSTRUCTOR(Ptr<GuiResource>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_EXTERNALCTOR(Ptr<GuiResource>(const WString&, List<WString>&), {L"filePath" _ L"errors"}, vl::presentation::GuiResource::LoadFromXml);
|
||||
|
||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(WorkingDirectory)
|
||||
|
||||
CLASS_MEMBER_METHOD(GetDocumentByPath, {L"path"})
|
||||
|
||||
@@ -94,6 +94,9 @@ Type List
|
||||
F(presentation::DocumentStyle)\
|
||||
F(presentation::DocumentModel)\
|
||||
F(presentation::GuiResourceNodeBase)\
|
||||
F(presentation::GuiResourceLocation)\
|
||||
F(presentation::GuiResourceTextPos)\
|
||||
F(presentation::GuiResourceError)\
|
||||
F(presentation::GuiResourceItem)\
|
||||
F(presentation::GuiResourceFolder)\
|
||||
F(presentation::GuiResource)\
|
||||
|
||||
+516
-400
File diff suppressed because one or more lines are too long
+83
-42
@@ -16112,18 +16112,18 @@ namespace vl
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
PARSING\JSON\PARSINGJSON_PARSER.H
|
||||
PARSING\JSON\PARSINGJSON_AST.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
Parser::ParsingJson_Parser
|
||||
Parser::ParsingJson.parser.txt
|
||||
|
||||
This file is generated by: Vczh Parser Generator
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PARSING_JSON_PARSINGJSON_PARSER
|
||||
#define VCZH_PARSING_JSON_PARSINGJSON_PARSER
|
||||
#ifndef VCZH_PARSING_JSON_PARSINGJSON_PARSER_AST
|
||||
#define VCZH_PARSING_JSON_PARSINGJSON_PARSER_AST
|
||||
|
||||
|
||||
namespace vl
|
||||
@@ -16241,14 +16241,6 @@ namespace vl
|
||||
static vl::Ptr<JsonObject> Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
};
|
||||
|
||||
extern vl::WString JsonGetParserTextBuffer();
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> JsonConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
extern vl::Ptr<vl::parsing::tabling::ParsingTable> JsonLoadTable();
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16310,18 +16302,52 @@ namespace vl
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
PARSING\XML\PARSINGXML_PARSER.H
|
||||
PARSING\JSON\PARSINGJSON_PARSER.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
Parser::ParsingXml_Parser
|
||||
Parser::ParsingJson.parser.txt
|
||||
|
||||
This file is generated by: Vczh Parser Generator
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PARSING_XML_PARSINGXML_PARSER
|
||||
#define VCZH_PARSING_XML_PARSINGXML_PARSER
|
||||
#ifndef VCZH_PARSING_JSON_PARSINGJSON_PARSER_PARSER
|
||||
#define VCZH_PARSING_JSON_PARSINGJSON_PARSER_PARSER
|
||||
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace parsing
|
||||
{
|
||||
namespace json
|
||||
{
|
||||
extern vl::WString JsonGetParserTextBuffer();
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> JsonConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
extern vl::Ptr<vl::parsing::tabling::ParsingTable> JsonLoadTable();
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> JsonParseAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<JsonNode> JsonParse(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
PARSING\XML\PARSINGXML_AST.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
Parser::ParsingXml.parser.txt
|
||||
|
||||
This file is generated by: Vczh Parser Generator
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PARSING_XML_PARSINGXML_PARSER_AST
|
||||
#define VCZH_PARSING_XML_PARSINGXML_PARSER_AST
|
||||
|
||||
|
||||
namespace vl
|
||||
@@ -16450,19 +16476,6 @@ namespace vl
|
||||
static vl::Ptr<XmlDocument> Convert(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
};
|
||||
|
||||
extern vl::WString XmlGetParserTextBuffer();
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> XmlConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
extern vl::Ptr<vl::parsing::tabling::ParsingTable> XmlLoadTable();
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseDocumentAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseDocumentAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlDocument> XmlParseDocument(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlDocument> XmlParseDocument(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseElementAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseElementAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlElement> XmlParseElement(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlElement> XmlParseElement(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16528,6 +16541,45 @@ namespace vl
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
PARSING\XML\PARSINGXML_PARSER.H
|
||||
***********************************************************************/
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
Parser::ParsingXml.parser.txt
|
||||
|
||||
This file is generated by: Vczh Parser Generator
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PARSING_XML_PARSINGXML_PARSER_PARSER
|
||||
#define VCZH_PARSING_XML_PARSINGXML_PARSER_PARSER
|
||||
|
||||
|
||||
namespace vl
|
||||
{
|
||||
namespace parsing
|
||||
{
|
||||
namespace xml
|
||||
{
|
||||
extern vl::WString XmlGetParserTextBuffer();
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeCustomBase> XmlConvertParsingTreeNode(vl::Ptr<vl::parsing::ParsingTreeNode> node, const vl::collections::List<vl::regex::RegexToken>& tokens);
|
||||
extern vl::Ptr<vl::parsing::tabling::ParsingTable> XmlLoadTable();
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseDocumentAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseDocumentAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlDocument> XmlParseDocument(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlDocument> XmlParseDocument(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseElementAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<vl::parsing::ParsingTreeNode> XmlParseElementAsParsingTreeNode(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlElement> XmlParseElement(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::collections::List<vl::Ptr<vl::parsing::ParsingError>>& errors, vl::vint codeIndex = -1);
|
||||
extern vl::Ptr<XmlElement> XmlParseElement(const vl::WString& input, vl::Ptr<vl::parsing::tabling::ParsingTable> table, vl::vint codeIndex = -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
REGEX\REGEXDATA.H
|
||||
***********************************************************************/
|
||||
@@ -17272,7 +17324,7 @@ namespace vl
|
||||
FilePath filePath;
|
||||
|
||||
public:
|
||||
/// <summary>Create an empty reference.</summary>
|
||||
/// <summary>Create a root reference.</summary>
|
||||
Folder();
|
||||
/// <summary>Create a reference to a specified folder.</summary>
|
||||
/// <param name="_filePath">The specified folder.</param>
|
||||
@@ -18976,19 +19028,8 @@ namespace vl
|
||||
/// <summary>Run all test cases.</summary>
|
||||
static void RunAndDisposeTests();
|
||||
};
|
||||
#if defined VCZH_MSVC
|
||||
|
||||
#define TEST_CHECK_ERROR(CONDITION,DESCRIPTION) do{if(!(CONDITION))throw Error(DESCRIPTION);}while(0)
|
||||
#elif defined VCZH_GCC
|
||||
#define TEST_CHECK_ERROR(CONDITION,DESCRIPTION)\
|
||||
do\
|
||||
{\
|
||||
vl::unittest::UnitTest::PrintInfo(L"\t" L_(#CONDITION));\
|
||||
if(!(CONDITION))\
|
||||
{\
|
||||
throw Error(DESCRIPTION);\
|
||||
}\
|
||||
}while(0)
|
||||
#endif
|
||||
#define TEST_ASSERT(CONDITION) do{TEST_CHECK_ERROR(CONDITION,L"");}while(0)
|
||||
#define TEST_ERROR(CONDITION) do{try{CONDITION;throw UnitTestError();}catch(const Error&){}catch(const UnitTestError&){TEST_CHECK_ERROR(false,L"");}}while(0)
|
||||
#define TEST_CASE(NAME)\
|
||||
|
||||
+12147
-9322
File diff suppressed because one or more lines are too long
+1759
-733
File diff suppressed because it is too large
Load Diff
@@ -78,9 +78,8 @@ public:
|
||||
void GuiMain()
|
||||
{
|
||||
{
|
||||
List<WString> errors;
|
||||
FileStream fileStream(L"../UIRes/MVVM.bin", FileStream::ReadOnly);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream);
|
||||
GetResourceManager()->SetResource(L"Resource", resource);
|
||||
}
|
||||
auto viewModel = MakePtr<ViewModel>();
|
||||
|
||||
@@ -2,25 +2,9 @@
|
||||
<Instance ref.CodeBehind="true" ref.Class="helloworld::MainWindow">
|
||||
<ref.Parameter Name="ViewModel" Class="vm::IViewModel"/>
|
||||
<ref.Members>
|
||||
@cpp:Protected
|
||||
var hasLoggedIn : bool = false;
|
||||
event HasLoggedInChanged();
|
||||
|
||||
func GetHasLoggedIn() : bool
|
||||
{
|
||||
return hasLoggedIn;
|
||||
}
|
||||
|
||||
func SetHasLoggedIn(value : bool) : void
|
||||
{
|
||||
if (hasLoggedIn != value)
|
||||
{
|
||||
hasLoggedIn = value;
|
||||
HasLoggedInChanged();
|
||||
}
|
||||
}
|
||||
|
||||
prop HasLoggedIn : bool {GetHasLoggedIn, SetHasLoggedIn : HasLoggedInChanged}
|
||||
<![CDATA[
|
||||
prop HasLoggedIn : bool = false {}
|
||||
]]>
|
||||
</ref.Members>
|
||||
<Window ref.Name="self" Text="Let's Sign Up!" ClientSize="x:320 y:280">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:320 y:280"/>
|
||||
@@ -85,7 +69,9 @@
|
||||
<Button ref.Name="buttonCancel" Text="Close">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:-1 top:0 right:0 bottom:0" PreferredMinSize="x:100 y:24"/>
|
||||
<ev.Clicked-eval>
|
||||
self.Close();
|
||||
<![CDATA[
|
||||
self.Close();
|
||||
]]>
|
||||
</ev.Clicked-eval>
|
||||
</Button>
|
||||
</Cell>
|
||||
|
||||
@@ -1001,13 +1001,13 @@ namespace vl
|
||||
CLASS_MEMBER_CONSTRUCTOR(::helloworld::MainWindow*(::vl::Ptr<::vm::IViewModel>), { L"__vwsn_ctor_parameter_ViewModel" })
|
||||
CLASS_MEMBER_METHOD(GetHasLoggedIn, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetViewModel, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetHasLoggedIn, { L"value" })
|
||||
CLASS_MEMBER_METHOD(SetHasLoggedIn, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(buttonSignUp_Clicked, { L"sender" _ L"arguments" })
|
||||
CLASS_MEMBER_EVENT(HasLoggedInChanged)
|
||||
CLASS_MEMBER_FIELD(__vwsn_parameter_ViewModel)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_HasLoggedIn)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(HasLoggedIn, GetHasLoggedIn, SetHasLoggedIn, HasLoggedInChanged)
|
||||
CLASS_MEMBER_PROPERTY_READONLY(ViewModel, GetViewModel)
|
||||
CLASS_MEMBER_FIELD(hasLoggedIn)
|
||||
END_CLASS_MEMBER(::helloworld::MainWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::helloworld::MainWindowConstructor)
|
||||
|
||||
@@ -33,14 +33,13 @@ namespace helloworld
|
||||
{
|
||||
bool MainWindow::GetHasLoggedIn()
|
||||
{
|
||||
return ::vl::__vwsn::This(this)->hasLoggedIn;
|
||||
return ::vl::__vwsn::This(this)->__vwsn_prop_HasLoggedIn;
|
||||
}
|
||||
|
||||
void MainWindow::SetHasLoggedIn(bool value)
|
||||
void MainWindow::SetHasLoggedIn(bool __vwsn_value_)
|
||||
{
|
||||
if ((::vl::__vwsn::This(this)->hasLoggedIn != value))
|
||||
if ((::vl::__vwsn::This(this)->__vwsn_prop_HasLoggedIn != __vwsn_value_))
|
||||
{
|
||||
(::vl::__vwsn::This(this)->hasLoggedIn = value);
|
||||
(::vl::__vwsn::This(this)->__vwsn_prop_HasLoggedIn = __vwsn_value_);
|
||||
::vl::__vwsn::EventInvoke(::vl::__vwsn::This(this)->HasLoggedInChanged)();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,12 +48,11 @@ namespace helloworld
|
||||
#ifndef VCZH_DEBUG_NO_REFLECTION
|
||||
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<MainWindow>;
|
||||
#endif
|
||||
protected:
|
||||
bool hasLoggedIn = false;
|
||||
public:
|
||||
::vl::Event<void()> HasLoggedInChanged;
|
||||
bool __vwsn_prop_HasLoggedIn = false;
|
||||
bool GetHasLoggedIn();
|
||||
void SetHasLoggedIn(bool value);
|
||||
void SetHasLoggedIn(bool __vwsn_value_);
|
||||
::vl::Event<void()> HasLoggedInChanged;
|
||||
::vl::Ptr<::vm::IViewModel> __vwsn_parameter_ViewModel = ::vl::Ptr<::vm::IViewModel>();
|
||||
::vl::Ptr<::vm::IViewModel> GetViewModel();
|
||||
protected:
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
using namespace vl::parsing;
|
||||
using namespace vl::collections;
|
||||
using namespace vl::workflow;
|
||||
using namespace vl::workflow::analyzer;
|
||||
using namespace vl::workflow::emitter;
|
||||
using namespace vl::workflow::runtime;
|
||||
|
||||
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
|
||||
|
||||
@@ -14,9 +14,8 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||
void GuiMain()
|
||||
{
|
||||
{
|
||||
List<WString> errors;
|
||||
FileStream fileStream(L"../UIRes/Xml.bin", FileStream::ReadOnly);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream, errors);
|
||||
auto resource = GuiResource::LoadPrecompiledBinary(fileStream);
|
||||
GetResourceManager()->SetResource(L"Resource", resource, GuiResourceUsage::InstanceClass);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user