![]() |

You only need to deal directly with printers if you use the non-portable PrintUnixDialog API.
A Printer object allows to get status information about the printer, such as its description, its location, the number of queued jobs, etc. Most importantly, a Printer object can be used to create a PrintJob object, which lets you print to the printer.
Public Member Functions | ||||
| bool | accepts_pdf () const | |||
| bool | accepts_ps () const | |||
| bool | equal (const Glib::RefPtr<Printer>& other) const | |||
| Glib::ustring | get_description () const | |||
| Glib::ustring | get_icon_name () const | |||
| int | get_job_count () const | |||
| Glib::ustring | get_location () const | |||
| Glib::ustring | get_name () const | |||
| Glib::ustring | get_state_message () const | |||
| const GtkPrinter* | gobj () const | |||
| Provides access to the underlying C GObject. | ||||
| GtkPrinter* | gobj () | |||
| Provides access to the underlying C GObject. | ||||
| GtkPrinter* | gobj_copy () | |||
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | ||||
| bool | is_active () const | |||
| bool | is_default () const | |||
| bool | is_virtual () const | |||
| Glib::PropertyProxy_ReadOnly< bool > | property_accepts_pdf () const | |||
| TRUE if this printer can accept PDF. | ||||
| Glib::PropertyProxy_ReadOnly< bool > | property_accepts_ps () const | |||
| TRUE if this printer can accept PostScript. | ||||
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_icon_name () const | |||
| The icon name to use for the printer. | ||||
| Glib::PropertyProxy_ReadOnly< bool > | property_is_virtual () const | |||
| FALSE if this represents a real hardware printer. | ||||
| Glib::PropertyProxy_ReadOnly< int > | property_job_count () const | |||
| Number of jobs queued in the printer. | ||||
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_location () const | |||
| The location of the printer. | ||||
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const | |||
| Name of the printer. | ||||
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_state_message () const | |||
| String giving the current state of the printer. | ||||
| Glib::SignalProxy1< void, bool > | signal_details_acquired () | |||
| ||||
| virtual | ~Printer () | |||
Protected Member Functions | ||||
| virtual void | on_details_acquired (bool success) | |||
Related Functions | ||||
| (Note that these are not member functions.) | ||||
| void | enumerate_printers (const SlotPrinterEnumerator& slot, bool wait=true) | |||
| TODO: document this. | ||||
| bool | operator!= (const Glib::RefPtr<Printer>& lhs, const Glib::RefPtr<Printer>& rhs) | |||
| bool | operator== (const Glib::RefPtr<Printer>& lhs, const Glib::RefPtr<Printer>& rhs) | |||
| typedef sigc::slot< bool, const Glib::RefPtr<Printer >&> | SlotPrinterEnumerator | |||
| For example, bool on_enumerate_printers(const Glib::RefPtr<Printer>& printer);. | ||||
| Glib::RefPtr<Gtk::Printer> | wrap (GtkPrinter* object, bool take_copy=false) | |||
| ||||
| virtual Gtk::Printer::~Printer | ( | ) | [virtual] |
| bool Gtk::Printer::accepts_pdf | ( | ) | const |
| bool Gtk::Printer::accepts_ps | ( | ) | const |
| bool Gtk::Printer::equal | ( | const Glib::RefPtr<Printer>& | other | ) | const |
| Glib::ustring Gtk::Printer::get_description | ( | ) | const |
| Glib::ustring Gtk::Printer::get_icon_name | ( | ) | const |
| int Gtk::Printer::get_job_count | ( | ) | const |
| Glib::ustring Gtk::Printer::get_location | ( | ) | const |
| Glib::ustring Gtk::Printer::get_name | ( | ) | const |
| Glib::ustring Gtk::Printer::get_state_message | ( | ) | const |
| const GtkPrinter* Gtk::Printer::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
| GtkPrinter* Gtk::Printer::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
| GtkPrinter* Gtk::Printer::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| bool Gtk::Printer::is_active | ( | ) | const |
| bool Gtk::Printer::is_default | ( | ) | const |
| bool Gtk::Printer::is_virtual | ( | ) | const |
| virtual void Gtk::Printer::on_details_acquired | ( | bool | success | ) | [protected, virtual] |
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Printer::property_accepts_pdf | ( | ) | const |
TRUE if this printer can accept PDF.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Printer::property_accepts_ps | ( | ) | const |
TRUE if this printer can accept PostScript.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Printer::property_icon_name | ( | ) | const |
The icon name to use for the printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Printer::property_is_virtual | ( | ) | const |
FALSE if this represents a real hardware printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<int> Gtk::Printer::property_job_count | ( | ) | const |
Number of jobs queued in the printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Printer::property_location | ( | ) | const |
The location of the printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Printer::property_name | ( | ) | const |
Name of the printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Printer::property_state_message | ( | ) | const |
String giving the current state of the printer.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::SignalProxy1< void,bool > Gtk::Printer::signal_details_acquired | ( | ) |
void on_my_details_acquired(bool success)
| void enumerate_printers | ( | const SlotPrinterEnumerator& | slot, | |
| bool | wait = true | |||
| ) | [related] |
TODO: document this.
typedef sigc::slot<bool, const Glib::RefPtr<Printer>&> SlotPrinterEnumerator [related] |
For example, bool on_enumerate_printers(const Glib::RefPtr<Printer>& printer);.
TODO: document return value.
| Glib::RefPtr<Gtk::Printer> wrap | ( | GtkPrinter * | object, | |
| bool | take_copy = false | |||
| ) | [related] |
| object | The C instance |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |