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

C++ wxPaintEvent类代码示例

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

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



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

示例1: render

void ModelPreview::render( wxPaintEvent& event )
{
    if (mIsInitialized)
    {
        event.ResumePropagation(1);
        event.Skip (); // continue the event
    }
}
开发者ID:josephcsible,项目名称:xLights,代码行数:8,代码来源:ModelPreview.cpp


示例2: dc

void tui::LayoutCanvas::OnpaintGL(wxPaintEvent& event) {
    wxPaintDC dc(this);
   #ifndef __WXMOTIF__
      if (!GetContext()) return;
   #endif
   SetCurrent();
   // invalid_window indicates zooming.
   // event.GetEventType() == event.GetId() should means that database is updated
   // In both cases - the entire window is redrawn
   if ((invalid_window) || (event.GetEventType() == event.GetId()))
   {
      glMatrixMode( GL_MODELVIEW );
      glShadeModel( GL_FLAT ); // Single color
      update_viewport();
      //@TODO !! Check somewhere that RGBA mode is available!?
      // CTM matrix stuff
      glLoadIdentity();
      glOrtho(lp_BL.x(),lp_TR.x(),lp_TR.y(),lp_BL.y(),-1.0,1.0);
      glClear(GL_COLOR_BUFFER_BIT);
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
      glClear(GL_ACCUM_BUFFER_BIT);
      DATC->openGL_draw(_LayCTM);    // draw data
      glAccum(GL_LOAD, 1.0);
      invalid_window = false;
      if (rubber_band) rubber_paint();
   }
   else
   {
      glAccum(GL_RETURN, 1.0);
      if       (tmp_wnd)         wnd_paint();
      else if  (rubber_band)     rubber_paint();
   }
   // deal with the long cursor
   if (reperX || reperY)
   {
      glColor4f(1, 1, 1, .5);
      glBegin(GL_LINES);
      if (reperX)
      {
         glVertex2i(lp_BL.x(), ScrMARK.y()) ;
         glVertex2i(lp_TR.x(), ScrMARK.y());
      }
      if (reperY)
      {
         glVertex2i(ScrMARK.x() , lp_BL.y()) ;
         glVertex2i(ScrMARK.x() , lp_TR.y());
      }
      glEnd();
   }

   SwapBuffers();
}
开发者ID:BackupTheBerlios,项目名称:toped-svn,代码行数:53,代码来源:layoutcanvas.cpp


示例3: dc

void 
GLCanvas::OnPaint (wxPaintEvent &event) {

	//if (!inited) {
	//	((FrmMainFrame *)mParent)->init();
	//	inited = true;
	//}
	if (!m_pEngine)
		return;

	{
		PROFILE("Nau");
		wxPaintDC dc(this);



		if (!isPaused) {
			this->Render();
			if (APISupport->apiSupport(IAPISupport::BUFFER_ATOMICS))
				DlgAtomics::Instance()->update();
		}
		event.Skip();
	}
	if (m_pEngine && m_pEngine->getProfileResetRequest())
		Profile::Reset();

	Refresh(false);
}
开发者ID:Nau3D,项目名称:nau,代码行数:28,代码来源:glcanvas.cpp


示例4: dc

void wxdlg3dViewer::OnPaintPanelTexture( wxPaintEvent& event )
{
////@begin wxEVT_PAINT event handler for ID_PanelTexture in wxdlg3dViewer.
    // Before editing this code, remove the block markers.
    wxPaintDC dc(wxDynamicCast(event.GetEventObject(), wxWindow));
////@end wxEVT_PAINT event handler for ID_PanelTexture in wxdlg3dViewer. 
}
开发者ID:Ronmi,项目名称:desmume-debianlized,代码行数:7,代码来源:wxdlg3dViewer.cpp


示例5: OnPaint

void DendrogramPanel::OnPaint( wxPaintEvent& event )
{

    wxSize sz = GetClientSize();
    if (layer_bm && isLayerValid) {
        wxMemoryDC dc;
        dc.SelectObject(*layer_bm);

        wxPaintDC paint_dc(this);
        paint_dc.Blit(0, 0, sz.x, sz.y, &dc, 0, 0);
        if (split_line) {
            split_line->draw(paint_dc);
        }
        dc.SelectObject(wxNullBitmap);
    } else {
        
        wxAutoBufferedPaintDC dc(this);
        dc.Clear();
        dc.SetPen(*wxTRANSPARENT_PEN);
        wxBrush Brush;
        Brush.SetColour(GdaConst::canvas_background_color);
        dc.SetBrush(Brush);
        dc.DrawRectangle(wxRect(0, 0, sz.x, sz.y));
    }
    event.Skip();
}
开发者ID:lixun910,项目名称:geoda,代码行数:26,代码来源:HClusterDlg.cpp


示例6: OnPaint

void GLCanvas::OnPaint(wxPaintEvent &event)
{
	wxPaintDC dc(this);

	if (!_GLRC)
    {
        return;
    }

	SetCurrent(*_GLRC);

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	if (_style & SINGLE_SENSOR_MODE)
    {
        renderSingleSensor();
    }
    else if (_style & SINGLE_JOINT_MODE)
    {
        renderSingleJoint();
    }
    else
    {
        renderSkeleton();
    }
	// _image.render();
	// glFlush();
	SwapBuffers();
	if (_showUI && !(_style & SELECTION_MODE))
    {
        drawUserInterface(dc);
    }
	event.Skip();
}
开发者ID:JochenKempfle,项目名称:MoCap,代码行数:35,代码来源:GLCanvas.cpp


示例7: OnPaint

void FifoPlayerDlg::OnPaint(wxPaintEvent& event)
{
	UpdatePlayGui();
	UpdateRecorderGui();

	event.Skip();
}
开发者ID:madnessw,项目名称:thesnow,代码行数:7,代码来源:FifoPlayerDlg.cpp


示例8: OnPaint

void ImageDialog::OnPaint(wxPaintEvent &event)
{
    if (!image.IsOk()) { // || event.GetEventObject() != imagePanel)
        event.Skip();
        return;
    }

    // imagePanel != NULL or we wouldn't get this event
    wxPaintDC dc(this);

    wxMemoryDC memDC;
    wxSize size = GetClientSize();

    wxBitmap bitmap;
    bitmap = wxBitmap(image);

    if (bitmap.GetPalette()) {
        memDC.SetPalette(*bitmap.GetPalette());
        dc.SetPalette(*bitmap.GetPalette());
    }

    memDC.SelectObject(bitmap);

    dc.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), &memDC, 0, 0, wxCOPY, FALSE);
    memDC.SelectObject(wxNullBitmap);
}
开发者ID:ErikGartner,项目名称:ardb,代码行数:26,代码来源:imagedialog.cpp


示例9: OnPaintShowPanel

/*
 * Draw (on m_panelShowPin) the pin currently edited
 * accroding to current settings in dialog
 */
void DIALOG_LIB_EDIT_PIN::OnPaintShowPanel( wxPaintEvent& event )
{
    wxPaintDC    dc( m_panelShowPin );
    wxSize dc_size = dc.GetSize();
    dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );

    // Give a parent to m_dummyPin only from draw purpose.
    // In fact m_dummyPin should not have a parent, but draw functions need a parent
    // to know some options, about pin texts
    LIB_EDIT_FRAME* libframe = (LIB_EDIT_FRAME*) GetParent();
    m_dummyPin->SetParent( libframe->GetComponent() );

    // Calculate a suitable scale to fit the available draw area
    EDA_RECT bBox = m_dummyPin->GetBoundingBox();
    double xscale    = (double) dc_size.x / bBox.GetWidth();
    double yscale = (double) dc_size.y / bBox.GetHeight();
    double scale = std::min( xscale, yscale );

    // Give a 10% margin
    scale *= 0.9;
    dc.SetUserScale( scale, scale );

    wxPoint offset =  bBox.Centre();
    NEGATE( offset.x );
    NEGATE( offset.y );

    GRResetPenAndBrush( &dc );
    m_dummyPin->Draw( NULL, &dc, offset, UNSPECIFIED_COLOR, GR_COPY,
                      NULL, DefaultTransform );

    m_dummyPin->SetParent(NULL);

    event.Skip();
}
开发者ID:johnbeard,项目名称:kicad-source-mirror,代码行数:38,代码来源:dialog_lib_edit_pin.cpp


示例10: dc

void DesignerWindow::HighlightPaintHandler::OnPaint(wxPaintEvent &event)
{
//	wxPaintDC dc(this);
/*	wxSize size = GetSize();
	dc.SetPen(*wxBLACK_PEN);
	for ( int i = 0; i < size.GetWidth(); i += m_x )
	{
		for ( int j = 0; j < size.GetHeight(); j += m_y )
		{
			dc.DrawPoint( i - 1, j - 1 );
		}
	}*/

	/*if ( m_actPanel == this)
	{
		HighlightSelection( dc );
	}*/

		wxWindow *aux = m_window;
		while (!aux->IsKindOf(CLASSINFO(DesignerWindow))) aux = aux->GetParent();
		DesignerWindow *dsgnWin = (DesignerWindow*) aux;
		if (dsgnWin->GetActivePanel() == m_window)
		{
			wxPaintDC dc(m_window);
			dsgnWin->HighlightSelection(dc);
		}

	event.Skip();
}
开发者ID:miquik,项目名称:mkdb,代码行数:29,代码来源:visualeditor.cpp


示例11: OnPaint

void VCameraControl::OnPaint(wxPaintEvent &ev)
{
	wxSize size;
	///Выводим информационную надпись, если не удалось подключить камеру
	if (!isConnected)
	{
		///Задаем размер окна по умолчанию
		size.SetWidth(400);
		size.SetHeight(200);
		this->SetMinSize(size);
		screen->SetMinSize(size);
		wxPaintDC dc(screen);
		dc.DrawText(L"Не удалось подключить камеру!",50,60);
		dc.DrawText(L"Проверьте настройки подключения.", 50, 80);
	}
	else
	{
		size = capture->GetVideoSize();
		size.SetWidth(size.GetWidth());
		size.SetHeight(size.GetHeight());
	}
	Update();
	Fit();
	ev.Skip();
}
开发者ID:imzhukov,项目名称:video_3.0.0,代码行数:25,代码来源:VCameraControl.cpp


示例12: OnPaint

void App::OnPaint(wxPaintEvent& event)
{
	switch(mPage)
	{
		case PAGE_OSZI:
		{
			// we need to request the DC here,otherwise windows makes trouble
			if(	!mOsziPage->IsBeingDeleted() and 
				mOsziPage->GetPanel() and
				!mOsziPage->GetPanel()->IsBeingDeleted())
			{
				wxBufferedPaintDC dc(mOsziPage->GetPanel());
				mOsziPage->Paint(dc);
			}
		break;
		}
		case PAGE_FFT:
		{
			if(	!mFFTPage->IsBeingDeleted() and 
				mFFTPage->GetPanel() and 
				!mFFTPage->GetPanel()->IsBeingDeleted())
			{
				wxBufferedPaintDC dc(mFFTPage->GetPanel());
				mFFTPage->Paint(dc);
			}
		break;
		}
	}
	event.Skip();
}
开发者ID:skopein,项目名称:Skopein,代码行数:30,代码来源:App.cpp


示例13: OnPaint

void MyEvtHandler::OnPaint(wxPaintEvent & event)
{
    event.Skip();
    if (m_listCtrl) {
        m_listCtrl->PostDrawProgressBarEvent();
    }
}
开发者ID:BME-IK,项目名称:gridbee-nacl-framework,代码行数:7,代码来源:BOINCListCtrl.cpp


示例14: dc

void EDA_3D_CANVAS::OnPaint( wxPaintEvent& event )
{
    wxPaintDC dc( this );

    Redraw();
    event.Skip();
}
开发者ID:james-sakalaukus,项目名称:kicad,代码行数:7,代码来源:3d_canvas.cpp


示例15: OnIndicatorPaint

//
// Handle Indicator paint events
//
// Really only needed for the Mac since SetBackgroundColour()
// doesn't seem to work with shaped frames.
//
void ToolManager::OnIndicatorPaint( wxPaintEvent & event )
{
   wxWindow *w = (wxWindow *)event.GetEventObject();
   wxPaintDC dc( w );
   dc.SetBackground( *wxBLUE_BRUSH );
   dc.Clear();
}
开发者ID:GYGit,项目名称:Audacity,代码行数:13,代码来源:ToolManager.cpp


示例16: OnPaint

void wxsDrawingWindow::OnPaint(wxPaintEvent& event)
{
    if ( !m_DuringFetch )
    {
        wxPaintDC PaintDC(this);
        PrepareDC(PaintDC);
        if ( m_IsBlockFetch || NoNeedToRefetch() )
        {
            if ( m_Bitmap )
            {
                wxBitmap BmpCopy = m_Bitmap->GetSubBitmap(wxRect(0,0,m_Bitmap->GetWidth(),m_Bitmap->GetHeight()));
                wxBufferedDC DC(&PaintDC,BmpCopy);
                PaintExtra(&DC);
            }
        }
        else
        {
            StartFetchingSequence();
        }
    }
    else
    {
        event.Skip();
    }
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:25,代码来源:wxsdrawingwindow.cpp


示例17: OnPaint

    void OnPaint(wxPaintEvent& event)
    {
        event.Skip();

        wxPaintDC dc(m_win);
        wxScopedPtr<wxGraphicsContext> context(wxGraphicsContext::Create(dc));
        context->SetPen(wxPen(*wxLIGHT_GREY, 2));
        context->StrokePath(m_path);
    }
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:9,代码来源:nonownedwnd.cpp


示例18: OnPaint

void HMWindow::OnPaint(wxPaintEvent& event) {
    wxBufferedPaintDC pdc(this);

    if (hm_background_img.IsOk()) {
        pdc.DrawBitmap(hm_background_img, 0, 0, false);
    }

    event.Skip();
}
开发者ID:L31N,项目名称:SuperRectEvolution,代码行数:9,代码来源:hm_window.cpp


示例19: OnPaint

//
// This draws the background of a toolbar
//
void ToolBar::OnPaint( wxPaintEvent & event )
{
   wxPaintDC dc( (wxWindow *) event.GetEventObject() );

   // Start with a clean background
   //
   // Under GTK, we specifically set the toolbar background to the background
   // colour in the system theme.
#if defined( __WXGTK__ )
   dc.SetBackground( wxBrush( wxSystemSettings::GetColour( wxSYS_COLOUR_BACKGROUND ) ) );
#endif

   dc.Clear();

// EXPERIMENTAL_THEMING is set to not apply the gradient
// on wxMAC builds.  on wxMAC we have the AQUA_THEME.
#ifdef USE_AQUA_THEME
   Repaint( &dc );
#else

#ifdef EXPERIMENTAL_THEMING
   wxImage * mpBackGradient =   &theTheme.Image( bmpRecoloredUpLarge  );

   if( mpBackGradient != NULL )
   {
      wxSize imSz( mpBackGradient->GetWidth(), mpBackGradient->GetHeight() );
      wxSize sz = GetSize();
      int y;
      for(y=0;y<sz.y;y++)
      {
         int yPix = ((float)y * imSz.y - 1.0f)/(sz.y-1);
         wxColour col(
            mpBackGradient->GetRed( 0, yPix),
            mpBackGradient->GetGreen( 0, yPix),
            mpBackGradient->GetBlue( 0, yPix));

         // Set background colour so that controls placed on this
         // toolbar such as radio buttons will draw reasonably.
         // It's a little tacky setting the background colour
         // here, but we can't do it in the constructor as the gradient
         // may not be available yet.
         // Better than this would be to set the colour when the image
         // is loaded.
         // We use the colour at the half way point as a suitable 'average'.
         if( y==(sz.y/2) )
         {
            SetBackgroundColour( col );
         }
         wxPen Pen( col );
         dc.SetPen(Pen );
         AColor::Line(dc, 0, y, sz.x, y );
      }
   }
#endif
#endif
}
开发者ID:jengelh,项目名称:audacity,代码行数:59,代码来源:ToolBar.cpp


示例20: _onExpose

void MediaBrowser::_onExpose(wxPaintEvent& ev)
{
	// Populate the tree view if it is not already populated
	if (!_isPopulated)
	{
		populate();
	}

	ev.Skip();
}
开发者ID:nbohr1more,项目名称:DarkRadiant,代码行数:10,代码来源:MediaBrowser.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxPen类代码示例发布时间:2022-05-31
下一篇:
C++ wxPaintDC类代码示例发布时间: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