Update release (half done)

This commit is contained in:
Zihan Chen
2018-06-27 04:27:26 -07:00
parent 33c4ff8416
commit 1f9b7eb182
33 changed files with 7207 additions and 4768 deletions
+967 -176
View File
File diff suppressed because it is too large Load Diff
+114 -23
View File
@@ -1138,6 +1138,7 @@ namespace vl
{
using namespace reflection;
class DocumentModel;
class INativeWindow;
class INativeWindowListener;
class INativeController;
@@ -1381,6 +1382,11 @@ Image Object
/// <returns>The frame in this image by a specified frame index.</returns>
/// <param name="index">The specified frame index.</param>
virtual INativeImageFrame* GetFrame(vint index)=0;
/// <summary>
/// Save the image to a stream.
/// </summary>
/// <param name="stream"/>The stream</param>
virtual void SaveToStream(stream::IStream& stream, FormatType formatType = FormatType::Unknown) = 0;
};
/// <summary>
@@ -2107,6 +2113,59 @@ Native Window Services
/// <param name="milliseconds">Time to delay.</param>
virtual Ptr<INativeDelay> DelayExecuteInMainThread(const Func<void()>& proc, vint milliseconds)=0;
};
/// <summary>
/// Clipboard reader.
/// </summary>
class INativeClipboardReader : public virtual IDescriptable, public Description<INativeClipboardReader>
{
public:
/// <summary>Test is there a text in the clipboard.</summary>
/// <returns>Returns true if there is a text in the clipboard.</returns>
virtual bool ContainsText() = 0;
/// <summary>Get the text from the clipboard.</summary>
/// <returns>The text.</returns>
virtual WString GetText() = 0;
/// <summary>Test is there a document in the clipboard.</summary>
/// <returns>Returns true if there is a document in the clipboard.</returns>
virtual bool ContainsDocument() = 0;
/// <summary>Get the document from the clipboard.</summary>
/// <returns>The document.</returns>
virtual Ptr<DocumentModel> GetDocument() = 0;
/// <summary>Test is there an image in the clipboard.</summary>
/// <returns>Returns true if there is an image in the clipboard.</returns>
virtual bool ContainsImage() = 0;
/// <summary>Get the image from the clipboard.</summary>
/// <returns>The image.</returns>
virtual Ptr<INativeImage> GetImage() = 0;
};
/// <summary>
/// Clipboard writer.
/// </summary>
class INativeClipboardWriter : public virtual IDescriptable, public Description<INativeClipboardWriter>
{
public:
/// <summary>Prepare a text for the clipboard.</summary>
/// <param name="value">The text.</param>
virtual void SetText(const WString& value) = 0;
/// <summary>Prepare a document for the clipboard.</summary>
/// <param name="value">The document.</param>
virtual void SetDocument(Ptr<DocumentModel> value) = 0;
/// <summary>Prepare an image for the clipboard.</summary>
/// <param name="value">The image.</param>
virtual void SetImage(Ptr<INativeImage> value) = 0;
/// <summary>Send all data to the clipboard.</summary>
virtual void Submit() = 0;
};
/// <summary>
/// Clipboard service. To access this service, use [M:vl.presentation.INativeController.ClipboardService].
@@ -2114,22 +2173,12 @@ Native Window Services
class INativeClipboardService : public virtual IDescriptable, public Description<INativeClipboardService>
{
public:
/// <summary>
/// Test is there a text in the clipboard.
/// </summary>
/// <returns>Returns true if there is a text in the clipboard.</returns>
virtual bool ContainsText()=0;
/// <summary>
/// Get the text in the clipboard.
/// </summary>
/// <returns>The text in the clipboard.</returns>
virtual WString GetText()=0;
/// <summary>
/// Copy the text to the clipboard.
/// </summary>
/// <returns>Returns true if this operation succeeded.</returns>
/// <param name="value">The text to copy to the clipboard.</param>
virtual bool SetText(const WString& value)=0;
/// <summary>Read clipboard.</summary>
/// <returns>The clipboard reader.</returns>
virtual Ptr<INativeClipboardReader> ReadClipboard() = 0;
/// <summary>Write clipboard.</summary>
/// <returns>The clipboard writer.</returns>
virtual Ptr<INativeClipboardWriter> WriteClipboard() = 0;
};
/// <summary>
@@ -6569,6 +6618,8 @@ Basic Construction
Margin internalMargin;
Size preferredMinSize;
bool isRendering = false;
virtual void OnControlParentChanged(controls::GuiControl* control);
virtual void OnChildInserted(GuiGraphicsComposition* child);
virtual void OnChildRemoved(GuiGraphicsComposition* child);
@@ -6585,6 +6636,8 @@ Basic Construction
GuiGraphicsComposition();
~GuiGraphicsComposition();
bool IsRendering();
/// <summary>Get the parent composition.</summary>
/// <returns>The parent composition.</returns>
GuiGraphicsComposition* GetParent();
@@ -7460,6 +7513,7 @@ GuiResponsiveContainerComposition
GuiResponsiveCompositionBase* responsiveTarget = nullptr;
Size upperLevelSize;
void AdjustLevel();
void OnBoundsChanged(GuiGraphicsComposition* sender, GuiEventArgs& arguments);
public:
@@ -9687,6 +9741,8 @@ Basic Construction
GuiControl* tooltipControl = nullptr;
vint tooltipWidth = 0;
Ptr<bool> flagDisposed;
virtual void BeforeControlTemplateUninstalled();
virtual void AfterControlTemplateInstalled(bool initialize);
virtual void CheckAndStoreControlTemplate(templates::GuiControlTemplate* value);
@@ -9741,6 +9797,8 @@ Basic Construction
/// <summary>Context changed event. This event will be raised when the font of the control is changed.</summary>
compositions::GuiNotifyEvent ContextChanged;
void InvokeOrDelayIfRendering(Func<void()> proc);
/// <summary>A function to create the argument for notify events that raised by itself.</summary>
/// <returns>The created argument.</returns>
compositions::GuiEventArgs GetNotifyEventArguments();
@@ -12526,7 +12584,7 @@ NodeItemProvider
class NodeItemProvider
: public list::ItemProviderBase
, protected virtual INodeProviderCallback
, protected virtual INodeItemView
, public virtual INodeItemView
, public Description<NodeItemProvider>
{
typedef collections::Dictionary<INodeProvider*, vint> NodeIntMap;
@@ -12784,7 +12842,7 @@ TreeViewItemRootProvider
/// <summary>The default implementation of <see cref="INodeRootProvider"/> for [T:vl.presentation.controls.GuiVirtualTreeView].</summary>
class TreeViewItemRootProvider
: public MemoryNodeRootProvider
, protected virtual ITreeViewItemView
, public virtual ITreeViewItemView
, public Description<TreeViewItemRootProvider>
{
protected:
@@ -15505,8 +15563,8 @@ ListViewItemProvider
class ListViewItemProvider
: public ListProvider<Ptr<ListViewItem>>
, protected virtual IListViewItemProvider
, protected virtual IListViewItemView
, protected virtual ListViewColumnItemArranger::IColumnItemView
, public virtual IListViewItemView
, public virtual ListViewColumnItemArranger::IColumnItemView
, public Description<ListViewItemProvider>
{
friend class ListViewItem;
@@ -17161,8 +17219,8 @@ GuiBindableListView
class ItemSource
: public list::ItemProviderBase
, protected virtual list::IListViewItemProvider
, protected virtual list::IListViewItemView
, protected virtual list::ListViewColumnItemArranger::IColumnItemView
, public virtual list::IListViewItemView
, public virtual list::ListViewColumnItemArranger::IColumnItemView
{
typedef collections::List<list::ListViewColumnItemArranger::IColumnItemViewCallback*> ColumnItemViewCallbackList;
protected:
@@ -17320,7 +17378,7 @@ GuiBindableTreeView
class ItemSource
: public tree::NodeRootProviderBase
, protected virtual tree::ITreeViewItemView
, public virtual tree::ITreeViewItemView
{
friend class ItemSourceNode;
public:
@@ -18575,6 +18633,39 @@ Ribbon Gallery List
#endif
/***********************************************************************
.\RESOURCES\GUIDOCUMENTCLIPBOARD.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::Resource
Interfaces:
***********************************************************************/
#ifndef VCZH_PRESENTATION_RESOURCES_GUIDOCUMENTCLIPBOARD
#define VCZH_PRESENTATION_RESOURCES_GUIDOCUMENTCLIPBOARD
namespace vl
{
namespace presentation
{
extern void ModifyDocumentForClipboard(Ptr<DocumentModel> model);
extern Ptr<DocumentModel> LoadDocumentFromClipboardStream(stream::IStream& stream);
extern void SaveDocumentToClipboardStream(Ptr<DocumentModel> model, stream::IStream& stream);
extern void SaveDocumentToRtf(Ptr<DocumentModel> model, AString& rtf);
extern void SaveDocumentToRtfStream(Ptr<DocumentModel> model, stream::IStream& stream);
extern void SaveDocumentToHtmlUtf8(Ptr<DocumentModel> model, AString& header, AString& content, AString& footer);
extern void SaveDocumentToHtmlClipboardStream(Ptr<DocumentModel> model, stream::IStream& stream);
}
}
#endif
/***********************************************************************
.\RESOURCES\GUIDOCUMENTEDITOR.H
***********************************************************************/
+7
View File
@@ -6269,7 +6269,14 @@ ExecuteQuery
void ExecuteQuery(Ptr<GuiIqQuery> query, Ptr<GuiInstanceContext> context, collections::List<Ptr<GuiConstructorRepr>>& output)
{
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnull-dereference"
#endif
ExecuteQuery(query, context, *(List<Ptr<GuiConstructorRepr>>*)0, output);
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic pop
#endif
}
/***********************************************************************
+30 -3
View File
@@ -407,10 +407,22 @@ Type Declaration
CLASS_MEMBER_METHOD(DelayExecuteInMainThread, {L"proc" _ L"milliseconds"})
END_INTERFACE_MEMBER(INativeAsyncService)
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeClipboardService)
CLASS_MEMBER_PROPERTY_FAST(Text)
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeClipboardReader)
CLASS_MEMBER_METHOD(ContainsText, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetText, NO_PARAMETER)
CLASS_MEMBER_METHOD(ContainsDocument, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetDocument, NO_PARAMETER)
END_INTERFACE_MEMBER(INativeClipboardReader)
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeClipboardWriter)
CLASS_MEMBER_METHOD(SetText, { L"value" })
CLASS_MEMBER_METHOD(SetDocument, { L"value" })
CLASS_MEMBER_METHOD(Submit, NO_PARAMETER)
END_INTERFACE_MEMBER(INativeClipboardWriter)
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeClipboardService)
CLASS_MEMBER_METHOD(ReadClipboard, NO_PARAMETER)
CLASS_MEMBER_METHOD(WriteClipboard, NO_PARAMETER)
END_INTERFACE_MEMBER(INativeClipboardService)
BEGIN_INTERFACE_MEMBER_NOPROXY(INativeScreenService)
@@ -1578,6 +1590,10 @@ Type Declaration (Extra)
CLASS_MEMBER_PROPERTY_FAST(Checked)
END_CLASS_MEMBER(TextItem)
BEGIN_CLASS_MEMBER(TextItemProvider)
CLASS_MEMBER_BASE(ITextItemView)
END_CLASS_MEMBER(TextItemProvider)
BEGIN_ENUM_ITEM(TextListView)
ENUM_CLASS_ITEM(Text)
ENUM_CLASS_ITEM(Check)
@@ -1642,6 +1658,11 @@ Type Declaration (Extra)
CLASS_MEMBER_PROPERTY_FAST(SortingState)
END_CLASS_MEMBER(ListViewColumn)
BEGIN_CLASS_MEMBER(ListViewItemProvider)
CLASS_MEMBER_BASE(IListViewItemView)
CLASS_MEMBER_BASE(ListViewColumnItemArranger::IColumnItemView)
END_CLASS_MEMBER(ListViewItemProvider)
BEGIN_ENUM_ITEM(ListViewView)
ENUM_CLASS_ITEM(BigIcon)
ENUM_CLASS_ITEM(SmallIcon)
@@ -1719,6 +1740,11 @@ Type Declaration (Extra)
CLASS_MEMBER_METHOD(CalculateNodeVisibilityIndex, {L"node"})
END_INTERFACE_MEMBER(INodeItemView)
BEGIN_CLASS_MEMBER(NodeItemProvider)
CLASS_MEMBER_BASE(ItemProviderBase)
CLASS_MEMBER_BASE(INodeItemView)
END_CLASS_MEMBER(NodeItemProvider)
BEGIN_CLASS_MEMBER(MemoryNodeProvider)
CLASS_MEMBER_BASE(INodeProvider)
CLASS_MEMBER_CONSTRUCTOR(Ptr<MemoryNodeProvider>(), NO_PARAMETER)
@@ -1761,6 +1787,7 @@ Type Declaration (Extra)
BEGIN_CLASS_MEMBER(TreeViewItemRootProvider)
CLASS_MEMBER_BASE(MemoryNodeRootProvider)
CLASS_MEMBER_BASE(ITreeViewItemView)
CLASS_MEMBER_CONSTRUCTOR(Ptr<TreeViewItemRootProvider>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetTreeViewData, {L"node"})
+6 -1
View File
@@ -121,6 +121,8 @@ Type List (Basic)
F(presentation::INativeImageService)\
F(presentation::INativeResourceService)\
F(presentation::INativeAsyncService)\
F(presentation::INativeClipboardReader)\
F(presentation::INativeClipboardWriter)\
F(presentation::INativeClipboardService)\
F(presentation::INativeScreenService)\
F(presentation::INativeInputService)\
@@ -336,6 +338,7 @@ Type List (Controls)
F(presentation::controls::list::FixedHeightMultiColumnItemArranger)\
F(presentation::controls::list::ITextItemView)\
F(presentation::controls::list::TextItem)\
F(presentation::controls::list::TextItemProvider)\
F(presentation::controls::TextListView)\
F(presentation::controls::list::IListViewItemView)\
F(presentation::controls::list::ListViewColumnItemArranger)\
@@ -343,6 +346,8 @@ Type List (Controls)
F(presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)\
F(presentation::controls::list::ListViewItem)\
F(presentation::controls::list::ListViewColumn)\
F(presentation::controls::ListViewView)\
F(presentation::controls::list::ListViewItemProvider)\
F(presentation::controls::IGuiMenuService)\
F(presentation::controls::IGuiMenuService::Direction)\
F(presentation::controls::IGuiMenuDropdownProvider)\
@@ -350,6 +355,7 @@ Type List (Controls)
F(presentation::controls::tree::INodeProvider)\
F(presentation::controls::tree::INodeRootProvider)\
F(presentation::controls::tree::INodeItemView)\
F(presentation::controls::tree::NodeItemProvider)\
F(presentation::controls::tree::MemoryNodeProvider)\
F(presentation::controls::tree::NodeRootProviderBase)\
F(presentation::controls::tree::MemoryNodeRootProvider)\
@@ -410,7 +416,6 @@ Type List (Controls)
F(presentation::controls::GuiTextList)\
F(presentation::controls::GuiListViewColumnHeader)\
F(presentation::controls::GuiListViewBase)\
F(presentation::controls::ListViewView)\
F(presentation::controls::GuiVirtualListView)\
F(presentation::controls::GuiListView)\
F(presentation::controls::GuiMenu)\
+917 -474
View File
File diff suppressed because it is too large Load Diff
+62 -6
View File
@@ -208,6 +208,7 @@ Images
WinBitmap(WString FileName, bool Use32Bits, bool DIBSections);
~WinBitmap();
void SaveToStream(stream::IStream& Output, bool DIBV5ClipboardFormat);
void SaveToFile(WString FileName);
WinDC* GetWinDC();
@@ -425,7 +426,7 @@ Device Context
void Draw(vint dstX, vint dstY, vint dstW, vint dstH, WinMetaFile* MetaFile);
void Draw(RECT Rect, WinMetaFile* MetaFile);
void Draw(vint dstX, vint WinBitmap, WinBitmap::Ptr Bitmap);
void Draw(vint dstX, vint dstY, WinBitmap::Ptr Bitmap);
void Draw(POINT Pos, WinBitmap::Ptr Bitmap);
void Draw(vint dstX, vint dstY, vint dstW, vint dstH, WinBitmap::Ptr Bitmap);
void Draw(RECT Rect, WinBitmap::Ptr Bitmap);
@@ -676,17 +677,69 @@ namespace vl
{
namespace windows
{
class WindowsClipboardService;
class WindowsClipboardReader : public Object, public INativeClipboardReader
{
friend class WindowsClipboardService;
protected:
WindowsClipboardService* service;
bool ContainsFormat(UINT format);
public:
WindowsClipboardReader(WindowsClipboardService* _service);
~WindowsClipboardReader();
bool ContainsText()override;
WString GetText()override;
bool ContainsDocument()override;
Ptr<DocumentModel> GetDocument()override;
bool ContainsImage()override;
Ptr<INativeImage> GetImage()override;
void CloseClipboard();
};
class WindowsClipboardWriter : public Object, public INativeClipboardWriter
{
friend class WindowsClipboardService;
protected:
WindowsClipboardService* service;
Nullable<WString> textData;
Ptr<DocumentModel> documentData;
Ptr<INativeImage> imageData;
void SetClipboardData(UINT format, stream::MemoryStream& memoryStream);
public:
WindowsClipboardWriter(WindowsClipboardService* _service);
~WindowsClipboardWriter();
void SetText(const WString& value)override;
void SetDocument(Ptr<DocumentModel> value)override;
void SetImage(Ptr<INativeImage> value)override;
void Submit()override;
};
class WindowsClipboardService : public Object, public INativeClipboardService
{
friend class WindowsClipboardReader;
friend class WindowsClipboardWriter;
protected:
HWND ownerHandle;
HWND ownerHandle;
UINT WCF_Document;
UINT WCF_RTF;
UINT WCF_HTML;
WindowsClipboardReader* reader = nullptr;
public:
WindowsClipboardService();
void SetOwnerHandle(HWND handle);
bool ContainsText()override;
WString GetText()override;
bool SetText(const WString& value)override;
Ptr<INativeClipboardReader> ReadClipboard()override;
Ptr<INativeClipboardWriter> WriteClipboard()override;
void SetOwnerHandle(HWND handle);
};
}
}
@@ -776,6 +829,7 @@ namespace vl
Ptr<INativeImageFrameCache> GetCache(void* key)override;
Ptr<INativeImageFrameCache> RemoveCache(void* key)override;
IWICBitmap* GetFrameBitmap();
void SaveBitmapToStream(stream::IStream& stream);
};
class WindowsImage : public Object, public INativeImage
@@ -792,6 +846,7 @@ namespace vl
FormatType GetFormat()override;
vint GetFrameCount()override;
INativeImageFrame* GetFrame(vint index)override;
void SaveToStream(stream::IStream& stream, FormatType formatType)override;
};
class WindowsBitmapImage : public Object, public INativeImage
@@ -808,6 +863,7 @@ namespace vl
FormatType GetFormat()override;
vint GetFrameCount()override;
INativeImageFrame* GetFrame(vint index)override;
void SaveToStream(stream::IStream& stream, FormatType formatType)override;
};
class WindowsImageService : public Object, public INativeImageService
+9
View File
@@ -8409,6 +8409,11 @@ ParsingTable
.\PARSING\PARSINGTREE.CPP
***********************************************************************/
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnull-dereference"
#endif
namespace vl
{
using namespace collections;
@@ -9175,6 +9180,10 @@ ParsingWriter
}
}
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic pop
#endif
/***********************************************************************
.\REFLECTION\GUITYPEDESCRIPTOR.CPP
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
<Folder>
<Instance name="DocumentEditorBaseResource">
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorBase">
<Instance ref.Class="demo::DocumentEditorBase">
<ref.Members>
<![CDATA[
@cpp:Protected
@@ -71,6 +71,48 @@
{
return toolstripContainer;
}
@cpp:UserImpl
func LoadAsPrivateFormat(fileName: string): void
{
dialogNotImpl.Text = $"You want to load from \"$(fileName)\" as private format, but this function is not implemented in Workflow script.";
dialogNotImpl.ShowDialog();
}
@cpp:UserImpl
func SaveAsPrivateFormat(fileName: string): void
{
dialogNotImpl.Text = $"You want to save to \"$(fileName)\" as private format, but this function is not implemented in Workflow script.";
dialogNotImpl.ShowDialog();
}
@cpp:UserImpl
func SaveAsRTF(fileName: string): void
{
dialogNotImpl.Text = $"You want to save to \"$(fileName)\" as RTF, but this function is not implemented in Workflow script.";
dialogNotImpl.ShowDialog();
}
@cpp:UserImpl
func SaveAsHTML(fileName: string): void
{
dialogNotImpl.Text = $"You want to save to \"$(fileName)\" as HTML, but this function is not implemented in Workflow script.";
dialogNotImpl.ShowDialog();
}
@cpp:Private
func SaveDocument(): void
{
if (dialogSaveDoc.ShowDialog())
{
switch (dialogSaveDoc.FilterIndex)
{
case 0: { self.SaveAsPrivateFormat(dialogSaveDoc.FileName); }
case 1: { self.SaveAsRTF(dialogSaveDoc.FileName); }
case 2: { self.SaveAsHTML(dialogSaveDoc.FileName); }
}
}
}
prop MenuContainer : GraphicsComposition* {GetMenuContainer}
prop ToolstripContainer : GraphicsComposition* {GetToolstripContainer}
@@ -86,7 +128,10 @@
<CustomControl ref.Name="self" Text="Document Editor">
<att.HasEditableSelection-bind>document.observe as _(_.CanCut() on _.SelectionChanged)</att.HasEditableSelection-bind>
<MessageDialog ref.Name="dialogMessage" Title="You Clicked a Hyperlink!"/>
<MessageDialog ref.Name="dialogNotImpl" Title-bind="self.Text"/>
<OpenFileDialog ref.Name="dialogOpen" Title="Select an Image" Filter="Image Files (*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp" EnabledPreview="true" Options="FileDialogFileMustExist|FileDialogDereferenceLinks"/>
<OpenFileDialog ref.Name="dialogOpenDoc" Title="Load a GacUI Document" Filter="Private Format (*.bin)|*.bin" Options="FileDialogFileMustExist|FileDialogDereferenceLinks"/>
<SaveFileDialog ref.Name="dialogSaveDoc" Title="Save a GacUI Document" Filter="Private Format (*.bin)|*.bin|RTF Document (*.rtf)|*.rtf|HTML Document (*.html)|*.html" Options="FileDialogPromptOverwriteFile"/>
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.Rows>
@@ -116,6 +161,52 @@
</Cell>
</Table>
<ToolstripCommand ref.Name="commandLoadPrivate" Text="Load as Private Format" Image-uri="res://ToolbarImages/FormatPrivate" LargeImage-uri="res://ToolbarImages/FormatPrivateLarge">
<ev.Executed-eval>
<![CDATA[
{
if (dialogOpenDoc.ShowDialog())
{
self.LoadAsPrivateFormat(dialogOpenDoc.FileName);
}
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSavePrivate" Text="Save as Private Format" Image-uri="res://ToolbarImages/FormatPrivate" LargeImage-uri="res://ToolbarImages/FormatPrivateLarge">
<ev.Executed-eval>
<![CDATA[
{
dialogSaveDoc.FilterIndex = 0;
self.SaveDocument();
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSaveRtf" Text="Save as RTF" Image-uri="res://ToolbarImages/FormatRtf" LargeImage-uri="res://ToolbarImages/FormatRtfLarge">
<ev.Executed-eval>
<![CDATA[
{
dialogSaveDoc.FilterIndex = 1;
self.SaveDocument();
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSaveHtml" Text="Save as HTML" Image-uri="res://ToolbarImages/FormatHtml" LargeImage-uri="res://ToolbarImages/FormatHtmlLarge">
<ev.Executed-eval>
<![CDATA[
{
dialogSaveDoc.FilterIndex = 2;
self.SaveDocument();
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandUndo" Text="Undo" Image-uri="res://ToolbarImages/Undo" LargeImage-uri="res://ToolbarImages/UndoLarge" ShortcutBuilder="Ctrl+Z">
<att.Enabled-bind>document.observe as _(_.CanUndo() on _.UndoRedoChanged)</att.Enabled-bind>
<ev.Executed-eval>
@@ -124,7 +124,7 @@
</Instance>
<Instance name="DocumentEditorRibbonResource">
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorRibbon" xmlns:demo="demo::*">
<Instance ref.Class="demo::DocumentEditorRibbon" xmlns:demo="demo::*">
<ref.Members>
<![CDATA[
@cpp:Private
@@ -203,16 +203,35 @@
<att.AlignLeftSelected-bind>self.document.observe as _(self.SelectAlignmentCommand() == self.commandAlignLeft on _.SelectionChanged)</att.AlignLeftSelected-bind>
<att.AlignCenterSelected-bind>self.document.observe as _(self.SelectAlignmentCommand() == self.commandAlignCenter on _.SelectionChanged)</att.AlignCenterSelected-bind>
<att.AlignRightSelected-bind>self.document.observe as _(self.SelectAlignmentCommand() == self.commandAlignRight on _.SelectionChanged)</att.AlignRightSelected-bind>
<MessageDialog ref.Name="dialogMessage" Title="You Expanded a Group!" Text="GuiRibbonGroup::ExpandButtonClicked is executed!"/>
<ToolstripMenu ref.Name="toolstripHome">
<ToolstripGroupContainer>
<ToolstripGroup>
<MenuItemButton Command-eval="self.commandLoadPrivate" Alt="O"/>
</ToolstripGroup>
<ToolstripGroup>
<MenuItemButton Command-eval="self.commandSavePrivate" Alt="P"/>
<MenuItemButton Command-eval="self.commandSaveRtf" Alt="R"/>
<MenuItemButton Command-eval="self.commandSaveHtml" Alt="H"/>
</ToolstripGroup>
</ToolstripGroupContainer>
</ToolstripMenu>
<att.MenuContainer-set>
<RibbonTab>
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<att.BeforeHeaders-set>
<Button Text=" HOME ">
<Button ref.Name="buttonHome" Text=" HOME ">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<ev.Clicked-eval>
<![CDATA[
{
toolstripHome.ShowPopup(buttonHome, true);
}
]]>
</ev.Clicked-eval>
</Button>
</att.BeforeHeaders-set>
@@ -1,10 +1,22 @@
<Folder>
<Instance name="DocumentEditorToolstripResource">
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorToolstrip" xmlns:demo="demo::*">
<Instance ref.Class="demo::DocumentEditorToolstrip" xmlns:demo="demo::*">
<demo:DocumentEditorBase ref.Name="self" Text="Document Editor (Toolstrip)">
<att.MenuContainer-set>
<ToolstripMenuBar>
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<MenuBarButton Text="File" Alt="F">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandLoadPrivate" Alt="O"/>
<MenuItemButton Text="Save as" Alt="S" Image-uri="res://ToolbarImages/FormatPrivate">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandSavePrivate" Alt="P"/>
<MenuItemButton Command-eval="self.commandSaveRtf" Alt="R"/>
<MenuItemButton Command-eval="self.commandSaveHtml" Alt="H"/>
</att.SubMenu-set>
</MenuItemButton>
</att.SubMenu-set>
</MenuBarButton>
<MenuBarButton Text="Edit" Alt="E">
<att.SubMenu-set>
<ToolstripGroupContainer>
@@ -11,6 +11,9 @@ https://github.com/vczh-libraries
#define VCZH_WORKFLOW_COMPILER_GENERATED_DEMO
#include "DemoPartialClasses.h"
#include "DocumentEditorBase.h"
#include "DocumentEditorRibbon.h"
#include "DocumentEditorToolstrip.h"
#include "MainWindow.h"
#endif
File diff suppressed because it is too large Load Diff
@@ -372,6 +372,11 @@ namespace vl
CLASS_MEMBER_METHOD(GetToolstripContainer, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableCursor, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableHyperlink, { L"forEdit" })
CLASS_MEMBER_METHOD(LoadAsPrivateFormat, { L"fileName" })
CLASS_MEMBER_METHOD(SaveAsHTML, { L"fileName" })
CLASS_MEMBER_METHOD(SaveAsPrivateFormat, { L"fileName" })
CLASS_MEMBER_METHOD(SaveAsRTF, { L"fileName" })
CLASS_MEMBER_METHOD(SaveDocument, NO_PARAMETER)
CLASS_MEMBER_METHOD(SelectAlignmentCommand, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetAlignment, { L"alignment" })
CLASS_MEMBER_METHOD(SetEditMode, { L"editMode" })
@@ -413,9 +418,13 @@ namespace vl
CLASS_MEMBER_FIELD(commandFont)
CLASS_MEMBER_FIELD(commandInsertImage)
CLASS_MEMBER_FIELD(commandItalic)
CLASS_MEMBER_FIELD(commandLoadPrivate)
CLASS_MEMBER_FIELD(commandPaste)
CLASS_MEMBER_FIELD(commandRedo)
CLASS_MEMBER_FIELD(commandRemoveHyperlink)
CLASS_MEMBER_FIELD(commandSaveHtml)
CLASS_MEMBER_FIELD(commandSavePrivate)
CLASS_MEMBER_FIELD(commandSaveRtf)
CLASS_MEMBER_FIELD(commandSelect)
CLASS_MEMBER_FIELD(commandSelectable)
CLASS_MEMBER_FIELD(commandStrike)
@@ -425,7 +434,10 @@ namespace vl
CLASS_MEMBER_FIELD(dialogColor)
CLASS_MEMBER_FIELD(dialogFont)
CLASS_MEMBER_FIELD(dialogMessage)
CLASS_MEMBER_FIELD(dialogNotImpl)
CLASS_MEMBER_FIELD(dialogOpen)
CLASS_MEMBER_FIELD(dialogOpenDoc)
CLASS_MEMBER_FIELD(dialogSaveDoc)
CLASS_MEMBER_FIELD(document)
CLASS_MEMBER_FIELD(menuContainer)
CLASS_MEMBER_FIELD(self)
@@ -555,9 +567,17 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_88)
CLASS_MEMBER_FIELD(__vwsn_precompile_89)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(__vwsn_precompile_90)
CLASS_MEMBER_FIELD(__vwsn_precompile_91)
CLASS_MEMBER_FIELD(__vwsn_precompile_92)
CLASS_MEMBER_FIELD(__vwsn_precompile_93)
CLASS_MEMBER_FIELD(__vwsn_precompile_94)
CLASS_MEMBER_FIELD(__vwsn_precompile_95)
CLASS_MEMBER_FIELD(buttonHome)
CLASS_MEMBER_FIELD(dialogMessage)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(styleGallery)
CLASS_MEMBER_FIELD(toolstripHome)
END_CLASS_MEMBER(::demo::DocumentEditorRibbonConstructor)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorToolstrip)
@@ -635,7 +655,15 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_65)
CLASS_MEMBER_FIELD(__vwsn_precompile_66)
CLASS_MEMBER_FIELD(__vwsn_precompile_67)
CLASS_MEMBER_FIELD(__vwsn_precompile_68)
CLASS_MEMBER_FIELD(__vwsn_precompile_69)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_70)
CLASS_MEMBER_FIELD(__vwsn_precompile_71)
CLASS_MEMBER_FIELD(__vwsn_precompile_72)
CLASS_MEMBER_FIELD(__vwsn_precompile_73)
CLASS_MEMBER_FIELD(__vwsn_precompile_74)
CLASS_MEMBER_FIELD(__vwsn_precompile_75)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(buttonAlignment)
@@ -0,0 +1,205 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "Demo.h"
/* CodePack:BeginIgnore() */
#ifndef VCZH_DEBUG_NO_REFLECTION
/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */
#include "DemoReflection.h"
#endif
/* CodePack:EndIgnore() */
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
#define GLOBAL_SYMBOL ::vl_workflow_global::Demo::
#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance().
#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance()
#define USERIMPL(...)
/***********************************************************************
Class (::demo::DocumentEditorBase)
***********************************************************************/
namespace demo
{
::vl::presentation::controls::GuiToolstripCommand* DocumentEditorBase::GetEditModeCommand()
{
return this->__vwsn_prop_EditModeCommand;
}
void DocumentEditorBase::SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_)
{
if ((this->__vwsn_prop_EditModeCommand != __vwsn_value_))
{
(this->__vwsn_prop_EditModeCommand = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->EditModeCommandChanged)();
}
}
void DocumentEditorBase::SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode)
{
auto command = ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly) ? this->commandViewOnly : ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Selectable) ? this->commandSelectable : this->commandEditable));
::vl::__vwsn::This(this->document)->SetEditMode(editMode);
::vl::__vwsn::This(this->commandViewOnly)->SetSelected((command == this->commandViewOnly));
::vl::__vwsn::This(this->commandSelectable)->SetSelected((command == this->commandSelectable));
::vl::__vwsn::This(this->commandEditable)->SetSelected((command == this->commandEditable));
this->SetEditModeCommand(command);
::vl::__vwsn::This(this->self)->UpdateSubscriptions();
}
::vl::presentation::controls::GuiToolstripCommand* DocumentEditorBase::SelectAlignmentCommand()
{
auto alignment = ::vl::__vwsn::This(this->document)->SummarizeParagraphAlignment(::vl::__vwsn::This(this->document)->GetCaretBegin(), ::vl::__vwsn::This(this->document)->GetCaretEnd());
return ((alignment == ::vl::Nullable<::vl::presentation::Alignment>(::vl::presentation::Alignment::Left)) ? this->commandAlignLeft : ((alignment == ::vl::Nullable<::vl::presentation::Alignment>(::vl::presentation::Alignment::Center)) ? this->commandAlignCenter : ((alignment == ::vl::Nullable<::vl::presentation::Alignment>(::vl::presentation::Alignment::Right)) ? this->commandAlignRight : this->commandAlignDefault)));
}
void DocumentEditorBase::SetAlignment(::vl::Nullable<::vl::presentation::Alignment> alignment)
{
::vl::__vwsn::This(this->document)->SetParagraphAlignment(::vl::__vwsn::This(this->document)->GetCaretBegin(), ::vl::__vwsn::This(this->document)->GetCaretEnd(), alignment);
::vl::__vwsn::This(this->self)->UpdateSubscriptions();
}
bool DocumentEditorBase::GetHasEditableSelection()
{
return this->__vwsn_prop_HasEditableSelection;
}
void DocumentEditorBase::SetHasEditableSelection(bool __vwsn_value_)
{
if ((this->__vwsn_prop_HasEditableSelection != __vwsn_value_))
{
(this->__vwsn_prop_HasEditableSelection = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->HasEditableSelectionChanged)();
}
}
bool DocumentEditorBase::GetHasEditableSelectionInSingleParagraph()
{
return this->__vwsn_prop_HasEditableSelectionInSingleParagraph;
}
void DocumentEditorBase::SetHasEditableSelectionInSingleParagraph(bool __vwsn_value_)
{
if ((this->__vwsn_prop_HasEditableSelectionInSingleParagraph != __vwsn_value_))
{
(this->__vwsn_prop_HasEditableSelectionInSingleParagraph = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->HasEditableSelectionInSingleParagraphChanged)();
}
}
bool DocumentEditorBase::HasEditableCursor()
{
return (::vl::__vwsn::This(this->document)->GetEditMode() == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
}
bool DocumentEditorBase::HasEditableHyperlink(bool forEdit)
{
auto a = ::vl::__vwsn::This(this->document)->GetCaretBegin();
auto b = ::vl::__vwsn::This(this->document)->GetCaretEnd();
return ((a.row == b.row) && (a.column != b.column));
}
::vl::presentation::compositions::GuiGraphicsComposition* DocumentEditorBase::GetMenuContainer()
{
return static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->menuContainer);
}
::vl::presentation::compositions::GuiGraphicsComposition* DocumentEditorBase::GetToolstripContainer()
{
return static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->toolstripContainer);
}
USERIMPL(/* ::demo::DocumentEditorBase */)
void DocumentEditorBase::LoadAsPrivateFormat(const ::vl::WString& fileName)
{
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::DocumentEditorBase */)
void DocumentEditorBase::SaveAsPrivateFormat(const ::vl::WString& fileName)
{
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::DocumentEditorBase */)
void DocumentEditorBase::SaveAsRTF(const ::vl::WString& fileName)
{
throw ::vl::Exception(L"You should implement this function.");
}
USERIMPL(/* ::demo::DocumentEditorBase */)
void DocumentEditorBase::SaveAsHTML(const ::vl::WString& fileName)
{
throw ::vl::Exception(L"You should implement this function.");
}
void DocumentEditorBase::SaveDocument()
{
if (::vl::__vwsn::This(this->dialogSaveDoc)->ShowDialog())
{
{
auto __vwsn_switch_6 = ::vl::__vwsn::This(this->dialogSaveDoc)->GetFilterIndex();
if ((__vwsn_switch_6 == static_cast<::vl::vint>(0)))
{
::vl::__vwsn::This(this->self)->SaveAsPrivateFormat(::vl::__vwsn::This(this->dialogSaveDoc)->GetFileName());
}
else if ((__vwsn_switch_6 == static_cast<::vl::vint>(1)))
{
::vl::__vwsn::This(this->self)->SaveAsRTF(::vl::__vwsn::This(this->dialogSaveDoc)->GetFileName());
}
else if ((__vwsn_switch_6 == static_cast<::vl::vint>(2)))
{
::vl::__vwsn::This(this->self)->SaveAsHTML(::vl::__vwsn::This(this->dialogSaveDoc)->GetFileName());
}
}
}
}
DocumentEditorBase::DocumentEditorBase()
: ::vl::presentation::controls::GuiCustomControl(::vl::presentation::theme::ThemeName::CustomControl)
, __vwsn_prop_EditModeCommand(static_cast<::vl::presentation::controls::GuiToolstripCommand*>(nullptr))
, __vwsn_prop_HasEditableSelection(false)
, __vwsn_prop_HasEditableSelectionInSingleParagraph(false)
{
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::DocumentEditorBase", false));
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
::vl::__vwsn::This(this)->SetResourceResolver(__vwsn_resolver_);
::vl::__vwsn::This(this)->__vwsn_demo_DocumentEditorBase_Initialize(this);
this->__vwsn_instance_ctor_();
}
void DocumentEditorBase::__vwsn_instance_ctor_()
{
this->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
}
DocumentEditorBase::~DocumentEditorBase()
{
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this));
}
}
#undef GLOBAL_SYMBOL
#undef GLOBAL_NAME
#undef GLOBAL_OBJ
#undef USERIMPL
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
@@ -0,0 +1,169 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORBASE
#define VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORBASE
#include "DemoPartialClasses.h"
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
namespace demo
{
class DocumentEditorBase : public ::vl::presentation::controls::GuiCustomControl, public ::demo::DocumentEditorBaseConstructor, public ::vl::reflection::Description<DocumentEditorBase>
{
friend class ::demo::DocumentEditorBaseConstructor;
friend class ::vl_workflow_global::__vwsnc34_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc35_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc36_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc37_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc38_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc39_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc40_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc41_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc42_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc43_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize____vl_reflection_description_ICoroutine;
friend class ::vl_workflow_global::__vwsnc44_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc45_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc46_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc47_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc48_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc49_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc50_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc51_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc52_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc53_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc54_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc55_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc56_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc57_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc58_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc59_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc60_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc61_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc62_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc63_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__vl_reflection_description_IValueSubscription;
friend struct ::vl_workflow_global::__vwsnf100_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf101_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf102_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf103_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf104_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf105_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf106_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf107_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf108_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf109_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf110_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf111_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf112_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf113_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf114_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf115_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf116_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf117_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf118_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf119_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf120_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf121_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize__;
friend struct ::vl_workflow_global::__vwsnf122_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf123_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf124_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf125_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf126_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf127_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf128_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf129_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf130_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf131_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf132_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf133_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf134_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf135_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf136_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf137_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf138_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf139_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf140_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf141_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf142_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf143_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf144_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf145_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf146_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf147_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf148_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf149_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf150_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf151_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf152_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf153_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf154_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf155_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf156_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf98_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
friend struct ::vl_workflow_global::__vwsnf99_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_;
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<DocumentEditorBase>;
#endif
protected:
::vl::presentation::controls::GuiToolstripCommand* __vwsn_prop_EditModeCommand;
::vl::presentation::controls::GuiToolstripCommand* GetEditModeCommand();
void SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_);
::vl::Event<void()> EditModeCommandChanged;
private:
void SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode);
protected:
::vl::presentation::controls::GuiToolstripCommand* SelectAlignmentCommand();
private:
void SetAlignment(::vl::Nullable<::vl::presentation::Alignment> alignment);
bool __vwsn_prop_HasEditableSelection;
bool GetHasEditableSelection();
void SetHasEditableSelection(bool __vwsn_value_);
::vl::Event<void()> HasEditableSelectionChanged;
bool __vwsn_prop_HasEditableSelectionInSingleParagraph;
bool GetHasEditableSelectionInSingleParagraph();
void SetHasEditableSelectionInSingleParagraph(bool __vwsn_value_);
::vl::Event<void()> HasEditableSelectionInSingleParagraphChanged;
bool HasEditableCursor();
bool HasEditableHyperlink(bool forEdit);
protected:
::vl::presentation::compositions::GuiGraphicsComposition* GetMenuContainer();
::vl::presentation::compositions::GuiGraphicsComposition* GetToolstripContainer();
public:
void LoadAsPrivateFormat(const ::vl::WString& fileName);
void SaveAsPrivateFormat(const ::vl::WString& fileName);
void SaveAsRTF(const ::vl::WString& fileName);
void SaveAsHTML(const ::vl::WString& fileName);
private:
void SaveDocument();
public:
DocumentEditorBase();
void __vwsn_instance_ctor_();
~DocumentEditorBase();
};
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif
@@ -0,0 +1,204 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "Demo.h"
/* CodePack:BeginIgnore() */
#ifndef VCZH_DEBUG_NO_REFLECTION
/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */
#include "DemoReflection.h"
#endif
/* CodePack:EndIgnore() */
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
#define GLOBAL_SYMBOL ::vl_workflow_global::Demo::
#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance().
#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance()
#define USERIMPL(...)
/***********************************************************************
Class (::demo::DocumentEditorRibbon)
***********************************************************************/
namespace demo
{
bool DocumentEditorRibbon::GetAlignLeftSelected()
{
return this->__vwsn_prop_AlignLeftSelected;
}
void DocumentEditorRibbon::SetAlignLeftSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignLeftSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignLeftSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignLeftSelectedChanged)();
}
}
bool DocumentEditorRibbon::GetAlignCenterSelected()
{
return this->__vwsn_prop_AlignCenterSelected;
}
void DocumentEditorRibbon::SetAlignCenterSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignCenterSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignCenterSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignCenterSelectedChanged)();
}
}
bool DocumentEditorRibbon::GetAlignRightSelected()
{
return this->__vwsn_prop_AlignRightSelected;
}
void DocumentEditorRibbon::SetAlignRightSelected(bool __vwsn_value_)
{
if ((this->__vwsn_prop_AlignRightSelected != __vwsn_value_))
{
(this->__vwsn_prop_AlignRightSelected = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->AlignRightSelectedChanged)();
}
}
::vl::Ptr<::vl::reflection::description::IValueList> DocumentEditorRibbon::GetStyleGroups()
{
return this->__vwsn_prop_StyleGroups;
}
void DocumentEditorRibbon::SetStyleGroups(::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_value_)
{
if ((this->__vwsn_prop_StyleGroups.Obj() != __vwsn_value_.Obj()))
{
(this->__vwsn_prop_StyleGroups = __vwsn_value_);
::vl::__vwsn::EventInvoke(this->StyleGroupsChanged)();
}
}
::vl::Ptr<::vl::reflection::description::IValueList> DocumentEditorRibbon::GenerateStyleGroups()
{
auto group1 = ::vl::Ptr<::demo::StyleGroup>(new ::demo::StyleGroup());
(::vl::__vwsn::This(group1.Obj())->Name = ::vl::WString(L"Headers", false));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 1", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(2); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FF8000", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 2", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(1.6); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#FF8000", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group1.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Header 3", false), [&](){ ::vl::presentation::DocumentFontSize __vwsn_temp__; __vwsn_temp__.size = static_cast<double>(1.3); __vwsn_temp__.relative = true; return __vwsn_temp__; }(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
auto group2 = ::vl::Ptr<::demo::StyleGroup>(new ::demo::StyleGroup());
(::vl::__vwsn::This(group2.Obj())->Name = ::vl::WString(L"Content", false));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Strong", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Quote", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Emphasis", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Intense Emphasis", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(::vl::__vwsn::Parse<::vl::presentation::Color>(::vl::WString(L"#8080FF", false))), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>(true), ::vl::Nullable<bool>()))));
::vl::__vwsn::This(::vl::__vwsn::This(group2.Obj())->Items.Obj())->Add(::vl::__vwsn::Box(::vl::Ptr<::demo::StyleItem>(new ::demo::StyleItem(::vl::WString(L"Deleted", false), ::vl::Nullable<::vl::presentation::DocumentFontSize>(), ::vl::Nullable<::vl::presentation::Color>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(), ::vl::Nullable<bool>(true)))));
auto styles = ::vl::__vwsn::UnboxCollection<::vl::reflection::description::IValueDictionary>(::vl::__vwsn::This(::vl::__vwsn::This(this->document)->GetDocument().Obj())->styles);
{
auto __vwsn_for_enumerable_styleItem = ::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(group1.Obj())->Items);
auto __vwsn_for_enumerator_styleItem = ::vl::__vwsn::This(__vwsn_for_enumerable_styleItem.Obj())->CreateEnumerator();
while (::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->Next())
{
auto styleItem = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->GetCurrent());
{
::vl::__vwsn::This(styles.Obj())->Set(::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Name), ::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Style));
}
}
}
{
auto __vwsn_for_enumerable_styleItem = ::vl::Ptr<::vl::reflection::description::IValueEnumerable>(::vl::__vwsn::This(group2.Obj())->Items);
auto __vwsn_for_enumerator_styleItem = ::vl::__vwsn::This(__vwsn_for_enumerable_styleItem.Obj())->CreateEnumerator();
while (::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->Next())
{
auto styleItem = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(__vwsn_for_enumerator_styleItem.Obj())->GetCurrent());
{
::vl::__vwsn::This(styles.Obj())->Set(::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Name), ::vl::__vwsn::Box(::vl::__vwsn::This(styleItem.Obj())->Style));
}
}
}
return (::vl::__vwsn::CreateList().Add(group1).Add(group2)).list;
}
void DocumentEditorRibbon::SelectStyleName(const ::vl::Nullable<::vl::WString>& styleName)
{
if (static_cast<bool>(styleName))
{
{
auto __vwsn_for_begin_groupIndex = static_cast<::vl::vint>(0);
auto __vwsn_for_end_groupIndex = (::vl::__vwsn::This(this->GetStyleGroups().Obj())->GetCount() - static_cast<::vl::vint>(1));
auto groupIndex = __vwsn_for_begin_groupIndex;
while ((groupIndex <= __vwsn_for_end_groupIndex))
{
{
auto group = ::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleGroup>>(::vl::__vwsn::This(this->GetStyleGroups().Obj())->Get(groupIndex));
{
auto __vwsn_for_begin_itemIndex = static_cast<::vl::vint>(0);
auto __vwsn_for_end_itemIndex = (::vl::__vwsn::This(::vl::__vwsn::This(group.Obj())->Items.Obj())->GetCount() - static_cast<::vl::vint>(1));
auto itemIndex = __vwsn_for_begin_itemIndex;
while ((itemIndex <= __vwsn_for_end_itemIndex))
{
{
if ((::vl::__vwsn::This(::vl::__vwsn::Unbox<::vl::Ptr<::demo::StyleItem>>(::vl::__vwsn::This(::vl::__vwsn::This(group.Obj())->Items.Obj())->Get(itemIndex)).Obj())->Name == styleName.Value()))
{
::vl::__vwsn::This(this->styleGallery)->SelectItem(::vl::__vwsn::This(this->styleGallery)->GalleryPosToIndex([&](){ ::vl::presentation::controls::GalleryPos __vwsn_temp__; __vwsn_temp__.group = groupIndex; __vwsn_temp__.item = itemIndex; return __vwsn_temp__; }()));
return;
}
}
(itemIndex = (itemIndex + static_cast<::vl::vint>(1)));
}
}
}
(groupIndex = (groupIndex + static_cast<::vl::vint>(1)));
}
}
}
::vl::__vwsn::This(this->styleGallery)->SelectItem((- static_cast<::vl::vint>(1)));
}
DocumentEditorRibbon::DocumentEditorRibbon()
: __vwsn_prop_AlignLeftSelected(true)
, __vwsn_prop_AlignCenterSelected(true)
, __vwsn_prop_AlignRightSelected(true)
, __vwsn_prop_StyleGroups(::vl::Ptr<::vl::reflection::description::IValueList>())
{
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::DocumentEditorRibbon", false));
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
::vl::__vwsn::This(this)->SetResourceResolver(__vwsn_resolver_);
::vl::__vwsn::This(this)->__vwsn_demo_DocumentEditorRibbon_Initialize(this);
this->__vwsn_instance_ctor_();
}
void DocumentEditorRibbon::__vwsn_instance_ctor_()
{
this->SetStyleGroups(this->GenerateStyleGroups());
::vl::__vwsn::EventAttach(::vl::__vwsn::This(this->document)->SelectionChanged, LAMBDA(::vl_workflow_global::__vwsnf172_Demo_demo_DocumentEditorRibbon___vwsn_instance_ctor__(this)));
}
DocumentEditorRibbon::~DocumentEditorRibbon()
{
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this));
}
}
#undef GLOBAL_SYMBOL
#undef GLOBAL_NAME
#undef GLOBAL_OBJ
#undef USERIMPL
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
@@ -0,0 +1,94 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORRIBBON
#define VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORRIBBON
#include "DemoPartialClasses.h"
#include "DocumentEditorBase.h"
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
namespace demo
{
class DocumentEditorRibbon : public ::demo::DocumentEditorBase, public ::demo::DocumentEditorRibbonConstructor, public ::vl::reflection::Description<DocumentEditorRibbon>
{
friend struct ::vl_workflow_global::__vwsnf172_Demo_demo_DocumentEditorRibbon___vwsn_instance_ctor__;
friend class ::demo::DocumentEditorRibbonConstructor;
friend class ::vl_workflow_global::__vwsnc64_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc65_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc66_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc67_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc68_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc69_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc70_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc71_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc72_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize__vl_reflection_description_IValueSubscription;
friend struct ::vl_workflow_global::__vwsnf157_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf158_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf159_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf160_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf161_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf162_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf163_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf164_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf165_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf166_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf167_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf168_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf169_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf170_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
friend struct ::vl_workflow_global::__vwsnf171_Demo_demo_DocumentEditorRibbonConstructor___vwsn_demo_DocumentEditorRibbon_Initialize_;
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<DocumentEditorRibbon>;
#endif
private:
bool __vwsn_prop_AlignLeftSelected;
bool GetAlignLeftSelected();
void SetAlignLeftSelected(bool __vwsn_value_);
::vl::Event<void()> AlignLeftSelectedChanged;
bool __vwsn_prop_AlignCenterSelected;
bool GetAlignCenterSelected();
void SetAlignCenterSelected(bool __vwsn_value_);
::vl::Event<void()> AlignCenterSelectedChanged;
bool __vwsn_prop_AlignRightSelected;
bool GetAlignRightSelected();
void SetAlignRightSelected(bool __vwsn_value_);
::vl::Event<void()> AlignRightSelectedChanged;
::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_prop_StyleGroups;
::vl::Ptr<::vl::reflection::description::IValueList> GetStyleGroups();
void SetStyleGroups(::vl::Ptr<::vl::reflection::description::IValueList> __vwsn_value_);
::vl::Event<void()> StyleGroupsChanged;
::vl::Ptr<::vl::reflection::description::IValueList> GenerateStyleGroups();
void SelectStyleName(const ::vl::Nullable<::vl::WString>& styleName);
public:
DocumentEditorRibbon();
void __vwsn_instance_ctor_();
~DocumentEditorRibbon();
};
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif
@@ -0,0 +1,65 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#include "Demo.h"
/* CodePack:BeginIgnore() */
#ifndef VCZH_DEBUG_NO_REFLECTION
/* CodePack:ConditionOff(VCZH_DEBUG_NO_REFLECTION, DemoReflection.h) */
#include "DemoReflection.h"
#endif
/* CodePack:EndIgnore() */
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
#define GLOBAL_SYMBOL ::vl_workflow_global::Demo::
#define GLOBAL_NAME ::vl_workflow_global::Demo::Instance().
#define GLOBAL_OBJ &::vl_workflow_global::Demo::Instance()
#define USERIMPL(...)
/***********************************************************************
Class (::demo::DocumentEditorToolstrip)
***********************************************************************/
namespace demo
{
DocumentEditorToolstrip::DocumentEditorToolstrip()
{
auto __vwsn_resource_ = ::vl::__vwsn::This(::vl::presentation::GetResourceManager())->GetResourceFromClassName(::vl::WString(L"demo::DocumentEditorToolstrip", false));
auto __vwsn_resolver_ = ::vl::Ptr<::vl::presentation::GuiResourcePathResolver>(new ::vl::presentation::GuiResourcePathResolver(__vwsn_resource_, ::vl::__vwsn::This(__vwsn_resource_.Obj())->GetWorkingDirectory()));
::vl::__vwsn::This(this)->SetResourceResolver(__vwsn_resolver_);
::vl::__vwsn::This(this)->__vwsn_demo_DocumentEditorToolstrip_Initialize(this);
}
DocumentEditorToolstrip::~DocumentEditorToolstrip()
{
this->FinalizeInstanceRecursively(static_cast<::vl::presentation::controls::GuiCustomControl*>(this));
}
}
#undef GLOBAL_SYMBOL
#undef GLOBAL_NAME
#undef GLOBAL_OBJ
#undef USERIMPL
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
@@ -0,0 +1,53 @@
/***********************************************************************
!!!!!! DO NOT MODIFY !!!!!!
GacGen.exe Resource.xml
This file is generated by Workflow compiler
https://github.com/vczh-libraries
***********************************************************************/
#ifndef VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORTOOLSTRIP
#define VCZH_WORKFLOW_COMPILER_GENERATED_DOCUMENTEDITORTOOLSTRIP
#include "DemoPartialClasses.h"
#include "DocumentEditorBase.h"
#if defined( _MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wparentheses-equality"
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses-equality"
#endif
namespace demo
{
class DocumentEditorToolstrip : public ::demo::DocumentEditorBase, public ::demo::DocumentEditorToolstripConstructor, public ::vl::reflection::Description<DocumentEditorToolstrip>
{
friend class ::demo::DocumentEditorToolstripConstructor;
friend class ::vl_workflow_global::__vwsnc76_Demo_demo_DocumentEditorToolstripConstructor___vwsn_demo_DocumentEditorToolstrip_Initialize__vl_reflection_description_IValueSubscription;
friend class ::vl_workflow_global::__vwsnc77_Demo_demo_DocumentEditorToolstripConstructor___vwsn_demo_DocumentEditorToolstrip_Initialize__vl_reflection_description_IValueSubscription;
friend struct ::vl_workflow_global::__vwsnf176_Demo_demo_DocumentEditorToolstripConstructor___vwsn_demo_DocumentEditorToolstrip_Initialize_;
friend struct ::vl_workflow_global::__vwsnf177_Demo_demo_DocumentEditorToolstripConstructor___vwsn_demo_DocumentEditorToolstrip_Initialize_;
#ifndef VCZH_DEBUG_NO_REFLECTION
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<DocumentEditorToolstrip>;
#endif
public:
DocumentEditorToolstrip();
~DocumentEditorToolstrip();
};
}
#if defined( _MSC_VER)
#pragma warning(pop)
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#elif defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif
@@ -11,6 +11,13 @@
<Image name="CopyLarge" content="File">L_Copy.png</Image>
<Image name="CutLarge" content="File">L_Cut.png</Image>
<Image name="PasteLarge" content="File">L_Paste.png</Image>
<Image name="FormatPrivate" content="File">_FormatPrivate.png</Image>
<Image name="FormatRtf" content="File">_FormatRtf.png</Image>
<Image name="FormatHtml" content="File">_FormatHtml.png</Image>
<Image name="FormatPrivateLarge" content="File">L_FormatPrivate.png</Image>
<Image name="FormatRtfLarge" content="File">L_FormatRtf.png</Image>
<Image name="FormatHtmlLarge" content="File">L_FormatHtml.png</Image>
<Image name="Bold" content="File">s_Bold.png</Image>
<Image name="Italic" content="File">s_Italic.png</Image>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.
Binary file not shown.