forked from blackfiveimaging/photoprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pp_layout_poster_pageview.h
75 lines (51 loc) · 1.91 KB
/
pp_layout_poster_pageview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef __PP_LAYOUT_POSTER_PAGEVIEW_H__
#define __PP_LAYOUT_POSTER_PAGEVIEW_H__
#include <gdk/gdk.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkaccelgroup.h>
#include <gtk/gtkcheckmenuitem.h>
#include <gtk/gtkmenuitem.h>
#include "pixbufthumbnail/egg-pixbuf-thumbnail.h"
#include "layout_poster.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define PP_LAYOUT_POSTER_PAGEVIEW(obj) GTK_CHECK_CAST (obj, pp_layout_poster_pageview_get_type (), pp_Layout_Poster_PageView)
#define PP_LAYOUT_POSTER_PAGEVIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, pp_layout_poster_pageview_get_type (), pp_Layout_Poster_PageViewClass)
#define PP_IS_PAGEVIEW(obj) GTK_CHECK_TYPE (obj, pp_layout_poster_pageview_get_type ())
typedef struct _pp_Layout_Poster_PageView pp_Layout_Poster_PageView;
typedef struct _pp_Layout_Poster_PageViewClass pp_Layout_Poster_PageViewClass;
struct _pp_Layout_Poster_PageView
{
GtkWidget widget;
/* Button currently pressed or 0 if none */
guint8 button;
/* ID of update timer, or 0 if none */
guint32 timer;
Layout_Poster *layout;
Layout_Poster_ImageInfo *selected;
int left, top;
int width, height;
double scale;
// Dragging state
bool dragging;
int init_x;
int init_y;
LayoutRectangle_Alignment init_hpan;
LayoutRectangle_Alignment init_vpan;
};
struct _pp_Layout_Poster_PageViewClass
{
GtkWidgetClass parent_class;
void (*changed)(pp_Layout_Poster_PageView *pv);
void (*reflow)(pp_Layout_Poster_PageView *pv);
};
GtkWidget* pp_layout_poster_pageview_new(Layout_Poster *layout);
GtkType pp_layout_poster_pageview_get_type(void);
void pp_layout_poster_pageview_set_page(pp_Layout_Poster_PageView *pv,int page);
void pp_layout_poster_pageview_refresh(pp_Layout_Poster_PageView *pv);
void pp_layout_poster_pageview_draw_gridlines(pp_Layout_Poster_PageView *pageview);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __PP_LAYOUT_POSTER_PAGEVIEW_H__ */