Phase 4: regenerate gen fixtures for the StockChart table change
Cases 02, 03, 14, 15, 16: the StockChart up/down colours are now
emitted by the generic Phase 4 loop with the widget's real defaults
rgb(0,150,0)/rgb(200,30,30) (the legacy rgb(0,200,0)/rgb(220,0,0) did
not match the widget), in table order, together with the rest of the
candlestick custom props (grid-color, auto-y, axis-w/h, view-first/
count, y-range). Case 03 also gains set_text("Test value") -- the
combined 17-prop StockChart table now carries a text prop.
This commit is contained in:
1 parent
a98d24d495
commit
54509f32ba
5 files changed
+46
-10
No files matched your search
@@ -103,10 +103,17 @@ int main() {
|
||||
Spreadsheet_001.w.set_grid_line_width(1);
|
||||
// NOTE (model-only, no XFrame setter): columns=4
|
||||
lg::Holder<StockCandlestickChart> StockChart_001(display, screen, window, gc, &styles, 200, 530, 320, 200);
|
||||
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
|
||||
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
|
||||
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
|
||||
// scale-mode: 0 (0 = price, 1 = percent)
|
||||
StockChart_001.w.set_y_range(0.0, 1.0);
|
||||
StockChart_001.w.set_down_color(Srgb{200, 30, 30});
|
||||
StockChart_001.w.set_grid_color(Srgb{225, 225, 225});
|
||||
StockChart_001.w.set_up_color(Srgb{0, 150, 0});
|
||||
StockChart_001.w.set_auto_y(true);
|
||||
StockChart_001.w.set_axis_h(20);
|
||||
StockChart_001.w.set_axis_w(56);
|
||||
StockChart_001.w.set_view_count(0.0);
|
||||
StockChart_001.w.set_view_first(0.0);
|
||||
lg::Holder<TMemo> Memo_001(display, screen, window, gc, &styles, 390, 530, 220, 120);
|
||||
Memo_001.w.set_editable(true);
|
||||
Memo_001.w.set_wordwrap(false);
|
||||
|
||||
+10
-2
@@ -352,14 +352,22 @@ int main() {
|
||||
// NOTE (model-only, no XFrame setter): hint="Test value", tooltip-text="tip with \"quotes\" and \\ slash", cursor="Test value", tab-stop=false, show-hint=true, font-underline=true, font-strikeout=true, columns=4
|
||||
apply_autosize(&Spreadsheet_001, styles, "Spreadsheet_001_style", 10, 530, 0, 0, 0, 0);
|
||||
lg::Holder<StockCandlestickChart> StockChart_001(display, screen, window, gc, &styles, 200, 530, 320, 200);
|
||||
StockChart_001.w.set_up_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_down_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_text("Test value");
|
||||
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
|
||||
// data-file: "Test value"
|
||||
// indicators: "Test value"
|
||||
// drawings: "Test value"
|
||||
// compare-files: "Test value"
|
||||
// scale-mode: 1 (0 = price, 1 = percent)
|
||||
StockChart_001.w.set_y_range(42.5, 42.5);
|
||||
StockChart_001.w.set_down_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_grid_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_up_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_auto_y(false);
|
||||
StockChart_001.w.set_axis_h(20);
|
||||
StockChart_001.w.set_axis_w(56);
|
||||
StockChart_001.w.set_view_count(42.5);
|
||||
StockChart_001.w.set_view_first(42.5);
|
||||
StockChart_001.w.set_bg_color(Srgb{51, 102, 153});
|
||||
StockChart_001.w.set_style_name("StockChart_001_style");
|
||||
StockChart_001.set_enabled(false);
|
||||
|
||||
@@ -34,11 +34,18 @@ int main() {
|
||||
styles.add_style_ex("dark", Srgb{45, 45, 48}, Srgb{20, 20, 22}, Srgb{200, 200, 200}, Srgb{240, 240, 240}, 6, 1, "-misc-fixed-medium-r-normal--13-*");
|
||||
styles.set_active_style_byName("default");
|
||||
lg::Holder<StockCandlestickChart> StockChart_001(display, screen, window, gc, &styles, 10, 10, 640, 320);
|
||||
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
|
||||
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
|
||||
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
|
||||
// data-file: "/opt/lightgui/tests/out/14_stockchart/SPY_fake.csv"
|
||||
// scale-mode: 0 (0 = price, 1 = percent)
|
||||
StockChart_001.w.set_y_range(0.0, 1.0);
|
||||
StockChart_001.w.set_down_color(Srgb{200, 30, 30});
|
||||
StockChart_001.w.set_grid_color(Srgb{225, 225, 225});
|
||||
StockChart_001.w.set_up_color(Srgb{0, 150, 0});
|
||||
StockChart_001.w.set_auto_y(true);
|
||||
StockChart_001.w.set_axis_h(20);
|
||||
StockChart_001.w.set_axis_w(56);
|
||||
StockChart_001.w.set_view_count(0.0);
|
||||
StockChart_001.w.set_view_first(0.0);
|
||||
lg::Holder<GtkLabel> Label_001(display, screen, window, gc, &styles, 10, 340, 100, 24);
|
||||
Label_001.w.set_text("Label_001");
|
||||
Label_001.w.set_xalign(0.5);
|
||||
|
||||
@@ -34,12 +34,19 @@ int main() {
|
||||
styles.add_style_ex("dark", Srgb{45, 45, 48}, Srgb{20, 20, 22}, Srgb{200, 200, 200}, Srgb{240, 240, 240}, 6, 1, "-misc-fixed-medium-r-normal--13-*");
|
||||
styles.set_active_style_byName("default");
|
||||
lg::Holder<StockCandlestickChart> StockChart_001(display, screen, window, gc, &styles, 10, 10, 900, 500);
|
||||
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
|
||||
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
|
||||
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
|
||||
// data-file: "/opt/lightgui/tests/out/15_stockchart_indicators/SPY_fake_long.csv"
|
||||
// indicators: "SMA(20), EMA(50), Bollinger Bands, RSI, MACD, Engulfing"
|
||||
// scale-mode: 0 (0 = price, 1 = percent)
|
||||
StockChart_001.w.set_y_range(0.0, 1.0);
|
||||
StockChart_001.w.set_down_color(Srgb{200, 30, 30});
|
||||
StockChart_001.w.set_grid_color(Srgb{225, 225, 225});
|
||||
StockChart_001.w.set_up_color(Srgb{0, 150, 0});
|
||||
StockChart_001.w.set_auto_y(true);
|
||||
StockChart_001.w.set_axis_h(20);
|
||||
StockChart_001.w.set_axis_w(56);
|
||||
StockChart_001.w.set_view_count(0.0);
|
||||
StockChart_001.w.set_view_first(0.0);
|
||||
std::vector<lg::IWidget*> widgets = { &StockChart_001 };
|
||||
auto redraw_all = [&]() {
|
||||
XClearWindow(display, window);
|
||||
|
||||
@@ -34,14 +34,21 @@ int main() {
|
||||
styles.add_style_ex("dark", Srgb{45, 45, 48}, Srgb{20, 20, 22}, Srgb{200, 200, 200}, Srgb{240, 240, 240}, 6, 1, "-misc-fixed-medium-r-normal--13-*");
|
||||
styles.set_active_style_byName("default");
|
||||
lg::Holder<StockCandlestickChart> StockChart_001(display, screen, window, gc, &styles, 10, 10, 1004, 748);
|
||||
StockChart_001.w.set_up_color(Srgb{0, 200, 0});
|
||||
StockChart_001.w.set_down_color(Srgb{220, 0, 0});
|
||||
// NOTE: StockChart design data not representable through the StockCandlestickChart API:
|
||||
// data-file: "/opt/lightgui/tests/out/16_stockchart_pro/SPY_fake_long.csv"
|
||||
// indicators: "SMA(20), RSI"
|
||||
// drawings: "trend 790 676 1150 690 red; hline 688 blue; fib 800 674 1000 692 purple; text 830 691 orange Resistance zone; rect 860 678 960 684 teal; arrow 920 690 1090 680 magenta; measure 840 677 1010 689 black"
|
||||
// compare-files: "/opt/lightgui/tests/out/16_stockchart_pro/QQQ_fake_long.csv"
|
||||
// scale-mode: 1 (0 = price, 1 = percent)
|
||||
StockChart_001.w.set_y_range(0.0, 1.0);
|
||||
StockChart_001.w.set_down_color(Srgb{200, 30, 30});
|
||||
StockChart_001.w.set_grid_color(Srgb{225, 225, 225});
|
||||
StockChart_001.w.set_up_color(Srgb{0, 150, 0});
|
||||
StockChart_001.w.set_auto_y(true);
|
||||
StockChart_001.w.set_axis_h(20);
|
||||
StockChart_001.w.set_axis_w(56);
|
||||
StockChart_001.w.set_view_count(0.0);
|
||||
StockChart_001.w.set_view_first(0.0);
|
||||
std::vector<lg::IWidget*> widgets = { &StockChart_001 };
|
||||
auto redraw_all = [&]() {
|
||||
XClearWindow(display, window);
|
||||
|
||||
Reference in new issue
Block a user