Commit 5d78a007 authored by Tomasz Włostowski's avatar Tomasz Włostowski
Browse files

added ClassOf() for DRAWSEGMENTs, PADs and PCB_TEXTs

parent 0879b457
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@ public:
    /// skip the linked list stuff, and parent
    const DRAWSEGMENT& operator = ( const DRAWSEGMENT& rhs );

    static inline bool ClassOf( const EDA_ITEM *aItem )
    {
        return aItem && PCB_LINE_T == aItem->Type();
    }

    void SetWidth( int aWidth )             { m_Width = aWidth; }
    int GetWidth() const                    { return m_Width; }

+5 −0
Original line number Diff line number Diff line
@@ -94,6 +94,11 @@ public:
                                    ///< used for edge board connectors
    static LSET UnplatedHoleMask(); ///< layer set for a mechanical unplated through hole pad

    static inline bool ClassOf( const EDA_ITEM *aItem )
    {
        return aItem && PCB_PAD_T == aItem->Type();
    }

    void Copy( D_PAD* source );

    D_PAD* Next() const       { return static_cast<D_PAD*>( Pnext ); }
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,11 @@ public:

    ~TEXTE_PCB();

    static inline bool ClassOf( const EDA_ITEM *aItem )
    {
        return aItem && PCB_TEXT_T == aItem->Type();
    }

    virtual const wxPoint& GetPosition() const
    {
        return m_Pos;