In essence, g.pnmcomp generates a PPM image by overlaying a series of PPM/PGM pairs (PPM = RGB image, PGM = alpha channel).
A C/C++ GUI would either have g.pnmcomp's functionality (image composition) built-in, or would use the system's graphics API to perform composition (for translucent layers, you would need OpenGL or the Render extension, or something else which supports translucent rendering).
Tk doesn't support transparent (masked) true-colour images (it does support transparent GIFs, but that's limited to 256 colours), and an image composition routine in Tcl would be unacceptably slow, hence the existence of g.pnmcomp.
Last changed: $Date: 2013-01-15 07:12:43 -0800 (Tue, 15 Jan 2013) $