Add IgnoreChildControlMouseEvents; demo: control_basic_button

This commit is contained in:
Zihan Chen
2021-06-17 16:11:33 -07:00
parent 044cbb3a15
commit 27b5e051ae
12 changed files with 184 additions and 50 deletions
+27 -12
View File
@@ -1577,15 +1577,15 @@ GuiButton
void GuiButton::OnLeftButtonDown(compositions::GuiGraphicsComposition* sender, compositions::GuiMouseEventArgs& arguments)
{
if(arguments.eventSource==boundsComposition)
if (arguments.eventSource == boundsComposition || !ignoreChildControlMouseEvents)
{
mousePressing=true;
mousePressing = true;
if (autoFocus)
{
SetFocus();
}
UpdateControlState();
if(!clickOnMouseUp)
if (!clickOnMouseUp)
{
CheckAndClick(arguments);
}
@@ -1594,14 +1594,14 @@ GuiButton
void GuiButton::OnLeftButtonUp(compositions::GuiGraphicsComposition* sender, compositions::GuiMouseEventArgs& arguments)
{
if(arguments.eventSource==boundsComposition)
if (arguments.eventSource == boundsComposition || !ignoreChildControlMouseEvents)
{
mousePressing=false;
mousePressing = false;
UpdateControlState();
}
if(GetVisuallyEnabled())
if (GetVisuallyEnabled())
{
if(mouseHoving && clickOnMouseUp)
if (mouseHoving && clickOnMouseUp)
{
CheckAndClick(arguments);
}
@@ -1610,18 +1610,18 @@ GuiButton
void GuiButton::OnMouseEnter(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments)
{
if(arguments.eventSource==boundsComposition)
if (arguments.eventSource == boundsComposition || !ignoreChildControlMouseEvents)
{
mouseHoving=true;
mouseHoving = true;
UpdateControlState();
}
}
void GuiButton::OnMouseLeave(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments)
{
if(arguments.eventSource==boundsComposition)
if (arguments.eventSource == boundsComposition || !ignoreChildControlMouseEvents)
{
mouseHoving=false;
mouseHoving = false;
UpdateControlState();
}
}
@@ -1717,6 +1717,16 @@ GuiButton
autoFocus = value;
}
bool GuiButton::GetIgnoreChildControlMouseEvents()
{
return ignoreChildControlMouseEvents;
}
void GuiButton::SetIgnoreChildControlMouseEvents(bool value)
{
ignoreChildControlMouseEvents = value;
}
/***********************************************************************
GuiSelectableButton::GroupController
***********************************************************************/
@@ -20785,7 +20795,10 @@ GuiMenuButton
GuiMenuButton::~GuiMenuButton()
{
DetachSubMenu();
if (!subMenuDisposeFlag || !subMenuDisposeFlag->IsDisposed())
{
DetachSubMenu();
}
}
Ptr<GuiImageData> GuiMenuButton::GetLargeImage()
@@ -20859,11 +20872,13 @@ GuiMenuButton
if(subMenu)
{
DetachSubMenu();
subMenuDisposeFlag = nullptr;
}
subMenu=value;
ownedSubMenu=owned;
if(subMenu)
{
subMenuDisposeFlag = subMenu->GetDisposedFlag();
subMenuWindowOpenedHandler = subMenu->WindowOpened.AttachMethod(this, &GuiMenuButton::OnSubMenuWindowOpened);
subMenuWindowClosedHandler = subMenu->WindowClosed.AttachMethod(this, &GuiMenuButton::OnSubMenuWindowClosed);
}
+29 -16
View File
@@ -1200,7 +1200,7 @@ Basic Construction
virtual void SetOwnerComposition(compositions::GuiGraphicsComposition* composition) = 0;
public:
/// <summary>
/// Access the associated <see cref="IGuiGraphicsRenderer"></see> for this graphics element.
/// Access the associated <see cref="IGuiGraphicsRenderer"/> for this graphics element.
/// </summary>
/// <returns>Returns the related renderer.</returns>
virtual IGuiGraphicsRenderer* GetRenderer() = 0;
@@ -1218,13 +1218,13 @@ Basic Construction
{
public:
/// <summary>
/// Access the graphics <see cref="IGuiGraphicsRendererFactory"></see> that is used to create this graphics renderer.
/// Access the graphics <see cref="IGuiGraphicsRendererFactory"/> that is used to create this graphics renderer.
/// </summary>
/// <returns>Returns the related factory.</returns>
virtual IGuiGraphicsRendererFactory* GetFactory()=0;
/// <summary>
/// Initialize the grpahics renderer by binding a <see cref="IGuiGraphicsElement"></see> to it.
/// Initialize the grpahics renderer by binding a <see cref="IGuiGraphicsElement"/> to it.
/// </summary>
/// <param name="element">The graphics element to bind.</param>
virtual void Initialize(IGuiGraphicsElement* element)=0;
@@ -1233,7 +1233,7 @@ Basic Construction
/// </summary>
virtual void Finalize()=0;
/// <summary>
/// Set a <see cref="IGuiGraphicsRenderTarget"></see> to this element.
/// Set a <see cref="IGuiGraphicsRenderTarget"/> to this element.
/// </summary>
/// <param name="renderTarget">The graphics render target. It can be NULL.</param>
virtual void SetRenderTarget(IGuiGraphicsRenderTarget* renderTarget)=0;
@@ -1261,7 +1261,7 @@ Basic Construction
{
public:
/// <summary>
/// Create a <see cref="IGuiGraphicsRenderer"></see>.
/// Create a <see cref="IGuiGraphicsRenderer"/>.
/// </summary>
/// <returns>Returns the created graphics renderer.</returns>
virtual IGuiGraphicsRenderer* Create()=0;
@@ -5543,20 +5543,20 @@ Resource Manager
/// <returns>A number identifies this element type.</returns>
vint RegisterElementType(const WString& elementTypeName);
/// <summary>
/// Register a <see cref="IGuiGraphicsRendererFactory"></see> and bind it to an registered element type from <see cref="RegisterElementType"></see>.
/// Register a <see cref="IGuiGraphicsRendererFactory"/> and bind it to an registered element type from <see cref="RegisterElementType"/>.
/// This function crashes when an element type has already been binded a renderer factory.
/// </summary>
/// <param name="elementType">The element type to represent a graphics element factory.</param>
/// <param name="factory">The instance of the graphics renderer factory to register.</param>
void RegisterRendererFactory(vint elementType, Ptr<IGuiGraphicsRendererFactory> factory);
/// <summary>
/// Get the instance of a registered <see cref="IGuiGraphicsRendererFactory"></see> that is binded to a specified element type.
/// Get the instance of a registered <see cref="IGuiGraphicsRendererFactory"/> that is binded to a specified element type.
/// </summary>
/// <returns>Returns the renderer factory.</returns>
/// <param name="elementType">The registered element type from <see cref="RegisterElementType"> to get a binded graphics renderer factory.</param>
/// <param name="elementType">The registered element type from <see cref="RegisterElementType"/> to get a binded graphics renderer factory.</param>
IGuiGraphicsRendererFactory* GetRendererFactory(vint elementType);
/// <summary>
/// Get the instance of a <see cref="IGuiGraphicsRenderTarget"></see> that is binded to an <see cref="INativeWindow"></see>.
/// Get the instance of a <see cref="IGuiGraphicsRenderTarget"/> that is binded to an <see cref="INativeWindow"/>.
/// </summary>
/// <param name="window">The specified window.</param>
/// <returns>Returns the render target.</returns>
@@ -5579,12 +5579,12 @@ Resource Manager
};
/// <summary>
/// Get the current <see cref="GuiGraphicsResourceManager"></see>.
/// Get the current <see cref="GuiGraphicsResourceManager"/>.
/// </summary>
/// <returns>Returns the current resource manager.</returns>
extern GuiGraphicsResourceManager* GetGuiGraphicsResourceManager();
/// <summary>
/// Set the current <see cref="GuiGraphicsResourceManager"></see>.
/// Set the current <see cref="GuiGraphicsResourceManager"/>.
/// </summary>
/// <param name="resourceManager">The resource manager to set.</param>
extern void SetGuiGraphicsResourceManager(GuiGraphicsResourceManager* resourceManager);
@@ -7864,7 +7864,7 @@ Elements
***********************************************************************/
/// <summary>
/// Defines a shape for some <see cref="IGuiGraphicsElement"></see>.
/// Defines a shape for some <see cref="IGuiGraphicsElement"/>.
/// </summary>
enum class ElementShapeType
{
@@ -7877,7 +7877,7 @@ Elements
};
/// <summary>
/// Defines a shape for some <see cref="IGuiGraphicsElement"></see>.
/// Defines a shape for some <see cref="IGuiGraphicsElement"/>.
/// </summary>
struct ElementShape
{
@@ -7983,7 +7983,7 @@ Elements
DEFINE_GUI_GRAPHICS_ELEMENT(Gui3DSplitterElement, L"3DSplitter")
public:
/// <summary>
/// Defines a direction of the <see cref="Gui3DSplitterElement"></see>.
/// Defines a direction of the <see cref="Gui3DSplitterElement"/>.
/// </summary>
enum Direction
{
@@ -8080,7 +8080,7 @@ Elements
DEFINE_GUI_GRAPHICS_ELEMENT(GuiGradientBackgroundElement, L"GradientBackground")
public:
/// <summary>
/// Defines a direction of the <see cref="GuiGradientBackgroundElement"></see>.
/// Defines a direction of the <see cref="GuiGradientBackgroundElement"/>.
/// </summary>
enum Direction
{
@@ -10278,6 +10278,7 @@ Buttons
GUI_SPECIFY_CONTROL_TEMPLATE_TYPE(ButtonTemplate, GuiControl)
protected:
bool clickOnMouseUp = true;
bool ignoreChildControlMouseEvents = true;
bool autoFocus = true;
bool keyPressing = false;
bool mousePressing = false;
@@ -10313,11 +10314,22 @@ Buttons
void SetClickOnMouseUp(bool value);
/// <summary>Test if the button gets focus when it is clicked.</summary>
/// <returns>Returns true if the button gets focus when it is clicked</returns>
/// <returns>Returns true if the button gets focus when it is clicked.</returns>
bool GetAutoFocus();
/// <summary>Set if the button gets focus when it is clicked.</summary>
/// <param name="value">Set to true to make this button get focus when it is clicked.</param>
void SetAutoFocus(bool value);
/// <summary>
/// Test if the button ignores mouse events raised in child controls.
/// When this property is false,
/// the button reacts to mouse operations even when it happens on contained child controls.
/// </summary>
/// <returns>Returns true if the button ignores mouse events raised in child controls.</returns>
bool GetIgnoreChildControlMouseEvents();
/// <summary>Set if the button ignores mouse events raised in child controls.</summary>
/// <param name="value">Set to true to make this button ignore mouse events raised in child controls.</param>
void SetIgnoreChildControlMouseEvents(bool value);
};
/// <summary>A <see cref="GuiButton"/> with a selection state.</summary>
@@ -15801,6 +15813,7 @@ MenuButton
using IEventHandler = compositions::IGuiGraphicsEventHandler;
protected:
Ptr<GuiDisposedFlag> subMenuDisposeFlag;
Ptr<IEventHandler> subMenuWindowOpenedHandler;
Ptr<IEventHandler> subMenuWindowClosedHandler;
Ptr<IEventHandler> hostClickedHandler;
+1
View File
@@ -2182,6 +2182,7 @@ Type Declaration (Class)
CLASS_MEMBER_PROPERTY_FAST(ClickOnMouseUp)
CLASS_MEMBER_PROPERTY_FAST(AutoFocus)
CLASS_MEMBER_PROPERTY_FAST(IgnoreChildControlMouseEvents)
END_CLASS_MEMBER(GuiButton)
BEGIN_CLASS_MEMBER(GuiSelectableButton)
+10 -19
View File
@@ -8308,9 +8308,6 @@ WindowsForm
bool HandleMessageInternal(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result)
{
bool transferFocusEvent = false;
bool nonClient = false;
// handling popup windows
{
bool closeChildPopups = false;
@@ -8325,6 +8322,9 @@ WindowsForm
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_NCLBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_NCRBUTTONDOWN:
closeChildPopups = true;
break;
}
@@ -8353,19 +8353,8 @@ WindowsForm
}
}
switch(uMsg)
{
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_LBUTTONDBLCLK:
case WM_RBUTTONDOWN:
case WM_RBUTTONUP:
case WM_RBUTTONDBLCLK:
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_MBUTTONDBLCLK:
transferFocusEvent=true;
}
bool nonClient = false;
switch(uMsg)
{
// ************************************** moving and sizing
@@ -8444,7 +8433,7 @@ WindowsForm
}
break;
case WM_MOUSEACTIVATE:
if (!IsEnabledActivate())
if (!enabledActivate)
{
result = MA_NOACTIVATE;
return true;
@@ -8915,6 +8904,7 @@ WindowsForm
bool mouseHoving = false;
Interface* graphicsHandler = nullptr;
bool customFrameMode = false;
bool enabledActivate = true;
List<Ptr<INativeMessageHandler>> messageHandlers;
bool supressingAlt = false;
Ptr<bool> flagDisposed = new bool(false);
@@ -8941,7 +8931,6 @@ WindowsForm
DWORD exStyle = WS_EX_APPWINDOW | WS_EX_CONTROLPARENT;
DWORD style = WS_BORDER | WS_CAPTION | WS_SIZEBOX | WS_SYSMENU | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
handle = CreateWindowEx(exStyle, className.Buffer(), L"", style, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent, NULL, hInstance, NULL);
UpdateDpiAwaredFields(true);
}
@@ -9544,17 +9533,19 @@ WindowsForm
void EnableActivate()override
{
enabledActivate = true;
SetExStyle(WS_EX_NOACTIVATE, false);
}
void DisableActivate()override
{
enabledActivate = false;
SetExStyle(WS_EX_NOACTIVATE, true);
}
bool IsEnabledActivate()override
{
return !GetExStyle(WS_EX_NOACTIVATE);
return enabledActivate;
}
bool RequireCapture()override
+45 -3
View File
@@ -24043,6 +24043,16 @@ Class (::darkskin::ButtonTemplateConstructor)
{
::vl::__vwsn::This(this->__vwsn_precompile_5)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_6));
}
(this->container = new ::vl::presentation::compositions::GuiBoundsComposition());
{
::vl::__vwsn::This(this->container)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(this->container)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_5)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
{
::vl::__vwsn::This(this->self)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_5));
}
@@ -24076,10 +24086,14 @@ Class (::darkskin::ButtonTemplateConstructor)
::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf61_DarkSkin_darkskin_ButtonTemplateConstructor___vwsn_darkskin_ButtonTemplate_Initialize_(this)));
::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_);
}
{
::vl::__vwsn::This(this->self)->SetContainerComposition(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
}
ButtonTemplateConstructor::ButtonTemplateConstructor()
: self(static_cast<::darkskin::ButtonTemplate*>(nullptr))
: container(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
, self(static_cast<::darkskin::ButtonTemplate*>(nullptr))
, __vwsn_precompile_0(::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement>())
, __vwsn_precompile_1(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
, __vwsn_precompile_2(::vl::Ptr<::vl::presentation::elements::GuiSolidBorderElement>())
@@ -24235,6 +24249,16 @@ Class (::darkskin::CheckBoxTemplateConstructor)
{
::vl::__vwsn::This(this->__vwsn_precompile_12)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_13));
}
(this->container = new ::vl::presentation::compositions::GuiBoundsComposition());
{
::vl::__vwsn::This(this->container)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(this->container)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
{
::vl::__vwsn::This(this->__vwsn_precompile_9)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_12));
}
@@ -24287,10 +24311,14 @@ Class (::darkskin::CheckBoxTemplateConstructor)
::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf69_DarkSkin_darkskin_CheckBoxTemplateConstructor___vwsn_darkskin_CheckBoxTemplate_Initialize_(this)));
::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_);
}
{
::vl::__vwsn::This(this->self)->SetContainerComposition(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
}
CheckBoxTemplateConstructor::CheckBoxTemplateConstructor()
: self(static_cast<::darkskin::CheckBoxTemplate*>(nullptr))
: container(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
, self(static_cast<::darkskin::CheckBoxTemplate*>(nullptr))
, __vwsn_precompile_0(static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr))
, __vwsn_precompile_1(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr))
, __vwsn_precompile_2(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
@@ -26841,6 +26869,16 @@ Class (::darkskin::RadioButtonTemplateConstructor)
{
::vl::__vwsn::This(this->__vwsn_precompile_12)->SetOwnedElement(::vl::Ptr<::vl::presentation::elements::IGuiGraphicsElement>(this->__vwsn_precompile_13));
}
(this->container = new ::vl::presentation::compositions::GuiBoundsComposition());
{
::vl::__vwsn::This(this->container)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(0); __vwsn_temp__.top = static_cast<::vl::vint>(0); __vwsn_temp__.right = static_cast<::vl::vint>(0); __vwsn_temp__.bottom = static_cast<::vl::vint>(0); return __vwsn_temp__; }());
}
{
::vl::__vwsn::This(this->container)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren);
}
{
::vl::__vwsn::This(this->__vwsn_precompile_12)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
{
::vl::__vwsn::This(this->__vwsn_precompile_9)->AddChild(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->__vwsn_precompile_12));
}
@@ -26893,10 +26931,14 @@ Class (::darkskin::RadioButtonTemplateConstructor)
::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_created_subscription_.Obj())->ValueChanged, LAMBDA(::vl_workflow_global::__vwsnf77_DarkSkin_darkskin_RadioButtonTemplateConstructor___vwsn_darkskin_RadioButtonTemplate_Initialize_(this)));
::vl::__vwsn::This(__vwsn_this_)->AddSubscription(__vwsn_created_subscription_);
}
{
::vl::__vwsn::This(this->self)->SetContainerComposition(static_cast<::vl::presentation::compositions::GuiGraphicsComposition*>(this->container));
}
}
RadioButtonTemplateConstructor::RadioButtonTemplateConstructor()
: self(static_cast<::darkskin::RadioButtonTemplate*>(nullptr))
: container(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
, self(static_cast<::darkskin::RadioButtonTemplate*>(nullptr))
, __vwsn_precompile_0(static_cast<::vl::presentation::compositions::GuiTableComposition*>(nullptr))
, __vwsn_precompile_1(static_cast<::vl::presentation::compositions::GuiCellComposition*>(nullptr))
, __vwsn_precompile_2(static_cast<::vl::presentation::compositions::GuiBoundsComposition*>(nullptr))
+3
View File
@@ -853,6 +853,7 @@ namespace darkskin
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<ButtonTemplateConstructor>;
#endif
protected:
::vl::presentation::compositions::GuiBoundsComposition* container;
::darkskin::ButtonTemplate* self;
::vl::Ptr<::vl::presentation::elements::GuiSolidBackgroundElement> __vwsn_precompile_0;
::vl::presentation::compositions::GuiBoundsComposition* __vwsn_precompile_1;
@@ -911,6 +912,7 @@ namespace darkskin
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<CheckBoxTemplateConstructor>;
#endif
protected:
::vl::presentation::compositions::GuiBoundsComposition* container;
::darkskin::CheckBoxTemplate* self;
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_0;
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_1;
@@ -1935,6 +1937,7 @@ namespace darkskin
friend struct ::vl::reflection::description::CustomTypeDescriptorSelector<RadioButtonTemplateConstructor>;
#endif
protected:
::vl::presentation::compositions::GuiBoundsComposition* container;
::darkskin::RadioButtonTemplate* self;
::vl::presentation::compositions::GuiTableComposition* __vwsn_precompile_0;
::vl::presentation::compositions::GuiCellComposition* __vwsn_precompile_1;
@@ -210,6 +210,7 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
CLASS_MEMBER_FIELD(container)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::darkskin::ButtonTemplateConstructor)
@@ -237,6 +238,7 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(container)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::darkskin::CheckBoxTemplateConstructor)
@@ -669,6 +671,7 @@ namespace vl
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
CLASS_MEMBER_FIELD(container)
CLASS_MEMBER_FIELD(self)
END_CLASS_MEMBER(::darkskin::RadioButtonTemplateConstructor)
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Resource>
<Folder name="GacGenConfig">
<Folder name="ResX86">
<Text name="Resource">..\..\UIRes\32bits\control_basic_button.bin</Text>
</Folder>
<Folder name="ResX64">
<Text name="Resource">..\..\UIRes\64bits\control_basic_button.bin</Text>
</Folder>
</Folder>
<Folder name="MainWindow">
<Doc name="ButtonDocument">
<Doc>
<Content>
<p align="Center">
<div style="Header">Hi!</div>
</p>
<p>
<nop>Button text could be replaced by a document!</nop><br/>
<nop>It is in <b>DocumentLabel</b> control.</nop>
</p>
<p>
<nop>You can put anything in a control (not just a button), </nop>
<nop>but remember not to set the <b>Text</b> property.</nop>
</p>
</Content>
<Styles>
<Style name="Header">
<size>24</size>
<b>true</b>
</Style>
</Styles>
</Doc>
</Doc>
<Instance name="MainWindowResource">
<Instance ref.Class="sample::MainWindow">
<Window ref.Name="self" Text="control_basic_button" ClientSize="x:480 y:320">
<MessageDialog ref.Name="messageDialog" Title-bind="self.Text" Text="Hello, world!"/>
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="10" BorderVisible="false" MinSizeLimitation="LimitToElementAndChildren">
<att.Rows>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
</att.Rows>
<att.Columns>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
<CellOption>composeType:MinSize</CellOption>
<CellOption>composeType:Percentage percentage:0.5</CellOption>
</att.Columns>
<Cell Site="row:1 column:1">
<Button IgnoreChildControlMouseEvents="false">
<att.ContainerComposition-set PreferredMinSize="x:160"/>
<DocumentLabel EditMode="ViewOnly" Document-uri="res://MainWindow/ButtonDocument">
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
</DocumentLabel>
</Button>
</Cell>
</Table>
</Window>
</Instance>
</Instance>
</Folder>
</Resource>
Binary file not shown.
Binary file not shown.