mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-06-04 05:43:01 +08:00
Demo: GacUI_Controls\ContainersAndButtons
This commit is contained in:
@@ -23,3 +23,8 @@ pushd RichTextEmbedding\UI
|
|||||||
call Codegen.bat
|
call Codegen.bat
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
|
pushd GacUI_Controls
|
||||||
|
pushd ContainersAndButtons\UI
|
||||||
|
call Codegen.bat
|
||||||
|
popd
|
||||||
|
popd
|
||||||
@@ -86,9 +86,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Xml Include="UI\Resource.xml" />
|
<Xml Include="UI\Resource.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="UI\Codegen.bat" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="UI\Source\Demo.h" />
|
<ClInclude Include="UI\Source\Demo.h" />
|
||||||
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
<ClInclude Include="UI\Source\DemoPartialClasses.h" />
|
||||||
|
|||||||
@@ -30,11 +30,6 @@
|
|||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</Xml>
|
</Xml>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="UI\Codegen.bat">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="UI\Source\DemoPartialClasses.h">
|
<ClInclude Include="UI\Source\DemoPartialClasses.h">
|
||||||
<Filter>UI</Filter>
|
<Filter>UI</Filter>
|
||||||
|
|||||||
@@ -14,9 +14,166 @@
|
|||||||
</Folder>
|
</Folder>
|
||||||
<Folder name="MainWindow">
|
<Folder name="MainWindow">
|
||||||
<Instance name="MainWindowResource">
|
<Instance name="MainWindowResource">
|
||||||
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow">
|
<Instance ref.CodeBehind="false" ref.Class="demo::MainWindow" xmlns:x="presentation::controls::GuiSelectableButton::*">
|
||||||
<Window Text="ContainersAndButtons" ClientSize="x:480 y:320">
|
<Window Text="ContainersAndButtons" ClientSize="x:480 y:320">
|
||||||
<att.BoundsComposition-set PreferredMinSize="x:480 y:320"/>
|
<att.BoundsComposition-set PreferredMinSize="x:480 y:320"/>
|
||||||
|
<x:MutexGroupController ref.Name="radioGroup"/>
|
||||||
|
|
||||||
|
<Tab>
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:3 top:3 right:3 bottom:3"/>
|
||||||
|
|
||||||
|
<TabPage Text="GroupBox">
|
||||||
|
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
|
||||||
|
<att.Rows>
|
||||||
|
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||||
|
</att.Rows>
|
||||||
|
<att.Columns>
|
||||||
|
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||||
|
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||||
|
<CellOption>composeType:Percentage percentage:1.0</CellOption>
|
||||||
|
</att.Columns>
|
||||||
|
|
||||||
|
<Cell Site="row:0 column:0">
|
||||||
|
<GroupBox Text="Button">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
|
||||||
|
<Stack AlignmentToParent="left:5 top:5 right:5 bottom:5" Padding="5" Direction="Vertical">
|
||||||
|
<StackItem>
|
||||||
|
<Button Text="Button 1">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</Button>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<Button Text="Button 2">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</Button>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<Button Text="Button 3">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</Button>
|
||||||
|
</StackItem>
|
||||||
|
</Stack>
|
||||||
|
</GroupBox>
|
||||||
|
</Cell>
|
||||||
|
|
||||||
|
<Cell Site="row:0 column:1">
|
||||||
|
<GroupBox Text="CheckBox">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
|
||||||
|
<Stack AlignmentToParent="left:5 top:5 right:5 bottom:5" Padding="5" Direction="Vertical">
|
||||||
|
<StackItem>
|
||||||
|
<CheckBox Text="Button 1">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</CheckBox>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<CheckBox Text="Button 2">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</CheckBox>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<CheckBox Text="Button 3">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</CheckBox>
|
||||||
|
</StackItem>
|
||||||
|
</Stack>
|
||||||
|
</GroupBox>
|
||||||
|
</Cell>
|
||||||
|
|
||||||
|
<Cell Site="row:0 column:2">
|
||||||
|
<GroupBox Text="RadioButton">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
|
||||||
|
<Stack AlignmentToParent="left:5 top:5 right:5 bottom:5" Padding="5" Direction="Vertical">
|
||||||
|
<StackItem>
|
||||||
|
<RadioButton Text="Button 1" GroupController-ref="radioGroup" Selected="true">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</RadioButton>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<RadioButton Text="Button 2" GroupController-ref="radioGroup">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</RadioButton>
|
||||||
|
</StackItem>
|
||||||
|
<StackItem>
|
||||||
|
<RadioButton Text="Button 3" GroupController-ref="radioGroup">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||||
|
</RadioButton>
|
||||||
|
</StackItem>
|
||||||
|
</Stack>
|
||||||
|
</GroupBox>
|
||||||
|
</Cell>
|
||||||
|
</Table>
|
||||||
|
</TabPage>
|
||||||
|
|
||||||
|
<TabPage Text="ScrollContainer">
|
||||||
|
<ScrollContainer HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
|
||||||
|
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
|
||||||
|
|
||||||
|
<Table CellPadding="10">
|
||||||
|
<att.Rows>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
</att.Rows>
|
||||||
|
<att.Columns>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
<CellOption>composeType:MinSize</CellOption>
|
||||||
|
</att.Columns>
|
||||||
|
|
||||||
|
<Cell Site="row:0 column:0">
|
||||||
|
<Button Text="(0, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:0 column:1">
|
||||||
|
<Button Text="(0, 1)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:0 column:2">
|
||||||
|
<Button Text="(0, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
|
||||||
|
<Cell Site="row:1 column:0">
|
||||||
|
<Button Text="(1, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:1 column:1">
|
||||||
|
<Button Text="(1, 1)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:1 column:2">
|
||||||
|
<Button Text="(1, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
|
||||||
|
<Cell Site="row:2 column:0">
|
||||||
|
<Button Text="(2, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:2 column:1">
|
||||||
|
<Button Text="(2, 1)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
<Cell Site="row:2 column:2">
|
||||||
|
<Button Text="(2, 0)">
|
||||||
|
<att.BoundsComposition-set PreferredMinSize="x:160 y:160"/>
|
||||||
|
</Button>
|
||||||
|
</Cell>
|
||||||
|
</Table>
|
||||||
|
</ScrollContainer>
|
||||||
|
</TabPage>
|
||||||
|
</Tab>
|
||||||
</Window>
|
</Window>
|
||||||
</Instance>
|
</Instance>
|
||||||
</Instance>
|
</Instance>
|
||||||
|
|||||||
@@ -23,11 +23,13 @@ namespace demo
|
|||||||
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
friend struct vl::reflection::description::CustomTypeDescriptorSelector<TImpl>;
|
||||||
private:
|
private:
|
||||||
protected:
|
protected:
|
||||||
|
vl::presentation::controls::GuiSelectableButton::MutexGroupController* radioGroup;
|
||||||
|
|
||||||
void InitializeComponents()
|
void InitializeComponents()
|
||||||
{
|
{
|
||||||
if (InitializeFromResource())
|
if (InitializeFromResource())
|
||||||
{
|
{
|
||||||
|
GUI_INSTANCE_REFERENCE(radioGroup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -37,6 +39,7 @@ namespace demo
|
|||||||
MainWindow_()
|
MainWindow_()
|
||||||
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
:vl::presentation::GuiInstancePartialClass<vl::presentation::controls::GuiWindow>(L"demo::MainWindow")
|
||||||
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
,vl::presentation::controls::GuiWindow(vl::presentation::theme::GetCurrentTheme()->CreateWindowStyle())
|
||||||
|
,radioGroup(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user