• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxEraseEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中wxEraseEvent的典型用法代码示例。如果您正苦于以下问题:C++ wxEraseEvent类的具体用法?C++ wxEraseEvent怎么用?C++ wxEraseEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了wxEraseEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnErase

// the event handler executed when the window background must be painted
void wxWindow::OnErase(wxEraseEvent& event)
{
    if ( !m_renderer )
    {
        event.Skip();

        return;
    }

    DoDrawBackground(*event.GetDC());

#if wxUSE_SCROLLBAR
    // if we have both scrollbars, we also have a square in the corner between
    // them which we must paint
    if ( m_scrollbarVert && m_scrollbarHorz )
    {
        wxSize size = GetSize();
        wxRect rectClient = GetClientRect(),
               rectBorder = m_renderer->GetBorderDimensions(GetBorder());

        wxRect rectCorner;
        rectCorner.x = rectClient.GetRight() + 1;
        rectCorner.y = rectClient.GetBottom() + 1;
        rectCorner.SetRight(size.x - rectBorder.width);
        rectCorner.SetBottom(size.y - rectBorder.height);

        if ( GetUpdateRegion().Contains(rectCorner) )
        {
            m_renderer->DrawScrollCorner(*event.GetDC(), rectCorner);
        }
    }
#endif // wxUSE_SCROLLBAR
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:34,代码来源:winuniv.cpp


示例2: onEraseBG

void BaseToolBarControl::onEraseBG(wxEraseEvent& event)
{
	if (!m_imgBg.getImg() || !m_imgBg->IsOk())
	{
		event.Skip();
	}
	else
	{
		wxDC *dc = event.GetDC();
		wxBitmap temp(m_imgBg->Scale(GetSize().GetWidth(), GetSize().GetHeight()));
		dc->DrawBitmap(temp, 0,0, false);
	}
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:13,代码来源:BaseToolBarControl.cpp


示例3: OnEraseBackground

void wxSplashScreenWindow::OnEraseBackground(wxEraseEvent& event)
{
    if (event.GetDC() && m_bitmap.IsOk())
    {
        wxDrawSplashBitmap(* event.GetDC(), m_bitmap, 0, 0);
    }
    else
    {
        wxClientDC dc(this);
        if (m_bitmap.IsOk())
            wxDrawSplashBitmap(dc, m_bitmap, 0, 0);
    }
}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:13,代码来源:splash.cpp


示例4: OnEraseBackground

void ClientStateIndicator::OnEraseBackground(wxEraseEvent& event){
    CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();

    wxASSERT(pSkinSimple);
    wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));

	event.Skip(false);
	wxDC *dc;
	dc=event.GetDC();
	dc->SetBackground(wxBrush(this->GetBackgroundColour(),wxSOLID));
	dc->Clear();
    dc->DrawBitmap(*(pSkinSimple->GetWorkunitAreaBackgroundImage()->GetBitmap()), 0, 0); 

}
开发者ID:BME-IK,项目名称:gridbee-nacl-framework,代码行数:14,代码来源:sg_ClientStateIndicator.cpp


示例5: OnEraseBackground

void CNoFlickerListCtrl::OnEraseBackground(wxEraseEvent &evt)
{
	//wxDC *pdc=evt.GetDC();
	

	evt.Skip();
}
开发者ID:crioux,项目名称:SpeedDemon-Profiler,代码行数:7,代码来源:noflickerlistctrl.cpp


示例6: OnEraseBackground

void AboutBox::OnEraseBackground(wxEraseEvent& event)
{
	wxPoint ptWnd;
	wxSize 	seWnd;

	ptWnd   = wxPoint(-1,-1);//GetPosition();
	seWnd   = GetClientSize();
	wxDC *pDC = event.GetDC();
	if (pDC)
	{
		pDC->SetBrush(m_brGrey);
		pDC->DrawRectangle(ptWnd.x, ptWnd.y, 2+seWnd.GetWidth(), 2+seWnd.GetHeight());
		pDC->SetBrush(m_brStipple);
		pDC->DrawRectangle(m_rect1.GetX(), m_rect1.GetY(), m_rect1.GetWidth(), m_rect1.GetHeight());
		pDC->SetBrush(m_brWhite);
		pDC->DrawRectangle(m_rect2.GetX(), m_rect2.GetY(), m_rect2.GetWidth(), m_rect2.GetHeight());
		pDC->SetBrush(wxNullBrush);
	}
	else
	{
		wxClientDC dc(this);
		dc.SetBrush(m_brGrey);
		dc.DrawRectangle(ptWnd.x, ptWnd.y, 2+seWnd.GetWidth(), 2+seWnd.GetHeight());
		dc.SetBrush(m_brStipple);
		dc.DrawRectangle(m_rect1.GetX(), m_rect1.GetY(), m_rect1.GetWidth(), m_rect1.GetHeight());
		dc.SetBrush(m_brWhite);
		dc.DrawRectangle(m_rect2.GetX(), m_rect2.GetY(), m_rect2.GetWidth(), m_rect2.GetHeight());
		dc.SetBrush(wxNullBrush);
	}	                            
}
开发者ID:damieng,项目名称:johnelliot,代码行数:30,代码来源:AboutBox.cpp


示例7: OnEraseBackground

void CPanelPreferences::OnEraseBackground( wxEraseEvent& event ) {
    if (!m_backgroundBitmap) {
        MakeBackgroundBitmap();
    }
    // Create a buffered device context to reduce flicker
    wxSize sz = GetClientSize();
    wxBufferedDC dc(event.GetDC(), sz, wxBUFFER_CLIENT_AREA);

#if TEST_BACKGROUND_WITH_MAGENTA_FILL
    // Fill the dialog with a magenta color so people can detect when something
    //   is wrong
    dc.SetBrush(wxBrush(wxColour(255,0,255)));
    dc.SetPen(wxPen(wxColour(255,0,255)));
    dc.DrawRectangle(0, 0, sz.GetWidth(), sz.GetHeight());
#else
    CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
    
    wxASSERT(pSkinSimple);
    wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));

    wxColour bgColor(*pSkinSimple->GetDialogBackgroundImage()->GetBackgroundColor());
    SetBackgroundColour(bgColor);
#endif

    if (m_backgroundBitmap->IsOk()) {
       dc.DrawBitmap(*m_backgroundBitmap, 0, 0);
    }
}
开发者ID:drshawnkwang,项目名称:boinc,代码行数:28,代码来源:sg_DlgPreferences.cpp


示例8: OnEraseBackground

// -------------------------------------------------------------------------------- //
void guSplashFrame::OnEraseBackground( wxEraseEvent &event )
{
    wxDC * dc = event.GetDC();
    if( dc )
    {
        dc->DrawBitmap( * m_Bitmap, 0, 0, false );
    }
}
开发者ID:anonbeat,项目名称:guayadeque,代码行数:9,代码来源:SplashWin.cpp


示例9: OnEraseBackground

void CScrolledTextBox::OnEraseBackground(wxEraseEvent& event) {
    wxDC *dc = event.GetDC();
    wxPoint p = GetParent()->GetPosition();
    wxRect r = GetRect();
    r.Offset(p);
    wxBitmap backgroundBitmap = ((CSimpleTaskPanel*)GetGrandParent())->GetBackgroundBmp().GetSubBitmap(r);
    dc->DrawBitmap(backgroundBitmap, 0, 0);
}
开发者ID:Milkyway-at-home,项目名称:BOINC,代码行数:8,代码来源:sg_TaskPanel.cpp


示例10: onEraseBG

void DispLoading::onEraseBG( wxEraseEvent& event )
{
	wxDC *dc = event.GetDC();

	if (!m_imgHandle.getImg() || !m_imgHandle->IsOk())
	{
		dc->SetTextForeground(wxColor(0,0,0));
		dc->Clear();
		return;
	}

	int h = GetSize().GetHeight();
	int w = GetSize().GetWidth();
	int iw = m_imgHandle->GetSize().GetWidth();


	//size 7
	const int l_start = 0;
	const int l_width = 2;

	//size 6
	const int m_start = 2;
	const int m_width = 15;

	//size 7 with 1 pix gap
	const int r_start = 17;
	const int r_width = 2;


	wxBitmap   tmpBmp(w, h);
	wxMemoryDC tmpDC(tmpBmp);

	tmpDC.SetBrush(wxBrush(wxColor(255,0,255)));
	tmpDC.SetPen( wxPen(wxColor(255,0,255),1) );
	tmpDC.DrawRectangle(0,0,w,h);

	wxImage scaled = m_imgHandle->Scale(iw, h);

	if (scaled.IsOk())
	{
		wxBitmap left = wxBitmap(scaled.GetSubImage( wxRect(l_start,0,l_width,h)) );
		wxBitmap right = wxBitmap(scaled.GetSubImage( wxRect(r_start,0,r_width,h)) );
		wxBitmap center(w-(l_width+r_width),h);

		wxColor c(255,0,255);
		gcImage::tileImg(center, wxBitmap(scaled.GetSubImage( wxRect(m_start,0,m_width,h)) ), &c);

		tmpDC.DrawBitmap(left, l_start,0,true);
		tmpDC.DrawBitmap(center, m_start,0,true);
		tmpDC.DrawBitmap(right, w-r_width,0,true);
	}

	tmpDC.SelectObject(wxNullBitmap);
	dc->DrawBitmap(tmpBmp, 0,0, true);

	wxRegion region = wxRegion(tmpBmp, wxColor(255,0,255), 1);
	SetShape(region, this);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:58,代码来源:DispLoading.cpp


示例11: OnEraseBackground

void cbSplashScreen::OnEraseBackground(wxEraseEvent &event)
{
  wxDC *dc = event.GetDC();

  if (dc)
  {
    DoPaint(*dc); // why not? :)
  }
}
开发者ID:Three-DS,项目名称:wxformbuilder-3.5.0,代码行数:9,代码来源:splashscreen.cpp


示例12: OnEraseBackground

void CProjectsComponent::OnEraseBackground(wxEraseEvent& event){
    CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();

    wxASSERT(pSkinSimple);
    wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple));

	wxDC* dc = event.GetDC();
    dc->DrawBitmap(*pSkinSimple->GetProjectAreaBackgroundImage()->GetBitmap(), 0, 0);
}
开发者ID:freehal,项目名称:boinc-freehal,代码行数:9,代码来源:sg_ProjectsComponent.cpp


示例13: OnEraseBackground

// Avoid unnecessary drawing due to Mac progress indicator's animation
void CSimpleTaskPanel::OnEraseBackground(wxEraseEvent& event) {
    wxRect clipRect;
    wxDC *dc = event.GetDC();
    
    if (m_ProgressBar->IsShown()) {
//        if (m_progressBarRect == NULL) {
            m_progressBarRect = new wxRect(m_ProgressBar->GetRect());
            m_progressBarRect->Inflate(1, 0);
//        }
        dc->GetClippingBox(&clipRect.x, &clipRect.y, &clipRect.width, &clipRect.height);
        if (clipRect.IsEmpty() || m_progressBarRect->Contains(clipRect)) {
            return;
        }
    }
    
//    CSimplePanelBase::OnEraseBackground(event);
    event.Skip();
}
开发者ID:Murph9000,项目名称:boinc-v2,代码行数:19,代码来源:sg_TaskPanel.cpp


示例14: OnErase

void CTaskDetailReport::OnErase( wxEraseEvent& event )
{ //KDE下,白色会变灰色底
	event.Skip();
	/*
    wxPaintDC pdc( this );
    pdc.SetBackground( *wxWHITE_BRUSH );
    pdc.Clear();
	*/
}
开发者ID:artificerpi,项目名称:multiget,代码行数:9,代码来源:taskdetailreport.cpp


示例15: OnEraseBackground

void wxEmulatorContainer::OnEraseBackground(wxEraseEvent& event)
{
    wxDC* dc wxDUMMY_INITIALIZE(NULL);

    if (event.GetDC())
    {
        dc = event.GetDC();
    }
    else
    {
        dc = new wxClientDC(this);
    }

    dc->SetBackground(wxBrush(wxGetApp().m_emulatorInfo.m_emulatorBackgroundColour, wxSOLID));
    dc->Clear();

    if (!event.GetDC())
        delete dc;
}
开发者ID:mark711,项目名称:Cafu,代码行数:19,代码来源:emulator.cpp


示例16: OnEraseBackground

void CTransparentCheckBox::OnEraseBackground(wxEraseEvent& event)
{
    if (m_pParentsBgBmp && *m_pParentsBgBmp) {
        wxMemoryDC memDC(**m_pParentsBgBmp);
        wxSize sz = GetClientSize();
        wxDC *dc = event.GetDC();
        wxCoord x=0, y=0, xx, yy;
        wxWindow* win = this;
        do {
            win->GetPosition(&xx, &yy);
            x += xx;
            y += yy;
            win = win->GetParent();
        } while (!win->IsTopLevel());
        dc->Blit(0, 0, sz.GetWidth(), sz.GetHeight(), &memDC, x, y, wxCOPY);
    } else {
        event.Skip();
    }
}
开发者ID:DanAurea,项目名称:boinc,代码行数:19,代码来源:sg_CustomControls.cpp


示例17: OnEraseBackground

void wxControl::OnEraseBackground( wxEraseEvent& rEvent )
{
    RECTL                           vRect;
    HPS                             hPS = rEvent.GetDC()->GetHPS();
    SIZEL                           vSize = {0,0};

    ::GpiSetPS(hPS, &vSize, PU_PELS | GPIF_DEFAULT);
    ::WinQueryWindowRect((HWND)GetHwnd(), &vRect);
    ::WinFillRect(hPS, &vRect, GetBackgroundColour().GetPixel());
} // end of wxControl::OnEraseBackground
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:10,代码来源:control.cpp


示例18: OnEraseBackground

void MyCanvas::OnEraseBackground(wxEraseEvent& event)
{
    if (wxGetApp().GetBackgroundBitmap().Ok())
    {
        wxSize sz = GetClientSize();
        wxRect rect(0, 0, sz.x, sz.y);

        if (event.GetDC())
        {
            wxGetApp().TileBitmap(rect, *(event.GetDC()), wxGetApp().GetBackgroundBitmap());
        }
        else
        {
            wxClientDC dc(this);
            wxGetApp().TileBitmap(rect, dc, wxGetApp().GetBackgroundBitmap());
        }
    }
    else
        event.Skip(); // The official way of doing it
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:20,代码来源:dragimag.cpp


示例19: OnEraseBackground

// We don't reliably get EraseBackground events under Linux, 
// so there is a workaround at CSimplePanelBase::MakeBGBitMap()
void CSimpleGUIPanel::OnEraseBackground(wxEraseEvent& event) {
    wxDC *dc = event.GetDC();
    
#ifdef __WXMAC__
    // Avoid unnecessary drawing due to Mac progress indicator's animation
    wxRect clipRect;
    wxRect taskRect = m_taskPanel->GetRect();
    dc->GetClippingBox(&clipRect.x, &clipRect.y, &clipRect.width, &clipRect.height);
    if (clipRect.IsEmpty() || taskRect.Contains(clipRect)) {
        return;
    }
#endif
    dc->DrawBitmap(m_bmpBg, 0, 0);
}
开发者ID:Ocode,项目名称:boinc,代码行数:16,代码来源:sg_BoincSimpleFrame.cpp


示例20: OnEraseBackground

void wxPanel::OnEraseBackground(wxEraseEvent& event)
{
    wxDC& dc = *event.GetDC();

    const wxSize clientSize = GetClientSize();
    const wxSize bitmapSize = m_bitmapBg.GetSize();

    for ( int x = 0; x < clientSize.x; x += bitmapSize.x )
    {
        for ( int y = 0; y < clientSize.y; y += bitmapSize.y )
        {
            dc.DrawBitmap(m_bitmapBg, x, y);
        }
    }
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:15,代码来源:panelg.cpp



注:本文中的wxEraseEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxEvent类代码示例发布时间:2022-05-31
下一篇:
C++ wxDynamicLibrary类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap