diff --git a/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj b/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj index 05580e99..3cfb5049 100644 --- a/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj +++ b/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj @@ -83,6 +83,7 @@ + @@ -91,13 +92,17 @@ + + + + diff --git a/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj.filters b/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj.filters index 4a3672fa..e7303402 100644 --- a/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj.filters +++ b/Tutorial/GacUI_Controls/TextEditor/TextEditor.vcxproj.filters @@ -33,6 +33,9 @@ UI + + UI + @@ -41,6 +44,15 @@ Resource Files\Images + + Resource Files + + + Resource Files + + + Resource Files + @@ -55,6 +67,9 @@ UI + + UI + diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/AboutWindow.xml b/Tutorial/GacUI_Controls/TextEditor/UI/AboutWindow.xml new file mode 100644 index 00000000..c9a64554 --- /dev/null +++ b/Tutorial/GacUI_Controls/TextEditor/UI/AboutWindow.xml @@ -0,0 +1,75 @@ + + + ..\..\..\GacUI_Layout\RichTextEmbedding\UI\Gaclib.png + + + +

+

+ TextEditor by GacUI +
+

+

+

+ Welcome to the demo! +
+

+

+

+ Author: Zihan Chen (vczh)
+ Website: http://www.gaclib.net
+ Github: https://github.com/vczh-libraries/Release
+
+

+
+ + + + + +
+
+ + + + + + + composeType:MinSize + composeType:Percentage percentage:1.0 + composeType:MinSize + + + composeType:Percentage percentage:1.0 + composeType:MinSize + composeType:Percentage percentage:1.0 + + + + + + + + + + documentLabel_ActiveHyperlinkExecuted + + + + + + +
+
+
+
+
\ No newline at end of file diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/FindWindow.xml b/Tutorial/GacUI_Controls/TextEditor/UI/FindWindow.xml new file mode 100644 index 00000000..b5017033 --- /dev/null +++ b/Tutorial/GacUI_Controls/TextEditor/UI/FindWindow.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/MainWindow.xml b/Tutorial/GacUI_Controls/TextEditor/UI/MainWindow.xml new file mode 100644 index 00000000..1ba8e5ec --- /dev/null +++ b/Tutorial/GacUI_Controls/TextEditor/UI/MainWindow.xml @@ -0,0 +1,190 @@ + + + + + + + commandFileNewText_Executed + + + commandFileNewXml_Executed + + + commandFileOpen_Executed + + + commandFileOpenText_Executed + + + commandFileOpenXml_Executed + + + commandFileSave_Executed + + + commandFileSaveAs_Executed + + + commandFileExit_Executed + + + + textBox.observe as _(_.CanUndo() on _.SelectionChanged) + commandEditUndo_Executed + + + textBox.observe as _(_.CanRedo() on _.SelectionChanged) + commandEditRedo_Executed + + + textBox.observe as _(_.CanCut() on _.SelectionChanged) + commandEditCut_Executed + + + textBox.observe as _(_.CanCopy() on _.SelectionChanged) + commandEditCopy_Executed + + + textBox.observe as _(_.CanPaste() on self.ClipboardUpdated) + commandEditPaste_Executed + + + textBox.SelectionText != '' + commandEditDelete_Executed + + + commandEditSelect_Executed + + + commandEditFind_Executed + + + + commandAbout_Executed + + + + + + + + + + + + + + + composeType:MinSize + composeType:MinSize + composeType:Percentage percentage:1.0 + + + composeType:Percentage percentage:1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Resource.xml b/Tutorial/GacUI_Controls/TextEditor/UI/Resource.xml index 5e291049..57ca700a 100644 --- a/Tutorial/GacUI_Controls/TextEditor/UI/Resource.xml +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Resource.xml @@ -13,271 +13,7 @@ Images\Folder.xml - - ..\..\..\GacUI_Layout\RichTextEmbedding\UI\Gaclib.png - - - -

-

- TextEditor by GacUI -
-

-

-

- Welcome to the demo! -
-

-

-

- Author: Zihan Chen (vczh)
- Website: http://www.gaclib.net
- Github: https://github.com/vczh-libraries/Release
-
-

-
- - - - - -
-
- - - - - - - composeType:MinSize - composeType:Percentage percentage:1.0 - composeType:MinSize - - - composeType:Percentage percentage:1.0 - composeType:MinSize - composeType:Percentage percentage:1.0 - - - - - - - - - - documentLabel_ActiveHyperlinkExecuted - - - - - - -
-
-
-
-
- - - - - - - - commandFileNewText_Executed - - - commandFileNewXml_Executed - - - commandFileOpen_Executed - - - commandFileOpenText_Executed - - - commandFileOpenXml_Executed - - - commandFileSave_Executed - - - commandFileSaveAs_Executed - - - commandFileExit_Executed - - - - textBox.observe as _(_.CanUndo() on _.SelectionChanged) - commandEditUndo_Executed - - - textBox.observe as _(_.CanRedo() on _.SelectionChanged) - commandEditRedo_Executed - - - textBox.observe as _(_.CanCut() on _.SelectionChanged) - commandEditCut_Executed - - - textBox.observe as _(_.CanCopy() on _.SelectionChanged) - commandEditCopy_Executed - - - textBox.observe as _(_.CanPaste() on self.ClipboardUpdated) - commandEditPaste_Executed - - - textBox.SelectionText != '' - commandEditDelete_Executed - - - commandEditSelect_Executed - - - commandEditFind_Executed - - - - commandAbout_Executed - - - - - - - - - - - - - - - composeType:MinSize - composeType:MinSize - composeType:Percentage percentage:1.0 - - - composeType:Percentage percentage:1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
+ AboutWindow.xml + FindWindow.xml + MainWindow.xml \ No newline at end of file diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Source/Demo.h b/Tutorial/GacUI_Controls/TextEditor/UI/Source/Demo.h index d04c57f0..014ea2c2 100644 --- a/Tutorial/GacUI_Controls/TextEditor/UI/Source/Demo.h +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Source/Demo.h @@ -13,6 +13,7 @@ DO NOT MODIFY #include "DemoPartialClasses.h" #include "AboutWindow.h" +#include "FindWindow.h" #include "MainWindow.h" #endif diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.cpp index c94f127a..6cc9f982 100644 --- a/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.cpp @@ -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) } diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.h b/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.h index 89de8c18..c11b9563 100644 --- a/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.h +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Source/DemoPartialClasses.h @@ -16,6 +16,7 @@ DO NOT MODIFY namespace demo { class AboutWindow; + class FindWindow; class MainWindow; template @@ -48,6 +49,33 @@ namespace demo } }; + template + class FindWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description + { + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + private: + protected: + vl::presentation::controls::GuiWindow* self; + + void InitializeComponents() + { + if (InitializeFromResource()) + { + GUI_INSTANCE_REFERENCE(self); + } + else + { + } + } + public: + FindWindow_() + :vl::presentation::GuiInstancePartialClass(L"demo::FindWindow") + ,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle()) + ,self(0) + { + } + }; + template class MainWindow_ : public vl::presentation::controls::GuiWindow, public vl::presentation::GuiInstancePartialClass, public vl::reflection::Description { @@ -152,6 +180,7 @@ namespace vl namespace description { DECL_TYPE_INFO(demo::AboutWindow) + DECL_TYPE_INFO(demo::FindWindow) DECL_TYPE_INFO(demo::MainWindow) } diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.cpp b/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.cpp new file mode 100644 index 00000000..78793a4a --- /dev/null +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.cpp @@ -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(); + } +} + diff --git a/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.h b/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.h new file mode 100644 index 00000000..c9413f53 --- /dev/null +++ b/Tutorial/GacUI_Controls/TextEditor/UI/Source/FindWindow.h @@ -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_ + { + friend class demo::FindWindow_; + friend struct vl::reflection::description::CustomTypeDescriptorSelector; + protected: + + // #region CLASS_MEMBER_GUIEVENT_HANDLER (DO NOT PUT OTHER CONTENT IN THIS #region.) + // #endregion CLASS_MEMBER_GUIEVENT_HANDLER + public: + FindWindow(); + ~FindWindow(); + }; +} + +#endif diff --git a/Tutorial/GacUI_Controls/UIRes/TextEditor.bin b/Tutorial/GacUI_Controls/UIRes/TextEditor.bin index 6417dd4f..127ae1e0 100644 Binary files a/Tutorial/GacUI_Controls/UIRes/TextEditor.bin and b/Tutorial/GacUI_Controls/UIRes/TextEditor.bin differ diff --git a/Tutorial/README.md b/Tutorial/README.md index cd8b57aa..60e753fa 100644 --- a/Tutorial/README.md +++ b/Tutorial/README.md @@ -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**