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

Widget that represents a polygon defined by a set of points. More...

#include <Polygon.hpp>

Inheritance diagram for xv::Polygon:
xv::Widget

Public Member Functions

 Polygon ()
 Default constructor. Create a Polygon in undefined state.
 
bool operator== (const Polygon &b)
 Creates polygon from a list of points. More...
 
bool operator!= (const Polygon &b)
 Checks if 2 Polygons are different.
 
virtual void setPosition (gui_point_t position)
 Moves 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 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 Polygon UNDEFINED
 Represents a Polygon for which points were not yet set.
 

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 polygon defined by a set of points.

Member Function Documentation

bool xv::Polygon::operator== ( const Polygon b)
inline

Creates polygon from a list of points.

Checks if 2 Polygons are equal


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