diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-03-25 23:26:36 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-03-25 23:50:10 +0100 |
commit | 6a6519c27a5a7ea07e6a19fcd43e76ca616dce4d (patch) | |
tree | f0516fe768dcdb17293fb060aa6cf9d6f8650f3d /svtools | |
parent | f7a226952ddd335d670f1a3766b2b87eb1572375 (diff) |
Export current Writer page as jpg/png
This is first step to rework of graphic exporting. The idea is to
replace the exporter that works only for Draw/Impress and replace
it with a general exporter for any object. With this it will be
far easier to export objects as charts. Currently only Writer is
supported and only jpg/png.
Additionally, this commit introduces a new Export dialog which
supports setting the pixel width, height and DPI.
Change-Id: I7302b26bd432840d7ef0c3d2d2e13ff150cd2a07
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/Library_svt.mk | 2 | ||||
-rw-r--r-- | svtools/Package_inc.mk | 2 | ||||
-rw-r--r-- | svtools/UI_svt.mk | 1 | ||||
-rw-r--r-- | svtools/inc/svtools/DocumentToGraphicRenderer.hxx | 62 | ||||
-rw-r--r-- | svtools/inc/svtools/GraphicExportOptionsDialog.hxx | 80 | ||||
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 145 | ||||
-rw-r--r-- | svtools/source/filter/GraphicExportOptionsDialog.cxx | 126 | ||||
-rw-r--r-- | svtools/uiconfig/ui/GraphicExportOptionsDialog.ui | 272 |
8 files changed, 690 insertions, 0 deletions
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index bfd409bd3d70..cc6219298151 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -144,6 +144,8 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/edit/svmedit2 \ svtools/source/edit/textwindowpeer \ svtools/source/filter/SvFilterOptionsDialog \ + svtools/source/filter/GraphicExportOptionsDialog \ + svtools/source/filter/DocumentToGraphicRenderer \ svtools/source/filter/exportdialog \ svtools/source/graphic/descriptor \ svtools/source/graphic/graphic \ diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk index fe8ccf679cee..b6eb68417c81 100644 --- a/svtools/Package_inc.mk +++ b/svtools/Package_inc.mk @@ -21,6 +21,8 @@ $(eval $(call gb_Package_Package,svtools_inc,$(SRCDIR)/svtools/inc)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/AccessibleBrowseBoxObjType.hxx,svtools/AccessibleBrowseBoxObjType.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/DocumentInfoPreview.hxx,svtools/DocumentInfoPreview.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/QueryFolderName.hxx,svtools/QueryFolderName.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/GraphicExportOptionsDialog.hxx,svtools/GraphicExportOptionsDialog.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/DocumentToGraphicRenderer.hxx,svtools/DocumentToGraphicRenderer.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx)) $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx)) diff --git a/svtools/UI_svt.mk b/svtools/UI_svt.mk index 44c2acd0e251..54d72a75665c 100644 --- a/svtools/UI_svt.mk +++ b/svtools/UI_svt.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,svt,\ svtools/uiconfig/ui/placeedit \ svtools/uiconfig/ui/printersetupdialog \ svtools/uiconfig/ui/restartdialog \ + svtools/uiconfig/ui/GraphicExportOptionsDialog \ )) # vim: set noet sw=4 ts=4: diff --git a/svtools/inc/svtools/DocumentToGraphicRenderer.hxx b/svtools/inc/svtools/DocumentToGraphicRenderer.hxx new file mode 100644 index 000000000000..3033e6473129 --- /dev/null +++ b/svtools/inc/svtools/DocumentToGraphicRenderer.hxx @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + + +#ifndef _DOCUMENTTOGRAPHICRENDERER_HXX_ +#define _DOCUMENTTOGRAPHICRENDERER_HXX_ + +#include <com/sun/star/frame/XModel.hpp> +#include <com/sun/star/frame/XController.hpp> +#include <com/sun/star/view/XRenderable.hpp> +#include <com/sun/star/awt/XToolkit.hpp> + +#include <vcl/graph.hxx> + +#include "svtools/svtdllapi.h" + +using namespace css; +using namespace css::uno; +using namespace css::lang; +using namespace css::beans; + +class SVT_DLLPUBLIC DocumentToGraphicRenderer +{ + const Reference<XComponent>& mxDocument; + + Reference<frame::XModel> mxModel; + Reference<frame::XController> mxController; + Reference<view::XRenderable> mxRenderable; + Reference<awt::XToolkit> mxToolkit; + +public: + DocumentToGraphicRenderer(const Reference<XComponent>& xDocument); + ~DocumentToGraphicRenderer(); + + sal_Int32 getCurrentPageWriter( ); + + Size getDocumentSizeInPixels( sal_Int32 aCurrentPage ); + + Size getDocumentSizeIn100mm( sal_Int32 aCurrentPage ); + + Graphic renderToGraphic(sal_Int32 aCurrentPage, Size aDocumentSizePixel, Size aTargetSizePixel); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/inc/svtools/GraphicExportOptionsDialog.hxx b/svtools/inc/svtools/GraphicExportOptionsDialog.hxx new file mode 100644 index 000000000000..7058641c6a6c --- /dev/null +++ b/svtools/inc/svtools/GraphicExportOptionsDialog.hxx @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _GRAPHICEXPORTOPTIONSDIALOG_HXX_ +#define _GRAPHICEXPORTOPTIONSDIALOG_HXX_ + +#include <vcl/fltcall.hxx> +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/layout.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/msgbox.hxx> +#include <vcl/scrbar.hxx> + +#include <svtools/DocumentToGraphicRenderer.hxx> + +#include "svtools/svtdllapi.h" + +using namespace css; +using namespace css::uno; +using namespace css::lang; +using namespace css::frame; +using namespace css::beans; + +class SVT_DLLPUBLIC GraphicExportOptionsDialog : public ModalDialog +{ +private: + const Reference<XComponent>& mxSourceDocument; + + NumericField* mpWidth; + NumericField* mpHeight; + ComboBox* mpResolution; + + Size mSize100mm; + double mResolution; + + DocumentToGraphicRenderer mRenderer; + + sal_Int32 mCurrentPage; + + void initialize(); + void updateWidth(); + void updateHeight(); + void updateResolution(); + + double getViewWidthInch(); + double getViewHeightInch(); + + DECL_LINK( widthModifiedHandle, void* ); + DECL_LINK( heightModifiedHandle, void* ); + DECL_LINK( resolutionModifiedHandle, void* ); + +public: + GraphicExportOptionsDialog( Window* pWindow, const Reference<XComponent>& rxSourceDocument ); + ~GraphicExportOptionsDialog(); + + Sequence<PropertyValue> getFilterData(); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx new file mode 100644 index 000000000000..99b4436ea31a --- /dev/null +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -0,0 +1,145 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "DocumentToGraphicRenderer.hxx" + +#include <vcl/graphicfilter.hxx> +#include <vcl/svapp.hxx> +#include <vcl/outdev.hxx> + +#include <com/sun/star/awt/XDevice.hpp> +#include <com/sun/star/text/XPageCursor.hpp> +#include <com/sun/star/text/XTextViewCursorSupplier.hpp> +#include <com/sun/star/beans/PropertyValues.hpp> + +#include <toolkit/helper/vclunohelper.hxx> + +using namespace css; +using namespace css::uno; +using namespace css::lang; +using namespace css::beans; + +DocumentToGraphicRenderer::DocumentToGraphicRenderer( const Reference<XComponent>& rxDocument ) : + mxDocument(rxDocument), + mxModel( mxDocument, uno::UNO_QUERY ), + mxController( mxModel->getCurrentController() ), + mxRenderable (mxDocument, uno::UNO_QUERY ), + mxToolkit( VCLUnoHelper::CreateToolkit() ) +{ +} + +DocumentToGraphicRenderer::~DocumentToGraphicRenderer() +{ +} + +Size DocumentToGraphicRenderer::getDocumentSizeInPixels(sal_Int32 aCurrentPage) +{ + Size aSize100mm = getDocumentSizeIn100mm(aCurrentPage); + return Size( Application::GetDefaultDevice()->LogicToPixel( aSize100mm, MAP_100TH_MM ) ); +} + +Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage) +{ + Reference< awt::XDevice > xDevice(mxToolkit->createScreenCompatibleDevice( 32, 32 ) ); + + uno::Any selection; + selection <<= mxDocument; + + PropertyValues renderProperties; + + renderProperties.realloc( 3 ); + renderProperties[0].Name = "IsPrinter"; + renderProperties[0].Value <<= sal_True; + renderProperties[1].Name = "RenderDevice"; + renderProperties[1].Value <<= xDevice; + renderProperties[2].Name = "View"; + renderProperties[2].Value <<= mxController; + + Sequence< beans::PropertyValue > aResult; + + sal_Int32 nPages = mxRenderable->getRendererCount( selection, renderProperties ); + + aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties ); + + awt::Size aSize; + for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty ) + { + if ( aResult[ nProperty ].Name == "PageSize" ) + { + aResult[ nProperty ].Value >>= aSize; + } + } + return Size( aSize.Width, aSize.Height ); +} + +Graphic DocumentToGraphicRenderer::renderToGraphic( + sal_Int32 aCurrentPage, + Size aDocumentSizePixel, + Size aTargetSizePixel) + +{ + if (!mxModel.is() || !mxController.is() || !mxRenderable.is()) + return Graphic(); + + Reference< awt::XDevice > xDevice(mxToolkit->createScreenCompatibleDevice( aTargetSizePixel.Width(), aTargetSizePixel.Height() ) ); + if (!xDevice.is()) + return Graphic(); + + double fScaleX = aTargetSizePixel.Width() / (double) aDocumentSizePixel.Width(); + double fScaleY = aTargetSizePixel.Height() / (double) aDocumentSizePixel.Height(); + + PropertyValues renderProps; + renderProps.realloc( 3 ); + renderProps[0].Name = "IsPrinter"; + renderProps[0].Value <<= sal_True; + renderProps[1].Name = "RenderDevice"; + renderProps[1].Value <<= xDevice; + renderProps[2].Name = "View"; + renderProps[2].Value <<= mxController; + + GDIMetaFile aMtf; + + OutputDevice* pOutputDev = VCLUnoHelper::GetOutputDevice( xDevice ); + pOutputDev->SetAntialiasing(pOutputDev->GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW); + MapMode mm = pOutputDev->GetMapMode(); + mm.SetScaleX( fScaleX ); + mm.SetScaleY( fScaleY ); + pOutputDev->SetMapMode( mm ); + + aMtf.Record( pOutputDev ); + + uno::Any aSelection; + aSelection <<= mxDocument; + mxRenderable->render(aCurrentPage - 1, aSelection, renderProps ); + + aMtf.Stop(); + aMtf.WindStart(); + aMtf.SetPrefSize( aTargetSizePixel ); + + return Graphic(aMtf); +} + +sal_Int32 DocumentToGraphicRenderer::getCurrentPageWriter() +{ + Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(mxModel->getCurrentController(), UNO_QUERY); + Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), UNO_QUERY); + return xCursor->getPage(); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/filter/GraphicExportOptionsDialog.cxx b/svtools/source/filter/GraphicExportOptionsDialog.cxx new file mode 100644 index 000000000000..4a7b6147c1c4 --- /dev/null +++ b/svtools/source/filter/GraphicExportOptionsDialog.cxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "GraphicExportOptionsDialog.hxx" + +GraphicExportOptionsDialog::GraphicExportOptionsDialog(Window* pWindow, const Reference<XComponent>& rxSourceDocument) : + ModalDialog(pWindow, "GraphicExporter", "svt/ui/GraphicExportOptionsDialog.ui"), + mxSourceDocument(rxSourceDocument), + mResolution(96.0), + mRenderer(rxSourceDocument) +{ + get(mpWidth, "spin-width"); + get(mpHeight, "spin-height"); + get(mpResolution, "combo-resolution"); + + mpWidth->SetModifyHdl( LINK( this, GraphicExportOptionsDialog, widthModifiedHandle )); + mpHeight->SetModifyHdl( LINK( this, GraphicExportOptionsDialog, heightModifiedHandle )); + mpResolution->SetModifyHdl( LINK( this, GraphicExportOptionsDialog, resolutionModifiedHandle )); + + initialize(); + + updateWidth(); + updateHeight(); + updateResolution(); +} + +GraphicExportOptionsDialog::~GraphicExportOptionsDialog() +{} + +void GraphicExportOptionsDialog::initialize() +{ + mCurrentPage = mRenderer.getCurrentPageWriter(); + mSize100mm = mRenderer.getDocumentSizeIn100mm(mCurrentPage); +} + +IMPL_LINK_NOARG( GraphicExportOptionsDialog, widthModifiedHandle ) +{ + mResolution = mpWidth->GetValue() / getViewWidthInch(); + + updateHeight(); + updateResolution(); + + return 0L; +} + +IMPL_LINK_NOARG( GraphicExportOptionsDialog, heightModifiedHandle ) +{ + mResolution = mpHeight->GetValue() / getViewHeightInch(); + + updateWidth(); + updateResolution(); + + return 0L; +} + +IMPL_LINK_NOARG( GraphicExportOptionsDialog, resolutionModifiedHandle ) +{ + mResolution = mpResolution->GetText().toInt32(); + + updateWidth(); + updateHeight(); + Update(); + + return 0L; +} + +double GraphicExportOptionsDialog::getViewWidthInch() +{ + return (double) MetricField::ConvertValue(mSize100mm.Width(), 2, MAP_100TH_MM, FUNIT_INCH) / 100.0; +} + +double GraphicExportOptionsDialog::getViewHeightInch() +{ + return (double) MetricField::ConvertValue(mSize100mm.Height(), 2, MAP_100TH_MM, FUNIT_INCH) / 100.0; +} + +void GraphicExportOptionsDialog::updateWidth() +{ + sal_Int32 aWidth = (sal_Int32)( getViewWidthInch() * mResolution ); + mpWidth->SetText( OUString::number( aWidth )); +} + +void GraphicExportOptionsDialog::updateHeight() +{ + sal_Int32 aHeight = (sal_Int32)( getViewHeightInch() * mResolution ); + mpHeight->SetText( OUString::number( aHeight )); +} + +void GraphicExportOptionsDialog::updateResolution() +{ + mpResolution->SetText( OUString::valueOf( (sal_Int32) mResolution ) ); +} + +Sequence<PropertyValue> GraphicExportOptionsDialog::getFilterData() +{ + sal_Int32 aWidth = (sal_Int32)( getViewWidthInch() * mResolution ); + sal_Int32 aHeight = (sal_Int32)( getViewHeightInch() * mResolution ); + + Sequence<PropertyValue> aFilterData; + + aFilterData.realloc( 2 ); + aFilterData[ 0 ].Name = "PixelWidth"; + aFilterData[ 0 ].Value <<= aWidth; + aFilterData[ 1 ].Name = "PixelHeight"; + aFilterData[ 1 ].Value <<= aHeight; + + return aFilterData; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/uiconfig/ui/GraphicExportOptionsDialog.ui b/svtools/uiconfig/ui/GraphicExportOptionsDialog.ui new file mode 100644 index 000000000000..f98882b1a327 --- /dev/null +++ b/svtools/uiconfig/ui/GraphicExportOptionsDialog.ui @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment-height"> + <property name="upper">20000</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment-width"> + <property name="upper">20000</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="GraphicExporter"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Width:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Height:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="resolutionft"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Resolution:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spin-width"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustment-width</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spin-height"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustment-height</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">px</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">px</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">DPI</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="combo-resolution"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="column_span_column">0</property> + <property name="has_entry">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item>50</item> + <item>75</item> + <item>96</item> + <item>150</item> + <item>200</item> + <item>300</item> + <item>600</item> + </items> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry4"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="invisible_char">•</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Size</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> +</interface> |