xvWidgets
Public Member Functions | Static Public Attributes | List of all members
xv::Point Class Reference

Widget that represents a point. More...

#include <Point.hpp>

Inheritance diagram for xv::Point:
xv::Widget

Public Member Functions

 Point ()
 Default constructor.
 
 Point (int _x, int _y)
 Construct point at x,y coordinates.
 
 Point (const gui_point_t &pt)
 Construct point at same position as pt.
 
 operator cv::Point () const
 Conversion operator to cv::Point.
 
bool operator== (const Point &b)
 Checks if 2 points are equal.
 
bool operator!= (const Point &b)
 Checks if 2 points are different.
 
virtual void setPosition (gui_point_t position)
 Move point widget.
 
void paint (const cv::Mat &)
 Overlay the point widget on an image.
 
void onMouseMove (const gui_point_t &)
 The user moved the mouse pointer over the widget.
 
void onMouseDown (const gui_point_t &)
 The user pressed the left mouse button over the widget.
 
void onMouseUp (const gui_point_t &)
 The user released the left mouse button over the widget.
 
- Public Member Functions inherited from xv::Widget
virtual void addChild (Widget &, bool readOnly=true)
 Add a child widget.
 
virtual void render (const cv::Mat &)
 Display widget in input mode (with OK/Cancel buttons)
 
virtual bool contains (const gui_point_t &)
 Check if point is inside the widget.
 
void startDragging ()
 Signal that the user started dragging the widget.
 
void stopDragging ()
 Signal that the user stopped dragging the widget.
 
bool isDragging ()
 Check if the user is dragging the widget.
 
virtual void setMouseOver (bool mouseOver)
 Signal that the user placed the mouse pointer over the widget.
 
virtual bool isMouseOver ()
 Check if the mouse pointer is over the widget.
 
virtual bool isReadOnly ()
 Check if Widget is read-only.
 
virtual gui_point_t position ()
 Get the current position.
 
bool isMouseOverButton (gui_point_t mousePosition, gui_point_t buttonPosition)
 Check if the mouse pointer is over a button.
 
void hide ()
 Make it disappear from an Image.
 

Static Public Attributes

static const std::string CLASS_NAME
 
static Point UNDEFINED
 

Additional Inherited Members

- Protected Attributes inherited from xv::Widget
std::list< Widget * > m_children
 Other widgets inside the widget.
 
Widgetm_parent = NULL
 Pointer to the parent image used to display the widget.
 
std::vector< gui_point_t > m_contour
 The contours of area occupied by the widget.
 
bool m_dragging = false
 
bool m_canceling = false
 
bool m_accepting = false
 
bool m_mouseOver = false
 
bool m_undefined = false
 
bool m_positioned = false
 
bool m_readonly = false
 
gui_point_t m_position
 
- Static Protected Attributes inherited from xv::Widget
static const int LINE_THICKNESS
 The thickness of contour lines.
 
static const int MARGIN
 Generic margin around widget.
 
static const int BUTTON_RADIUS
 Used to define the size of buttons.
 
static const gui_point_t OK_POSITION
 Offset of the OK button in relation to the widget position.
 
static const gui_point_t CANCEL_POSITION
 Offset of the Cancel button in relation to the widget position.
 
static const cv::Scalar FOREGROUND_COLOR
 Color used to draw main components of widget.
 
static const cv::Scalar HIGHLIGHT_COLOR
 Color used to draw a few important components of the widget.
 
static const cv::Scalar AFFIRMATIVE_COLOR
 Color associated with OK/accept action.
 
static const cv::Scalar NEGATIVE_COLOR
 Color associated with Cancel/reject action.
 

Detailed Description

Widget that represents a point.

Member Data Documentation

const std::string xv::Point::CLASS_NAME
static

Class name to be displayed in the GUI.

Point xv::Point::UNDEFINED
static

Represents a Point_ for which coordinates were not yet set.


The documentation for this class was generated from the following file: