Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetWindow32 Class Reference

Inheritance diagram for vetWindow32:

vetOutput

Public Member Functions

 vetWindow32 (HINSTANCE hInstance=0)
 Default constructor initializes variables; if present, set parent instance and create window.
 ~vetWindow32 ()
 Default destructor, release canvas.
void setParentHistance (HINSTANCE appHinstance)
 Get application's handle.
HINSTANCE getParentHistance ()
 Get application's handle.
VETRESULT createWindow (unsigned int width, unsigned int height)
 Initialize canvas, parent instance must be valid.
VETRESULT welcomeText ()
 Display some text.
BOOL setWindowPos (int X, int Y, int cx, int cy)
 Set window's position (passed to SetWindowPos(..) ).
BOOL setWindowText (LPCTSTR lpString)
 Set window's title. (passed to SetWindowText(..) ).
HWND dump_handle ()
 Dump window's handle.
LPRECT dump_WindowRect ()
 Dump canvas' RECT.
HDC dump_DC ()
 Dump canvas' handle (DC).
VETRESULT show (int nCmdShow=SW_SHOW)
 Show the window, state is customizable.
VETRESULT hide ()
 Hide the window.
VETRESULT run ()
 Currently not used.
VETRESULT setHeight (unsigned int value)
 Set current canvas' height.
VETRESULT setWidth (unsigned int value)
 Set current canvas' width.
unsigned int getWidth () const
unsigned int getHeight () const
VETRESULT importFrom (vetFrameYUV420 &img)
 Display frame, single pixel routine.
VETRESULT importFrom (vetFrameRGB24 &img)
 Display frame, single pixel routine.
VETRESULT importFrom (vetFrameT< unsigned char > &img)
 Display frame, conversion to vetFrameRGB24 and single pixel routine.

Protected Attributes

HINSTANCE parentHistance
 Parent Application's instance address.
HWND myHandle
 Current window's handle.
RECT myRect
 Canvas size and position.
HDC hDisplay
 Canvas.
unsigned int width
unsigned int height

Detailed Description

Definition at line 59 of file vetWindow32.h.


Constructor & Destructor Documentation

vetWindow32::vetWindow32 HINSTANCE  hInstance = 0  ) 
 

Default constructor initializes variables; if present, set parent instance and create window.

Parameters:
[in] hInstance Main window (application) instance handle, required before calling createWindow()

Definition at line 28 of file vetWindow32.cpp.

References createWindow(), height, INFO, myHandle, parentHistance, and width.


Member Function Documentation

VETRESULT vetWindow32::createWindow unsigned int  width,
unsigned int  height
 

Initialize canvas, parent instance must be valid.

Parameters:
[in] width window's width in pixel
[in] height window's height in pixel
Returns:
VETRET_ILLEGAL_USE if app handle is not valid, VETRET_INTERNAL_ERR if window cannot be created, VETRET_OK else.
Note:
use setParentHistance() to update application's handle.

Definition at line 63 of file vetWindow32.cpp.

References hDisplay, height, myHandle, myRect, parentHistance, VETRET_ILLEGAL_USE, VETRET_INTERNAL_ERR, VETRET_OK, and width.

Referenced by vetWindow32().

HDC vetWindow32::dump_DC  )  [inline]
 

Dump canvas' handle (DC).

Returns:
Canvas' handle (where data is displayed)

Definition at line 181 of file vetWindow32.h.

References hDisplay.

HWND vetWindow32::dump_handle  )  [inline]
 

Dump window's handle.

Returns:
address of window instance.

Definition at line 167 of file vetWindow32.h.

References myHandle.

LPRECT vetWindow32::dump_WindowRect  )  [inline]
 

Dump canvas' RECT.

Returns:
Canvas' rectancle (position and dimension)

Definition at line 174 of file vetWindow32.h.

References myRect.

HINSTANCE vetWindow32::getParentHistance  )  [inline]
 

Get application's handle.

Returns:
address of application instance.

Definition at line 117 of file vetWindow32.h.

References parentHistance.

VETRESULT vetWindow32::hide  ) 
 

Hide the window.

Returns:
VETRET_ILLEGAL_USE if window handle is not valid, VETRET_OK else.

Definition at line 114 of file vetWindow32.cpp.

References myHandle, VETRET_ILLEGAL_USE, and VETRET_OK.

VETRESULT vetWindow32::importFrom vetFrameT< unsigned char > &  img  )  [virtual]
 

Display frame, conversion to vetFrameRGB24 and single pixel routine.

Parameters:
[in] img VETLib Grey Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameT&)

Implements vetOutput.

Definition at line 234 of file vetWindow32.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetWindow32::importFrom vetFrameRGB24 img  )  [virtual]
 

Display frame, single pixel routine.

Parameters:
[in] img VETLib Cache24 Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameRGB24&)

Implements vetOutput.

Definition at line 207 of file vetWindow32.cpp.

References vetFrameRGB24::data, hDisplay, vetFrame::height, INFO, VETRET_OK, VETRET_PARAM_ERR, and vetFrame::width.

VETRESULT vetWindow32::importFrom vetFrameYUV420 img  )  [virtual]
 

Display frame, single pixel routine.

Parameters:
[in] img VETLib Cache Frame to be displayed.
Returns:
VETRET_OK if everything is fine, VETRET_INTERNAL_ERR else.
Note:
Input operator (<<) call directly this function.
See also:
operator << (vetFrameYUV420&)

Implements vetOutput.

Definition at line 189 of file vetWindow32.cpp.

References INFO, and VETRET_NOT_IMPLEMENTED.

VETRESULT vetWindow32::run  )  [inline]
 

Currently not used.

Returns:
VETRET_NOT_IMPLEMENTED

Definition at line 204 of file vetWindow32.h.

References VETRET_NOT_IMPLEMENTED.

VETRESULT vetWindow32::setHeight unsigned int  value  )  [virtual]
 

Set current canvas' height.

Returns:
height in pixel.

Implements vetOutput.

Definition at line 157 of file vetWindow32.cpp.

References height, myHandle, VETRET_OK, and width.

void vetWindow32::setParentHistance HINSTANCE  appHinstance  )  [inline]
 

Get application's handle.

Returns:
address of application instance.

Definition at line 110 of file vetWindow32.h.

References parentHistance.

VETRESULT vetWindow32::setWidth unsigned int  value  )  [virtual]
 

Set current canvas' width.

Returns:
width in pixel.

Implements vetOutput.

Definition at line 170 of file vetWindow32.cpp.

References height, myHandle, VETRET_OK, and width.

BOOL vetWindow32::setWindowPos int  X,
int  Y,
int  cx,
int  cy
[inline]
 

Set window's position (passed to SetWindowPos(..) ).

Parameters:
[in] X window's top-left x-axis position in screen.
[in] Y window's top-left y-axis position in screen.
[in] cx size
[in] cy size
Returns:
false if update has falied, true else.

Definition at line 151 of file vetWindow32.h.

References myHandle.

BOOL vetWindow32::setWindowText LPCTSTR  lpString  )  [inline]
 

Set window's title. (passed to SetWindowText(..) ).

Parameters:
[in] lpString long pointer to null terminated string (window's title)
Returns:
false if update has falied, true else.

Definition at line 160 of file vetWindow32.h.

References myHandle.

VETRESULT vetWindow32::show int  nCmdShow = SW_SHOW  ) 
 

Show the window, state is customizable.

Parameters:
[in] default is SW_SHOW, argument is passed to ShowWindow() API.
Returns:
VETRET_ILLEGAL_USE if window handle is not valid, VETRET_OK else.

Definition at line 98 of file vetWindow32.cpp.

References myHandle, VETRET_ILLEGAL_USE, and VETRET_OK.

VETRESULT vetWindow32::welcomeText  ) 
 

Display some text.

Returns:
VETRET_ILLEGAL_USE if app handle is not valid, VETRET_OK else.

Definition at line 131 of file vetWindow32.cpp.

References myHandle, VETRET_ILLEGAL_USE, and VETRET_OK.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:44 2006 for VETLib by  doxygen 1.4.4