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


C++ wxScrollEvent::GetEventType方法代码示例

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


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

示例1: OnOffsetScroll

void wxHugeScrollBar::OnOffsetScroll( wxScrollEvent& event ){
	if( m_range <= 2147483647){
		m_thumb = event.GetPosition();
		}
	else{	//64bit mode
		int64_t here =event.GetPosition();
		if(here == 2147483646)	//if maximum set
			m_thumb = m_range-1;	//than give maximum m_thumb which is -1 from range
		else
			m_thumb = static_cast<int64_t>(here*(m_range/2147483647.0));
		}
	wxYieldIfNeeded();

#ifdef _DEBUG_SCROLL_
	if(event.GetEventType() == wxEVT_SCROLL_CHANGED)
		std::cout << "wxEVT_SCROLL_CHANGED"  << std::endl;
	if(event.GetEventType() == wxEVT_SCROLL_THUMBTRACK)
		std::cout << "wxEVT_SCROLL_THUMBTRACK"  << std::endl;
	if(event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
		std::cout << "wxEVT_SCROLL_THUMBRELEASE"  << std::endl;
	if( event.GetEventType() == wxEVT_SCROLL_LINEDOWN )
		std::cout << "wxEVT_SCROLL_LINEDOWN"  << std::endl;
	if( event.GetEventType() == wxEVT_SCROLL_LINEUP )
		std::cout << "wxEVT_SCROLL_LINEUP" << std::endl;
	if( event.GetEventType() == wxEVT_SCROLL_PAGEUP )
		std::cout << "wxEVT_SCROLL_PAGEUP" << std::endl;
	if( event.GetEventType() == wxEVT_SCROLL_PAGEDOWN )
		std::cout << "wxEVT_SCROLL_PAGEDOWN" << std::endl;
	if( event.GetEventType() == wxEVT_SCROLLWIN_LINEUP )
		std::cout << "wxEVT_SCROLLWIN_LINEUP" << std::endl;
	if( event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN )
		std::cout << "wxEVT_SCROLLWIN_LINEDOWN" << std::endl;
#endif
	event.Skip();
	}
开发者ID:ChunHungLiu,项目名称:wxHexEditor,代码行数:35,代码来源:HexEditorCtrl.cpp

示例2: QtOnScrollBarEvent

// Handle event from scrollbars
void wxWindowQt::QtOnScrollBarEvent( wxScrollEvent& event )
{
    wxEventType windowEventType = 0;

    // Map the scroll bar event to the corresponding scroll window event:

    wxEventType scrollBarEventType = event.GetEventType();
    if ( scrollBarEventType == wxEVT_SCROLL_TOP )
        windowEventType = wxEVT_SCROLLWIN_TOP;
    else if ( scrollBarEventType == wxEVT_SCROLL_BOTTOM )
        windowEventType = wxEVT_SCROLLWIN_BOTTOM;
    else if ( scrollBarEventType == wxEVT_SCROLL_PAGEUP )
        windowEventType = wxEVT_SCROLLWIN_PAGEUP;
    else if ( scrollBarEventType == wxEVT_SCROLL_PAGEDOWN )
        windowEventType = wxEVT_SCROLLWIN_PAGEDOWN;
    else if ( scrollBarEventType == wxEVT_SCROLL_LINEUP )
        windowEventType = wxEVT_SCROLLWIN_LINEUP;
    else if ( scrollBarEventType == wxEVT_SCROLL_LINEDOWN )
        windowEventType = wxEVT_SCROLLWIN_LINEDOWN;
    else if ( scrollBarEventType == wxEVT_SCROLL_THUMBTRACK )
        windowEventType = wxEVT_SCROLLWIN_THUMBTRACK;
    else if ( scrollBarEventType == wxEVT_SCROLL_THUMBRELEASE )
        windowEventType = wxEVT_SCROLLWIN_THUMBRELEASE;

    if ( windowEventType != 0 )
    {
        wxScrollWinEvent e( windowEventType, event.GetPosition(), event.GetOrientation() );
        ProcessWindowEvent( e );
    }
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:31,代码来源:window.cpp

示例3: onVolChange

void TrackStatusHandler::onVolChange(wxScrollEvent& event) {
    if (event.GetEventType() == wxEVT_SCROLL_CHANGED) {
        if (m_pipeline != NULL) {
            m_pipeline->setVolume(event.GetPosition());
        }
    }
}
开发者ID:krpors,项目名称:navi,代码行数:7,代码来源:main.cpp

示例4: onPosChange

void TrackStatusHandler::onPosChange(wxScrollEvent& event) {
    // only allow scrolling if not a stream.
    if (m_pipelineType == PIPELINE_STREAM) {
        return;
    }

    // else, allow position seeking.
    m_scrolling = true;
    if (event.GetEventType() == wxEVT_SCROLL_CHANGED) {
        if (m_pipeline != NULL) {
            m_pipeline->seekSeconds(event.GetPosition());
            m_scrolling = false;
        }
    }
}
开发者ID:krpors,项目名称:navi,代码行数:15,代码来源:main.cpp

示例5: OnScroll

//Scrolling. Calculate positions
void wxFixWidthImportCtrl::OnScroll(wxScrollEvent &sevent)
{
    m_NowType = sevent.GetEventType();

    //Uncomment next iy you want to avoid some flicker.
    //But dragging-scroll will be not so good
/*
    //When this event arrives here.
    //Event::GetTimestamp() is when it was fired.
    m_timeNow = wxGetLocalTimeMillis();

    //We want to avoid flicker when many EVT_SCROLL_THUMBTRACK are fired
    if ( m_timeNow - m_timeInit < 200
         && m_lastType == m_NowType )
        return;
*/
    //Avoid also consecutive THUMBRELEASE ENDSCROLL, they are so similar ...
    if ( m_lastType == wxEVT_SCROLL_THUMBRELEASE
        && m_NowType == wxEVT_SCROLL_CHANGED )
    {
        SetFocus(); //Avoid blinking bar
        return;
    }

    m_lastType = m_NowType;

    bool refresNow = false;
    size_t pos = (size_t) sevent.GetPosition();

    if ( sevent.GetId() == FW_SCROH && m_curposX != pos )
    {
        m_curposX = pos;
        refresNow = true;
    }
    if ( sevent.GetId() == FW_SCROV && m_curposL != pos )
    {
        m_curposL = pos;
        refresNow = true;
    }

    if ( refresNow )
    {
        m_timeInit = m_timeNow; //Reinit time
        Refresh();
    }
    SetFocus(); //Avoid blinking bar
}
开发者ID:maxmods,项目名称:wx.mod,代码行数:48,代码来源:fiximp.cpp

示例6: if

void Panels::SpeedHacksPanel::Slider_Click(wxScrollEvent &event) {
	wxSlider* slider = (wxSlider*) event.GetEventObject();
	int value = slider->GetValue();
	int eventType = event.GetEventType();
	if (eventType == wxEVT_SCROLL_PAGEUP || eventType == wxEVT_SCROLL_LINEUP) {
		if (value > slider->GetMin()) {
			slider->SetValue(value-1);
		}
	}
	else if (eventType == wxEVT_SCROLL_TOP) {
		slider->SetValue(slider->GetMin());
	}
	else if (eventType == wxEVT_SCROLL_PAGEDOWN || eventType == wxEVT_SCROLL_LINEDOWN) {
		if (value < slider->GetMax()) {
			slider->SetValue(value+1);
		}
	}
	else if (eventType == wxEVT_SCROLL_BOTTOM) {
		slider->SetValue(slider->GetMax());
	}

	event.Skip();
}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:23,代码来源:SpeedhacksPanel.cpp

示例7:

bool
AnimationFrame::OnSlider_isNextBeatEvent(wxScrollEvent& event) {
	wxEventType pEventType = event.GetEventType();
	return (pEventType == wxEVT_SCROLL_LINEDOWN || pEventType == wxEVT_SCROLL_PAGEDOWN);
}
开发者ID:superoven,项目名称:calchart,代码行数:5,代码来源:animation_frame.cpp


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