Go to the documentation of this file.
72 void createWxWindow(
unsigned int initialWidth,
unsigned int initialHeight);
90 void* winobj_voidptr,
int CMD_CREATE_WIN,
int CMD_DESTROY_WIN,
104 virtual void setPos(
int x,
int y) = 0;
134 bool ignoreControlKeys =
true,
volatile int m_keyPushedCode
The basic event type for the observer-observable pattern in MRPT.
void createWxWindow(unsigned int initialWidth, unsigned int initialHeight)
Must be called by child classes just within the constructor.
The wx dialog for gui::CDisplayWindow.
const int m_CMD_DESTROY_WIN
can be 299,399,499...
volatile mrptKeyModifier m_keyPushedModifier
virtual void do_nothing() override
Just to allow this class to be polymorphic.
virtual void setCursorCross(bool cursorIsCross)=0
Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true)
GLsizei GLsizei GLuint * obj
CBaseGUIWindow * source_object
An event sent by a window when the mouse is moved over it.
const int m_CMD_CREATE_WIN
can be 200,300,400...
An event sent by a window upon a char pressed by the user.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
An event sent by a window upon resize.
std::promise< void > m_windowDestroyed
This semaphore will be signaled when the wx window is destroyed.
void clearKeyHitFlag()
Assure that "keyHit" will return false until the next pushed key.
void notifySemThreadReady()
Called by wx main thread to signal the semaphore that the wx window is built and ready.
The base class for GUI window classes.
An event sent by a window upon a mouse click, giving the (x,y) pixel coordinates.
bool isOpen()
Returns false if the user has already closed the window.
virtual void resize(unsigned int width, unsigned int height)=0
Resizes the window, stretching the image to fit into the display area.
int getPushedKey(mrptKeyModifier *out_pushModifier=nullptr)
Returns the latest pushed key, or 0 if there is no new key stroke.
std::string m_caption
The caption of the window.
CBaseGUIWindow * source_object
mrptEventMouseMove(CBaseGUIWindow *obj, mrpt::img::TPixelCoord _coords, bool _leftButton, bool _rightButton)
mrpt::void_ptr_noncopy m_hwnd
The window handle.
mrptEventWindowChar(CBaseGUIWindow *obj, int _char_code, mrptKeyModifier _key_mod)
CBaseGUIWindow * source_object
mrptKeyModifier key_modifiers
Modifiers (Shift, Control, etc...)
virtual void setWindowTitle(const std::string &str)=0
Changes the window title text.
mrpt::img::TPixelCoord coords
int char_code
The virtual key code, as defined in <mrpt/gui/keycodes.h> (a replication of wxWidgets key codes).
void notifyChildWindowDestruction()
Called by wx main thread to set m_hwnd to NULL.
GLenum GLsizei GLsizei height
virtual void do_nothing() override
Just to allow this class to be polymorphic.
virtual bool getLastMousePosition(int &x, int &y) const =0
Gets the last x,y pixel coordinates of the mouse.
virtual void do_nothing() override
Just to allow this class to be polymorphic.
mrptEventWindowClosed(CBaseGUIWindow *obj, bool _allow_close=true)
virtual void do_nothing() override
Just to allow this class to be polymorphic.
mrptEventMouseDown(CBaseGUIWindow *obj, mrpt::img::TPixelCoord _coords, bool _leftButton, bool _rightButton)
virtual ~CBaseGUIWindow()
std::promise< void > m_threadReady
This semaphore will be signaled when the wx window is built and ready.
mrpt::img::TPixelCoord coords
volatile bool m_keyPushed
GLsizei const GLchar ** string
bool keyHit() const
Returns true if a key has been pushed, without blocking waiting for a new key being pushed.
A pair (x,y) of pixel coordinates (integer resolution).
virtual void do_nothing() override
Just to allow this class to be polymorphic.
void * getWxObject()
Read-only access to the wxDialog object.
void destroyWxWindow()
Must be called by child classes in their destructors.
An event sent by a window upon when it's about to be closed, either manually by the user or programma...
int waitForKey(bool ignoreControlKeys=true, mrptKeyModifier *out_pushModifier=nullptr)
Waits for any key to be pushed on the image or the console, and returns the key code.
virtual void setPos(int x, int y)=0
Changes the position of the window on the screen.
The wx dialog for gui::CDisplayWindowPlots.
CBaseGUIWindow * source_object
Inherit from this class for those objects capable of being observed by a CObserver class.
CBaseGUIWindow(void *winobj_voidptr, int CMD_CREATE_WIN, int CMD_DESTROY_WIN, const std::string &initial_caption=std::string())
CMD_DESTROY_WIN can be 299,399,499...
mrptEventWindowResize(CBaseGUIWindow *obj, size_t _new_width, size_t _new_height)
CBaseGUIWindow * source_object
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |