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


C++ wxapp_install_idle_handler函数代码示例

本文整理汇总了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 );
}
开发者ID:EdgarTx,项目名称:wx,代码行数:10,代码来源:notebook.cpp

示例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();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:10,代码来源:textctrl.cpp

示例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;
    }
开发者ID:EdgarTx,项目名称:wx,代码行数:10,代码来源:dnd.cpp

示例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;
}
开发者ID:EdgarTx,项目名称:wx,代码行数:10,代码来源:dnd.cpp

示例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;
}
开发者ID:SCP-682,项目名称:Cities3D,代码行数:10,代码来源:toplevel.cpp

示例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 );
}
开发者ID:SCP-682,项目名称:Cities3D,代码行数:10,代码来源:fontdlg.cpp

示例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 );
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:10,代码来源:fontdlg.cpp

示例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 );
    }
}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:55,代码来源:spinbutt.cpp

示例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 );
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:55,代码来源:dnd.cpp

示例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 );
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:11,代码来源:glcanvas.cpp

示例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);
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:11,代码来源:dirdlg.cpp

示例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;
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:12,代码来源:toplevel.cpp

示例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;
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:12,代码来源:listbox.cpp

示例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 );
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:12,代码来源:combobox.cpp

示例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);
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:12,代码来源:button.cpp


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