void AttachableScrollBar::OnScroll(wxScrollEvent & event) { if( mpViewInfo == NULL ) { event.Skip(); return; } SetViewInfoFromScrollBar(); event.Skip(); // This is so that the parent control can refresh whatever it needs to... }
/*---------------------------------------------------------------------- * Class: AmayaScrollBar * Method: OnScroll * Description: -----------------------------------------------------------------------*/ void AmayaScrollBar::OnScroll( wxScrollEvent& event ) { /* this flag is necessary because 2 events occure when up/down button is pressed (it's an optimisation) this hack works because OnLineDown is called before OnScroll, but becareful the events orders could change in future wxWidgets releases or can be platform specific */ if (m_IgnoreNextScrollEvent) { m_IgnoreNextScrollEvent = FALSE; event.Skip(); return; } if (event.GetOrientation() == wxHORIZONTAL) { TTALOGDEBUG_3( TTA_LOG_DIALOG, _T("AmayaScrollBar::OnScroll [wxHORIZONTAL][frameid=%d][pos=%d][pagesize=%d]"), m_ParentFrameID, event.GetPosition(), GetPageSize() ); FrameHScrolledCallback( m_ParentFrameID, event.GetPosition(), GetPageSize() ); } else if (event.GetOrientation() == wxVERTICAL) { TTALOGDEBUG_3( TTA_LOG_DIALOG, _T("AmayaScrollBar::OnScroll [wxVERTICAL][frameid=%d][pos=%d][pagesize=%d]"), m_ParentFrameID, event.GetPosition(), GetPageSize() ); FrameVScrolledCallback( m_ParentFrameID, event.GetPosition() ); } }
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(); }
void tpanelscrollbar::OnScrollHandler(wxScrollEvent &event) { wxEventType type = event.GetEventType(); bool upok = (type == wxEVT_SCROLL_TOP || type == wxEVT_SCROLL_LINEUP || type == wxEVT_SCROLL_PAGEUP || type == wxEVT_SCROLL_THUMBRELEASE || type == wxEVT_SCROLL_CHANGED); bool downok = (type == wxEVT_SCROLL_BOTTOM || type == wxEVT_SCROLL_LINEDOWN || type == wxEVT_SCROLL_PAGEDOWN || type == wxEVT_SCROLL_THUMBRELEASE || type == wxEVT_SCROLL_CHANGED); int y; if (type == wxEVT_SCROLL_LINEUP || type == wxEVT_SCROLL_LINEDOWN) { y = GetThumbPosition(); if (type == wxEVT_SCROLL_LINEUP) { y -= gc.linescrollspeed; } else { y += gc.linescrollspeed; } SetThumbPosition(std::max(0, y)); ScrollItems(); } else { if (type == wxEVT_SCROLLWIN_THUMBRELEASE || type == wxEVT_SCROLL_CHANGED) { y = event.GetPosition(); SetThumbPosition(y); } else { y = GetThumbPosition(); } ScrollItemsForPosition(y); event.Skip(); } OnScrollHandlerCommon(upok, downok, 0, y); }
void TAdjuster::OnSlide(wxScrollEvent& event) { int value = event.GetInt(); TUniform* uniform = sliders[event.GetId()].first; int component = sliders[event.GetId()].second; uniform->SetSlider((float) value / MaxSliderValue, component); uniform->UpdateSlider(); event.Skip(); }
void tpanelscrollbar::OnScrollTrack(wxScrollEvent &event) { #if TPANEL_SCROLLING_COPIOUS_LOGGING LogMsgFormat(LOGT::TPANELTRACE, "TSCL: tpanelscrollbar::OnScrollTrack %s, %d", cstr(GetThisName()), event.GetPosition()); #endif int y = event.GetPosition(); ScrollItemsForPosition(y); SetThumbPosition(y); event.Skip(); }
void SerialConfigurator::BSS_OnScrollHdl( wxScrollEvent& event ) { char buf[5]; sprintf(buf,"%d ", m_bit_size_slider->GetValue()); m_bit_size_label->SetLabel(buf); event.Skip(); }
void PreferencesDialog::OnPrintBlackSquareBrightness(wxScrollEvent & evt) { const int brightness = m_printBlackSquareBrightness->GetValue(); m_printBlackSquarePreview->SetBackgroundColour( wxColour(brightness, brightness, brightness) ); m_printBlackSquarePreview->Refresh(); evt.Skip(); }
void Dialogs::SysConfigDialog::Preset_Scroll(wxScrollEvent &event) { wxString pl; wxColor c; AppConfig::isOkGetPresetTextAndColor(m_slider_presets->GetValue(), pl, c); m_msg_preset->SetLabel(pl); m_msg_preset->SetForegroundColour( c ); UpdateGuiForPreset( m_slider_presets->GetValue(), m_check_presets->IsChecked() ); event.Skip(); }
void SliderWindow::OnScroll( wxScrollEvent& e) { // NOTE: This skip is important. If you remove it, // the EVT_SCROLL_CHANGED event will never get fired. e.Skip(); if ( !m_Override ) { m_SliderWidget->GetControl()->Write(); } }
void PostProcessingConfigDiag::Event_Slider_Finish(wxScrollEvent &ev) { UserEventData* config_option = (UserEventData*)ev.GetEventUserData(); ConfigGrouping* config = m_config_map[config_option->GetData()]; const auto& option_data = m_post_processor->GetOption(config->GetOption()); if (!option_data.m_resolve_at_compilation) { // Just handle options that must be resolved at compilation time ev.Skip(); return; } size_t vector_size = 0; if (option_data.m_type == PostProcessingShaderConfiguration::ConfigurationOption::OptionType::OPTION_INTEGER) vector_size = option_data.m_integer_values.size(); else vector_size = option_data.m_float_values.size(); for (size_t i = 0; i < vector_size; ++i) { // Got to do this garbage again. // Convert current step in to the real range value int current_step = config->GetSliderValue(i); std::string string_value; if (option_data.m_type == PostProcessingShaderConfiguration::ConfigurationOption::OptionType::OPTION_INTEGER) { s32 value = option_data.m_integer_step_values[i] * current_step + option_data.m_integer_min_values[i]; m_post_processor->SetOptioni(config->GetOption(), i, value); } else { float value = option_data.m_float_step_values[i] * current_step + option_data.m_float_min_values[i]; m_post_processor->SetOptionf(config->GetOption(), i, value); } } ev.Skip(); }
// Explicitly call default scroll behaviour void wxMDIClientWindow::OnScroll(wxScrollEvent& event) { // Note: for client windows, the scroll position is not set in // WM_HSCROLL, WM_VSCROLL, so we can't easily determine what // scroll position we're at. // This makes it hard to paint patterns or bitmaps in the background, // and have the client area scrollable as well. if ( event.GetOrientation() == wxHORIZONTAL ) m_scrollX = event.GetPosition(); // Always returns zero! else m_scrollY = event.GetPosition(); // Always returns zero! event.Skip(); }
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(); }
void CustomGrid::OnScroll( wxScrollEvent& event ) { m_tRefreshTimer.Start( 10, wxTIMER_ONE_SHOT ); event.Skip(); }
void ImagePreview::OnQualityChanged( wxScrollEvent& event ){ event.Skip(); }
void Panels::SpeedHacksPanel::VUCycleRate_Scroll(wxScrollEvent &event) { SetVUcycleSliderMsg(); event.Skip(); }
void MultiViewerMain::OnTableDBSliderRelease( wxScrollEvent& event ) { SetCurPage(mTableDBSlider->GetValue()); event.Skip(); }
void wxMDIClientWindow::OnScroll(wxScrollEvent& event) { // Default(); // Default processing: OBSOLETE FUNCTION event.Skip(); }
void coreImageContrastWidgetUI::OnSliderPositiveContrast(wxScrollEvent &event) { event.Skip(); wxLogDebug(wxT("Event handler (coreImageContrastWidgetUI::OnSliderPositiveContrast) not implemented yet")); //notify the user that he hasn't implemented the event handler yet }
// Explicitly call default scroll behaviour void wxMDIClientWindow::OnScroll(wxScrollEvent& event) { event.Skip(); }
void SliderWindow::OnScrollChanged( wxScrollEvent& e ) { e.Skip(); m_SliderWidget->End(); }