这篇教程C++ GetRect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetRect函数的典型用法代码示例。如果您正苦于以下问题:C++ GetRect函数的具体用法?C++ GetRect怎么用?C++ GetRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetRect函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetActiveViewBOOL CRectItem::OnChangeItemPosition(const CRect& rectPos){ CMainView* pView = GetActiveView(); if (pView == NULL) return FALSE; ASSERT_VALID(pView); CRect rc = rectPos; pView->ClientToDoc(rc); if (rc != GetRect()) { // The following lines were commented out because of a bug // in Microsoft Equation Editor 3.0. The rc keeps growing // when activated/deactivated. // Uncomment them if necessary for other objects. /* // invalidate old item Invalidate(); // update to new rectangle SetRect(rc); */ GetDocument()->SetModifiedFlag(); /* CSize sizeExtent; GetCachedExtent(&sizeExtent); SetBaseSize(sizeExtent); */ // and invalidate new Invalidate(); } return COleClientItem::OnChangeItemPosition(rectPos);}
开发者ID:jetlive,项目名称:skiaming,代码行数:37,
示例2: GetTheme// Rendering:bool nuiWindow::Draw(nuiDrawContext* pContext){ pContext->PushState(); pContext->ResetState(); nuiWindowManager* pRoot = dynamic_cast<nuiWindowManager*>(mpParent); pContext->EnableBlending(false); if (!mRawWindow) { nuiTheme* pTheme = GetTheme(); NGL_ASSERT(pTheme); pTheme->DrawWindowShade(pContext, mRect.Size(), nuiColor(1.0f, 1.0f, 1.0f, GetMixedAlpha()), IsParentActive()); pContext->PushClipping(); pContext->Clip(GetRect().Size()); pContext->EnableClipping(true); if (pRoot->GetActiveWindow() == this) { if (mMoving) pTheme->DrawMovingWindow(pContext, this); else pTheme->DrawActiveWindow(pContext, this); } else pTheme->DrawWindow(pContext,this); pTheme->Release(); pContext->PopClipping(); } DrawChildren(pContext); return true;}
开发者ID:JamesLinus,项目名称:nui3,代码行数:38,
示例3: CHECK_PTR_RETvoid wxCodeCompletionBox::DoShowCompletionBox(){ CHECK_PTR_RET(m_stc); // guesstimate a line height wxMemoryDC dc; wxBitmap bmp(1, 1); dc.SelectObject(bmp); wxFont font = m_stc->StyleGetFont(0); dc.SetFont(font); wxSize textSize = dc.GetTextExtent("Tp"); int lineHeight = textSize.y + 3; // 3 pixels margins wxRect rect = GetRect(); wxSize screenSize = ::wxGetDisplaySize(); // determine the box x position int wordStart = m_startPos; wxPoint pt = m_stc->PointFromPosition(wordStart); pt = m_stc->ClientToScreen(pt); pt.y += lineHeight; // Check Y axis if((pt.y + rect.GetHeight()) > screenSize.GetHeight()) { // the completion box goes out of the Y axis, move it up pt.y -= lineHeight; pt.y -= rect.GetHeight(); } // Check X axis if((pt.x + rect.GetWidth()) > screenSize.GetWidth()) { // the completion box goes out of the X axis. Move it to the left pt.x -= ((pt.x + rect.GetWidth()) - screenSize.GetWidth()); } Move(pt); Show();}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:37,
示例4: GetScreenPositionvoid MainEmuFrame::OnMoveAround( wxMoveEvent& evt ){ if( IsBeingDeleted() || !IsVisible() || IsIconized() ) return; // Uncomment this when doing logger stress testing (and then move the window around // while the logger spams itself) // ... makes for a good test of the message pump's responsiveness. if( EnableThreadedLoggingTest ) Console.Warning( "Threaded Logging Test! (a window move event)" ); // evt.GetPosition() returns the client area position, not the window frame position. // So read the window's screen-relative position directly. g_Conf->MainGuiPosition = GetScreenPosition(); // wxGTK note: X sends gratuitous amounts of OnMove messages for various crap actions // like selecting or deselecting a window, which muck up docking logic. We filter them // out using 'lastpos' here. :) static wxPoint lastpos( wxDefaultCoord, wxDefaultCoord ); if( lastpos == evt.GetPosition() ) return; lastpos = evt.GetPosition(); if( g_Conf->ProgLogBox.AutoDock ) { if (ConsoleLogFrame* proglog = wxGetApp().GetProgramLog()) { if (!proglog->IsMaximized()) { g_Conf->ProgLogBox.DisplayPosition = GetRect().GetTopRight(); proglog->SetPosition(g_Conf->ProgLogBox.DisplayPosition); } } } evt.Skip();}
开发者ID:Alchemistxxd,项目名称:pcsx2,代码行数:36,
示例5: GetRectvoid CFilterEdit::ResizeWindow(){ if (!::IsWindow(m_hWnd)) return; CRect editrc, rc; GetRect(&editrc); GetClientRect(&rc); editrc.left = rc.left + 4; editrc.top = rc.top + 1; editrc.right = rc.right - 4; editrc.bottom = rc.bottom - 4; CWindowDC dc(this); HGDIOBJ oldFont = dc.SelectObject(GetFont()->GetSafeHandle()); TEXTMETRIC tm = { 0 }; dc.GetTextMetrics(&tm); dc.SelectObject(oldFont); m_rcEditArea.left = editrc.left + m_sizeInfoIcon.cx; m_rcEditArea.right = editrc.right - m_sizeCancelIcon.cx - 5; m_rcEditArea.top = (rc.Height() - tm.tmHeight) / 2; m_rcEditArea.bottom = m_rcEditArea.top + tm.tmHeight; m_rcButtonArea.left = m_rcEditArea.right + 5; m_rcButtonArea.right = rc.right; m_rcButtonArea.top = (((rc.bottom)-m_sizeCancelIcon.cy)/2); m_rcButtonArea.bottom = m_rcButtonArea.top + m_sizeCancelIcon.cy; m_rcInfoArea.left = 0; m_rcInfoArea.right = m_rcEditArea.left; m_rcInfoArea.top = (((rc.bottom)-m_sizeInfoIcon.cy)/2); m_rcInfoArea.bottom = m_rcInfoArea.top + m_sizeInfoIcon.cy; SetRect(&m_rcEditArea);}
开发者ID:stahta01,项目名称:wxTortoiseGit,代码行数:36,
示例6: GetGCvoid FileDialog::OnPaint(){ axGC* gc = GetGC(); axRect rect(GetRect()); axRect rect0(axPoint(0, 0), rect.size); // Background. gc->SetColor(axColor(0.9, 0.9, 0.9), 1.0); gc->DrawRectangle(rect0); // Icon bar. axRect iconBarRect(1, 1, rect0.size.x - 1, 31); gc->DrawRectangle(iconBarRect); gc->DrawRectangleColorFade(iconBarRect, axColor(0.6, 0.6, 0.6), 1.0, axColor(0.7, 0.7, 0.7), 1.0); gc->SetColor(axColor(0.0, 0.0, 0.0), 1.0); gc->DrawRectangleContour(iconBarRect); // Folder name. gc->SetColor(axColor(0.2, 0.2, 0.2), 1.0); gc->SetFontSize(14); gc->DrawString(_dirNavigation->GetCurrentDirectoryName(), axPoint(50, 7)); axRect buttonBarRect(1, rect0.size.y - 30, rect0.size.x - 1, 30); gc->DrawRectangle(buttonBarRect); gc->DrawRectangleColorFade(buttonBarRect, axColor(0.6, 0.6, 0.6), 1.0, axColor(0.7, 0.7, 0.7), 1.0); gc->SetColor(axColor(0.0, 0.0, 0.0), 1.0); gc->DrawRectangleContour(buttonBarRect);}
开发者ID:EQ4,项目名称:axLib,代码行数:36,
示例7: inputCString CDiagramGroupbox::Export( UINT /*format*/ )/* ============================================================ Function : CDiagramGroupbox::Export Description : Exports this object to str using format Return : CString - The resulting string Parameters : UINT format - The format to export to Usage : An example Export-function. In this case, we are not using the format parameter, as we only have one format. ============================================================*/{ return ""; CString input( "/t<div class='controls' style='border-width:2;border-style:groove;position:absolute;left:%i;top:%i;width:%i;height:%i;'><div class='controls' style='position:absolute;left:6;top:-6;background-color:#c0c0c0;'>%s</div></div>" ); CString str; CRect rect = GetRect(); CString title = GetTitle(); title.Replace( " ", " " ); str.Format( input, rect.left - 2, rect.top - 2, rect.Width(), rect.Height(), title ); return str;}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:24,
示例8: GetRect// virtual, overloaded from nuiWidget, to be able to draw the oscillo manuallybool guiOscillo::Draw(nuiDrawContext* pContext){ if (mrData.empty()) return false; const nuiRect& rect = GetRect(); uint32 s1 = mrData[0].size(); uint32 s2 = rect.GetWidth(); uint32 count = MIN(s1, s2); nuiSize hi = rect.GetHeight(); nuiSize mid = hi / 2; nuiColor color[2]; color[0] = nuiColor(84,117,203); color[1] = nuiColor(200,0,0); for (uint32 c = 0; c < mrData.size(); c++) { nuiRenderArray* pArray = new nuiRenderArray(GL_LINE_STRIP); pArray->EnableArray(nuiRenderArray::eColor, true); pArray->SetColor(color[c]); for (uint32 s = 0; s < count; s++) { float value = mrData[c][s]; pArray->SetVertex(s, mid + hi * value); pArray->PushVertex(); } pContext->DrawArray(pArray); } return true;}
开发者ID:JamesLinus,项目名称:nui3,代码行数:37,
示例9: OnPaint void Widget::Render(RenderTarget& target, RenderQueue& queue) const { OnPaint(target, queue); if (mUseScissor) { Area& area = ResourceManager::Get()->WidgetArea; area.PushArea(GetRect(true)); const FloatRect& top = area.GetTopArea(); target.Flush(); RenderChildren(target, queue); queue.SetScissor(true, Vector2f(top.Left, target.GetHeight() - top.Bottom), Vector2f(top.GetSize().x, top.GetSize().y)); target.Flush(); area.PopArea(); } else { queue.SetScissor(false); RenderChildren(target, queue); } }
开发者ID:MStr3am,项目名称:sfui,代码行数:24,
示例10: GetRectBOOL CGumpButton::FromString( XML::Node* node ){ if (!CGumpEntity::FromString(node)) return FALSE; int normal, over, pressed;; XML::Node* gump_node = node->findNode("gump"); if (gump_node) { gump_node->lookupAttribute("normal", normal); gump_node->lookupAttribute("over", over); gump_node->lookupAttribute("pressed", pressed); } CSize size = GetRect().Size(); SetConstraints(size,size); CGumpEditorDoc* pDoc = GfxGetGumpDocument(); ASSERT(pDoc); m_pGump[NORMAL] = pDoc->LoadGump(normal); m_pGump[HOVER] = pDoc->LoadGump(over); m_pGump[PRESSED] = pDoc->LoadGump(pressed); return TRUE;}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:24,
示例11: CalcLineNumberWidthvoid CLineNumberEdit::Prepare(){ // Calc sizes int width = CalcLineNumberWidth(); CRect rect; GetClientRect( &rect ); CRect rectEdit( rect ); rect.right = width; rectEdit.left = rect.right + 3; // Setting the edit rect and // creating or moving child control SetRect( &rectEdit ); if( m_line.m_hWnd ) m_line.MoveWindow( 0, 0, width, rect.Height() ); else m_line.Create(NULL,WS_CHILD | WS_VISIBLE | SS_NOTIFY, rect, this, 1 ); GetRect( &rectEdit ); // Update line number control data m_line.SetTopMargin( rectEdit.top ); UpdateTopAndBottom();}
开发者ID:WinnerSoftLab,项目名称:WinnerMediaPlayer,代码行数:24,
示例12: GetRectvoid duListCtrl::AdjustVisibleLine(int nTop){ duRect rcListCtrl; GetRect(&rcListCtrl); int i; for (i = m_nFirstLine; i < m_vtLines.size(); i++) { duPlugin *pTemp = m_vtLines[i]; if (pTemp) { duRect rcTemp; pTemp->GetRect(&rcTemp); pTemp->SetPosTop(nTop); pTemp->Resize(NULL); pTemp->SetVisible(TRUE); // 后面的控件还需要SetVisible(FALSE); nTop += rcTemp.Height(); if (nTop >= rcListCtrl.Height()) break; } }}
开发者ID:blueantst,项目名称:dulib,代码行数:24,
示例13: inputCString CDiagramCombobox::Export( UINT /*format*/ )/* ============================================================ Function : CDiagramCombobox::Export Description : Exports this object to str using format Return : CString - The resulting string Parameters : UINT format - The format to export to Usage : An example Export-function. In this case, we are not using the format parameter, as we only have one format. ============================================================*/{ return ""; CString input( "/t<select class='controls' style='position:absolute;left:%i;top:%i;width:%i;height:%i;' onchange='JavaScript:comboboxHandler(this)' name='%s'></select>" ); CString str; CRect rect = GetRect(); str.Format( input, rect.left - 2, rect.top - 2, rect.Width(), rect.Height(), GetName() ); return str;}
开发者ID:BackupTheBerlios,项目名称:iris-svn,代码行数:24,
示例14: rgvoid ConsoleCanvas::MouseEvent(wxMouseEvent& event){ m_pParent->SetCursor ( wxCURSOR_ARROW ); int x,y; event.GetPosition(&x, &y);// Check the region of the Route/Leg button#ifdef __WXMSW__ if(event.LeftDown()) { wxRegion rg(m_pLegRouteButton->GetRect()); if(rg.Contains(x,y) == wxInRegion) { m_bShowRouteTotal = !m_bShowRouteTotal; if(m_bShowRouteTotal) pThisLegBox->SetLabel(_("Route")); else pThisLegBox->SetLabel(_("This Leg")); pThisLegBox->Refresh(true); } }/// Why is this necessary???// Because of the CaptureMouse call in chcanv.cpp when mouse enters concanv region wxRect rr = GetRect(); if(!rr.Contains(x + rr.x, y + rr.y) ) ReleaseMouse();#endif}
开发者ID:dongmingdmdm,项目名称:OpenCPN,代码行数:36,
示例15: SGD_ASSERTvoid Player::Render(void) { if (m_pCharaterAnim != nullptr) { // Validate the image SGD_ASSERT(m_hImage != SGD::INVALID_HANDLE, "Entity::Render - image was not set!"); SGD::Point ptOffset = SGD::Point{ (m_ptPosition /*- m_szSize / 2*/).x - GameplayState::GetInstance()->GetWorldCamPosition().x, (m_ptPosition /*- m_szSize / 2*/).y - GameplayState::GetInstance()->GetWorldCamPosition().y }; SGD::Rectangle rectOffset = GetRect(); rectOffset.Offset(-GameplayState::GetInstance()->GetWorldCamPosition().x, -GameplayState::GetInstance()->GetWorldCamPosition().y); // Draw the image SGD::GraphicsManager::GetInstance()->DrawRectangle(rectOffset, SGD::Color(255, 255, 0)); //SGD::GraphicsManager::GetInstance()->DrawTexture(m_hImage, ptOffset, m_fRotation, m_szSize / 2, SGD::Color{ 255, 255, 255 }); //SGD::GraphicsManager::GetInstance()->DrawTextureSection(m_hImage, ptOffset, {0.0f, 0.0f, 64.0f, 64.0f}, m_fRotation, m_szSize / 2, SGD::Color{ 255, 255, 255 }); m_pCharaterAnim->Render(ptOffset, m_bIsFlipped); }}
开发者ID:aosyang,项目名称:FS-Project,代码行数:24,
示例16: GetClientRectvoid CStaticStatusBar::DrawBk(CDC *pDC){ int crOldBk = pDC->GetBkColor(); CRect rect; GetClientRect(&rect); //Background pDC->FillSolidRect(&rect, m_crBk); //Top line pDC->FillSolidRect(rect.left, rect.top, rect.Width(), 1, m_crTopSep); pDC->FillSolidRect(rect.left, rect.top + 1, rect.Width(), 1, m_crTopLeft); //Bottom line pDC->FillSolidRect(rect.left, rect.bottom, rect.Width(), 1, m_crBottomRight); PartData* pPartData = NULL; CRect rcPart; int nPane, nCount = m_mapParts.GetCount(); for(nPane = 0; nPane < nCount; nPane++) { GetRect(nPane, &rcPart); m_mapParts.Lookup(nPane, pPartData); if(pPartData->nDrawType != SBT_NOBORDERS) { ASSERT((UINT)rcPart.Width() > m_nSepWidth); rcPart.left = rcPart.right - m_nSepWidth; DrawSep(pDC, &rcPart); } } pDC->SetBkColor(crOldBk);}
开发者ID:killbug2004,项目名称:cosps,代码行数:36,
示例17: dcvoid CXTPReportFilterEditControl::OnPaint(){ if (GetWindowTextLength() == 0 && ::GetFocus() != m_hWnd) { CPaintDC dc(this); // device context for painting CXTPFontDC autoFont(&dc, GetFont(), GetXtremeColor(COLOR_GRAYTEXT)); // show hint text CString strText = GetHint(); CRect rc; GetClientRect(&rc); dc.FillSolidRect(rc, GetXtremeColor(COLOR_WINDOW)); CRect rcText; GetRect(&rcText); dc.DrawText(strText, rcText, DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_EDITCONTROL); } else { Default(); }}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:24,
示例18: GetRectvoid TBScrollBar::UpdateHandle(){ // Calculate the mover size and position bool horizontal = m_axis == AXIS_X; int available_pixels = horizontal ? GetRect().w : GetRect().h; int min_thickness_pixels = MIN(GetRect().h, GetRect().w); int visible_pixels = available_pixels; if (m_max - m_min > 0 && m_visible > 0) { double visible_proportion = m_visible / (m_visible + m_max - m_min); visible_pixels = (int)(visible_proportion * available_pixels); // Limit the size of the indicator to the slider thickness so that it doesn't // become too tiny when the visible proportion is very small. visible_pixels = MAX(visible_pixels, min_thickness_pixels); m_to_pixel_factor = (double)(available_pixels - visible_pixels) / (m_max - m_min)/*+ 0.5*/; } else { m_to_pixel_factor = 0; // If we can't scroll anything, make the handle invisible visible_pixels = 0; } int pixel_pos = (int)(m_value * m_to_pixel_factor); TBRect rect; if (horizontal) rect.Set(pixel_pos, 0, visible_pixels, GetRect().h); else rect.Set(0, pixel_pos, GetRect().w, visible_pixels); m_handle.SetRect(rect);}
开发者ID:CarlJacobs,项目名称:turbobadger,代码行数:38,
示例19: CDuiMenu// 显示弹出菜单void CMenuItem::ShowPopupMenu(){ // 如果已经显示了子菜单,则直接退出 if(m_pPopupMenu) { return; } if(m_bIsPopup) { m_pPopupMenu = new CDuiMenu(DuiSystem::GetDefaultFont(), 12); m_pPopupMenu->SetAutoClose(FALSE); m_pPopupMenu->SetParent(this); m_pPopupMenu->m_clrRowHover = m_clrHover; // 设置菜单菜单的背景色 CPoint point; CRect rc = GetRect(); point.SetPoint(rc.left + rc.Width(), rc.top); int nMenuWidth = rc.Width(); CDlgBase* pParentDlg = GetParentDialog(); // 如果菜单项定义了XML文件,则使用此菜单项定义的XML文件加载子菜单 // 否则查找父菜单对象,找到对应的XML文件名,使用此XML文件名加载子菜单 CString strXmlFile = _T(""); CDuiMenu* pParentMenu = GetParentMenu(); if(pParentMenu) { if(!m_strMenuXml.IsEmpty()) { // 使用菜单项定义的XML文件 strXmlFile = m_strMenuXml; }else { // XML文件设置为父菜单对象的XML文件 strXmlFile = pParentMenu->GetXmlFile(); } // 必须将父菜单对象的自动关闭关掉,否则子菜单显示时候,父菜单失去焦点,会自动销毁 pParentMenu->SetAutoClose(FALSE); // 转换子菜单的坐标 ::ClientToScreen(pParentMenu->GetSafeHwnd(), &point); // 将父菜单的预设值菜单项列表添加到子菜单中 for (size_t i = 0; i < pParentMenu->m_vecMenuItemValue.size(); i++) { MenuItemValue& itemValue = pParentMenu->m_vecMenuItemValue.at(i); m_pPopupMenu->m_vecMenuItemValue.push_back(itemValue); } } if(!strXmlFile.IsEmpty()) { BOOL bSucc = m_pPopupMenu->LoadXmlFile(strXmlFile, pParentDlg, point, WM_DUI_MENU, GetName()); if(bSucc) // 加载弹出菜单成功才显示弹出菜单 { // 计算菜单的位置并显示 CRect rc; m_pPopupMenu->GetWindowRect(&rc); // 如果超出屏幕右侧范围,则菜单窗口往左移动一些,移动到当前菜单的左侧 int nScreenWidth= GetSystemMetrics(SM_CXFULLSCREEN); if(rc.right > nScreenWidth) { //rc.OffsetRect(nScreenWidth - rc.right -10, 0); // 移动到屏幕最右侧 rc.OffsetRect(-(nMenuWidth + rc.Width()), 0); // 移动到当前菜单左侧 } int nScreenHeight= GetSystemMetrics(SM_CYFULLSCREEN); if(rc.bottom > nScreenHeight) { rc.OffsetRect(0, -(rc.Height() - m_rc.Height())); // 高度超出屏幕则改为下对齐方式 } m_pPopupMenu->MoveWindow(rc); m_pPopupMenu->ShowWindow(SW_SHOW); m_pPopupMenu->SetAutoClose(TRUE); }else { // 弹出菜单加载失败,删除菜单对象 delete m_pPopupMenu; m_pPopupMenu = NULL; } } }}
开发者ID:ForkProject,项目名称:DuiVision,代码行数:81,
示例20: GetRectNS_IMETHODIMPnsBaseScreen::GetRectDisplayPix(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int32_t *outHeight){ return GetRect(outLeft, outTop, outWidth, outHeight);}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:6,
示例21: sci_plot2d//.........这里部分代码省略......... } n1 = n2; l1 = lt; } else { if (m2 == 1 && n2 > 1) { m2 = n2; n2 = 1; } if (m1 == 1 && n1 > 1) { m1 = n1; n1 = 1; } } } else { Scierror(999, _("%s: Wrong number of mandatory input arguments. At least %d expected./n"), fname, 1); return 0; } if (n1 == -1 || n2 == -1 || m1 == -1 || m2 == -1) { Scierror(999, _("%s: Wrong size for input arguments #%d and #%d./n"), fname, 1, 2); /* @TODO : detail error */ return 0; } sciGetStyle(pvApiCtx, fname, 3 + iskip, n1, opts, &style); GetStrf(pvApiCtx, fname, 4 + iskip, opts, &strf); GetLegend(pvApiCtx, fname, 5 + iskip, opts, &legend); GetRect(pvApiCtx, fname, 6 + iskip, opts, &rect); GetNax(pvApiCtx, 7 + iskip, opts, &nax, &flagNax); if (iskip == 0) { GetLogflags(pvApiCtx, fname, 8, opts, &logFlags); } freeStrf = !isDefStrf(strf); // Check strf [0-1][0-8][0-5] if (!isDefStrf(strf) && (strlen(strf) != 3 || strf[0] < '0' || strf[0] > '1' || strf[1] < '0' || strf[1] > '8' || strf[2] < '0' || strf[2] > '5')) { Scierror(999, _("%s: Wrong value for strf option: %s./n"), fname, strf); if (freeStrf) { freeAllocatedSingleString(strf); } return -1; } if (isDefStrf(strf)) { strcpy(strfl, DEFSTRFN); strf = strfl; if (!isDefRect(rect)) { strfl[1] = '7'; } if (!isDefLegend(legend)) { strfl[0] = '1';
开发者ID:FOSSEE-Internship,项目名称:scilab,代码行数:67,
示例22: GetRectbool CActionButton::containsTouchLocation( CCTouch* touch ){ return GetRect().containsPoint(convertTouchToNodeSpaceAR(touch));}
开发者ID:TomCatStudio,项目名称:HeroSword,代码行数:4,
示例23: WXUNUSEDvoid AButton::OnSize(wxSizeEvent & WXUNUSED(event)){ mFocusRect = GetRect().Deflate( 3, 3 ); Refresh(false);}
开发者ID:jeevithag,项目名称:audacity,代码行数:5,
示例24: LLOGvoid Ctrl::RefreshFrame() { LLOG("RefreshFrame " << Name()); RefreshFrame(Rect(GetRect().Size()).Inflated(overpaint));}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:4,
示例25: LEVELCHECKvoid Ctrl::CtrlPaint(SystemDraw& w, const Rect& clip) { GuiLock __; LEVELCHECK(w, this); LTIMING("CtrlPaint"); Rect rect = GetRect().GetSize(); Rect orect = rect.Inflated(overpaint); if(!IsShown() || orect.IsEmpty() || clip.IsEmpty() || !clip.Intersects(orect)) return; Ctrl *q; Rect view = rect; for(int i = 0; i < frame.GetCount(); i++) { LEVELCHECK(w, NULL); frame[i].frame->FramePaint(w, view); view = frame[i].view; } Rect oview = view.Inflated(overpaint); bool hasviewctrls = false; bool viewexcluded = false; for(q = firstchild; q; q = q->next) if(q->IsShown()) if(q->InFrame()) { if(!viewexcluded && IsTransparent() && q->GetRect().Intersects(view)) { w.Begin(); w.ExcludeClip(view); viewexcluded = true; } LEVELCHECK(w, q); Point off = q->GetRect().TopLeft(); w.Offset(off); q->CtrlPaint(w, clip - off); w.End(); } else hasviewctrls = true; if(viewexcluded) w.End(); DOLEVELCHECK; if(!oview.IsEmpty()) { if(oview.Intersects(clip) && w.IsPainting(oview)) { LEVELCHECK(w, this); if(overpaint) { w.Clip(oview); w.Offset(view.left, view.top); Paint(w); PaintCaret(w); w.End(); w.End(); } else { w.Clipoff(view); Paint(w); PaintCaret(w); w.End(); } } } if(hasviewctrls && !view.IsEmpty()) { Rect cl = clip & view; w.Clip(cl); for(q = firstchild; q; q = q->next) if(q->IsShown() && q->InView()) { LEVELCHECK(w, q); Rect qr = q->GetRect(); Point off = qr.TopLeft() + view.TopLeft(); Rect ocl = cl - off; if(ocl.Intersects(Rect(qr.GetSize()).Inflated(overpaint))) { w.Offset(off); q->CtrlPaint(w, cl - off); w.End(); } } w.End(); }}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:74,
注:本文中的GetRect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetRef函数代码示例 C++ GetRecord函数代码示例 |