MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / aboutCB

Method aboutCB

src/csvapplication.cpp:2962–3049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2960
2961
2962void CsvApplication::aboutCB(Fl_Widget *, void *) {
2963 My_Fl_Small_Window *aboutWin;
2964 Fl_Help_View *helpView;
2965 Fl_Box *iconBox;
2966 Fl_Box *nameBox;
2967
2968 std::string html;
2969
2970 std::string VERSION_STR(MY_VERSION);
2971 std::string BUILD_YEAR_STRING("2025");
2972 #ifdef MY_YEAR
2973 BUILD_YEAR_STRING = "" MY_YEAR "";
2974 #endif
2975 std::string BUILD_TODAY_STRING("2025-01-01");
2976 #ifdef MY_TODAY
2977 BUILD_TODAY_STRING = "" MY_TODAY "";
2978 #endif
2979 std::string BUILD_NOW_STRING("2025-01-01T00:00");
2980 #ifdef MY_NOW
2981 BUILD_NOW_STRING = "" MY_NOW "";
2982 #endif
2983
2984 aboutWin = new My_Fl_Small_Window(640, 510);
2985 aboutWin->color(TCRUNCHER_SMALL_WINDOW_BACKGROUND);
2986
2987 Fl_Pixmap icon(abouticon);
2988 iconBox = new Fl_Box(320-64,20,128,128);
2989 iconBox->image(icon);
2990
2991 nameBox = new Fl_Box(FL_FLAT_BOX, 10,170, 630,60, "Tablecruncher" );
2992 nameBox->color(0xF0F0F000);
2993 nameBox->labelsize(30);
2994 nameBox->labelfont(FL_HELVETICA);
2995
2996
2997#ifdef DEBUG
2998 std::string debugInfos = "";
2999 std::map< std::string, std::string > debug;
3000 float debugH, debugV;
3001 int screenCount = Fl::screen_count();
3002 int scaleSupport = Fl::screen_scaling_supported();
3003 debug["screenCount"] = std::to_string(screenCount);
3004 debug["scaleSupport"] = std::to_string(scaleSupport);
3005 debugInfos += "screen_count: " + debug["screenCount"] + " - ";
3006 debugInfos += "scale_support: " + debug["scaleSupport"] + "<br>\n";
3007 for( int i = 0; i < screenCount; ++i ) {
3008 Fl::screen_dpi(debugH, debugV, i);
3009 debugInfos += "DPI: " + std::to_string((int)debugH) + "," + std::to_string((int)debugV) + " ";
3010 }
3011#endif
3012
3013 html =
3014 "<html>"
3015 "<body bgcolor=\"" TCRUNCHER_SMALL_WINDOW_BACKGROUND_HTMLCODE "\">"
3016 "<center>"
3017 "<p>Version: " +
3018 VERSION_STR +
3019 "</p>"

Callers 1

MyMenuCallbackMethod · 0.80

Calls 2

to_stringFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected