当前位置: 首页>>代码示例>>C++>>正文


C++ wxIdleEvent::RequestMore方法代码示例

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


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

示例1: OnIdle

//----------------------------------------
// input polling
void CLogPanel::OnIdle(wxIdleEvent& event)
{
  CMapProcess::iterator it;
  wxObArray processToRemove(false);
  CProcess* process = NULL;

  for (it = m_processes.begin() ; it != m_processes.end() ; it++)
  {
    process = GetProcess(it);
    if (process != NULL)
    {
      if ( (process->IsKilled()) || (process->IsEnded()) )
      {
        GetTasklist()->RemoveProcess(process);
        processToRemove.Insert(process);
        m_processToRemove.Insert(process);
      }
      else if ( process->HasInput() )
      {
          event.RequestMore();
      }
    }
  }

  for (uint32_t i = 0 ; i < processToRemove.size() ; i ++)
  {
    process = dynamic_cast<CProcess*>(processToRemove[i]);
    RemoveProcess(process->GetName());
    //delete process;
    process = NULL;
  }
}
开发者ID:adakite,项目名称:main,代码行数:34,代码来源:LogPanel.cpp

示例2: OnIdle

void wxJigsawEditorCanvas::OnIdle( wxIdleEvent& event )
{	
	do
	{
		if(!HasCapture()) break;

		// get mouse in client coordinates
		wxPoint currentPos = ScreenToClient(wxGetMousePosition());

		//Update the offset to the next mouse down event
		if(m_View->GetSelectedObject())
		{
			wxPoint diagramPoint = PointToViewPoint(currentPos);
			wxPoint groupPosition = m_View->GetRealGroupPosition(m_View->GetSelectedObject());
			m_SelectedObjectOffset = wxSize(
				diagramPoint.x - groupPosition.x,
				diagramPoint.y - groupPosition.y);
		}

		// get scroll position
		wxPoint scrollPos = GetScrollPosition();
		

		// auto scroll
		// check current drag position and update scroll regularly
		if(AutoScroll(currentPos, scrollPos))
		{
			event.RequestMore();
		}
		FixViewOffset();
	}
	while(false);
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:33,代码来源:wxJigsawEditorCanvas.cpp

示例3: OnIdle

void SpectraMainFrame::OnIdle(wxIdleEvent& event)
{
	if(!coroutine_exec->DoWork())
		event.RequestMore();
	for(auto* doc_frame : doc_frames)
		doc_frame->OnIdle(event);
}
开发者ID:BrainlessLabsInc,项目名称:oglplus,代码行数:7,代码来源:main_frame.cpp

示例4: OnIdle

void ModelPreviewCanvas::OnIdle( wxIdleEvent& event )
{
	if(gEngine->GetDriver()->GetD3DDevice())
		RenderWindow();

	event.RequestMore(true);
}
开发者ID:SinYocto,项目名称:Zee,代码行数:7,代码来源:ModelPanel.cpp

示例5: OnIdle

/*!
    \brief Idle time processing.

    OnIdle time here originates from the CodeBlocks message loop itself. The mcu plugin
    passes it to the mcu manager, which in turn passes it to us.

    \param event wxIdleEvent object.
*/
void OpenOCDDriver::OnIdle(wxIdleEvent& event)
{
    if (m_pProcess && ((PipedProcess*)m_pProcess)->HasInput())
        event.RequestMore();
    else
        event.Skip();
}
开发者ID:BackupTheBerlios,项目名称:cbmcu,代码行数:15,代码来源:openocd.cpp

示例6:

void 
OSGFrame::OnIdle(wxIdleEvent &event)
{
    _viewer->frame();

    event.RequestMore();
}
开发者ID:topscores,项目名称:AREngine,代码行数:7,代码来源:OSGFrame.cpp

示例7: OnIdle

void CApplication::OnIdle(wxIdleEvent& evt)
{
	if (mRenderOn)
	{
		mMainFrame->PaintFlowEditor();
		evt.RequestMore();
	}
}
开发者ID:cyj0912,项目名称:EasyFlow,代码行数:8,代码来源:Application.cpp

示例8: onIdle

void VisApp::onIdle(wxIdleEvent& evt)
{
    if(render_loop_on)
    {
        drawPane->paintNow();
        evt.RequestMore(); // render continuously, not only once on idle
    }
}
开发者ID:chrisdonahue,项目名称:NEATMusicVisualizer,代码行数:8,代码来源:Visualizer.cpp

示例9: OnIdle

//when program idle, read the output
void CscopePlugin::OnIdle(wxIdleEvent& event)
{
  if ( m_pProcess && m_pProcess->ReadProcessOutput() )
  {
    event.RequestMore();
  }
  event.Skip();
}
开发者ID:jenslody,项目名称:codeblocks,代码行数:9,代码来源:CscopePlugin.cpp

示例10: OnIdle

void hvApp::OnIdle(wxIdleEvent& event)
{
    if (m_exitIfNoMainWindow && !GetTopWindow())
        ExitMainLoop();

    event.Skip();
    event.RequestMore();
}
开发者ID:EdgarTx,项目名称:wx,代码行数:8,代码来源:helpview.cpp

示例11: OnIdle

void TTrackball::OnIdle(wxIdleEvent& event)
{
    long elapsed = wxGetElapsedTime(false);

    // 'elapsed' can be less than 'previous' if the timer gets reset somewhere else.
    if (elapsed < previous) {
        previous = elapsed;
    }

    // Animate the shader if at least one millisecond has elapsed.
    else if (elapsed - previous > 0) {
        canvas->Animate(elapsed - previous);
        previous = elapsed;
    }

    //
    // When not showing frames per second, wait enough between frames to not exceed a maximum frame rate.
    // The proper way of doing this is wait-for-vertical-sync, accessible via the display applet.
    // (Some older 3Dlabs products do not support the wglSwapControl extension.)
    //

    // If wglSwapInterval isn't available, wait for some time to elapse.
    if (wxGetApp().CapFps() && !wglSwapIntervalEXT) {
        if (!inertiaTheta || elapsed < Delay) {
            event.RequestMore();
            event.Skip();
            return;
        }

        // Reset timer.
        wxGetElapsedTime(true);
        previous = 0;
    } else {
        // Recalculate the fps every second.
        if (elapsed > 1000) {
            // Reset timer.
            wxGetElapsedTime(true);
            previous = 0;

            // Update the fps display counter on the status bar.
            wxGetApp().UpdateFps((float) frames * 1000.0f / (float) elapsed);
            frames = 0;
        }
        ++frames;
    }

    // Continue spinning the model.
    glLoadIdentity();
    vec3 offset = wxGetApp().Frame()->GetCenter();
    glTranslate(offset);
    glRotatef(-inertiaTheta, inertiaAxis.x, inertiaAxis.y, inertiaAxis.z);
    glTranslate(-offset);
    glMultMatrixf((float*) &xform);
    glGetFloatv(GL_MODELVIEW_MATRIX, (float*) &xform);
    canvas->Update();
    event.Skip();
}
开发者ID:astojilj,项目名称:astoj_oolongengine,代码行数:57,代码来源:Trackball.cpp

示例12: OnIdle

void MainFrame::OnIdle(wxIdleEvent &event)
{
    if (!_viewer->isRealized())
        return;

    _viewer->frame();

    event.RequestMore();
}
开发者ID:aalex,项目名称:osg,代码行数:9,代码来源:osgviewerWX.cpp

示例13: OnIdle

void ProjectManager::OnIdle(wxIdleEvent& evt)
{
   if (mProjectLoaded)
   {
      mEditorCamera.mainLoop();
      Torque::Engine.mainLoop();
      evt.RequestMore();
   }
}
开发者ID:xubingyue,项目名称:Torque6Editor,代码行数:9,代码来源:projectManager.cpp

示例14: OnIdle

////////////////////////////////////////////////////////////
/// Called when the control is idle - we can refresh our
/// SFML window
////////////////////////////////////////////////////////////
void wxSFMLCanvas::OnIdle(wxIdleEvent &event) {
  // Send a paint message when the control is idle, to ensure maximum framerate
  Refresh();

#if defined(__WXGTK__)
  event.RequestMore();  // On GTK, we need to specify that we want continuous
                        // idle events.
#endif
}
开发者ID:Lizard-13,项目名称:GD,代码行数:13,代码来源:wxSFMLCanvas.cpp

示例15: onIdle

void ScummToolsFrame::onIdle(wxIdleEvent &evt) {
	// Delete old panels on idle event
	destroyOldPanels();
	if (_pages.back()->onIdle(dynamic_cast<wxPanel *>(_wizardpane->FindWindow(wxT("Wizard Page"))))) {
		// We want more!
		evt.RequestMore(true);
		// This way we don't freeze the OS with continous events
		wxMilliSleep(10);
	}
}
开发者ID:scummvm,项目名称:scummvm-tools,代码行数:10,代码来源:main.cpp


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