2011-10-28 13:43:37 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
|
|
|
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
|
|
|
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2011-10-07 14:41:30 +00:00
|
|
|
/**
|
|
|
|
* @file block_libedit.cpp
|
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <gr_basic.h>
|
|
|
|
#include <class_drawpanel.h>
|
|
|
|
#include <confirm.h>
|
|
|
|
|
|
|
|
#include <general.h>
|
|
|
|
#include <class_library.h>
|
|
|
|
#include <protos.h>
|
|
|
|
#include <libeditframe.h>
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
2011-02-03 19:27:28 +00:00
|
|
|
static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
|
|
|
bool aErase );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-11-19 16:28:46 +00:00
|
|
|
int LIB_EDIT_FRAME::ReturnBlockCommand( int key )
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-08-20 01:20:48 +00:00
|
|
|
int cmd;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
switch( key )
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
cmd = key & 0x255;
|
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-10-28 13:43:37 +00:00
|
|
|
case -1:
|
2007-08-20 01:20:48 +00:00
|
|
|
cmd = BLOCK_PRESELECT_MOVE;
|
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case 0:
|
|
|
|
cmd = BLOCK_MOVE;
|
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case GR_KB_ALT:
|
|
|
|
case GR_KB_SHIFT:
|
|
|
|
cmd = BLOCK_COPY;
|
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case GR_KB_SHIFTCTRL:
|
|
|
|
cmd = BLOCK_DELETE;
|
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case GR_KB_CTRL:
|
2009-08-12 10:40:01 +00:00
|
|
|
cmd = BLOCK_MIRROR_Y;
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case MOUSE_MIDDLE:
|
|
|
|
cmd = BLOCK_ZOOM;
|
|
|
|
break;
|
|
|
|
}
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
return cmd;
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-19 16:28:46 +00:00
|
|
|
bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2009-09-25 18:49:04 +00:00
|
|
|
int ItemCount = 0;
|
2010-11-13 11:02:24 +00:00
|
|
|
int nextCmd = false;
|
2009-09-29 18:38:21 +00:00
|
|
|
wxPoint pt;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-07-25 04:53:39 +00:00
|
|
|
if( GetScreen()->m_BlockLocate.GetCount() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2012-03-26 23:47:08 +00:00
|
|
|
BLOCK_STATE_T state = GetScreen()->m_BlockLocate.GetState();
|
|
|
|
BLOCK_COMMAND_T command = GetScreen()->m_BlockLocate.GetCommand();
|
2011-12-29 20:11:42 +00:00
|
|
|
m_canvas->CallEndMouseCapture( DC );
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( state );
|
|
|
|
GetScreen()->m_BlockLocate.SetCommand( command );
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
2011-02-11 20:48:13 +00:00
|
|
|
GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
|
|
|
|
GetScreen()->m_BlockLocate.GetBottom() ) );
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->MoveCursorToCrossHair();
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
switch( GetScreen()->m_BlockLocate.GetCommand() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
case BLOCK_IDLE:
|
|
|
|
DisplayError( this, wxT( "Error in HandleBlockPLace" ) );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_DRAG: /* Drag */
|
|
|
|
case BLOCK_MOVE: /* Move */
|
|
|
|
case BLOCK_COPY: /* Copy */
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
|
2010-10-20 20:24:26 +00:00
|
|
|
m_unit, m_convert,
|
2011-10-28 13:43:37 +00:00
|
|
|
m_editPinsPerPartOrConvert );
|
2009-09-25 18:49:04 +00:00
|
|
|
if( ItemCount )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-11-13 11:02:24 +00:00
|
|
|
nextCmd = true;
|
2011-02-11 20:48:13 +00:00
|
|
|
|
2011-12-22 13:28:11 +00:00
|
|
|
if( m_canvas->IsMouseCaptured() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2011-12-29 20:11:42 +00:00
|
|
|
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
|
|
|
|
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
|
|
|
|
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
2011-02-11 20:48:13 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE );
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->Refresh( true );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
2010-11-13 11:02:24 +00:00
|
|
|
nextCmd = true;
|
2011-12-29 20:11:42 +00:00
|
|
|
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_DELETE: /* Delete */
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
|
2010-10-20 20:24:26 +00:00
|
|
|
m_unit, m_convert,
|
2011-10-28 13:43:37 +00:00
|
|
|
m_editPinsPerPartOrConvert );
|
2009-09-25 18:49:04 +00:00
|
|
|
if( ItemCount )
|
|
|
|
SaveCopyInUndoList( m_component );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
2011-01-23 12:32:33 +00:00
|
|
|
{
|
2009-10-10 17:27:53 +00:00
|
|
|
m_component->DeleteSelectedItems();
|
2011-01-23 12:32:33 +00:00
|
|
|
OnModify();
|
|
|
|
}
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_SAVE: /* Save */
|
|
|
|
case BLOCK_PASTE:
|
2009-08-12 10:40:01 +00:00
|
|
|
case BLOCK_FLIP:
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
2011-05-20 18:29:35 +00:00
|
|
|
case BLOCK_ROTATE:
|
|
|
|
case BLOCK_MIRROR_X:
|
2009-08-12 10:40:01 +00:00
|
|
|
case BLOCK_MIRROR_Y:
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
ItemCount = m_component->SelectItems( GetScreen()->m_BlockLocate,
|
2010-10-20 20:24:26 +00:00
|
|
|
m_unit, m_convert,
|
2011-10-28 13:43:37 +00:00
|
|
|
m_editPinsPerPartOrConvert );
|
2009-09-25 18:49:04 +00:00
|
|
|
if( ItemCount )
|
|
|
|
SaveCopyInUndoList( m_component );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-09-29 18:38:21 +00:00
|
|
|
pt = GetScreen()->m_BlockLocate.Centre();
|
|
|
|
pt.y *= -1;
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
2011-01-23 12:32:33 +00:00
|
|
|
{
|
|
|
|
OnModify();
|
2012-03-26 23:47:08 +00:00
|
|
|
int block_cmd = GetScreen()->m_BlockLocate.GetCommand();
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2011-05-20 18:29:35 +00:00
|
|
|
if( block_cmd == BLOCK_MIRROR_Y)
|
|
|
|
m_component->MirrorSelectedItemsH( pt );
|
|
|
|
else if( block_cmd == BLOCK_MIRROR_X)
|
|
|
|
m_component->MirrorSelectedItemsV( pt );
|
|
|
|
else if( block_cmd == BLOCK_ROTATE)
|
|
|
|
m_component->RotateSelectedItems( pt );
|
2011-01-23 12:32:33 +00:00
|
|
|
}
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_ZOOM: /* Window Zoom */
|
2009-07-25 04:53:39 +00:00
|
|
|
Window_Zoom( GetScreen()->m_BlockLocate );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_ABORT:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_SELECT_ITEMS_ONLY:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-11-13 11:02:24 +00:00
|
|
|
if( ! nextCmd )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2012-03-26 23:47:08 +00:00
|
|
|
if( GetScreen()->m_BlockLocate.GetCommand() != BLOCK_SELECT_ITEMS_ONLY && m_component )
|
2011-02-11 20:48:13 +00:00
|
|
|
m_component->ClearSelectedItems();
|
2009-09-25 18:49:04 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( STATE_NO_BLOCK );
|
|
|
|
GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
|
2007-08-20 01:20:48 +00:00
|
|
|
GetScreen()->SetCurItem( NULL );
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString,
|
|
|
|
false );
|
|
|
|
m_canvas->Refresh( true );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
2010-11-13 11:02:24 +00:00
|
|
|
return nextCmd;
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-19 16:28:46 +00:00
|
|
|
void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2009-09-29 18:38:21 +00:00
|
|
|
wxPoint pt;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2011-12-22 13:28:11 +00:00
|
|
|
if( !m_canvas->IsMouseCaptured() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2011-02-11 20:48:13 +00:00
|
|
|
DisplayError( this, wxT( "HandleBlockPLace : m_mouseCaptureCallback = NULL" ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_STOP );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
switch( GetScreen()->m_BlockLocate.GetCommand() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
case BLOCK_IDLE:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_DRAG: /* Drag */
|
|
|
|
case BLOCK_MOVE: /* Move */
|
|
|
|
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
2009-07-25 04:53:39 +00:00
|
|
|
GetScreen()->m_BlockLocate.ClearItemsList();
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
SaveCopyInUndoList( m_component );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
pt = GetScreen()->m_BlockLocate.GetMoveVector();
|
2009-09-29 18:38:21 +00:00
|
|
|
pt.y *= -1;
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
m_component->MoveSelectedItems( pt );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->Refresh( true );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_COPY: /* Copy */
|
2009-07-25 04:53:39 +00:00
|
|
|
GetScreen()->m_BlockLocate.ClearItemsList();
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
SaveCopyInUndoList( m_component );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
pt = GetScreen()->m_BlockLocate.GetMoveVector();
|
2009-09-29 18:38:21 +00:00
|
|
|
pt.y *= -1;
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
m_component->CopySelectedItems( pt );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
case BLOCK_PASTE: /* Paste (recopy the last block saved) */
|
2009-07-25 04:53:39 +00:00
|
|
|
GetScreen()->m_BlockLocate.ClearItemsList();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2011-05-20 18:29:35 +00:00
|
|
|
case BLOCK_ROTATE: // Invert by popup menu, from block move
|
|
|
|
case BLOCK_MIRROR_X: // Invert by popup menu, from block move
|
|
|
|
case BLOCK_MIRROR_Y: // Invert by popup menu, from block move
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
|
|
|
SaveCopyInUndoList( m_component );
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-09-29 18:38:21 +00:00
|
|
|
pt = GetScreen()->m_BlockLocate.Centre();
|
|
|
|
pt.y *= -1;
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2009-10-10 17:27:53 +00:00
|
|
|
if ( m_component )
|
2011-05-20 18:29:35 +00:00
|
|
|
{
|
2012-03-26 23:47:08 +00:00
|
|
|
int block_cmd = GetScreen()->m_BlockLocate.GetCommand();
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2011-05-20 18:29:35 +00:00
|
|
|
if( block_cmd == BLOCK_MIRROR_Y)
|
|
|
|
m_component->MirrorSelectedItemsH( pt );
|
|
|
|
else if( block_cmd == BLOCK_MIRROR_X)
|
|
|
|
m_component->MirrorSelectedItemsV( pt );
|
|
|
|
else if( block_cmd == BLOCK_ROTATE )
|
|
|
|
m_component->RotateSelectedItems( pt );
|
|
|
|
}
|
2011-10-28 13:43:37 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BLOCK_ZOOM: // Handled by HandleBlockEnd
|
|
|
|
case BLOCK_DELETE:
|
|
|
|
case BLOCK_SAVE:
|
|
|
|
case BLOCK_ABORT:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-02-18 20:07:29 +00:00
|
|
|
OnModify();
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
GetScreen()->m_BlockLocate.SetState( STATE_NO_BLOCK );
|
|
|
|
GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
|
2007-08-20 01:20:48 +00:00
|
|
|
GetScreen()->SetCurItem( NULL );
|
2011-12-22 13:28:11 +00:00
|
|
|
m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString, false );
|
|
|
|
m_canvas->Refresh( true );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-09-04 18:57:37 +00:00
|
|
|
/*
|
2009-11-03 13:26:31 +00:00
|
|
|
* Traces the outline of the search block structures
|
|
|
|
* The entire block follows the cursor
|
2007-08-20 01:20:48 +00:00
|
|
|
*/
|
2011-02-03 19:27:28 +00:00
|
|
|
void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
|
|
|
bool aErase )
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2012-03-26 23:47:08 +00:00
|
|
|
BLOCK_SELECTOR* block;
|
2011-02-03 19:27:28 +00:00
|
|
|
BASE_SCREEN* screen = aPanel->GetScreen();
|
2007-08-20 01:20:48 +00:00
|
|
|
wxPoint move_offset;
|
2012-03-26 23:47:08 +00:00
|
|
|
block = &screen->m_BlockLocate;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2011-02-03 19:27:28 +00:00
|
|
|
LIB_EDIT_FRAME* parent = ( LIB_EDIT_FRAME* ) aPanel->GetParent();
|
2009-09-22 12:27:57 +00:00
|
|
|
wxASSERT( parent != NULL );
|
|
|
|
|
2009-09-25 18:49:04 +00:00
|
|
|
LIB_COMPONENT* component = parent->GetComponent();
|
2009-09-22 12:27:57 +00:00
|
|
|
|
|
|
|
if( component == NULL )
|
|
|
|
return;
|
|
|
|
|
2009-09-25 18:49:04 +00:00
|
|
|
int unit = parent->GetUnit();
|
|
|
|
int convert = parent->GetConvert();
|
|
|
|
|
2011-02-03 19:27:28 +00:00
|
|
|
if( aErase )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2012-03-26 23:47:08 +00:00
|
|
|
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
component->Draw( aPanel, aDC, block->GetMoveVector(), unit, convert,
|
2010-10-20 20:24:26 +00:00
|
|
|
g_XorMode, -1, DefaultTransform, true, true, true );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
/* Repaint new view */
|
2012-03-26 23:47:08 +00:00
|
|
|
block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2011-02-03 19:27:28 +00:00
|
|
|
GRSetDrawMode( aDC, g_XorMode );
|
2012-03-26 23:47:08 +00:00
|
|
|
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2012-03-26 23:47:08 +00:00
|
|
|
component->Draw( aPanel, aDC, block->GetMoveVector(), unit, convert,
|
2010-10-20 20:24:26 +00:00
|
|
|
g_XorMode, -1, DefaultTransform, true, true, true );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|