Set eol-style native on new files.
This commit is contained in:
parent
689579bde1
commit
b38c601661
|
@ -1,63 +1,63 @@
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
/* class_drawpickedstruct.cpp */
|
/* class_drawpickedstruct.cpp */
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "base_struct.h"
|
#include "base_struct.h"
|
||||||
#include "sch_item_struct.h"
|
#include "sch_item_struct.h"
|
||||||
#include "class_sch_screen.h"
|
#include "class_sch_screen.h"
|
||||||
#include "class_drawpanel.h"
|
#include "class_drawpanel.h"
|
||||||
#include "wxEeschemaStruct.h"
|
#include "wxEeschemaStruct.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/* Constructor and destructor for SCH_ITEM */
|
/* Constructor and destructor for SCH_ITEM */
|
||||||
/* They are not inline because this creates problems with gcc at linking time
|
/* They are not inline because this creates problems with gcc at linking time
|
||||||
* in debug mode
|
* in debug mode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
|
SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
|
||||||
EDA_BaseStruct( aParent, aType )
|
EDA_BaseStruct( aParent, aType )
|
||||||
{
|
{
|
||||||
m_Layer = 0;
|
m_Layer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCH_ITEM::~SCH_ITEM()
|
SCH_ITEM::~SCH_ITEM()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* place the struct in EEDrawList.
|
* place the struct in EEDrawList.
|
||||||
* if it is a new item, it it also put in undo list
|
* if it is a new item, it it also put in undo list
|
||||||
* for an "old" item, saving it in undo list must be done before editiing,
|
* for an "old" item, saving it in undo list must be done before editiing,
|
||||||
* and not here!
|
* and not here!
|
||||||
*/
|
*/
|
||||||
void SCH_ITEM::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
|
void SCH_ITEM::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
|
||||||
{
|
{
|
||||||
if( m_Flags & IS_NEW )
|
if( m_Flags & IS_NEW )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = frame->GetScreen();
|
SCH_SCREEN* screen = frame->GetScreen();
|
||||||
if( !screen->CheckIfOnDrawList( this ) ) //don't want a loop!
|
if( !screen->CheckIfOnDrawList( this ) ) //don't want a loop!
|
||||||
screen->AddToDrawList( this );
|
screen->AddToDrawList( this );
|
||||||
g_ItemToRepeat = this;
|
g_ItemToRepeat = this;
|
||||||
frame->SaveCopyInUndoList( this, IS_NEW );
|
frame->SaveCopyInUndoList( this, IS_NEW );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Flags = 0;
|
m_Flags = 0;
|
||||||
frame->GetScreen()->SetModify();
|
frame->GetScreen()->SetModify();
|
||||||
frame->GetScreen()->SetCurItem( NULL );
|
frame->GetScreen()->SetCurItem( NULL );
|
||||||
frame->DrawPanel->ManageCurseur = NULL;
|
frame->DrawPanel->ManageCurseur = NULL;
|
||||||
frame->DrawPanel->ForceCloseManageCurseur = NULL;
|
frame->DrawPanel->ForceCloseManageCurseur = NULL;
|
||||||
|
|
||||||
if( DC )
|
if( DC )
|
||||||
{
|
{
|
||||||
frame->DrawPanel->CursorOff( DC ); // Erase schematic cursor
|
frame->DrawPanel->CursorOff( DC ); // Erase schematic cursor
|
||||||
RedrawOneStruct( frame->DrawPanel, DC, this, GR_DEFAULT_DRAWMODE );
|
RedrawOneStruct( frame->DrawPanel, DC, this, GR_DEFAULT_DRAWMODE );
|
||||||
frame->DrawPanel->CursorOn( DC ); // Display schematic cursor
|
frame->DrawPanel->CursorOn( DC ); // Display schematic cursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,73 +1,73 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* sch_item_struct.h : Basic classes for most eeschema items descriptions */
|
/* sch_item_struct.h : Basic classes for most eeschema items descriptions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#ifndef __CLASS_DRAWPICKEDSTRUCT_H__
|
#ifndef __CLASS_DRAWPICKEDSTRUCT_H__
|
||||||
#define __CLASS_DRAWPICKEDSTRUCT_H__
|
#define __CLASS_DRAWPICKEDSTRUCT_H__
|
||||||
|
|
||||||
|
|
||||||
#include "base_struct.h"
|
#include "base_struct.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DrawPickedStruct
|
* Class DrawPickedStruct
|
||||||
* holds structures picked by pick events (like block selection).
|
* holds structures picked by pick events (like block selection).
|
||||||
* This class has only one useful member: .m_PickedStruct, used as a link.
|
* This class has only one useful member: .m_PickedStruct, used as a link.
|
||||||
* It is used to create a linked list of selected items (in block selection).
|
* It is used to create a linked list of selected items (in block selection).
|
||||||
* Each DrawPickedStruct item has is member: .m_PickedStruct pointing the
|
* Each DrawPickedStruct item has is member: .m_PickedStruct pointing the
|
||||||
* real selected item.
|
* real selected item.
|
||||||
*/
|
*/
|
||||||
class DrawPickedStruct : public EDA_BaseStruct
|
class DrawPickedStruct : public EDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EDA_BaseStruct * m_PickedStruct;
|
EDA_BaseStruct * m_PickedStruct;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DrawPickedStruct( EDA_BaseStruct * pickedstruct = NULL );
|
DrawPickedStruct( EDA_BaseStruct * pickedstruct = NULL );
|
||||||
~DrawPickedStruct();
|
~DrawPickedStruct();
|
||||||
void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { };
|
void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { };
|
||||||
void DeleteWrapperList();
|
void DeleteWrapperList();
|
||||||
|
|
||||||
DrawPickedStruct* Next() { return (DrawPickedStruct*) Pnext; }
|
DrawPickedStruct* Next() { return (DrawPickedStruct*) Pnext; }
|
||||||
|
|
||||||
EDA_Rect GetBoundingBox();
|
EDA_Rect GetBoundingBox();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetBoundingBoxUnion
|
* Function GetBoundingBoxUnion
|
||||||
* returns the union of all the BoundingBox rectangles of all held items
|
* returns the union of all the BoundingBox rectangles of all held items
|
||||||
* in the picklist whose list head is this DrawPickedStruct.
|
* in the picklist whose list head is this DrawPickedStruct.
|
||||||
* @return EDA_Rect - The combined, composite, bounding box.
|
* @return EDA_Rect - The combined, composite, bounding box.
|
||||||
*/
|
*/
|
||||||
EDA_Rect GetBoundingBoxUnion();
|
EDA_Rect GetBoundingBoxUnion();
|
||||||
|
|
||||||
wxString GetClass() const { return wxT( "DrawPickedStruct" ); }
|
wxString GetClass() const { return wxT( "DrawPickedStruct" ); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Draw
|
* Function Draw
|
||||||
* Do nothing, needed for SCH_ITEM compat.
|
* Do nothing, needed for SCH_ITEM compat.
|
||||||
*/
|
*/
|
||||||
void Draw( WinEDA_DrawPanel* panel,
|
void Draw( WinEDA_DrawPanel* panel,
|
||||||
wxDC* DC,
|
wxDC* DC,
|
||||||
const wxPoint& offset,
|
const wxPoint& offset,
|
||||||
int draw_mode,
|
int draw_mode,
|
||||||
int Color = -1 )
|
int Color = -1 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Save
|
* Function Save
|
||||||
* Do nothing, needed for SCH_ITEM compat.
|
* Do nothing, needed for SCH_ITEM compat.
|
||||||
* @param aFile The FILE to write to.
|
* @param aFile The FILE to write to.
|
||||||
* @return bool - true if success writing else false.
|
* @return bool - true if success writing else false.
|
||||||
*/
|
*/
|
||||||
bool Save( FILE* aFile ) const
|
bool Save( FILE* aFile ) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
void Show( int nestLevel, std::ostream& os );
|
void Show( int nestLevel, std::ostream& os );
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __CLASS_DRAWPICKEDSTRUCT_H__ */
|
#endif /* __CLASS_DRAWPICKEDSTRUCT_H__ */
|
||||||
|
|
Loading…
Reference in New Issue