DocumentEditor demo reuses files from BlackSkin
@@ -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>
|
||||
@@ -1,431 +0,0 @@
|
||||
<Folder>
|
||||
<Script name="RibbonScript">
|
||||
<Workflow>
|
||||
<![CDATA[
|
||||
module ribbonscript;
|
||||
using presentation::*;
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class StyleItem
|
||||
{
|
||||
var Name : string = "";
|
||||
var Style : DocumentStyle^ = null;
|
||||
|
||||
new (name : string, size : DocumentFontSize?, color : Color?, bold : bool?, italic : bool?, underline : bool?, strikeline : bool?)
|
||||
{
|
||||
Name = name;
|
||||
Style = new DocumentStyle^();
|
||||
Style.parentStyleName = "#Context";
|
||||
Style.styles = new DocumentStyleProperties^();
|
||||
Style.styles.size = size;
|
||||
Style.styles.color = color;
|
||||
Style.styles.bold = bold;
|
||||
Style.styles.italic = italic;
|
||||
Style.styles.underline = underline;
|
||||
Style.styles.strikeline = strikeline;
|
||||
}
|
||||
}
|
||||
|
||||
class StyleGroup
|
||||
{
|
||||
var Name : string = "";
|
||||
var Items : observe StyleItem^[] = {};
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</Workflow>
|
||||
</Script>
|
||||
|
||||
<Instance name="StyleItemTemplateResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::StyleItemTemplate">
|
||||
<ref.Parameter Name="ViewModel" Class="demo::StyleItem"/>
|
||||
<ref.Ctor>
|
||||
<![CDATA[
|
||||
{
|
||||
var styles = ViewModel.Style.styles;
|
||||
if (styles.color is not null) { styleLabel.Color = cast Color styles.color; }
|
||||
|
||||
var font = containerControl.Font;
|
||||
var fontFamily = font.fontFamily;
|
||||
var bold = font.bold;
|
||||
var italic = font.italic;
|
||||
var underline = font.underline;
|
||||
var strikeline = font.strikeline;
|
||||
var size = font.size;
|
||||
|
||||
if (styles.face is not null) { fontFamily = cast string styles.face; }
|
||||
if (styles.bold is not null) { bold = cast bool styles.bold; }
|
||||
if (styles.italic is not null) { italic = cast bool styles.italic; }
|
||||
if (styles.underline is not null) { underline = cast bool styles.underline; }
|
||||
if (styles.strikeline is not null) { strikeline = cast bool styles.strikeline; }
|
||||
|
||||
if(styles.size is not null)
|
||||
{
|
||||
var dsize = styles.size;
|
||||
if (dsize.relative)
|
||||
{
|
||||
size = cast int Math::Round(dsize.size * font.size);
|
||||
}
|
||||
else
|
||||
{
|
||||
size = cast int Math::Round(dsize.size);
|
||||
}
|
||||
}
|
||||
|
||||
styleLabel.Font = {
|
||||
fontFamily : fontFamily
|
||||
size : size
|
||||
bold : bold
|
||||
italic : italic
|
||||
underline : underline
|
||||
strikeline : strikeline
|
||||
antialias : font.antialias
|
||||
verticalAntialias : font.verticalAntialias
|
||||
};
|
||||
}
|
||||
]]>
|
||||
</ref.Ctor>
|
||||
<TextListItemTemplate ref.Name="self" MinSizeLimitation="LimitToElementAndChildren" PreferredMinSize="x:72">
|
||||
<CustomControl ref.Name="containerControl">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren" CellPadding="5">
|
||||
<att.Rows>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
<_>composeType:MinSize</_>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<SolidLabel ref.Name="styleLabel" Text="AaBbCc" Ellipse="true" Color="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0">
|
||||
<SolidLabel Text-bind="ViewModel.Name" Font-eval="containerControl.Font" Ellipse="true" HorizontalAlignment="Center">
|
||||
<att.Color-bind>
|
||||
<![CDATA[cast Color (self.Selected ? "#FFFFFF" : "#808080")]]>
|
||||
</att.Color-bind>
|
||||
</SolidLabel>
|
||||
</Cell>
|
||||
</Table>
|
||||
|
||||
<att.TooltipControl>
|
||||
<CustomControl>
|
||||
<Bounds AlignmentToParent="left:5 top:5 right:5 bottom:5" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<SolidLabel Text-bind="ViewModel.Name" Color="#FFFFFF" Font-eval="containerControl.Font"/>
|
||||
</Bounds>
|
||||
</CustomControl>
|
||||
</att.TooltipControl>
|
||||
</CustomControl>
|
||||
</TextListItemTemplate>
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Instance name="DocumentEditorRibbonResource">
|
||||
<Instance ref.Class="demo::DocumentEditorRibbon" xmlns:demo="demo::*">
|
||||
<ref.Members>
|
||||
<![CDATA[
|
||||
@cpp:Private
|
||||
prop AlignLeftSelected : bool = true {}
|
||||
@cpp:Private
|
||||
prop AlignCenterSelected : bool = true {}
|
||||
@cpp:Private
|
||||
prop AlignRightSelected : bool = true {}
|
||||
@cpp:Private
|
||||
prop StyleGroups : demo::StyleGroup^[] = null {}
|
||||
|
||||
@cpp:Private
|
||||
func GenerateStyleGroups(): demo::StyleGroup^[]
|
||||
{
|
||||
var group1 = new StyleGroup^();
|
||||
group1.Name = "Headers";
|
||||
group1.Items.Add(new StyleItem^("Header 1", {size:2 relative:true}, (cast Color "#FF8000"), null, null, null, null));
|
||||
group1.Items.Add(new StyleItem^("Header 2", {size:1.6 relative:true}, (cast Color "#FF8000"), null, null, null, null));
|
||||
group1.Items.Add(new StyleItem^("Header 3", {size:1.3 relative:true}, null, null, null, null, null));
|
||||
|
||||
var group2 = new StyleGroup^();
|
||||
group2.Name = "Content";
|
||||
group2.Items.Add(new StyleItem^("Strong", null, null, true, null, null, null));
|
||||
group2.Items.Add(new StyleItem^("Quote", null, null, null, true, null, null));
|
||||
group2.Items.Add(new StyleItem^("Emphasis", null, null, null, true, true, null));
|
||||
group2.Items.Add(new StyleItem^("Intense Emphasis", null, (cast Color "#8080FF"), null, true, true, null));
|
||||
group2.Items.Add(new StyleItem^("Deleted", null, null, null, null, null, true));
|
||||
|
||||
var styles = document.Document.styles;
|
||||
for (styleItem in group1.Items)
|
||||
{
|
||||
styles.Set(styleItem.Name, styleItem.Style);
|
||||
}
|
||||
for (styleItem in group2.Items)
|
||||
{
|
||||
styles.Set(styleItem.Name, styleItem.Style);
|
||||
}
|
||||
|
||||
return {group1 group2};
|
||||
}
|
||||
|
||||
@cpp:Private
|
||||
func SelectStyleName(styleName : string?): void
|
||||
{
|
||||
if (styleName is not null)
|
||||
{
|
||||
for (groupIndex in range[0, StyleGroups.Count))
|
||||
{
|
||||
var group = StyleGroups[groupIndex];
|
||||
for (itemIndex in range[0, group.Items.Count))
|
||||
{
|
||||
if (group.Items[itemIndex].Name == cast string styleName)
|
||||
{
|
||||
styleGallery.SelectItem(styleGallery.GalleryPosToIndex({group:groupIndex item:itemIndex}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
styleGallery.SelectItem(-1);
|
||||
}
|
||||
]]>
|
||||
</ref.Members>
|
||||
<ref.Ctor>
|
||||
<![CDATA[
|
||||
{
|
||||
StyleGroups = GenerateStyleGroups();
|
||||
attach(document.SelectionChanged, func(sender: GuiGraphicsComposition*, arguments: GuiEventArgs*): void
|
||||
{
|
||||
SelectStyleName(document.SummarizeStyleName(document.CaretBegin, document.CaretEnd));
|
||||
});
|
||||
}
|
||||
]]>
|
||||
</ref.Ctor>
|
||||
<demo:DocumentEditorBase 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>
|
||||
<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 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>
|
||||
|
||||
<att.AfterHeaders-set>
|
||||
<Stack Direction="Horizontal" AlignmentToParent="left:0 top:-1 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<StackItem InternalMargin="left:0 top:0 right:10 bottom:0">
|
||||
<SolidLabel Font-bind="self.Font" Color="#FFFFFF" Text="Search:" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:1" PreferredMinSize="x:180"/>
|
||||
</SinglelineTextBox>
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</att.AfterHeaders-set>
|
||||
|
||||
<att.Pages>
|
||||
<RibbonTabPage Text="Edit">
|
||||
<att.ContainerComposition-set PreferredMinSize="y:110"/>
|
||||
<att.Groups>
|
||||
<RibbonGroup Text="Alignment" Expandable="true" LargeImage-uri="res://ToolbarImages/EditableLarge">
|
||||
<ev.ExpandButtonClicked-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
dialogMessage.ShowDialog();
|
||||
}
|
||||
]]>
|
||||
</ev.ExpandButtonClicked-eval>
|
||||
<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" LargeImage-uri="res://ToolbarImages/PasteLarge">
|
||||
<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>
|
||||
|
||||
<RibbonGroup Text="Icon Labels">
|
||||
<att.Items>
|
||||
<RibbonButtons MaxSize="Small" MinSize="Icon">
|
||||
<att.Buttons>
|
||||
<RibbonIconLabel Text="Left" Image-uri="res://ToolbarImages/TextAlignLeft">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
<RibbonIconLabel Text="Center" Image-uri="res://ToolbarImages/TextAlignCenter">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
<RibbonIconLabel Text="Right" Image-uri="res://ToolbarImages/TextAlignRight">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
</att.Buttons>
|
||||
</RibbonButtons>
|
||||
<RibbonSplitter/>
|
||||
<RibbonButtons MaxSize="Small" MinSize="Icon">
|
||||
<att.Buttons>
|
||||
<RibbonIconLabel Text="Left" Image-uri="res://ToolbarImages/TextAlignLeft">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
<RibbonIconLabel Text="Center" Image-uri="res://ToolbarImages/TextAlignCenter">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
<RibbonIconLabel Text="Right" Image-uri="res://ToolbarImages/TextAlignRight">
|
||||
<SinglelineTextBox>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0" PreferredMinSize="x:36"/>
|
||||
</SinglelineTextBox>
|
||||
</RibbonIconLabel>
|
||||
</att.Buttons>
|
||||
</RibbonButtons>
|
||||
</att.Items>
|
||||
</RibbonGroup>
|
||||
|
||||
<RibbonGroup Text="Style" LargeImage-uri="res://ToolbarImages/EditableLarge">
|
||||
<att.Items>
|
||||
<BindableRibbonGalleryList ref.Name="styleGallery" ItemTemplate="demo:StyleItemTemplate" MinCount="2" MaxCount="5" VisibleItemCount="5" env.ItemType="demo::StyleGroup^">
|
||||
<att.ItemSource-bind>self.StyleGroups</att.ItemSource-bind>
|
||||
<att.GroupTitleProperty>Name</att.GroupTitleProperty>
|
||||
<att.GroupChildrenProperty>Items</att.GroupChildrenProperty>
|
||||
|
||||
<att.SubMenu-set>
|
||||
<RibbonToolstripHeader Text="Header A"/>
|
||||
<MenuItemButton Text="Item A1"/>
|
||||
<MenuItemButton Text="Item A2"/>
|
||||
<MenuItemButton Text="Item A3"/>
|
||||
<RibbonToolstripHeader Text="Header B"/>
|
||||
<MenuItemButton Text="Item B1"/>
|
||||
<MenuItemButton Text="Item B2"/>
|
||||
<MenuItemButton Text="Item B3"/>
|
||||
</att.SubMenu-set>
|
||||
|
||||
<ev.ItemApplied-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
if (arguments.itemIndex != -1)
|
||||
{
|
||||
var pos = styleGallery.IndexToGalleryPos(arguments.itemIndex);
|
||||
self.document.ClearStyle(self.document.CaretBegin, self.document.CaretEnd);
|
||||
self.document.EditStyleName(self.document.CaretBegin, self.document.CaretEnd, self.StyleGroups[pos.group].Items[pos.item].Name);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</ev.ItemApplied-eval>
|
||||
</BindableRibbonGalleryList>
|
||||
</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:DocumentEditorBase>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
@@ -1,119 +0,0 @@
|
||||
<Folder>
|
||||
<Instance name="DocumentEditorToolstripResource">
|
||||
<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>
|
||||
<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:DocumentEditorBase>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
@@ -58,11 +58,11 @@
|
||||
</Instance>
|
||||
</Instance>
|
||||
|
||||
<Folder name="ToolbarImages" content="Link">ToolbarImages/Images.xml</Folder>
|
||||
<Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
|
||||
<Folder name="DocumentEditorBase" content="Link">DocumentEditorBase.xml</Folder>
|
||||
<Folder name="DocumentEditorRibbon" content="Link">DocumentEditorRibbon.xml</Folder>
|
||||
<Folder name="DocumentEditorToolstrip" content="Link">DocumentEditorToolstrip.xml</Folder>
|
||||
<Folder name="ToolbarImages" content="Link">../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/ToolbarImages/Images.xml</Folder>
|
||||
<Folder name="DocumentComponents" content="Link">../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentComponents.xml</Folder>
|
||||
<Folder name="DocumentEditorBase" content="Link">../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentEditorBase.xml</Folder>
|
||||
<Folder name="DocumentEditorRibbon" content="Link">../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentEditorRibbon.xml</Folder>
|
||||
<Folder name="DocumentEditorToolstrip" content="Link">../../../GacUI_ControlTemplate/BlackSkin/UI/FullControlTest/DocumentEditorToolstrip.xml</Folder>
|
||||
|
||||
<Instance name="DocumentEditorRibbonWindowResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::DocumentEditorRibbonWindow" xmlns:demo="demo::*">
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<Folder>
|
||||
<Image name="Undo" content="File">_Undo.png</Image>
|
||||
<Image name="Redo" content="File">_Redo.png</Image>
|
||||
<Image name="Copy" content="File">_Copy.png</Image>
|
||||
<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="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="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>
|
||||
<Image name="Underline" content="File">s_Underline.png</Image>
|
||||
<Image name="Strike" content="File">s_Strike.png</Image>
|
||||
<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>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 569 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 534 B |
|
Before Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 235 B |