MRPT logo

mrpt::gui::CDisplayWindow Class Reference

This class creates a window as a graphical user interface (GUI) for displaying images to the user. More...

#include <mrpt/gui/CDisplayWindow.h>

Inheritance diagram for mrpt::gui::CDisplayWindow:

mrpt::utils::CSerializable

List of all members.

Public Member Functions

void * getWxObject ()
 Read-only access to the wxDialog object.
void notifyChildWindowDestruction ()
 Called by wx main thread to set m_hwnd to NULL.
 CDisplayWindow (const std::string &windowCaption=std::string())
 Constructor.
 ~CDisplayWindow ()
 Destructor.
void showImageAndPoints (const CMRPTImage &img, const vector_float &x, const vector_float &y, unsigned int color=0xFF0000)
 Show a given color or grayscale image on the window and print a set of points on it.
void showImageAndPoints (const CMRPTImageFloat &img, const vector_float &x, const vector_float &y, unsigned int color=0xFF0000)
 Show a given color or grayscale image on the window and print a set of points on it.
void showImageAndPoints (const CMRPTImage &img, const mrpt::vision::CFeatureList &list, unsigned int color=0xFF0000)
 Show a given color or grayscale image on the window and print a set of points on it.
void showImage (const CMRPTImage &img)
 Show a given color or grayscale image on the window.
void showImage (const CMRPTImageFloat &img)
 Show a given grayscale image on the window.
bool isOpen ()
 Returns false if the user has already closed the window.
void resize (unsigned int width, unsigned int height)
 Resizes the window, stretching the image to fit into the display area.
void setPos (int x, int y)
 Changes the position of the window on the screen.
int waitForKey ()
 Waits for any key to be pushed on the image or the console, and returns the key code.
bool keyHit () const
 Returns true if a key has been pushed, without blocking waiting for a new key being pushed.
void clearKeyHitFlag ()
 Assure that "keyHit" will return false until the next pushed key.
void enableCursorCoordinatesVisualization (bool enable)
 Enables or disables the visualization of cursor coordinates on the window caption (default = enabled).
void setWindowTitle (const std::string &str)
 Changes the window title text.

Public Attributes

synch::CSemaphore m_semThreadReady
 This semaphore will be signaled when the wx window is built and ready.
synch::CSemaphore m_semWindowDestroyed
 This semaphore will be signaled when the wx window is destroyed.

Protected Attributes

std::string m_caption
 The caption of the window:.
void_ptr_noncopy m_hwnd
 The window's handle.
volatile bool m_keyPushed
 Auxiliary.
volatile int m_keyPushedCode
bool m_enableCursorCoordinates
 Enables or disables the visualization of cursor coordinates on the window caption.

Friends

class CWindowDialog


Detailed Description

This class creates a window as a graphical user interface (GUI) for displaying images to the user.

Definition at line 58 of file CDisplayWindow.h.


Constructor & Destructor Documentation

mrpt::gui::CDisplayWindow::CDisplayWindow ( const std::string &  windowCaption = std::string()  ) 

Constructor.

mrpt::gui::CDisplayWindow::~CDisplayWindow (  ) 

Destructor.


Member Function Documentation

void mrpt::gui::CDisplayWindow::clearKeyHitFlag (  )  [inline]

Assure that "keyHit" will return false until the next pushed key.

See also:
keyHit, waitForKey

Definition at line 161 of file CDisplayWindow.h.

void mrpt::gui::CDisplayWindow::enableCursorCoordinatesVisualization ( bool  enable  )  [inline]

Enables or disables the visualization of cursor coordinates on the window caption (default = enabled).

Definition at line 169 of file CDisplayWindow.h.

void* mrpt::gui::CDisplayWindow::getWxObject (  )  [inline]

Read-only access to the wxDialog object.

Definition at line 76 of file CDisplayWindow.h.

bool mrpt::gui::CDisplayWindow::isOpen (  ) 

Returns false if the user has already closed the window.

bool mrpt::gui::CDisplayWindow::keyHit (  )  const [inline]

Returns true if a key has been pushed, without blocking waiting for a new key being pushed.

See also:
waitForKey, clearKeyHitFlag

Definition at line 153 of file CDisplayWindow.h.

void mrpt::gui::CDisplayWindow::notifyChildWindowDestruction (  ) 

Called by wx main thread to set m_hwnd to NULL.

void mrpt::gui::CDisplayWindow::resize ( unsigned int  width,
unsigned int  height 
)

Resizes the window, stretching the image to fit into the display area.

void mrpt::gui::CDisplayWindow::setPos ( int  x,
int  y 
)

Changes the position of the window on the screen.

void mrpt::gui::CDisplayWindow::setWindowTitle ( const std::string &  str  ) 

Changes the window title text.

void mrpt::gui::CDisplayWindow::showImage ( const CMRPTImageFloat img  ) 

Show a given grayscale image on the window.

It adapts the size of the window to that of the image.

void mrpt::gui::CDisplayWindow::showImage ( const CMRPTImage img  ) 

Show a given color or grayscale image on the window.

It adapts the size of the window to that of the image.

void mrpt::gui::CDisplayWindow::showImageAndPoints ( const CMRPTImage img,
const mrpt::vision::CFeatureList list,
unsigned int  color = 0xFF0000 
)

Show a given color or grayscale image on the window and print a set of points on it.

It adapts the size of the window to that of the image.

void mrpt::gui::CDisplayWindow::showImageAndPoints ( const CMRPTImageFloat img,
const vector_float x,
const vector_float y,
unsigned int  color = 0xFF0000 
)

Show a given color or grayscale image on the window and print a set of points on it.

It adapts the size of the window to that of the image.

void mrpt::gui::CDisplayWindow::showImageAndPoints ( const CMRPTImage img,
const vector_float x,
const vector_float y,
unsigned int  color = 0xFF0000 
)

Show a given color or grayscale image on the window and print a set of points on it.

It adapts the size of the window to that of the image.

int mrpt::gui::CDisplayWindow::waitForKey (  ) 

Waits for any key to be pushed on the image or the console, and returns the key code.

Key codes are Virtual Key Codes from wxWidgets: http://docs.wxwidgets.org/stable/wx_keycodes.html


Friends And Related Function Documentation

friend class CWindowDialog [friend]

Definition at line 62 of file CDisplayWindow.h.


Member Data Documentation

std::string mrpt::gui::CDisplayWindow::m_caption [protected]

The caption of the window:.

Definition at line 85 of file CDisplayWindow.h.

Enables or disables the visualization of cursor coordinates on the window caption.

Definition at line 97 of file CDisplayWindow.h.

The window's handle.

Definition at line 89 of file CDisplayWindow.h.

volatile bool mrpt::gui::CDisplayWindow::m_keyPushed [protected]

Auxiliary.

Definition at line 92 of file CDisplayWindow.h.

Definition at line 93 of file CDisplayWindow.h.

This semaphore will be signaled when the wx window is built and ready.

Definition at line 67 of file CDisplayWindow.h.

This semaphore will be signaled when the wx window is destroyed.

Definition at line 71 of file CDisplayWindow.h.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:07:47 EST 2009