|
gtkmm 3.3.18
|
A Printer object represents a printer. More...

Public Member Functions | |
| virtual | ~Printer () |
| GtkPrinter* | gobj () |
| Provides access to the underlying C GObject. | |
| const GtkPrinter* | gobj () const |
| 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 | equal (const Glib::RefPtr< Printer >& other) const |
| Glib::ustring | get_name () const |
| Returns the name of the printer. | |
| Glib::ustring | get_state_message () const |
| Returns the state message describing the current state of the printer. | |
| Glib::ustring | get_description () const |
| Gets the description of the printer. | |
| Glib::ustring | get_location () const |
| Returns a description of the location of the printer. | |
| Glib::ustring | get_icon_name () const |
| Gets the name of the icon to use for the printer. | |
| int | get_job_count () const |
| Gets the number of jobs currently queued on the printer. | |
| bool | is_active () const |
| Returns whether the printer is currently active (i.e. accepts new jobs). | |
| bool | is_paused () const |
| Returns whether the printer is currently paused. | |
| bool | is_accepting_jobs () const |
| Returns whether the printer is accepting jobs. | |
| bool | is_virtual () const |
| Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class). | |
| bool | is_default () const |
| Returns whether the printer is the default printer. | |
| bool | accepts_pdf () const |
| Returns whether the printer accepts input in PDF format. | |
| bool | accepts_ps () const |
| Returns whether the printer accepts input in PostScript format. | |
| std::vector< Glib::RefPtr < PageSetup > > | list_papers () |
| Lists all the paper sizes printer supports. | |
| Glib::RefPtr< PageSetup > | get_default_page_size () const |
| Returns default page size of printer. | |
| std::vector< Glib::RefPtr < const PageSetup > > | list_papers () const |
| Lists all the paper sizes printer supports. | |
| bool | has_details () const |
| Returns whether the printer details are available. | |
| void | request_details () |
| Requests the printer details. | |
| PrintCapabilities | get_capabilities () const |
| Returns the printer's capabilities. | |
| bool | get_hard_margins (double& top, double& bottom, double&left, double&right) const |
| Retrieve the hard margins of printer, i.e. the margins that define the area at the borders of the paper that the printer cannot print to. | |
| Glib::SignalProxy1< void, bool > | signal_details_acquired () |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_name () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_is_virtual () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_state_message () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_location () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_icon_name () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly< int > | property_job_count () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_accepts_pdf () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_accepts_ps () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_paused () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_accepting_jobs () const |
| You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Protected Member Functions | |
| virtual void | on_details_acquired (bool success) |
| This is a default handler for the signal signal_details_acquired(). | |
Related Functions | |
(Note that these are not member functions.) | |
| typedef sigc::slot< bool, const Glib::RefPtr< Printer >& > | SlotPrinterEnumerator |
| For example, bool on_enumerate_printers(const Glib::RefPtr<Printer>& printer);. | |
| bool | operator== (const Glib::RefPtr< Printer >& lhs, const Glib::RefPtr< Printer >& rhs) |
| bool | operator!= (const Glib::RefPtr< Printer >& lhs, const Glib::RefPtr< Printer >& rhs) |
| void | enumerate_printers (const SlotPrinterEnumerator& slot, bool wait=true) |
| Calls a function for all Printers. | |
| Glib::RefPtr< Gtk::Printer > | wrap (GtkPrinter* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
A Printer object represents a printer.
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.
| virtual Gtk::Printer::~Printer | ( | ) | [virtual] |
| bool Gtk::Printer::accepts_pdf | ( | ) | const |
Returns whether the printer accepts input in PDF format.
true if printer accepts PDF. | bool Gtk::Printer::accepts_ps | ( | ) | const |
Returns whether the printer accepts input in PostScript format.
true if printer accepts PostScript. | bool Gtk::Printer::equal | ( | const Glib::RefPtr< Printer >& | other | ) | const |
| PrintCapabilities Gtk::Printer::get_capabilities | ( | ) | const |
Returns the printer's capabilities.
This is useful when you're using Gtk::PrintUnixDialog's manual-capabilities setting and need to know which settings the printer can handle and which you must handle yourself.
This will return 0 unless the printer's details are available, see has_details() and request_details().
| Glib::RefPtr<PageSetup> Gtk::Printer::get_default_page_size | ( | ) | const |
Returns default page size of printer.
| Glib::ustring Gtk::Printer::get_description | ( | ) | const |
| bool Gtk::Printer::get_hard_margins | ( | double & | top, |
| double & | bottom, | ||
| double & | left, | ||
| double & | right | ||
| ) | const |
Retrieve the hard margins of printer, i.e. the margins that define the area at the borders of the paper that the printer cannot print to.
| top | A location to store the top margin in. |
| bottom | A location to store the bottom margin in. |
| left | A location to store the left margin in. |
| right | A location to store the right margin in. |
true iff the hard margins were retrieved. | Glib::ustring Gtk::Printer::get_icon_name | ( | ) | const |
Gets the name of the icon to use for the printer.
| int Gtk::Printer::get_job_count | ( | ) | const |
Gets the number of jobs currently queued on the printer.
| Glib::ustring Gtk::Printer::get_location | ( | ) | const |
Returns a description of the location of the printer.
| Glib::ustring Gtk::Printer::get_name | ( | ) | const |
| Glib::ustring Gtk::Printer::get_state_message | ( | ) | const |
Returns the state message describing the current state of the printer.
| const GtkPrinter* Gtk::Printer::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
| GtkPrinter* Gtk::Printer::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
| 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::has_details | ( | ) | const |
Returns whether the printer details are available.
true if printer details are available. | bool Gtk::Printer::is_accepting_jobs | ( | ) | const |
Returns whether the printer is accepting jobs.
true if printer is accepting jobs. | bool Gtk::Printer::is_active | ( | ) | const |
Returns whether the printer is currently active (i.e. accepts new jobs).
true if printer is active. | bool Gtk::Printer::is_default | ( | ) | const |
Returns whether the printer is the default printer.
true if printer is the default. | bool Gtk::Printer::is_paused | ( | ) | const |
Returns whether the printer is currently paused.
A paused printer still accepts jobs, but it is not printing them.
true if printer is paused. | bool Gtk::Printer::is_virtual | ( | ) | const |
Returns whether the printer is virtual (i.e. does not represent actual printer hardware, but something like a CUPS class).
true if printer is virtual. | std::vector< Glib::RefPtr<PageSetup> > Gtk::Printer::list_papers | ( | ) |
Lists all the paper sizes printer supports.
This will return and empty list unless the printer's details are available, see has_details() and request_details().
| std::vector< Glib::RefPtr<const PageSetup> > Gtk::Printer::list_papers | ( | ) | const |
Lists all the paper sizes printer supports.
This will return and empty list unless the printer's details are available, see has_details() and request_details().
| virtual void Gtk::Printer::on_details_acquired | ( | bool | success | ) | [protected, virtual] |
This is a default handler for the signal signal_details_acquired().
| Glib::PropertyProxy_ReadOnly< bool > Gtk::Printer::property_accepting_jobs | ( | ) | const |
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_pdf | ( | ) | const |
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 |
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 |
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 |
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 |
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 |
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 |
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_paused | ( | ) | const |
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 |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| void Gtk::Printer::request_details | ( | ) |
Requests the printer details.
When the details are available, the details_acquired signal will be emitted.
| Glib::SignalProxy1< void,bool > Gtk::Printer::signal_details_acquired | ( | ) |
void on_my_details_acquired(bool success)Gets emitted in response to a request for detailed information about a printer from the print backend. The success parameter indicates if the information was actually obtained.
| success | true if the details were successfully acquired. |
| void enumerate_printers | ( | const SlotPrinterEnumerator & | slot, |
| bool | wait = true |
||
| ) | [related] |
Calls a function for all Printers.
If the callback returns true, the enumeration is stopped. A function to call for each printer wait If true, wait in a recursive mainloop until all printers are enumerated; otherwise return early.
| bool operator!= | ( | const Glib::RefPtr< Printer >& | lhs, |
| const Glib::RefPtr< Printer >& | rhs | ||
| ) | [related] |
| bool operator== | ( | const Glib::RefPtr< Printer >& | lhs, |
| const Glib::RefPtr< Printer >& | rhs | ||
| ) | [related] |
typedef sigc::slot< bool, const Glib::RefPtr<Printer>& > SlotPrinterEnumerator [related] |
For example, bool on_enumerate_printers(const Glib::RefPtr<Printer>& printer);.
| printer | A printer. |
| result | true to stop the enumeration, false to continue. |
| Glib::RefPtr< Gtk::Printer > wrap | ( | GtkPrinter * | object, |
| bool | take_copy = false |
||
| ) | [related] |
A Glib::wrap() method for this object.
| 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. |
1.7.4