62mouseButtonRDown(false), flashLib(0), keyboardHook(0)
67 HRESULT r = CoInitializeEx(NULL, COINIT_MULTITHREADED);
75 flashLib = LoadLibrary((workingDirectory +
"Flash.ocx").c_str());
196 int dirtyWidth = iter->second->
dirtyBounds.right - iter->second->dirtyBounds.left;
197 int dirtyHeight = iter->second->dirtyBounds.bottom - iter->second->dirtyBounds.top;
199 int dirtyBufSize = dirtyWidth * dirtyHeight * 4;
200 int actualBufferSize = 4 * (iter->second->dirtyBounds.right - iter->second->dirtyBounds.left);
202 if (iter->second->okayToDelete)
435 if(!controlToFocus->mouseEnable)
437 if(!controlToFocus->isOverlay)
439 focusedControl = controlToFocus;
442 if(!controlToFocus->topOnFocus)
444 focusedControl = controlToFocus;
448 // Recalculate the Z Order
449 std::vector<IFlashControl*> sortedControls;
450 std::map<std::string, IFlashControl*>::iterator iter;
451 for(iter = controls.begin(); iter != controls.end(); iter++)
453 sortedControls.push_back(iter->second);
454 struct compare { bool operator()(IFlashControl* a, IFlashControl* b){ return(a->getZOrder() > b->getZOrder()); }};
455 std::sort(sortedControls.begin(), sortedControls.end(), compare());
456 if(sortedControls.size())
458 if(sortedControls.at(0) != controlToFocus)
460 unsigned int popIdx = 0;
461 for(; popIdx < sortedControls.size(); popIdx++)
462 if(sortedControls.at(popIdx) == controlToFocus)
465 unsigned short highestZ = sortedControls.at(0)->getZOrder();
467 if(!sortedControls.at(popIdx)->Foreground)
469 for(unsigned int i = 0; i < sortedControls.size(); i++)
471 if(!sortedControls.at(i)->Foreground)
473 highestZ = sortedControls.at(i)->getZOrder();
479 for(fgidx; fgidx < popIdx; fgidx++)
481 sortedControls.at(fgidx)->setZOrder(sortedControls.at(fgidx+1)->getZOrder());
483 sortedControls.at(popIdx)->setZOrder(highestZ);
486 for(unsigned int i = 0; i < sortedControls.size(); i++) sortedControls.at(i)->currentZOrder = sortedControls.at(i)->getZOrder();
488 focusedControl = controlToFocus;*/