本文整理汇总了C++中wxapp_install_idle_handler函数的典型用法代码示例。如果您正苦于以下问题:C++ wxapp_install_idle_handler函数的具体用法?C++ wxapp_install_idle_handler怎么用?C++ wxapp_install_idle_handler使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxapp_install_idle_handler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gtk_notebook_realized_callback
static void
gtk_notebook_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
/* GTK 1.2 up to version 1.2.5 is broken so that we have to call a queue_resize
here in order to make repositioning before showing to take effect. */
gtk_widget_queue_resize( win->m_widget );
}
示例2: gtk_scrollbar_changed_callback
static void
gtk_scrollbar_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
if (!win->m_hasVMT) return;
if (g_isIdle)
wxapp_install_idle_handler();
win->CalculateScrollbar();
}
示例3: gtk_dnd_window_configure_callback
static gint
gtk_dnd_window_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxDropSource *source )
{
if (g_isIdle)
wxapp_install_idle_handler();
source->GiveFeedback( ConvertFromGTK(source->m_dragContext->action) );
return 0;
}
示例4: source_drag_end
static void source_drag_end( GtkWidget *WXUNUSED(widget),
GdkDragContext *WXUNUSED(context),
wxDropSource *drop_source )
{
if (g_isIdle) wxapp_install_idle_handler();
// printf( "Drag source: drag_end.\n" );
drop_source->m_waiting = false;
}
示例5: gtk_frame_focus_callback
static gboolean gtk_frame_focus_callback( GtkWidget *WXUNUSED(widget),
GtkDirectionType WXUNUSED(d),
wxWindow *WXUNUSED(win) )
{
if (g_isIdle)
wxapp_install_idle_handler();
// This disables GTK's tab traversal
return TRUE;
}
示例6: gtk_fontdialog_cancel_callback
static
void gtk_fontdialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFontDialog *dialog )
{
if (g_isIdle)
wxapp_install_idle_handler();
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}
示例7: gtk_fontdialog_cancel_callback
static
void gtk_fontdialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFontDialog *dialog )
{
if (g_isIdle)
wxapp_install_idle_handler();
wxCommandEvent event(wxEVT_BUTTON, wxID_CANCEL);
event.SetEventObject( dialog );
dialog->HandleWindowEvent( event );
}
示例8: gtk_spinbutt_callback
static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *win )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!win->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
float diff = win->m_adjust->value - win->m_oldPos;
if (fabs(diff) < sensitivity) return;
wxEventType command = wxEVT_NULL;
float line_step = win->m_adjust->step_increment;
if (fabs(diff-line_step) < sensitivity) command = wxEVT_SCROLL_LINEUP;
else if (fabs(diff+line_step) < sensitivity) command = wxEVT_SCROLL_LINEDOWN;
else command = wxEVT_SCROLL_THUMBTRACK;
int value = (int)ceil(win->m_adjust->value);
wxSpinEvent event( command, win->GetId());
event.SetPosition( value );
event.SetEventObject( win );
if ((win->HandleWindowEvent( event )) &&
!event.IsAllowed() )
{
/* program has vetoed */
win->m_adjust->value = win->m_oldPos;
gtk_signal_disconnect_by_func( GTK_OBJECT (win->m_adjust),
(GtkSignalFunc) gtk_spinbutt_callback,
(gpointer) win );
gtk_signal_emit_by_name( GTK_OBJECT(win->m_adjust), "value_changed" );
gtk_signal_connect( GTK_OBJECT (win->m_adjust),
"value_changed",
(GtkSignalFunc) gtk_spinbutt_callback,
(gpointer) win );
return;
}
win->m_oldPos = win->m_adjust->value;
/* always send a thumbtrack event */
if (command != wxEVT_SCROLL_THUMBTRACK)
{
command = wxEVT_SCROLL_THUMBTRACK;
wxSpinEvent event2( command, win->GetId());
event2.SetPosition( value );
event2.SetEventObject( win );
win->HandleWindowEvent( event2 );
}
}
示例9: target_drag_data_received
static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *data,
guint WXUNUSED(info),
guint time,
wxDropTarget *drop_target )
{
if (g_isIdle) wxapp_install_idle_handler();
/* Owen Taylor: "call gtk_drag_finish() with
success == TRUE" */
if ((data->length <= 0) || (data->format != 8))
{
/* negative data length and non 8-bit data format
qualifies for junk */
gtk_drag_finish (context, FALSE, FALSE, time);
return;
}
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: data received event") );
#endif
/* inform the wxDropTarget about the current GtkSelectionData.
this is only valid for the duration of this call */
drop_target->SetDragData( data );
wxDragResult result = ConvertFromGTK(context->action);
if ( wxIsDragResultOk( drop_target->OnData( x, y, result ) ) )
{
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
#endif
/* tell GTK that data transfer was successful */
gtk_drag_finish( context, TRUE, FALSE, time );
}
else
{
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned FALSE") );
#endif
/* tell GTK that data transfer was not successful */
gtk_drag_finish( context, FALSE, FALSE, time );
}
/* after this, invalidate the drop_target's drag data */
drop_target->SetDragData( (GtkSelectionData*) NULL );
}
示例10: gtk_glwindow_expose_callback
static void
gtk_glwindow_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExpose *gdk_event, wxGLCanvas *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
win->GetUpdateRegion().Union( gdk_event->area.x,
gdk_event->area.y,
gdk_event->area.width,
gdk_event->area.height );
}
示例11: gtk_dirdialog_response_callback
static void gtk_dirdialog_response_callback(GtkWidget *w,
gint response,
wxDirDialog *dialog)
{
wxapp_install_idle_handler();
if (response == GTK_RESPONSE_ACCEPT)
gtk_dirdialog_ok_callback(w, dialog);
else // GTK_RESPONSE_CANCEL or GTK_RESPONSE_NONE
gtk_dirdialog_cancel_callback(w, dialog);
}
示例12: gtk_frame_delete_callback
static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxTopLevelWindowGTK *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
if (win->IsEnabled() &&
(g_openDialogs == 0 || (win->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) ||
win->IsGrabbed()))
win->Close();
return TRUE;
}
示例13: gtk_listbox_realized_callback
static gint
gtk_listbox_realized_callback( GtkWidget *m_widget, wxListBox *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
GList *child = win->m_list->children;
for (child = win->m_list->children; child != NULL; child = child->next)
gtk_widget_show( GTK_WIDGET(child->data) );
return false;
}
示例14: gtkcombobox_text_changed_callback
static void
gtkcombobox_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
if (g_isIdle) wxapp_install_idle_handler();
if (!combo->m_hasVMT) return;
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
event.SetString( combo->GetValue() );
event.SetEventObject( combo );
combo->GetEventHandler()->ProcessEvent( event );
}
示例15: gtk_button_clicked_callback
static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button )
{
if (g_isIdle)
wxapp_install_idle_handler();
if (!button->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
wxCommandEvent event(wxEVT_BUTTON, button->GetId());
event.SetEventObject(button);
button->HandleWindowEvent(event);
}