Commit aeb6dd8c authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Minor schematic object improvements and code cleaning.

parent 35843238
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,20 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.


2010-nov-3 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++common
  * Initial ground work for using Boost container for storing draw items
    instead of internal linked list.
++EESchema
  * Move tests for dangling end code back into schematic objects.
  * Add clear draw object state helper to SCH_SCREEN object.
  * Add support for schematic objects to keep temporary list of connection
    objects for dangling end and other connection related tests.
  * Rearrange schematic label object code.
  * Remove duplicate error message boxes when loading schematic items.


2010-oct-28, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2010-oct-28, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
PolyLine.cpp:
PolyLine.cpp:
+16 −0
Original line number Original line Diff line number Diff line
@@ -542,6 +542,22 @@ PICKED_ITEMS_LIST* BASE_SCREEN::PopCommandFromRedoList( )
}
}




void BASE_SCREEN::AddItem( EDA_BaseStruct* aItem )
{
    wxCHECK_RET( aItem != NULL, wxT( "Attempt to add NULL item pointer to " ) + GetClass() +
                 wxT( "item list" ) );
    m_items.push_back( aItem );
}


void BASE_SCREEN::InsertItem( EDA_ITEMS::iterator aIter, EDA_BaseStruct* aItem )
{
    wxCHECK_RET( aItem != NULL, wxT( "Attempt to insert NULL item pointer to " ) + GetClass() +
                 wxT( "item list" ) );
    m_items.insert( aIter, aItem );
}


#if defined(DEBUG)
#if defined(DEBUG)
/**
/**
 * Function Show
 * Function Show
+33 −83
Original line number Original line Diff line number Diff line
@@ -19,16 +19,11 @@




// Imported functions:
// Imported functions:
void            MoveItemsInList( PICKED_ITEMS_LIST& aItemsList,
void            MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector );
                                 const wxPoint      aMoveVector );
void            RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center );
void            RotateListOfItems( PICKED_ITEMS_LIST& aItemsList,
void            Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& aMirrorPoint );
                                   wxPoint&           Center );
void            MirrorListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& Center );
void            Mirror_X_ListOfItems( PICKED_ITEMS_LIST& aItemsList,
void            DeleteItemsInList( WinEDA_DrawPanel*  panel, PICKED_ITEMS_LIST& aItemsList );
                                      wxPoint&           aMirrorPoint );
void            MirrorListOfItems( PICKED_ITEMS_LIST& aItemsList,
                                   wxPoint&           Center );
void            DeleteItemsInList( WinEDA_DrawPanel*  panel,
                                   PICKED_ITEMS_LIST& aItemsList );
void            DuplicateItemsInList( SCH_SCREEN*        screen,
void            DuplicateItemsInList( SCH_SCREEN*        screen,
                                      PICKED_ITEMS_LIST& aItemsList,
                                      PICKED_ITEMS_LIST& aItemsList,
                                      const wxPoint      aMoveVector  );
                                      const wxPoint      aMoveVector  );
@@ -38,9 +33,7 @@ static void AddPickedItem( SCH_SCREEN* screen, wxPoint aPosition );
static LIB_PIN* GetNextPinPosition( SCH_COMPONENT* aDrawLibItem,
static LIB_PIN* GetNextPinPosition( SCH_COMPONENT* aDrawLibItem,
                                    wxPoint&       aPosition,
                                    wxPoint&       aPosition,
                                    bool           aSearchFirst );
                                    bool           aSearchFirst );
static void     DrawMovingBlockOutlines( WinEDA_DrawPanel* panel,
static void     DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
                                         wxDC*             DC,
                                         bool              erase );
static void     SaveStructListForPaste( PICKED_ITEMS_LIST& aItemsList );
static void     SaveStructListForPaste( PICKED_ITEMS_LIST& aItemsList );




@@ -114,8 +107,7 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )
    {
    {
        wxString msg;
        wxString msg;
        err = TRUE;
        err = TRUE;
        msg.Printf( wxT( "HandleBlockPLace() error : no items to place (cmd \
        msg.Printf( wxT( "HandleBlockPLace() error : no items to place (cmd %d, state %d)" ),
%d, state %d)"                                                                               ),
                    block->m_Command, block->m_State );
                    block->m_Command, block->m_State );
        DisplayError( this, msg );
        DisplayError( this, msg );
    }
    }
@@ -136,10 +128,7 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )
        if( DrawPanel->ManageCurseur )
        if( DrawPanel->ManageCurseur )
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );


        SaveCopyInUndoList( block->m_ItemsSelection,
        SaveCopyInUndoList( block->m_ItemsSelection, UR_MOVED, block->m_MoveVector );
                            UR_MOVED,
                            block->m_MoveVector );

        MoveItemsInList( block->m_ItemsSelection, block->m_MoveVector );
        MoveItemsInList( block->m_ItemsSelection, block->m_MoveVector );
        block->ClearItemsList();
        block->ClearItemsList();
        break;
        break;
@@ -149,13 +138,10 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )
        if( DrawPanel->ManageCurseur )
        if( DrawPanel->ManageCurseur )
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );


        DuplicateItemsInList(
        DuplicateItemsInList( GetScreen(), block->m_ItemsSelection, block->m_MoveVector );
            GetScreen(), block->m_ItemsSelection, block->m_MoveVector );


        SaveCopyInUndoList(
        SaveCopyInUndoList( block->m_ItemsSelection,
            block->m_ItemsSelection,
                            ( block->m_Command == BLOCK_PRESELECT_MOVE ) ? UR_CHANGED : UR_NEW );
            (block->m_Command ==
             BLOCK_PRESELECT_MOVE) ? UR_CHANGED : UR_NEW );


        block->ClearItemsList();
        block->ClearItemsList();
        break;
        break;
@@ -178,12 +164,8 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )


    OnModify();
    OnModify();


    /* clear struct.m_Flags  */
    // clear struct.m_Flags.
    SCH_ITEM* Struct;
    GetScreen()->ClearDrawingState();
    for( Struct = GetScreen()->EEDrawList;
        Struct != NULL;
        Struct = Struct->Next() )
        Struct->m_Flags = 0;


    DrawPanel->ManageCurseur = NULL;
    DrawPanel->ManageCurseur = NULL;
    DrawPanel->ForceCloseManageCurseur = NULL;
    DrawPanel->ForceCloseManageCurseur = NULL;
@@ -196,13 +178,11 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )


    if( block->GetCount() )
    if( block->GetCount() )
    {
    {
        DisplayError( this,
        DisplayError( this, wxT( "HandleBlockPLace() error: some items left in buffer" ) );
                     wxT( "HandleBlockPLace() error: some items left in buffer" ) );
        block->ClearItemsList();
        block->ClearItemsList();
    }
    }


    SetToolID( m_ID_current_state, DrawPanel->m_PanelDefaultCursor,
    SetToolID( m_ID_current_state, DrawPanel->m_PanelDefaultCursor, wxEmptyString );
               wxEmptyString );
    DrawPanel->Refresh();
    DrawPanel->Refresh();
}
}


@@ -288,11 +268,9 @@ int WinEDA_SchematicFrame::HandleBlockEnd( wxDC* DC )
            DrawAndSizingBlockOutlines( DrawPanel, DC, FALSE );
            DrawAndSizingBlockOutlines( DrawPanel, DC, FALSE );
            if( block->GetCount() )
            if( block->GetCount() )
            {
            {
                wxPoint move_vector =
                wxPoint move_vector = -GetScreen()->m_BlockLocate.m_BlockLastCursorPosition;
                    -GetScreen()->m_BlockLocate.m_BlockLastCursorPosition;
                SaveStructListForPaste( block->m_ItemsSelection );
                SaveStructListForPaste( block->m_ItemsSelection );
                MoveItemsInList( g_BlockSaveDataList.m_ItemsSelection,
                MoveItemsInList( g_BlockSaveDataList.m_ItemsSelection, move_vector );
                                 move_vector );
                ii = -1;
                ii = -1;
            }
            }
            block->ClearItemsList();
            block->ClearItemsList();
@@ -317,12 +295,7 @@ int WinEDA_SchematicFrame::HandleBlockEnd( wxDC* DC )


    if( block->m_Command  == BLOCK_ABORT )
    if( block->m_Command  == BLOCK_ABORT )
    {
    {
        /* clear struct.m_Flags  */
        GetScreen()->ClearDrawingState();
        EDA_BaseStruct* Struct;
        for( Struct = GetScreen()->EEDrawList;
            Struct != NULL;
            Struct = Struct->Next() )
            Struct->m_Flags = 0;
    }
    }


    if( ii <= 0 )
    if( ii <= 0 )
@@ -333,9 +306,7 @@ int WinEDA_SchematicFrame::HandleBlockEnd( wxDC* DC )
        DrawPanel->ManageCurseur = NULL;
        DrawPanel->ManageCurseur = NULL;
        DrawPanel->ForceCloseManageCurseur = NULL;
        DrawPanel->ForceCloseManageCurseur = NULL;
        GetScreen()->SetCurItem( NULL );
        GetScreen()->SetCurItem( NULL );
        SetToolID( m_ID_current_state,
        SetToolID( m_ID_current_state, DrawPanel->m_PanelDefaultCursor, wxEmptyString );
                   DrawPanel->m_PanelDefaultCursor,
                   wxEmptyString );
    }
    }


    if( zoom_command )
    if( zoom_command )
@@ -415,8 +386,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
            DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
        if( block->GetCount() )
        if( block->GetCount() )
        {
        {
            wxPoint move_vector =
            wxPoint move_vector = -GetScreen()->m_BlockLocate.m_BlockLastCursorPosition;
                -GetScreen()->m_BlockLocate.m_BlockLastCursorPosition;
            SaveStructListForPaste( block->m_ItemsSelection );
            SaveStructListForPaste( block->m_ItemsSelection );
            MoveItemsInList( g_BlockSaveDataList.m_ItemsSelection, move_vector );
            MoveItemsInList( g_BlockSaveDataList.m_ItemsSelection, move_vector );
        }
        }
@@ -424,8 +394,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )


    case BLOCK_ZOOM:     /* Window Zoom */
    case BLOCK_ZOOM:     /* Window Zoom */
        DrawPanel->ForceCloseManageCurseur( DrawPanel, DC );
        DrawPanel->ForceCloseManageCurseur( DrawPanel, DC );
        DrawPanel->SetCursor(
        DrawPanel->SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
            DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
        Window_Zoom( GetScreen()->m_BlockLocate );
        Window_Zoom( GetScreen()->m_BlockLocate );
        break;
        break;


@@ -439,9 +408,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
            /* Compute the rotation center and put it on grid */
            /* Compute the rotation center and put it on grid */
            wxPoint rotationPoint = block->Centre();
            wxPoint rotationPoint = block->Centre();
            PutOnGrid( &rotationPoint );
            PutOnGrid( &rotationPoint );
            SaveCopyInUndoList( block->m_ItemsSelection,
            SaveCopyInUndoList( block->m_ItemsSelection, UR_ROTATED, rotationPoint );
                                UR_ROTATED,
                                rotationPoint );
            RotateListOfItems( block->m_ItemsSelection, rotationPoint );
            RotateListOfItems( block->m_ItemsSelection, rotationPoint );
            OnModify();
            OnModify();
        }
        }
@@ -460,9 +427,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
            /* Compute the mirror center and put it on grid */
            /* Compute the mirror center and put it on grid */
            wxPoint mirrorPoint = block->Centre();
            wxPoint mirrorPoint = block->Centre();
            PutOnGrid( &mirrorPoint );
            PutOnGrid( &mirrorPoint );
            SaveCopyInUndoList( block->m_ItemsSelection,
            SaveCopyInUndoList( block->m_ItemsSelection, UR_MIRRORED_X, mirrorPoint );
                                UR_MIRRORED_X,
                                mirrorPoint );
            Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint );
            Mirror_X_ListOfItems( block->m_ItemsSelection, mirrorPoint );
            OnModify();
            OnModify();
//            block->m_State   = STATE_BLOCK_MOVE;
//            block->m_State   = STATE_BLOCK_MOVE;
@@ -481,9 +446,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
            /* Compute the mirror center and put it on grid */
            /* Compute the mirror center and put it on grid */
            wxPoint mirrorPoint = block->Centre();
            wxPoint mirrorPoint = block->Centre();
            PutOnGrid( &mirrorPoint );
            PutOnGrid( &mirrorPoint );
            SaveCopyInUndoList( block->m_ItemsSelection,
            SaveCopyInUndoList( block->m_ItemsSelection, UR_MIRRORED_Y, mirrorPoint );
                                UR_MIRRORED_Y,
                                mirrorPoint );
            MirrorListOfItems( block->m_ItemsSelection, mirrorPoint );
            MirrorListOfItems( block->m_ItemsSelection, mirrorPoint );
            OnModify();
            OnModify();
//            block->m_State   = STATE_BLOCK_MOVE;
//            block->m_State   = STATE_BLOCK_MOVE;
@@ -506,9 +469,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
        DrawPanel->ManageCurseur = NULL;
        DrawPanel->ManageCurseur = NULL;
        DrawPanel->ForceCloseManageCurseur = NULL;
        DrawPanel->ForceCloseManageCurseur = NULL;
        GetScreen()->SetCurItem( NULL );
        GetScreen()->SetCurItem( NULL );
        SetToolID( m_ID_current_state,
        SetToolID( m_ID_current_state, DrawPanel->m_PanelDefaultCursor, wxEmptyString );
                   DrawPanel->m_PanelDefaultCursor,
                   wxEmptyString );
    }
    }
}
}


@@ -516,8 +477,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
/* Traces the outline of the search block structures
/* Traces the outline of the search block structures
 * The entire block follows the cursor
 * The entire block follows the cursor
 */
 */
static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
                                     bool erase )
{
{
    BLOCK_SELECTOR* block = &panel->GetScreen()->m_BlockLocate;;
    BLOCK_SELECTOR* block = &panel->GetScreen()->m_BlockLocate;;


@@ -555,9 +515,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
 */
 */
void SaveStructListForPaste( PICKED_ITEMS_LIST& aItemsList )
void SaveStructListForPaste( PICKED_ITEMS_LIST& aItemsList )
{
{
    g_BlockSaveDataList.ClearListAndDeleteItems();      // delete previous
    g_BlockSaveDataList.ClearListAndDeleteItems();   // delete previous saved list, if exists
                                                        // saved list, if
                                                        // exists


    /* save the new list: */
    /* save the new list: */
    ITEM_PICKER item;
    ITEM_PICKER item;
@@ -569,8 +527,7 @@ void SaveStructListForPaste( PICKED_ITEMS_LIST& aItemsList )
    for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
    for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
    {
    {
        /* Make a copy of the original picked item. */
        /* Make a copy of the original picked item. */
        SCH_ITEM* DrawStructCopy = DuplicateStruct(
        SCH_ITEM* DrawStructCopy = DuplicateStruct( (SCH_ITEM*) aItemsList.GetPickedItem( ii ) );
            (SCH_ITEM*) aItemsList.GetPickedItem( ii ) );
        DrawStructCopy->SetParent( NULL );
        DrawStructCopy->SetParent( NULL );
        item.m_PickedItem = DrawStructCopy;
        item.m_PickedItem = DrawStructCopy;
        g_BlockSaveDataList.PushItem( item );
        g_BlockSaveDataList.PushItem( item );
@@ -599,8 +556,7 @@ void WinEDA_SchematicFrame::PasteListOfItems( wxDC* DC )
    for( unsigned ii = 0; ii < g_BlockSaveDataList.GetCount(); ii++ )
    for( unsigned ii = 0; ii < g_BlockSaveDataList.GetCount(); ii++ )
    {
    {
        Struct = DuplicateStruct(
        Struct = DuplicateStruct(
            (SCH_ITEM*) g_BlockSaveDataList.m_ItemsSelection.GetPickedItem(
            (SCH_ITEM*) g_BlockSaveDataList.m_ItemsSelection.GetPickedItem( ii ) );
                ii ) );
        picker.m_PickedItem = Struct;
        picker.m_PickedItem = Struct;
        picklist.PushItem( picker );
        picklist.PushItem( picker );


@@ -621,10 +577,7 @@ void WinEDA_SchematicFrame::PasteListOfItems( wxDC* DC )
    MoveItemsInList( picklist, GetScreen()->m_BlockLocate.m_MoveVector );
    MoveItemsInList( picklist, GetScreen()->m_BlockLocate.m_MoveVector );


    /* clear .m_Flags member for all items */
    /* clear .m_Flags member for all items */
    for( Struct = GetScreen()->EEDrawList;
    GetScreen()->ClearDrawingState();
        Struct != NULL;
        Struct = Struct->Next() )
        Struct->m_Flags = 0;


    OnModify();
    OnModify();


@@ -646,11 +599,7 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
    if( pickedlist->GetCount() == 0 )
    if( pickedlist->GetCount() == 0 )
        return;
        return;


    /* .m_Flags member is used to handle how a wire is exactly selected
    screen->ClearDrawingState();
     * (fully selected, or partially selected by an end point )
     */
    for( Struct = screen->EEDrawList; Struct != NULL; Struct = Struct->Next() )
        Struct->m_Flags = 0;


    for( unsigned ii = 0; ii < pickedlist->GetCount(); ii++ )
    for( unsigned ii = 0; ii < pickedlist->GetCount(); ii++ )
    {
    {
@@ -724,7 +673,8 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
            SCH_SHEET* sheet = (SCH_SHEET*) Struct;
            SCH_SHEET* sheet = (SCH_SHEET*) Struct;


            // Add all pins sheets of a selected hierarchical sheet to the list
            // Add all pins sheets of a selected hierarchical sheet to the list
            BOOST_FOREACH( SCH_SHEET_PIN label, sheet->GetSheetPins() ) {
            BOOST_FOREACH( SCH_SHEET_PIN label, sheet->GetSheetPins() )
            {
                AddPickedItem( screen, label.m_Pos );
                AddPickedItem( screen, label.m_Pos );
            }
            }
        }
        }
+64 −0
Original line number Original line Diff line number Diff line
@@ -898,6 +898,70 @@ void SCH_SHEET::renumberLabels()
}
}




void SCH_SHEET::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
{
    // Using BOOST_FOREACH here creates problems (bad pointer value to pinsheet).
    // I do not know why.
    for( unsigned ii = 0; ii < GetSheetPins().size(); ii++ )
    {
        SCH_SHEET_PIN &pinsheet = GetSheetPins()[ii];

        wxCHECK2_MSG( pinsheet.Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE, continue,
                      wxT( "Invalid item in schematic sheet pin list.  Bad programmer!" ) );

        pinsheet.GetEndPoints( aItemList );
    }
}


bool SCH_SHEET::IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList )
{
    bool currentState = IsDangling();

    BOOST_FOREACH( SCH_SHEET_PIN& pinsheet, GetSheetPins() )
    {
        pinsheet.IsDanglingStateChanged( aItemList );
    }

    return currentState != IsDangling();
}


bool SCH_SHEET::IsDangling() const
{
    // If any hierarchical label in the sheet is dangling, then the sheet is dangling.
    for( size_t i = 0; i < GetSheetPins().size(); i++ )
    {
        if( GetSheetPins()[i].IsDangling() )
            return true;
    }

    return false;
}


bool SCH_SHEET::IsSelectStateChanged( const wxRect& aRect )
{
    bool previousState = IsSelected();

    EDA_Rect boundingBox = GetBoundingBox();

    if( aRect.Intersects( boundingBox ) )
        m_Flags |= SELECTED;
    else
        m_Flags &= ~SELECTED;

    return previousState != IsSelected();
}


void SCH_SHEET::GetConnectionPoints( vector< wxPoint >& aPoints ) const
{
    for( size_t i = 0; i < GetSheetPins().size(); i++ )
        aPoints.push_back( GetSheetPins()[i].m_Pos );
}


#if defined(DEBUG)
#if defined(DEBUG)


void SCH_SHEET::Show( int nestLevel, std::ostream& os )
void SCH_SHEET::Show( int nestLevel, std::ostream& os )
+31 −15
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@ extern SCH_SHEET* g_RootSheet;
 * the sheet, it corresponds to a hierarchical label.
 * the sheet, it corresponds to a hierarchical label.
 */
 */


//class SCH_SHEET_PIN : public SCH_ITEM, public EDA_TextStruct
class SCH_SHEET_PIN : public SCH_HIERLABEL
class SCH_SHEET_PIN : public SCH_HIERLABEL
{
{
private:
private:
@@ -168,8 +167,9 @@ public:
     * @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
     * @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
     * @return True if this item matches the search criteria.
     * @return True if this item matches the search criteria.
     */
     */
    virtual bool Matches( wxFindReplaceData& aSearchData,
    virtual bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
                          void* aAuxData, wxPoint * aFindLocation );

    virtual void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList );
};
};




@@ -251,6 +251,11 @@ public:


    SCH_SHEET_PIN_LIST& GetSheetPins() { return m_labels; }
    SCH_SHEET_PIN_LIST& GetSheetPins() { return m_labels; }


    SCH_SHEET_PIN_LIST& GetSheetPins() const
    {
        return const_cast< SCH_SHEET_PIN_LIST& >( m_labels );
    }

    /**
    /**
     * Remove a sheet label from this sheet.
     * Remove a sheet label from this sheet.
     *
     *
@@ -412,7 +417,9 @@ public:
    virtual void Move( const wxPoint& aMoveVector )
    virtual void Move( const wxPoint& aMoveVector )
    {
    {
        m_Pos += aMoveVector;
        m_Pos += aMoveVector;
        BOOST_FOREACH( SCH_SHEET_PIN & label, m_labels ) {

        BOOST_FOREACH( SCH_SHEET_PIN & label, m_labels )
        {
            label.Move( aMoveVector );
            label.Move( aMoveVector );
        }
        }
    }
    }
@@ -437,8 +444,7 @@ public:
     *
     *
     * @return True if this item matches the search criteria.
     * @return True if this item matches the search criteria.
     */
     */
    virtual bool Matches( wxFindReplaceData& aSearchData,
    virtual bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
                          void* aAuxData, wxPoint * aFindLocation );


    /**
    /**
     * Resize this sheet to aSize and adjust all of the labels accordingly.
     * Resize this sheet to aSize and adjust all of the labels accordingly.
@@ -457,6 +463,16 @@ public:
     */
     */
    wxPoint GetFileNamePosition ();
    wxPoint GetFileNamePosition ();


    virtual void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList );

    virtual bool IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList );

    virtual bool IsDangling() const;

    virtual bool IsSelectStateChanged( const wxRect& aRect );

    virtual void GetConnectionPoints( vector< wxPoint >& aPoints ) const;

#if defined(DEBUG)
#if defined(DEBUG)


    // comment inherited by Doxygen from Base_Struct
    // comment inherited by Doxygen from Base_Struct
Loading