mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-29 13:11:54 +02:00
eeshow/gui/glabel.c: allow other glabels to replace pop-up
This commit is contained in:
parent
96fa1a2f62
commit
2b80fcad45
@ -78,10 +78,13 @@ struct gui_ctx {
|
|||||||
|
|
||||||
struct overlay *sheet_overlays;
|
struct overlay *sheet_overlays;
|
||||||
struct overlay *hist_overlays;
|
struct overlay *hist_overlays;
|
||||||
|
|
||||||
struct overlay *pop_overlays; /* pop-up dialogs */
|
struct overlay *pop_overlays; /* pop-up dialogs */
|
||||||
struct overlay *pop_underlays;
|
struct overlay *pop_underlays;
|
||||||
int pop_x, pop_y;
|
int pop_x, pop_y;
|
||||||
int pop_dx, pop_dy;
|
int pop_dx, pop_dy;
|
||||||
|
const void *pop_origin; /* item that created this pop-up */
|
||||||
|
|
||||||
struct aoi *aois; /* areas of interest; in canvas coord */
|
struct aoi *aois; /* areas of interest; in canvas coord */
|
||||||
|
|
||||||
struct gui_sheet delta_a;
|
struct gui_sheet delta_a;
|
||||||
|
@ -69,6 +69,7 @@ void dehover_glabel(struct gui_ctx *ctx)
|
|||||||
{
|
{
|
||||||
overlay_remove_all(&ctx->pop_overlays);
|
overlay_remove_all(&ctx->pop_overlays);
|
||||||
overlay_remove_all(&ctx->pop_underlays);
|
overlay_remove_all(&ctx->pop_underlays);
|
||||||
|
ctx->pop_origin = NULL;
|
||||||
redraw(ctx);
|
redraw(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,14 +195,20 @@ static bool hover_glabel(void *user, bool on)
|
|||||||
dehover_glabel(ctx);
|
dehover_glabel(ctx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (ctx->pop_underlays)
|
if (ctx->pop_underlays) {
|
||||||
|
if (ctx->pop_origin == aoi_ctx)
|
||||||
return 0;
|
return 0;
|
||||||
|
dehover_glabel(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GtkAllocation alloc;
|
GtkAllocation alloc;
|
||||||
int sx, sy, ex, ey, mx, my;
|
int sx, sy, ex, ey, mx, my;
|
||||||
unsigned n = 0;
|
unsigned n = 0;
|
||||||
struct gui_sheet *sheet;
|
struct gui_sheet *sheet;
|
||||||
|
|
||||||
|
ctx->pop_origin = aoi_ctx;
|
||||||
|
|
||||||
aoi_dehover();
|
aoi_dehover();
|
||||||
overlay_remove_all(&ctx->pop_overlays);
|
overlay_remove_all(&ctx->pop_overlays);
|
||||||
overlay_remove_all(&ctx->pop_underlays);
|
overlay_remove_all(&ctx->pop_underlays);
|
||||||
|
Loading…
Reference in New Issue
Block a user