summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-18 19:39:57 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-18 19:46:17 -0700
commit14b6551a6af4ae9a7d8d56863636fc91a36ee9c0 (patch)
treeb8a7f944c115c4422a31eb13678279963ac3a478 /display.h
parent471b944704559f0ec3436c3e71da5752e9742e86 (diff)
downloadsubsurface-14b6551a6af4ae9a7d8d56863636fc91a36ee9c0.tar.gz
Manually remove events in the profile context menu
As logical extension of the ability to add bookmarks and gas changes this adds the ability to remove (any arbitrary) event that happens at the mouse position (specifically, that is within +/- six (scaled) pixels around the x-position (time) of the mouse). That's the same width that the triangle marker occupies which was moved to be centered around the event time in commit 5752e9742e86 ("Finetune event triangle position to have the top point at the event time"). Fixes #60 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
-rw-r--r--display.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/display.h b/display.h
index c76afbc02..4e147061f 100644
--- a/display.h
+++ b/display.h
@@ -48,9 +48,10 @@ typedef enum { SC_SCREEN, SC_PRINT } scale_mode_t;
extern void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t scale);
extern struct divecomputer *select_dc(struct divecomputer *main);
extern void init_profile_background(struct graphics_context *gc);
-extern void attach_tooltip(int x, int y, int w, int h, const char *text);
+extern void attach_tooltip(int x, int y, int w, int h, const char *text, struct event *event);
extern void get_plot_details(struct graphics_context *gc, int time, char *buf, size_t bufsize);
extern int x_to_time(double x);
+extern int x_abs(double x);
struct options {
enum { PRETTY, TABLE, TWOPERPAGE } type;