brain/viz.cc
/* Handle button press events by either drawing a rectangle
 * or clearing the surface, depending on which button was pressed.
 * The ::button-press signal handler receives a GdkEventButton
 * struct which contains this information.
 */
Handle button press events by either drawing a rectangle
or clearing the surface, depending on which button was pressed.
The ::button-press signal handler receives a GdkEventButton
struct which contains this information.
Handle button press events by either drawing a rectangle or clearing the surface depending on which button was pressed . The :: button - press signal handler receives a GdkEventButton struct which contains this information .
static gboolean
button_press_event_cb(GtkWidget      *widget,
                      GdkEventButton *event,
                      gpointer        data)
{
    cout << "click" << endl;
    guard _gg(mx);
    if (surface == NULL)
        return FALSE;
    if (event->button == GDK_BUTTON_SECONDARY)
    {
        clear_surface();
        gtk_widget_queue_draw(widget);
    }
    return TRUE;
}
static gboolean button_press_event_cb ( GtkWidget * widget , GdkEventButton * event , gpointer data ) { cout << " " << endl ; guard _gg ( mx ) ; if ( surface == NULL ) return FALSE ; if ( event -> button == GDK_BUTTON_SECONDARY ) { clear_surface ( ) ; gtk_widget_queue_draw ( widget ) ; } return TRUE ; }
Handle button press events by either drawing a rectangle
 or clearing the surface, depending on which button was pressed.
Handle button press events by either drawing a rectangle or clearing the surface depending on which button was pressed .
/* paranoia check, in case we haven't gotten a configure event */ /*
    if (event->button == GDK_BUTTON_PRIMARY)
    {
        draw_brush(widget, event->x, event->y);
    }
    else 
    */ /* We've handled the event, stop processing */