mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-01 06:14:11 +08:00
Update release
This commit is contained in:
+158
-129
@@ -3467,11 +3467,11 @@ WindowsDirect2DParagraph (Formatting)
|
|||||||
|
|
||||||
void SetWrapLine(bool value)override
|
void SetWrapLine(bool value)override
|
||||||
{
|
{
|
||||||
if(wrapLine!=value)
|
if (wrapLine != value)
|
||||||
{
|
{
|
||||||
wrapLine=value;
|
wrapLine = value;
|
||||||
textLayout->SetWordWrapping(value?DWRITE_WORD_WRAPPING_WRAP:DWRITE_WORD_WRAPPING_NO_WRAP);
|
textLayout->SetWordWrapping(value ? DWRITE_WORD_WRAPPING_WRAP : DWRITE_WORD_WRAPPING_NO_WRAP);
|
||||||
formatDataAvailable=false;
|
formatDataAvailable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3656,11 +3656,13 @@ WindowsDirect2DParagraph (Formatting)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
vint GetHeight()override
|
Size GetSize()override
|
||||||
{
|
{
|
||||||
DWRITE_TEXT_METRICS metrics;
|
DWRITE_TEXT_METRICS metrics;
|
||||||
textLayout->GetMetrics(&metrics);
|
textLayout->GetMetrics(&metrics);
|
||||||
return (vint)ceil(metrics.height);
|
return Size(
|
||||||
|
(wrapLine ? 0 : (vint)ceil(metrics.widthIncludingTrailingWhitespace)),
|
||||||
|
(vint)ceil(metrics.height));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
@@ -4070,7 +4072,7 @@ WindowsDirect2DParagraph (Caret)
|
|||||||
{
|
{
|
||||||
PrepareFormatData();
|
PrepareFormatData();
|
||||||
if(!IsValidCaret(caret)) return Rect();
|
if(!IsValidCaret(caret)) return Rect();
|
||||||
if(paragraphText.Length()==0) return Rect(Point(0, 0), Size(0, GetHeight()));
|
if(paragraphText.Length()==0) return Rect(Point(0, 0), Size(0, GetSize().y));
|
||||||
|
|
||||||
vint frontLineIndex=-1;
|
vint frontLineIndex=-1;
|
||||||
vint backLineIndex=-1;
|
vint backLineIndex=-1;
|
||||||
@@ -5442,6 +5444,78 @@ GuiPolygonElementRenderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
GuiDirect2DElementRenderer
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
void GuiDirect2DElementRenderer::InitializeInternal()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiDirect2DElementRenderer::FinalizeInternal()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiDirect2DElementRenderer::RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget)
|
||||||
|
{
|
||||||
|
IDWriteFactory* fdw=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||||
|
ID2D1Factory* fd2d=GetWindowsDirect2DObjectProvider()->GetDirect2DFactory();
|
||||||
|
if(oldRenderTarget)
|
||||||
|
{
|
||||||
|
GuiDirect2DElementEventArgs arguments(element, oldRenderTarget->GetDirect2DRenderTarget(), fdw, fd2d, Rect());
|
||||||
|
element->BeforeRenderTargetChanged.Execute(arguments);
|
||||||
|
}
|
||||||
|
if(newRenderTarget)
|
||||||
|
{
|
||||||
|
GuiDirect2DElementEventArgs arguments(element, newRenderTarget->GetDirect2DRenderTarget(), fdw, fd2d, Rect());
|
||||||
|
element->AfterRenderTargetChanged.Execute(arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GuiDirect2DElementRenderer::GuiDirect2DElementRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GuiDirect2DElementRenderer::~GuiDirect2DElementRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiDirect2DElementRenderer::Render(Rect bounds)
|
||||||
|
{
|
||||||
|
if(renderTarget)
|
||||||
|
{
|
||||||
|
IDWriteFactory* fdw=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
||||||
|
ID2D1Factory* fd2d=GetWindowsDirect2DObjectProvider()->GetDirect2DFactory();
|
||||||
|
renderTarget->PushClipper(bounds, element);
|
||||||
|
if(!renderTarget->IsClipperCoverWholeTarget())
|
||||||
|
{
|
||||||
|
ID2D1RenderTarget* rt=renderTarget->GetDirect2DRenderTarget();
|
||||||
|
GuiDirect2DElementEventArgs arguments(element, rt, fdw, fd2d, bounds);
|
||||||
|
element->Rendering.Execute(arguments);
|
||||||
|
}
|
||||||
|
renderTarget->PopClipper(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiDirect2DElementRenderer::OnElementStateChanged()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
.\DIRECT2D\RENDERERS\GUIGRAPHICSTEXTRENDERERSWINDOWSDIRECT2D.CPP
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
namespace vl
|
||||||
|
{
|
||||||
|
namespace presentation
|
||||||
|
{
|
||||||
|
namespace elements_windows_d2d
|
||||||
|
{
|
||||||
|
using namespace collections;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
GuiColorizedTextElementRenderer
|
GuiColorizedTextElementRenderer
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
@@ -5689,63 +5763,6 @@ GuiColorizedTextElementRenderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
GuiDirect2DElementRenderer
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
void GuiDirect2DElementRenderer::InitializeInternal()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiDirect2DElementRenderer::FinalizeInternal()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiDirect2DElementRenderer::RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget)
|
|
||||||
{
|
|
||||||
IDWriteFactory* fdw=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
|
||||||
ID2D1Factory* fd2d=GetWindowsDirect2DObjectProvider()->GetDirect2DFactory();
|
|
||||||
if(oldRenderTarget)
|
|
||||||
{
|
|
||||||
GuiDirect2DElementEventArgs arguments(element, oldRenderTarget->GetDirect2DRenderTarget(), fdw, fd2d, Rect());
|
|
||||||
element->BeforeRenderTargetChanged.Execute(arguments);
|
|
||||||
}
|
|
||||||
if(newRenderTarget)
|
|
||||||
{
|
|
||||||
GuiDirect2DElementEventArgs arguments(element, newRenderTarget->GetDirect2DRenderTarget(), fdw, fd2d, Rect());
|
|
||||||
element->AfterRenderTargetChanged.Execute(arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiDirect2DElementRenderer::GuiDirect2DElementRenderer()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiDirect2DElementRenderer::~GuiDirect2DElementRenderer()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiDirect2DElementRenderer::Render(Rect bounds)
|
|
||||||
{
|
|
||||||
if(renderTarget)
|
|
||||||
{
|
|
||||||
IDWriteFactory* fdw=GetWindowsDirect2DObjectProvider()->GetDirectWriteFactory();
|
|
||||||
ID2D1Factory* fd2d=GetWindowsDirect2DObjectProvider()->GetDirect2DFactory();
|
|
||||||
renderTarget->PushClipper(bounds, element);
|
|
||||||
if(!renderTarget->IsClipperCoverWholeTarget())
|
|
||||||
{
|
|
||||||
ID2D1RenderTarget* rt=renderTarget->GetDirect2DRenderTarget();
|
|
||||||
GuiDirect2DElementEventArgs arguments(element, rt, fdw, fd2d, bounds);
|
|
||||||
element->Rendering.Execute(arguments);
|
|
||||||
}
|
|
||||||
renderTarget->PopClipper(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiDirect2DElementRenderer::OnElementStateChanged()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8812,11 +8829,18 @@ WindowsGDIParagraph
|
|||||||
|
|
||||||
bool GetWrapLine()override
|
bool GetWrapLine()override
|
||||||
{
|
{
|
||||||
return true;
|
return paragraph->wrapLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWrapLine(bool value)override
|
void SetWrapLine(bool value)override
|
||||||
{
|
{
|
||||||
|
CHECK_ERROR(value, L"vl::presentation::elements_windows_gdi::WindowsGDIParagraph::SetWrapLine(bool)#Non-wrapline not implemented.");
|
||||||
|
if (paragraph->wrapLine != value)
|
||||||
|
{
|
||||||
|
paragraph->wrapLine = value;
|
||||||
|
paragraph->BuildUniscribeData(renderTarget->GetDC());
|
||||||
|
paragraph->Layout(paragraph->lastAvailableWidth, paragraph->paragraphAlignment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vint GetMaxWidth()override
|
vint GetMaxWidth()override
|
||||||
@@ -8948,10 +8972,12 @@ WindowsGDIParagraph
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
vint GetHeight()override
|
Size GetSize()override
|
||||||
{
|
{
|
||||||
PrepareUniscribeData();
|
PrepareUniscribeData();
|
||||||
return paragraph->bounds.Height();
|
return Size(
|
||||||
|
(paragraph->wrapLine ? 0 : paragraph->bounds.Width()),
|
||||||
|
paragraph->bounds.Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenCaret(vint _caret, Color _color, bool _frontSide)override
|
bool OpenCaret(vint _caret, Color _color, bool _frontSide)override
|
||||||
@@ -9899,6 +9925,65 @@ GuiPolygonElementRenderer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
GuiGDIElementRenderer
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
void GuiGDIElementRenderer::InitializeInternal()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiGDIElementRenderer::FinalizeInternal()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiGDIElementRenderer::RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GuiGDIElementRenderer::GuiGDIElementRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GuiGDIElementRenderer::~GuiGDIElementRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiGDIElementRenderer::Render(Rect bounds)
|
||||||
|
{
|
||||||
|
if(renderTarget)
|
||||||
|
{
|
||||||
|
renderTarget->PushClipper(bounds, element);
|
||||||
|
if(!renderTarget->IsClipperCoverWholeTarget())
|
||||||
|
{
|
||||||
|
WinDC* dc=renderTarget->GetDC();
|
||||||
|
GuiGDIElementEventArgs arguments(element, dc, bounds);
|
||||||
|
element->Rendering.Execute(arguments);
|
||||||
|
}
|
||||||
|
renderTarget->PopClipper(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiGDIElementRenderer::OnElementStateChanged()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
.\GDI\RENDERERS\GUIGRAPHICSTEXTRENDERERSWINDOWSGDI.CPP
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
namespace vl
|
||||||
|
{
|
||||||
|
namespace presentation
|
||||||
|
{
|
||||||
|
namespace elements_windows_gdi
|
||||||
|
{
|
||||||
|
using namespace windows;
|
||||||
|
using namespace collections;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
GuiColorizedTextElementRenderer
|
GuiColorizedTextElementRenderer
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
@@ -10095,49 +10180,6 @@ GuiColorizedTextElementRenderer
|
|||||||
caretPen=resourceManager->CreateGdiPen(oldCaretColor);
|
caretPen=resourceManager->CreateGdiPen(oldCaretColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
GuiGDIElementRenderer
|
|
||||||
***********************************************************************/
|
|
||||||
|
|
||||||
void GuiGDIElementRenderer::InitializeInternal()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiGDIElementRenderer::FinalizeInternal()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiGDIElementRenderer::RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiGDIElementRenderer::GuiGDIElementRenderer()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
GuiGDIElementRenderer::~GuiGDIElementRenderer()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiGDIElementRenderer::Render(Rect bounds)
|
|
||||||
{
|
|
||||||
if(renderTarget)
|
|
||||||
{
|
|
||||||
renderTarget->PushClipper(bounds, element);
|
|
||||||
if(!renderTarget->IsClipperCoverWholeTarget())
|
|
||||||
{
|
|
||||||
WinDC* dc=renderTarget->GetDC();
|
|
||||||
GuiGDIElementEventArgs arguments(element, dc, bounds);
|
|
||||||
element->Rendering.Execute(arguments);
|
|
||||||
}
|
|
||||||
renderTarget->PopClipper(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiGDIElementRenderer::OnElementStateChanged()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11483,7 +11525,8 @@ UniscribeParagraph
|
|||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
UniscribeParagraph::UniscribeParagraph()
|
UniscribeParagraph::UniscribeParagraph()
|
||||||
:lastAvailableWidth(-1)
|
:wrapLine(true)
|
||||||
|
,lastAvailableWidth(-1)
|
||||||
,paragraphAlignment(Alignment::Left)
|
,paragraphAlignment(Alignment::Left)
|
||||||
,built(false)
|
,built(false)
|
||||||
{
|
{
|
||||||
@@ -13262,31 +13305,17 @@ WindowsClipboardWriter
|
|||||||
|
|
||||||
void WindowsClipboardWriter::SetDocument(Ptr<DocumentModel> value)
|
void WindowsClipboardWriter::SetDocument(Ptr<DocumentModel> value)
|
||||||
{
|
{
|
||||||
documentData = value;
|
|
||||||
if (!textData)
|
if (!textData)
|
||||||
{
|
{
|
||||||
textData = documentData->GetText(true);
|
textData = value->GetTextForReading(WString::Unmanaged(L"\r\n\r\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!imageData && documentData->paragraphs.Count() == 1)
|
if (!imageData)
|
||||||
{
|
{
|
||||||
Ptr<DocumentContainerRun> container = documentData->paragraphs[0];
|
imageData = GetImageFromSingleImageDocument(value);
|
||||||
while (container)
|
|
||||||
{
|
|
||||||
if (container->runs.Count() != 1) goto FAILED;
|
|
||||||
if (auto imageRun = container->runs[0].Cast<DocumentImageRun>())
|
|
||||||
{
|
|
||||||
imageData = imageRun->image;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
container = container->runs[0].Cast<DocumentContainerRun>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FAILED:;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
documentData = value;
|
||||||
ModifyDocumentForClipboard(documentData);
|
ModifyDocumentForClipboard(documentData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+97
-34
@@ -481,6 +481,54 @@ Renderers
|
|||||||
void OnElementStateChanged()override;
|
void OnElementStateChanged()override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class GuiDirect2DElementRenderer : public GuiElementRendererBase<GuiDirect2DElement, GuiDirect2DElementRenderer, IWindowsDirect2DRenderTarget>
|
||||||
|
{
|
||||||
|
friend class GuiElementRendererBase<GuiDirect2DElement, GuiDirect2DElementRenderer, IWindowsDirect2DRenderTarget>;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void InitializeInternal();
|
||||||
|
void FinalizeInternal();
|
||||||
|
void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget);
|
||||||
|
public:
|
||||||
|
GuiDirect2DElementRenderer();
|
||||||
|
~GuiDirect2DElementRenderer();
|
||||||
|
|
||||||
|
void Render(Rect bounds)override;
|
||||||
|
void OnElementStateChanged()override;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#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
|
class GuiColorizedTextElementRenderer : public GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget>, protected GuiColorizedTextElement::ICallback
|
||||||
{
|
{
|
||||||
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget>;
|
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsDirect2DRenderTarget>;
|
||||||
@@ -528,23 +576,6 @@ Renderers
|
|||||||
void Render(Rect bounds)override;
|
void Render(Rect bounds)override;
|
||||||
void OnElementStateChanged()override;
|
void OnElementStateChanged()override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiDirect2DElementRenderer : public GuiElementRendererBase<GuiDirect2DElement, GuiDirect2DElementRenderer, IWindowsDirect2DRenderTarget>
|
|
||||||
{
|
|
||||||
friend class GuiElementRendererBase<GuiDirect2DElement, GuiDirect2DElementRenderer, IWindowsDirect2DRenderTarget>;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
void InitializeInternal();
|
|
||||||
void FinalizeInternal();
|
|
||||||
void RenderTargetChangedInternal(IWindowsDirect2DRenderTarget* oldRenderTarget, IWindowsDirect2DRenderTarget* newRenderTarget);
|
|
||||||
public:
|
|
||||||
GuiDirect2DElementRenderer();
|
|
||||||
~GuiDirect2DElementRenderer();
|
|
||||||
|
|
||||||
void Render(Rect bounds)override;
|
|
||||||
void OnElementStateChanged()override;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1345,6 +1376,7 @@ UniscribeParagraph
|
|||||||
//***************************** Uniscribe Data
|
//***************************** Uniscribe Data
|
||||||
List<Ptr<UniscribeLine>> lines;
|
List<Ptr<UniscribeLine>> lines;
|
||||||
//***************************** Layout Data
|
//***************************** Layout Data
|
||||||
|
bool wrapLine;
|
||||||
vint lastAvailableWidth;
|
vint lastAvailableWidth;
|
||||||
Rect bounds;
|
Rect bounds;
|
||||||
|
|
||||||
@@ -1710,6 +1742,54 @@ Renderers
|
|||||||
void OnElementStateChanged()override;
|
void OnElementStateChanged()override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class GuiGDIElementRenderer : public GuiElementRendererBase<GuiGDIElement, GuiGDIElementRenderer, IWindowsGDIRenderTarget>
|
||||||
|
{
|
||||||
|
friend class GuiElementRendererBase<GuiGDIElement, GuiGDIElementRenderer, IWindowsGDIRenderTarget>;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
void InitializeInternal();
|
||||||
|
void FinalizeInternal();
|
||||||
|
void RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget);
|
||||||
|
public:
|
||||||
|
GuiGDIElementRenderer();
|
||||||
|
~GuiGDIElementRenderer();
|
||||||
|
|
||||||
|
void Render(Rect bounds)override;
|
||||||
|
void OnElementStateChanged()override;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#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
|
class GuiColorizedTextElementRenderer : public GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget>, protected GuiColorizedTextElement::ICallback
|
||||||
{
|
{
|
||||||
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget>;
|
friend class GuiElementRendererBase<GuiColorizedTextElement, GuiColorizedTextElementRenderer, IWindowsGDIRenderTarget>;
|
||||||
@@ -1751,23 +1831,6 @@ Renderers
|
|||||||
void Render(Rect bounds)override;
|
void Render(Rect bounds)override;
|
||||||
void OnElementStateChanged()override;
|
void OnElementStateChanged()override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuiGDIElementRenderer : public GuiElementRendererBase<GuiGDIElement, GuiGDIElementRenderer, IWindowsGDIRenderTarget>
|
|
||||||
{
|
|
||||||
friend class GuiElementRendererBase<GuiGDIElement, GuiGDIElementRenderer, IWindowsGDIRenderTarget>;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
void InitializeInternal();
|
|
||||||
void FinalizeInternal();
|
|
||||||
void RenderTargetChangedInternal(IWindowsGDIRenderTarget* oldRenderTarget, IWindowsGDIRenderTarget* newRenderTarget);
|
|
||||||
public:
|
|
||||||
GuiGDIElementRenderer();
|
|
||||||
~GuiGDIElementRenderer();
|
|
||||||
|
|
||||||
void Render(Rect bounds)override;
|
|
||||||
void OnElementStateChanged()override;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+779
-295
File diff suppressed because it is too large
Load Diff
+136
-27
@@ -2058,9 +2058,9 @@ Layout Engine
|
|||||||
/// <returns>Returns true if this operation succeeded.</returns>
|
/// <returns>Returns true if this operation succeeded.</returns>
|
||||||
virtual bool ResetInlineObject(vint start, vint length)=0;
|
virtual bool ResetInlineObject(vint start, vint length)=0;
|
||||||
|
|
||||||
/// <summary>Get the layouted height of the text. The result depends on rich styled text and the two important properties that can be set using <see cref="SetWrapLine"/> and <see cref="SetMaxWidth"/>.</summary>
|
/// <summary>Get the layouted size of the text. The result depends on rich styled text and the two important properties that can be set using <see cref="SetWrapLine"/> and <see cref="SetMaxWidth"/>.</summary>
|
||||||
/// <returns>The layouted height.</returns>
|
/// <returns>The layouted size.</returns>
|
||||||
virtual vint GetHeight()=0;
|
virtual Size GetSize()=0;
|
||||||
/// <summary>Make the caret visible so that it will be rendered in the paragraph.</summary>
|
/// <summary>Make the caret visible so that it will be rendered in the paragraph.</summary>
|
||||||
/// <returns>Returns true if this operation succeeded.</returns>
|
/// <returns>Returns true if this operation succeeded.</returns>
|
||||||
/// <param name="caret">The caret.</param>
|
/// <param name="caret">The caret.</param>
|
||||||
@@ -12037,8 +12037,10 @@ Rich Content Document (run)
|
|||||||
|
|
||||||
void Accept(IVisitor* visitor)override{visitor->Visit(this);}
|
void Accept(IVisitor* visitor)override{visitor->Visit(this);}
|
||||||
|
|
||||||
WString GetText(bool skipNonTextContent);
|
WString GetTextForCaret();
|
||||||
void GetText(stream::TextWriter& writer, bool skipNonTextContent);
|
WString GetTextForReading();
|
||||||
|
WString ConvertToText(bool forCaret);
|
||||||
|
void ConvertToText(stream::TextWriter& writer, bool forCaret);
|
||||||
};
|
};
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
@@ -12117,8 +12119,10 @@ Rich Content Document (model)
|
|||||||
ResolvedStyle GetStyle(Ptr<DocumentStyleProperties> sp, const ResolvedStyle& context);
|
ResolvedStyle GetStyle(Ptr<DocumentStyleProperties> sp, const ResolvedStyle& context);
|
||||||
ResolvedStyle GetStyle(const WString& styleName, const ResolvedStyle& context);
|
ResolvedStyle GetStyle(const WString& styleName, const ResolvedStyle& context);
|
||||||
|
|
||||||
WString GetText(bool skipNonTextContent);
|
WString GetTextForCaret();
|
||||||
void GetText(stream::TextWriter& writer, bool skipNonTextContent);
|
WString GetTextForReading(const WString& paragraphDelimiter);
|
||||||
|
WString ConvertToText(bool forCaret, const WString& paragraphDelimiter);
|
||||||
|
void ConvertToText(stream::TextWriter& writer, bool forCaret, const WString& paragraphDelimiter);
|
||||||
|
|
||||||
bool CheckEditRange(TextPos begin, TextPos end, RunRangeMap& relatedRanges);
|
bool CheckEditRange(TextPos begin, TextPos end, RunRangeMap& relatedRanges);
|
||||||
Ptr<DocumentModel> CopyDocument(TextPos begin, TextPos end, bool deepCopy);
|
Ptr<DocumentModel> CopyDocument(TextPos begin, TextPos end, bool deepCopy);
|
||||||
@@ -12139,6 +12143,7 @@ Rich Content Document (model)
|
|||||||
bool RemoveStyleName(TextPos begin, TextPos end);
|
bool RemoveStyleName(TextPos begin, TextPos end);
|
||||||
bool RenameStyle(const WString& oldStyleName, const WString& newStyleName);
|
bool RenameStyle(const WString& oldStyleName, const WString& newStyleName);
|
||||||
bool ClearStyle(TextPos begin, TextPos end);
|
bool ClearStyle(TextPos begin, TextPos end);
|
||||||
|
bool ConvertToPlainText(TextPos begin, TextPos end);
|
||||||
Ptr<DocumentStyleProperties> SummarizeStyle(TextPos begin, TextPos end);
|
Ptr<DocumentStyleProperties> SummarizeStyle(TextPos begin, TextPos end);
|
||||||
Nullable<WString> SummarizeStyleName(TextPos begin, TextPos end);
|
Nullable<WString> SummarizeStyleName(TextPos begin, TextPos end);
|
||||||
Nullable<Alignment> SummarizeParagraphAlignment(TextPos begin, TextPos end);
|
Nullable<Alignment> SummarizeParagraphAlignment(TextPos begin, TextPos end);
|
||||||
@@ -12905,7 +12910,7 @@ Rich Content Document (element)
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef collections::Array<Ptr<ParagraphCache>> ParagraphCacheArray;
|
typedef collections::Array<Ptr<ParagraphCache>> ParagraphCacheArray;
|
||||||
typedef collections::Array<vint> ParagraphHeightArray;
|
typedef collections::Array<Size> ParagraphSizeArray;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@@ -12913,10 +12918,10 @@ Rich Content Document (element)
|
|||||||
protected:
|
protected:
|
||||||
vint paragraphDistance;
|
vint paragraphDistance;
|
||||||
vint lastMaxWidth;
|
vint lastMaxWidth;
|
||||||
vint cachedTotalHeight;
|
Size cachedTotalSize;
|
||||||
IGuiGraphicsLayoutProvider* layoutProvider;
|
IGuiGraphicsLayoutProvider* layoutProvider;
|
||||||
ParagraphCacheArray paragraphCaches;
|
ParagraphCacheArray paragraphCaches;
|
||||||
ParagraphHeightArray paragraphHeights;
|
ParagraphSizeArray paragraphSizes;
|
||||||
|
|
||||||
TextPos lastCaret;
|
TextPos lastCaret;
|
||||||
Color lastCaretColor;
|
Color lastCaretColor;
|
||||||
@@ -12953,6 +12958,8 @@ Rich Content Document (element)
|
|||||||
protected:
|
protected:
|
||||||
Ptr<DocumentModel> document;
|
Ptr<DocumentModel> document;
|
||||||
ICallback* callback = nullptr;
|
ICallback* callback = nullptr;
|
||||||
|
bool paragraphPadding = true;
|
||||||
|
bool wrapLine = true;
|
||||||
TextPos caretBegin;
|
TextPos caretBegin;
|
||||||
TextPos caretEnd;
|
TextPos caretEnd;
|
||||||
bool caretVisible;
|
bool caretVisible;
|
||||||
@@ -12976,6 +12983,19 @@ Rich Content Document (element)
|
|||||||
/// <summary>Set the document. When a document is set to this element, modifying the document without invoking <see cref="NotifyParagraphUpdated"/> will lead to undefined behavior.</summary>
|
/// <summary>Set the document. When a document is set to this element, modifying the document without invoking <see cref="NotifyParagraphUpdated"/> will lead to undefined behavior.</summary>
|
||||||
/// <param name="value">The document.</param>
|
/// <param name="value">The document.</param>
|
||||||
void SetDocument(Ptr<DocumentModel> value);
|
void SetDocument(Ptr<DocumentModel> value);
|
||||||
|
/// <summary>Get whether paddings are inserted between paragraphs.</summary>
|
||||||
|
/// <returns>Returns true if paddings are inserted between paragraphs.</returns>
|
||||||
|
bool GetParagraphPadding();
|
||||||
|
/// <summary>Set whether paddings are inserted between paragraphs</summary>
|
||||||
|
/// <param name="value">Set to true so that paddings are inserted between paragraphs.</param>
|
||||||
|
void SetParagraphPadding(bool value);
|
||||||
|
/// <summary>Get line wrapping.</summary>
|
||||||
|
/// <returns>Return true if there is automatic line wrapping.</returns>
|
||||||
|
bool GetWrapLine();
|
||||||
|
/// <summary>Set line wrapping.</summary>
|
||||||
|
/// <param name="value">Set to true so that there is automatic line wrapping.</param>
|
||||||
|
void SetWrapLine(bool value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the begin position of the selection area.
|
/// Get the begin position of the selection area.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -16661,6 +16681,84 @@ namespace vl
|
|||||||
namespace controls
|
namespace controls
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
GuiDocumentConfig
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
/// <summary>Represents the edit mode.</summary>
|
||||||
|
enum class GuiDocumentEditMode
|
||||||
|
{
|
||||||
|
/// <summary>View the rich text only.</summary>
|
||||||
|
ViewOnly,
|
||||||
|
/// <summary>The rich text is selectable.</summary>
|
||||||
|
Selectable,
|
||||||
|
/// <summary>The rich text is editable.</summary>
|
||||||
|
Editable,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>Represents the paragraph mode.</summary>
|
||||||
|
enum class GuiDocumentParagraphMode
|
||||||
|
{
|
||||||
|
/// <summary>Only one paragraph is allowed, only one line in a paragraph is allowed.</summary>
|
||||||
|
Singleline,
|
||||||
|
/// <summary>Only one line in a paragraph is allowed.</summary>
|
||||||
|
Multiline,
|
||||||
|
/// <summary>No constraint.</summary>
|
||||||
|
Paragraph,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>Control of editing and rendering behavior.</summary>
|
||||||
|
struct GuiDocumentConfig
|
||||||
|
{
|
||||||
|
/// <summary>For GuiDocumentLabel only. When it is true, or when wrapLine is true, or when paragraphMode is not Singleline, the control automatically expands to display all content.</summary>
|
||||||
|
Nullable<bool> autoExpand;
|
||||||
|
/// <summary>When it is true, the defaut copy paste behavior ignores RTF format.</summary>
|
||||||
|
Nullable<bool> pasteAsPlainText;
|
||||||
|
/// <summary>When it is true, document automatically wraps if the width of the control is not enough.</summary>
|
||||||
|
Nullable<bool> wrapLine;
|
||||||
|
/// <summary>Control the paragraph and line behavior</summary>
|
||||||
|
Nullable<GuiDocumentParagraphMode> paragraphMode;
|
||||||
|
/// <summary>Insert the space of a default font between paragraphs.</summary>
|
||||||
|
Nullable<bool> paragraphPadding;
|
||||||
|
/// <summary>When it is true:
|
||||||
|
/// double CrLf will be used between paragraphs, when the document converts to plain text.
|
||||||
|
/// only double CrLf will be recognized as paragraph breaks, when the document converts from plain text.
|
||||||
|
/// </summary>
|
||||||
|
Nullable<bool> doubleLineBreaksBetweenParagraph;
|
||||||
|
/// <summary>When it is true, when removing a line break from a document due to paragraphMode, insert a extra space.</summary>
|
||||||
|
Nullable<bool> spaceForFlattenedLineBreak;
|
||||||
|
|
||||||
|
auto operator<=>(const GuiDocumentConfig&) const = default;
|
||||||
|
|
||||||
|
static GuiDocumentConfig GetDocumentLabelDefaultConfig();
|
||||||
|
static GuiDocumentConfig GetDocumentViewerDefaultConfig();
|
||||||
|
static GuiDocumentConfig GetSinglelineTextBoxDefaultConfig();
|
||||||
|
static GuiDocumentConfig GetMultilineTextBoxDefaultConfig();
|
||||||
|
static GuiDocumentConfig OverrideConfig(const GuiDocumentConfig& toOverride, const GuiDocumentConfig& newConfig);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuiDocumentConfigEvaluated
|
||||||
|
{
|
||||||
|
bool autoExpand;
|
||||||
|
bool pasteAsPlainText;
|
||||||
|
bool wrapLine;
|
||||||
|
GuiDocumentParagraphMode paragraphMode;
|
||||||
|
bool paragraphPadding;
|
||||||
|
bool doubleLineBreaksBetweenParagraph;
|
||||||
|
bool spaceForFlattenedLineBreak;
|
||||||
|
|
||||||
|
GuiDocumentConfigEvaluated(const GuiDocumentConfig& config)
|
||||||
|
: autoExpand(config.autoExpand.Value())
|
||||||
|
, pasteAsPlainText(config.pasteAsPlainText.Value())
|
||||||
|
, wrapLine(config.wrapLine.Value())
|
||||||
|
, paragraphMode(config.paragraphMode.Value())
|
||||||
|
, paragraphPadding(config.paragraphPadding.Value())
|
||||||
|
, doubleLineBreaksBetweenParagraph(config.doubleLineBreaksBetweenParagraph.Value())
|
||||||
|
, spaceForFlattenedLineBreak(config.spaceForFlattenedLineBreak.Value())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
GuiDocumentCommonInterface
|
GuiDocumentCommonInterface
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
@@ -16695,18 +16793,8 @@ GuiDocumentCommonInterface
|
|||||||
, public Description<GuiDocumentCommonInterface>
|
, public Description<GuiDocumentCommonInterface>
|
||||||
{
|
{
|
||||||
typedef collections::Dictionary<WString, Ptr<GuiDocumentItem>> DocumentItemMap;
|
typedef collections::Dictionary<WString, Ptr<GuiDocumentItem>> DocumentItemMap;
|
||||||
public:
|
|
||||||
/// <summary>Represents the edit mode.</summary>
|
|
||||||
enum EditMode
|
|
||||||
{
|
|
||||||
/// <summary>View the rich text only.</summary>
|
|
||||||
ViewOnly,
|
|
||||||
/// <summary>The rich text is selectable.</summary>
|
|
||||||
Selectable,
|
|
||||||
/// <summary>The rich text is editable.</summary>
|
|
||||||
Editable,
|
|
||||||
};
|
|
||||||
protected:
|
protected:
|
||||||
|
GuiDocumentConfigEvaluated config;
|
||||||
Ptr<DocumentModel> baselineDocument;
|
Ptr<DocumentModel> baselineDocument;
|
||||||
DocumentItemMap documentItems;
|
DocumentItemMap documentItems;
|
||||||
GuiControl* documentControl = nullptr;
|
GuiControl* documentControl = nullptr;
|
||||||
@@ -16721,7 +16809,7 @@ GuiDocumentCommonInterface
|
|||||||
|
|
||||||
Ptr<DocumentHyperlinkRun::Package> activeHyperlinks;
|
Ptr<DocumentHyperlinkRun::Package> activeHyperlinks;
|
||||||
bool dragging = false;
|
bool dragging = false;
|
||||||
EditMode editMode = EditMode::ViewOnly;
|
GuiDocumentEditMode editMode = GuiDocumentEditMode::ViewOnly;
|
||||||
|
|
||||||
Ptr<GuiDocumentUndoRedoProcessor> undoRedoProcessor;
|
Ptr<GuiDocumentUndoRedoProcessor> undoRedoProcessor;
|
||||||
Ptr<compositions::GuiShortcutKeyManager> internalShortcutKeyManager;
|
Ptr<compositions::GuiShortcutKeyManager> internalShortcutKeyManager;
|
||||||
@@ -16771,8 +16859,15 @@ GuiDocumentCommonInterface
|
|||||||
void OnStartRender()override;
|
void OnStartRender()override;
|
||||||
void OnFinishRender()override;
|
void OnFinishRender()override;
|
||||||
Size OnRenderEmbeddedObject(const WString& name, const Rect& location)override;
|
Size OnRenderEmbeddedObject(const WString& name, const Rect& location)override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
WString UserInput_ConvertDocumentToText(Ptr<DocumentModel> model);
|
||||||
|
void UserInput_FormatText(const WString& text, collections::List<WString>& paragraphTexts);
|
||||||
|
void UserInput_FormatDocument(Ptr<DocumentModel> model);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GuiDocumentCommonInterface();
|
GuiDocumentCommonInterface(const GuiDocumentConfig& _config);
|
||||||
~GuiDocumentCommonInterface();
|
~GuiDocumentCommonInterface();
|
||||||
|
|
||||||
/// <summary>Active hyperlink changed event.</summary>
|
/// <summary>Active hyperlink changed event.</summary>
|
||||||
@@ -16931,10 +17026,10 @@ GuiDocumentCommonInterface
|
|||||||
WString GetActiveHyperlinkReference();
|
WString GetActiveHyperlinkReference();
|
||||||
/// <summary>Get the edit mode of this control.</summary>
|
/// <summary>Get the edit mode of this control.</summary>
|
||||||
/// <returns>The edit mode.</returns>
|
/// <returns>The edit mode.</returns>
|
||||||
EditMode GetEditMode();
|
GuiDocumentEditMode GetEditMode();
|
||||||
/// <summary>Set the edit mode of this control.</summary>
|
/// <summary>Set the edit mode of this control.</summary>
|
||||||
/// <param name="value">The edit mode.</param>
|
/// <param name="value">The edit mode.</param>
|
||||||
void SetEditMode(EditMode value);
|
void SetEditMode(GuiDocumentEditMode value);
|
||||||
|
|
||||||
//================ selection operations
|
//================ selection operations
|
||||||
|
|
||||||
@@ -17010,10 +17105,13 @@ GuiDocumentViewer
|
|||||||
void UpdateDisplayFont()override;
|
void UpdateDisplayFont()override;
|
||||||
Point GetDocumentViewPosition()override;
|
Point GetDocumentViewPosition()override;
|
||||||
void EnsureRectVisible(Rect bounds)override;
|
void EnsureRectVisible(Rect bounds)override;
|
||||||
|
|
||||||
|
static GuiDocumentConfig FixConfig(const GuiDocumentConfig& config);
|
||||||
public:
|
public:
|
||||||
/// <summary>Create a control with a specified style provider.</summary>
|
/// <summary>Create a control with a specified style provider.</summary>
|
||||||
/// <param name="themeName">The theme name for retriving a default control template.</param>
|
/// <param name="themeName">The theme name for retriving a default control template.</param>
|
||||||
GuiDocumentViewer(theme::ThemeName themeName);
|
/// <param name="_config">(Optional): configuration of document editing and rendering behavior.</param>
|
||||||
|
GuiDocumentViewer(theme::ThemeName themeName, const GuiDocumentConfig& _config = {});
|
||||||
~GuiDocumentViewer();
|
~GuiDocumentViewer();
|
||||||
|
|
||||||
const WString& GetText()override;
|
const WString& GetText()override;
|
||||||
@@ -17029,12 +17127,21 @@ GuiDocumentViewer
|
|||||||
{
|
{
|
||||||
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(DocumentLabelTemplate, GuiControl)
|
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(DocumentLabelTemplate, GuiControl)
|
||||||
protected:
|
protected:
|
||||||
|
compositions::GuiBoundsComposition* scrollingContainer = nullptr;
|
||||||
|
compositions::GuiBoundsComposition* documentContainer = nullptr;
|
||||||
|
|
||||||
void UpdateDisplayFont()override;
|
void UpdateDisplayFont()override;
|
||||||
|
Point GetDocumentViewPosition()override;
|
||||||
|
void EnsureRectVisible(Rect bounds)override;
|
||||||
|
void scrollingContainer_CachedBoundsChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||||
|
void documentContainer_CachedMinSizeChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments);
|
||||||
|
|
||||||
|
static GuiDocumentConfig FixConfig(const GuiDocumentConfig& config);
|
||||||
public:
|
public:
|
||||||
/// <summary>Create a control with a specified default theme.</summary>
|
/// <summary>Create a control with a specified default theme.</summary>
|
||||||
/// <param name="themeName">The theme name for retriving a default control template.</param>
|
/// <param name="themeName">The theme name for retriving a default control template.</param>
|
||||||
GuiDocumentLabel(theme::ThemeName themeName);
|
/// <param name="_config">(Optional): configuration of document editing and rendering behavior.</param>
|
||||||
|
GuiDocumentLabel(theme::ThemeName themeName, const GuiDocumentConfig& _config = {});
|
||||||
~GuiDocumentLabel();
|
~GuiDocumentLabel();
|
||||||
|
|
||||||
const WString& GetText()override;
|
const WString& GetText()override;
|
||||||
@@ -25016,6 +25123,7 @@ namespace vl
|
|||||||
namespace presentation
|
namespace presentation
|
||||||
{
|
{
|
||||||
extern void ModifyDocumentForClipboard(Ptr<DocumentModel> model);
|
extern void ModifyDocumentForClipboard(Ptr<DocumentModel> model);
|
||||||
|
extern Ptr<INativeImage> GetImageFromSingleImageDocument(Ptr<DocumentModel> model);
|
||||||
extern Ptr<DocumentModel> LoadDocumentFromClipboardStream(stream::IStream& clipboardStream);
|
extern Ptr<DocumentModel> LoadDocumentFromClipboardStream(stream::IStream& clipboardStream);
|
||||||
extern void SaveDocumentToClipboardStream(Ptr<DocumentModel> model, stream::IStream& clipboardStream);
|
extern void SaveDocumentToClipboardStream(Ptr<DocumentModel> model, stream::IStream& clipboardStream);
|
||||||
|
|
||||||
@@ -25071,6 +25179,7 @@ namespace vl
|
|||||||
extern void RemoveHyperlink(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
extern void RemoveHyperlink(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
||||||
extern void RemoveStyleName(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
extern void RemoveStyleName(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
||||||
extern void ClearStyle(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
extern void ClearStyle(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
||||||
|
extern void ConvertToPlainText(DocumentParagraphRun* run, RunRangeMap& runRanges, vint start, vint end);
|
||||||
extern Ptr<DocumentStyleProperties> SummarizeStyle(DocumentParagraphRun* run, RunRangeMap& runRanges, DocumentModel* model, vint start, vint end);
|
extern Ptr<DocumentStyleProperties> SummarizeStyle(DocumentParagraphRun* run, RunRangeMap& runRanges, DocumentModel* model, vint start, vint end);
|
||||||
extern Nullable<WString> SummarizeStyleName(DocumentParagraphRun* run, RunRangeMap& runRanges, DocumentModel* model, vint start, vint end);
|
extern Nullable<WString> SummarizeStyleName(DocumentParagraphRun* run, RunRangeMap& runRanges, DocumentModel* model, vint start, vint end);
|
||||||
extern void AggregateStyle(Ptr<DocumentStyleProperties>& dst, Ptr<DocumentStyleProperties> src);
|
extern void AggregateStyle(Ptr<DocumentStyleProperties>& dst, Ptr<DocumentStyleProperties> src);
|
||||||
|
|||||||
@@ -8142,6 +8142,18 @@ GuiDocumentInstanceLoaderBase
|
|||||||
private:
|
private:
|
||||||
using TypeInfo = typename TBaseType::TypeInfo;
|
using TypeInfo = typename TBaseType::TypeInfo;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
GlobalStringKey _Behavior;
|
||||||
|
|
||||||
|
void AddAdditionalArguments(types::ResolvingResult& resolvingResult, const TypeInfo& typeInfo, GlobalStringKey variableName, IGuiInstanceLoader::ArgumentMap& arguments, GuiResourceError::List& errors, Ptr<WfNewClassExpression> createControl)override
|
||||||
|
{
|
||||||
|
vint indexBehavior = arguments.Keys().IndexOf(_Behavior);
|
||||||
|
if (indexBehavior != -1)
|
||||||
|
{
|
||||||
|
createControl->arguments.Add(arguments.GetByIndex(indexBehavior)[0].expression);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using PropertyInfo = IGuiInstanceLoader::PropertyInfo;
|
using PropertyInfo = IGuiInstanceLoader::PropertyInfo;
|
||||||
using ArgumentMap = IGuiInstanceLoader::ArgumentMap;
|
using ArgumentMap = IGuiInstanceLoader::ArgumentMap;
|
||||||
@@ -8149,6 +8161,7 @@ GuiDocumentInstanceLoaderBase
|
|||||||
GuiDocumentInstanceLoaderBase(const WString& _typeName, theme::ThemeName themeName)
|
GuiDocumentInstanceLoaderBase(const WString& _typeName, theme::ThemeName themeName)
|
||||||
:TBaseType(_typeName, themeName)
|
:TBaseType(_typeName, themeName)
|
||||||
{
|
{
|
||||||
|
_Behavior = GlobalStringKey::Get(L"Behavior");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetPropertyNames(GuiResourcePrecompileContext& precompileContext, const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
|
void GetPropertyNames(GuiResourcePrecompileContext& precompileContext, const TypeInfo& typeInfo, collections::List<GlobalStringKey>& propertyNames)override
|
||||||
@@ -8163,6 +8176,12 @@ GuiDocumentInstanceLoaderBase
|
|||||||
{
|
{
|
||||||
return GuiInstancePropertyInfo::CollectionWithParent(TypeInfoRetriver<Ptr<GuiDocumentItem>>::CreateTypeInfo());
|
return GuiInstancePropertyInfo::CollectionWithParent(TypeInfoRetriver<Ptr<GuiDocumentItem>>::CreateTypeInfo());
|
||||||
}
|
}
|
||||||
|
else if(propertyInfo.propertyName == _Behavior && this->CanCreate(propertyInfo.typeInfo))
|
||||||
|
{
|
||||||
|
auto info = GuiInstancePropertyInfo::Assign(TypeInfoRetriver<GuiDocumentConfig>::CreateTypeInfo());
|
||||||
|
info->usage = GuiInstancePropertyInfo::ConstructorArgument;
|
||||||
|
return info;
|
||||||
|
}
|
||||||
return TBaseType::GetPropertyType(precompileContext, propertyInfo);
|
return TBaseType::GetPropertyType(precompileContext, propertyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8240,6 +8259,11 @@ Initialization
|
|||||||
manager->SetLoader(Ptr(new GuiDocumentItemInstanceLoader));
|
manager->SetLoader(Ptr(new GuiDocumentItemInstanceLoader));
|
||||||
manager->SetLoader(Ptr(new GuiDocumentViewerInstanceLoader));
|
manager->SetLoader(Ptr(new GuiDocumentViewerInstanceLoader));
|
||||||
manager->SetLoader(Ptr(new GuiDocumentLabelInstanceLoader));
|
manager->SetLoader(Ptr(new GuiDocumentLabelInstanceLoader));
|
||||||
|
manager->CreateVirtualType(GlobalStringKey::Get(description::TypeInfo<GuiDocumentLabel>::content.typeName),
|
||||||
|
Ptr(new GuiDocumentInstanceLoaderBase<GuiTemplateControlInstanceLoader<GuiDocumentLabel>>(
|
||||||
|
L"presentation::controls::GuiDocumentTextBox",
|
||||||
|
theme::ThemeName::DocumentTextBox
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8763,6 +8787,7 @@ GuiInstanceLoader_Document.cpp
|
|||||||
default: GuiControl*, GuiGraphicsComposition*
|
default: GuiControl*, GuiGraphicsComposition*
|
||||||
GuiDocumentViewer, GuiDocumentLable
|
GuiDocumentViewer, GuiDocumentLable
|
||||||
default: Ptr<GuiDocumentItem>
|
default: Ptr<GuiDocumentItem>
|
||||||
|
ctor: Behavior(GuiDocumentConfig)
|
||||||
GuiInstanceLoader_List.cpp
|
GuiInstanceLoader_List.cpp
|
||||||
GuiComboBox
|
GuiComboBox
|
||||||
ctor: ListControl(GuiListControl*)
|
ctor: ListControl(GuiListControl*)
|
||||||
@@ -9118,7 +9143,6 @@ GuiPredefinedInstanceLoadersPlugin
|
|||||||
ADD_VIRTUAL_CONTROL (RadioButton, GuiSelectableButton, RadioButton );
|
ADD_VIRTUAL_CONTROL (RadioButton, GuiSelectableButton, RadioButton );
|
||||||
ADD_VIRTUAL_CONTROL (HScroll, GuiScroll, HScroll );
|
ADD_VIRTUAL_CONTROL (HScroll, GuiScroll, HScroll );
|
||||||
ADD_VIRTUAL_CONTROL (VScroll, GuiScroll, VScroll );
|
ADD_VIRTUAL_CONTROL (VScroll, GuiScroll, VScroll );
|
||||||
ADD_VIRTUAL_CONTROL (DocumentTextBox, GuiDocumentLabel, DocumentTextBox );
|
|
||||||
ADD_VIRTUAL_CONTROL_F (HTracker, GuiScroll, HTracker, InitializeTrackerProgressBar);
|
ADD_VIRTUAL_CONTROL_F (HTracker, GuiScroll, HTracker, InitializeTrackerProgressBar);
|
||||||
ADD_VIRTUAL_CONTROL_F (VTracker, GuiScroll, VTracker, InitializeTrackerProgressBar);
|
ADD_VIRTUAL_CONTROL_F (VTracker, GuiScroll, VTracker, InitializeTrackerProgressBar);
|
||||||
ADD_VIRTUAL_CONTROL_F (ProgressBar, GuiScroll, ProgressBar, InitializeTrackerProgressBar);
|
ADD_VIRTUAL_CONTROL_F (ProgressBar, GuiScroll, ProgressBar, InitializeTrackerProgressBar);
|
||||||
@@ -11266,7 +11290,7 @@ GenerateRemoteProtocolHeaderFile
|
|||||||
auto type = stream::GenerateToStream([&](stream::TextWriter& writer)
|
auto type = stream::GenerateToStream([&](stream::TextWriter& writer)
|
||||||
{
|
{
|
||||||
GuiRpPrintTypeVisitor visitor(symbols, config, writer);
|
GuiRpPrintTypeVisitor visitor(symbols, config, writer);
|
||||||
eventDecl->request->type->Accept(&visitor);
|
eventDecl->request->type->Accept(&visitor);
|
||||||
});
|
});
|
||||||
if (!eventTypes.Contains(type))
|
if (!eventTypes.Contains(type))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -832,7 +832,9 @@ Type Declaration
|
|||||||
|
|
||||||
CLASS_MEMBER_FIELD(alignment)
|
CLASS_MEMBER_FIELD(alignment)
|
||||||
|
|
||||||
CLASS_MEMBER_METHOD_OVERLOAD(GetText, {L"skipNonTextContent"}, WString(DocumentParagraphRun::*)(bool))
|
CLASS_MEMBER_METHOD(GetTextForCaret, NO_PARAMETER)
|
||||||
|
CLASS_MEMBER_METHOD(GetTextForReading, NO_PARAMETER)
|
||||||
|
CLASS_MEMBER_METHOD_OVERLOAD(ConvertToText, {L"forCaret"}, WString(DocumentParagraphRun::*)(bool))
|
||||||
END_CLASS_MEMBER(DocumentParagraphRun)
|
END_CLASS_MEMBER(DocumentParagraphRun)
|
||||||
|
|
||||||
BEGIN_CLASS_MEMBER(DocumentStyle)
|
BEGIN_CLASS_MEMBER(DocumentStyle)
|
||||||
@@ -849,7 +851,9 @@ Type Declaration
|
|||||||
CLASS_MEMBER_FIELD(paragraphs)
|
CLASS_MEMBER_FIELD(paragraphs)
|
||||||
CLASS_MEMBER_FIELD(styles)
|
CLASS_MEMBER_FIELD(styles)
|
||||||
|
|
||||||
CLASS_MEMBER_METHOD_OVERLOAD(GetText, {L"skipNonTextContent"}, WString(DocumentModel::*)(bool))
|
CLASS_MEMBER_METHOD(GetTextForCaret, NO_PARAMETER)
|
||||||
|
CLASS_MEMBER_METHOD(GetTextForReading, { L"paragraphDelimiter" })
|
||||||
|
CLASS_MEMBER_METHOD_OVERLOAD(ConvertToText, { L"forCaret" _ L"paragraphDelimiter"}, WString(DocumentModel::*)(bool, const WString&))
|
||||||
CLASS_MEMBER_STATIC_METHOD(LoadFromXml, {L"resource" _ L"xml" _ L"workingDirectory" _ L"errors"})
|
CLASS_MEMBER_STATIC_METHOD(LoadFromXml, {L"resource" _ L"xml" _ L"workingDirectory" _ L"errors"})
|
||||||
CLASS_MEMBER_METHOD_OVERLOAD(SaveToXml, NO_PARAMETER, Ptr<XmlDocument>(DocumentModel::*)())
|
CLASS_MEMBER_METHOD_OVERLOAD(SaveToXml, NO_PARAMETER, Ptr<XmlDocument>(DocumentModel::*)())
|
||||||
END_CLASS_MEMBER(DocumentModel)
|
END_CLASS_MEMBER(DocumentModel)
|
||||||
@@ -2182,6 +2186,28 @@ Type Declaration (Extra)
|
|||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Groups)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(Groups)
|
||||||
END_CLASS_MEMBER(GroupedDataSource)
|
END_CLASS_MEMBER(GroupedDataSource)
|
||||||
|
|
||||||
|
BEGIN_ENUM_ITEM(GuiDocumentEditMode)
|
||||||
|
ENUM_CLASS_ITEM(ViewOnly)
|
||||||
|
ENUM_CLASS_ITEM(Selectable)
|
||||||
|
ENUM_CLASS_ITEM(Editable)
|
||||||
|
END_ENUM_ITEM(GuiDocumentEditMode)
|
||||||
|
|
||||||
|
BEGIN_ENUM_ITEM(GuiDocumentParagraphMode)
|
||||||
|
ENUM_CLASS_ITEM(Singleline)
|
||||||
|
ENUM_CLASS_ITEM(Multiline)
|
||||||
|
ENUM_CLASS_ITEM(Paragraph)
|
||||||
|
END_ENUM_ITEM(GuiDocumentParagraphMode)
|
||||||
|
|
||||||
|
BEGIN_STRUCT_MEMBER(GuiDocumentConfig)
|
||||||
|
STRUCT_MEMBER(autoExpand)
|
||||||
|
STRUCT_MEMBER(pasteAsPlainText)
|
||||||
|
STRUCT_MEMBER(wrapLine)
|
||||||
|
STRUCT_MEMBER(paragraphMode)
|
||||||
|
STRUCT_MEMBER(paragraphPadding)
|
||||||
|
STRUCT_MEMBER(doubleLineBreaksBetweenParagraph)
|
||||||
|
STRUCT_MEMBER(spaceForFlattenedLineBreak)
|
||||||
|
END_STRUCT_MEMBER(GuiDocumentConfig)
|
||||||
|
|
||||||
BEGIN_CLASS_MEMBER(GuiDocumentItem)
|
BEGIN_CLASS_MEMBER(GuiDocumentItem)
|
||||||
CLASS_MEMBER_CONSTRUCTOR(Ptr<GuiDocumentItem>(const WString&), { L"name" })
|
CLASS_MEMBER_CONSTRUCTOR(Ptr<GuiDocumentItem>(const WString&), { L"name" })
|
||||||
|
|
||||||
@@ -2189,13 +2215,6 @@ Type Declaration (Extra)
|
|||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(Name)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(Name)
|
||||||
END_CLASS_MEMBER(GuiDocumentItem)
|
END_CLASS_MEMBER(GuiDocumentItem)
|
||||||
|
|
||||||
BEGIN_ENUM_ITEM(GuiDocumentCommonInterface::EditMode)
|
|
||||||
ENUM_ITEM_NAMESPACE(GuiDocumentCommonInterface)
|
|
||||||
ENUM_NAMESPACE_ITEM(ViewOnly)
|
|
||||||
ENUM_NAMESPACE_ITEM(Selectable)
|
|
||||||
ENUM_NAMESPACE_ITEM(Editable)
|
|
||||||
END_ENUM_ITEM(GuiDocumentCommonInterface::EditMode)
|
|
||||||
|
|
||||||
BEGIN_INTERFACE_MEMBER(IDataGridContext)
|
BEGIN_INTERFACE_MEMBER(IDataGridContext)
|
||||||
CLASS_MEMBER_BASE(IDescriptable)
|
CLASS_MEMBER_BASE(IDescriptable)
|
||||||
|
|
||||||
@@ -2993,12 +3012,14 @@ Type Declaration (Class)
|
|||||||
CLASS_MEMBER_BASE(GuiScrollContainer)
|
CLASS_MEMBER_BASE(GuiScrollContainer)
|
||||||
CLASS_MEMBER_BASE(GuiDocumentCommonInterface)
|
CLASS_MEMBER_BASE(GuiDocumentCommonInterface)
|
||||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiDocumentViewer)
|
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiDocumentViewer)
|
||||||
|
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(GuiDocumentViewer, const GuiDocumentConfig&, config)
|
||||||
END_CLASS_MEMBER(GuiDocumentViewer)
|
END_CLASS_MEMBER(GuiDocumentViewer)
|
||||||
|
|
||||||
BEGIN_CLASS_MEMBER(GuiDocumentLabel)
|
BEGIN_CLASS_MEMBER(GuiDocumentLabel)
|
||||||
CLASS_MEMBER_BASE(GuiControl)
|
CLASS_MEMBER_BASE(GuiControl)
|
||||||
CLASS_MEMBER_BASE(GuiDocumentCommonInterface)
|
CLASS_MEMBER_BASE(GuiDocumentCommonInterface)
|
||||||
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiDocumentLabel)
|
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE(GuiDocumentLabel)
|
||||||
|
CONTROL_CONSTRUCTOR_CONTROLT_TEMPLATE_2(GuiDocumentLabel, const GuiDocumentConfig&, config)
|
||||||
END_CLASS_MEMBER(GuiDocumentLabel)
|
END_CLASS_MEMBER(GuiDocumentLabel)
|
||||||
|
|
||||||
BEGIN_CLASS_MEMBER(GuiTextBoxCommonInterface)
|
BEGIN_CLASS_MEMBER(GuiTextBoxCommonInterface)
|
||||||
@@ -3427,6 +3448,8 @@ Type Declaration (Class)
|
|||||||
ELEMENT_CONSTRUCTOR(GuiDocumentElement)
|
ELEMENT_CONSTRUCTOR(GuiDocumentElement)
|
||||||
|
|
||||||
CLASS_MEMBER_PROPERTY_FAST(Document)
|
CLASS_MEMBER_PROPERTY_FAST(Document)
|
||||||
|
CLASS_MEMBER_PROPERTY_FAST(ParagraphPadding)
|
||||||
|
CLASS_MEMBER_PROPERTY_FAST(WrapLine)
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretBegin)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretBegin)
|
||||||
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretEnd)
|
CLASS_MEMBER_PROPERTY_READONLY_FAST(CaretEnd)
|
||||||
CLASS_MEMBER_PROPERTY_FAST(CaretVisible)
|
CLASS_MEMBER_PROPERTY_FAST(CaretVisible)
|
||||||
|
|||||||
@@ -416,9 +416,11 @@ Type List (Controls)
|
|||||||
F(presentation::controls::GalleryPos)\
|
F(presentation::controls::GalleryPos)\
|
||||||
F(presentation::controls::list::GalleryGroup)\
|
F(presentation::controls::list::GalleryGroup)\
|
||||||
F(presentation::controls::list::GroupedDataSource)\
|
F(presentation::controls::list::GroupedDataSource)\
|
||||||
|
F(presentation::controls::GuiDocumentEditMode)\
|
||||||
|
F(presentation::controls::GuiDocumentParagraphMode)\
|
||||||
|
F(presentation::controls::GuiDocumentConfig)\
|
||||||
F(presentation::controls::GuiDocumentItem)\
|
F(presentation::controls::GuiDocumentItem)\
|
||||||
F(presentation::controls::GuiDocumentCommonInterface)\
|
F(presentation::controls::GuiDocumentCommonInterface)\
|
||||||
F(presentation::controls::GuiDocumentCommonInterface::EditMode)\
|
|
||||||
F(presentation::controls::GuiTextBoxCommonInterface)\
|
F(presentation::controls::GuiTextBoxCommonInterface)\
|
||||||
F(presentation::controls::list::IDataGridContext)\
|
F(presentation::controls::list::IDataGridContext)\
|
||||||
F(presentation::controls::list::IDataVisualizerFactory)\
|
F(presentation::controls::list::IDataVisualizerFactory)\
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -7,11 +7,11 @@
|
|||||||
prop EditModeCommand : ToolstripCommand* = null {const}
|
prop EditModeCommand : ToolstripCommand* = null {const}
|
||||||
|
|
||||||
@cpp:Private
|
@cpp:Private
|
||||||
func SetEditMode(editMode: DocumentCommonInterface::EditMode) : void
|
func SetEditMode(editMode: GuiDocumentEditMode) : void
|
||||||
{
|
{
|
||||||
var command =
|
var command =
|
||||||
editMode == DocumentCommonInterface::EditMode::ViewOnly ? commandViewOnly :
|
editMode == GuiDocumentEditMode::ViewOnly ? commandViewOnly :
|
||||||
editMode == DocumentCommonInterface::EditMode::Selectable ? commandSelectable :
|
editMode == GuiDocumentEditMode::Selectable ? commandSelectable :
|
||||||
commandEditable;
|
commandEditable;
|
||||||
|
|
||||||
document.EditMode = editMode;
|
document.EditMode = editMode;
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
@cpp:Private
|
@cpp:Private
|
||||||
func HasEditableCursor() : bool
|
func HasEditableCursor() : bool
|
||||||
{
|
{
|
||||||
return document.EditMode == DocumentCommonInterface::EditMode::Editable;
|
return document.EditMode == GuiDocumentEditMode::Editable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@cpp:Private
|
@cpp:Private
|
||||||
|
|||||||
+8
-8
@@ -2096,7 +2096,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf192_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf192_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::ViewOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -2108,7 +2108,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf193_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf193_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Selectable);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -2120,7 +2120,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf194_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf194_Demo_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -17949,7 +17949,7 @@ Class (::demo::DocumentBoxSubTabPageConstructor)
|
|||||||
(this->__vwsn_precompile_2 = new ::vl::presentation::controls::GuiDocumentLabel(::vl::presentation::theme::ThemeName::DocumentTextBox));
|
(this->__vwsn_precompile_2 = new ::vl::presentation::controls::GuiDocumentLabel(::vl::presentation::theme::ThemeName::DocumentTextBox));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlt(::vl::WString::Unmanaged(L"T"));
|
::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlt(::vl::WString::Unmanaged(L"T"));
|
||||||
@@ -17975,7 +17975,7 @@ Class (::demo::DocumentBoxSubTabPageConstructor)
|
|||||||
(this->__vwsn_precompile_5 = new ::vl::presentation::controls::GuiDocumentViewer(::vl::presentation::theme::ThemeName::DocumentViewer));
|
(this->__vwsn_precompile_5 = new ::vl::presentation::controls::GuiDocumentViewer(::vl::presentation::theme::ThemeName::DocumentViewer));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlt(::vl::WString::Unmanaged(L"V"));
|
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetAlt(::vl::WString::Unmanaged(L"V"));
|
||||||
@@ -17998,7 +17998,7 @@ Class (::demo::DocumentBoxSubTabPageConstructor)
|
|||||||
(this->__vwsn_precompile_8 = new ::vl::presentation::controls::GuiDocumentLabel(::vl::presentation::theme::ThemeName::DocumentLabel));
|
(this->__vwsn_precompile_8 = new ::vl::presentation::controls::GuiDocumentLabel(::vl::presentation::theme::ThemeName::DocumentLabel));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_8)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->__vwsn_precompile_8)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->__vwsn_precompile_8)->SetAlt(::vl::WString::Unmanaged(L"L"));
|
::vl::__vwsn::This(this->__vwsn_precompile_8)->SetAlt(::vl::WString::Unmanaged(L"L"));
|
||||||
@@ -18221,7 +18221,7 @@ Class (::demo::DocumentEditorBaseConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"document"), ::vl::__vwsn::Box(this->document));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"document"), ::vl::__vwsn::Box(this->document));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->document)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->document)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->document)->SetAlt(::vl::WString::Unmanaged(L"D"));
|
::vl::__vwsn::This(this->document)->SetAlt(::vl::WString::Unmanaged(L"D"));
|
||||||
@@ -29585,7 +29585,7 @@ Class (::demo::ResponsiveViewControlConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"documentBox"), ::vl::__vwsn::Box(this->documentBox));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"documentBox"), ::vl::__vwsn::Box(this->documentBox));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->documentBox)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->documentBox)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->documentBox)->SetText(::vl::WString::Unmanaged(L"Edit me!"));
|
::vl::__vwsn::This(this->documentBox)->SetText(::vl::WString::Unmanaged(L"Edit me!"));
|
||||||
|
|||||||
+4
-4
@@ -51,9 +51,9 @@ namespace demo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentEditorBase::SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode)
|
void DocumentEditorBase::SetEditMode(::vl::presentation::controls::GuiDocumentEditMode editMode)
|
||||||
{
|
{
|
||||||
auto command = ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly) ? this->commandViewOnly : ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Selectable) ? this->commandSelectable : this->commandEditable));
|
auto command = ((editMode == ::vl::presentation::controls::GuiDocumentEditMode::ViewOnly) ? this->commandViewOnly : ((editMode == ::vl::presentation::controls::GuiDocumentEditMode::Selectable) ? this->commandSelectable : this->commandEditable));
|
||||||
::vl::__vwsn::This(this->document)->SetEditMode(editMode);
|
::vl::__vwsn::This(this->document)->SetEditMode(editMode);
|
||||||
::vl::__vwsn::This(this->commandViewOnly)->SetSelected((command == this->commandViewOnly));
|
::vl::__vwsn::This(this->commandViewOnly)->SetSelected((command == this->commandViewOnly));
|
||||||
::vl::__vwsn::This(this->commandSelectable)->SetSelected((command == this->commandSelectable));
|
::vl::__vwsn::This(this->commandSelectable)->SetSelected((command == this->commandSelectable));
|
||||||
@@ -102,7 +102,7 @@ namespace demo
|
|||||||
|
|
||||||
bool DocumentEditorBase::HasEditableCursor()
|
bool DocumentEditorBase::HasEditableCursor()
|
||||||
{
|
{
|
||||||
return (::vl::__vwsn::This(this->document)->GetEditMode() == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
return (::vl::__vwsn::This(this->document)->GetEditMode() == ::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DocumentEditorBase::HasEditableHyperlink(bool forEdit)
|
bool DocumentEditorBase::HasEditableHyperlink(bool forEdit)
|
||||||
@@ -214,7 +214,7 @@ namespace demo
|
|||||||
|
|
||||||
void DocumentEditorBase::__vwsn_instance_ctor_()
|
void DocumentEditorBase::__vwsn_instance_ctor_()
|
||||||
{
|
{
|
||||||
this->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
this->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
DocumentEditorBase::~DocumentEditorBase()
|
DocumentEditorBase::~DocumentEditorBase()
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ namespace demo
|
|||||||
void SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_);
|
void SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_);
|
||||||
::vl::Event<void()> EditModeCommandChanged;
|
::vl::Event<void()> EditModeCommandChanged;
|
||||||
private:
|
private:
|
||||||
void SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode);
|
void SetEditMode(::vl::presentation::controls::GuiDocumentEditMode editMode);
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::controls::GuiToolstripCommand* SelectAlignmentCommand();
|
::vl::presentation::controls::GuiToolstripCommand* SelectAlignmentCommand();
|
||||||
private:
|
private:
|
||||||
|
|||||||
Binary file not shown.
@@ -2251,7 +2251,7 @@ Class (::demo::NewContactWindowConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxName"), ::vl::__vwsn::Box(this->textBoxName));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxName"), ::vl::__vwsn::Box(this->textBoxName));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->textBoxName)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->textBoxName)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_4 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition());
|
(this->__vwsn_precompile_4 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition());
|
||||||
{
|
{
|
||||||
@@ -2291,7 +2291,7 @@ Class (::demo::NewContactWindowConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxPhone"), ::vl::__vwsn::Box(this->textBoxPhone));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxPhone"), ::vl::__vwsn::Box(this->textBoxPhone));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->textBoxPhone)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->textBoxPhone)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_8 = ::vl::__vwsn::This(this->textBoxPhone)->GetBoundsComposition());
|
(this->__vwsn_precompile_8 = ::vl::__vwsn::This(this->textBoxPhone)->GetBoundsComposition());
|
||||||
{
|
{
|
||||||
@@ -2331,7 +2331,7 @@ Class (::demo::NewContactWindowConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxAddress"), ::vl::__vwsn::Box(this->textBoxAddress));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxAddress"), ::vl::__vwsn::Box(this->textBoxAddress));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->textBoxAddress)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->textBoxAddress)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_12 = ::vl::__vwsn::This(this->textBoxAddress)->GetBoundsComposition());
|
(this->__vwsn_precompile_12 = ::vl::__vwsn::This(this->textBoxAddress)->GetBoundsComposition());
|
||||||
{
|
{
|
||||||
@@ -2591,7 +2591,7 @@ Class (::demo::NewFolderWindowConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxName"), ::vl::__vwsn::Box(this->textBoxName));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"textBoxName"), ::vl::__vwsn::Box(this->textBoxName));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->textBoxName)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->textBoxName)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_4 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition());
|
(this->__vwsn_precompile_4 = ::vl::__vwsn::This(this->textBoxName)->GetBoundsComposition());
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ namespace demo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentEditorBase::SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode)
|
void DocumentEditorBase::SetEditMode(::vl::presentation::controls::GuiDocumentEditMode editMode)
|
||||||
{
|
{
|
||||||
auto command = ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly) ? this->commandViewOnly : ((editMode == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Selectable) ? this->commandSelectable : this->commandEditable));
|
auto command = ((editMode == ::vl::presentation::controls::GuiDocumentEditMode::ViewOnly) ? this->commandViewOnly : ((editMode == ::vl::presentation::controls::GuiDocumentEditMode::Selectable) ? this->commandSelectable : this->commandEditable));
|
||||||
::vl::__vwsn::This(this->document)->SetEditMode(editMode);
|
::vl::__vwsn::This(this->document)->SetEditMode(editMode);
|
||||||
::vl::__vwsn::This(this->commandViewOnly)->SetSelected((command == this->commandViewOnly));
|
::vl::__vwsn::This(this->commandViewOnly)->SetSelected((command == this->commandViewOnly));
|
||||||
::vl::__vwsn::This(this->commandSelectable)->SetSelected((command == this->commandSelectable));
|
::vl::__vwsn::This(this->commandSelectable)->SetSelected((command == this->commandSelectable));
|
||||||
@@ -102,7 +102,7 @@ namespace demo
|
|||||||
|
|
||||||
bool DocumentEditorBase::HasEditableCursor()
|
bool DocumentEditorBase::HasEditableCursor()
|
||||||
{
|
{
|
||||||
return (::vl::__vwsn::This(this->document)->GetEditMode() == ::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
return (::vl::__vwsn::This(this->document)->GetEditMode() == ::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DocumentEditorBase::HasEditableHyperlink(bool forEdit)
|
bool DocumentEditorBase::HasEditableHyperlink(bool forEdit)
|
||||||
@@ -235,7 +235,7 @@ namespace demo
|
|||||||
|
|
||||||
void DocumentEditorBase::__vwsn_instance_ctor_()
|
void DocumentEditorBase::__vwsn_instance_ctor_()
|
||||||
{
|
{
|
||||||
this->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
this->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
DocumentEditorBase::~DocumentEditorBase()
|
DocumentEditorBase::~DocumentEditorBase()
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ namespace demo
|
|||||||
void SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_);
|
void SetEditModeCommand(::vl::presentation::controls::GuiToolstripCommand* __vwsn_value_);
|
||||||
::vl::Event<void()> EditModeCommandChanged;
|
::vl::Event<void()> EditModeCommandChanged;
|
||||||
private:
|
private:
|
||||||
void SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode editMode);
|
void SetEditMode(::vl::presentation::controls::GuiDocumentEditMode editMode);
|
||||||
protected:
|
protected:
|
||||||
::vl::presentation::controls::GuiToolstripCommand* SelectAlignmentCommand();
|
::vl::presentation::controls::GuiToolstripCommand* SelectAlignmentCommand();
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -726,7 +726,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf47_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf47_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::ViewOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -738,7 +738,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf48_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf48_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Selectable);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Selectable);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -750,7 +750,7 @@ Closures
|
|||||||
|
|
||||||
void __vwsnf49_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
void __vwsnf49_EditorBase_demo_DocumentEditorBaseConstructor___vwsn_demo_DocumentEditorBase_Initialize_::operator()(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments) const
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(__vwsnthis_0->self)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
@@ -3030,7 +3030,7 @@ namespace demo
|
|||||||
::vl::__vwsn::This(this->document)->SetAlt(::vl::WString::Unmanaged(L"D"));
|
::vl::__vwsn::This(this->document)->SetAlt(::vl::WString::Unmanaged(L"D"));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->document)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->document)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->document)->GetBoundsComposition());
|
(this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->document)->GetBoundsComposition());
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2090,7 +2090,7 @@ Class (::demo::ResponsiveViewControlConstructor)
|
|||||||
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"documentBox"), ::vl::__vwsn::Box(this->documentBox));
|
::vl::__vwsn::This(__vwsn_this_)->SetNamedObject(::vl::WString::Unmanaged(L"documentBox"), ::vl::__vwsn::Box(this->documentBox));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->documentBox)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::Editable);
|
::vl::__vwsn::This(this->documentBox)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::Editable);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->documentBox)->SetText(::vl::WString::Unmanaged(L"Edit me!"));
|
::vl::__vwsn::This(this->documentBox)->SetText(::vl::WString::Unmanaged(L"Edit me!"));
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ Class (::demo::MainWindowConstructor)
|
|||||||
::vl::__vwsn::This(this->__vwsn_precompile_50)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }());
|
::vl::__vwsn::This(this->__vwsn_precompile_50)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
::vl::__vwsn::This(this->documentViewer)->SetEditMode(::vl::presentation::controls::GuiDocumentCommonInterface::EditMode::ViewOnly);
|
::vl::__vwsn::This(this->documentViewer)->SetEditMode(::vl::presentation::controls::GuiDocumentEditMode::ViewOnly);
|
||||||
}
|
}
|
||||||
(this->__vwsn_precompile_1 = ::vl::Ptr<::vl::presentation::controls::GuiDocumentItem>(new ::vl::presentation::controls::GuiDocumentItem(::vl::WString::Unmanaged(L"Button"))));
|
(this->__vwsn_precompile_1 = ::vl::Ptr<::vl::presentation::controls::GuiDocumentItem>(new ::vl::presentation::controls::GuiDocumentItem(::vl::WString::Unmanaged(L"Button"))));
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user