diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-18 09:22:04 +0000 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-18 09:22:04 +0000 |
| commit | f73ce5a6db8949227834d9d65b195bbb9e8acb32 (patch) | |
| tree | 759eac7b86ca8cf03a1cee9796dcd17079bdd02c /Samples/HelloWorld | |
| parent | 8b343e10f1a65b07988e15ea76596b16a03adadc (diff) | |
save commit, BubbleEvents, iface.search type and ext meth for loadCtx wise searches, IncludedEvents as list, removed discarded events
Diffstat (limited to 'Samples/HelloWorld')
| -rw-r--r-- | Samples/HelloWorld/main.cs | 11 | ||||
| -rw-r--r-- | Samples/HelloWorld/ui/helloworld.crow | 40 |
2 files changed, 50 insertions, 1 deletions
diff --git a/Samples/HelloWorld/main.cs b/Samples/HelloWorld/main.cs index e2be248e..dc5e2a13 100644 --- a/Samples/HelloWorld/main.cs +++ b/Samples/HelloWorld/main.cs @@ -5,7 +5,18 @@ using Samples; namespace HelloWorld { class Program : SampleBase { + public CommandGroup CMDTest = new CommandGroup ( + new ActionCommand("Action", ()=> Console.WriteLine ("Action executed")) + ); static void Main (string[] args) { + DbgLogger.IncludedEvents.AddRange ( new DbgEvtType[] { + DbgEvtType.MouseEnter, + DbgEvtType.MouseLeave, + DbgEvtType.WidgetMouseDown, + DbgEvtType.WidgetMouseUp, + DbgEvtType.WidgetMouseClick, + DbgEvtType.HoverWidget + }); using (Interface app = new Program ()) { app.Initialized += (sender, e) => (sender as Interface).Load ("#HelloWorld.helloworld.crow").DataSource = sender; app.Run (); diff --git a/Samples/HelloWorld/ui/helloworld.crow b/Samples/HelloWorld/ui/helloworld.crow index fe05d1e2..a9dad40c 100644 --- a/Samples/HelloWorld/ui/helloworld.crow +++ b/Samples/HelloWorld/ui/helloworld.crow @@ -1,2 +1,40 @@ <?xml version="1.0"?> -<Label Text="Hello World"/>
\ No newline at end of file +<VerticalStack Margin="50" Spacing="20"> + <HorizontalStack Height="Fit"> + <Label Text="Hover:" Width="50" Foreground="Grey"/> + <Label Text="{HoverWidget}" Font="mono, 8"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Focus:" Width="50" Foreground="Grey"/> + <Label Text="{FocusedWidget}" Font="mono, 8"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Active:" Width="50" Foreground="Grey"/> + <Label Text="{ActiveWidget}" Font="mono, 8"/> + </HorizontalStack> + <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true" + MouseEnter="{Background=Red}" + MouseLeave="{Background=Blue}"> + <Label Margin="5" Text="Hello World" /> + </Border> + <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true" + MouseEnter="{Background=Red}" + MouseLeave="{Background=Blue}"> + <Label Margin="5" Text="Hello World" /> + </Border> + <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true" + MouseEnter="{Background=Red}" + MouseLeave="{Background=Blue}"> + <Label Margin="5" Text="Hello World" /> + </Border> + <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true" + MouseEnter="{Background=Red}" + MouseLeave="{Background=Blue}"> + <Label Margin="5" Text="Hello World" /> + </Border> + <Border Height="Fit" Margin="2" Background="Blue" ContextCommands="{CMDTest}" Focusable="true" + MouseEnter="{Background=Red}" + MouseLeave="{Background=Blue}"> + <Label Margin="5" Text="Hello World" /> + </Border> +</VerticalStack> |