预览
原生的GTK打印对话框有一个预览按钮,但是你也可以自己从应用程序开始预览:
// in a class that inherits from Gtk::Window... auto op = PrintOperation::create(); // ...set up op... op->run(Gtk::PrintOperation::Action::PREVIEW, *this);
在Unix上,默认的预览处理程序将使用外部查看器程序。在Windows上将显示原生预览对话框。如果有必要,你可以覆盖此默认行为并为此提供一个自定义的预览对话框。请参阅位于/examples/book/printing/advanced的示例。