void Window_update_sys_handle( Handle self, HV * profile) { dPROFILE; var-> widgetClass = wcWindow; if (!( pexist( owner) || pexist( syncPaint) || pexist( taskListed) || pexist( borderIcons) || pexist( onTop) || pexist( borderStyle) )) return; if ( pexist( owner)) my-> cancel_children( self); if ( !apc_window_create( self, pexist( owner ) ? pget_H( owner ) : var-> owner , pexist( syncPaint) ? pget_B( syncPaint) : my-> get_syncPaint( self), pexist( borderIcons) ? pget_i( borderIcons) : my-> get_borderIcons( self), pexist( borderStyle) ? pget_i( borderStyle) : my-> get_borderStyle( self), pexist( taskListed) ? pget_B( taskListed) : my-> get_taskListed( self), pexist( windowState) ? pget_i( windowState) : my-> get_windowState( self), pexist( onTop) ? pget_B( onTop) : -1, /* This is way better. I should've thought of this before! */ !( pexist( originDontCare) && pget_B( originDontCare)), !( pexist( sizeDontCare) && pget_B( sizeDontCare)) )) croak("Cannot create window"); pdelete( borderStyle); pdelete( borderIcons); pdelete( syncPaint); pdelete( taskListed); pdelete( windowState); pdelete( onTop); }
void Window_init( Handle self, HV * profile) { dPROFILE; SV * sv; inherited init( self, profile); opt_set( optSystemSelectable); opt_assign( optOwnerIcon, pget_B( ownerIcon)); opt_assign( optMainWindow, pget_B( mainWindow)); my-> set_icon( self, pget_H( icon)); my-> menuColorIndex( self, true, ciFore, pget_i( menuColor) ); my-> menuColorIndex( self, true, ciBack, pget_i( menuBackColor) ); my-> menuColorIndex( self, true, ciHiliteText, pget_i( menuHiliteColor) ); my-> menuColorIndex( self, true, ciHilite, pget_i( menuHiliteBackColor) ); my-> menuColorIndex( self, true, ciDisabledText, pget_i( menuDisabledColor) ); my-> menuColorIndex( self, true, ciDisabled, pget_i( menuDisabledBackColor)); my-> menuColorIndex( self, true, ciLight3DColor, pget_i( menuLight3DColor) ); my-> menuColorIndex( self, true, ciDark3DColor, pget_i( menuDark3DColor) ); SvHV_Font( pget_sv( menuFont), &Font_buffer, "Window::init"); my-> set_menu_font ( self, Font_buffer); if ( SvTYPE( sv = pget_sv( menuItems)) != SVt_NULL) my-> set_menuItems( self, sv); my-> set_modalResult( self, pget_i( modalResult)); my-> set_modalHorizon( self, pget_B( modalHorizon)); CORE_INIT_TRANSIENT(Window); }
Bool Timer_validate_owner( Handle self, Handle * owner, HV * profile) { dPROFILE; *owner = pget_H( owner); if ( !kind_of( *owner, CWidget)) return false; return inherited validate_owner( self, owner, profile); }
Bool Window_validate_owner( Handle self, Handle * owner, HV * profile) { dPROFILE; *owner = pget_H( owner); if ( *owner != application && !kind_of( *owner, CWidget)) return false; return inherited validate_owner( self, owner, profile); }
Bool Clipboard_validate_owner( Handle self, Handle * owner, HV * profile) { dPROFILE; if ( pget_H( owner) != application || application == nilHandle) return false; *owner = application; return true; }
void Timer_update_sys_handle( Handle self, HV * profile) { dPROFILE; Handle xOwner = pexist( owner) ? pget_H( owner) : var-> owner; if (!( pexist( owner))) return; if ( !apc_timer_create( self, xOwner, pexist( timeout) ? pget_i( timeout) : my-> get_timeout( self))) croak("cannot create timer"); if ( pexist( timeout)) pdelete( timeout); }
void Menu_update_sys_handle( Handle self, HV * profile) { dPROFILE; Handle xOwner = pexist( owner) ? pget_H( owner) : var-> owner; var-> system = true; if ( var-> owner && ( xOwner != var-> owner)) ((( PWindow) var-> owner)-> self)-> set_menu( var-> owner, nilHandle); if ( !pexist( owner)) return; if ( !apc_menu_create( self, xOwner)) croak("Cannot create menu"); }
void Drawable_init( Handle self, HV * profile) { dPROFILE; inherited init( self, profile); apc_gp_init( self); var-> w = var-> h = 0; my-> set_color ( self, pget_i ( color)); my-> set_backColor ( self, pget_i ( backColor)); my-> set_fillWinding ( self, pget_B ( fillWinding)); my-> set_fillPattern ( self, pget_sv( fillPattern)); my-> set_lineEnd ( self, pget_i ( lineEnd)); my-> set_lineJoin ( self, pget_i ( lineJoin)); my-> set_linePattern ( self, pget_sv( linePattern)); my-> set_lineWidth ( self, pget_i ( lineWidth)); my-> set_region ( self, pget_H ( region)); my-> set_rop ( self, pget_i ( rop)); my-> set_rop2 ( self, pget_i ( rop2)); my-> set_textOpaque ( self, pget_B ( textOpaque)); my-> set_textOutBaseline( self, pget_B ( textOutBaseline)); my-> set_splinePrecision( self, pget_i ( splinePrecision)); if ( pexist( translate)) { AV * av = ( AV *) SvRV( pget_sv( translate)); Point tr = {0,0}; SV ** holder = av_fetch( av, 0, 0); if ( holder) tr.x = SvIV( *holder); else warn("RTC0059: Array panic on 'translate'"); holder = av_fetch( av, 1, 0); if ( holder) tr.y = SvIV( *holder); else warn("RTC0059: Array panic on 'translate'"); my-> set_translate( self, tr); } SvHV_Font( pget_sv( font), &Font_buffer, "Drawable::init"); my-> set_font( self, Font_buffer); my-> set_palette( self, pget_sv( palette)); CORE_INIT_TRANSIENT(Drawable); }