2009-08-03 19:12:47 +03:00
|
|
|
/*
|
|
|
|
* gui_canvas.h - GUI, canvas
|
|
|
|
*
|
Dragging a frame into the canvas now works. It's built on top of the frame
tool, with all the old code still around, so the code paths are a bit obscure.
- gui_frame_drag.c: use GTK_DEST_DEFAULT_MOTION instead of
GTK_DEST_DEFAULT_HIGHLIGHT
- gui_frame_drag.c: put meat on the frame and canvas drag and drop skeleton
- gui_frame_drag.c (setup_frame_drag, setup_canvas_drag): use GDK_ACTION_COPY
instead of GDK_ACTION_PRIVATE
- gui_frame_drag.h, gui_frame_drag.c (is_dragging_anything): new helper
function to check if we're dragging anything, without specifying what
- gui_canvas.h, gui_canvas.c: added thin interface layer between gui_frame.c
and gui_tool.c
- gui_canvas.c (enter_notify_event, leave_notify_event): return FALSE so that
other widgets can get the events, too
- gui_tool.h, gui_tool.c (tool_hover): return whether we found anything to
hover on
- gui_tool.h, gui_tool.c: added interface for dropping a frame on the canvas
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5932 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-25 00:46:43 +03:00
|
|
|
* Written 2009, 2010 by Werner Almesberger
|
|
|
|
* Copyright 2009, 2010 by Werner Almesberger
|
2009-08-03 19:12:47 +03:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GUI_CANVAS_H
|
|
|
|
#define GUI_CANVAS_H
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
|
2009-08-08 00:47:51 +03:00
|
|
|
/*
|
|
|
|
* "highlight" is invoked at the end of each redraw, for optional highlighting
|
|
|
|
* of objects.
|
|
|
|
*/
|
|
|
|
|
2009-08-08 17:11:26 +03:00
|
|
|
extern void (*highlight)(void);
|
2009-08-08 00:47:51 +03:00
|
|
|
|
|
|
|
|
2009-08-16 14:21:48 +03:00
|
|
|
void refresh_pos(void);
|
|
|
|
|
2009-08-03 19:12:47 +03:00
|
|
|
void redraw(void);
|
|
|
|
|
2009-08-16 15:04:01 +03:00
|
|
|
void zoom_in_center(void);
|
|
|
|
void zoom_out_center(void);
|
|
|
|
void zoom_to_frame(void);
|
|
|
|
void zoom_to_extents(void);
|
|
|
|
|
Dragging a frame into the canvas now works. It's built on top of the frame
tool, with all the old code still around, so the code paths are a bit obscure.
- gui_frame_drag.c: use GTK_DEST_DEFAULT_MOTION instead of
GTK_DEST_DEFAULT_HIGHLIGHT
- gui_frame_drag.c: put meat on the frame and canvas drag and drop skeleton
- gui_frame_drag.c (setup_frame_drag, setup_canvas_drag): use GDK_ACTION_COPY
instead of GDK_ACTION_PRIVATE
- gui_frame_drag.h, gui_frame_drag.c (is_dragging_anything): new helper
function to check if we're dragging anything, without specifying what
- gui_canvas.h, gui_canvas.c: added thin interface layer between gui_frame.c
and gui_tool.c
- gui_canvas.c (enter_notify_event, leave_notify_event): return FALSE so that
other widgets can get the events, too
- gui_tool.h, gui_tool.c (tool_hover): return whether we found anything to
hover on
- gui_tool.h, gui_tool.c: added interface for dropping a frame on the canvas
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5932 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-25 00:46:43 +03:00
|
|
|
void canvas_frame_begin(struct frame *frame);
|
|
|
|
int canvas_frame_motion(struct frame *frame, int x, int y);
|
|
|
|
void canvas_frame_end(void);
|
|
|
|
int canvas_frame_drop(struct frame *frame, int x, int y);
|
|
|
|
|
2009-08-03 19:12:47 +03:00
|
|
|
GtkWidget *make_canvas(void);
|
|
|
|
void init_canvas(void);
|
|
|
|
|
|
|
|
#endif /* !GUI_CANVAS_H */
|