]> git.donarmstrong.com Git - xournal.git/blob - src/xo-misc.h
Release 0.3.3 (minor enhancements)
[xournal.git] / src / xo-misc.h
1 // data manipulation misc functions
2
3 struct Page *new_page(struct Page *template);
4 struct Page *new_page_with_bg(struct Background *bg, double width, double height);
5 void realloc_cur_path(int n);
6 void clear_redo_stack(void);
7 void clear_undo_stack(void);
8 void prepare_new_undo(void);
9 void delete_journal(struct Journal *j);
10 void delete_page(struct Page *pg);
11 void delete_layer(struct Layer *l);
12
13 // referenced strings
14
15 struct Refstring *new_refstring(const char *s);
16 struct Refstring *refstring_ref(struct Refstring *rs);
17 void refstring_unref(struct Refstring *rs);
18
19 // helper functions
20
21 void get_pointer_coords(GdkEvent *event, double *ret);
22 void fix_xinput_coords(GdkEvent *event);
23 void update_item_bbox(struct Item *item);
24 void make_page_clipbox(struct Page *pg);
25 void make_canvas_items(void);
26 void update_canvas_bg(struct Page *pg);
27 gboolean is_visible(struct Page *pg);
28 void rescale_bg_pixmaps(void);
29
30 gboolean have_intersect(struct BBox *a, struct BBox *b);
31 void lower_canvas_item_to(GnomeCanvasGroup *g, GnomeCanvasItem *item, GnomeCanvasItem *after);
32
33 // interface misc functions
34
35 void update_thickness_buttons(void);
36 void update_color_buttons(void);
37 void update_tool_buttons(void);
38 void update_tool_menu(void);
39 void update_ruler_indicator(void);
40 void update_color_menu(void);
41 void update_pen_props_menu(void);
42 void update_eraser_props_menu(void);
43 void update_highlighter_props_menu(void);
44 void update_mappings_menu_linkings(void);
45 void update_mappings_menu(void);
46 void update_page_stuff(void);
47 void update_toolbar_and_menu(void);
48 void update_file_name(char *filename);
49 void update_undo_redo_enabled(void);
50 void update_copy_paste_enabled(void);
51 void update_vbox_order(int *order);
52
53 void update_mapping_linkings(int toolno);
54 void do_switch_page(int pg, gboolean rescroll, gboolean refresh_all);
55 void set_cur_color(int color);
56 void process_color_activate(GtkMenuItem *menuitem, int color);
57 void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val);
58 void process_papercolor_activate(GtkMenuItem *menuitem, int color);
59 void process_paperstyle_activate(GtkMenuItem *menuitem, int style);
60
61 gboolean ok_to_close(void);
62 gboolean page_ops_forbidden(void);
63
64 // selection / clipboard stuff
65
66 void reset_selection(void);
67 void move_journal_items_by(GList *itemlist, double dx, double dy,
68                            struct Layer *l1, struct Layer *l2, GList *depths);
69
70 // switch between mappings
71
72 void switch_mapping(int m);
73 void process_mapping_activate(GtkMenuItem *menuitem, int m, int tool);
74
75
76 // defines for paper rulings
77
78 #define RULING_MARGIN_COLOR 0xff0080ff
79 #define RULING_COLOR 0x40a0ffff
80 #define RULING_THICKNESS 0.5
81 #define RULING_LEFTMARGIN 72.0
82 #define RULING_TOPMARGIN 80.0
83 #define RULING_SPACING 24.0
84 #define RULING_BOTTOMMARGIN RULING_SPACING
85 #define RULING_GRAPHSPACING 14.17