Browse Source

etcpmon: Debug Levels block moved to right column, global radio labels removed, columns narrowed

etcp-inflight-fix
Evgeny 4 months ago
parent
commit
226a5744b5
  1. 30
      tools/etcpmon/etcpmon_gui.c

30
tools/etcpmon/etcpmon_gui.c

@ -20,7 +20,8 @@
//#pragma comment(lib, "user32.lib")
//#pragma comment(lib, "gdi32.lib")
#define WINDOW_WIDTH 1000
#define WINDOW_HEIGHT 1810
#define WINDOW_HEIGHT 1300
#define WINDOW_CLIENT_W 1250
#define UPDATE_INTERVAL 10 /* 50ms → 20 samples per second */
/* Global app pointer for callbacks */
static struct etcpmon_app* g_app = NULL;
@ -115,7 +116,7 @@ HWND etcpmon_gui_create_window(struct etcpmon_app* app) {
"ETCP Monitor",
WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME,
CW_USEDEFAULT, CW_USEDEFAULT,
WINDOW_WIDTH, WINDOW_HEIGHT,
WINDOW_CLIENT_W, WINDOW_HEIGHT,
NULL, NULL, app->hInstance, app
);
@ -727,15 +728,14 @@ static void CreateControls(struct etcpmon_app* app) {
}
/* ========================================================================
* Debug Levels section
* Debug Levels section — right column
* ======================================================================== */
{
int dy = 1255;
int dy = 485;
app->hDebugGroupBox = CreateWindowExA(0, "BUTTON", "Debug Levels",
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
10, dy, WINDOW_WIDTH - 20, 545, hWnd, (HMENU)IDC_STATIC, hInst, NULL);
1005, dy, 220, 545, hWnd, (HMENU)IDC_STATIC, hInst, NULL);
dy += 20;
const char* global_texts[6] = { "NONE", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
const char* header_texts[6] = {
"N\r\nO\r\nN\r\nE", "E\r\nR\r\nR\r\nO\r\nR", "W\r\nA\r\nR\r\nN",
"I\r\nN\r\nF\r\nO", "D\r\nE\r\nB\r\nU\r\nG", "T\r\nR\r\nA\r\nC\r\nE"
@ -750,32 +750,32 @@ static void CreateControls(struct etcpmon_app* app) {
app->debug_cat_count = ncat;
CreateWindowExA(0, "STATIC", "Global:", WS_CHILD | WS_VISIBLE,
20, dy + 2, 50, 20, hWnd, (HMENU)IDC_STATIC, hInst, NULL);
1015, dy + 2, 55, 20, hWnd, (HMENU)IDC_STATIC, hInst, NULL);
for (int l = 0; l < 6; l++) {
int lx = 75 + l * 85;
app->hDebugGlobalRadio[l] = CreateWindowExA(0, "BUTTON", global_texts[l],
int lx = 1080 + l * 22;
app->hDebugGlobalRadio[l] = CreateWindowExA(0, "BUTTON", "",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
lx, dy, 80, 20, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_GLOBAL_BASE + l), hInst, NULL);
lx, dy, 20, 20, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_GLOBAL_BASE + l), hInst, NULL);
}
dy += 22;
for (int l = 0; l < 6; l++) {
int lx = 75 + l * 85;
int lx = 1080 + l * 22;
app->hDebugHeaderEdit[l] = CreateWindowExA(WS_EX_CLIENTEDGE, "EDIT", header_texts[l],
WS_CHILD | WS_VISIBLE | ES_READONLY | ES_CENTER | ES_MULTILINE,
lx, dy, 80, 60, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_HEADER_BASE + l), hInst, NULL);
lx, dy, 22, 60, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_HEADER_BASE + l), hInst, NULL);
}
dy += 65;
for (int r = 0; r < ncat; r++) {
app->hDebugCatLabel[r] = CreateWindowExA(0, "STATIC", cat_names[r],
WS_CHILD | WS_VISIBLE | SS_LEFT | SS_CENTERIMAGE,
20, dy + 1, 50, 16, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_NAME_BASE + r), hInst, NULL);
1015, dy + 1, 60, 16, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_NAME_BASE + r), hInst, NULL);
for (int l = 0; l < 6; l++) {
int lx = 75 + l * 85;
int lx = 1080 + l * 22;
app->hDebugCatRadio[r][l] = CreateWindowExA(0, "BUTTON", "",
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
lx, dy, 80, 16, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_ROW_BASE + r * 8 + l), hInst, NULL);
lx, dy, 20, 16, hWnd, (HMENU)(UINT_PTR)(IDC_DEBUG_ROW_BASE + r * 8 + l), hInst, NULL);
}
dy += 18;
}

Loading…
Cancel
Save