ZRef<Rendered> sFinderHider( const ZRef<Rendered>& iRendered, GPoint iBackingSize, GPoint iGameSize) { ZRef<Rendered_Group> finderHider = sRendered_Group(); const Rat iWidth = X(iGameSize); const Rat iHeight = Y(iGameSize); RGBA theColor = sRGBA(0, 1); if (DebugFlags::sTouches) theColor = sRGBA(0.25,1); // Left finderHider->Append(sRendered_Rect( theColor, sRect<GRect>(-1000, -1000, 0, iHeight+1000))); // Top finderHider->Append(sRendered_Rect( theColor, sRect<GRect>(-1000, -1000, iWidth+1000, 0))); // Right finderHider->Append(sRendered_Rect( theColor, sRect<GRect>(iWidth, -1000, iWidth+1000, iHeight+1000))); // Bottom finderHider->Append(sRendered_Rect( theColor, sRect<GRect>(-1000, iHeight, iWidth+1000, iHeight+1000))); ZRef<Rendered_Group> theGroup = sRendered_Group(); theGroup->Append(iRendered); // Bring it fairly far forward, but well behind frontmost (which is at 128) theGroup->Append(sRendered_Mat(sTranslate3Z<Rat>(20), finderHider)); return theGroup; }
void PainterTest_App::WindowSupervisorInstallMenus(ZMenuInstall& inMenuInstall) { if (ZRef<ZMenu> appleMenu = inMenuInstall.GetAppleMenu()) { appleMenu->RemoveAll(); appleMenu->Append(mcAbout, "About " + this->GetAppName() + "..."); } // Build the top level menus ZRef<ZMenu> fileMenu = new ZMenu; inMenuInstall.Append("&File", fileMenu); #if TESTING fileMenu->Append(mcNew, "&New...", 'N'); fileMenu->Append(mcOpen, "&Open...", 'O'); fileMenu->AppendSeparator(); #endif fileMenu->Append(mcClose, "&Close...", 'W'); fileMenu->AppendSeparator(); fileMenu->Append(mcSave, "Save", 'S'); // fileMenu->AppendSeparator(); // fileMenu->Append(mcPageSetup, "P&age Setup..."); // fileMenu->Append(mcPrint, "&Print...", 'P'); if (!this->HasGlobalMenuBar()) { fileMenu->AppendSeparator(); fileMenu->Append(mcQuit, "&Quit", 'Q'); } ZRef<ZMenu> editMenu = new ZMenu; inMenuInstall.Append("&Edit", editMenu); editMenu->Append(mcUndo, "&Undo", 'Z'); editMenu->AppendSeparator(); editMenu->Append(mcCut, "Cu&t", 'X'); editMenu->Append(mcCopy, "&Copy", 'C'); editMenu->Append(mcPaste, "&Paste", 'V'); editMenu->Append(mcClear, "Clea&r"); editMenu->AppendSeparator(); editMenu->Append(mcSelectAll, "Select &All", 'A'); editMenu->AppendSeparator(); editMenu->Append(mcUser + 1, "Resize", 'R'); ZRef<ZMenu> textMenu = new ZMenu; inMenuInstall.Append("Text", textMenu); textMenu->Append("Font", ZFontMenus::sMakeFontMenu()); textMenu->Append("Size", ZFontMenus::sMakeSizeMenu()); textMenu->Append("Style", ZFontMenus::sMakeStyleMenu()); }