summaryrefslogtreecommitdiffstats
path: root/display.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-11-14 00:57:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 15:05:11 -0800
commit7ea728e95ffcc72360d49648d7e332a06faa49ba (patch)
treecfb07ab36c024febdab25c2e67a90d7eef825b2a /display.h
parentb2077dc9c0bb9eeccbf48980d0d22269b621e8c3 (diff)
downloadsubsurface-7ea728e95ffcc72360d49648d7e332a06faa49ba.tar.gz
Print: add the support to store margins and printer options
All the print options will be stored after the user closes or "cancels" the print dialog. There seems to be no good way to store the last selected page size, because print dialogs are different and some just list them as strings - A4, A3, etc. The patch also applies the following changes: - renames display.h's 'struct options' to 'struct print_options' as these were really just for the print dialog - the print_options dialog now stores more options as 'bool' - demote PrintDialog's 'printOptions' to 'private' Fixes #653 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
-rw-r--r--display.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/display.h b/display.h
index 96a83c5ee..f0101448d 100644
--- a/display.h
+++ b/display.h
@@ -35,16 +35,18 @@ typedef enum {
extern struct divecomputer *select_dc(struct dive *);
-struct options {
- enum {
+struct print_options {
+ enum print_type {
PRETTY,
TABLE,
TWOPERPAGE,
ONEPERPAGE
} type;
- int print_selected;
- int color_selected;
+ bool print_selected;
+ bool color_selected;
bool notes_up;
+ bool landscape;
+ int margins[4]; // left, top, right, bottom
};
extern unsigned int dc_number;