mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-05 06:18:26 +02:00
55916cc75b
drawing - zoom to frame was broken because it didn't track the recent change in location of active flag - we can now pan and zoom while dragging - gui_canvas.c:button_release_event didn't consider the button, making centering also end dragging git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5401 99fdad57-331a-0410-800a-d7fa5415bdb3
59 lines
1.8 KiB
C
59 lines
1.8 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_vec(struct inst *inst, struct draw_ctx *ctx,
|
|
struct coord pos, int i);
|
|
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);
|
|
struct pix_buf *draw_move_meas(struct inst *inst, struct draw_ctx *ctx,
|
|
struct coord pos, int i);
|
|
struct pix_buf *draw_move_frame(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_redraw(struct draw_ctx *ctx);
|
|
|
|
/*
|
|
* Cache the frame and track it.
|
|
*/
|
|
|
|
void tool_frame_update(void);
|
|
void tool_frame_deleted(const struct frame *frame);
|
|
|
|
void tool_reset(void);
|
|
|
|
GtkWidget *gui_setup_tools(GdkDrawable *drawable);
|
|
|
|
#endif /* !GUI_TOOLS_H */
|