File Index Symbol Index

/*********************************************************************** Vczh Library++ 3.0 Developer: Zihan Chen(vczh) GacUI Reflection: Basic Interfaces: ***********************************************************************/
#ifdef VCZH_DEBUG_NO_REFLECTION
static_assert(false, "Don't use GacUIReflection.(h|cpp) if VCZH_DEBUG_NO_REFLECTION is defined.");
#endif
#ifndef VCZH_PRESENTATION_REFLECTION_GUIREFLECTIONPLUGIN
#define VCZH_PRESENTATION_REFLECTION_GUIREFLECTIONPLUGIN
#include "../../GacUIReflectionHelper.h"
namespace
vl
{
namespace
reflection
{
namespace
description
{
#ifndef VCZH_DEBUG_NO_REFLECTION
Type List (Basic)
***********************************************************************/
#define GUIREFLECTIONBASIC_TYPELIST(F)\
F(presentation::helper_types::SiteValue)\
F(presentation::Color)\
F(presentation::Alignment)\
F(presentation::AxisDirection)\
F(presentation::TextPos)\
F(presentation::GridPos)\
F(presentation::NativeCoordinate)\
F(presentation::Point)\
F(presentation::NativePoint)\
F(presentation::Size)\
F(presentation::NativeSize)\
F(presentation::Rect)\
F(presentation::NativeRect)\
F(presentation::Margin)\
F(presentation::NativeMargin)\
F(presentation::FontProperties)\
F(presentation::VKEY)\
F(presentation::GlobalStringKey)\
F(presentation::INativeImageFrame)\
F(presentation::INativeImage)\
F(presentation::INativeImage::FormatType)\
F(presentation::INativeCursor)\
F(presentation::INativeCursor::SystemCursorType)\
F(presentation::INativeWindow)\
F(presentation::INativeWindow::WindowSizeState)\
F(presentation::INativeWindow::WindowMode)\
F(presentation::INativeDelay)\
F(presentation::INativeDelay::ExecuteStatus)\
F(presentation::INativeScreen)\
F(presentation::INativeImageService)\
F(presentation::INativeResourceService)\
F(presentation::INativeAsyncService)\
F(presentation::INativeClipboardReader)\
F(presentation::INativeClipboardWriter)\
F(presentation::INativeClipboardService)\
F(presentation::INativeScreenService)\
F(presentation::INativeInputService)\
F(presentation::INativeDialogService::MessageBoxButtonsInput)\
F(presentation::INativeDialogService::MessageBoxButtonsOutput)\
F(presentation::INativeDialogService::MessageBoxDefaultButton)\
F(presentation::INativeDialogService::MessageBoxIcons)\
F(presentation::INativeDialogService::MessageBoxModalOptions)\
F(presentation::INativeDialogService::ColorDialogCustomColorOptions)\
F(presentation::INativeDialogService::FileDialogTypes)\
F(presentation::INativeDialogService::FileDialogOptions)\
F(presentation::INativeController)\
F(presentation::GuiImageData)\
F(presentation::GuiTextData)\
F(presentation::DocumentFontSize)\
F(presentation::DocumentStyleProperties)\
F(presentation::DocumentRun)\
F(presentation::DocumentContainerRun)\
F(presentation::DocumentContentRun)\
F(presentation::DocumentTextRun)\
F(presentation::DocumentInlineObjectRun)\
F(presentation::DocumentImageRun)\
F(presentation::DocumentEmbeddedObjectRun)\
F(presentation::DocumentStylePropertiesRun)\
F(presentation::DocumentStyleApplicationRun)\
F(presentation::DocumentHyperlinkRun::Package)\
F(presentation::DocumentHyperlinkRun)\
F(presentation::DocumentParagraphRun)\
F(presentation::DocumentStyle)\
F(presentation::DocumentModel)\
F(presentation::GuiResourceNodeBase)\
F(presentation::GuiResourceLocation)\
F(presentation::GuiResourceTextPos)\
F(presentation::GuiResourceError)\
F(presentation::GuiResourceItem)\
F(presentation::GuiResourceFolder)\
F(presentation::GuiResource)\
F(presentation::GuiResourcePathResolver)\
F(presentation::GuiResourceUsage)\
F(presentation::IGuiResourceManager)\
F(presentation::INativeWindowListener::HitTestResult)\
Type List (Elements)
***********************************************************************/
#define GUIREFLECTIONELEMENT_EXTRA_TYPELIST(F)\
F(presentation::elements::IGuiGraphicsElement)\
F(presentation::elements::IGuiGraphicsParagraph)\
F(presentation::elements::IGuiGraphicsParagraph::CaretRelativePosition)\
F(presentation::elements::ElementShapeType)\
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)\
F(presentation::elements::GuiSolidBorderElement)\
F(presentation::elements::Gui3DBorderElement)\
F(presentation::elements::Gui3DSplitterElement)\
F(presentation::elements::GuiSolidBackgroundElement)\
F(presentation::elements::GuiGradientBackgroundElement)\
F(presentation::elements::GuiInnerShadowElement)\
F(presentation::elements::GuiSolidLabelElement)\
F(presentation::elements::GuiImageFrameElement)\
F(presentation::elements::GuiPolygonElement)\
F(presentation::elements::GuiColorizedTextElement)\
F(presentation::elements::GuiDocumentElement)\
#define GUIREFLECTIONELEMENT_TYPELIST(F)\
GUIREFLECTIONELEMENT_CLASS_TYPELIST(F)\
GUIREFLECTIONELEMENT_EXTRA_TYPELIST(F)\
Type List (Compositions)
***********************************************************************/
#define GUIREFLECTIONCOMPOSITION_EXTRA_TYPELIST(F)\
F(presentation::compositions::KeyDirection)\
F(presentation::compositions::IGuiAxis)\
F(presentation::compositions::GuiDefaultAxis)\
F(presentation::compositions::GuiAxis)\
F(presentation::compositions::GuiGraphicsComposition::MinSizeLimitation)\
F(presentation::compositions::GuiStackComposition::Direction)\
F(presentation::compositions::GuiCellOption::ComposeType)\
F(presentation::compositions::GuiCellOption)\
F(presentation::compositions::GuiFlowOption)\
F(presentation::compositions::GuiFlowOption::BaselineType)\
F(presentation::compositions::FlowAlignment)\
F(presentation::compositions::GuiSideAlignedComposition::Direction)\
F(presentation::compositions::ResponsiveDirection)\
F(presentation::compositions::IGuiShortcutKeyItem)\
F(presentation::compositions::IGuiShortcutKeyManager)\
F(presentation::compositions::GuiShortcutKeyManager)\
F(presentation::compositions::IGuiAltAction)\
F(presentation::compositions::IGuiAltActionContainer)\
F(presentation::compositions::IGuiAltActionHost)\
F(presentation::compositions::IGuiTabAction)\
#define GUIREFLECTIONCOMPOSITION_CLASS_TYPELIST(F)\
F(presentation::compositions::GuiGraphicsComposition)\
F(presentation::compositions::GuiGraphicsSite)\
F(presentation::compositions::GuiWindowComposition)\
F(presentation::compositions::GuiBoundsComposition)\
F(presentation::compositions::GuiStackComposition)\
F(presentation::compositions::GuiStackItemComposition)\
F(presentation::compositions::GuiTableComposition)\
F(presentation::compositions::GuiCellComposition)\
F(presentation::compositions::GuiTableSplitterCompositionBase)\
F(presentation::compositions::GuiRowSplitterComposition)\
F(presentation::compositions::GuiColumnSplitterComposition)\
F(presentation::compositions::GuiFlowComposition)\
F(presentation::compositions::GuiFlowItemComposition)\
F(presentation::compositions::GuiSideAlignedComposition)\
F(presentation::compositions::GuiPartialViewComposition)\
F(presentation::compositions::GuiSharedSizeItemComposition)\
F(presentation::compositions::GuiSharedSizeRootComposition)\
F(presentation::compositions::GuiRepeatCompositionBase)\
F(presentation::compositions::GuiRepeatStackComposition)\
F(presentation::compositions::GuiRepeatFlowComposition)\
F(presentation::compositions::GuiResponsiveCompositionBase)\
F(presentation::compositions::GuiResponsiveSharedComposition)\
F(presentation::compositions::GuiResponsiveViewComposition)\
F(presentation::compositions::GuiResponsiveFixedComposition)\
F(presentation::compositions::GuiResponsiveStackComposition)\
F(presentation::compositions::GuiResponsiveGroupComposition)\
F(presentation::compositions::GuiResponsiveContainerComposition)\
#define GUIREFLECTIONCOMPOSITION_TYPELIST(F)\
GUIREFLECTIONCOMPOSITION_CLASS_TYPELIST(F)\
GUIREFLECTIONCOMPOSITION_EXTRA_TYPELIST(F)\
Type List (Events)
***********************************************************************/
#define GUIREFLECTIONEVENT_TYPELIST(F)\
F(presentation::compositions::GuiEventArgs)\
F(presentation::compositions::GuiRequestEventArgs)\
F(presentation::compositions::GuiKeyEventArgs)\
F(presentation::compositions::GuiCharEventArgs)\
F(presentation::compositions::GuiMouseEventArgs)\
F(presentation::compositions::ControlSignal)\
F(presentation::compositions::GuiControlSignalEventArgs)\
F(presentation::compositions::GuiItemEventArgs)\
F(presentation::compositions::GuiItemMouseEventArgs)\
F(presentation::compositions::GuiNodeEventArgs)\
F(presentation::compositions::GuiNodeMouseEventArgs)\
Type List (Templates)
***********************************************************************/
#define GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(F)\
F(presentation::controls::ButtonState)\
F(presentation::controls::ColumnSortingState)\
F(presentation::controls::TabPageOrder)\
F(presentation::templates::BoolOption)\
F(presentation::controls::ITextBoxCommandExecutor)\
F(presentation::controls::IScrollCommandExecutor)\
F(presentation::controls::ITabCommandExecutor)\
F(presentation::controls::IDatePickerCommandExecutor)\
F(presentation::controls::IRibbonGroupCommandExecutor)\
F(presentation::controls::IRibbonGalleryCommandExecutor)\
F(presentation::controls::GuiComponent)\
F(presentation::controls::IGuiAnimation)\
F(presentation::controls::IGuiAnimationCoroutine::IImpl)\
F(presentation::controls::IGuiAnimationCoroutine)\
F(presentation::controls::GuiInstanceRootObject)\
F(presentation::templates::GuiCommonScrollBehavior)\
#define GUIREFLECTIONTEMPLATES_CLASS_TYPELIST(F)\
F(presentation::templates::GuiTemplate)\
F(presentation::templates::GuiListItemTemplate)\
F(presentation::templates::GuiCommonDatePickerLook)\
F(presentation::templates::GuiCommonScrollViewLook)\
GUI_CONTROL_TEMPLATE_DECL(GUIREFLECTIONTEMPLATES_##F)\
GUI_ITEM_TEMPLATE_DECL(GUIREFLECTIONTEMPLATES_##F)\
F(presentation::controls::list::MainColumnVisualizerTemplate)\
F(presentation::controls::list::SubColumnVisualizerTemplate)\
F(presentation::controls::list::HyperlinkVisualizerTemplate)\
F(presentation::controls::list::FocusRectangleVisualizerTemplate)\
F(presentation::controls::list::CellBorderVisualizerTemplate)\
#define GUIREFLECTIONTEMPLATES_TYPELIST(F)\
GUIREFLECTIONTEMPLATES_CLASS_TYPELIST(F)\
GUIREFLECTIONTEMPLATES_EXTRA_TYPELIST(F)\
Type List (Controls)
***********************************************************************/
#define GUIREFLECTIONCONTROLS_EXTRA_TYPELIST(F)\
F(presentation::controls::GuiApplication)\
F(presentation::theme::ThemeName)\
F(presentation::theme::ITheme)\
F(presentation::theme::ThemeTemplates)\
F(presentation::controls::GuiDialogBase)\
F(presentation::controls::GuiMessageDialog)\
F(presentation::controls::GuiColorDialog)\
F(presentation::controls::GuiFontDialog)\
F(presentation::controls::GuiFileDialogBase)\
F(presentation::controls::GuiOpenFileDialog)\
F(presentation::controls::GuiSaveFileDialog)\
F(presentation::controls::GuiSelectableButton::GroupController)\
F(presentation::controls::GuiSelectableButton::MutexGroupController)\
F(presentation::controls::GuiListControl::IItemProviderCallback)\
F(presentation::controls::GuiListControl::IItemArrangerCallback)\
F(presentation::controls::GuiListControl::IItemProvider)\
F(presentation::controls::GuiListControl::EnsureItemVisibleResult)\
F(presentation::controls::GuiListControl::IItemArranger)\
F(presentation::controls::list::ItemProviderBase)\
F(presentation::controls::list::RangedItemArrangerBase)\
F(presentation::controls::list::FreeHeightItemArranger)\
F(presentation::controls::list::FixedHeightItemArranger)\
F(presentation::controls::list::FixedSizeMultiColumnItemArranger)\
F(presentation::controls::list::FixedHeightMultiColumnItemArranger)\
F(presentation::controls::list::ITextItemView)\
F(presentation::controls::list::TextItem)\
F(presentation::controls::list::TextItemProvider)\
F(presentation::controls::TextListView)\
F(presentation::controls::list::IListViewItemView)\
F(presentation::controls::list::ListViewColumnItemArranger)\
F(presentation::controls::list::ListViewColumnItemArranger::IColumnItemViewCallback)\
F(presentation::controls::list::ListViewColumnItemArranger::IColumnItemView)\
F(presentation::controls::list::ListViewItem)\
F(presentation::controls::list::ListViewColumn)\
F(presentation::controls::ListViewView)\
F(presentation::controls::list::ListViewItemProvider)\
F(presentation::controls::IGuiMenuService)\
F(presentation::controls::IGuiMenuService::Direction)\
F(presentation::controls::IGuiMenuDropdownProvider)\
F(presentation::controls::tree::INodeProviderCallback)\
F(presentation::controls::tree::INodeProvider)\
F(presentation::controls::tree::INodeRootProvider)\
F(presentation::controls::tree::INodeItemView)\
F(presentation::controls::tree::NodeItemProvider)\
F(presentation::controls::tree::MemoryNodeProvider)\
F(presentation::controls::tree::NodeRootProviderBase)\
F(presentation::controls::tree::MemoryNodeRootProvider)\
F(presentation::controls::tree::ITreeViewItemView)\
F(presentation::controls::tree::TreeViewItem)\
F(presentation::controls::tree::TreeViewItemRootProvider)\
F(presentation::controls::GuiToolstripCommand)\
F(presentation::controls::RibbonButtonSize)\
F(presentation::controls::GalleryPos)\
F(presentation::controls::list::GalleryGroup)\
F(presentation::controls::list::GroupedDataSource)\
F(presentation::controls::GuiDocumentItem)\
F(presentation::controls::GuiDocumentCommonInterface)\
F(presentation::controls::GuiDocumentCommonInterface::EditMode)\
F(presentation::controls::GuiTextBoxCommonInterface)\
F(presentation::controls::list::IDataGridContext)\
F(presentation::controls::list::IDataVisualizerFactory)\
F(presentation::controls::list::IDataVisualizer)\
F(presentation::controls::list::IDataEditorFactory)\
F(presentation::controls::list::IDataEditor)\
F(presentation::controls::list::IDataGridView)\
F(presentation::controls::list::DataVisualizerBase)\
F(presentation::controls::list::DataVisualizerFactory)\
F(presentation::controls::list::DataEditorBase)\
F(presentation::controls::list::DataEditorFactory)\
F(presentation::controls::list::IDataProcessorCallback)\
F(presentation::controls::list::IDataFilter)\
F(presentation::controls::list::IDataSorter)\
F(presentation::controls::list::DataFilterBase)\
F(presentation::controls::list::DataMultipleFilter)\
F(presentation::controls::list::DataAndFilter)\
F(presentation::controls::list::DataOrFilter)\
F(presentation::controls::list::DataNotFilter)\
F(presentation::controls::list::DataSorterBase)\
F(presentation::controls::list::DataMultipleSorter)\
F(presentation::controls::list::DataReverseSorter)\
F(presentation::controls::list::DataColumn)\
F(presentation::controls::list::DataProvider)\
#define GUIREFLECTIONCONTROLS_CLASS_TYPELIST(F)\
F(presentation::controls::GuiDisposedFlag)\
F(presentation::controls::GuiControl)\
F(presentation::controls::GuiCustomControl)\
F(presentation::controls::GuiLabel)\
F(presentation::controls::GuiButton)\
F(presentation::controls::GuiSelectableButton)\
F(presentation::controls::GuiScroll)\
F(presentation::controls::GuiTabPage)\
F(presentation::controls::GuiTab)\
F(presentation::controls::GuiScrollView)\
F(presentation::controls::GuiScrollContainer)\
F(presentation::controls::GuiControlHost)\
F(presentation::controls::GuiWindow)\
F(presentation::controls::GuiPopup)\
F(presentation::controls::GuiTooltip)\
F(presentation::controls::GuiListControl)\
F(presentation::controls::GuiSelectableListControl)\
F(presentation::controls::GuiVirtualTextList)\
F(presentation::controls::GuiTextList)\
F(presentation::controls::GuiListViewColumnHeader)\
F(presentation::controls::GuiListViewBase)\
F(presentation::controls::GuiVirtualListView)\
F(presentation::controls::GuiListView)\
F(presentation::controls::GuiMenu)\
F(presentation::controls::GuiMenuBar)\
F(presentation::controls::GuiMenuButton)\
F(presentation::controls::GuiVirtualTreeListControl)\
F(presentation::controls::GuiVirtualTreeView)\
F(presentation::controls::GuiTreeView)\
F(presentation::controls::GuiComboBoxBase)\
F(presentation::controls::GuiComboBoxListControl)\
F(presentation::controls::GuiToolstripMenu)\
F(presentation::controls::GuiToolstripMenuBar)\
F(presentation::controls::GuiToolstripToolBar)\
F(presentation::controls::GuiToolstripButton)\
F(presentation::controls::GuiToolstripNestedContainer)\
F(presentation::controls::GuiToolstripGroupContainer)\
F(presentation::controls::GuiToolstripGroup)\
F(presentation::controls::GuiRibbonTab)\
F(presentation::controls::GuiRibbonTabPage)\
F(presentation::controls::GuiRibbonGroup)\
F(presentation::controls::GuiRibbonIconLabel)\
F(presentation::controls::GuiRibbonButtons)\
F(presentation::controls::GuiRibbonToolstrips)\
F(presentation::controls::GuiRibbonGallery)\
F(presentation::controls::GuiRibbonToolstripMenu)\
F(presentation::controls::GuiBindableRibbonGalleryList)\
F(presentation::controls::GuiDocumentViewer)\
F(presentation::controls::GuiDocumentLabel)\
F(presentation::controls::GuiMultilineTextBox)\
F(presentation::controls::GuiSinglelineTextBox)\
F(presentation::controls::GuiVirtualDataGrid)\
F(presentation::controls::GuiDatePicker)\
F(presentation::controls::GuiDateComboBox)\
F(presentation::controls::GuiBindableTextList)\
F(presentation::controls::GuiBindableListView)\
F(presentation::controls::GuiBindableTreeView)\
F(presentation::controls::GuiBindableDataGrid)\
#define GUIREFLECTIONCONTROLS_TYPELIST(F)\
GUIREFLECTIONCONTROLS_CLASS_TYPELIST(F)\
GUIREFLECTIONCONTROLS_EXTRA_TYPELIST(F)\
Type List
***********************************************************************/
#define GUIREFLECTIONHELPERTYPES_TYPELIST(F)\
F(presentation::helper_types::SiteValue)\
#define GUIREFLECTIONTEMPLATES_DECL_TYPE_INFO(NAME, BASE) DECL_TYPE_INFO(presentation::templates::NAME)
#undef GUIREFLECTIONTEMPLATES_DECL_TYPE_INFO
#ifdef VCZH_DESCRIPTABLEOBJECT_WITH_METADATA
#pragma warning(push) #pragma warning(disable:
4250
)
GuiEventInfoImpl
***********************************************************************/
template
<
typename
T
>
class
GuiEventInfoImpl
:
public
EventInfoImpl
,
private
IEventInfo
::
ICpp
{
using
GuiGraphicsComposition
=
presentation
::
compositions
::
GuiGraphicsComposition
;
template
<
typename
U
>
using
GuiGraphicsEvent
=
presentation
::
compositions
::
GuiGraphicsEvent
<
U
>;
protected
:
typedef
Func
<
GuiGraphicsEvent
<
T
>*(
DescriptableObject
*,
bool
)>
EventRetriverFunction
;
EventRetriverFunction
eventRetriver
;
Ptr
<
IEventHandler
>
AttachInternal
(
DescriptableObject
*
thisObject
,
Ptr
<
IValueFunctionProxy
>
handler
)
override
{
GuiGraphicsEvent
<
T
>*
eventObject
=
eventRetriver
(
thisObject
,
true
);
auto
func
= [=](
GuiGraphicsComposition
*
sender
,
T
*
arguments
) {
Value
senderObject
=
BoxValue
<
GuiGraphicsComposition
*>(
sender
,
Description
<
GuiGraphicsComposition
>::
GetAssociatedTypeDescriptor
());
Value
argumentsObject
=
BoxValue
<
T
*>(
arguments
,
Description
<
T
>::
GetAssociatedTypeDescriptor
());
auto
eventArgs
=
IValueList
::
Create
();
eventArgs
-
>
Add
(
senderObject
);
eventArgs
-
>
Add
(
argumentsObject
);
handler
-
>
Invoke
(
eventArgs
); };
return
__vwsn
::
EventAttach
(*
eventObject
,
func
); }
bool
DetachInternal
(
DescriptableObject
*
thisObject
,
Ptr
<
IEventHandler
>
handler
)
override
{
GuiGraphicsEvent
<
T
>*
eventObject
=
eventRetriver
(
thisObject
,
false
);
if
(
eventObject
) {
return
__vwsn
::
EventDetach
(*
eventObject
,
handler
); }
return
false
; }
void
InvokeInternal
(
DescriptableObject
*
thisObject
,
Ptr
<
IValueList
>
arguments
)
override
{
GuiGraphicsEvent
<
T
>*
eventObject
=
eventRetriver
(
thisObject
,
false
);
if
(
eventObject
) {
auto
sender
=
UnboxValue
<
GuiGraphicsComposition
*>(
arguments
-
>
Get
(
0
),
Description
<
GuiGraphicsComposition
>::
GetAssociatedTypeDescriptor
());
auto
value
=
UnboxValue
<
T
*>(
arguments
-
>
Get
(
1
),
Description
<
T
>::
GetAssociatedTypeDescriptor
());
eventObject
->
ExecuteWithNewSender
(*
value
,
sender
); } }
Ptr
<
ITypeInfo
>
GetHandlerTypeInternal
()
override
{
return
TypeInfoRetriver
<
Func
<
void
(
GuiGraphicsComposition
*,
T
*)>>::
CreateTypeInfo
(); }
protected
:
bool
isCompositionEvent
;
static
WString
attachTemplate
;
static
WString
detachTemplate
;
static
WString
invokeTemplate
;
public
:
GuiEventInfoImpl
(
ITypeDescriptor
*
_ownerTypeDescriptor
,
const
WString
&
_name
,
const
EventRetriverFunction
&
_eventRetriver
,
bool
_isCompositionEvent
) :
EventInfoImpl
(
_ownerTypeDescriptor
,
_name
) , eventRetriver(
_eventRetriver
) , isCompositionEvent(
_isCompositionEvent
) { }
~
GuiEventInfoImpl
() { }
IEventInfo
::
ICpp
*
GetCpp
()
override
{
return
isCompositionEvent
?
this
:
nullptr
; }
const
WString
&
GetAttachTemplate
()
override
{
return
attachTemplate
; }
const
WString
&
GetDetachTemplate
()
override
{
return
detachTemplate
; }
const
WString
&
GetInvokeTemplate
()
override
{
return
invokeTemplate
; } };
template
<
typename
T
>
WString
GuiEventInfoImpl
<
T
>::
attachTemplate
(
L"::vl::__vwsn::EventAttach($This->GetEventReceiver()->$Name, $Handler)"
,
false
);
template
<
typename
T
>
WString
GuiEventInfoImpl
<
T
>::
detachTemplate
(
L"::vl::__vwsn::EventDetach($This->GetEventReceiver()->$Name, $Handler)"
,
false
);
template
<
typename
T
>
WString
GuiEventInfoImpl
<
T
>::
invokeTemplate
(
L"::vl::__vwsn::EventInvoke($This->GetEventReceiver()->$Name, $Handler)"
,
false
);
template
<
typename
T
>
struct
GuiEventArgumentTypeRetriver
{
typedef
vint
Type
; };
template
<
typename
TClass
,
typename
TEvent
>
struct
GuiEventArgumentTypeRetriver
<
TEvent
TClass
::*> {
typedef
typename
TEvent
::ArgumentType
Type
; };
Macros
***********************************************************************/
#define CLASS_MEMBER_GUIEVENT(EVENTNAME)\
AddEvent(\
new GuiEventInfoImpl<GuiEventArgumentTypeRetriver<decltype(&ClassType::EVENTNAME)>::Type>(\
this,\
L ## #EVENTNAME,\
[](DescriptableObject* thisObject, bool addEventHandler){\
return &thisObject->SafeAggregationCast<ClassType>()->EVENTNAME;\
},\
false\
)\
);\
#define CLASS_MEMBER_GUIEVENT_COMPOSITION(EVENTNAME)\
AddEvent(\
new GuiEventInfoImpl<GuiEventArgumentTypeRetriver<decltype(&GuiGraphicsEventReceiver::EVENTNAME)>::Type>(\
this,\
L ## #EVENTNAME,\
[](DescriptableObject* thisObject, bool addEventHandler){\
GuiGraphicsComposition* composition=thisObject->SafeAggregationCast<GuiGraphicsComposition>();\
if(!addEventHandler && !composition->HasEventReceiver())\
{\
return (GuiGraphicsEvent<GuiEventArgumentTypeRetriver<decltype(&GuiGraphicsEventReceiver::EVENTNAME)>::Type>*)0;\
}\
return &composition->GetEventReceiver()->EVENTNAME;\
},\
true\
)\
);\
#define CLASS_MEMBER_PROPERTY_GUIEVENT_FAST(PROPERTYNAME)\
CLASS_MEMBER_GUIEVENT(PROPERTYNAME##Changed)\
CLASS_MEMBER_PROPERTY_EVENT_FAST(PROPERTYNAME, PROPERTYNAME##Changed)\
#define CLASS_MEMBER_PROPERTY_GUIEVENT_READONLY_FAST(PROPERTYNAME)\
CLASS_MEMBER_GUIEVENT(PROPERTYNAME##Changed)\
CLASS_MEMBER_PROPERTY_EVENT_READONLY_FAST(PROPERTYNAME, PROPERTYNAME##Changed)\
#define GUIEVENT_HANDLER_PARAMETERS {L"sender", L"arguments"}
#define CLASS_MEMBER_GUIEVENT_HANDLER(FUNCTIONNAME, ARGUMENTTYPE)\
CLASS_MEMBER_EXTERNALMETHOD_INVOKETEMPLATE(\
FUNCTIONNAME,\
GUIEVENT_HANDLER_PARAMETERS,\
void(ClassType::*)(vl::presentation::compositions::GuiGraphicsComposition*, ARGUMENTTYPE*),\
[](ClassType* owner, vl::presentation::compositions::GuiGraphicsComposition* sender, ARGUMENTTYPE* arguments)\
{\
owner->FUNCTIONNAME(sender, *arguments);\
},\
L"[](auto owner, auto sender, auto arguments){ return owner->$Name(sender, *arguments); }($This, $Arguments)")\
Interface Proxy (Compositions)
***********************************************************************/
void
Start
()
override
{ }
void
Pause
()
override
{ }
void
Resume
()
override
{ }
void
Run
()
override
{ }
bool
GetStopped
()
override
{ }
presentation
::
Size
RealSizeToVirtualSize
(
presentation
::
Size
size
)
override
{ }
presentation
::
Size
VirtualSizeToRealSize
(
presentation
::
Size
size
)
override
{ }
presentation
::
Point
RealPointToVirtualPoint
(
presentation
::
Size
realFullSize
,
presentation
::
Point
point
)
override
{ }
presentation
::
Point
VirtualPointToRealPoint
(
presentation
::
Size
realFullSize
,
presentation
::
Point
point
)
override
{ }
presentation
::
Rect
RealRectToVirtualRect
(
presentation
::
Size
realFullSize
,
presentation
::
Rect
rect
)
override
{ }
presentation
::
Rect
VirtualRectToRealRect
(
presentation
::
Size
realFullSize
,
presentation
::
Rect
rect
)
override
{ }
presentation
::
Margin
RealMarginToVirtualMargin
(
presentation
::
Margin
margin
)
override
{ }
presentation
::
Margin
VirtualMarginToRealMargin
(
presentation
::
Margin
margin
)
override
{ }
presentation
::
compositions
::
KeyDirection
RealKeyDirectionToVirtualKeyDirection
(
presentation
::
compositions
::
KeyDirection
key
)
override
{ }
Interface Proxy (Controls)
***********************************************************************/
void
OnAttached
(
presentation
::
controls
::
GuiListControl
::
IItemProvider
*
provider
)
override
{ }
void
OnItemModified
(
vint
start
,
vint
count
,
vint
newCount
)
override
{ }
bool
AttachCallback
(
presentation
::
controls
::
GuiListControl
::
IItemProviderCallback
*
value
)
override
{ }
bool
DetachCallback
(
presentation
::
controls
::
GuiListControl
::
IItemProviderCallback
*
value
)
override
{ }
void
PushEditing
()
override
{ }
bool
PopEditing
()
override
{ }
bool
IsEditing
()
override
{ }
vint
Count
()
override
{ }
WString
GetTextValue
(
vint
itemIndex
)
override
{ }
description
::
Value
GetBindingValue
(
vint
itemIndex
)
override
{ }
IDescriptable
*
RequestView
(
const
WString
&
identifier
)
override
{ }
presentation::controls::GuiListControl::IItemProviderCallback
)
void
AttachListControl
(
presentation
::
controls
::
GuiListControl
*
value
)
override
{ }
void
DetachListControl
()
override
{ }
presentation
::
controls
::
GuiListControl
::
IItemArrangerCallback
*
GetCallback
()
override
{ }
void
SetCallback
(
presentation
::
controls
::
GuiListControl
::
IItemArrangerCallback
*
value
)
override
{ }
presentation
::
Size
GetTotalSize
()
override
{ }
presentation
::
controls
::
GuiListControl
::
ItemStyle
*
GetVisibleStyle
(
vint
itemIndex
)
override
{ }
vint
GetVisibleIndex
(
presentation
::
controls
::
GuiListControl
::
ItemStyle
*
style
)
override
{ }
void
ReloadVisibleStyles
()
override
{ }
void
OnViewChanged
(
presentation
::
Rect
bounds
)
override
{ }
vint
FindItem
(
vint
itemIndex
,
presentation
::
compositions
::
KeyDirection
key
)
override
{ }
presentation
::
controls
::
GuiListControl
::
EnsureItemVisibleResult
EnsureItemVisible
(
vint
itemIndex
)
override
{ }
presentation
::
Size
GetAdoptedSize
(
presentation
::
Size
expectedSize
)
override
{ }
bool
GetChecked
(
vint
itemIndex
)
override
{ }
void
SetChecked
(
vint
itemIndex
,
bool
value
)
override
{ }
Ptr
<
presentation
::
GuiImageData
>
GetSmallImage
(
vint
itemIndex
)
override
{ }
Ptr
<
presentation
::
GuiImageData
>
GetLargeImage
(
vint
itemIndex
)
override
{ }
WString
GetText
(
vint
itemIndex
)
override
{ }
WString
GetSubItem
(
vint
itemIndex
,
vint
index
)
override
{ }
vint
GetDataColumnCount
()
override
{ }
vint
GetDataColumn
(
vint
index
)
override
{ }
vint
GetColumnCount
()
override
{ }
WString
GetColumnText
(
vint
index
)
override
{ }
bool
AttachCallback
(
presentation
::
controls
::
list
::
ListViewColumnItemArranger
::
IColumnItemViewCallback
*
value
)
override
{ }
bool
DetachCallback
(
presentation
::
controls
::
list
::
ListViewColumnItemArranger
::
IColumnItemViewCallback
*
value
)
override
{ }
vint
GetColumnSize
(
vint
index
)
override
{ }
void
SetColumnSize
(
vint
index
,
vint
value
)
override
{ }
presentation
::
controls
::
GuiMenu
*
GetDropdownPopup
(
vint
index
)
override
{ }
presentation
::
controls
::
ColumnSortingState
GetSortingState
(
vint
index
)
override
{ }
bool
GetExpanding
()
override
{ }
void
SetExpanding
(
bool
value
)
override
{ }
vint
CalculateTotalVisibleNodes
()
override
{ }
vint
GetChildCount
()
override
{ }
Ptr
<
presentation
::
controls
::
tree
::
INodeProvider
>
GetParent
()
override
{ }
Ptr
<
presentation
::
controls
::
tree
::
INodeProvider
>
GetChild
(
vint
index
)
override
{ }
Ptr
<
presentation
::
controls
::
tree
::
INodeProvider
>
GetRootNode
()
override
{ }
bool
CanGetNodeByVisibleIndex
()
override
{ }
Ptr
<
presentation
::
controls
::
tree
::
INodeProvider
>
GetNodeByVisibleIndex
(
vint
index
)
override
{ }
bool
AttachCallback
(
presentation
::
controls
::
tree
::
INodeProviderCallback
*
value
)
override
{ }
bool
DetachCallback
(
presentation
::
controls
::
tree
::
INodeProviderCallback
*
value
)
override
{ }
WString
GetTextValue
(
presentation
::
controls
::
tree
::
INodeProvider
*
node
)
override
{ }
description
::
Value
GetBindingValue
(
presentation
::
controls
::
tree
::
INodeProvider
*
node
)
override
{ }
IDescriptable
*
RequestView
(
const
WString
&
identifier
)
override
{ }
Ptr
<
presentation
::
controls
::
tree
::
INodeProvider
>
RequestNode
(
vint
index
)
override
{ }
vint
CalculateNodeVisibilityIndex
(
presentation
::
controls
::
tree
::
INodeProvider
*
node
)
override
{ }
Ptr
<
presentation
::
GuiImageData
>
GetNodeImage
(
presentation
::
controls
::
tree
::
INodeProvider
*
node
)
override
{ }
presentation
::
controls
::
GuiListControl
::
IItemProvider
*
GetItemProvider
()
override
{ }
presentation
::
templates
::
GuiListViewTemplate
*
GetListViewControlTemplate
()
override
{ }
void
RequestSaveData
()
override
{ }
bool
IsColumnSortable
(
vint
column
)
override
{ }
void
SortByColumn
(
vint
column
,
bool
ascending
)
override
{ }
vint
GetSortedColumn
()
override
{ }
bool
IsSortOrderAscending
()
override
{ }
vint
GetCellSpan
(
vint
row
,
vint
column
)
override
{ }
presentation
::
controls
::
list
::
IDataVisualizerFactory
*
GetCellDataVisualizerFactory
(
vint
row
,
vint
column
)
override
{ }
presentation
::
controls
::
list
::
IDataEditorFactory
*
GetCellDataEditorFactory
(
vint
row
,
vint
column
)
override
{ }
Value
GetBindingCellValue
(
vint
row
,
vint
column
)
override
{ }
void
SetBindingCellValue
(
vint
row
,
vint
column
,
const
Value
&
value
)
override
{ }
presentation
::
controls
::
GuiListControl
::
IItemProvider
*
GetItemProvider
()
override
{ }
void
OnProcessorChanged
()
override
{ }
void
SetCallback
(
presentation
::
controls
::
list
::
IDataProcessorCallback
*
value
)
override
{ }
bool
Filter
(
const
Value
&
row
)
override
{ }
void
SetCallback
(
presentation
::
controls
::
list
::
IDataProcessorCallback
*
value
)
override
{ }
vint
Compare
(
const
Value
&
row1
,
const
Value
&
row2
)
override
{ } #pragma warning(pop)
#endif
#endif
} } }
#endif