The commands that a commodity can receive from the controller program (as defined in <libraries/commodities.h>) are: CXCMD_DISABLE /* please disable yourself */ CXCMD_ENABLE /* please enable yourself */ CXCMD_KILL /* go away for good */ CXCMD_APPEAR /* open your window, if you can */ CXCMD_DISAPPEAR /* hide your window */ The CXCMD_DISABLE, CXCMD_ENABLE, and CXCMD_KILL commands correspond to the similarly named controller program gadgets, Disable, Enable, and Kill; CXCMD_APPEAR and CXCMD_DISAPPEAR correspond to the controller program gadgets, Show and Hide. These gadgets are ghosted in broker.c because it has no window (It doesn't make much sense to give the user a chance to click the Show and Hide gadgets). In order to do this, Broker.c has to tell Commodities Exchange to ghost these gadgets. When cxbroker() sets up a broker, it looks at the newbroker.nb_flags field to see if the COF_SHOW_HIDE bit (from <libraries/commodities.h>) is set. if it is, the "Show" and "Hide" gadgets for this broker will be selectable. Otherwise they are ghosted and disabled.