// MW-2011-09-11: [[ Redraw ]] Force an immediate update of the window within the given // region but using the pixmap given. void MCStack::updatewindowwithbuffer(Pixmap p_pixmap, MCRegionRef p_region) { HIViewRef t_root; GetRootControl((WindowPtr)window -> handle . window, &t_root); HIViewRef t_view; GetIndexedSubControl(t_root, 1, &t_view); HIViewSetNeedsDisplayInRegion(t_view, (RgnHandle)p_region, TRUE); // Set the file-local static to the pixmap to use (stacksurface picks this up!) s_update_pixmap = p_pixmap; HIViewRender(t_view); // Unset the file-local static. s_update_pixmap = nil; // MW-2011-10-18: [[ Bug 9798 ]] Make sure we force a screen update after every // update. // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. // HIWindowFlush((WindowPtr)window -> handle . window); // Update the shadow, if required. if (getextendedstate(ECS_MASK_CHANGED)) { // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. HIWindowFlush((WindowPtr)window -> handle . window); HIWindowInvalidateShadow((WindowPtr)window -> handle . window); EnableScreenUpdates(); setextendedstate(False, ECS_MASK_CHANGED); } }
void MCStack::mode_load(void) { // We introduce the notion of an 'IDE' stack - such a stack is set by giving it // a custom property 'ideOverride' with value true. if (props != NULL) { MCAutoNameRef t_ide_override_name; /* UNCHECKED */ t_ide_override_name . CreateWithCString("ideOverride"); MCExecPoint ep; MClockmessages++; getcustomprop(ep, kMCEmptyName, t_ide_override_name); MClockmessages--; Boolean t_treat_as_ide; if (MCU_stob(ep . getsvalue(), t_treat_as_ide) && t_treat_as_ide) setextendedstate(true, ECS_IDE); } }
Exec_stat MCStack::mode_setprop(uint4 parid, Properties which, MCExecPoint &ep, const MCString &cprop, const MCString &carray, Boolean effective) { switch(which) { case P_IDE_OVERRIDE: Boolean t_state; if (!MCU_stob(ep . getsvalue(), t_state)) { MCeerror -> add(EE_OBJECT_NAB, 0, 0, ep . getsvalue()); return ES_ERROR; } setextendedstate(t_state == True, ECS_IDE); break; default: return ES_NOT_HANDLED; } return ES_NORMAL; }
// MW-2011-09-11: [[ Redraw ]] Force an immediate update of the window within the given // region. The actual rendering is done by deferring to the 'redrawwindow' method. void MCStack::updatewindow(MCRegionRef p_region) { HIViewRef t_root; GetRootControl((WindowPtr)window -> handle . window, &t_root); HIViewRef t_view; GetIndexedSubControl(t_root, 1, &t_view); // MW-2011-10-07: [[ Bug 9792 ]] If the mask hasn't changed, use the update region, // else redraw the whole view. if (!getextendedstate(ECS_MASK_CHANGED)) HIViewSetNeedsDisplayInRegion(t_view, (RgnHandle)p_region, TRUE); else { HIViewSetNeedsDisplay(t_view, TRUE); DisableScreenUpdates(); } HIViewRender(t_view); // MW-2012-09-04: [[ Bug 10333 ]] Flush the window immediately to make sure // we see every update. // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. // HIWindowFlush((WindowPtr)window -> handle . window); // Update the shadow, if required. if (getextendedstate(ECS_MASK_CHANGED)) { // MW-2012-09-10: [[ Revert Bug 10333 ]] Delayed until IDE issues can be resolved. HIWindowFlush((WindowPtr)window -> handle . window); HIWindowInvalidateShadow((WindowPtr)window -> handle . window); EnableScreenUpdates(); setextendedstate(False, ECS_MASK_CHANGED); } }