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 .
19 #ifndef INCLUDED_EXTENSIONS_SOURCE_SCANNER_SANEDLG_HXX
20 #define INCLUDED_EXTENSIONS_SOURCE_SCANNER_SANEDLG_HXX
22 #include <vcl/dialog.hxx>
23 #include <vcl/lstbox.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/edit.hxx>
28 #include <vcl/treelistbox.hxx>
34 class SaneDlg
: public ModalDialog
40 Link
<Sane
&,void> maOldLink
;
42 VclPtr
<OKButton
> mpOKButton
;
43 VclPtr
<CancelButton
> mpCancelButton
;
44 VclPtr
<PushButton
> mpDeviceInfoButton
;
45 VclPtr
<PushButton
> mpPreviewButton
;
46 VclPtr
<PushButton
> mpScanButton
;
47 VclPtr
<PushButton
> mpButtonOption
;
49 VclPtr
<FixedText
> mpOptionTitle
;
50 VclPtr
<FixedText
> mpOptionDescTxt
;
51 VclPtr
<FixedText
> mpVectorTxt
;
53 VclPtr
<MetricField
> mpLeftField
;
54 VclPtr
<MetricField
> mpTopField
;
55 VclPtr
<MetricField
> mpRightField
;
56 VclPtr
<MetricField
> mpBottomField
;
58 VclPtr
<ListBox
> mpDeviceBox
;
59 VclPtr
<NumericBox
> mpReslBox
;
60 VclPtr
<CheckBox
> mpAdvancedBox
;
62 VclPtr
<NumericField
> mpVectorBox
;
63 VclPtr
<ListBox
> mpQuantumRangeBox
;
64 VclPtr
<ListBox
> mpStringRangeBox
;
66 VclPtr
<CheckBox
> mpBoolCheckBox
;
68 VclPtr
<Edit
> mpStringEdit
;
69 VclPtr
<Edit
> mpNumericEdit
;
71 VclPtr
<SvTreeListBox
> mpOptionBox
;
73 VclPtr
<ScanPreview
> mpPreview
;
77 std::unique_ptr
<double[]> mpRange
;
82 DECL_LINK( ClickBtnHdl
, Button
*, void );
83 DECL_LINK( SelectHdl
, ListBox
&, void );
84 DECL_LINK( ModifyHdl
, Edit
&, void );
85 DECL_LINK( ReloadSaneOptionsHdl
, Sane
&, void );
86 DECL_LINK( OptionsBoxSelectHdl
, SvTreeListBox
*, void );
93 void AcquirePreview();
95 void EstablishBoolOption();
96 void EstablishStringOption();
97 void EstablishStringRange();
98 void EstablishQuantumRange();
99 void EstablishNumericOption();
100 void EstablishButtonOption();
103 bool SetAdjustedNumericalValue( const char* pOption
, double fValue
, int nElement
= 0 );
105 SaneDlg( vcl::Window
*, Sane
&, bool );
106 virtual ~SaneDlg() override
;
107 virtual void dispose() override
;
109 virtual short Execute() override
;
110 void UpdateScanArea( bool );
111 bool getDoScan() { return doScan
;}
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */