void ProcPaint( void ) { wnd_class wndcls; gui_colour fore; gui_colour back; gui_colour_set *set; bool dialog; int attr; dialog = FALSE; wndcls = WND_NO_CLASS; if( ScanStatus() ) { attr = 0; } else if( ScanCmd( "DIalog\0" ) == 0 ) { dialog = TRUE; attr = ScanAttr( DlgAttrMap, ArraySize( DlgAttrMap ) ); } else { wndcls = ReqWndName(); attr = ScanAttr( AttrMap, ArraySize( AttrMap ) ); } fore = ScanColour(); ScanCmd( "On\0" ); back = ScanColour(); ReqEOC(); if( attr < 0 ) return; if( wndcls == WND_NO_CLASS ) { if( dialog ) { GUIGetDialogColours( WndDlgColours ); set_dlg_attr( (gui_dlg_attr)attr, fore, back ); GUISetDialogColours( WndDlgColours ); } else { WndStatusColour.fore = fore; WndStatusColour.back = back; if( WndHaveStatusWindow() ) { WndCloseStatusWindow(); WndCreateStatusWindow( &WndStatusColour ); } } } else { set = WndClassColour[wndcls]; if( set == NULL ) { set = WndAlloc( sizeof( WndColours ) ); memcpy( set, WndColours, sizeof( WndColours ) ); WndClassColour[wndcls] = set; } set_wndcls_attr( (wnd_attr)attr, set, fore, back, ( wndcls == WND_ALL ) ); _SwitchOn( SW_PENDING_REPAINT ); } }
void ProcFont( void ) { wnd_class_wv wndclass; const char *start; size_t len; wnd_class_wv wndclass1; wndclass = ReqWndName(); if( !ScanItem( false, &start, &len ) ) return; ReqEOC(); if( wndclass == WND_ALL ) { for( wndclass1 = 0; wndclass1 < WND_NUM_CLASSES; ++wndclass1 ) { SetFont( wndclass1, NULL ); } } SetFont( wndclass, GUIDupStrLen( start, len ) ); _SwitchOn( SW_PENDING_REPAINT ); }
void ProcDisplay( void ) { wnd_class_wv wndclass; mad_radix old_radix; if( ScanEOC() ) { while( HookPendingPush() ); PushRefresh(); return; } old_radix = NewCurrRadix( 10 ); switch( ScanCmd( MiscTab ) ) { case MISC_TOOL: ProcTool(); break; case MISC_STATUS: ProcStatus(); break; default: wndclass = ReqWndName(); ProcSize( wndclass ); } NewCurrRadix( old_radix ); }