I actually managed to make a plugin that colors every window in 8.4, not sure about previous versions. I just uncommented the create tcl_entry command at the bottom of the pdwindow tcl file (which enables the command prompt), used it to inspect all the windows and options, then kind of hacked away with a recursive proc. It worked for me on .46 - mac.
here it is ketea-theme-plugin.tcl You can see if that works?
It was even coloring the embedded_button_bar-plugin but @danomatika made a tk 8.6 version however; the way the frame was rendered became ugly so I thought I should refactor things into grid instead of pack. But thats different problem.
I'm pretty sure that my answer lies within syscalls in the c code, but I have zero knowledge of either the control flow on the c-side or syscalls in general.
Like look at this :
tcl:
#change the text in an existing text box
proc pdtk_text_set {tkcanvas tag text} {
$tkcanvas itemconfig $tag -text $text
}
inside a giant c function called rtext_senditup
else if (action == SEND_UPDATE)
{
sys_vgui("pdtk_text_set .x%lx.c %s {%.*s}\n",
canvas, x->x_tag, outchars_b, tempbuf);
if (pixwide != x->x_drawnwidth || pixhigh != x->x_drawnheight)
text_drawborder(x->x_text, x->x_glist, x->x_tag,
pixwide, pixhigh, 0);
if (x->x_active)
{
if (selend_b > selstart_b)
{
sys_vgui(".x%lx.c select from %s %d\n", canvas,
x->x_tag, u8_charnum(x->x_buf, selstart_b));
sys_vgui(".x%lx.c select to %s %d\n", canvas,
x->x_tag, u8_charnum(x->x_buf, selend_b) - 1);
sys_vgui(".x%lx.c focus \"\"\n", canvas);
}
else
{
sys_vgui(".x%lx.c select clear\n", canvas);
sys_vgui(".x%lx.c icursor %s %d\n", canvas, x->x_tag,
u8_charnum(x->x_buf, selstart_b));
sys_vgui(".x%lx.c focus %s\n", canvas, x->x_tag);
}
}
}
...I might be able to hijack these arguments, but I'm not sure how yet.