~bidulock/kicad/kicad-brian

« back to all changes in this revision

Viewing changes to pcbnew/class_dimension.h

  • Committer: Brian F. G. Bidulock
  • Date: 2010-10-11 15:40:59 UTC
  • mfrom: (2360.34.14 kicad-brian)
  • Revision ID: brian@habeascorpus-20101011154059-uj1c42yjgwh2qv83
- committed current working tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    DIMENSION( BOARD_ITEM* aParent );
29
29
    ~DIMENSION();
30
30
 
31
 
    wxPoint& GetPosition()
 
31
    virtual wxPoint GetPosition() const
32
32
    {
33
33
        return m_Pos;
34
34
    }
 
35
    virtual wxPoint GetEndpoint() const
 
36
    {
 
37
        return m_Pos;
 
38
    }
 
39
    virtual void SetPosition( const wxPoint& aPos )
 
40
    {
 
41
        m_Pos = aPos;
 
42
    }
 
43
    virtual void SetEndpoint( const wxPoint& aPos )
 
44
    {
 
45
        m_Pos = aPos;
 
46
    }
35
47
 
36
48
    /**
37
49
     * Function SetLayer
46
58
     */
47
59
    void AdjustDimensionDetails( bool aDoNotChangeText = false);
48
60
 
49
 
    bool    ReadDimensionDescr( FILE* File, int* LineNum );
50
 
 
51
 
    /**
52
 
     * Function Save
53
 
     * writes the data structures for this object out to a FILE in "*.brd" format.
54
 
     * @param aFile The FILE to write to.
55
 
     * @return bool - true if success writing else false.
56
 
     */
57
 
    bool Save( FILE* aFile ) const;
 
61
    /** Read and write PCB files: implemented in pcbnew/ioascii.cpp.
 
62
      * @{ */
 
63
 
 
64
    /// Save this dimension to a PCB file.
 
65
    bool SaveDescr( PCB_File_Context& aFC );
 
66
 
 
67
    /// Create and read a dimension from a PCB file.
 
68
    static DIMENSION* ReadDescr( PCB_File_Context& aFC, BOARD* aParent );
 
69
 
 
70
    /** @} */
58
71
 
59
72
    void    SetText( const wxString& NewText );
60
73
    wxString GetText( void );
65
78
                  int aColorMode, const wxPoint& offset = ZeroOffset );
66
79
 
67
80
    /**
 
81
     * Function Plot
 
82
     * Plots the for the layer on the plotter.  Implemented in
 
83
     * pcbnew/plot_rtn.cpp.
 
84
     */
 
85
    virtual void Plot( PLOTTER* aPlotter, const LAYER_ID& aLayer, const PCB_Plot_Options& aPlotOptions ) const;
 
86
 
 
87
    virtual void Draw3D( Pcb3D_GLCanvas& aCanvas ) const;
 
88
 
 
89
    /**
 
90
     * Function ExportVrml
 
91
     * Export the board item to VRML.  Implemented in pcbnew/export_vrml.cpp.
 
92
     */
 
93
    virtual void ExportVrml( ) const;
 
94
 
 
95
    virtual void AddToBoard( BOARD* aBoard )
 
96
    {
 
97
        SetParent( aBoard );
 
98
        SetState( DELETED, OFF );
 
99
        SetDirty( Presence );
 
100
        aBoard->AddItem( this );
 
101
    }
 
102
 
 
103
    virtual void Delete( void )
 
104
    {
 
105
        SetState( DELETED, ON );
 
106
        SetDirty( Presence );
 
107
        GetBoard()->DeleteItem( this );
 
108
        // will be removed and freed later by collector function
 
109
    }
 
110
 
 
111
    virtual void Remove( void )
 
112
    {
 
113
        SetDirtyParent( NULL );
 
114
        GetBoard()->RemoveItem( this );
 
115
        // must be unliked immediately
 
116
    }
 
117
 
 
118
    /**
68
119
     * Function Move
69
120
     * @param offset : moving vector
70
121
     */
94
145
     */
95
146
    void    Mirror(const wxPoint& axis_pos);
96
147
 
 
148
    EDA_Rect GetBoundingBox() const;
 
149
 
97
150
    /**
98
151
     * Function DisplayInfo
99
152
     * has knowledge about the frame and how and where to put status information
101
154
     * Is virtual from EDA_BaseStruct.
102
155
     * @param frame A WinEDA_DrawFrame in which to print status information.
103
156
     */
104
 
    void    DisplayInfo( WinEDA_DrawFrame* frame );
 
157
    void    DisplayInfo( WinEDA_DrawFrame* frame ) const;
105
158
 
106
159
    /**
107
160
     * Function HitTest
109
162
     * @param ref_pos A wxPoint to test
110
163
     * @return bool - true if a hit, else false
111
164
     */
112
 
    bool    HitTest( const wxPoint& ref_pos );
 
165
    virtual bool HitTest( const wxPoint& ref_pos ) const;
113
166
 
114
167
    /**
115
168
     * Function HitTest (overlaid)
118
171
     * @param refArea : the given EDA_Rect
119
172
     * @return bool - true if a hit, else false
120
173
     */
121
 
    bool    HitTest( EDA_Rect& refArea );
 
174
    virtual bool HitTest( const EDA_Rect& refArea ) const;
122
175
 
123
176
 
124
177
    /**