36#include <rtl/strbuf.hxx>
40#define PREVIEW_WIDTH 113
41#define PREVIEW_HEIGHT 160
43#define RECT_SIZE_PIX 7
65 int nMiddleX = (rBR.
X() - rUL.
X()) / 2 + rUL.
X();
66 int nMiddleY = (rBR.
Y() - rUL.
Y()) / 2 + rUL.
Y();
79 rRenderContext.
DrawLine(rUL, aBL, aInfo);
80 rRenderContext.
DrawLine(aBL, rBR, aInfo);
81 rRenderContext.
DrawLine(rBR, aUR, aInfo);
82 rRenderContext.
DrawLine(aUR, rUL, aInfo);
217 CustomWidgetController::SetDrawingArea(pDrawingArea);
223 : GenericDialogController(pParent,
"modules/scanner/ui/sanedialog.ui",
"SaneDialog")
226 , mbScanEnabled(bScanEnabled)
228 , mnCurrentElement(0)
232 , mxCancelButton(m_xBuilder->weld_button(
"cancel"))
233 , mxDeviceInfoButton(m_xBuilder->weld_button(
"deviceInfoButton"))
234 , mxPreviewButton(m_xBuilder->weld_button(
"previewButton"))
235 , mxScanButton(m_xBuilder->weld_button(
"ok"))
236 , mxButtonOption(m_xBuilder->weld_button(
"optionsButton"))
237 , mxOptionTitle(m_xBuilder->weld_label(
"optionTitleLabel"))
238 , mxOptionDescTxt(m_xBuilder->weld_label(
"optionsDescLabel"))
239 , mxVectorTxt(m_xBuilder->weld_label(
"vectorLabel"))
240 , mxLeftField(m_xBuilder->weld_metric_spin_button(
"leftSpinbutton",
FieldUnit::
PIXEL))
241 , mxTopField(m_xBuilder->weld_metric_spin_button(
"topSpinbutton",
FieldUnit::
PIXEL))
242 , mxRightField(m_xBuilder->weld_metric_spin_button(
"rightSpinbutton",
FieldUnit::
PIXEL))
243 , mxBottomField(m_xBuilder->weld_metric_spin_button(
"bottomSpinbutton",
FieldUnit::
PIXEL))
244 , mxDeviceBox(m_xBuilder->weld_combo_box(
"deviceCombobox"))
245 , mxReslBox(m_xBuilder->weld_combo_box(
"reslCombobox"))
246 , mxAdvancedBox(m_xBuilder->weld_check_button(
"advancedCheckbutton"))
247 , mxVectorBox(m_xBuilder->weld_spin_button(
"vectorSpinbutton"))
248 , mxQuantumRangeBox(m_xBuilder->weld_combo_box(
"quantumRangeCombobox"))
249 , mxStringRangeBox(m_xBuilder->weld_combo_box(
"stringRangeCombobox"))
250 , mxBoolCheckBox(m_xBuilder->weld_check_button(
"boolCheckbutton"))
251 , mxStringEdit(m_xBuilder->weld_entry(
"stringEntry"))
252 , mxNumericEdit(m_xBuilder->weld_entry(
"numericEntry"))
253 , mxOptionBox(m_xBuilder->weld_tree_view(
"optionSvTreeListBox"))
255 , mxPreviewWnd(new
weld::CustomWeld(*m_xBuilder,
"preview", *mxPreview))
310 VclMessageType::Warning, VclButtonsType::Ok,
311 SaneResId(STR_COULD_NOT_BE_INIT)));
316 return GenericDialogController::run();
344 const char *ppSpecialOptions[] = {
355 Point aTopLeft, aBottomRight;
356 mxPreview->GetPreviewLogicRect(aTopLeft, aBottomRight);
357 Point aMinTopLeft, aMaxBottomRight;
358 mxPreview->GetMaxLogicRect(aMinTopLeft, aMaxBottomRight);
374 mxReslBox->set_entry_text(OUString::number(
static_cast<sal_uInt32
>(fRes)));
375 std::unique_ptr<double[]> pDouble;
384 if(
i == 0 ||
i ==
nValue-1 || ! (
static_cast<int>(pDouble[
i]) % 20) )
385 mxReslBox->append_text(OUString::number(
static_cast<sal_uInt32
>(pDouble[
i])));
390 mxReslBox->append_text(OUString::number(
static_cast<sal_uInt32
>(pDouble[0])));
397 for (sal_uInt32 nRes =
static_cast<sal_uInt32
>(pDouble[0]) * 2; nRes < static_cast<sal_uInt32>(pDouble[1]); nRes = nRes * 2)
399 if ( !bGot300 && nRes > 300 ) {
400 nRes = 300; bGot300 = 1;
402 mxReslBox->append_text(OUString::number(nRes));
404 mxReslBox->append_text(OUString::number(
static_cast<sal_uInt32
>(pDouble[1])));
415 for(
i = 0;
i < 4;
i++ )
417 char const *pOptionName =
nullptr;
422 pOptionName =
"tl-x";
426 pOptionName =
"tl-y";
430 pOptionName =
"br-x";
434 pOptionName =
"br-y";
445 pField->
set_value(
static_cast<int>(fValue), FieldUnit::MM );
449 pField->
set_unit( FieldUnit::PIXEL );
450 pField->
set_value(
static_cast<int>(fValue), FieldUnit::PIXEL );
453 case 0: aTopLeft.
setX(
static_cast<int>(fValue) );
break;
454 case 1: aTopLeft.
setY(
static_cast<int>(fValue) );
break;
455 case 2: aBottomRight.
setX(
static_cast<int>(fValue) );
break;
456 case 3: aBottomRight.
setY(
static_cast<int>(fValue) );
break;
459 std::unique_ptr<double[]> pDouble;
472 case 0: aMinTopLeft.
setX( pField->
get_min(FieldUnit::NONE) );
break;
473 case 1: aMinTopLeft.
setY( pField->
get_min(FieldUnit::NONE) );
break;
474 case 2: aMaxBottomRight.
setX( pField->
get_max(FieldUnit::NONE) );
break;
475 case 3: aMaxBottomRight.
setY( pField->
get_max(FieldUnit::NONE) );
break;
481 case 0: aMinTopLeft.
setX(
static_cast<int>(fValue) );
break;
482 case 1: aMinTopLeft.
setY(
static_cast<int>(fValue) );
break;
483 case 2: aMaxBottomRight.
setX(
static_cast<int>(fValue) );
break;
484 case 3: aMaxBottomRight.
setY(
static_cast<int>(fValue) );
break;
492 pField->
set_min( 0, FieldUnit::NONE );
495 aMinTopLeft.
setX( 0 );
501 aMinTopLeft.
setY( 0 );
523 mxPreview->SetPreviewMaxRect(aMinTopLeft, aMaxBottomRight);
524 mxPreview->SetPreviewLogicRect(aTopLeft, aBottomRight);
529 std::unique_ptr<weld::TreeIter> xParentEntry(
mxOptionBox->make_iterator());
530 bool bGroupRejected =
false;
534 bool bInsertAdvanced =
539 if( bInsertAdvanced )
544 bGroupRejected =
false;
547 bGroupRejected =
true;
549 else if( !aOption.isEmpty() &&
552 SANE_CAP_HARD_SELECT |
555 bInsertAdvanced && ! bGroupRejected )
557 bool bIsSpecial =
false;
558 for(
size_t n = 0; !bIsSpecial &&
561 if( aOption == OUString::createFromAscii(ppSpecialOptions[
n]) )
577 if( mrSane.IsOpen() )
579 if( &rButton == mxDeviceInfoButton.get() )
581 OUString aString(SaneResId(STR_DEVICE_DESC));
582 aString = aString.replaceFirst(
"%s",
Sane::GetName( mrSane.GetDeviceNumber() ) );
583 aString = aString.replaceFirst(
"%s",
Sane::GetVendor( mrSane.GetDeviceNumber() ) );
584 aString = aString.replaceFirst(
"%s",
Sane::GetModel( mrSane.GetDeviceNumber() ) );
585 aString = aString.replaceFirst(
"%s",
Sane::GetType( mrSane.GetDeviceNumber() ) );
587 VclMessageType::Info, VclButtonsType::Ok,
591 else if( &rButton == mxPreviewButton.get() )
593 else if( &rButton == mxButtonOption.get() )
596 SANE_Value_Type
nType = mrSane.GetOptionType( mnCurrentOption );
599 case SANE_TYPE_BUTTON:
600 mrSane.ActivateButtonOption( mnCurrentOption );
602 case SANE_TYPE_FIXED:
605 int nElements = mrSane.GetOptionElements( mnCurrentOption );
606 std::unique_ptr<double[]>
x(
new double[
nElements ]);
607 std::unique_ptr<double[]>
y(
new double[
nElements ]);
609 x[
i ] =
static_cast<double>(
i);
610 mrSane.GetOptionValue( mnCurrentOption,
y.get() );
613 aGrid.
set_title( mrSane.GetOptionName( mnCurrentOption ) );
616 mrSane.SetOptionValue( mnCurrentOption, aGrid.
getNewYValues() );
620 case SANE_TYPE_STRING:
621 case SANE_TYPE_GROUP:
626 if (&rButton == mxScanButton.get())
628 double fRes =
static_cast<double>(mxReslBox->get_active_text().toUInt32());
629 SetAdjustedNumericalValue(
"resolution", fRes );
630 UpdateScanArea(
true);
633 doScan = mrSane.IsOpen();
635 else if( &rButton == mxCancelButton.get() )
644 if( mrSane.IsOpen() )
646 if( &rButton == mxBoolCheckBox.get() )
648 mrSane.SetOptionValue( mnCurrentOption,
649 mxBoolCheckBox->get_active() );
651 else if( &rButton == mxAdvancedBox.get() )
653 ReloadSaneOptionsHdl( mrSane );
662 int nNewNumber = mxDeviceBox->get_active();
663 int nOldNumber = mrSane.GetDeviceNumber();
664 if (nNewNumber != nOldNumber)
667 mrSane.Open(nNewNumber);
668 mxPreview->ResetForNewScanner();
672 if( mrSane.IsOpen() )
674 if( &rListBox == mxQuantumRangeBox.get() )
676 double fValue = mxQuantumRangeBox->get_active_text().toDouble();
677 mrSane.SetOptionValue(mnCurrentOption, fValue, mnCurrentElement);
679 else if( &rListBox == mxStringRangeBox.get() )
681 mrSane.SetOptionValue(mnCurrentOption, mxStringRangeBox->get_active_text());
691 OUString aOption = mxOptionBox->get_selected_text();
693 osl_getThreadTextEncoding()).getStr());
694 if( nOption == -1 || nOption == mnCurrentOption )
698 mnCurrentOption = nOption;
699 mxOptionTitle->set_label(mrSane.GetOptionTitle(mnCurrentOption));
700 SANE_Value_Type
nType = mrSane.GetOptionType( mnCurrentOption );
701 SANE_Constraint_Type nConstraint;
704 case SANE_TYPE_BOOL: EstablishBoolOption();
break;
705 case SANE_TYPE_STRING:
706 nConstraint = mrSane.GetOptionConstraintType( mnCurrentOption );
707 if( nConstraint == SANE_CONSTRAINT_STRING_LIST )
708 EstablishStringRange();
710 EstablishStringOption();
712 case SANE_TYPE_FIXED:
715 nConstraint = mrSane.GetOptionConstraintType( mnCurrentOption );
716 int nElements = mrSane.GetOptionElements( mnCurrentOption );
717 mnCurrentElement = 0;
718 if( nConstraint == SANE_CONSTRAINT_RANGE ||
719 nConstraint == SANE_CONSTRAINT_WORD_LIST )
720 EstablishQuantumRange();
724 EstablishNumericOption();
730 mxVectorBox->set_range(1, mrSane.GetOptionElements(mnCurrentOption));
731 mxVectorBox->set_value(1);
739 EstablishButtonOption();
744 case SANE_TYPE_BUTTON:
745 EstablishButtonOption();
753 if( !mrSane.IsOpen() )
756 if (&rEdit == mxStringEdit.get())
758 mrSane.SetOptionValue( mnCurrentOption, mxStringEdit->get_text() );
760 else if (&rEdit == mxNumericEdit.get())
762 double fValue = mxNumericEdit->get_text().toDouble();
763 if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) )
768 else if( fValue > mfMax )
771 mxNumericEdit->set_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
773 mrSane.SetOptionValue( mnCurrentOption, fValue, mnCurrentElement );
775 else if (&rEdit == mxVectorBox.get())
777 mnCurrentElement = mxVectorBox->get_value() - 1;
779 if( mrSane.GetOptionValue( mnCurrentOption, fValue, mnCurrentElement ))
783 OUString aValue( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
784 mxNumericEdit->set_text( aValue );
785 mxQuantumRangeBox->set_active_text( aValue );
792 if( !mrSane.IsOpen() )
795 if (&rEdit != mxReslBox.get())
798 double fRes =
static_cast<double>(mxReslBox->get_active_text().toUInt32());
799 int nOption = mrSane.GetOptionByName(
"resolution" );
803 std::unique_ptr<double[]> pDouble;
804 int nValues = mrSane.GetRange( nOption, pDouble );
808 for(
i = 0;
i < nValues;
i++ )
810 if( fRes == pDouble[
i] )
816 else if( nValues == 0 )
818 if( fRes < pDouble[ 0 ] )
820 if( fRes > pDouble[ 1 ] )
823 mxReslBox->set_entry_text(OUString::number(
static_cast<sal_uInt32
>(fRes)));
828 if( !mrSane.IsOpen() )
831 if (&rEdit == mxTopField.get())
833 mxPreview->ChangePreviewLogicTopLeftY(mxTopField->get_value(FieldUnit::NONE));
834 mxPreview->Invalidate();
836 else if (&rEdit == mxLeftField.get())
838 mxPreview->ChangePreviewLogicTopLeftX(mxLeftField->get_value(FieldUnit::NONE));
839 mxPreview->Invalidate();
841 else if (&rEdit == mxBottomField.get())
843 mxPreview->ChangePreviewLogicBottomRightY(mxBottomField->get_value(FieldUnit::NONE));
844 mxPreview->Invalidate();
846 else if (&rEdit == mxRightField.get())
848 mxPreview->ChangePreviewLogicBottomRightX(mxRightField->get_value(FieldUnit::NONE));
849 mxPreview->Invalidate();
855 mnCurrentOption = -1;
856 mnCurrentElement = 0;
859 mxPreview->Invalidate();
869 double fResl =
static_cast<double>(
mxReslBox->get_active_text().toUInt32());
875 OUString aString(SaneResId(STR_SLOW_PREVIEW));
877 VclMessageType::Warning, VclButtonsType::OkCancel,
889 VclMessageType::Warning, VclButtonsType::Ok,
890 SaneResId(STR_ERROR_SCAN)));
895#if OSL_DEBUG_LEVEL > 0
896 SAL_INFO(
"extensions.scanner",
"Previewbitmapstream contains " << xTransporter->getStream().TellEnd() <<
"bytes");
899 mxPreview->SetBitmap(xTransporter->getStream());
903 mxReslBox->set_entry_text(OUString::number(
static_cast<sal_uInt32
>(fResl)));
928 else if (aBMSize.
Height())
967 bool bSuccess, bValue;
988 mxStringEdit->set_text(OStringToOUString(aValue, osl_getThreadTextEncoding()));
997 for(
int i = 0; ppStrings[
i] !=
nullptr;
i++ )
998 mxStringRangeBox->append_text( OUString( ppStrings[
i], strlen(ppStrings[
i]), osl_getThreadTextEncoding() ) );
1001 mxStringRangeBox->set_active_text(OStringToOUString(aValue, osl_getThreadTextEncoding()));
1018 else if( nValues > 0 )
1024 for(
int i = 0;
i < nValues;
i++ )
1027 mxQuantumRangeBox->append_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
1033 mxQuantumRangeBox->set_active_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
1058 aText += OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() );
1063 mxNumericEdit->set_text( OUString( pBuf, strlen(pBuf), osl_getThreadTextEncoding() ) );
1136 else if( aMousePixel.
X() >= nMiddleX &&
1149 else if( aMousePixel.
Y() >= nMiddleY &&
1174 else if( aMousePixel.
X() >= nMiddleX &&
1232 if( aConvert.
X() < 0 )
1236 if( aConvert.
Y() < 0 )
1254 mxPreview->GetPreviewLogicRect(aUL, aBR);
1280 const char* pEnv = getenv(
"HOME");
1281 OUString aFileName = (pEnv ? OUString(pEnv, strlen(pEnv), osl_getThreadTextEncoding() ) : OUString()) +
"/.so_sane_state";
1282 Config aConfig( aFileName );
1287 OString aString = aConfig.
ReadKey(
"SO_LastSaneDevice" );
1301 for (
i = 0;
i < iMax; ++
i)
1304 OString aValue = aConfig.
ReadKey(
i );
1309 if (aValue.startsWith(
"BOOL="))
1311 aValue = aValue.copy(RTL_CONSTASCII_LENGTH(
"BOOL="));
1312 bool aBOOL = aValue.toInt32() != 0;
1315 else if (aValue.startsWith(
"STRING="))
1317 aValue = aValue.copy(RTL_CONSTASCII_LENGTH(
"STRING="));
1320 else if (aValue.startsWith(
"NUMERIC="))
1322 aValue = aValue.copy(RTL_CONSTASCII_LENGTH(
"NUMERIC="));
1328 OString aSub = aValue.getToken(0,
':',
nIndex);
1330 sscanf(aSub.getStr(),
"%lg", &fValue);
1349 const char* pEnv = getenv(
"HOME" );
1353 aFileName = OUString::createFromAscii(pEnv) +
"/.so_sane_state";
1355 aFileName = OStringToOUString(
"", osl_getThreadTextEncoding()) +
"/.so_sane_state";
1357 Config aConfig( aFileName );
1360 aConfig.
WriteKey(
"SO_LastSANEDevice",
1363 static char const* pSaveOptions[] = {
1370 for(
const char * pSaveOption : pSaveOptions)
1372 OString aOption = pSaveOption;
1379 case SANE_TYPE_BOOL:
1384 OString aString =
"BOOL=" + OString::number(
static_cast<sal_Int32
>(bValue));
1385 aConfig.
WriteKey(aOption, aString);
1389 case SANE_TYPE_STRING:
1394 OString aString =
"STRING=" + aValue;
1395 aConfig.
WriteKey( aOption, aString );
1399 case SANE_TYPE_FIXED:
1402 OStringBuffer aString(
"NUMERIC=");
1412 aString.append(
':');
1414 aString.append(buf);
1417 aConfig.
WriteKey( aOption, aString.makeStringAndClear() );
1428 const char* pOption,
1441 std::unique_ptr<double[]>
pValues;
1448 SAL_INFO(
"extensions.scanner",
"SaneDlg::SetAdjustedNumericalValue(\"" << pOption <<
"\", " << fValue <<
") ");
1453 double fNearest = 1e6;
1454 for(
int i = 0;
i < nValues;
i++ )
1456 if( fabs( fValue -
pValues[
i ] ) < fNearest )
1458 fNearest = fabs( fValue -
pValues[
i ] );
1472 SAL_INFO(
"extensions.scanner",
"yields " << fValue);
const PropertyValue * pValues
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
const Size & GetSizePixel() const
OString GetKeyName(sal_uInt16 nKey) const
void SetGroup(const OString &rGroup)
void DeleteGroup(std::string_view rGroup)
sal_uInt16 GetKeyCount() const
OString ReadKey(const OString &rKey) const
bool HasGroup(std::string_view rGroup) const
void WriteKey(const OString &rKey, const OString &rValue)
void setBoundings(double fMinX, double fMinY, double fMaxX, double fMaxY)
void SetDotCount(sal_uInt16 nDotCount)
void SetDistance(double nDistance)
void SetDotLen(double nDotLen)
const Point & GetPosPixel() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
std::unique_ptr< weld::CheckButton > mxBoolCheckBox
Link< Sane &, void > maOldLink
std::unique_ptr< weld::ComboBox > mxQuantumRangeBox
void EstablishBoolOption()
std::unique_ptr< weld::MetricSpinButton > mxBottomField
void UpdateScanArea(bool)
std::unique_ptr< weld::MetricSpinButton > mxTopField
std::unique_ptr< weld::Button > mxPreviewButton
std::unique_ptr< weld::SpinButton > mxVectorBox
std::unique_ptr< weld::CheckButton > mxAdvancedBox
std::unique_ptr< weld::MetricSpinButton > mxRightField
virtual ~SaneDlg() override
std::unique_ptr< weld::ComboBox > mxDeviceBox
std::unique_ptr< weld::TreeView > mxOptionBox
bool SetAdjustedNumericalValue(const char *pOption, double fValue, int nElement=0)
std::unique_ptr< weld::Label > mxOptionTitle
std::unique_ptr< ScanPreview > mxPreview
SaneDlg(weld::Window *, Sane &, bool)
void EstablishButtonOption()
std::unique_ptr< double[]> mpRange
std::unique_ptr< weld::ComboBox > mxStringRangeBox
void EstablishStringRange()
void EstablishQuantumRange()
std::unique_ptr< weld::Button > mxButtonOption
virtual short run() override
void EstablishStringOption()
std::unique_ptr< weld::ComboBox > mxReslBox
std::unique_ptr< weld::Label > mxOptionDescTxt
std::unique_ptr< weld::Label > mxVectorTxt
std::unique_ptr< weld::MetricSpinButton > mxLeftField
std::unique_ptr< weld::Entry > mxStringEdit
std::unique_ptr< weld::Entry > mxNumericEdit
std::unique_ptr< weld::Button > mxScanButton
std::unique_ptr< weld::Button > mxCancelButton
std::unique_ptr< weld::Button > mxDeviceInfoButton
void EstablishNumericOption()
static OUString GetVendor(int n)
SANE_Unit GetOptionUnit(int n)
bool GetOptionValue(int, bool &)
OUString GetOptionUnitName(int n)
int GetOptionByName(const char *)
bool Start(BitmapTransporter &)
SANE_Int GetOptionCap(int n)
OUString GetOptionName(int n)
int GetOptionElements(int n)
int GetRange(int, std::unique_ptr< double[]> &)
SANE_Value_Type GetOptionType(int n)
Link< Sane &, void > SetReloadOptionsHdl(const Link< Sane &, void > &rLink)
static OUString GetModel(int n)
static OUString GetName(int n)
void SetOptionValue(int, bool)
static OUString GetType(int n)
static int CountDevices()
const char ** GetStringConstraint(int n)
OUString GetOptionTitle(int n)
BitmapEx maPreviewBitmapEx
void SetPreviewLogicRect(const Point &rTopLeft, const Point &rBottomRight)
void SetPreviewMaxRect(const Point &rTopLeft, const Point &rBottomRight)
void GetMaxLogicRect(Point &rTopLeft, Point &rBottomRight) const
Point GetLogicPos(const Point &rIn) const
void UpdatePreviewBounds()
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
bool IsDragEnabled() const
void SetBitmap(SvStream &rStream)
void ChangePreviewLogicBottomRightX(tools::Long X)
void ChangePreviewLogicTopLeftY(tools::Long Y)
void ChangePreviewLogicTopLeftX(tools::Long X)
void Init(SaneDlg *pParent)
Point GetPixelPos(const Point &rIn) const
void GetPreviewLogicRect(Point &rTopLeft, Point &rBottomRight) const
tools::Rectangle maPreviewRect
DragDirection meDragDirection
void ChangePreviewLogicBottomRightY(tools::Long Y)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void DrawDrag(vcl::RenderContext &rRenderContext)
virtual bool MouseMove(const MouseEvent &rMEvt) override
void ResetForNewScanner()
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void set_title(const OUString &rTitle)
virtual OutputDevice & get_ref_device()=0
std::shared_ptr< weld::Dialog > m_xDialog
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
RegionData_Impl * mpParent
#define LINK(Instance, Class, Member)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
OUString get(TranslateId sContextAndId, const std::locale &loc)
int sprintf(char(&s)[N], char const *format, T &&... arguments)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
IMPL_LINK(SaneDlg, ClickBtnHdl, weld::Button &, rButton, void)
IMPL_LINK_NOARG(SaneDlg, OptionsBoxSelectHdl, weld::TreeView &, void)
#define STREAM_SEEK_TO_BEGIN