diff --git a/.vscode/launch.json b/.vscode/launch.json index 0eaae7c1f..163cad3eb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -209,8 +209,7 @@ "type": "cppdbg", "request": "launch", "program": "/home/bts/spark/build/ninja_debug/src/server/sparkd/sparkd", - // "args": ["test","Co2RelayTests"], - "args": ["md", "run", "10"], + "args": ["test","Co2Tests"], "stopAtEntry": false, "cwd": "/home/bts/spark/build/ninja_debug/src/server/sparkd/", "environment": [], diff --git a/doc/dev/architecture.org b/doc/dev/architecture.org index b595e714b..8b72559f3 100644 --- a/doc/dev/architecture.org +++ b/doc/dev/architecture.org @@ -25,3 +25,47 @@ ***** FillStore ***** SecuritySrc * Benchmarks +* OrderMan +** OrderServices +*** callbacks +**** standard +- update +- cancel +- crack +- activate +- book +- settlement +- child order state +- timer +**** low level +- exe reports +- cancel rejects +- gateway status +*** services +**** standard +- secdb +- get time +- schedule actions +- order builder + - activate + - update + - cancel + - crack +**** low level +- governor +- send fix +- get time str +- limiter +** Internalize plan +- change order initiated update/cancel/crack/activate/report_state to + use direct method calls +- need to watch out for reentrancy +- need to also report state externally +- also want to separate active from non active orders in map to speed + up look ups +- want to use direct references in orders to avoid lookups +- want to change how time is captured, the trace is too big to copy + around + + + diff --git a/doc/user/docs/release_notes.md b/doc/user/docs/release_notes.md index 21f7f0676..f2204ae6e 100644 --- a/doc/user/docs/release_notes.md +++ b/doc/user/docs/release_notes.md @@ -1,5 +1,16 @@ # Release Notes +## 1.4.1 + +### Tabs + - Tabs now shrink and expand to make better use of horizontal space +### Bug Fixes + - Fixed a bug that could cause excessive CPU usage when a connection broke + - Fixed a layout bug in hedging/requoting performance reports + - Fixed account name mismatching bug for old fills +### Absolute Position limits + - Positions can now be netted or absolute for purposes of limit enforcing + ## 1.4.0 ### Speed Enhancements @@ -151,4 +162,4 @@ - PnL report now has PnL columns calculated based on your start of day, current day, and total position - Start, Day and Total PnL columns are painted with a red or green background color based on if the pnl value is negative or positive respectively - Corrected cash per point values, used in pnl calculations, for a number of products -- PnL report will now remember any customizations you make to filtering and/or sorting criteria \ No newline at end of file +- PnL report will now remember any customizations you make to filtering and/or sorting criteria diff --git a/src/client/spark/view/Controls/UniformTabGrid/UniformTabGrid.cs b/src/client/spark/view/Controls/UniformTabGrid/UniformTabGrid.cs new file mode 100644 index 000000000..f65b194c3 --- /dev/null +++ b/src/client/spark/view/Controls/UniformTabGrid/UniformTabGrid.cs @@ -0,0 +1,50 @@ +using bts; +using mbts.spark.filters; +using mbts.ui.controls.adorners; +using System.Collections.Generic; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; + +namespace mbts.ui.controls { + public class UniformTabGrid : UniformGrid { + public UniformTabGrid () { + this.IsItemsHost = true; + this.Rows = 1; + } + + protected override Size MeasureOverride(Size constraint) { + var child_tabs = this.Children.OfType(); + var child_tabs_max_width = child_tabs.Sum(t => t.MaxWidth); + // I noticed when debugging that this can sometimes be infinty, + // especially when a TabItem has not been set with a MaxWidth. + if (!double.IsInfinity(child_tabs_max_width)) { + // if the window width is greater than the total tab width, then + // there is more than enough space for all the tabs. If this + // is set to the default of Stretch and the window has only 1 + // tab or few tabs, the tab appears in the middle, which is not good. + // i.e. we want tabs to added left to right, so align left + // + // When the window is less than the total tab width, then align + // can be set to stretch b/c the UniformGrid will take care of + // sizing each tab accordingly. + this.HorizontalAlignment = (constraint.Width > child_tabs_max_width) + ? HorizontalAlignment.Left + : HorizontalAlignment.Stretch; + + // this bit here is necessary because when the window is expanded + // beyond the maxwidth of all the tabs, we switch to Left and the + // headers snap to some smaller than MaxWidth size, which is not + // the behavior we want + foreach (var child in child_tabs) { + child.Width = this.HorizontalAlignment == HorizontalAlignment.Left + ? child.MaxWidth + : double.NaN; + } + } + + return base.MeasureOverride(constraint); + } + } +} diff --git a/src/client/spark/view/Shell/FloatingWindow.xaml b/src/client/spark/view/Shell/FloatingWindow.xaml index a214e9073..ebf0ec5b8 100644 --- a/src/client/spark/view/Shell/FloatingWindow.xaml +++ b/src/client/spark/view/Shell/FloatingWindow.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:ui="clr-namespace:mbts.ui" + xmlns:c="clr-namespace:mbts.ui.controls" mc:Ignorable="d" AllowDrop="True" Style="{StaticResource BTSFloatingWindow}" d:DesignHeight="300" d:DesignWidth="300" @@ -25,18 +26,25 @@ - + + - + Background="Transparent" + ui:WindowStyle.IsNonClientArea="True" + > + + - + +