63 #include "rnr/rnrconfig.h" 65 #include "opencv2/core/core.hpp" 169 typedef void (*
KeyCbFunc_T)(
int code,
int state,
void *user_data);
226 Win(
const std::string &strWinName,
229 bool bDecorate=
true);
279 const std::string &strVal)
305 virtual void show() = 0;
313 virtual void showCvImage(cv::Mat &img, uint_t uImgIndex=0) = 0;
327 virtual void showPageRef(
const std::string &strPageRef) = 0;
335 virtual void showStatus(
const char *sFmt, ...) = 0;
351 virtual int waitKey(
int delay) = 0;
369 virtual void wait(
int delay) = 0;
386 const std::string &strIconPath,
387 const std::string &strAltText,
388 const std::string &strToolTip=
"") = 0;
405 const std::string &strAltText,
406 const std::string &strToolTip=
"") = 0;
420 const std::string &strLabel,
421 const std::string &strToolTip=
"") = 0;
434 const std::string &strIconPath,
435 const std::string &strToolTip=
"") = 0;
450 const std::string &strToolTip=
"") = 0;
463 const std::string &strLabel,
464 const std::string &strToolTip=
"") = 0;
588 if( uImgIndex < MaxCvImages )
602 if( uImgIndex < MaxCvImages )
652 typedef std::map<std::string, std::string> MapLookFeel_T;
180 rotation (flip verically)
void registerButtonClickCallback(BttnCbFunc_T funcCb, void *param)
Register application button click event callback.
static const int MaxCvImages
max workspace images/video
void setLookAndFeelDefaults()
Set look and feel standard set defaults.
virtual int waitKey(int delay)=0
Wait for keypress or timeout.
cv::Size getWorkspaceSize()
Get the window's workspace size.
number of reserved actions
void unregisterCvImageMouseCallback(uint_t uImgIndex=0)
Unregister application mouse event callback.
virtual void setLookAndFeel(const std::string &strKey, const std::string &strVal)
Set GUI look and feel value.
ulong_t getGstXid()
Get GStreamer X-Window id.
virtual void removeAllButtons()=0
Remove all buttons from all menus.
virtual void showCvImage(cv::Mat &img, uint_t uImgIndex=0)=0
Show a OpenCv image on the workspace.
MouseCbFunc_T m_funcMouseCb[MaxCvImages]
registered mouse cb func
void unregisterKeyboardCallback()
Unregister application keyboard press event callback.
virtual bool replaceButtonImage(int nBttnId, const std::string &strIconPath, const std::string &strToolTip="")=0
Replace existing button image with new image.
void(* BttnCbFunc_T)(int nBttnId, void *user_data)
Menu button Callback Function Type.
virtual std::string getLookAndFeel(const std::string &strKey)
Get the GUI look and feel value.
virtual void initWorkspace()=0
Initialize window's workspace to hold a native GUI toolkit widget tree.
virtual void clearStatus()=0
Clear status message.
bool m_bDecorate
do [not] decorate window
void * m_dataMouseCb[MaxCvImages]
registered mouse cb data
std::string m_strWinName
window name (and title)
Win(const std::string &strWinName, int nWidth, int nHeight, bool bDecorate=true)
Windowing class initialization constructor.
uint_t m_uLastKey
last pressed keyboard code
void unregisterButtonClickCallback()
Unregister application button click event callback.
KeyCbFunc_T m_funcKeyCb
registered keyboard callback func
RoadNarrows top-level look and feel user interface declarations.
virtual bool addLabelButton(int nBttnId, AlignOp eAlign, const std::string &strLabel, const std::string &strToolTip="")=0
Add a button with a label to window button menu.
virtual uint_t initWorkspaceAsCvImage()=0
Initialize the workspace as a display to show OpenCV images.
virtual bool removeButton(int nBttnId)=0
Remove a button from a menu.
ulong_t m_uGstWinXid
GstWin container X window id.
void * m_dataKeyCb
registered keyboard callback data
int m_nWinHeight
window height
BttnCbFunc_T m_funcBttnCb
registered menu button callback func
virtual uint_t addWorkspaceCvImageDisplay(void *wContainer)=0
Add an OpenCV display widget to the container widget.
static const int NumOfButtonMenus
left and right menus
RNR Win window abstract base class.
virtual void wait(int delay)=0
Wait for timeout.
virtual void show()=0
Show/refresh all gui widgets in window.
void(* KeyCbFunc_T)(int code, int state, void *user_data)
Keyboard Callback Function Type.
virtual bool showButtonState(int nBttnId, WidgetState eBttnState)=0
Show a button's widget state.
MapLookFeel_T m_mapLookFeel
look and feel map
virtual void showWorkspace()=0
Show/refresh all gui widgets in workspace.
void registerCvImageMouseCallback(MouseCbFunc_T funcCb, void *param, uint_t uImgIndex=0)
Register application mouse event callback.
virtual void showPageRef(int nPageRef)=0
Show page reference number.
void registerKeyboardCallback(KeyCbFunc_T funcCb, void *param)
Register application keyboard press event callback.
virtual void removeWorkspaceCvImageDisplay(uint_t uImgIndex)=0
Remove OpenCV display widget from workspace.
virtual ~Win()
Destructor.
virtual void eraseWorkspace()=0
Remove all widgets contained in the window's workspace container.
virtual bool addImageButton(int nBttnId, AlignOp eAlign, const std::string &strIconPath, const std::string &strAltText, const std::string &strToolTip="")=0
Add a button with an image to window button menu.
bool m_bMouseEvent
was a mouse event (click, drag, etc)
void(* MouseCbFunc_T)(int cv_event, int x, int y, int flags, void *user_data)
Mouse Callback Function Type.
virtual void showStatus(const char *sFmt,...)=0
Show status message.
int m_nWinWidth
window width
virtual void initWorkspaceAsGstWin(const cv::Size &sizeVidWin)=0
Initialize the workspace as a window display to show GStreamer video/images.
void * m_dataBttnCb
registered menu button callback data
CvRect m_rectWorkspace
workspace bounding rectangle
virtual bool replaceButtonLabel(int nBttnId, const std::string &strLabel, const std::string &strToolTip="")=0
Replace existing button label with new label.
virtual const char * getGuiToolkitName()
Get GUI toolkit name.
virtual void waitMouse(int delay)=0
Wait for timeout or registered mouse event.