3 * Copyright 1999-2000 Y.Takagi. All Rights Reserved.
4 * Copyright 2010 Michael Pfeiffer.
11 #include "GPCapabilities.h"
13 #include "PrinterDriver.h"
14 #include "SelectPrinterDialog.h"
17 class GPPrinterDriver
: public PrinterDriver
20 GPPrinterDriver(BNode
* printerFolder
)
22 PrinterDriver(printerFolder
)
26 const char* GetSignature() const
28 return "application/x-vnd.gutenprint";
31 const char* GetDriverName() const
36 const char* GetVersion() const
41 const char* GetCopyright() const
43 return "Gutenprint driver "
44 "Copyright © 2010 Michael Pfeiffer.\n";
47 char* AddPrinter(char *printerName
)
49 GPData
* data
= dynamic_cast<GPData
*>(GetPrinterData());
52 SelectPrinterDialog
* dialog
=
53 new SelectPrinterDialog(data
);
55 if (dialog
->Go() != B_OK
)
61 PrinterData
* InstantiatePrinterData(BNode
* node
)
63 return new GPData(node
);
66 PrinterCap
* InstantiatePrinterCap(PrinterData
* printerData
)
68 return new GPCapabilities(printerData
);
71 GraphicsDriver
* InstantiateGraphicsDriver(BMessage
* settings
,
72 PrinterData
* printerData
, PrinterCap
* printerCap
)
74 return new GPDriver(settings
, printerData
, printerCap
);
79 PrinterDriver
* instantiate_printer_driver(BNode
* printerFolder
)
81 return new GPPrinterDriver(printerFolder
);