SaneDlg Class Reference

#include <sanedlg.hxx>

Collaboration diagram for SaneDlg:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SaneDlg (Window *, Sane &)
 ~SaneDlg ()
virtual short Execute ()

Private Types

enum  DragDirection {
  TopLeft, Top, TopRight, Right,
  BottomRight, Bottom, BottomLeft, Left
}

Private Member Functions

 DECL_LINK (ClickBtnHdl, Button *)
 DECL_LINK (SelectHdl, ListBox *)
 DECL_LINK (ModifyHdl, Edit *)
 DECL_LINK (ReloadSaneOptionsHdl, Sane *)
 DECL_LINK (OptionsBoxSelectHdl, SvTreeListBox *)
void SaveState ()
BOOL LoadState ()
void InitDevices ()
void InitFields ()
void AcquirePreview ()
void DisableOption ()
void EstablishBoolOption ()
void EstablishStringOption ()
void EstablishStringRange ()
void EstablishQuantumRange ()
void EstablishNumericOption ()
void EstablishButtonOption ()
void DrawRectangles (Point &, Point &)
void DrawDrag ()
Point GetPixelPos (const Point &)
Point GetLogicPos (const Point &)
void UpdateScanArea (BOOL)
BOOL SetAdjustedNumericalValue (const char *pOption, double fValue, int nElement=0)
virtual void Paint (const Rectangle &)
virtual void MouseMove (const MouseEvent &rMEvt)
virtual void MouseButtonDown (const MouseEvent &rMEvt)
virtual void MouseButtonUp (const MouseEvent &rMEvt)

Private Attributes

SanemrSane
Bitmap maPreviewBitmap
Rectangle maPreviewRect
Point maTopLeft
Point maBottomRight
Point maMinTopLeft
Point maMaxBottomRight
BOOL mbDragEnable
BOOL mbIsDragging
int mnDragMode
BOOL mbDragDrawn
DragDirection meDragDirection
MapMode maMapMode
Link maOldLink
OKButton maOKButton
CancelButton maCancelButton
PushButton maDeviceInfoButton
PushButton maPreviewButton
PushButton maButtonOption
FixedText maOptionsTxt
FixedText maOptionTitle
FixedText maOptionDescTxt
FixedText maVectorTxt
FixedText maScanLeftTxt
MetricField maLeftField
FixedText maScanTopTxt
MetricField maTopField
FixedText maRightTxt
MetricField maRightField
FixedText maBottomTxt
MetricField maBottomField
FixedText maDeviceBoxTxt
ListBox maDeviceBox
FixedText maReslTxt
NumericBox maReslBox
FixedText maAdvancedTxt
CheckBox maAdvancedBox
NumericField maVectorBox
ListBox maQuantumRangeBox
ListBox maStringRangeBox
FixedLine maPreviewBox
FixedLine maAreaBox
CheckBox maBoolCheckBox
Edit maStringEdit
Edit maNumericEdit
SvTreeListBox maOptionBox
int mnCurrentOption
int mnCurrentElement
double * mpRange
double mfMin
double mfMax

Detailed Description

Definition at line 66 of file sanedlg.hxx.


Member Enumeration Documentation

enum SaneDlg::DragDirection [private]

Enumerator:
TopLeft 
Top 
TopRight 
Right 
BottomRight 
Bottom 
BottomLeft 
Left 

Definition at line 69 of file sanedlg.hxx.


Constructor & Destructor Documentation

SaneDlg::SaneDlg ( Window *  ,
Sane  
)

Definition at line 61 of file sanedlg.cxx.

References DisableOption(), InitDevices(), InitFields(), Sane::IsSane(), maAdvancedBox, maBoolCheckBox, maBottomField, maButtonOption, maCancelButton, maDeviceBox, maDeviceInfoButton, maLeftField, maNumericEdit, maOKButton, maOldLink, maOptionBox, maPreviewButton, maQuantumRangeBox, maReslBox, maRightField, maStringEdit, maStringRangeBox, maTopField, maVectorBox, mrSane, SaneResId(), and Sane::SetReloadOptionsHdl().

SaneDlg::~SaneDlg (  ) 

Definition at line 143 of file sanedlg.cxx.


Member Function Documentation

SaneDlg::DECL_LINK ( ClickBtnHdl  ,
Button *   
) [private]

SaneDlg::DECL_LINK ( SelectHdl  ,
ListBox *   
) [private]

SaneDlg::DECL_LINK ( ModifyHdl  ,
Edit *   
) [private]

SaneDlg::DECL_LINK ( ReloadSaneOptionsHdl  ,
Sane  
) [private]

SaneDlg::DECL_LINK ( OptionsBoxSelectHdl  ,
SvTreeListBox *   
) [private]

void SaneDlg::SaveState (  )  [private]

Definition at line 1239 of file sanedlg.cxx.

References Sane::CountOptions(), Sane::GetOptionByName(), Sane::GetOptionElements(), Sane::GetOptionName(), Sane::GetOptionType(), Sane::GetOptionValue(), Sane::IsSane(), maDeviceBox, and mrSane.

BOOL SaneDlg::LoadState (  )  [private]

Definition at line 1166 of file sanedlg.cxx.

References Sane::Close(), Sane::CountDevices(), DisableOption(), Sane::GetName(), Sane::GetOptionByName(), InitFields(), Sane::IsOpen(), Sane::IsSane(), mrSane, Sane::Open(), SetAdjustedNumericalValue(), and Sane::SetOptionValue().

Referenced by Execute().

void SaneDlg::InitDevices (  )  [private]

Definition at line 160 of file sanedlg.cxx.

References Sane::Close(), Sane::CountDevices(), Sane::GetName(), Sane::IsOpen(), Sane::IsSane(), maDeviceBox, mrSane, Sane::Open(), and Sane::ReloadDevices().

Referenced by SaneDlg().

void SaneDlg::InitFields (  )  [private]

Definition at line 179 of file sanedlg.cxx.

References Sane::CountOptions(), Sane::GetOptionByName(), Sane::GetOptionCap(), Sane::GetOptionName(), Sane::GetOptionTitle(), Sane::GetOptionType(), Sane::GetOptionUnit(), Sane::GetOptionValue(), GetPixelPos(), Sane::GetRange(), Sane::IsOpen(), Sane::IsSane(), maAdvancedBox, maBottomField, maBottomRight, maLeftField, maMaxBottomRight, maMinTopLeft, maOptionBox, maPreviewRect, maReslBox, maRightField, maTopField, maTopLeft, mbDragEnable, and mrSane.

Referenced by LoadState(), and SaneDlg().

void SaneDlg::AcquirePreview (  )  [private]

Definition at line 701 of file sanedlg.cxx.

References Sane::GetOptionByName(), BitmapTransporter::getStream(), Sane::IsOpen(), maBottomRight, maPreviewBitmap, maPreviewRect, maReslBox, maTopLeft, mbDragEnable, mrSane, Paint(), SaneResId(), SetAdjustedNumericalValue(), Sane::SetOptionValue(), Sane::Start(), and UpdateScanArea().

void SaneDlg::DisableOption (  )  [private]

Definition at line 787 of file sanedlg.cxx.

References maBoolCheckBox, maButtonOption, maNumericEdit, maOptionDescTxt, maQuantumRangeBox, maStringEdit, maStringRangeBox, maVectorBox, and maVectorTxt.

Referenced by LoadState(), and SaneDlg().

void SaneDlg::EstablishBoolOption (  )  [private]

Definition at line 800 of file sanedlg.cxx.

References Sane::GetOptionName(), Sane::GetOptionValue(), maBoolCheckBox, maOptionDescTxt, mnCurrentOption, and mrSane.

void SaneDlg::EstablishStringOption (  )  [private]

Definition at line 814 of file sanedlg.cxx.

References Sane::GetOptionName(), Sane::GetOptionValue(), maOptionDescTxt, maStringEdit, mnCurrentOption, and mrSane.

void SaneDlg::EstablishStringRange (  )  [private]

Definition at line 829 of file sanedlg.cxx.

References Sane::GetOptionName(), Sane::GetOptionValue(), Sane::GetStringConstraint(), maOptionDescTxt, maStringRangeBox, mnCurrentOption, and mrSane.

void SaneDlg::EstablishQuantumRange (  )  [private]

Definition at line 843 of file sanedlg.cxx.

References EstablishNumericOption(), Sane::GetOptionName(), Sane::GetOptionUnitName(), Sane::GetOptionValue(), Sane::GetRange(), maOptionDescTxt, maQuantumRangeBox, mfMax, mfMin, mnCurrentElement, mnCurrentOption, mpRange, and mrSane.

void SaneDlg::EstablishNumericOption (  )  [private]

Definition at line 885 of file sanedlg.cxx.

References Sane::GetOptionName(), Sane::GetOptionUnitName(), Sane::GetOptionValue(), maNumericEdit, maOptionDescTxt, mfMax, mfMin, mnCurrentOption, and mrSane.

Referenced by EstablishQuantumRange().

void SaneDlg::EstablishButtonOption (  )  [private]

Definition at line 910 of file sanedlg.cxx.

References Sane::GetOptionName(), maButtonOption, maOptionDescTxt, mnCurrentOption, and mrSane.

void SaneDlg::DrawRectangles ( Point &  ,
Point &   
) [private]

Definition at line 1060 of file sanedlg.cxx.

References RECT_SIZE_PIX.

Referenced by DrawDrag().

void SaneDlg::DrawDrag (  )  [private]

Definition at line 1084 of file sanedlg.cxx.

References DrawRectangles(), maBottomRight, maMapMode, maTopLeft, mbDragDrawn, and mbDragEnable.

Referenced by MouseButtonDown(), MouseMove(), and Paint().

Point SaneDlg::GetPixelPos ( const Point &   )  [private]

Definition at line 1107 of file sanedlg.cxx.

References maMapMode, maMaxBottomRight, and maMinTopLeft.

Referenced by InitFields(), and MouseMove().

Point SaneDlg::GetLogicPos ( const Point &   )  [private]

Definition at line 1120 of file sanedlg.cxx.

References maMapMode, maMaxBottomRight, and maMinTopLeft.

Referenced by MouseMove(), and UpdateScanArea().

void SaneDlg::UpdateScanArea ( BOOL   )  [private]

Definition at line 1141 of file sanedlg.cxx.

References GetLogicPos(), Sane::IsOpen(), maBottomField, maBottomRight, maLeftField, maRightField, maTopField, maTopLeft, mbDragEnable, mrSane, and SetAdjustedNumericalValue().

Referenced by AcquirePreview(), MouseButtonUp(), and MouseMove().

BOOL SaneDlg::SetAdjustedNumericalValue ( const char *  pOption,
double  fValue,
int  nElement = 0 
) [private]

Definition at line 1377 of file sanedlg.cxx.

References Sane::GetOptionByName(), Sane::GetOptionElements(), Sane::GetRange(), Sane::IsOpen(), Sane::IsSane(), mrSane, and Sane::SetOptionValue().

Referenced by AcquirePreview(), LoadState(), and UpdateScanArea().

void SaneDlg::Paint ( const Rectangle &   )  [private, virtual]

Definition at line 769 of file sanedlg.cxx.

References DrawDrag(), maMapMode, maPreviewBitmap, maPreviewRect, and mbDragDrawn.

Referenced by AcquirePreview().

void SaneDlg::MouseMove ( const MouseEvent &  rMEvt  )  [private, virtual]

Definition at line 919 of file sanedlg.cxx.

References Bottom, BottomLeft, BottomRight, DrawDrag(), GetLogicPos(), GetPixelPos(), Left, maBottomRight, maTopLeft, mbIsDragging, meDragDirection, Right, Top, TopLeft, TopRight, and UpdateScanArea().

void SaneDlg::MouseButtonDown ( const MouseEvent &  rMEvt  )  [private, virtual]

Definition at line 964 of file sanedlg.cxx.

References Bottom, BottomLeft, BottomRight, DrawDrag(), Left, maBottomRight, maTopLeft, mbDragEnable, mbIsDragging, meDragDirection, RECT_SIZE_PIX, Right, Top, TopLeft, and TopRight.

void SaneDlg::MouseButtonUp ( const MouseEvent &  rMEvt  )  [private, virtual]

Definition at line 1049 of file sanedlg.cxx.

References mbIsDragging, and UpdateScanArea().

short SaneDlg::Execute (  )  [virtual]

Definition at line 147 of file sanedlg.cxx.

References Sane::IsSane(), LoadState(), and SaneResId().

Referenced by ScannerManager::configureScanner().


Member Data Documentation

Sane& SaneDlg::mrSane [private]

Definition at line 72 of file sanedlg.hxx.

Referenced by AcquirePreview(), EstablishBoolOption(), EstablishButtonOption(), EstablishNumericOption(), EstablishQuantumRange(), EstablishStringOption(), EstablishStringRange(), InitDevices(), InitFields(), LoadState(), SaneDlg(), SaveState(), SetAdjustedNumericalValue(), and UpdateScanArea().

Bitmap SaneDlg::maPreviewBitmap [private]

Definition at line 73 of file sanedlg.hxx.

Referenced by AcquirePreview(), and Paint().

Rectangle SaneDlg::maPreviewRect [private]

Definition at line 74 of file sanedlg.hxx.

Referenced by AcquirePreview(), InitFields(), and Paint().

Point SaneDlg::maTopLeft [private]

Definition at line 75 of file sanedlg.hxx.

Referenced by AcquirePreview(), DrawDrag(), InitFields(), MouseButtonDown(), MouseMove(), and UpdateScanArea().

Point SaneDlg::maBottomRight [private]

Definition at line 75 of file sanedlg.hxx.

Referenced by AcquirePreview(), DrawDrag(), InitFields(), MouseButtonDown(), MouseMove(), and UpdateScanArea().

Point SaneDlg::maMinTopLeft [private]

Definition at line 76 of file sanedlg.hxx.

Referenced by GetLogicPos(), GetPixelPos(), and InitFields().

Point SaneDlg::maMaxBottomRight [private]

Definition at line 76 of file sanedlg.hxx.

Referenced by GetLogicPos(), GetPixelPos(), and InitFields().

BOOL SaneDlg::mbDragEnable [private]

Definition at line 77 of file sanedlg.hxx.

Referenced by AcquirePreview(), DrawDrag(), InitFields(), MouseButtonDown(), and UpdateScanArea().

BOOL SaneDlg::mbIsDragging [private]

Definition at line 78 of file sanedlg.hxx.

Referenced by MouseButtonDown(), MouseButtonUp(), and MouseMove().

int SaneDlg::mnDragMode [private]

Definition at line 79 of file sanedlg.hxx.

BOOL SaneDlg::mbDragDrawn [private]

Definition at line 80 of file sanedlg.hxx.

Referenced by DrawDrag(), and Paint().

DragDirection SaneDlg::meDragDirection [private]

Definition at line 81 of file sanedlg.hxx.

Referenced by MouseButtonDown(), and MouseMove().

MapMode SaneDlg::maMapMode [private]

Definition at line 83 of file sanedlg.hxx.

Referenced by DrawDrag(), GetLogicPos(), GetPixelPos(), and Paint().

Link SaneDlg::maOldLink [private]

Definition at line 85 of file sanedlg.hxx.

Referenced by SaneDlg().

OKButton SaneDlg::maOKButton [private]

Definition at line 87 of file sanedlg.hxx.

Referenced by SaneDlg().

CancelButton SaneDlg::maCancelButton [private]

Definition at line 88 of file sanedlg.hxx.

Referenced by SaneDlg().

PushButton SaneDlg::maDeviceInfoButton [private]

Definition at line 89 of file sanedlg.hxx.

Referenced by SaneDlg().

PushButton SaneDlg::maPreviewButton [private]

Definition at line 90 of file sanedlg.hxx.

Referenced by SaneDlg().

PushButton SaneDlg::maButtonOption [private]

Definition at line 91 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishButtonOption(), and SaneDlg().

FixedText SaneDlg::maOptionsTxt [private]

Definition at line 93 of file sanedlg.hxx.

FixedText SaneDlg::maOptionTitle [private]

Definition at line 94 of file sanedlg.hxx.

FixedText SaneDlg::maOptionDescTxt [private]

Definition at line 95 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishBoolOption(), EstablishButtonOption(), EstablishNumericOption(), EstablishQuantumRange(), EstablishStringOption(), and EstablishStringRange().

FixedText SaneDlg::maVectorTxt [private]

Definition at line 96 of file sanedlg.hxx.

Referenced by DisableOption().

FixedText SaneDlg::maScanLeftTxt [private]

Definition at line 98 of file sanedlg.hxx.

MetricField SaneDlg::maLeftField [private]

Definition at line 99 of file sanedlg.hxx.

Referenced by InitFields(), SaneDlg(), and UpdateScanArea().

FixedText SaneDlg::maScanTopTxt [private]

Definition at line 100 of file sanedlg.hxx.

MetricField SaneDlg::maTopField [private]

Definition at line 101 of file sanedlg.hxx.

Referenced by InitFields(), SaneDlg(), and UpdateScanArea().

FixedText SaneDlg::maRightTxt [private]

Definition at line 102 of file sanedlg.hxx.

MetricField SaneDlg::maRightField [private]

Definition at line 103 of file sanedlg.hxx.

Referenced by InitFields(), SaneDlg(), and UpdateScanArea().

FixedText SaneDlg::maBottomTxt [private]

Definition at line 104 of file sanedlg.hxx.

MetricField SaneDlg::maBottomField [private]

Definition at line 105 of file sanedlg.hxx.

Referenced by InitFields(), SaneDlg(), and UpdateScanArea().

FixedText SaneDlg::maDeviceBoxTxt [private]

Definition at line 107 of file sanedlg.hxx.

ListBox SaneDlg::maDeviceBox [private]

Definition at line 108 of file sanedlg.hxx.

Referenced by InitDevices(), SaneDlg(), and SaveState().

FixedText SaneDlg::maReslTxt [private]

Definition at line 109 of file sanedlg.hxx.

NumericBox SaneDlg::maReslBox [private]

Definition at line 110 of file sanedlg.hxx.

Referenced by AcquirePreview(), InitFields(), and SaneDlg().

FixedText SaneDlg::maAdvancedTxt [private]

Definition at line 111 of file sanedlg.hxx.

CheckBox SaneDlg::maAdvancedBox [private]

Definition at line 112 of file sanedlg.hxx.

Referenced by InitFields(), and SaneDlg().

NumericField SaneDlg::maVectorBox [private]

Definition at line 114 of file sanedlg.hxx.

Referenced by DisableOption(), and SaneDlg().

ListBox SaneDlg::maQuantumRangeBox [private]

Definition at line 115 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishQuantumRange(), and SaneDlg().

ListBox SaneDlg::maStringRangeBox [private]

Definition at line 116 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishStringRange(), and SaneDlg().

FixedLine SaneDlg::maPreviewBox [private]

Definition at line 118 of file sanedlg.hxx.

FixedLine SaneDlg::maAreaBox [private]

Definition at line 119 of file sanedlg.hxx.

CheckBox SaneDlg::maBoolCheckBox [private]

Definition at line 121 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishBoolOption(), and SaneDlg().

Edit SaneDlg::maStringEdit [private]

Definition at line 123 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishStringOption(), and SaneDlg().

Edit SaneDlg::maNumericEdit [private]

Definition at line 124 of file sanedlg.hxx.

Referenced by DisableOption(), EstablishNumericOption(), and SaneDlg().

SvTreeListBox SaneDlg::maOptionBox [private]

Definition at line 126 of file sanedlg.hxx.

Referenced by InitFields(), and SaneDlg().

int SaneDlg::mnCurrentOption [private]

Definition at line 128 of file sanedlg.hxx.

Referenced by EstablishBoolOption(), EstablishButtonOption(), EstablishNumericOption(), EstablishQuantumRange(), EstablishStringOption(), and EstablishStringRange().

int SaneDlg::mnCurrentElement [private]

Definition at line 129 of file sanedlg.hxx.

Referenced by EstablishQuantumRange().

double* SaneDlg::mpRange [private]

Definition at line 130 of file sanedlg.hxx.

Referenced by EstablishQuantumRange().

double SaneDlg::mfMin [private]

Definition at line 131 of file sanedlg.hxx.

Referenced by EstablishNumericOption(), and EstablishQuantumRange().

double SaneDlg::mfMax [private]

Definition at line 131 of file sanedlg.hxx.

Referenced by EstablishNumericOption(), and EstablishQuantumRange().


The documentation for this class was generated from the following files:
Generated on Thu Feb 28 17:53:33 2008 for AquaScanner by  doxygen 1.5.1