本文整理汇总了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;
}
}
示例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);
}
示例3: OnIdle
void SpectraMainFrame::OnIdle(wxIdleEvent& event)
{
if(!coroutine_exec->DoWork())
event.RequestMore();
for(auto* doc_frame : doc_frames)
doc_frame->OnIdle(event);
}
示例4: OnIdle
void ModelPreviewCanvas::OnIdle( wxIdleEvent& event )
{
if(gEngine->GetDriver()->GetD3DDevice())
RenderWindow();
event.RequestMore(true);
}
示例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();
}
示例6:
void
OSGFrame::OnIdle(wxIdleEvent &event)
{
_viewer->frame();
event.RequestMore();
}
示例7: OnIdle
void CApplication::OnIdle(wxIdleEvent& evt)
{
if (mRenderOn)
{
mMainFrame->PaintFlowEditor();
evt.RequestMore();
}
}
示例8: onIdle
void VisApp::onIdle(wxIdleEvent& evt)
{
if(render_loop_on)
{
drawPane->paintNow();
evt.RequestMore(); // render continuously, not only once on idle
}
}
示例9: OnIdle
//when program idle, read the output
void CscopePlugin::OnIdle(wxIdleEvent& event)
{
if ( m_pProcess && m_pProcess->ReadProcessOutput() )
{
event.RequestMore();
}
event.Skip();
}
示例10: OnIdle
void hvApp::OnIdle(wxIdleEvent& event)
{
if (m_exitIfNoMainWindow && !GetTopWindow())
ExitMainLoop();
event.Skip();
event.RequestMore();
}
示例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();
}
示例12: OnIdle
void MainFrame::OnIdle(wxIdleEvent &event)
{
if (!_viewer->isRealized())
return;
_viewer->frame();
event.RequestMore();
}
示例13: OnIdle
void ProjectManager::OnIdle(wxIdleEvent& evt)
{
if (mProjectLoaded)
{
mEditorCamera.mainLoop();
Torque::Engine.mainLoop();
evt.RequestMore();
}
}
示例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
}
示例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);
}
}