Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / extension / print.h
1 /*
2  * Authors:
3  *   Ted Gould <ted@gould.cx>
4  *   Abhishek Sharma
5  *
6  * Copyright (C) 2002-2004 Authors
7  *
8  * Released under GNU GPL, read the file 'COPYING' for more information
9  */
11 #ifndef INKSCAPE_EXTENSION_PRINT_H__
12 #define INKSCAPE_EXTENSION_PRINT_H__
14 #include "extension.h"
16 #include "display/nr-arena-forward.h"
17 #include "forward.h"
18 #include "sp-item.h"
19 namespace Inkscape {
20 namespace Extension {
22 class Print : public Extension {
24 public: /* TODO: These are public for the short term, but this should be fixed */
25     SPItem *base;            /**< TODO: Document these */
26     NRArena *arena;          /**< TODO: Document these */
27     NRArenaItem *root;       /**< TODO: Document these */
28     unsigned int dkey;       /**< TODO: Document these */
30 public:
31                   Print       (Inkscape::XML::Node * in_repr,
32                                Implementation::Implementation * in_imp);
33     virtual      ~Print       (void);
34     virtual bool  check       (void);
36     /* FALSE means user hit cancel */
37     unsigned int  setup       (void);
38     unsigned int  set_preview (void);
40     unsigned int  begin       (SPDocument *doc);
41     unsigned int  finish      (void);
43     /* Rendering methods */
44     unsigned int  bind        (Geom::Matrix const *transform,
45                                float opacity);
46     unsigned int  release     (void);
47     unsigned int  comment     (const char * comment);
48     unsigned int  fill        (Geom::PathVector const &pathv,
49                                Geom::Matrix const *ctm,
50                                SPStyle const *style,
51                                NRRect const *pbox,
52                                NRRect const *dbox,
53                                NRRect const *bbox);
54     unsigned int  stroke      (Geom::PathVector const &pathv,
55                                Geom::Matrix const *transform,
56                                SPStyle const *style,
57                                NRRect const *pbox,
58                                NRRect const *dbox,
59                                NRRect const *bbox);
60     unsigned int  image       (unsigned char *px,
61                                unsigned int w,
62                                unsigned int h,
63                                unsigned int rs,
64                                Geom::Matrix const *transform,
65                                SPStyle const *style);
66     unsigned int  text        (char const *text,
67                                Geom::Point p,
68                                SPStyle const *style);
69     bool          textToPath  (void);
70     bool          fontEmbedded  (void);
71 };
73 } }  /* namespace Inkscape, Extension */
74 #endif /* INKSCAPE_EXTENSION_PRINT_H__ */
76 /*
77   Local Variables:
78   mode:c++
79   c-file-style:"stroustrup"
80   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
81   indent-tabs-mode:nil
82   fill-column:99
83   End:
84 */
85 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :