Beispiel #1
0
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;
}
Beispiel #2
0
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;
}
Beispiel #3
0
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;
}
Beispiel #4
0
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;
}
Beispiel #5
0
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;
}
Beispiel #6
0
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;
}
Beispiel #7
0
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;
}
Beispiel #8
0
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;
}
Beispiel #9
0
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;
}
Beispiel #10
0
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;
}
Beispiel #11
0
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;
   }
}
Beispiel #12
0
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;
   }
}
Beispiel #13
0
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;
   }
}