1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

Added delete/undelete.

- when moving a point, we no longer restrict the area around the original
  position once the drag radius has been left
- objects can now be deleted by selecting them and pressing Delete
- deleted objects can be restored by pressing "u"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5387 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-05 00:32:38 +00:00
parent 5d7ab083a3
commit 3db91b5c1b
11 changed files with 365 additions and 13 deletions

13
inst.c
View File

@@ -19,6 +19,7 @@
#include "coord.h"
#include "expr.h"
#include "obj.h"
#include "delete.h"
#include "gui_status.h"
#include "gui_tools.h"
#include "gui_inst.h"
@@ -740,12 +741,13 @@ static struct inst_ops frame_ops = {
};
void inst_begin_frame(const struct frame *frame, struct coord base,
int active, int is_active_frame)
void inst_begin_frame(struct obj *obj, const struct frame *frame,
struct coord base, int active, int is_active_frame)
{
struct inst *inst;
inst = add_inst(&frame_ops, ip_frame, base);
inst->obj = obj;
inst->u.frame.ref = frame;
inst->u.frame.active = is_active_frame;
inst->active = active;
@@ -865,6 +867,13 @@ void inst_hover(struct inst *inst, struct draw_ctx *ctx, int on)
}
int inst_delete(struct inst *inst)
{
return inst->ops == &vec_ops ?
delete_vec(inst->vec) : delete_obj(inst->obj);
}
void inst_debug(void)
{
enum inst_prio prio;