1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-05 04:35:19 +02:00
fped/gui_tools.h
werner 5d7ab083a3 - README: described use of semicolons
- README: added that loops can also execute zero times
- accept labels only at the beginning of a line
- rectangles and lines no longer use the bounding box for drawing (caused
  offset problems since we now correct for the line width)
- dist_rect and inside_rect no longer require their input pre-sorted
- pad instances now have their own structure and no longer abuse the bounding
  box to know the pad coordinates
- Makefile: use $(GEN) for fig2dev, to reduce chattiness
- when dragging a point, the symbol is now adjusted accordingly
- added moving of rects, pads, circles, and arcs
- added creation of pads 
- moved rotate_r from gui_inst.c to coord.c
- new function "theta" that combines most of the angle calculations
- save_pix_buf: y < 0 clipping changed width, not height



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5386 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 21:45:33 +00:00

45 lines
1.3 KiB
C

/*
* gui_tools.h - GUI, tool bar
*
* Written 2009 by Werner Almesberger
* Copyright 2009 by Werner Almesberger
*
* 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_TOOLS_H
#define GUI_TOOLS_H
#include <gtk/gtk.h>
#include "inst.h"
struct pix_buf *draw_move_line(struct inst *inst, struct draw_ctx *ctx,
struct coord pos, int i);
struct pix_buf *draw_move_rect(struct inst *inst, struct draw_ctx *ctx,
struct coord pos, int i);
struct pix_buf *draw_move_pad(struct inst *inst, struct draw_ctx *ctx,
struct coord pos, int i);
struct pix_buf *draw_move_arc(struct inst *inst, struct draw_ctx *ctx,
struct coord pos, int i);
void do_move_to_arc(struct inst *inst, struct vec *vec, int i);
void tool_dehover(struct draw_ctx *ctx);
void tool_hover(struct draw_ctx *ctx, struct coord pos);
int tool_consider_drag(struct draw_ctx *ctx, struct coord pos);
void tool_drag(struct draw_ctx *ctx, struct coord to);
void tool_cancel_drag(struct draw_ctx *ctx);
int tool_end_drag(struct draw_ctx *ctx, struct coord to);
void tool_reset(void);
GtkWidget *gui_setup_tools(GdkDrawable *drawable);
#endif /* !GUI_TOOLS_H */