2009-11-04 20:46:53 +00:00
|
|
|
/*******************/
|
|
|
|
/* onleftclick.cpp */
|
|
|
|
/*******************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "common.h"
|
2009-09-22 12:27:57 +00:00
|
|
|
#include "eeschema_id.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "class_drawpanel.h"
|
|
|
|
#include "confirm.h"
|
2010-11-10 15:30:12 +00:00
|
|
|
#include "class_sch_screen.h"
|
|
|
|
#include "wxEeschemaStruct.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "general.h"
|
|
|
|
#include "protos.h"
|
2010-12-21 15:13:09 +00:00
|
|
|
#include "sch_bus_entry.h"
|
2010-11-11 21:10:27 +00:00
|
|
|
#include "sch_text.h"
|
|
|
|
#include "sch_marker.h"
|
2011-01-12 21:47:54 +00:00
|
|
|
#include "sch_junction.h"
|
2010-12-21 15:13:09 +00:00
|
|
|
#include "sch_line.h"
|
|
|
|
#include "sch_no_connect.h"
|
2010-11-11 21:10:27 +00:00
|
|
|
#include "sch_component.h"
|
|
|
|
#include "sch_sheet.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-09-25 18:49:04 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
static wxArrayString s_CmpNameList;
|
|
|
|
static wxArrayString s_PowerNameList;
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
/* Process the command triggers by the left button of the mouse when a tool
|
|
|
|
* is already selected.
|
2007-08-20 01:20:48 +00:00
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2010-08-28 18:02:24 +00:00
|
|
|
SCH_ITEM* DrawStruct = GetScreen()->GetCurItem();
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( m_ID_current_state == 0 ) || ( DrawStruct && DrawStruct->m_Flags ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-12 21:47:54 +00:00
|
|
|
m_itemToRepeat = NULL;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
if( DrawStruct && DrawStruct->m_Flags )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2007-09-01 12:00:30 +00:00
|
|
|
switch( DrawStruct->Type() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_LABEL_T:
|
|
|
|
case SCH_GLOBAL_LABEL_T:
|
|
|
|
case SCH_HIERARCHICAL_LABEL_T:
|
|
|
|
case SCH_TEXT_T:
|
|
|
|
case SCH_SHEET_LABEL_T:
|
|
|
|
case SCH_SHEET_T:
|
|
|
|
case SCH_BUS_ENTRY_T:
|
|
|
|
case SCH_JUNCTION_T:
|
|
|
|
case SCH_COMPONENT_T:
|
|
|
|
case SCH_FIELD_T:
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawStruct->Place( this, DC );
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( NULL );
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
return;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_SCREEN_T:
|
|
|
|
DisplayError( this, wxT( "OnLeftClick err: unexpected type for Place" ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawStruct->m_Flags = 0;
|
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_LINE_T: // May already be drawing segment.
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2010-08-28 18:02:24 +00:00
|
|
|
{
|
|
|
|
wxString msg;
|
2010-12-08 20:12:46 +00:00
|
|
|
msg.Printf( wxT( "SCH_EDIT_FRAME::OnLeftClick err: m_Flags != 0, itmetype %d" ),
|
2010-08-28 18:02:24 +00:00
|
|
|
DrawStruct->Type());
|
|
|
|
DisplayError( this, msg );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawStruct->m_Flags = 0;
|
|
|
|
break;
|
|
|
|
}
|
2010-08-28 18:02:24 +00:00
|
|
|
}
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-04-06 14:09:52 +00:00
|
|
|
DrawStruct = SchematicGeneralLocateAndDisplay( true );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch( m_ID_current_state )
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_NO_SELECT_BUTT:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_HIERARCHY_PUSH_POP_BUTT:
|
|
|
|
if( DrawStruct && DrawStruct->m_Flags )
|
|
|
|
break;
|
|
|
|
DrawStruct = SchematicGeneralLocateAndDisplay();
|
2010-12-10 19:47:44 +00:00
|
|
|
if( DrawStruct && ( DrawStruct->Type() == SCH_SHEET_T ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2009-11-04 20:46:53 +00:00
|
|
|
InstallNextScreen( (SCH_SHEET*) DrawStruct );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
else
|
2008-02-12 21:12:46 +00:00
|
|
|
InstallPreviousSheet();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_NOCONN_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2011-01-12 21:47:54 +00:00
|
|
|
m_itemToRepeat = CreateNewNoConnectStruct( DC );
|
|
|
|
GetScreen()->SetCurItem( m_itemToRepeat );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
|
|
|
}
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_JUNCTION_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2011-01-12 21:47:54 +00:00
|
|
|
m_itemToRepeat = CreateNewJunctionStruct( DC, GetScreen()->m_Curseur, TRUE );
|
|
|
|
GetScreen()->SetCurItem( m_itemToRepeat );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
|
|
|
}
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_WIRETOBUS_ENTRY_BUTT:
|
|
|
|
case ID_BUSTOBUS_ENTRY_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-12-10 19:47:44 +00:00
|
|
|
DrawStruct = CreateBusEntry( DC,
|
|
|
|
(m_ID_current_state == ID_WIRETOBUS_ENTRY_BUTT) ?
|
|
|
|
WIRE_TO_BUS : BUS_TO_BUS );
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( DrawStruct );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( NULL );
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_SCHEMATIC_DELETE_ITEM_BUTT:
|
|
|
|
LocateAndDeleteItem( this, DC );
|
2010-02-18 20:07:29 +00:00
|
|
|
OnModify( );
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( NULL );
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_WIRE_BUTT:
|
|
|
|
BeginSegment( DC, LAYER_WIRE );
|
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_BUS_BUTT:
|
|
|
|
BeginSegment( DC, LAYER_BUS );
|
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_LINE_COMMENT_BUTT:
|
|
|
|
BeginSegment( DC, LAYER_NOTES );
|
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TEXT_COMMENT_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( CreateNewText( DC, LAYER_NOTES ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_LABEL_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( CreateNewText( DC, LAYER_LOCLABEL ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_GLABEL_BUTT:
|
2008-03-16 04:47:43 +00:00
|
|
|
case ID_HIERLABEL_BUTT:
|
2007-08-20 01:20:48 +00:00
|
|
|
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
|
|
|
|
{
|
2008-03-16 04:47:43 +00:00
|
|
|
if(m_ID_current_state == ID_GLABEL_BUTT)
|
|
|
|
GetScreen()->SetCurItem( CreateNewText( DC, LAYER_GLOBLABEL ) );
|
|
|
|
if(m_ID_current_state == ID_HIERLABEL_BUTT)
|
|
|
|
GetScreen()->SetCurItem( CreateNewText( DC, LAYER_HIERLABEL ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
case ID_SHEET_SYMBOL_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2008-03-16 04:47:43 +00:00
|
|
|
GetScreen()->SetCurItem( CreateSheet( DC ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-29 13:10:36 +00:00
|
|
|
case ID_IMPORT_HLABEL_BUTT:
|
2007-08-20 01:20:48 +00:00
|
|
|
case ID_SHEET_LABEL_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawStruct = SchematicGeneralLocateAndDisplay();
|
|
|
|
|
|
|
|
if( DrawStruct == NULL )
|
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
if( (DrawStruct->Type() == SCH_SHEET_T)
|
2007-08-20 01:20:48 +00:00
|
|
|
&& (DrawStruct->m_Flags == 0) )
|
|
|
|
{
|
2009-07-29 13:10:36 +00:00
|
|
|
if( m_ID_current_state == ID_IMPORT_HLABEL_BUTT )
|
2010-12-10 19:47:44 +00:00
|
|
|
GetScreen()->SetCurItem( Import_PinSheet( (SCH_SHEET*) DrawStruct, DC ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
else
|
2010-12-10 19:47:44 +00:00
|
|
|
GetScreen()->SetCurItem( Create_PinSheet( (SCH_SHEET*) DrawStruct, DC ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
2010-12-10 19:47:44 +00:00
|
|
|
else if( (DrawStruct->Type() == SCH_SHEET_LABEL_T) && (DrawStruct->m_Flags != 0) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_COMPONENT_BUTT:
|
|
|
|
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
|
|
|
|
{
|
2010-12-10 19:47:44 +00:00
|
|
|
GetScreen()->SetCurItem( Load_Component( DC, wxEmptyString, s_CmpNameList, TRUE ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_PLACE_POWER_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-12-10 19:47:44 +00:00
|
|
|
GetScreen()->SetCurItem( Load_Component( DC, wxT( "power" ), s_PowerNameList, FALSE ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->m_AutoPAN_Request = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DrawStruct->Place( this, DC );
|
|
|
|
DrawPanel->m_AutoPAN_Request = FALSE;
|
2011-01-21 19:30:59 +00:00
|
|
|
GetScreen()->TestDanglingEnds();
|
2008-03-16 04:47:43 +00:00
|
|
|
DrawPanel->Refresh( TRUE );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
|
2010-12-08 20:12:46 +00:00
|
|
|
wxString msg( wxT( "SCH_EDIT_FRAME::OnLeftClick error state " ) );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
|
|
|
msg << m_ID_current_state;
|
|
|
|
DisplayError( this, msg );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-11-12 16:36:43 +00:00
|
|
|
/**
|
|
|
|
* Function OnLeftDClick
|
2009-01-31 18:08:47 +00:00
|
|
|
* called on a double click event from the drawpanel mouse handler
|
|
|
|
* if an editable item is found (text, component)
|
|
|
|
* Call the suitable dialog editor.
|
2009-11-04 20:46:53 +00:00
|
|
|
* Id a create command is in progress:
|
2009-01-31 18:08:47 +00:00
|
|
|
* validate and finish the command
|
2007-08-20 01:20:48 +00:00
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
void SCH_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
|
2009-11-04 20:46:53 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2010-12-08 20:12:46 +00:00
|
|
|
EDA_ITEM* DrawStruct = GetScreen()->GetCurItem();
|
|
|
|
wxPoint pos = GetPosition();
|
2007-08-20 01:20:48 +00:00
|
|
|
|
|
|
|
switch( m_ID_current_state )
|
|
|
|
{
|
|
|
|
case 0:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
DrawStruct = SchematicGeneralLocateAndDisplay();
|
|
|
|
}
|
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags != 0 ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
switch( DrawStruct->Type() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_SHEET_T:
|
2009-11-04 20:46:53 +00:00
|
|
|
InstallNextScreen( (SCH_SHEET*) DrawStruct );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_COMPONENT_T:
|
2008-03-20 01:50:21 +00:00
|
|
|
InstallCmpeditFrame( this, pos, (SCH_COMPONENT*) DrawStruct );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->MouseToCursorSchema();
|
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_TEXT_T:
|
|
|
|
case SCH_LABEL_T:
|
|
|
|
case SCH_GLOBAL_LABEL_T:
|
|
|
|
case SCH_HIERARCHICAL_LABEL_T:
|
2009-12-27 14:01:21 +00:00
|
|
|
EditSchematicText( (SCH_TEXT*) DrawStruct );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_FIELD_T:
|
2009-12-02 21:44:03 +00:00
|
|
|
EditCmpFieldText( (SCH_FIELD*) DrawStruct, DC );
|
2007-08-20 01:20:48 +00:00
|
|
|
DrawPanel->MouseToCursorSchema();
|
|
|
|
break;
|
|
|
|
|
2010-12-10 19:47:44 +00:00
|
|
|
case SCH_MARKER_T:
|
2009-12-02 21:44:03 +00:00
|
|
|
( (SCH_MARKER*) DrawStruct )->DisplayMarkerInfo( this );
|
2009-07-09 17:02:15 +00:00
|
|
|
break;
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
break;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
|
|
|
case ID_BUS_BUTT:
|
|
|
|
case ID_WIRE_BUTT:
|
|
|
|
case ID_LINE_COMMENT_BUTT:
|
2009-11-04 20:46:53 +00:00
|
|
|
if( DrawStruct && ( DrawStruct->m_Flags & IS_NEW ) )
|
2007-08-20 01:20:48 +00:00
|
|
|
EndSegment( DC );
|
|
|
|
break;
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|