Commit 5c790f50 authored by charras's avatar charras

Added dialog box to edit graphic items

parent 57d9096a
...@@ -5,6 +5,14 @@ Started 2007-June-11 ...@@ -5,6 +5,14 @@ Started 2007-June-11
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.
2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++Pcbnew:
Added dialog box to edit graphic items (graphic segments, circles, arcs)
properties
2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
++All ++All
......
...@@ -209,8 +209,10 @@ public: ...@@ -209,8 +209,10 @@ public:
void Place_Module( MODULE* module, wxDC* DC ); void Place_Module( MODULE* module, wxDC* DC );
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule, void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule,
wxDC* DC, const wxPoint& pos ); wxDC* DC, const wxPoint& pos );
// Graphic items edition:
void InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxDC* aDC);
// module texts // module texts
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ); void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
void DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC ); void DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC );
void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ); void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
...@@ -661,7 +663,6 @@ public: ...@@ -661,7 +663,6 @@ public:
// Graphic segments type DRAWSEGMENT handling: // Graphic segments type DRAWSEGMENT handling:
DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC ); DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC );
void End_Edge( DRAWSEGMENT* Segment, wxDC* DC ); void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Drawing_SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC );
void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC ); void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC ); void Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC );
......
No preview for this file type
This diff is collapsed.
...@@ -56,6 +56,8 @@ set(PCBNEW_SRCS ...@@ -56,6 +56,8 @@ set(PCBNEW_SRCS
dialog_general_options.cpp dialog_general_options.cpp
dialog_general_options_BoardEditor_base.cpp dialog_general_options_BoardEditor_base.cpp
# dialog_graphic_items_options.cpp # dialog_graphic_items_options.cpp
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
# dialog_initpcb.cpp # dialog_initpcb.cpp
# dialog_netlist.cpp # dialog_netlist.cpp
dialog_pcb_text_properties.cpp dialog_pcb_text_properties.cpp
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
class DRAWSEGMENT : public BOARD_ITEM class DRAWSEGMENT : public BOARD_ITEM
{ {
public: public:
int m_Width; // 0 = line. if > 0 = tracks, bus ... int m_Width; // thickness of lines ...
wxPoint m_Start; // Line start point wxPoint m_Start; // Line start point
wxPoint m_End; // Line end point wxPoint m_End; // Line end point
......
/******************************************************/ /*******************************************************************/
/* editpads.cpp: Pad editing functions and dialog box */ /* dialog_pad_properties.cpp: Pad editing functions and dialog box */
/******************************************************/ /* see also dialog_pad_properties.xxx (built with wxFormBuilder) */
/*******************************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
...@@ -514,7 +515,10 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event ) ...@@ -514,7 +515,10 @@ void DialogPadProperties::PadPropertiesAccept( wxCommandEvent& event )
if( m_CurrentPad->GetNetname() != Current_PadNetName ) if( m_CurrentPad->GetNetname() != Current_PadNetName )
{ {
if( Current_PadNetName.IsEmpty() ) if( Current_PadNetName.IsEmpty() )
{
m_CurrentPad->SetNet( 0 ); m_CurrentPad->SetNet( 0 );
m_CurrentPad->SetNetname( Current_PadNetName );
}
else else
{ {
const EQUIPOT* net = m_Parent->m_Pcb->FindNet( Current_PadNetName ); const EQUIPOT* net = m_Parent->m_Pcb->FindNet( Current_PadNetName );
......
...@@ -842,7 +842,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -842,7 +842,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_PCB_EDIT_DRAWING: case ID_POPUP_PCB_EDIT_DRAWING:
Drawing_SetNewWidth( (DRAWSEGMENT*) GetCurItem(), &dc ); InstallGraphicItemPropertiesDialog( (DRAWSEGMENT*)GetCurItem(), &dc);
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
......
...@@ -126,31 +126,6 @@ void WinEDA_PcbFrame::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC ) ...@@ -126,31 +126,6 @@ void WinEDA_PcbFrame::Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC )
} }
/*************************************************************************/
void WinEDA_PcbFrame::Drawing_SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC )
/*************************************************************************/
/* Met a la largeur courante le segment pointe part la souris
*/
{
if( DrawSegm == NULL )
return;
DrawSegm->Draw( DrawPanel, DC, GR_XOR );
if( DrawSegm->GetLayer() == EDGE_N )
DrawSegm->m_Width = g_DesignSettings.m_EdgeSegmentWidth;
else
DrawSegm->m_Width = g_DesignSettings.m_DrawSegmentWidth;
DrawSegm->Draw( DrawPanel, DC, GR_OR );
DrawSegm->Display_Infos( this );
GetScreen()->SetModify();
}
/******************************************************************************/ /******************************************************************************/
void WinEDA_PcbFrame::Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC ) void WinEDA_PcbFrame::Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC )
/******************************************************************************/ /******************************************************************************/
......
...@@ -28,6 +28,8 @@ OBJECTS= $(TARGET).o classpcb.o\ ...@@ -28,6 +28,8 @@ OBJECTS= $(TARGET).o classpcb.o\
dialog_freeroute_exchange.o\ dialog_freeroute_exchange.o\
modedit_undo_redo.o\ modedit_undo_redo.o\
block_module_editor.o\ block_module_editor.o\
dialog_graphic_item_properties.o\
dialog_graphic_item_properties_base.o\
dialog_pad_properties.o\ dialog_pad_properties.o\
dialog_pad_properties_base.o\ dialog_pad_properties_base.o\
dialog_pcb_text_properties.o\ dialog_pcb_text_properties.o\
......
...@@ -391,13 +391,19 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -391,13 +391,19 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
case TYPE_COTATION:
Install_Edit_Cotation( (COTATION*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_TEXTE_MODULE: case TYPE_TEXTE_MODULE:
InstallTextModOptionsFrame( (TEXTE_MODULE*) DrawStruct, &dc, pos ); InstallTextModOptionsFrame( (TEXTE_MODULE*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
case TYPE_DRAWSEGMENT: case TYPE_DRAWSEGMENT:
break; InstallGraphicItemPropertiesDialog((DRAWSEGMENT*)DrawStruct, &dc);
break;
case TYPE_ZONE_CONTAINER: case TYPE_ZONE_CONTAINER:
if( DrawStruct->m_Flags ) if( DrawStruct->m_Flags )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment