mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-20 20:13:15 +08:00
Update GacUI_Controls\TextEditor demo
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
<ClCompile Include="Main.cpp" />
|
||||
<ClCompile Include="UI\Source\AboutWindow.cpp" />
|
||||
<ClCompile Include="UI\Source\DemoPartialClasses.cpp" />
|
||||
<ClCompile Include="UI\Source\FindWindow.cpp" />
|
||||
<ClCompile Include="UI\Source\MainWindow.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -91,13 +92,17 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\AboutWindow.xml" />
|
||||
<Xml Include="UI\FindWindow.xml" />
|
||||
<Xml Include="UI\Images\Folder.xml" />
|
||||
<Xml Include="UI\MainWindow.xml" />
|
||||
<Xml Include="UI\Resource.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\AboutWindow.h" />
|
||||
<ClInclude Include="UI\Source\Demo.h" />
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
||||
<ClInclude Include="UI\Source\FindWindow.h" />
|
||||
<ClInclude Include="UI\Source\MainWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<ClCompile Include="UI\Source\AboutWindow.cpp">
|
||||
<Filter>UI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UI\Source\FindWindow.cpp">
|
||||
<Filter>UI</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="UI\Resource.xml">
|
||||
@@ -41,6 +44,15 @@
|
||||
<Xml Include="UI\Images\Folder.xml">
|
||||
<Filter>Resource Files\Images</Filter>
|
||||
</Xml>
|
||||
<Xml Include="UI\AboutWindow.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
<Xml Include="UI\MainWindow.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
<Xml Include="UI\FindWindow.xml">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Xml>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="UI\Source\DemoPartialClasses.h">
|
||||
@@ -55,6 +67,9 @@
|
||||
<ClInclude Include="UI\Source\AboutWindow.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="UI\Source\FindWindow.h">
|
||||
<Filter>UI</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="UI\Images\EditCopy.png">
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Folder>
|
||||
<Image content="File">..\..\..\GacUI_Layout\RichTextEmbedding\UI\Gaclib.png</Image>
|
||||
<Doc name="Description">
|
||||
<Doc>
|
||||
<Content>
|
||||
<p align="Center">
|
||||
<div style="Title">
|
||||
<b>TextEditor by GacUI</b>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<div style="Body">
|
||||
<nop>Welcome to the demo!</nop>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<div style="Body">
|
||||
<b>Author: </b>Zihan Chen (vczh)<br/>
|
||||
<b>Website: </b><a href="http://www.gaclib.net">http://www.gaclib.net</a><br/>
|
||||
<b>Github: </b><a href="https://github.com/vczh-libraries/Release">https://github.com/vczh-libraries/Release</a><br/>
|
||||
</div>
|
||||
</p>
|
||||
</Content>
|
||||
<Styles>
|
||||
<Style name="Content">
|
||||
<face>Segoe UI</face>
|
||||
</Style>
|
||||
<Style name="Title" parent="Content">
|
||||
<size>24</size>
|
||||
<b>true</b>
|
||||
</Style>
|
||||
<Style name="Body" parent="Content">
|
||||
<size>14</size>
|
||||
</Style>
|
||||
</Styles>
|
||||
</Doc>
|
||||
</Doc>
|
||||
<Instance name="AboutWindowResource">
|
||||
<Instance ref.CodeBehind="true" ref.Class="demo::AboutWindow">
|
||||
<Window ref.Name="self" Text="About TextEditor" ClientSize="x:480 y:320" MaximizedBox="false" MinimizedBox="false" SizeBox="false">
|
||||
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:1" PreferredMinSize="x:320 y:128">
|
||||
<ImageFrameElement Stretch="true" Image-uri="res://AboutWindow/Gaclib.png"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:1">
|
||||
<DocumentLabel ref.Name="documentLabel" Document-uri="res://AboutWindow/Description">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.ActiveHyperlinkExecuted>documentLabel_ActiveHyperlinkExecuted</ev.ActiveHyperlinkExecuted>
|
||||
</DocumentLabel>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:2 column:0 columnSpan:3">
|
||||
<Button Text="Close" ev.Clicked-eval="self.Close();">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:-1 top:0 right:0 bottom:0" PreferredMinSize="x:100 y:30"/>
|
||||
</Button>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Window>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Instance ref.CodeBehind="true" ref.Class="demo::FindWindow">
|
||||
<Window ref.Name="self" Text="Find" ClientSize="x:240 y:100" MinimizedBox="false" MaximizedBox="false">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:240 y:100"/>
|
||||
</Window>
|
||||
</Instance>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Instance ref.CodeBehind="true" ref.Class="demo::MainWindow">
|
||||
<Window ref.Name="self" Text="TextEditor" ClientSize="x:480 y:320" ev.WindowClosing="window_Closing">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:480 y:320"/>
|
||||
|
||||
<ToolstripCommand ref.Name="commandFileNewText" Text="Text File" Image-uri="res://Images/NewText.png">
|
||||
<ev.Executed>commandFileNewText_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileNewXml" Text="Xml File" Image-uri="res://Images/NewXml.png">
|
||||
<ev.Executed>commandFileNewXml_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpen" Text="Open ..." Image-uri="res://Images/Open.png" ShortcutBuilder="Ctrl+O">
|
||||
<ev.Executed>commandFileOpen_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpenText" Text="Text File ..." Image-uri="res://Images/NewText.png">
|
||||
<ev.Executed>commandFileOpenText_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpenXml" Text="Xml File ..." Image-uri="res://Images/NewXml.png">
|
||||
<ev.Executed>commandFileOpenXml_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileSave" Text="Save" Image-uri="res://Images/Save.png" ShortcutBuilder="Ctrl+S">
|
||||
<ev.Executed>commandFileSave_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileSaveAs" Text="Save As ..." Image-uri="res://Images/SaveAs.png">
|
||||
<ev.Executed>commandFileSaveAs_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileExit" Text="Exit">
|
||||
<ev.Executed>commandFileExit_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<ToolstripCommand ref.Name="commandEditUndo" Text="Undo" Image-uri="res://Images/EditUndo.png" ShortcutBuilder="Ctrl+Z">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanUndo() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditUndo_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditRedo" Text="Redo" Image-uri="res://Images/EditRedo.png" ShortcutBuilder="Ctrl+Y">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanRedo() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditRedo_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditCut" Text="Cut" Image-uri="res://Images/EditCut.png" ShortcutBuilder="Ctrl+X">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanCut() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditCut_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditCopy" Text="Copy" Image-uri="res://Images/EditCopy.png" ShortcutBuilder="Ctrl+C">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanCopy() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditCopy_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditPaste" Text="Paste" Image-uri="res://Images/EditPaste.png" ShortcutBuilder="Ctrl+V">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanPaste() on self.ClipboardUpdated)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditPaste_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditDelete" Text="Delete" Image-uri="res://Images/EditDelete.png">
|
||||
<att.Enabled-bind>textBox.SelectionText != ''</att.Enabled-bind>
|
||||
<ev.Executed>commandEditDelete_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditSelect" Text="Select All" ShortcutBuilder="Ctrl+A">
|
||||
<ev.Executed>commandEditSelect_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditFind" Text="Find ..." Image-uri="res://Images/EditFind.png" ShortcutBuilder="Ctrl+F">
|
||||
<ev.Executed>commandEditFind_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<ToolstripCommand ref.Name="commandAbout" Text="About TextEditor ...">
|
||||
<ev.Executed>commandAbout_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<MessageDialog ref.Name="dialogQueryClose"
|
||||
Input="DisplayYesNoCancel"
|
||||
Icon="IconQuestion"
|
||||
Title-eval="self.Text"
|
||||
Text="Do you want to save this file?"
|
||||
/>
|
||||
|
||||
<MessageDialog ref.Name="dialogCannotOpen"
|
||||
Input="DisplayOK"
|
||||
Icon="IconError"
|
||||
Title-eval="self.Text"
|
||||
Text="Cannot open the selected file."
|
||||
/>
|
||||
|
||||
<MessageDialog ref.Name="dialogCannotSave"
|
||||
Input="DisplayOK"
|
||||
Icon="IconError"
|
||||
Title-eval="self.Text"
|
||||
Text="Cannot save the selected file."
|
||||
/>
|
||||
|
||||
<OpenFileDialog ref.Name="dialogOpen"
|
||||
Filter="Text Files (*.txt)|*.txt|XML Files (*.xml)|*.xml|All Files (*.*)|*.*"
|
||||
Title-eval="self.Text"
|
||||
DefaultExtension="txt"
|
||||
Options="FileDialogFileMustExist|FileDialogDereferenceLinks"
|
||||
/>
|
||||
|
||||
<SaveFileDialog ref.Name="dialogSave"
|
||||
Filter="Text Files (*.txt)|*.txt|XML Files (*.xml)|*.xml|All Files (*.*)|*.*"
|
||||
Title-eval="self.Text"
|
||||
DefaultExtension="txt"
|
||||
Options="FileDialogPromptCreateFile|FileDialogPromptOverwriteFile|FileDialogDirectoryMustExist|FileDialogAddToRecent"
|
||||
/>
|
||||
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<ToolstripMenuBar>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<MenuBarButton Text="File" Alt="F">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Text="New" Alt="N" Image-uri="res://Images/New.png">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileNewText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileNewXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuItemButton>
|
||||
<MenuItemButton Command-ref="commandFileOpen" Alt="O"/>
|
||||
<MenuItemButton Command-ref="commandFileSave" Alt="S"/>
|
||||
<MenuItemButton Command-ref="commandFileSaveAs" Alt="A"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandFileExit" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
<MenuBarButton Text="Edit" Alt="E">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandEditUndo" Alt="U"/>
|
||||
<MenuItemButton Command-ref="commandEditRedo" Alt="R"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditCut" Alt="X"/>
|
||||
<MenuItemButton Command-ref="commandEditCopy" Alt="C"/>
|
||||
<MenuItemButton Command-ref="commandEditPaste" Alt="V"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditDelete" Alt="D"/>
|
||||
<MenuItemButton Command-ref="commandEditSelect" Alt="A"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditFind" Alt="F"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
<MenuBarButton Text="Help" Alt="H">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandAbout" Alt="A"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
</ToolstripMenuBar>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0">
|
||||
<ToolstripToolBar>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ToolstripDropdownButton Image-uri="res://Images/New.png" Alt="N">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileNewText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileNewXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</ToolstripDropdownButton>
|
||||
<ToolstripSplitButton Command-ref="commandFileOpen" Alt="O">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileOpenText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileOpenXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</ToolstripSplitButton>
|
||||
<ToolstripButton Command-ref="commandFileSave" Alt="S"/>
|
||||
<ToolstripButton Command-ref="commandFileSaveAs" Alt="A"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditUndo" Alt="U"/>
|
||||
<ToolstripButton Command-ref="commandEditRedo" Alt="R"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditCut" Alt="X"/>
|
||||
<ToolstripButton Command-ref="commandEditCopy" Alt="C"/>
|
||||
<ToolstripButton Command-ref="commandEditPaste" Alt="V"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditDelete" Alt="D"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditFind" Alt="I"/>
|
||||
</ToolstripToolBar>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:2 column:0">
|
||||
<MultilineTextBox ref.Name="textBox" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
</MultilineTextBox>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Window>
|
||||
</Instance>
|
||||
@@ -13,271 +13,7 @@
|
||||
</Folder>
|
||||
</Folder>
|
||||
<Folder name="Images" content="Link">Images\Folder.xml</Folder>
|
||||
<Folder name="AboutWindow">
|
||||
<Image content="File">..\..\..\GacUI_Layout\RichTextEmbedding\UI\Gaclib.png</Image>
|
||||
<Doc name="Description">
|
||||
<Doc>
|
||||
<Content>
|
||||
<p align="Center">
|
||||
<div style="Title">
|
||||
<b>TextEditor by GacUI</b>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<div style="Body">
|
||||
<nop>Welcome to the demo!</nop>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<div style="Body">
|
||||
<b>Author: </b>Zihan Chen (vczh)<br/>
|
||||
<b>Website: </b><a href="http://www.gaclib.net">http://www.gaclib.net</a><br/>
|
||||
<b>Github: </b><a href="https://github.com/vczh-libraries/Release">https://github.com/vczh-libraries/Release</a><br/>
|
||||
</div>
|
||||
</p>
|
||||
</Content>
|
||||
<Styles>
|
||||
<Style name="Content">
|
||||
<face>Segoe UI</face>
|
||||
</Style>
|
||||
<Style name="Title" parent="Content">
|
||||
<size>24</size>
|
||||
<b>true</b>
|
||||
</Style>
|
||||
<Style name="Body" parent="Content">
|
||||
<size>14</size>
|
||||
</Style>
|
||||
</Styles>
|
||||
</Doc>
|
||||
</Doc>
|
||||
<Instance name="AboutWindowResource">
|
||||
<Instance ref.CodeBehind="true" ref.Class="demo::AboutWindow">
|
||||
<Window ref.Name="self" Text="About TextEditor" ClientSize="x:480 y:320" MaximizedBox="false" MinimizedBox="false" SizeBox="false">
|
||||
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:1" PreferredMinSize="x:320 y:128">
|
||||
<ImageFrameElement Stretch="true" Image-uri="res://AboutWindow/Gaclib.png"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:1">
|
||||
<DocumentLabel ref.Name="documentLabel" Document-uri="res://AboutWindow/Description">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ev.ActiveHyperlinkExecuted>documentLabel_ActiveHyperlinkExecuted</ev.ActiveHyperlinkExecuted>
|
||||
</DocumentLabel>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:2 column:0 columnSpan:3">
|
||||
<Button Text="Close" ev.Clicked-eval="self.Close();">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:-1 top:0 right:0 bottom:0" PreferredMinSize="x:100 y:30"/>
|
||||
</Button>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Window>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
<Folder name="MainWindow">
|
||||
<Instance name="MainWindowResource">
|
||||
<Instance ref.CodeBehind="true" ref.Class="demo::MainWindow">
|
||||
<Window ref.Name="self" Text="TextEditor" ClientSize="x:480 y:320" ev.WindowClosing="window_Closing">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:480 y:320"/>
|
||||
|
||||
<ToolstripCommand ref.Name="commandFileNewText" Text="Text File" Image-uri="res://Images/NewText.png">
|
||||
<ev.Executed>commandFileNewText_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileNewXml" Text="Xml File" Image-uri="res://Images/NewXml.png">
|
||||
<ev.Executed>commandFileNewXml_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpen" Text="Open ..." Image-uri="res://Images/Open.png" ShortcutBuilder="Ctrl+O">
|
||||
<ev.Executed>commandFileOpen_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpenText" Text="Text File ..." Image-uri="res://Images/NewText.png">
|
||||
<ev.Executed>commandFileOpenText_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileOpenXml" Text="Xml File ..." Image-uri="res://Images/NewXml.png">
|
||||
<ev.Executed>commandFileOpenXml_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileSave" Text="Save" Image-uri="res://Images/Save.png" ShortcutBuilder="Ctrl+S">
|
||||
<ev.Executed>commandFileSave_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileSaveAs" Text="Save As ..." Image-uri="res://Images/SaveAs.png">
|
||||
<ev.Executed>commandFileSaveAs_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandFileExit" Text="Exit">
|
||||
<ev.Executed>commandFileExit_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<ToolstripCommand ref.Name="commandEditUndo" Text="Undo" Image-uri="res://Images/EditUndo.png" ShortcutBuilder="Ctrl+Z">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanUndo() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditUndo_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditRedo" Text="Redo" Image-uri="res://Images/EditRedo.png" ShortcutBuilder="Ctrl+Y">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanRedo() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditRedo_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditCut" Text="Cut" Image-uri="res://Images/EditCut.png" ShortcutBuilder="Ctrl+X">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanCut() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditCut_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditCopy" Text="Copy" Image-uri="res://Images/EditCopy.png" ShortcutBuilder="Ctrl+C">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanCopy() on _.SelectionChanged)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditCopy_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditPaste" Text="Paste" Image-uri="res://Images/EditPaste.png" ShortcutBuilder="Ctrl+V">
|
||||
<att.Enabled-bind>textBox.observe as _(_.CanPaste() on self.ClipboardUpdated)</att.Enabled-bind>
|
||||
<ev.Executed>commandEditPaste_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditDelete" Text="Delete" Image-uri="res://Images/EditDelete.png">
|
||||
<att.Enabled-bind>textBox.SelectionText != ''</att.Enabled-bind>
|
||||
<ev.Executed>commandEditDelete_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditSelect" Text="Select All" ShortcutBuilder="Ctrl+A">
|
||||
<ev.Executed>commandEditSelect_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
<ToolstripCommand ref.Name="commandEditFind" Text="Find ..." Image-uri="res://Images/EditFind.png" ShortcutBuilder="Ctrl+F">
|
||||
<ev.Executed>commandEditFind_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<ToolstripCommand ref.Name="commandAbout" Text="About TextEditor ...">
|
||||
<ev.Executed>commandAbout_Executed</ev.Executed>
|
||||
</ToolstripCommand>
|
||||
|
||||
<MessageDialog ref.Name="dialogQueryClose"
|
||||
Input="DisplayYesNoCancel"
|
||||
Icon="IconQuestion"
|
||||
Title-eval="self.Text"
|
||||
Text="Do you want to save this file?"
|
||||
/>
|
||||
|
||||
<MessageDialog ref.Name="dialogCannotOpen"
|
||||
Input="DisplayOK"
|
||||
Icon="IconError"
|
||||
Title-eval="self.Text"
|
||||
Text="Cannot open the selected file."
|
||||
/>
|
||||
|
||||
<MessageDialog ref.Name="dialogCannotSave"
|
||||
Input="DisplayOK"
|
||||
Icon="IconError"
|
||||
Title-eval="self.Text"
|
||||
Text="Cannot save the selected file."
|
||||
/>
|
||||
|
||||
<OpenFileDialog ref.Name="dialogOpen"
|
||||
Filter="Text Files (*.txt)|*.txt|XML Files (*.xml)|*.xml|All Files (*.*)|*.*"
|
||||
Title-eval="self.Text"
|
||||
DefaultExtension="txt"
|
||||
Options="FileDialogFileMustExist|FileDialogDereferenceLinks"
|
||||
/>
|
||||
|
||||
<SaveFileDialog ref.Name="dialogSave"
|
||||
Filter="Text Files (*.txt)|*.txt|XML Files (*.xml)|*.xml|All Files (*.*)|*.*"
|
||||
Title-eval="self.Text"
|
||||
DefaultExtension="txt"
|
||||
Options="FileDialogPromptCreateFile|FileDialogPromptOverwriteFile|FileDialogDirectoryMustExist|FileDialogAddToRecent"
|
||||
/>
|
||||
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" MinSizeLimitation="LimitToElementAndChildren">
|
||||
<att.Rows>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:MinSize</CellOption>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<ToolstripMenuBar>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<MenuBarButton Text="File" Alt="F">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Text="New" Alt="N" Image-uri="res://Images/New.png">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileNewText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileNewXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuItemButton>
|
||||
<MenuItemButton Command-ref="commandFileOpen" Alt="O"/>
|
||||
<MenuItemButton Command-ref="commandFileSave" Alt="S"/>
|
||||
<MenuItemButton Command-ref="commandFileSaveAs" Alt="A"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandFileExit" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
<MenuBarButton Text="Edit" Alt="E">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandEditUndo" Alt="U"/>
|
||||
<MenuItemButton Command-ref="commandEditRedo" Alt="R"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditCut" Alt="X"/>
|
||||
<MenuItemButton Command-ref="commandEditCopy" Alt="C"/>
|
||||
<MenuItemButton Command-ref="commandEditPaste" Alt="V"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditDelete" Alt="D"/>
|
||||
<MenuItemButton Command-ref="commandEditSelect" Alt="A"/>
|
||||
<MenuSplitter/>
|
||||
<MenuItemButton Command-ref="commandEditFind" Alt="F"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
<MenuBarButton Text="Help" Alt="H">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandAbout" Alt="A"/>
|
||||
</att.SubMenu-set>
|
||||
</MenuBarButton>
|
||||
</ToolstripMenuBar>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0">
|
||||
<ToolstripToolBar>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<ToolstripDropdownButton Image-uri="res://Images/New.png" Alt="N">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileNewText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileNewXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</ToolstripDropdownButton>
|
||||
<ToolstripSplitButton Command-ref="commandFileOpen" Alt="O">
|
||||
<att.SubMenu-set>
|
||||
<MenuItemButton Command-ref="commandFileOpenText" Alt="T"/>
|
||||
<MenuItemButton Command-ref="commandFileOpenXml" Alt="X"/>
|
||||
</att.SubMenu-set>
|
||||
</ToolstripSplitButton>
|
||||
<ToolstripButton Command-ref="commandFileSave" Alt="S"/>
|
||||
<ToolstripButton Command-ref="commandFileSaveAs" Alt="A"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditUndo" Alt="U"/>
|
||||
<ToolstripButton Command-ref="commandEditRedo" Alt="R"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditCut" Alt="X"/>
|
||||
<ToolstripButton Command-ref="commandEditCopy" Alt="C"/>
|
||||
<ToolstripButton Command-ref="commandEditPaste" Alt="V"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditDelete" Alt="D"/>
|
||||
<ToolstripSplitter/>
|
||||
<ToolstripButton Command-ref="commandEditFind" Alt="I"/>
|
||||
</ToolstripToolBar>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:2 column:0">
|
||||
<MultilineTextBox ref.Name="textBox" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
</MultilineTextBox>
|
||||
</Cell>
|
||||
</Table>
|
||||
</Window>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
<Folder name="AboutWindow" content="Link">AboutWindow.xml</Folder>
|
||||
<Instance name="FindWindowResource" content="File">FindWindow.xml</Instance>
|
||||
<Instance name="MainWindowResource" content="File">MainWindow.xml</Instance>
|
||||
</Resource>
|
||||
@@ -13,6 +13,7 @@ DO NOT MODIFY
|
||||
|
||||
#include "DemoPartialClasses.h"
|
||||
#include "AboutWindow.h"
|
||||
#include "FindWindow.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace vl
|
||||
{
|
||||
#define _ ,
|
||||
IMPL_CPP_TYPE_INFO(demo::AboutWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::FindWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::AboutWindow)
|
||||
@@ -27,6 +28,11 @@ namespace vl
|
||||
CLASS_MEMBER_GUIEVENT_HANDLER(documentLabel_ActiveHyperlinkExecuted, vl::presentation::compositions::GuiEventArgs)
|
||||
END_CLASS_MEMBER(demo::AboutWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::FindWindow)
|
||||
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::FindWindow*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(demo::FindWindow)
|
||||
|
||||
BEGIN_CLASS_MEMBER(demo::MainWindow)
|
||||
CLASS_MEMBER_BASE(vl::presentation::controls::GuiWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(demo::MainWindow*(), NO_PARAMETER)
|
||||
@@ -59,6 +65,7 @@ namespace vl
|
||||
void Load(ITypeManager* manager)
|
||||
{
|
||||
ADD_TYPE_INFO(demo::AboutWindow)
|
||||
ADD_TYPE_INFO(demo::FindWindow)
|
||||
ADD_TYPE_INFO(demo::MainWindow)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ DO NOT MODIFY
|
||||
namespace demo
|
||||
{
|
||||
class AboutWindow;
|
||||
class FindWindow;
|
||||
class MainWindow;
|
||||
|
||||
template<typename TImpl>
|
||||
@@ -48,6 +49,33 @@ namespace demo
|
||||
}
|
||||
};
|
||||
|
||||
template<typename TImpl>
|
||||
class FindWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
{
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||
private:
|
||||
protected:
|
||||
vl::presentation::controls::GuiWindow* self;
|
||||
|
||||
void InitializeComponents()
|
||||
{
|
||||
if (InitializeFromResource())
|
||||
{
|
||||
GUI_INSTANCE_REFERENCE(self);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
public:
|
||||
FindWindow_()
|
||||
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::FindWindow")
|
||||
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||
,self(0)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename TImpl>
|
||||
class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>, public vl::reflection::Description<TImpl>
|
||||
{
|
||||
@@ -152,6 +180,7 @@ namespace vl
|
||||
namespace description
|
||||
{
|
||||
DECL_TYPE_INFO(demo::AboutWindow)
|
||||
DECL_TYPE_INFO(demo::FindWindow)
|
||||
DECL_TYPE_INFO(demo::MainWindow)
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::FindWindow
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
***********************************************************************/
|
||||
|
||||
#include "Demo.h"
|
||||
|
||||
namespace demo
|
||||
{
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
|
||||
FindWindow::FindWindow()
|
||||
{
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
FindWindow::~FindWindow()
|
||||
{
|
||||
ClearSubscriptions();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/***********************************************************************
|
||||
Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI::FindWindow
|
||||
|
||||
This file is generated by: Vczh GacUI Resource Code Generator
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_FindWindow
|
||||
#define VCZH_GACUI_RESOURCE_CODE_GENERATOR_Demo_FindWindow
|
||||
|
||||
#include "DemoPartialClasses.h"
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class FindWindow : public demo::FindWindow_<demo::FindWindow>
|
||||
{
|
||||
friend class demo::FindWindow_<demo::FindWindow>;
|
||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<demo::FindWindow>;
|
||||
protected:
|
||||
|
||||
// #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.)
|
||||
// #endregion CLASS_MEMBER_GUIEVENT_HANDLER
|
||||
public:
|
||||
FindWindow();
|
||||
~FindWindow();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Binary file not shown.
+2
-1
@@ -16,7 +16,6 @@ GacUI tutorials and the plan
|
||||
* **RichTextEmbedding**: Document layout, that placing controls in a rich text document.
|
||||
* GacUI_Controls
|
||||
* **ContainersAndButtons**: Using container controls and button controls.
|
||||
* **Toolstrip**: Using menus, context menus and toolbars. (developing)
|
||||
* **TextList**: Using text list control with direct assign, data binding and item template. (developing)
|
||||
* **ListView**: Using list view control with direct assign, data binding and item template. (developing)
|
||||
* **TreeView**: Using tree view control with direct assign, data binding and item template. (developing)
|
||||
@@ -26,6 +25,8 @@ GacUI tutorials and the plan
|
||||
* **Misc**: Using other controls. (developing)
|
||||
* GacUI_ControlTemplate
|
||||
* **BlackSkin**:
|
||||
* **Windows7Skin**:
|
||||
* **Windows8Skin**:
|
||||
* GacUI_XmlResource
|
||||
* **MultipleWindow**
|
||||
* **CustomControl**
|
||||
|
||||
Reference in New Issue
Block a user