void ExternalProcess::OnError( process_error_event_handler handler, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->ExternalProcess->SetExternalProcessErrorEventRoutine)( handle, &receiver, (handler != nullptr) ? ExternalProcessEventDispatcher::Error : 0 ) == api_false ) throw APIFunctionError( "SetExternalProcessErrorEventRoutine" ); m_handlers->onError = handler; }
void Edit::OnSelectionUpdated( selection_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->Edit->SetSelectionUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? EditEventDispatcher::SelectionUpdated : nullptr ) == api_false ) throw APIFunctionError( "SetSelectionUpdatedEventRoutine" ); m_handlers->onSelectionUpdated = f; }
void ExternalProcess::OnStandardErrorDataAvailable( process_event_handler handler, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->ExternalProcess->SetExternalProcessStandardErrorDataAvailableEventRoutine)( handle, &receiver, (handler != nullptr) ? ExternalProcessEventDispatcher::StandardErrorDataAvailable : 0 ) == api_false ) throw APIFunctionError( "SetExternalProcessStandardErrorDataAvailableEventRoutine" ); m_handlers->onStandardErrorDataAvailable = handler; }
void TabBox::OnPageSelected( page_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->TabBox->SetTabBoxPageSelectedEventRoutine)( handle, &receiver, (f != nullptr) ? TabBoxEventDispatcher::PageSelected : nullptr ) == api_false ) throw APIFunctionError( "SetTabBoxPageSelectedEventRoutine" ); m_handlers->onPageSelected = f; }
void Edit::OnReturnPressed( edit_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->Edit->SetReturnPressedEventRoutine)( handle, &receiver, (f != nullptr) ? EditEventDispatcher::ReturnPressed : nullptr ) == api_false ) throw APIFunctionError( "SetReturnPressedEventRoutine" ); m_handlers->onReturnPressed = f; }
void ComboBox::OnEditTextUpdated( edit_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->ComboBox->SetComboBoxEditTextUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? ComboBoxEventDispatcher::EditTextUpdated : 0 ) == api_false ) throw APIFunctionError( "SetComboBoxEditTextUpdatedEventRoutine" ); m_handlers->onEditTextUpdated = f; }
void SpinBox::OnRangeUpdated( range_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->SpinBox->SetSpinBoxRangeUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? SpinBoxEventDispatcher::RangeUpdated : 0 ) == api_false ) throw APIFunctionError( "SetSpinBoxRangeUpdatedEventRoutine" ); m_handlers->onRangeUpdated = f; }
void TreeBox::OnNodeSelectionUpdated( tree_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->TreeBox->SetTreeBoxNodeSelectionUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? TreeBoxEventDispatcher::NodeSelectionUpdated : nullptr ) == api_false ) throw APIFunctionError( "SetTreeBoxNodeSelectionUpdatedEventRoutine" ); m_handlers->onNodeSelectionUpdated = f; }
void TreeBox::OnCurrentNodeUpdated( node_navigation_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->TreeBox->SetTreeBoxCurrentNodeUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? TreeBoxEventDispatcher::CurrentNodeUpdated : nullptr ) == api_false ) throw APIFunctionError( "SetTreeBoxCurrentNodeUpdatedEventRoutine" ); m_handlers->onCurrentNodeUpdated = f; }
void ViewList::OnCurrentViewUpdated( view_event_handler f, Control& receiver ) { INIT_EVENT_HANDLERS(); if ( (*API->ViewList->SetViewListCurrentViewUpdatedEventRoutine)( handle, &receiver, (f != nullptr) ? ViewListEventDispatcher::CurrentViewUpdated : 0 ) == api_false ) throw APIFunctionError( "SetViewListCurrentViewUpdatedEventRoutine" ); m_handlers->onCurrentViewUpdated = f; }
void NumericEdit::OnValueUpdated( value_event_handler f, Control& c ) { if ( f == nullptr || c.IsNull() ) { if ( !m_handlers.IsNull() ) { m_handlers->onValueUpdated = nullptr; m_handlers->onValueUpdatedReceiver = nullptr; } } else { INIT_EVENT_HANDLERS(); m_handlers->onValueUpdated = f; m_handlers->onValueUpdatedReceiver = &c; } }
void SectionBar::OnCheck( check_event_handler f, Control& c ) { if ( Title_CheckBox.IsNull() || f == nullptr || c.IsNull() ) { if ( !m_handlers.IsNull() ) { m_handlers->onCheck = nullptr; m_handlers->onCheckReceiver = nullptr; } } else { INIT_EVENT_HANDLERS(); m_handlers->onCheck = f; m_handlers->onCheckReceiver = &c; } }
void SectionBar::OnToggleSection( section_event_handler f, Control& c ) { if ( f == nullptr || c.IsNull() ) { if ( !m_handlers.IsNull() ) { m_handlers->onToggleSection = nullptr; m_handlers->onToggleSectionReceiver = nullptr; } } else { INIT_EVENT_HANDLERS(); m_handlers->onToggleSection = f; m_handlers->onToggleSectionReceiver = &c; } }