1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_INC_VECTDLG_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_VECTDLG_HXX
23 #include <vcl/button.hxx>
24 #include <vcl/group.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/dialog.hxx>
28 #include <vcl/gdimtf.hxx>
29 #include <vcl/prgsbar.hxx>
30 #include <svx/graphctl.hxx>
36 /******************************************************************************
40 \******************************************************************************/
42 class SdVectorizeDlg
: public ModalDialog
44 ::sd::DrawDocShell
* mpDocSh
;
45 VclPtr
<NumericField
> m_pNmLayers
;
46 VclPtr
<MetricField
> m_pMtReduce
;
47 VclPtr
<FixedText
> m_pFtFillHoles
;
48 VclPtr
<MetricField
> m_pMtFillHoles
;
49 VclPtr
<CheckBox
> m_pCbFillHoles
;
51 VclPtr
<GraphCtrl
> m_pBmpWin
;
53 VclPtr
<GraphCtrl
> m_pMtfWin
;
55 VclPtr
<ProgressBar
> m_pPrgs
;
57 VclPtr
<OKButton
> m_pBtnOK
;
58 VclPtr
<PushButton
> m_pBtnPreview
;
65 void SaveSettings() const;
66 void InitPreviewBmp();
67 void UpdatePreviewMtf();
69 static Rectangle
GetRect( const Size
& rDispSize
, const Size
& rBmpSize
);
70 Bitmap
GetPreparedBitmap( Bitmap
& rBmp
, Fraction
& rScale
);
71 void Calculate( Bitmap
& rBmp
, GDIMetaFile
& rMtf
);
72 void AddTile( BitmapReadAccess
* pRAcc
, GDIMetaFile
& rMtf
,
73 long nPosX
, long nPosY
, long nWidth
, long nHeight
);
75 DECL_LINK( ProgressHdl
, void* );
76 DECL_LINK( ClickPreviewHdl
, void* );
77 DECL_LINK( ClickOKHdl
, void* );
78 DECL_LINK( ToggleHdl
, CheckBox
* );
79 DECL_LINK( ModifyHdl
, void* );
83 SdVectorizeDlg( vcl::Window
* pParent
, const Bitmap
& rBmp
, ::sd::DrawDocShell
* pDocShell
);
84 virtual ~SdVectorizeDlg();
85 virtual void dispose() SAL_OVERRIDE
;
87 const GDIMetaFile
& GetGDIMetaFile() const { return aMtf
; }
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */