Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Extension::Print Class Reference

#include <print.h>

Inheritance diagram for Inkscape::Extension::Print:
Inkscape::Extension::Extension

Public Member Functions

 Print (Inkscape::XML::Node *in_repr, ImplementationHolder implementation, std::string *base_directory)
 
 ~Print () override
 
unsigned int setup ()
 
unsigned int set_preview ()
 
unsigned int begin (SPDocument *doc)
 
unsigned int finish ()
 
unsigned int bind (Geom::Affine const &transform, float opacity)
 
unsigned int release ()
 
unsigned int comment (const char *comment)
 
unsigned int fill (Geom::PathVector const &pathv, Geom::Affine const &ctm, SPStyle const *style, Geom::OptRect const &pbox, Geom::OptRect const &dbox, Geom::OptRect const &bbox)
 
unsigned int stroke (Geom::PathVector const &pathv, Geom::Affine const &transform, SPStyle const *style, Geom::OptRect const &pbox, Geom::OptRect const &dbox, Geom::OptRect const &bbox)
 
unsigned int image (unsigned char *px, unsigned int w, unsigned int h, unsigned int rs, Geom::Affine const &transform, SPStyle const *style)
 
unsigned int text (char const *text, Geom::Point const &p, SPStyle const *style)
 
bool textToPath ()
 
bool fontEmbedded ()
 
- Public Member Functions inherited from Inkscape::Extension::Extension
 Extension (Inkscape::XML::Node *in_repr, ImplementationHolder implementation, std::string *base_directory)
 Constructs an Extension from a Inkscape::XML::Node.
 
virtual ~Extension ()
 
void set_state (state_t in_state)
 A function to set whether the extension should be loaded or unloaded.
 
state_t get_state ()
 A getter for the state variable.
 
bool loaded ()
 A quick function to test the state of the extension.
 
virtual bool check ()
 A function to check the validity of the extension.
 
virtual bool prefs ()
 Create a dialog for preference for this extension.
 
Inkscape::XML::Nodeget_repr ()
 A getter for the internal Repr, does not add a reference.
 
char const * get_id () const
 Get the ID of this extension - not a copy don't delete!
 
char const * get_name () const
 Get the name of this extension - not a copy don't delete!
 
virtual void deactivate ()
 This function diactivates the extension (which makes it unusable, but not deleted)
 
bool deactivated ()
 Find out the status of the extension.
 
void printFailure (Glib::ustring const &reason)
 A quick function to print out a standard start of extension errors in the log.
 
std::string const & getErrorReason ()
 
Implementation::Implementationget_imp ()
 
auto const & get_base_directory () const
 
void set_base_directory (std::string const &base_directory)
 
std::string get_dependency_location (char const *name)
 Gets the location of the dependency file as an absolute path.
 
char const * get_translation (char const *msgid, char const *msgctxt=nullptr) const
 Gets a translation within the context of the current extension.
 
void set_environment (SPDocument const *doc=nullptr)
 Sets environment suitable for executing this Extension.
 
ModuleImpType get_implementation_type ()
 Uses the object's type to figure out what the type is.
 
int get_sort_priority () const
 
void set_sort_priority (int priority)
 
virtual void run_processing_actions (SPDocument *doc)
 Runs any pre-processing actions and modifies the document.
 
unsigned int widget_visible_count () const
 A function to get the number of visible parameters of the extension.
 
bool get_param_bool (char const *name) const
 Gets a parameter identified by name with the bool placed in value.
 
bool get_param_bool (char const *name, bool alt) const
 Like get_param_bool but with a default on param_not_exist error.
 
int get_param_int (char const *name) const
 Gets a parameter identified by name with the integer placed in value.
 
int get_param_int (char const *name, int alt) const
 Like get_param_int but with a default on param_not_exist error.
 
double get_param_float (char const *name) const
 Gets a float parameter identified by name with the double placed in value.
 
double get_param_float (char const *name, double alt) const
 Like get_param_float but with a default on param_not_exist error.
 
char const * get_param_string (char const *name, char const *alt) const
 Like get_param_string but with a default on param_not_exist error.
 
char const * get_param_string (char const *name) const
 Gets a parameter identified by name with the string placed in value.
 
char const * get_param_optiongroup (char const *name, char const *alt) const
 Like get_param_optiongroup but with a default on param_not_exist error.
 
char const * get_param_optiongroup (char const *name) const
 Gets a parameter identified by name with the string placed in value.
 
Colors::Color get_param_color (char const *name) const
 Gets a parameter identified by name with the unsigned int placed in value.
 
bool get_param_optiongroup_contains (char const *name, char const *value) const
 This is useful to find out, if a given string value is selectable in a optiongroup named \cname.
 
bool set_param_bool (char const *name, bool value)
 Sets a parameter identified by name with the boolean in the parameter value.
 
int set_param_int (char const *name, int value)
 Sets a parameter identified by name with the integer in the parameter value.
 
double set_param_float (char const *name, double value)
 Sets a parameter identified by name with the double in the parameter value.
 
char const * set_param_string (char const *name, char const *value)
 Sets a parameter identified by name with the string in the parameter value.
 
char const * set_param_optiongroup (char const *name, char const *value)
 Sets a parameter identified by name with the string in the parameter value.
 
void set_param_color (char const *name, Colors::Color const &color)
 
void set_param_any (char const *name, std::string const &value)
 Parses the given string value and sets a parameter identified by name.
 
void set_param_hidden (char const *name, bool hidden)
 
Gtk::Widget * autogui (SPDocument *doc, Inkscape::XML::Node *node, sigc::signal< void()> *changeSignal=nullptr)
 A function to automatically generate a GUI from the extensions' widgets.
 
void paramListString (std::list< std::string > &retlist) const
 A function to get the parameters in a string form.
 
void set_gui (bool s)
 
bool get_gui () const
 
Gtk::Box * get_info_widget ()
 
Gtk::Box * get_params_widget ()
 

Public Attributes

SPItembase
 
Inkscape::Drawingdrawing
 
Inkscape::DrawingItemroot
 
unsigned int dkey
 

Additional Inherited Members

- Public Types inherited from Inkscape::Extension::Extension
enum  state_t { STATE_LOADED , STATE_UNLOADED , STATE_DEACTIVATED }
 An enumeration to identify if the Extension has been loaded or not. More...
 
using ImplementationHolder = Util::HybridPointer< Implementation::Implementation >
 
- Static Public Member Functions inherited from Inkscape::Extension::Extension
static void error_file_open ()
 A function to open the error log file.
 
static void error_file_close ()
 A function to close the error log file.
 
static void error_file_write (Glib::ustring const &text)
 A function to write to the error log file.
 
- Static Protected Member Functions inherited from Inkscape::Extension::Extension
static void add_val (Glib::ustring const &labelstr, Glib::ustring const &valuestr, Gtk::Grid *table, int *row)
 
- Protected Attributes inherited from Inkscape::Extension::Extension
Inkscape::XML::Noderepr
 The XML description of the Extension.
 
ImplementationHolder imp
 An Implementation object provides the actual implementation of the Extension.
 
std::string _base_directory
 Directory containing the .inx file, relative paths in the extension should usually be relative to it.
 
std::unique_ptr< ExpirationTimertimer
 Timeout to unload after a given time.
 
bool _translation_enabled = true
 Attempt translation of strings provided by the extension?
 

Detailed Description

Definition at line 31 of file print.h.

Constructor & Destructor Documentation

◆ Print()

Inkscape::Extension::Print::Print ( Inkscape::XML::Node in_repr,
ImplementationHolder  implementation,
std::string *  base_directory 
)

Definition at line 19 of file print.cpp.

◆ ~Print()

Inkscape::Extension::Print::~Print ( )
overridedefault

Member Function Documentation

◆ begin()

unsigned int Inkscape::Extension::Print::begin ( SPDocument doc)

Definition at line 42 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ bind()

unsigned int Inkscape::Extension::Print::bind ( Geom::Affine const &  transform,
float  opacity 
)

Definition at line 54 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ comment()

unsigned int Inkscape::Extension::Print::comment ( const char *  comment)

◆ fill()

unsigned int Inkscape::Extension::Print::fill ( Geom::PathVector const &  pathv,
Geom::Affine const &  ctm,
SPStyle const *  style,
Geom::OptRect const &  pbox,
Geom::OptRect const &  dbox,
Geom::OptRect const &  bbox 
)

Definition at line 66 of file print.cpp.

References Inkscape::Extension::Extension::imp.

Referenced by SPShape::print().

◆ finish()

unsigned int Inkscape::Extension::Print::finish ( )

Definition at line 48 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ fontEmbedded()

bool Inkscape::Extension::Print::fontEmbedded ( )

Definition at line 100 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ image()

unsigned int Inkscape::Extension::Print::image ( unsigned char *  px,
unsigned int  w,
unsigned int  h,
unsigned int  rs,
Geom::Affine const &  transform,
SPStyle const *  style 
)

Definition at line 80 of file print.cpp.

References Inkscape::Extension::Extension::imp, rs, and w.

◆ release()

unsigned int Inkscape::Extension::Print::release ( )

Definition at line 60 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ set_preview()

unsigned int Inkscape::Extension::Print::set_preview ( )

Definition at line 36 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ setup()

unsigned int Inkscape::Extension::Print::setup ( )

Definition at line 30 of file print.cpp.

References Inkscape::Extension::Extension::imp.

◆ stroke()

unsigned int Inkscape::Extension::Print::stroke ( Geom::PathVector const &  pathv,
Geom::Affine const &  transform,
SPStyle const *  style,
Geom::OptRect const &  pbox,
Geom::OptRect const &  dbox,
Geom::OptRect const &  bbox 
)

Definition at line 73 of file print.cpp.

References Inkscape::Extension::Extension::imp.

Referenced by SPShape::print().

◆ text()

unsigned int Inkscape::Extension::Print::text ( char const *  text,
Geom::Point const &  p,
SPStyle const *  style 
)

Definition at line 87 of file print.cpp.

References Inkscape::Extension::Extension::imp, and text().

Referenced by text().

◆ textToPath()

bool Inkscape::Extension::Print::textToPath ( )

Definition at line 93 of file print.cpp.

References Inkscape::Extension::Extension::imp.

Member Data Documentation

◆ base

SPItem* Inkscape::Extension::Print::base

Definition at line 34 of file print.h.

◆ dkey

unsigned int Inkscape::Extension::Print::dkey

Definition at line 37 of file print.h.

◆ drawing

Inkscape::Drawing* Inkscape::Extension::Print::drawing

Definition at line 35 of file print.h.

◆ root

Inkscape::DrawingItem* Inkscape::Extension::Print::root

Definition at line 36 of file print.h.


The documentation for this class was generated from the following files: