This commit is contained in:
vczh
2025-09-08 01:16:00 -07:00
parent 912a3bb6ad
commit d16bc16f2e
8 changed files with 2103 additions and 9655 deletions
-1
View File
@@ -170,7 +170,6 @@ if (WORKFLOW_COMPILER)
endif()
if (GACUI_CORE)
install(FILES VlppParser.h DESTINATION include)
install(FILES GacUI.h DESTINATION include)
install(FILES GacUI.UnitTest.h DESTINATION include)
install(FILES GacUI.UnitTest.UI.h DESTINATION include)
+4 -4
View File
@@ -1573,7 +1573,7 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::vl::__vwsn::This(this->__vwsn_precompile_27)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_27)->SetReadonly(true);
::vl::__vwsn::This(this->__vwsn_precompile_27)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
}
(this->__vwsn_precompile_28 = ::vl::__vwsn::This(this->__vwsn_precompile_27)->GetBoundsComposition());
{
@@ -1602,7 +1602,7 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::vl::__vwsn::This(this->__vwsn_precompile_30)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_30)->SetReadonly(true);
::vl::__vwsn::This(this->__vwsn_precompile_30)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
}
(this->__vwsn_precompile_31 = ::vl::__vwsn::This(this->__vwsn_precompile_30)->GetBoundsComposition());
{
@@ -1654,7 +1654,7 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::vl::__vwsn::This(this->__vwsn_precompile_33)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_33)->SetReadonly(true);
::vl::__vwsn::This(this->__vwsn_precompile_33)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
}
(this->__vwsn_precompile_34 = ::vl::__vwsn::This(this->__vwsn_precompile_33)->GetBoundsComposition());
{
@@ -1683,7 +1683,7 @@ Class (::gaclib_controls::UnitTestSnapshotViewerWindowConstructor)
::vl::__vwsn::This(this->__vwsn_precompile_36)->SetVerticalAlwaysVisible(false);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_36)->SetReadonly(true);
::vl::__vwsn::This(this->__vwsn_precompile_36)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
}
(this->__vwsn_precompile_37 = ::vl::__vwsn::This(this->__vwsn_precompile_36)->GetBoundsComposition());
{
File diff suppressed because it is too large Load Diff
+15 -164
View File
@@ -195,8 +195,6 @@ Functionality
public:
virtual Direct2DTextFormatPackage* CreateDirect2DTextFormat(const FontProperties& fontProperties)=0;
virtual void DestroyDirect2DTextFormat(const FontProperties& fontProperties)=0;
virtual Ptr<elements::text::CharMeasurer> CreateDirect2DCharMeasurer(const FontProperties& fontProperties)=0;
virtual void DestroyDirect2DCharMeasurer(const FontProperties& fontProperties)=0;
};
extern IWindowsDirect2DResourceManager* GetWindowsDirect2DResourceManager();
@@ -503,85 +501,6 @@ Renderers
#endif
/***********************************************************************
.\DIRECT2D\RENDERERS\GUIGRAPHICSTEXTRENDERERSWINDOWSDIRECT2D.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::Native Window::Direct2D Provider for Windows Implementation::Renderer
Interfaces:
***********************************************************************/
#ifndef VCZH_PRESENTATION_ELEMENTS_GUIGRAPHICSTEXTRENDERERSWINDOWSDIRECT2D
#define VCZH_PRESENTATION_ELEMENTS_GUIGRAPHICSTEXTRENDERERSWINDOWSDIRECT2D
namespace vl
{
namespace presentation
{
namespace elements_windows_d2d
{
/***********************************************************************
Renderers
***********************************************************************/
class GuiColorizedTextElementRenderer : public GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget>, protected GuiColorizedTextElement::ICallback
{
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget>;
public:
struct ColorItemResource
{
Color text;
ID2D1SolidColorBrush* textBrush;
Color background;
ID2D1SolidColorBrush* backgroundBrush;
};
struct ColorEntryResource
{
ColorItemResource normal;
ColorItemResource selectedFocused;
ColorItemResource selectedUnfocused;
std::partial_ordering operator<=>(const ColorEntryResource&) const { return std::partial_ordering::unordered; }
bool operator==(const ColorEntryResource& value) const { return false; }
};
typedef collections::Array<ColorEntryResource> ColorArray;
protected:
FontProperties oldFont;
Direct2DTextFormatPackage* textFormat;
ColorArray colors;
Color oldCaretColor;
ID2D1SolidColorBrush* caretBrush;
void CreateTextBrush(IWindowsDirect2DRenderTarget* _renderTarget);
void DestroyTextBrush(IWindowsDirect2DRenderTarget* _renderTarget);
void CreateCaretBrush(IWindowsDirect2DRenderTarget* _renderTarget);
void DestroyCaretBrush(IWindowsDirect2DRenderTarget* _renderTarget);
void ColorChanged();
void FontChanged();
text::CharMeasurer* GetCharMeasurer();
void InitializeInternal();
void FinalizeInternal();
void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget);
public:
void Render(Rect bounds)override;
void OnElementStateChanged()override;
};
}
}
}
#endif
/***********************************************************************
.\GDI\WINGDI.H
***********************************************************************/
@@ -1265,10 +1184,6 @@ UniscribeRun
virtual void Render(IRendererCallback* callback, vint fragmentBoundsIndex, vint offsetX, vint offsetY, bool renderBackground)=0;
};
/***********************************************************************
UniscribeTextRun
***********************************************************************/
class UniscribeTextRun : public UniscribeRun
{
public:
@@ -1293,10 +1208,6 @@ UniscribeTextRun
void Render(IRendererCallback* callback, vint fragmentBoundsIndex, vint offsetX, vint offsetY, bool renderBackground)override;
};
/***********************************************************************
UniscribeElementRun
***********************************************************************/
class UniscribeEmbeddedObjectRun : public UniscribeRun
{
public:
@@ -1337,6 +1248,21 @@ UniscribeVirtualLine
/***********************************************************************
UniscribeLine
Styles and embedded objects cut the whole line into multiple UniscribeFragment
Uniscribe cut the whole line into multiple UniscribeItem
Both of them making multiple UniscribeRun
Any UniscribeTextRun will not cross multiple UniscribeFragment or UniscribeItem
Any UniscribeEmbeddedObjectRun will be exactly one UniscribeFragment
During layout given wrapLine/availableWidth/alignment
Multiple UniscribeVirtualLine will be created
One UniscribeTextRun may cross multiple UniscribeVirtualLine when a long word is broken into lines
UniscribeEmbeddedObjectRun will not cross multiple UniscribeVirtualLine
In UniscribeTextRun, wchar_t and glyph are in multiple-to-multiple relationship
After generating glyphs, which are things to render, layout is performed on glyphs
UniscribeEmbeddedObjectRun will be treated as a single glyph
***********************************************************************/
class UniscribeLine : public Object
@@ -1515,8 +1441,6 @@ Functionality
virtual void DestroyGdiBrush(Color color)=0;
virtual Ptr<windows::WinFont> CreateGdiFont(const FontProperties& fontProperties)=0;
virtual void DestroyGdiFont(const FontProperties& fontProperties)=0;
virtual Ptr<elements::text::CharMeasurer> CreateCharMeasurer(const FontProperties& fontProperties)=0;
virtual void DestroyCharMeasurer(const FontProperties& fontProperties)=0;
virtual Ptr<windows::WinBitmap> GetBitmap(INativeImageFrame* frame, bool enabled)=0;
virtual void DestroyBitmapCache(INativeImageFrame* frame)=0;
@@ -1765,79 +1689,6 @@ Renderers
#endif
/***********************************************************************
.\GDI\RENDERERS\GUIGRAPHICSTEXTRENDERERSWINDOWSGDI.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
GacUI::Native Window::GDI Provider for Windows Implementation::Renderer
Interfaces:
***********************************************************************/
#ifndef VCZH_PRESENTATION_ELEMENTS_GUIGRAPHICSTEXTRENDERERSWINDOWSGDI
#define VCZH_PRESENTATION_ELEMENTS_GUIGRAPHICSTEXTRENDERERSWINDOWSGDI
namespace vl
{
namespace presentation
{
namespace elements_windows_gdi
{
/***********************************************************************
Renderers
***********************************************************************/
class GuiColorizedTextElementRenderer : public GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget>, protected GuiColorizedTextElement::ICallback
{
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget>;
public:
struct ColorItemResource
{
Color text;
Color background;
Ptr<windows::WinBrush> backgroundBrush;
};
struct ColorEntryResource
{
ColorItemResource normal;
ColorItemResource selectedFocused;
ColorItemResource selectedUnfocused;
std::partial_ordering operator<=>(const ColorEntryResource&) const { return std::partial_ordering::unordered; }
bool operator==(const ColorEntryResource& value){return false;}
};
typedef collections::Array<ColorEntryResource> ColorArray;
protected:
FontProperties oldFont;
Ptr<windows::WinFont> font;
ColorArray colors;
Color oldCaretColor;
Ptr<windows::WinPen> caretPen;
void DestroyColors();
void ColorChanged();
void FontChanged();
void InitializeInternal();
void FinalizeInternal();
void RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget);
public:
void Render(Rect bounds)override;
void OnElementStateChanged()override;
};
}
}
}
#endif
/***********************************************************************
.\SERVICESIMPL\WINDOWSCLIPBOARDSERVICE.H
***********************************************************************/
+964 -5697
View File
File diff suppressed because it is too large Load Diff
+1109 -3065
View File
File diff suppressed because it is too large Load Diff
+5 -100
View File
@@ -1662,7 +1662,6 @@ namespace vl
using namespace presentation::controls;
using namespace presentation::controls::list;
using namespace presentation::controls::tree;
using namespace presentation::elements::text;
using namespace presentation::theme;
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
@@ -3023,57 +3022,16 @@ Type Declaration (Class)
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(GuiDocumentLabel, const GuiDocumentConfig&, config)
END_CLASS_MEMBER(GuiDocumentLabel)
BEGIN_CLASS_MEMBER(GuiTextBoxCommonInterface)
CLASS_MEMBER_GUIEVENT(SelectionChanged)
CLASS_MEMBER_GUIEVENT(UndoRedoChanged)
CLASS_MEMBER_PROPERTY_FAST(Readonly)
CLASS_MEMBER_PROPERTY_EVENT_FAST(SelectionText, SelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(CaretBegin, SelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(CaretEnd, SelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(CaretSmall, SelectionChanged)
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(CaretLarge, SelectionChanged)
CLASS_MEMBER_PROPERTY_READONLY_FAST(RowCount)
CLASS_MEMBER_PROPERTY_READONLY_FAST(RowHeight)
CLASS_MEMBER_PROPERTY_READONLY_FAST(MaxWidth)
CLASS_MEMBER_PROPERTY_READONLY_FAST(MaxHeight)
CLASS_MEMBER_PROPERTY_READONLY_FAST(EditVersion)
CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(Modified)
CLASS_MEMBER_METHOD(CanCut, NO_PARAMETER)
CLASS_MEMBER_METHOD(CanCopy, NO_PARAMETER)
CLASS_MEMBER_METHOD(CanPaste, NO_PARAMETER)
CLASS_MEMBER_METHOD(Cut, NO_PARAMETER)
CLASS_MEMBER_METHOD(Copy, NO_PARAMETER)
CLASS_MEMBER_METHOD(Paste, NO_PARAMETER)
CLASS_MEMBER_METHOD(SelectAll, NO_PARAMETER)
CLASS_MEMBER_METHOD(Select, {L"begin" _ L"end"})
CLASS_MEMBER_METHOD(SetSelectionTextAsKeyInput, {L"value"})
CLASS_MEMBER_METHOD(GetRowText, {L"row"})
CLASS_MEMBER_METHOD(GetFragmentText, {L"start" _ L"end"})
CLASS_MEMBER_METHOD(GetRowWidth, {L"row"})
CLASS_MEMBER_METHOD(GetTextPosFromPoint, {L"point"})
CLASS_MEMBER_METHOD(GetPointFromTextPos, {L"pos"})
CLASS_MEMBER_METHOD(GetRectFromTextPos, {L"pos"})
CLASS_MEMBER_METHOD(GetNearestTextPos, {L"point"})
CLASS_MEMBER_METHOD(CanUndo, NO_PARAMETER)
CLASS_MEMBER_METHOD(CanRedo, NO_PARAMETER)
CLASS_MEMBER_METHOD(ClearUndoRedo, NO_PARAMETER)
CLASS_MEMBER_METHOD(NotifyModificationSaved, NO_PARAMETER)
CLASS_MEMBER_METHOD(Undo, NO_PARAMETER)
CLASS_MEMBER_METHOD(Redo, NO_PARAMETER)
END_CLASS_MEMBER(GuiTextBoxCommonInterface)
BEGIN_CLASS_MEMBER(GuiMultilineTextBox)
CLASS_MEMBER_BASE(GuiScrollView)
CLASS_MEMBER_BASE(GuiTextBoxCommonInterface)
CLASS_MEMBER_BASE(GuiDocumentViewer)
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiMultilineTextBox)
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(GuiMultilineTextBox, const GuiDocumentConfig&, config)
END_CLASS_MEMBER(GuiMultilineTextBox)
BEGIN_CLASS_MEMBER(GuiSinglelineTextBox)
CLASS_MEMBER_BASE(GuiControl)
CLASS_MEMBER_BASE(GuiTextBoxCommonInterface)
CLASS_MEMBER_BASE(GuiDocumentLabel)
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiSinglelineTextBox)
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(GuiSinglelineTextBox, const GuiDocumentConfig&, config)
CLASS_MEMBER_PROPERTY_FAST(PasswordChar)
END_CLASS_MEMBER(GuiSinglelineTextBox)
@@ -3279,41 +3237,6 @@ Type Declaration (Extra)
ENUM_NAMESPACE_ITEM(Backslash)
END_ENUM_ITEM(GuiGradientBackgroundElement::Direction)
BEGIN_CLASS_MEMBER(text::TextLines)
CLASS_MEMBER_PROPERTY_READONLY_FAST(Count)
CLASS_MEMBER_PROPERTY_FAST(TabSpaceCount)
CLASS_MEMBER_PROPERTY_READONLY_FAST(RowHeight)
CLASS_MEMBER_PROPERTY_READONLY_FAST(MaxWidth)
CLASS_MEMBER_PROPERTY_READONLY_FAST(MaxHeight)
CLASS_MEMBER_PROPERTY_FAST(PasswordChar)
CLASS_MEMBER_METHOD_OVERLOAD(GetText, NO_PARAMETER, WString(text::TextLines::*)())
CLASS_MEMBER_METHOD_OVERLOAD(GetText, {L"start" _ L"end"}, WString(text::TextLines::*)(TextPos _ TextPos))
CLASS_MEMBER_METHOD(SetText, {L"value"})
CLASS_MEMBER_METHOD(RemoveLines, {L"start" _ L"end"})
CLASS_MEMBER_METHOD(IsAvailable, {L"pos"})
CLASS_MEMBER_METHOD(Normalize, {L"pos"})
CLASS_MEMBER_METHOD_OVERLOAD(Modify, {L"start" _ L"end" _ L"input"}, TextPos(text::TextLines::*)(TextPos _ TextPos _ const WString&))
CLASS_MEMBER_METHOD(Clear, NO_PARAMETER)
CLASS_MEMBER_METHOD(ClearMeasurement, NO_PARAMETER)
CLASS_MEMBER_METHOD(MeasureRow, {L"row"})
CLASS_MEMBER_METHOD(GetRowWidth, {L"row"})
CLASS_MEMBER_METHOD(GetTextPosFromPoint, {L"point"})
CLASS_MEMBER_METHOD(GetPointFromTextPos, {L"pos"})
CLASS_MEMBER_METHOD(GetRectFromTextPos, {L"pos"})
END_CLASS_MEMBER(text::TextLines)
BEGIN_STRUCT_MEMBER(text::ColorItem)
STRUCT_MEMBER(text)
STRUCT_MEMBER(background)
END_STRUCT_MEMBER(text::ColorItem)
BEGIN_STRUCT_MEMBER(text::ColorEntry)
STRUCT_MEMBER(normal)
STRUCT_MEMBER(selectedFocused)
STRUCT_MEMBER(selectedUnfocused)
END_STRUCT_MEMBER(text::ColorEntry)
/***********************************************************************
Type Declaration (Class)
***********************************************************************/
@@ -3425,25 +3348,6 @@ Type Declaration (Class)
CLASS_MEMBER_PROPERTY_FAST(BackgroundColor)
END_CLASS_MEMBER(GuiPolygonElement)
BEGIN_CLASS_MEMBER(GuiColorizedTextElement)
CLASS_MEMBER_BASE(IGuiGraphicsElement)
ELEMENT_CONSTRUCTOR(GuiColorizedTextElement)
CLASS_MEMBER_PROPERTY_FAST(Font)
CLASS_MEMBER_PROPERTY_FAST(PasswordChar)
CLASS_MEMBER_PROPERTY_FAST(ViewPosition)
CLASS_MEMBER_PROPERTY_FAST(VisuallyEnabled)
CLASS_MEMBER_PROPERTY_FAST(Focused)
CLASS_MEMBER_PROPERTY_FAST(CaretBegin)
CLASS_MEMBER_PROPERTY_FAST(CaretEnd)
CLASS_MEMBER_PROPERTY_FAST(CaretVisible)
CLASS_MEMBER_PROPERTY_FAST(CaretColor)
CLASS_MEMBER_EXTERNALMETHOD(GetLines, NO_PARAMETER, text::TextLines*(GuiColorizedTextElement::*)(), vl::reflection::description::GuiColorizedTextElement_GetLines)
CLASS_MEMBER_PROPERTY_READONLY(Lines, GetLines)
CLASS_MEMBER_PROPERTY_FAST(Colors)
END_CLASS_MEMBER(GuiColorizedTextElement)
BEGIN_CLASS_MEMBER(GuiDocumentElement)
CLASS_MEMBER_BASE(IGuiGraphicsElement)
ELEMENT_CONSTRUCTOR(GuiDocumentElement)
@@ -3451,6 +3355,7 @@ Type Declaration (Class)
CLASS_MEMBER_PROPERTY_FAST(Document)
CLASS_MEMBER_PROPERTY_FAST(ParagraphPadding)
CLASS_MEMBER_PROPERTY_FAST(WrapLine)
CLASS_MEMBER_PROPERTY_FAST(PasswordChar)
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretBegin)
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretEnd)
CLASS_MEMBER_PROPERTY_FAST(CaretVisible)
-5
View File
@@ -213,9 +213,6 @@ Type List (Elements)
F(presentation::elements::ElementShape)\
F(presentation::elements::Gui3DSplitterElement::Direction)\
F(presentation::elements::GuiGradientBackgroundElement::Direction)\
F(presentation::elements::text::TextLines)\
F(presentation::elements::text::ColorItem)\
F(presentation::elements::text::ColorEntry)\
#define GUIREFLECTIONELEMENT_CLASS_TYPELIST(F)\
F(presentation::elements::GuiFocusRectangleElement)\
@@ -228,7 +225,6 @@ Type List (Elements)
F(presentation::elements::GuiSolidLabelElement)\
F(presentation::elements::GuiImageFrameElement)\
F(presentation::elements::GuiPolygonElement)\
F(presentation::elements::GuiColorizedTextElement)\
F(presentation::elements::GuiDocumentElement)\
#define GUIREFLECTIONELEMENT_TYPELIST(F)\
@@ -421,7 +417,6 @@ Type List (Controls)
F(presentation::controls::GuiDocumentConfig)\
F(presentation::controls::GuiDocumentItem)\
F(presentation::controls::GuiDocumentCommonInterface)\
F(presentation::controls::GuiTextBoxCommonInterface)\
F(presentation::controls::list::IDataGridContext)\
F(presentation::controls::list::IDataVisualizerFactory)\
F(presentation::controls::list::IDataVisualizer)\