Update GacUI_Controls\DocumentEditor

This commit is contained in:
Zihan Chen
2018-04-30 04:27:02 -07:00
parent 70f0f8660f
commit 3e8683c4e7
28 changed files with 5553 additions and 3130 deletions
@@ -163,8 +163,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Xml Include="UI\DocumentComponents.xml" />
<Xml Include="UI\Base.xml" />
<Xml Include="UI\Hyperlink.xml" />
<Xml Include="UI\Resource.xml" />
<Xml Include="UI\Ribbon.xml" />
<Xml Include="UI\ToolbarImages\Images.xml" />
<Xml Include="UI\Toolstrip.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
@@ -16,6 +16,9 @@
<Filter Include="UI">
<UniqueIdentifier>{69bac203-e424-45f8-9ee9-02339dc0166c}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\ToolbarImages">
<UniqueIdentifier>{012f179d-483c-430b-9a29-52edd562ddbf}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Main.cpp">
@@ -34,10 +37,22 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<Xml Include="UI\DocumentComponents.xml">
<Xml Include="UI\Resource.xml">
<Filter>Resource Files</Filter>
</Xml>
<Xml Include="UI\Resource.xml">
<Xml Include="UI\ToolbarImages\Images.xml">
<Filter>Resource Files\ToolbarImages</Filter>
</Xml>
<Xml Include="UI\Toolstrip.xml">
<Filter>Resource Files</Filter>
</Xml>
<Xml Include="UI\Base.xml">
<Filter>Resource Files</Filter>
</Xml>
<Xml Include="UI\Hyperlink.xml">
<Filter>Resource Files</Filter>
</Xml>
<Xml Include="UI\Ribbon.xml">
<Filter>Resource Files</Filter>
</Xml>
</ItemGroup>
@@ -0,0 +1,412 @@
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorWindowBase">
<ref.Members>
<![CDATA[
@cpp:Protected
prop EditModeCommand : ToolstripCommand* = null {const}
@cpp:Private
func SetEditMode(editMode: DocumentCommonInterface::EditMode) : void
{
var command =
editMode == DocumentCommonInterface::EditMode::ViewOnly ? commandViewOnly :
editMode == DocumentCommonInterface::EditMode::Selectable ? commandSelectable :
commandEditable;
document.EditMode = editMode;
commandViewOnly.Selected = (command == commandViewOnly);
commandSelectable.Selected = (command == commandSelectable);
commandEditable.Selected = (command == commandEditable);
SetEditModeCommand(command);
self.UpdateSubscriptions();
}
@cpp:Protected
func SelectAlignmentCommand() : ToolstripCommand*
{
var alignment = document.SummarizeParagraphAlignment(document.CaretBegin, document.CaretEnd);
return
alignment == Alignment::Left ? commandAlignLeft :
alignment == Alignment::Center ? commandAlignCenter :
alignment == Alignment::Right ? commandAlignRight :
commandAlignDefault;
}
@cpp:Private
func SetAlignment(alignment : Alignment?) : void
{
document.SetParagraphAlignment(document.CaretBegin, document.CaretEnd, alignment);
self.UpdateSubscriptions();
}
@cpp:Private
prop HasEditableSelection : bool = false {}
@cpp:Private
prop HasEditableSelectionInSingleParagraph : bool = false {}
@cpp:Private
func HasEditableCursor() : bool
{
return document.EditMode == DocumentCommonInterface::EditMode::Editable;
}
@cpp:Private
func HasEditableHyperlink(forEdit : bool) : bool
{
var a = document.CaretBegin;
var b = document.CaretEnd;
return a.row == b.row and a.column != b.column;
}
@cpp:Protected
func GetMenuContainer() : GraphicsComposition*
{
return menuContainer;
}
@cpp:Protected
func GetToolstripContainer() : GraphicsComposition*
{
return toolstripContainer;
}
prop MenuContainer : GraphicsComposition* {GetMenuContainer}
prop ToolstripContainer : GraphicsComposition* {GetToolstripContainer}
]]>
</ref.Members>
<ref.Ctor>
<![CDATA[
{
SetEditMode(Editable);
}
]]>
</ref.Ctor>
<Window ref.Name="self" Text="Document Editor" ClientSize="x:800 y:600">
<att.HasEditableSelection-bind>document.observe as _(_.CanCut() on _.SelectionChanged)</att.HasEditableSelection-bind>
<MessageDialog ref.Name="dialogMessage" Title="You Clicked a Hyperlink!"/>
<OpenFileDialog ref.Name="dialogOpen" Title="Select an Image" Filter="Image Files (*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp" EnabledPreview="true" Options="FileDialogFileMustExist|FileDialogDereferenceLinks"/>
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.Rows>
<_>composeType:MinSize</_>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
</att.Rows>
<att.Columns>
<_>composeType:Percentage percentage:1.0</_>
</att.Columns>
<Cell ref.Name="menuContainer" Site="row:0 column:0"/>
<Cell ref.Name="toolstripContainer" Site="row:1 column:0"/>
<Cell Site="row:2 column:0">
<DocumentViewer ref.Name="document" EditMode="Editable" Alt="D">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<ev.ActiveHyperlinkExecuted-eval>
<![CDATA[
{
dialogMessage.Text = document.ActiveHyperlinkReference;
dialogMessage.ShowDialog();
}
]]>
</ev.ActiveHyperlinkExecuted-eval>
</DocumentViewer>
</Cell>
</Table>
<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>
<![CDATA[document.Undo();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandRedo" Text="Redo" Image-uri="res://ToolbarImages/Redo" LargeImage-uri="res://ToolbarImages/RedoLarge" ShortcutBuilder="Ctrl+Y">
<att.Enabled-bind>document.observe as _(_.CanRedo() on _.UndoRedoChanged)</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[document.Redo();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandCopy" Text="Copy" Image-uri="res://ToolbarImages/Copy" LargeImage-uri="res://ToolbarImages/CopyLarge" ShortcutBuilder="Ctrl+C">
<att.Enabled-bind>document.observe as _(_.CanCopy() on _.SelectionChanged)</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[document.Copy();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandCut" Text="Cut" Image-uri="res://ToolbarImages/Cut" LargeImage-uri="res://ToolbarImages/CutLarge" ShortcutBuilder="Ctrl+X">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[document.Cut();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandPaste" Text="Paste" Image-uri="res://ToolbarImages/Paste" LargeImage-uri="res://ToolbarImages/PasteLarge" ShortcutBuilder="Ctrl+V">
<att.Enabled-bind>self.observe as _(document.CanPaste() on _.BoundsComposition.clipboardNotify)</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[document.Paste();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandDelete" Text="Delete" Image-uri="res://ToolbarImages/Delete" LargeImage-uri="res://ToolbarImages/RemoveLinkLarge">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[document.SetSelectionText("");]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSelect" Text="Select All" ShortcutBuilder="Ctrl+A">
<ev.Executed-eval>
<![CDATA[document.SelectAll();]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandInsertImage" Text="Insert Image ..." Image-uri="res://ToolbarImages/Image" LargeImage-uri="res://ToolbarImages/ImageLarge">
<att.Enabled-bind>self.HasEditableCursor()</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
{
if (dialogOpen.ShowDialog())
{
var imageService = INativeController::GetCurrentController().ImageService();
var image = imageService.CreateImageFromFile(dialogOpen.FileName);
var imageData = new ImageData^(image, 0);
document.EditImage(document.CaretBegin, document.CaretEnd, imageData);
}
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandEditHyperlink" Text="Edit Hyperlink ..." Image-uri="res://ToolbarImages/Link" LargeImage-uri="res://ToolbarImages/LinkLarge">
<att.Enabled-bind>document.observe as _(self.HasEditableHyperlink(true) on _.SelectionChanged)</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
$Async{
var mainWindow = self.RelatedControlHost as controls::GuiWindow*;
var window = new HyperlinkWindow*();
window.MoveToScreenCenter(mainWindow.RelatedScreen);
$Await window.ShowModalAsync(mainWindow);
if (window.Url is not null)
{
var row = document.CaretBegin.row;
var begin = document.CaretBegin.column;
var end = document.CaretEnd.column;
document.EditHyperlink(row, begin, end, cast string window.Url, "#NormalLink", "#ActiveLink");
}
delete window;
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandRemoveHyperlink" Text="Remove Hyperlink" Image-uri="res://ToolbarImages/RemoveLink" LargeImage-uri="res://ToolbarImages/RemoveLinkLarge">
<att.Enabled-bind>document.observe as _(self.HasEditableHyperlink(false) on _.SelectionChanged)</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
{
var row = document.CaretBegin.row;
var begin = document.CaretBegin.column;
var end = document.CaretEnd.column;
document.RemoveHyperlink(row, begin, end);
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandBold" Text="Bold" Image-uri="res://ToolbarImages/Bold">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<att.Selected-bind>document.observe as _(_.SummarizeStyle(_.CaretBegin, _.CaretEnd).bold == true on _.SelectionChanged, _.ModifiedChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[
{
var style = new DocumentStyleProperties^();
style.bold = not commandBold.Selected;
document.EditStyle(document.CaretBegin, document.CaretEnd, style);
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandItalic" Text="Italic" Image-uri="res://ToolbarImages/Italic">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<att.Selected-bind>document.observe as _(_.SummarizeStyle(_.CaretBegin, _.CaretEnd).italic == true on _.SelectionChanged, _.ModifiedChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[
{
var style = new DocumentStyleProperties^();
style.italic = not commandItalic.Selected;
document.EditStyle(document.CaretBegin, document.CaretEnd, style);
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandUnderline" Text="Underline" Image-uri="res://ToolbarImages/Underline">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<att.Selected-bind>document.observe as _(_.SummarizeStyle(_.CaretBegin, _.CaretEnd).underline == true on _.SelectionChanged, _.ModifiedChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[
{
var style = new DocumentStyleProperties^();
style.underline = not commandUnderline.Selected;
document.EditStyle(document.CaretBegin, document.CaretEnd, style);
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandStrike" Text="Strike" Image-uri="res://ToolbarImages/Strike">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<att.Selected-bind>document.observe as _(_.SummarizeStyle(_.CaretBegin, _.CaretEnd).strikeline == true on _.SelectionChanged, _.ModifiedChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[
{
var style = new DocumentStyleProperties^();
style.strikeline = not commandStrike.Selected;
document.EditStyle(document.CaretBegin, document.CaretEnd, style);
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ColorDialog ref.Name="dialogColor" EnabledCustomColor="false"/>
<FontDialog ref.Name="dialogFont" ShowEffect="false" ShowSelection="true" ForceFontExist="true"/>
<ToolstripCommand ref.Name="commandFont" Text="Set Font ..." Image-uri="res://ToolbarImages/Font">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
{
var begin = document.CaretBegin;
var end = document.CaretEnd;
var style = document.SummarizeStyle(begin, end);
var baselineFont = document.Font;
dialogFont.SelectedFont =
{
fontFamily: ( style.face is null ? baselineFont.fontFamily : cast string style.face )
size: ( style.size is null ? baselineFont.size : cast int style.size.size )
};
if (dialogFont.ShowDialog())
{
style = new DocumentStyleProperties^();
var selectedFont = dialogFont.SelectedFont;
style.face = selectedFont.fontFamily;
style.size = {size:selectedFont.size relative:false};
document.EditStyle(begin, end, style);
}
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandColor" Text="Text Color ..." Image-uri="res://ToolbarImages/Color">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
{
var begin = document.CaretBegin;
var end = document.CaretEnd;
var selectedColor = document.SummarizeStyle(begin, end).color;
if (selectedColor is null)
{
dialogColor.SelectedColor = cast Color "#000000";
}
else
{
dialogColor.SelectedColor = cast Color selectedColor;
}
if (dialogColor.ShowDialog())
{
var style = new DocumentStyleProperties^();
style.color = dialogColor.SelectedColor;
document.EditStyle(begin, end, style);
}
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandBackColor" Text="Background Color ..." Image-uri="res://ToolbarImages/BackColor">
<att.Enabled-bind>self.HasEditableSelection</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[
{
var begin = document.CaretBegin;
var end = document.CaretEnd;
var selectedColor = document.SummarizeStyle(begin, end).backgroundColor;
if (selectedColor is null)
{
dialogColor.SelectedColor = cast Color "#000000";
}
else
{
dialogColor.SelectedColor = cast Color selectedColor;
}
if (dialogColor.ShowDialog())
{
var style = new DocumentStyleProperties^();
style.backgroundColor = dialogColor.SelectedColor;
document.EditStyle(begin, end, style);
}
}
]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandViewOnly" Text="Preview" Image-uri="res://ToolbarImages/ViewOnly" LargeImage-uri="res://ToolbarImages/ViewOnlyLarge" ShortcutBuilder="Ctrl+Shift+P">
<ev.Executed-eval>
<![CDATA[self.SetEditMode(ViewOnly);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandSelectable" Text="Selectable" Image-uri="res://ToolbarImages/Selectable" LargeImage-uri="res://ToolbarImages/SelectableLarge" ShortcutBuilder="Ctrl+Shift+S">
<ev.Executed-eval>
<![CDATA[self.SetEditMode(Selectable);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandEditable" Text="Editable" Image-uri="res://ToolbarImages/Editable" LargeImage-uri="res://ToolbarImages/EditableLarge" ShortcutBuilder="Ctrl+Shift+E">
<ev.Executed-eval>
<![CDATA[self.SetEditMode(Editable);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandAlignDefault" Text="Set Alignment to Default (Left)" Image-uri="res://ToolbarImages/TextAlign">
<att.Enabled-bind>self.HasEditableCursor()</att.Enabled-bind>
<ev.Executed-eval>
<![CDATA[self.SetAlignment(null);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandAlignLeft" Text="Left" Image-uri="res://ToolbarImages/TextAlignLeft" LargeImage-uri="res://ToolbarImages/TextAlignLeftLarge">
<att.Enabled-bind>self.HasEditableCursor()</att.Enabled-bind>
<att.Selected-bind>document.observe as _(self.SelectAlignmentCommand() == commandAlignLeft on _.SelectionChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[self.SetAlignment(Left);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandAlignCenter" Text="Center" Image-uri="res://ToolbarImages/TextAlignCenter" LargeImage-uri="res://ToolbarImages/TextAlignCenterLarge">
<att.Enabled-bind>self.HasEditableCursor()</att.Enabled-bind>
<att.Selected-bind>document.observe as _(self.SelectAlignmentCommand() == commandAlignCenter on _.SelectionChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[self.SetAlignment(Center);]]>
</ev.Executed-eval>
</ToolstripCommand>
<ToolstripCommand ref.Name="commandAlignRight" Text="Right" Image-uri="res://ToolbarImages/TextAlignRight" LargeImage-uri="res://ToolbarImages/TextAlignRightLarge">
<att.Enabled-bind>self.HasEditableCursor()</att.Enabled-bind>
<att.Selected-bind>document.observe as _(self.SelectAlignmentCommand() == commandAlignRight on _.SelectionChanged)</att.Selected-bind>
<ev.Executed-eval>
<![CDATA[self.SetAlignment(Right);]]>
</ev.Executed-eval>
</ToolstripCommand>
</Window>
</Instance>
@@ -1,78 +0,0 @@
<Folder>
<Instance name="HyperlinkWindowResource">
<Instance ref.CodeBehind="false" ref.Class="demo::HyperlinkWindow">
<ref.Members>
<![CDATA[
prop Url : string? = null {}
]]>
</ref.Members>
<Window ref.Name="self" Text="Hyperlink" ClientSize="x:320 y:80" SizeBox="false" MinimizedBox="false" MaximizedBox="false" ShowInTaskBar="false">
<att.BoundsComposition-set PreferredMinSize="x:320 y:80"/>
<Table CellPadding="5" BorderVisible="true" AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.Rows>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
<_>composeType:MinSize</_>
</att.Rows>
<att.Columns>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
<_>composeType:MinSize</_>
<_>composeType:MinSize</_>
</att.Columns>
<Cell Site="row:0 column:0">
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<_>composeType:Percentage percentage:0.5</_>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:0.5</_>
</att.Rows>
<att.Columns>
<_>composeType:Percentage percentage:1.0</_>
</att.Columns>
<Cell Site="row:1 column:0">
<Label Text="Url: "/>
</Cell>
</Table>
</Cell>
<Cell Site="row:0 column:1 columnSpan:3">
<SinglelineTextBox ref.Name="textUrl">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</SinglelineTextBox>
</Cell>
<Cell Site="row:2 column:2">
<Button Text="OK">
<att.BoundsComposition-set PreferredMinSize="x:100"/>
<ev.Clicked-eval>
<![CDATA[
{
self.Url = textUrl.Text;
self.Close();
}
]]>
</ev.Clicked-eval>
</Button>
</Cell>
<Cell Site="row:2 column:3">
<Button Text="Cancel">
<att.BoundsComposition-set PreferredMinSize="x:100"/>
<ev.Clicked-eval>
<![CDATA[
{
self.Url = null;
self.Close();
}
]]>
</ev.Clicked-eval>
</Button>
</Cell>
</Table>
</Window>
</Instance>
</Instance>
</Folder>
@@ -0,0 +1,74 @@
<Instance ref.CodeBehind="false" ref.Class="demo::HyperlinkWindow">
<ref.Members>
<![CDATA[
prop Url : string? = null {}
]]>
</ref.Members>
<Window ref.Name="self" Text="Hyperlink" ClientSize="x:320 y:80" SizeBox="false" MinimizedBox="false" MaximizedBox="false" ShowInTaskBar="false">
<att.BoundsComposition-set PreferredMinSize="x:320 y:80"/>
<Table CellPadding="5" BorderVisible="true" AlignmentToParent="left:0 top:0 right:0 bottom:0">
<att.Rows>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
<_>composeType:MinSize</_>
</att.Rows>
<att.Columns>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:1.0</_>
<_>composeType:MinSize</_>
<_>composeType:MinSize</_>
</att.Columns>
<Cell Site="row:0 column:0">
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<_>composeType:Percentage percentage:0.5</_>
<_>composeType:MinSize</_>
<_>composeType:Percentage percentage:0.5</_>
</att.Rows>
<att.Columns>
<_>composeType:Percentage percentage:1.0</_>
</att.Columns>
<Cell Site="row:1 column:0">
<Label Text="Url: "/>
</Cell>
</Table>
</Cell>
<Cell Site="row:0 column:1 columnSpan:3">
<SinglelineTextBox ref.Name="textUrl">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</SinglelineTextBox>
</Cell>
<Cell Site="row:2 column:2">
<Button Text="OK">
<att.BoundsComposition-set PreferredMinSize="x:100"/>
<ev.Clicked-eval>
<![CDATA[
{
self.Url = textUrl.Text;
self.Close();
}
]]>
</ev.Clicked-eval>
</Button>
</Cell>
<Cell Site="row:2 column:3">
<Button Text="Cancel">
<att.BoundsComposition-set PreferredMinSize="x:100"/>
<ev.Clicked-eval>
<![CDATA[
{
self.Url = null;
self.Close();
}
]]>
</ev.Clicked-eval>
</Button>
</Cell>
</Table>
</Window>
</Instance>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,119 @@
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorRibbonWindow" xmlns:demo="demo::*">
<ref.Members>
<![CDATA[
@cpp:Private
prop AlignLeftSelected : bool = true {}
@cpp:Private
prop AlignCenterSelected : bool = true {}
@cpp:Private
prop AlignRightSelected : bool = true {}
]]>
</ref.Members>
<demo:DocumentEditorWindowBase ref.Name="self" Text="Document Editor (Ribbon)">
<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>
<att.MenuContainer-set>
<RibbonTab>
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<att.BeforeHeaders-set>
<Button Text="HOME">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:80"/>
</Button>
</att.BeforeHeaders-set>
<att.Pages>
<RibbonTabPage Text="Edit">
<att.ContainerComposition-set PreferredMinSize="y:110"/>
<att.Groups>
<RibbonGroup Text="Alignment">
<att.Items>
<RibbonLargeDropdownButton Text="Edit Mode">
<att.LargeImage-bind>self.EditModeCommand.LargeImage ?? null</att.LargeImage-bind>
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandViewOnly" Alt="V"/>
<MenuItemButton Command-eval="self.commandSelectable" Alt="S"/>
<MenuItemButton Command-eval="self.commandEditable" Alt="E"/>
</att.SubMenu-set>
</RibbonLargeDropdownButton>
<RibbonSplitter/>
<RibbonButtons MaxSize="Large" MinSize="Icon">
<att.Buttons>
<ToolstripButton Command-eval="self.commandAlignLeft" Selected-bind="self.AlignLeftSelected"/>
<ToolstripButton Command-eval="self.commandAlignCenter" Selected-bind="self.AlignCenterSelected"/>
<ToolstripButton Command-eval="self.commandAlignRight" Selected-bind="self.AlignRightSelected"/>
</att.Buttons>
</RibbonButtons>
</att.Items>
</RibbonGroup>
<RibbonGroup Text="Edit">
<att.Items>
<RibbonButtons MaxSize="Large" MinSize="Icon">
<att.Buttons>
<ToolstripButton Command-eval="self.commandUndo"/>
<ToolstripButton Command-eval="self.commandRedo"/>
</att.Buttons>
</RibbonButtons>
<RibbonSplitter/>
<RibbonButtons MaxSize="Large" MinSize="Icon">
<att.Buttons>
<ToolstripButton Command-eval="self.commandCopy"/>
<ToolstripButton Command-eval="self.commandCut"/>
<ToolstripButton Command-eval="self.commandPaste"/>
</att.Buttons>
</RibbonButtons>
<RibbonSplitter/>
<RibbonLargeButton Command-eval="self.commandDelete"/>
</att.Items>
</RibbonGroup>
<RibbonGroup Text="Text">
<att.Items>
<RibbonToolstrips>
<att.Groups>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandBold"/>
<ToolstripButton Command-eval="self.commandItalic"/>
</ToolstripGroup>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandUnderline"/>
<ToolstripButton Command-eval="self.commandStrike"/>
</ToolstripGroup>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandFont"/>
<ToolstripButton Command-eval="self.commandColor"/>
<ToolstripButton Command-eval="self.commandBackColor"/>
</ToolstripGroup>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandEditHyperlink"/>
<ToolstripButton Command-eval="self.commandRemoveHyperlink"/>
</ToolstripGroup>
</att.Groups>
</RibbonToolstrips>
</att.Items>
</RibbonGroup>
</att.Groups>
</RibbonTabPage>
<RibbonTabPage Text="Insert" Highlighted="true">
<att.Groups>
<RibbonGroup Text="Object">
<att.Items>
<RibbonButtons MaxSize="Large" MinSize="Small">
<att.Buttons>
<ToolstripButton Command-eval="self.commandInsertImage"/>
<ToolstripButton Command-eval="self.commandEditHyperlink"/>
<ToolstripButton Command-eval="self.commandRemoveHyperlink"/>
</att.Buttons>
</RibbonButtons>
</att.Items>
</RibbonGroup>
</att.Groups>
</RibbonTabPage>
</att.Pages>
</RibbonTab>
</att.MenuContainer-set>
</demo:DocumentEditorWindowBase>
</Instance>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -31,71 +31,107 @@ namespace vl
namespace description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
IMPL_CPP_TYPE_INFO(demo::DocumentEditorRibbonWindow)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorRibbonWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorToolstripWindow)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorToolstripWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorWindowBase)
IMPL_CPP_TYPE_INFO(demo::DocumentEditorWindowBaseConstructor)
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindow)
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindowConstructor)
IMPL_CPP_TYPE_INFO(demo::MainWindow)
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
#define _ ,
BEGIN_CLASS_MEMBER(::demo::HyperlinkWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::HyperlinkWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::HyperlinkWindow*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetUrl, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetUrl, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(UrlChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_Url)
CLASS_MEMBER_PROPERTY_EVENT(Url, GetUrl, SetUrl, UrlChanged)
END_CLASS_MEMBER(::demo::HyperlinkWindow)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorRibbonWindow)
CLASS_MEMBER_BASE(::demo::DocumentEditorWindowBase)
CLASS_MEMBER_BASE(::demo::DocumentEditorRibbonWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::DocumentEditorRibbonWindow*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignCenterSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignLeftSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetAlignRightSelected, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetAlignCenterSelected, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetAlignLeftSelected, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetAlignRightSelected, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(AlignCenterSelectedChanged)
CLASS_MEMBER_EVENT(AlignLeftSelectedChanged)
CLASS_MEMBER_EVENT(AlignRightSelectedChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignCenterSelected)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignLeftSelected)
CLASS_MEMBER_FIELD(__vwsn_prop_AlignRightSelected)
CLASS_MEMBER_PROPERTY_EVENT(AlignCenterSelected, GetAlignCenterSelected, SetAlignCenterSelected, AlignCenterSelectedChanged)
CLASS_MEMBER_PROPERTY_EVENT(AlignLeftSelected, GetAlignLeftSelected, SetAlignLeftSelected, AlignLeftSelectedChanged)
CLASS_MEMBER_PROPERTY_EVENT(AlignRightSelected, GetAlignRightSelected, SetAlignRightSelected, AlignRightSelectedChanged)
END_CLASS_MEMBER(::demo::DocumentEditorRibbonWindow)
BEGIN_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorRibbonWindowConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::HyperlinkWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_HyperlinkWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::DocumentEditorRibbonWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_DocumentEditorRibbonWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
CLASS_MEMBER_FIELD(__vwsn_precompile_22)
CLASS_MEMBER_FIELD(__vwsn_precompile_23)
CLASS_MEMBER_FIELD(__vwsn_precompile_24)
CLASS_MEMBER_FIELD(__vwsn_precompile_25)
CLASS_MEMBER_FIELD(__vwsn_precompile_26)
CLASS_MEMBER_FIELD(__vwsn_precompile_27)
CLASS_MEMBER_FIELD(__vwsn_precompile_28)
CLASS_MEMBER_FIELD(__vwsn_precompile_29)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_30)
CLASS_MEMBER_FIELD(__vwsn_precompile_31)
CLASS_MEMBER_FIELD(__vwsn_precompile_32)
CLASS_MEMBER_FIELD(__vwsn_precompile_33)
CLASS_MEMBER_FIELD(__vwsn_precompile_34)
CLASS_MEMBER_FIELD(__vwsn_precompile_35)
CLASS_MEMBER_FIELD(__vwsn_precompile_36)
CLASS_MEMBER_FIELD(__vwsn_precompile_37)
CLASS_MEMBER_FIELD(__vwsn_precompile_38)
CLASS_MEMBER_FIELD(__vwsn_precompile_39)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_40)
CLASS_MEMBER_FIELD(__vwsn_precompile_41)
CLASS_MEMBER_FIELD(__vwsn_precompile_42)
CLASS_MEMBER_FIELD(__vwsn_precompile_43)
CLASS_MEMBER_FIELD(__vwsn_precompile_44)
CLASS_MEMBER_FIELD(__vwsn_precompile_45)
CLASS_MEMBER_FIELD(__vwsn_precompile_46)
CLASS_MEMBER_FIELD(__vwsn_precompile_47)
CLASS_MEMBER_FIELD(__vwsn_precompile_48)
CLASS_MEMBER_FIELD(__vwsn_precompile_49)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_50)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(textUrl)
END_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
END_CLASS_MEMBER(::demo::DocumentEditorRibbonWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::MainWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::MainWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetHasEditableSelection, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetHasEditableSelectionInSingleParagraph, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableCursor, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableHyperlink, { L"forEdit" })
CLASS_MEMBER_METHOD(SelectAlignmentCommand, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetAlignment, { L"alignment" })
CLASS_MEMBER_METHOD(SetEditMode, { L"editMode" })
CLASS_MEMBER_METHOD(SetHasEditableSelection, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetHasEditableSelectionInSingleParagraph, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(HasEditableSelectionChanged)
CLASS_MEMBER_EVENT(HasEditableSelectionInSingleParagraphChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_HasEditableSelection)
CLASS_MEMBER_FIELD(__vwsn_prop_HasEditableSelectionInSingleParagraph)
CLASS_MEMBER_PROPERTY_EVENT(HasEditableSelection, GetHasEditableSelection, SetHasEditableSelection, HasEditableSelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT(HasEditableSelectionInSingleParagraph, GetHasEditableSelectionInSingleParagraph, SetHasEditableSelectionInSingleParagraph, HasEditableSelectionInSingleParagraphChanged)
END_CLASS_MEMBER(::demo::MainWindow)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorToolstripWindow)
CLASS_MEMBER_BASE(::demo::DocumentEditorWindowBase)
CLASS_MEMBER_BASE(::demo::DocumentEditorToolstripWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::DocumentEditorToolstripWindow*(), NO_PARAMETER)
END_CLASS_MEMBER(::demo::DocumentEditorToolstripWindow)
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorToolstripWindowConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_MainWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::DocumentEditorToolstripWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_DocumentEditorToolstripWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
@@ -161,12 +197,51 @@ 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_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(buttonAlignment)
CLASS_MEMBER_FIELD(buttonView)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::DocumentEditorToolstripWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorWindowBase)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::DocumentEditorWindowBaseConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::DocumentEditorWindowBase*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetEditModeCommand, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetHasEditableSelection, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetHasEditableSelectionInSingleParagraph, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetMenuContainer, NO_PARAMETER)
CLASS_MEMBER_METHOD(GetToolstripContainer, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableCursor, NO_PARAMETER)
CLASS_MEMBER_METHOD(HasEditableHyperlink, { L"forEdit" })
CLASS_MEMBER_METHOD(SelectAlignmentCommand, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetAlignment, { L"alignment" })
CLASS_MEMBER_METHOD(SetEditMode, { L"editMode" })
CLASS_MEMBER_METHOD(SetEditModeCommand, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetHasEditableSelection, { L"__vwsn_value_" })
CLASS_MEMBER_METHOD(SetHasEditableSelectionInSingleParagraph, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(EditModeCommandChanged)
CLASS_MEMBER_EVENT(HasEditableSelectionChanged)
CLASS_MEMBER_EVENT(HasEditableSelectionInSingleParagraphChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_EditModeCommand)
CLASS_MEMBER_FIELD(__vwsn_prop_HasEditableSelection)
CLASS_MEMBER_FIELD(__vwsn_prop_HasEditableSelectionInSingleParagraph)
CLASS_MEMBER_PROPERTY_EVENT_READONLY(EditModeCommand, GetEditModeCommand, EditModeCommandChanged)
CLASS_MEMBER_PROPERTY_EVENT(HasEditableSelection, GetHasEditableSelection, SetHasEditableSelection, HasEditableSelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT(HasEditableSelectionInSingleParagraph, GetHasEditableSelectionInSingleParagraph, SetHasEditableSelectionInSingleParagraph, HasEditableSelectionInSingleParagraphChanged)
CLASS_MEMBER_PROPERTY_READONLY(MenuContainer, GetMenuContainer)
CLASS_MEMBER_PROPERTY_READONLY(ToolstripContainer, GetToolstripContainer)
END_CLASS_MEMBER(::demo::DocumentEditorWindowBase)
BEGIN_CLASS_MEMBER(::demo::DocumentEditorWindowBaseConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::DocumentEditorWindowBaseConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_DocumentEditorWindowBase_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(commandAlignCenter)
CLASS_MEMBER_FIELD(commandAlignDefault)
CLASS_MEMBER_FIELD(commandAlignLeft)
@@ -196,6 +271,62 @@ namespace vl
CLASS_MEMBER_FIELD(dialogMessage)
CLASS_MEMBER_FIELD(dialogOpen)
CLASS_MEMBER_FIELD(document)
CLASS_MEMBER_FIELD(menuContainer)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(toolstripContainer)
END_CLASS_MEMBER(::demo::DocumentEditorWindowBaseConstructor)
BEGIN_CLASS_MEMBER(::demo::HyperlinkWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::HyperlinkWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::HyperlinkWindow*(), NO_PARAMETER)
CLASS_MEMBER_METHOD(GetUrl, NO_PARAMETER)
CLASS_MEMBER_METHOD(SetUrl, { L"__vwsn_value_" })
CLASS_MEMBER_EVENT(UrlChanged)
CLASS_MEMBER_FIELD(__vwsn_prop_Url)
CLASS_MEMBER_PROPERTY_EVENT(Url, GetUrl, SetUrl, UrlChanged)
END_CLASS_MEMBER(::demo::HyperlinkWindow)
BEGIN_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::HyperlinkWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_HyperlinkWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(self)
CLASS_MEMBER_FIELD(textUrl)
END_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
BEGIN_CLASS_MEMBER(::demo::MainWindow)
CLASS_MEMBER_BASE(::vl::presentation::controls::GuiWindow)
CLASS_MEMBER_BASE(::demo::MainWindowConstructor)
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
END_CLASS_MEMBER(::demo::MainWindow)
BEGIN_CLASS_MEMBER(::demo::MainWindowConstructor)
CLASS_MEMBER_BASE(::vl::reflection::DescriptableObject)
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::MainWindowConstructor>(), NO_PARAMETER)
CLASS_MEMBER_METHOD(__vwsn_demo_MainWindow_Initialize, { L"__vwsn_this_" })
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::demo::MainWindowConstructor)
@@ -205,6 +336,12 @@ namespace vl
public:
void Load(ITypeManager* manager)
{
ADD_TYPE_INFO(::demo::DocumentEditorRibbonWindow)
ADD_TYPE_INFO(::demo::DocumentEditorRibbonWindowConstructor)
ADD_TYPE_INFO(::demo::DocumentEditorToolstripWindow)
ADD_TYPE_INFO(::demo::DocumentEditorToolstripWindowConstructor)
ADD_TYPE_INFO(::demo::DocumentEditorWindowBase)
ADD_TYPE_INFO(::demo::DocumentEditorWindowBaseConstructor)
ADD_TYPE_INFO(::demo::HyperlinkWindow)
ADD_TYPE_INFO(::demo::HyperlinkWindowConstructor)
ADD_TYPE_INFO(::demo::MainWindow)
@@ -37,6 +37,12 @@ namespace vl
namespace description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
DECL_TYPE_INFO(::demo::DocumentEditorRibbonWindow)
DECL_TYPE_INFO(::demo::DocumentEditorRibbonWindowConstructor)
DECL_TYPE_INFO(::demo::DocumentEditorToolstripWindow)
DECL_TYPE_INFO(::demo::DocumentEditorToolstripWindowConstructor)
DECL_TYPE_INFO(::demo::DocumentEditorWindowBase)
DECL_TYPE_INFO(::demo::DocumentEditorWindowBaseConstructor)
DECL_TYPE_INFO(::demo::HyperlinkWindow)
DECL_TYPE_INFO(::demo::HyperlinkWindowConstructor)
DECL_TYPE_INFO(::demo::MainWindow)
@@ -5,9 +5,13 @@
<Image name="Cut" content="File">_Cut.png</Image>
<Image name="Paste" content="File">_Paste.png</Image>
<Image name="Delete" content="File">_Delete.png</Image>
<Image name="Image" content="File">e_Image.png</Image>
<Image name="Link" content="File">e_Link.png</Image>
<Image name="RemoveLink" content="File">e_RemoveLink.png</Image>
<Image name="UndoLarge" content="File">L_Undo.png</Image>
<Image name="RedoLarge" content="File">L_Redo.png</Image>
<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="Bold" content="File">s_Bold.png</Image>
<Image name="Italic" content="File">s_Italic.png</Image>
<Image name="Underline" content="File">s_Underline.png</Image>
@@ -15,11 +19,29 @@
<Image name="Color" content="File">s_Color.png</Image>
<Image name="BackColor" content="File">s_BackColor.png</Image>
<Image name="Font" content="File">s_Font.png</Image>
<Image name="Image" content="File">e_Image.png</Image>
<Image name="Link" content="File">e_Link.png</Image>
<Image name="RemoveLink" content="File">e_RemoveLink.png</Image>
<Image name="ImageLarge" content="File">eL_Image.png</Image>
<Image name="LinkLarge" content="File">eL_Link.png</Image>
<Image name="RemoveLinkLarge" content="File">eL_RemoveLink.png</Image>
<Image name="ViewOnly" content="File">m_ViewOnly.png</Image>
<Image name="Selectable" content="File">m_Selectable.png</Image>
<Image name="Editable" content="File">m_Editable.png</Image>
<Image name="ViewOnlyLarge" content="File">mL_ViewOnly.png</Image>
<Image name="SelectableLarge" content="File">mL_Selectable.png</Image>
<Image name="EditableLarge" content="File">mL_Editable.png</Image>
<Image name="TextAlignLeft" content="File">a_TextAlignLeft.png</Image>
<Image name="TextAlignCenter" content="File">a_TextAlignCenter.png</Image>
<Image name="TextAlignRight" content="File">a_TextAlignRight.png</Image>
<Image name="TextAlign" content="File">a_Align.png</Image>
<Image name="TextAlignLeftLarge" content="File">aL_TextAlignLeft.png</Image>
<Image name="TextAlignCenterLarge" content="File">aL_TextAlignCenter.png</Image>
<Image name="TextAlignRightLarge" content="File">aL_TextAlignRight.png</Image>
</Folder>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,103 @@
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorToolstripWindow" xmlns:demo="demo::*">
<demo:DocumentEditorWindowBase 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="Edit" Alt="E">
<att.SubMenu-set>
<ToolstripGroupContainer>
<ToolstripGroup>
<MenuItemButton Command-eval="self.commandUndo" Alt="U"/>
<MenuItemButton Command-eval="self.commandRedo" Alt="R"/>
</ToolstripGroup>
<ToolstripGroup>
<MenuItemButton Command-eval="self.commandCopy" Alt="C"/>
<MenuItemButton Command-eval="self.commandCut" Alt="X"/>
<MenuItemButton Command-eval="self.commandPaste" Alt="P"/>
</ToolstripGroup>
<MenuItemButton Command-eval="self.commandDelete" Alt="D"/>
<ToolstripGroup>
<MenuItemButton Command-eval="self.commandSelect" Alt="A"/>
<MenuItemButton Text="Object" Alt="O">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandInsertImage" Alt="I"/>
<MenuItemButton Command-eval="self.commandEditHyperlink" Alt="L"/>
<MenuItemButton Command-eval="self.commandRemoveHyperlink" Alt="R"/>
</att.SubMenu-set>
</MenuItemButton>
<MenuItemButton Text="Paragram Alignment" Alt="P">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandAlignDefault" Alt="D"/>
<MenuItemButton Command-eval="self.commandAlignLeft" Alt="L"/>
<MenuItemButton Command-eval="self.commandAlignCenter" Alt="C"/>
<MenuItemButton Command-eval="self.commandAlignRight" Alt="R"/>
</att.SubMenu-set>
</MenuItemButton>
</ToolstripGroup>
</ToolstripGroupContainer>
</att.SubMenu-set>
</MenuBarButton>
<MenuBarButton Text="View" Alt="V">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandViewOnly" Alt="V"/>
<MenuItemButton Command-eval="self.commandSelectable" Alt="S"/>
<MenuItemButton Command-eval="self.commandEditable" Alt="E"/>
</att.SubMenu-set>
</MenuBarButton>
</ToolstripMenuBar>
</att.MenuContainer-set>
<att.ToolstripContainer-set>
<ToolstripToolBar>
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
<ToolstripGroupContainer>
<ToolstripGroup>
<ToolstripDropdownButton Alt="V">
<att.Image-bind>self.EditModeCommand.Image ?? null</att.Image-bind>
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandViewOnly" Alt="V"/>
<MenuItemButton Command-eval="self.commandSelectable" Alt="S"/>
<MenuItemButton Command-eval="self.commandEditable" Alt="E"/>
</att.SubMenu-set>
</ToolstripDropdownButton>
<ToolstripDropdownButton ref.Name="buttonAlignment" Alt="P">
<att.Image-bind>self.document.observe as _(self.SelectAlignmentCommand().Image on _.SelectionChanged)</att.Image-bind>
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandAlignDefault" Alt="D"/>
<MenuItemButton Command-eval="self.commandAlignLeft" Alt="L"/>
<MenuItemButton Command-eval="self.commandAlignCenter" Alt="C"/>
<MenuItemButton Command-eval="self.commandAlignRight" Alt="R"/>
</att.SubMenu-set>
</ToolstripDropdownButton>
</ToolstripGroup>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandUndo" Alt="U"/>
<ToolstripButton Command-eval="self.commandRedo" Alt="R"/>
</ToolstripGroup>
<ToolstripGroup>
<ToolstripButton Command-eval="self.commandCopy" Alt="C"/>
<ToolstripButton Command-eval="self.commandCut" Alt="X"/>
<ToolstripButton Command-eval="self.commandPaste" Alt="P"/>
</ToolstripGroup>
<ToolstripButton Command-eval="self.commandDelete" Alt="D"/>
<ToolstripGroup>
<ToolstripSplitButton Command-eval="self.commandInsertImage" Alt="I">
<att.SubMenu-set>
<MenuItemButton Command-eval="self.commandInsertImage" Alt="I"/>
<MenuItemButton Command-eval="self.commandEditHyperlink" Alt="L"/>
<MenuItemButton Command-eval="self.commandRemoveHyperlink" Alt="R"/>
</att.SubMenu-set>
</ToolstripSplitButton>
<ToolstripButton Command-eval="self.commandBold" Alt="B"/>
<ToolstripButton Command-eval="self.commandItalic" Alt="I"/>
<ToolstripButton Command-eval="self.commandUnderline" Alt="U"/>
<ToolstripButton Command-eval="self.commandStrike" Alt="S"/>
<ToolstripButton Command-eval="self.commandFont" Alt="F"/>
<ToolstripButton Command-eval="self.commandColor" Alt="C"/>
<ToolstripButton Command-eval="self.commandBackColor" Alt="K"/>
</ToolstripGroup>
</ToolstripGroupContainer>
</ToolstripToolBar>
</att.ToolstripContainer-set>
</demo:DocumentEditorWindowBase>
</Instance>
Binary file not shown.