pylon/PylonGUI.h#
Namespaces#
| Name |
|---|
| Pylon Contains definitions of pylon types. |
Classes#
| Name | |
|---|---|
| class | Pylon::CPylonImageWindow Class to manage a pylon image window. |
Detailed Description#
Implements a simple window to show a pylon Image.
To use the pylon GUI classes and functions you should not include this file directly. Instead, you should include [pylon/PylonGUIIncludes.h](_pylon_g_u_i_includes_8h.md#file-pylonguiincludes.h).
Source code#
//-----------------------------------------------------------------------------
// Basler pylon SDK
// Copyright (c) 2011-2022 Basler AG
// http://www.baslerweb.com
// Author: NN
//-----------------------------------------------------------------------------
#ifndef PYLON_GUI_H_INCLUDED__
#define PYLON_GUI_H_INCLUDED__
#include <pylon/stdinclude.h>
#pragma pack(push, PYLON_PACKING)
#include <pylon/PylonLinkage.h>
#ifdef PYLONGUI_EXPORTS
# define PYLONGUI_API APIEXPORT
#else
# define PYLONGUI_API APIIMPORT
# ifndef PYLON_NO_AUTO_IMPLIB
# pragma comment(lib, PYLON_LIB_NAME( "PylonGUI" ))
# endif
#endif
#if defined(__cplusplus)
namespace Pylon
{
// forwards
interface IImage;
// convenience function to show an image in one row
PYLONGUI_API void DisplayImage( size_t winIndex, const Pylon::IImage& image );
class PYLONGUI_API CPylonImageWindow
{
public:
CPylonImageWindow( void );
~CPylonImageWindow( void );
HWND GetWindowHandle() const;
size_t GetWindowIndex( void ) const
{
return m_winIndex;
}
bool IsValid( void ) const;
void Attach( size_t winIndex );
size_t Detach( void );
void Create( size_t winIndex, int x = useDefault, int y = useDefault, int nWidth = useDefault, int nHeight = useDefault );
void Show( int nShow = showDefault ) const;
void Hide( void ) const;
bool Close( void );
void SetImage( const Pylon::IImage& image ); //accepts also CGrabResultPtr
public:
static const int useDefault = static_cast<int>(0x80000000); // CW_USEDEFAULT
static const int showDefault = 5; // SW_SHOW
protected:
static const size_t invalidWinIndex = static_cast<size_t>(-1);
size_t m_winIndex;
protected:
// no copy
CPylonImageWindow( const CPylonImageWindow& );
CPylonImageWindow& operator=( const CPylonImageWindow& );
};
}
#endif /* __cplusplus */
#pragma pack(pop)
#endif /* PYLON_GUI_H_INCLUDED__ */
Updated on 27 July 2022 at 19:03:47