Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

wxIAProvider Class Reference

Image Acquisition Provider. More...

#include <ia.h>

Inheritance diagram for wxIAProvider:

wxObject List of all members.

Public Methods

 wxIAProvider ()
 Constructor. More...

virtual ~wxIAProvider ()
 Destructor.

virtual bool Ok ()
virtual wxString GetName ()
 Get name. More...

virtual int GetSourceCount ()
 Get source count. More...

virtual wxIASourceInfo GetSourceInfo (int i)
virtual wxIAReturnCode SelectSource (const wxString& name = _T(""), wxIAUIMode uiMode = wxIA_UIMODE_NORMAL, wxWindow* parent = NULL)
virtual wxIAReturnCode SelectDefaultSource ()
virtual bool IsSourceSelected ()
virtual wxIASourceInfo GetSelSourceInfo ()
virtual wxIAReturnCode SetSelSourceConfig (const wxString& configString)
 Set selected source configuration. More...

virtual wxString GetSelSourceConfig ()
 Get the current configuration of the selected source. More...

virtual wxIAReturnCode AcquireImage (wxIAUIMode uiMode = wxIA_UIMODE_NORMAL, wxWindow* parent = NULL, wxIAMonitor *mon = NULL)
 Acquire an image. More...

virtual wxIAReturnCode AcquireImages (int numImages, wxIAUIMode uiMode = wxIA_UIMODE_NORMAL, wxWindow *parent = NULL, wxIAMonitor* mon = NULL)
 Acquire one or more images. More...

virtual void SetEvtHandler (wxEvtHandler* evtHandler)
 Set event handler. More...

virtual wxIAReturnCode SetTransferMode (wxIATransferMode mode)
 Set transfer mode. More...

virtual wxIATransferMode GetTransferMode ()
 Get the current transfer mode. More...

virtual wxIAReturnCode SetTransferFilename (const wxString& filename, wxIATransferFileType type)
 Set the transfer file name. More...

virtual wxString GetTransferFilename ()
 Get the transfer file name.

virtual wxIATransferFileType GetTransferFileType ()
 Get the transfer file type.

virtual wxIAReturnCode SetTransferBuffer (void* buffer, size_t size)
 Set the transfer buffer. More...

virtual void* GetTransferBuffer ()
 Get the transfer buffer. More...

virtual size_t GetTransferBufferSize ()
 Get the transfer buffer size.

wxEvtHandler* GetEvtHandler ()
 Get current event handler. More...

virtual wxImage GetImage ()
 Get the last image aqcuired as a wxImage. More...

virtual wxBitmap GetBitmap ()
 Get the last image acquired as a wxBitmap. More...

virtual bool SaveSettings (wxConfigBase* config)
 Save the current settings. More...

virtual bool LoadSettings (wxConfigBase* config)
 Load settings. More...


Protected Attributes

wxEvtHandler* m_evtHandler
wxIATransferMode m_transferMode
void* m_transferBuffer
size_t m_transferBufferSize
wxString m_transferFilename
wxIATransferFileType m_transferFileType

Detailed Description

Image Acquisition Provider.

Provides one or more image sources which may be selected and used to acquire images. Image sources represent devices such as scanners, cameras, etc. or anything else that can provide image data (like image file handlers or an image database).

Different platforms will provide different wxIAProvider's to allow access to platform specific image acquisition interfaces such as TWAIN on Windows and MacOS and SANE on Unix platforms.

A list of available wxIAProviders is maintained by the wxIAManager class.


Constructor & Destructor Documentation

wxIAProvider::wxIAProvider ( )
 

Constructor.

Default constructor

wxIAProvider::~wxIAProvider ( ) [virtual]
 

Destructor.


Member Function Documentation

wxIAReturnCode wxIAProvider::AcquireImage ( wxIAUIMode uiMode = wxIA_UIMODE_NORMAL,
wxWindow * parent = NULL,
wxIAMonitor * mon = NULL ) [virtual]
 

Acquire an image.

Aquire an image from the currently selected source. Returns true on success or false on failure or if the user aborted.

Parameters:
uiMode   User interface mode.
parent   Parent window for any dialog or user interface element that many be created. Used to disable the parent (and possibly the entire app) if required by the user interface. May be NULL.
mon   Pointer to a wxIAMonitor that will be notified as progress is made. May be NULL.

wxIAReturnCode wxIAProvider::AcquireImages ( int numImages,
wxIAUIMode uiMode = wxIA_UIMODE_NORMAL,
wxWindow * parent = NULL,
wxIAMonitor * mon = NULL ) [virtual]
 

Acquire one or more images.

Aquire images from the currently selected source. Returns true on success or false on failure or if the user aborted.

Parameters:
numImages   Number of images to be acquired.
uiMode   User interface mode.
parent   Parent window for any dialog or user interface element that many be created. Used to disable the parent (and possibly the entire app) if required by the user interface. May be NULL.
mon   Pointer to a wxIAMonitor that will be notified as progress is made. May be NULL.

wxBitmap wxIAProvider::GetBitmap ( ) [virtual]
 

Get the last image acquired as a wxBitmap.

Returns:
The last image acquired as a wxBitmap. Image data is destroyed after calling this method.

wxEvtHandler * wxIAProvider::GetEvtHandler ( )
 

Get current event handler.

Returns:
Current event handler.

wxImage wxIAProvider::GetImage ( ) [virtual]
 

Get the last image aqcuired as a wxImage.

Returns:
The last image acquired as a wxImage. Image data is destroyed after calling this method.

wxString wxIAProvider::GetName ( ) [virtual]
 

Get name.

Returns:
the name of this provider

wxString wxIAProvider::GetSelSourceConfig ( ) [virtual]
 

Get the current configuration of the selected source.

Returns:
The configuration of the currently selected source encoded as a wxString. The format of the configuration string is defined by the source and should not be edited or modified.

wxIASourceInfo wxIAProvider::GetSelSourceInfo ( ) [virtual]
 

Get source info for the currently selected source.

Returns:
the source info for the currently selected source. If no source is currently selected, wxIAEmptySourceInfo will be returned.

int wxIAProvider::GetSourceCount ( ) [virtual]
 

Get source count.

Returns:
The number of sources available or -1 if the sources cannot be enumerated. If the sources cannot be enumerated, the only way to select a source is by a call to SelectSource() with the default args.

wxIASourceInfo wxIAProvider::GetSourceInfo ( int i ) [virtual]
 

Get the source info for the specified source.

Parameters:
i   Index of the source to retrieve info for. Must be >= 0 and < GetSourceCount()

Returns:
the source info for the specified source.

void * wxIAProvider::GetTransferBuffer ( ) [virtual]
 

Get the transfer buffer.

Returns:
a pointer to the transfer buffer

size_t wxIAProvider::GetTransferBufferSize ( ) [virtual]
 

Get the transfer buffer size.

wxIATransferFileType wxIAProvider::GetTransferFileType ( ) [virtual]
 

Get the transfer file type.

wxString wxIAProvider::GetTransferFilename ( ) [virtual]
 

Get the transfer file name.

wxIATransferMode wxIAProvider::GetTransferMode ( ) [virtual]
 

Get the current transfer mode.

Returns:
the current transfer mode for the selected source.

bool wxIAProvider::IsSourceSelected ( ) [virtual]
 

Is a source selected?

Returns:
wxIA_RC_SUCCESS on success another return code on failure.

bool wxIAProvider::LoadSettings ( wxConfigBase * config ) [virtual]
 

Load settings.

Load saved settings for this provider from the specified config object.

Returns:
True on success or false on failure.

bool wxIAProvider::Ok ( ) [virtual]
 

Used to determine if the provider is initialized and ready for use.

Returns:
True if the provider is ready for use or false if not.

bool wxIAProvider::SaveSettings ( wxConfigBase * config ) [virtual]
 

Save the current settings.

Save the current settings for this provider to the specified config object.

Returns:
True on success or false on failure.

wxIAReturnCode wxIAProvider::SelectDefaultSource ( ) [virtual]
 

Select the default source.

Returns:
wxIA_RC_SUCCESS if a source was selected or another return code on failure.

wxIAReturnCode wxIAProvider::SelectSource ( const wxString & name = _T(""),
wxIAUIMode uiMode = wxIA_UIMODE_NORMAL,
wxWindow * parent = NULL ) [virtual]
 

Select a source.

Parameters:
name   Name of the source to select or "" to select the default source.
uiMode   User interface mode.
parent   Window to be parent of any dialog or user interface element that may be created. Used to disable the parent (and possibly the entire app) if required by the user interface. May be NULL.

Returns:
wxIA_RC_SUCCESS if a source was selected or another return code on failure.

void wxIAProvider::SetEvtHandler ( wxEvtHandler * evtHandler ) [virtual]
 

Set event handler.

Set the event handler to be notified when wxIAEvent's occur. Currently there are two events generated: wxEVT_IA_GETIMAGE event that is sent when an image has been acquired and wxEVT_IA_UPDATESTATUS that is sent to allow the application to update the status of the acquisition. The method handling the wxEVT_IA_GETIMAGE event should call GetImage() or GetBitmap() to retrieve the image data.

Parameters:
evtHandler   Pointer to the event handler.

wxIAReturnCode wxIAProvider::SetSelSourceConfig ( const wxString & configString ) [virtual]
 

Set selected source configuration.

Configure the currently selected source from the configuration encoded in a wxString.

Parameters:
configString   Configuration value encoded in a wxString by GetSelSourceConfig().

Returns:
True on success or false on failure.

wxIAReturnCode wxIAProvider::SetTransferBuffer ( void * buffer,
size_t size ) [virtual]
 

Set the transfer buffer.

Parameters:
buffer   pointer to buffer in which to store image data
size   size in bytes of buffer

Note:
buffer must be valid during the entire transfer

Returns:
wxIA_RC_SUCCESS on success or another return code on failure

wxIAReturnCode wxIAProvider::SetTransferFilename ( const wxString & filename,
wxIATransferFileType type ) [virtual]
 

Set the transfer file name.

Parameters:
filename   name of file in which to store image data
type   transfer file type

Returns:
wxIA_RC_SUCCESS on success or another return code on failure

wxIAReturnCode wxIAProvider::SetTransferMode ( wxIATransferMode mode ) [virtual]
 

Set transfer mode.

Set the image data transfer mode. The default transfer mode is wxIA_TRANSFERMODE_NATIVE.

Parameters:
mode   desired mode


Member Data Documentation

wxEvtHandler * wxIAProvider::m_evtHandler [protected]
 

void * wxIAProvider::m_transferBuffer [protected]
 

size_t wxIAProvider::m_transferBufferSize [protected]
 

wxIATransferFileType wxIAProvider::m_transferFileType [protected]
 

wxString wxIAProvider::m_transferFilename [protected]
 

wxIATransferMode wxIAProvider::m_transferMode [protected]
 


The documentation for this class was generated from the following files:
Generated at Tue Apr 1 17:02:58 2003 for wxIA by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000