]> git.donarmstrong.com Git - xournal.git/blob - src/xo-misc.h
Public release 0.2.1.
[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_page_stuff(void);
45 void update_toolbar_and_menu(void);
46 void update_file_name(char *filename);
47 void update_undo_redo_enabled(void);
48 void update_copy_paste_enabled(void);
49
50 void do_switch_page(int pg, gboolean rescroll, gboolean refresh_all);
51 void set_cur_color(int color);
52 void process_color_activate(GtkMenuItem *menuitem, int color);
53 void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val);
54 void process_papercolor_activate(GtkMenuItem *menuitem, int color);
55 void process_paperstyle_activate(GtkMenuItem *menuitem, int style);
56
57 gboolean ok_to_close(void);
58 gboolean page_ops_forbidden(void);
59
60 // selection / clipboard stuff
61
62 void reset_selection(void);
63 void move_journal_items_by(GList *itemlist, double dx, double dy);
64
65 // defines for paper rulings
66
67 #define RULING_MARGIN_COLOR 0xff0080ff
68 #define RULING_COLOR 0x40a0ffff
69 #define RULING_THICKNESS 0.5
70 #define RULING_LEFTMARGIN 72
71 #define RULING_TOPMARGIN 80
72 #define RULING_SPACING 24
73 #define RULING_BOTTOMMARGIN RULING_SPACING
74 #define RULING_GRAPHSPACING 14.17