class_marker_pcb.h 2.29 KB
Newer Older
1 2 3 4
/**
 * @file class_marker_pcb.h
 * @brief Markers used to show a drc problem on boards.
 */
5

6 7
#ifndef CLASS_MARKER_PCB_H
#define CLASS_MARKER_PCB_H
8

9

10 11
#include <class_board_item.h>
#include <class_marker_base.h>
12

13

14 15 16
class MSG_PANEL_ITEM;


17
class MARKER_PCB : public BOARD_ITEM, public MARKER_BASE
18
{
dickelbeck's avatar
dickelbeck committed
19

20
public:
21

22
    MARKER_PCB( BOARD_ITEM* aParent );
23 24 25 26

    /**
     * Constructor
     * @param aErrorCode The categorizing identifier for an error
27
     * @param aMarkerPos The position of the MARKER_PCB on the BOARD
28 29 30 31 32
     * @param aText Text describing the first of two objects
     * @param aPos The position of the first of two objects
     * @param bText Text describing the second of the two conflicting objects
     * @param bPos The position of the second of two objects
     */
33
    MARKER_PCB( int aErrorCode, const wxPoint& aMarkerPos,
34 35
                const wxString& aText, const wxPoint& aPos,
                const wxString& bText, const wxPoint& bPos );
36 37

    /**
38 39
     * Constructor
     * @param aErrorCode The categorizing identifier for an error
40
     * @param aMarkerPos The position of the MARKER_PCB on the BOARD
41 42 43
     * @param aText Text describing the object
     * @param aPos The position of the object
     */
44
    MARKER_PCB( int aErrorCode, const wxPoint& aMarkerPos,
45
                const wxString& aText, const wxPoint& aPos );
46

47
    ~MARKER_PCB();
dickelbeck's avatar
dickelbeck committed
48

49
    void Move(const wxPoint& aMoveVector)
50 51 52
    {
        m_Pos += aMoveVector;
    }
53

54
    void Rotate( const wxPoint& aRotCentre, double aAngle );
55

56
    void Flip( const wxPoint& aCentre );
57

58 59
    void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
               GR_DRAWMODE aDrawMode, const wxPoint& aOffset = ZeroOffset )
60
    {
61
        DrawMarker( aPanel, aDC, aDrawMode, aOffset );
62 63
    }

Dick Hollenbeck's avatar
Dick Hollenbeck committed
64 65
    const wxPoint& GetPosition() const          { return m_Pos; }
    void SetPosition( const wxPoint& aPos )     { m_Pos = aPos; }
dickelbeck's avatar
dickelbeck committed
66

67
    bool HitTest( const wxPoint& aPosition )
68
    {
69
        return HitTestMarker( aPosition );
70 71
    }

72
    bool IsOnLayer( LAYER_NUM aLayer ) const;
73

74
    void GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList );
75

76
    wxString GetSelectMenuText() const;
77

78
    BITMAP_DEF GetMenuImage() const { return  drc_xpm; }
79

80 81 82 83
#if defined(DEBUG)
    void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};
84

85
#endif      //  CLASS_MARKER_PCB_H