X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fxournal.h;h=62d3dc8efb3b14e7d4c26e5b53d9a38099e366d2;hb=fd008f43f9e0848369972b0bc0e52129380e229b;hp=236ff33578c30a9c015ff350e8e89ee9aaadf4d6;hpb=ddd27893ae44eb5eb62c80e5751a6943a4782fe2;p=xournal.git diff --git a/src/xournal.h b/src/xournal.h index 236ff33..62d3dc8 100644 --- a/src/xournal.h +++ b/src/xournal.h @@ -6,14 +6,15 @@ #define CONFIG_DIR ".xournal" #define MRU_FILE "recent-files" #define MRU_SIZE 8 +#define CONFIG_FILE "config" // DATA STRUCTURES AND CONSTANTS #define PIXEL_MOTION_THRESHOLD 0.3 #define MAX_AXES 12 #define EPSILON 1E-7 -#define MAX_ZOOM 20 -#define DEFAULT_ZOOM 1.3333333333 +#define MAX_ZOOM 20.0 +#define DISPLAY_DPI_DEFAULT 96.0 #define MIN_ZOOM 0.2 /* a string (+ aux data) that maintains a refcount */ @@ -97,7 +98,9 @@ extern guint predef_bgcolors_rgba[COLOR_MAX]; #define TOOL_SELECTREGION 4 #define TOOL_SELECTRECT 5 #define TOOL_VERTSPACE 6 +#define TOOL_HAND 7 #define NUM_STROKE_TOOLS 3 +#define NUM_TOOLS 8 #define NUM_BUTTONS 3 #define TOOLOPT_ERASER_STANDARD 0 @@ -142,6 +145,7 @@ typedef struct Item { #define ITEM_DELETE_PAGE 14 #define ITEM_REPAINTSEL 15 #define ITEM_MOVESEL_VERT 16 +#define ITEM_HAND 17 typedef struct Layer { GList *items; // the items on the layer, from bottom to top @@ -200,17 +204,28 @@ typedef struct UIData { gboolean use_xinput; // use input devices instead of core pointer gboolean allow_xinput; // allow use of xinput ? int screen_width, screen_height; // initial screen size, for XInput events + double hand_refpt[2]; char *filename; - gboolean view_continuous, fullscreen; + gboolean view_continuous, fullscreen, maximize_at_start; gboolean in_update_page_stuff; // semaphore to avoid scrollbar retroaction struct Selection *selection; GdkCursor *cursor; gboolean antialias_bg; // bilinear interpolation on bg pixmaps gboolean progressive_bg; // rescale bg's one at a time - char *mrufile; // file for the MRU + char *mrufile, *configfile; // file names for MRU & config char *mru[MRU_SIZE]; // MRU data GtkWidget *mrumenu[MRU_SIZE]; gboolean bg_apply_all_pages; + int window_default_width, window_default_height, scrollbar_step_increment; + gboolean print_ruling; // print the paper ruling ? + int default_unit; // the default unit for paper sizes + int startuptool; // the default tool at startup + gboolean startupruler; + int zoom_step_increment; // the increment in the zoom dialog box + double zoom_step_factor; // the multiplicative factor in zoom in/out +#if GLIB_CHECK_VERSION(2,6,0) + GKeyFile *config_data; +#endif } UIData; #define BRUSH_LINKED 0 @@ -298,3 +313,10 @@ extern struct Journal journal; extern struct UIData ui; extern struct BgPdf bgpdf; extern struct UndoItem *undo, *redo; + +extern double DEFAULT_ZOOM; + +#define UNIT_CM 0 +#define UNIT_IN 1 +#define UNIT_PX 2 +#define UNIT_PT 3