Commit 5a904e46 authored by charras's avatar charras

Solved kbool lib compil problem under Windows and wxWidgets shared version

Pcbnew: Add position edition in footprint dialog edition
parent c614d668
...@@ -92,6 +92,7 @@ void InitKiCadAbout(wxAboutDialogInfo& info) ...@@ -92,6 +92,7 @@ void InitKiCadAbout(wxAboutDialogInfo& info)
/* Add developers */ /* Add developers */
info.AddDeveloper(wxT("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>")); info.AddDeveloper(wxT("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
info.AddDeveloper(SetMsg(wxT("Dick Hollenbeck <dick@softplc.com>"))); info.AddDeveloper(SetMsg(wxT("Dick Hollenbeck <dick@softplc.com>")));
info.AddDeveloper(SetMsg(wxT("kbool library: http://boolean.klaasholwerda.nl/bool.html")));
/* Add document writers */ /* Add document writers */
info.AddDocWriter(wxT("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>")); info.AddDocWriter(wxT("Jean-Pierre Charras <jean-pierre.charras@inpg.fr>"));
......
...@@ -168,6 +168,8 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions ...@@ -168,6 +168,8 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
wxBoxSizer* PropLeftSizer; wxBoxSizer* PropLeftSizer;
wxBoxSizer* PropRightSizer; wxBoxSizer* PropRightSizer;
wxString msg; wxString msg;
wxStaticText* XPositionStatic = new wxStaticText(m_PanelProperties, -1, _("X"));
wxStaticText* YPositionStatic = new wxStaticText(m_PanelProperties, -1, _("Y"));
/* Create a sizer for controls in the left column */ /* Create a sizer for controls in the left column */
PropLeftSizer = new wxBoxSizer( wxVERTICAL ); PropLeftSizer = new wxBoxSizer( wxVERTICAL );
...@@ -186,6 +188,28 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions ...@@ -186,6 +188,28 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
_( "Edit Module" ) ); _( "Edit Module" ) );
Button->SetForegroundColour( wxColor( 0, 128, 80 ) ); Button->SetForegroundColour( wxColor( 0, 128, 80 ) );
PropRightSizer->Add( Button, 0, wxGROW | wxALL, 5 ); PropRightSizer->Add( Button, 0, wxGROW | wxALL, 5 );
wxStaticBox* positionBox = new wxStaticBox(m_PanelProperties, -1, _("Position") );
wxStaticBoxSizer* positionBoxSizer = new wxStaticBoxSizer( positionBox, wxVERTICAL );
PropRightSizer->Add(positionBoxSizer, 0, wxGROW | wxALL, 5 );
m_ModPositionX = new wxTextCtrl( m_PanelProperties, ID_MODULE_EDIT_X_POSITION, wxT(""),
wxDefaultPosition, wxDefaultSize, 0,
wxTextValidator(wxFILTER_NUMERIC, NULL), wxTextCtrlNameStr);
PutValueInLocalUnits( *m_ModPositionX, m_CurrentModule->GetPosition().x, PCB_INTERNAL_UNIT );
AddUnitSymbol( *XPositionStatic, g_UnitMetric );
positionBoxSizer->Add( XPositionStatic, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
positionBoxSizer->Add( m_ModPositionX, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
m_ModPositionY = new wxTextCtrl( m_PanelProperties, ID_MODULE_EDIT_Y_POSITION,
wxT(""), wxDefaultPosition, wxDefaultSize, 0,
wxTextValidator(wxFILTER_NUMERIC, NULL), wxTextCtrlNameStr);
PutValueInLocalUnits( *m_ModPositionY, m_CurrentModule->GetPosition().y, PCB_INTERNAL_UNIT );
AddUnitSymbol( *YPositionStatic, g_UnitMetric );
positionBoxSizer->Add( YPositionStatic, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
positionBoxSizer->Add( m_ModPositionY, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
} }
else // Module is edited in libedit else // Module is edited in libedit
{ {
...@@ -496,6 +520,15 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event ) ...@@ -496,6 +520,15 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event )
/******************************************************************************/ /******************************************************************************/
{ {
bool change_layer = FALSE; bool change_layer = FALSE;
wxPoint modpos;
// Set Module Position
modpos.x = ReturnValueFromTextCtrl( *m_ModPositionX, PCB_INTERNAL_UNIT );
modpos.y = ReturnValueFromTextCtrl( *m_ModPositionY, PCB_INTERNAL_UNIT );
m_CurrentModule->SetPosition(modpos);
if( m_DC )
m_Parent->DrawPanel->CursorOff( m_DC );
if( m_DC ) if( m_DC )
m_Parent->DrawPanel->CursorOff( m_DC ); m_Parent->DrawPanel->CursorOff( m_DC );
......
...@@ -15,7 +15,9 @@ enum id_Module_properties ...@@ -15,7 +15,9 @@ enum id_Module_properties
ID_BROWSE_3D_LIB, ID_BROWSE_3D_LIB,
ID_ADD_3D_SHAPE, ID_ADD_3D_SHAPE,
ID_REMOVE_3D_SHAPE, ID_REMOVE_3D_SHAPE,
ID_NOTEBOOK ID_NOTEBOOK,
ID_MODULE_EDIT_X_POSITION,
ID_MODULE_EDIT_Y_POSITION
}; };
class Panel3D_Ctrl; class Panel3D_Ctrl;
...@@ -45,6 +47,8 @@ private: ...@@ -45,6 +47,8 @@ private:
wxTextCtrl *m_Doc, *m_Keyword; wxTextCtrl *m_Doc, *m_Keyword;
wxBoxSizer * m_GeneralBoxSizer; wxBoxSizer * m_GeneralBoxSizer;
wxBoxSizer* m_PanelPropertiesBoxSizer; wxBoxSizer* m_PanelPropertiesBoxSizer;
wxTextCtrl *m_ModPositionX, *m_ModPositionY;
wxString *m_ModPosXStr, *m_ModPosYStr;
public: public:
......
...@@ -24,10 +24,14 @@ ...@@ -24,10 +24,14 @@
#define A2DKBOOLDLLEXP WXEXPORT #define A2DKBOOLDLLEXP WXEXPORT
#define A2DKBOOLDLLEXP_DATA(type) WXEXPORT type #define A2DKBOOLDLLEXP_DATA(type) WXEXPORT type
#define A2DKBOOLDLLEXP_CTORFN #define A2DKBOOLDLLEXP_CTORFN
#if 0 // Kicad does dot use wxWidgets lib when building the kbool library
// but uses wxWidgets. So WXUSINGDLL has no meaning here, but could be defined in makefiles
// but must not be used when building kbool
#elif defined(WXUSINGDLL) #elif defined(WXUSINGDLL)
#define A2DKBOOLDLLEXP WXIMPORT #define A2DKBOOLDLLEXP WXIMPORT
#define A2DKBOOLDLLEXP_DATA(type) WXIMPORT type #define A2DKBOOLDLLEXP_DATA(type) WXIMPORT type
#define A2DKBOOLDLLEXP_CTORFN #define A2DKBOOLDLLEXP_CTORFN
#endif
#else // not making nor using DLL #else // not making nor using DLL
#define A2DKBOOLDLLEXP #define A2DKBOOLDLLEXP
#define A2DKBOOLDLLEXP_DATA(type) type #define A2DKBOOLDLLEXP_DATA(type) type
......
...@@ -23,8 +23,12 @@ ...@@ -23,8 +23,12 @@
enum SCANTYPE{NODELINK,LINKLINK,GENLR,LINKHOLES,INOUT}; enum SCANTYPE{NODELINK,LINKLINK,GENLR,LINKHOLES,INOUT};
#if 0 // Kicad does dot use wxWidgets lib when building the kbool library
// but uses wxWidgets. So WXUSINGDLL could be defined in makefiles
// but must not be used when building kbool
#if defined(WXUSINGDLL) #if defined(WXUSINGDLL)
template class A2DKBOOLDLLEXP DL_Iter<Record*>; template class A2DKBOOLDLLEXP DL_Iter<Record*>;
#endif
#endif #endif
class A2DKBOOLDLLEXP ScanBeam : public DL_List<Record*> class A2DKBOOLDLLEXP ScanBeam : public DL_List<Record*>
......
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