|
|
|
@ -74,9 +74,9 @@ typedef std::vector< GRID_TYPE > GRIDS; |
|
|
|
*/ |
|
|
|
class BASE_SCREEN : public EDA_ITEM |
|
|
|
{ |
|
|
|
private: |
|
|
|
GRIDS m_grids; ///< List of valid grid sizes. |
|
|
|
wxString m_fileName; ///< File used to load the screen. |
|
|
|
char m_FlagRefreshReq; ///< Indicates that the screen should be redrawn. |
|
|
|
bool m_FlagModified; ///< Indicates current drawing has been modified. |
|
|
|
bool m_FlagSave; ///< Indicates automatic file save. |
|
|
|
EDA_ITEM* m_CurrentItem; ///< Currently selected object |
|
|
|
@ -131,9 +131,9 @@ public: |
|
|
|
BLOCK_SELECTOR m_BlockLocate; ///< Block description for block commands |
|
|
|
|
|
|
|
int m_ScreenNumber; |
|
|
|
int m_NumberOfScreen; |
|
|
|
int m_NumberOfScreens; |
|
|
|
|
|
|
|
wxPoint m_GridOrigin; |
|
|
|
wxPoint m_GridOrigin; |
|
|
|
|
|
|
|
std::vector<double> m_ZoomList; ///< standard zoom (i.e. scale) coefficients. |
|
|
|
bool m_IsPrinting; |
|
|
|
@ -245,13 +245,13 @@ public: |
|
|
|
*/ |
|
|
|
virtual PICKED_ITEMS_LIST* PopCommandFromRedoList(); |
|
|
|
|
|
|
|
int GetUndoCommandCount() |
|
|
|
int GetUndoCommandCount() const |
|
|
|
{ |
|
|
|
return m_UndoList.m_CommandsList.size(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int GetRedoCommandCount() |
|
|
|
int GetRedoCommandCount() const |
|
|
|
{ |
|
|
|
return m_RedoList.m_CommandsList.size(); |
|
|
|
} |
|
|
|
@ -261,8 +261,8 @@ public: |
|
|
|
void ClrModify() { m_FlagModified = false;; } |
|
|
|
void SetSave() { m_FlagSave = true; } |
|
|
|
void ClrSave() { m_FlagSave = false; } |
|
|
|
int IsModify() { return m_FlagModified; } |
|
|
|
int IsSave() { return m_FlagSave; } |
|
|
|
bool IsModify() const { return m_FlagModified; } |
|
|
|
bool IsSave() const { return m_FlagSave; } |
|
|
|
|
|
|
|
|
|
|
|
//----<zoom stuff>--------------------------------------------------------- |
|
|
|
@ -336,23 +336,24 @@ public: |
|
|
|
* |
|
|
|
* @return int - Currently selected grid command ID. |
|
|
|
*/ |
|
|
|
int GetGridId(); |
|
|
|
int GetGridId() const { return m_Grid.m_Id; } |
|
|
|
|
|
|
|
/** |
|
|
|
* Return the grid size of the currently selected grid. |
|
|
|
* |
|
|
|
* @return wxRealPoint - The currently selected grid size. |
|
|
|
*/ |
|
|
|
wxRealPoint GetGridSize(); |
|
|
|
const wxRealPoint& GetGridSize() const { return m_Grid.m_Size; } |
|
|
|
|
|
|
|
/** |
|
|
|
* Return the grid object of the currently selected grid. |
|
|
|
* |
|
|
|
* @return GRID_TYPE - The currently selected grid. |
|
|
|
*/ |
|
|
|
GRID_TYPE GetGrid(); |
|
|
|
const GRID_TYPE& GetGrid() const { return m_Grid; } |
|
|
|
|
|
|
|
const wxPoint& GetGridOrigin() const { return m_GridOrigin; } |
|
|
|
|
|
|
|
const wxPoint& GetGridOrigin(); |
|
|
|
void SetGrid( const wxRealPoint& size ); |
|
|
|
|
|
|
|
/** |
|
|
|
@ -402,7 +403,7 @@ public: |
|
|
|
* @return wxPoint - The reference point, either the mouse position or |
|
|
|
* the cursor position. |
|
|
|
*/ |
|
|
|
wxPoint RefPos( bool useMouse ) |
|
|
|
wxPoint RefPos( bool useMouse ) const |
|
|
|
{ |
|
|
|
return useMouse ? m_MousePosition : m_crossHairPosition; |
|
|
|
} |
|
|
|
@ -415,7 +416,7 @@ public: |
|
|
|
* if \a aOnGrid is true. |
|
|
|
* @return The current cursor position. |
|
|
|
*/ |
|
|
|
wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ); |
|
|
|
wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ) const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetCursorScreenPosition |
|
|
|
@ -432,7 +433,8 @@ public: |
|
|
|
* grid size is used. |
|
|
|
* @return The nearst grid position. |
|
|
|
*/ |
|
|
|
wxPoint GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize = NULL ); |
|
|
|
wxPoint GetNearestGridPosition( const wxPoint& aPosition, |
|
|
|
wxRealPoint* aGridSize = NULL ) const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetClass |
|
|
|
|