1
#ifndef LAYOUT_POSTER_H
2
#define LAYOUT_POSTER_H
6
#include <gtk/gtkwidget.h>
7
#include <gdk/gdkpixbuf.h>
9
#include "imagesource/imagesource.h"
10
#include "support/pageextent.h"
16
class Layout_Poster_ImageInfo;
17
class PhotoPrint_State;
28
class Layout_Poster : public Layout, public PageExtent
31
Layout_Poster(PhotoPrint_State &state,Layout *oldlayout=NULL);
32
virtual ~Layout_Poster();
33
const char *GetType();
34
int GetCapabilities();
35
int AddImage(const char *filename,bool allowcropping=true,PP_ROTATION rotation=PP_ROTATION_AUTO);
36
void CopyImage(Layout_ImageInfo *ii);
38
void SetPageExtent(PageExtent &pe);
39
void SetMargins(int left,int right,int top,int bottom);
42
virtual void LayoutToDB(LayoutDB &db);
43
virtual void DBToLayout(LayoutDB &db);
44
virtual GtkWidget *CreateWidget();
45
virtual void RefreshWidget(GtkWidget *widget);
46
virtual void SetCurrentPage(int page);
47
ImageSource *GetImageSource(int page,CMColourDevice target=CM_COLOURDEVICE_PRINTER,CMTransformFactory *factory=NULL,int res=0);
48
void UpdatePageSize();
49
Layout_Poster_ImageInfo *ImageAt(int page);
50
void DrawPreview(GtkWidget *widget,int xpos,int ypos,int width,int height);
51
virtual void (*SetUnitFunc())(GtkWidget *wid,enum Units unit);
52
int posters,currentposter;
53
int posterwidth,posterheight;
54
int paperwidth,paperheight;
55
int hoverlap,voverlap;
57
friend class Layout_Poster_ImageInfo;
61
class Layout_Poster_ImageInfo : public Layout_ImageInfo
64
Layout_Poster_ImageInfo(Layout_Poster &layout,const char *filename,int page,bool allowcropping=false,PP_ROTATION rotation=PP_ROTATION_AUTO);
65
Layout_Poster_ImageInfo(Layout_Poster &layout,Layout_ImageInfo *ii,int page,bool allowcropping=false,PP_ROTATION rotation=PP_ROTATION_AUTO);
66
virtual ~Layout_Poster_ImageInfo();
67
void DrawThumbnail(GtkWidget *widget,int xpos,int ypos,int width,int height);
68
// ImageSource *GetImageSource();
71
friend class Layout_Poster;
1
#ifndef LAYOUT_POSTER_H
2
#define LAYOUT_POSTER_H
6
#include <gtk/gtkwidget.h>
7
#include <gdk/gdkpixbuf.h>
9
#include "imagesource/imagesource.h"
10
#include "support/pageextent.h"
16
class Layout_Poster_ImageInfo;
17
class PhotoPrint_State;
28
class Layout_Poster : public Layout
31
Layout_Poster(PhotoPrint_State &state,Layout *oldlayout=NULL);
32
virtual ~Layout_Poster();
33
const char *GetType();
34
int GetCapabilities();
35
int AddImage(const char *filename,bool allowcropping=true,PP_ROTATION rotation=PP_ROTATION_AUTO);
36
void CopyImage(Layout_ImageInfo *ii);
38
void SetPageExtent(PageExtent &pe);
39
void SetMargins(int left,int right,int top,int bottom);
42
virtual void LayoutToDB(LayoutDB &db);
43
virtual void DBToLayout(LayoutDB &db);
44
virtual GtkWidget *CreateWidget();
45
virtual void RefreshWidget(GtkWidget *widget);
46
virtual void SetCurrentPage(int page);
47
ImageSource *GetImageSource(int page,CMColourDevice target=CM_COLOURDEVICE_PRINTER,CMTransformFactory *factory=NULL,int res=0);
48
void UpdatePageSize();
49
Layout_Poster_ImageInfo *ImageAt(int page);
50
void DrawPreview(GtkWidget *widget,int xpos,int ypos,int width,int height);
51
virtual void (*SetUnitFunc())(GtkWidget *wid,enum Units unit);
52
int posters,currentposter;
53
int posterwidth,posterheight;
54
int paperwidth,paperheight;
55
int hoverlap,voverlap;
57
friend class Layout_Poster_ImageInfo;
61
class Layout_Poster_ImageInfo : public Layout_ImageInfo
64
Layout_Poster_ImageInfo(Layout_Poster &layout,const char *filename,int page,bool allowcropping=false,PP_ROTATION rotation=PP_ROTATION_AUTO);
65
Layout_Poster_ImageInfo(Layout_Poster &layout,Layout_ImageInfo *ii,int page,bool allowcropping=false,PP_ROTATION rotation=PP_ROTATION_AUTO);
66
virtual ~Layout_Poster_ImageInfo();
67
void DrawThumbnail(GtkWidget *widget,int xpos,int ypos,int width,int height);
68
// ImageSource *GetImageSource();
71
friend class Layout_Poster;