Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
0f452cc0
Commit
0f452cc0
authored
Dec 05, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch
parent
628be5d1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
89 deletions
+109
-89
base_screen.cpp
common/base_screen.cpp
+1
-2
confirm.cpp
common/confirm.cpp
+89
-78
eelibs_read_libraryfiles.cpp
eeschema/eelibs_read_libraryfiles.cpp
+9
-1
makefile.gtk
makefile.gtk
+1
-1
dialog_drc.cpp
pcbnew/dialog_drc.cpp
+9
-1
zoom.cpp
share/zoom.cpp
+0
-6
No files found.
common/base_screen.cpp
View file @
0f452cc0
...
...
@@ -112,8 +112,7 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
{
wxPoint
curpos
;
D
(
printf
(
"curpos=%d,%d GetZoom=%d, mDrawOrg=%d,%d
\n
"
,
curpos
.
x
,
curpos
.
y
,
GetZoom
(),
m_DrawOrg
.
x
,
m_DrawOrg
.
y
);)
// D(printf("curpos=%d,%d GetZoom=%d, mDrawOrg=%d,%d\n", curpos.x, curpos.y, GetZoom(), m_DrawOrg.x, m_DrawOrg.y );)
curpos
.
x
=
ScreenPos
.
x
*
GetZoom
();
curpos
.
y
=
ScreenPos
.
y
*
GetZoom
();
...
...
common/confirm.cpp
View file @
0f452cc0
/*************************/
/* Menu " CONFIRMATION " */
/* fonction Get_Message */
/* test demande ESC */
/*************************/
/*************************/
/* Menu " CONFIRMATION " */
/* fonction Get_Message */
/* test demande ESC */
/*************************/
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
...
...
@@ -25,9 +25,9 @@ enum id_dialog {
};
/* Classe d'affichage de messages, identique a wxMessageDialog,
mais pouvant etre effacee au bout d'un time out donne
*/
class
WinEDA_MessageDialog
:
public
wxMessageDialog
*
mais pouvant etre effacee au bout d'un time out donne
*/
class
WinEDA_MessageDialog
:
public
wxMessageDialog
{
public
:
int
m_LifeTime
;
...
...
@@ -35,111 +35,122 @@ private:
wxTimer
m_Timer
;
public
:
WinEDA_MessageDialog
(
wxWindow
*
parent
,
const
wxString
&
msg
,
const
wxString
&
title
,
int
style
,
int
lifetime
);
~
WinEDA_MessageDialog
(){};
WinEDA_MessageDialog
(
wxWindow
*
parent
,
const
wxString
&
msg
,
const
wxString
&
title
,
int
style
,
int
lifetime
);
~
WinEDA_MessageDialog
()
{
};
void
OnTimeOut
(
wxTimerEvent
&
event
);
void
OnTimeOut
(
wxTimerEvent
&
event
);
DECLARE_EVENT_TABLE
()
};
BEGIN_EVENT_TABLE
(
WinEDA_MessageDialog
,
wxMessageDialog
)
EVT_TIMER
(
ID_TIMOUT
,
WinEDA_MessageDialog
::
OnTimeOut
)
BEGIN_EVENT_TABLE
(
WinEDA_MessageDialog
,
wxMessageDialog
)
EVT_TIMER
(
ID_TIMOUT
,
WinEDA_MessageDialog
::
OnTimeOut
)
END_EVENT_TABLE
()
/**********************************************************************************/
WinEDA_MessageDialog
::
WinEDA_MessageDialog
(
wxWindow
*
parent
,
const
wxString
&
msg
,
const
wxString
&
title
,
int
style
,
int
lifetime
)
:
wxMessageDialog
(
parent
,
msg
,
title
,
style
)
WinEDA_MessageDialog
::
WinEDA_MessageDialog
(
wxWindow
*
parent
,
const
wxString
&
msg
,
const
wxString
&
title
,
int
style
,
int
lifetime
)
:
wxMessageDialog
(
parent
,
msg
,
title
,
style
)
/**********************************************************************************/
{
m_LifeTime
=
lifetime
;
m_Timer
.
SetOwner
(
this
,
ID_TIMOUT
);
if
(
m_LifeTime
>
0
)
m_Timer
.
Start
(
100
*
m_LifeTime
,
wxTIMER_ONE_SHOT
);
// m_LifeTime = duree en 0.1 secondes
m_Timer
.
SetOwner
(
this
,
ID_TIMOUT
);
if
(
m_LifeTime
>
0
)
m_Timer
.
Start
(
100
*
m_LifeTime
,
wxTIMER_ONE_SHOT
);
// m_LifeTime = duree en 0.1 secondes
}
/********************************************************/
void
WinEDA_MessageDialog
::
OnTimeOut
(
wxTimerEvent
&
event
)
void
WinEDA_MessageDialog
::
OnTimeOut
(
wxTimerEvent
&
event
)
/********************************************************/
{
// TODO : EndModal() request
}
/*****************************************************************************/
void
DisplayError
(
wxWindow
*
parent
,
const
wxString
&
text
,
int
displaytime
)
void
DisplayError
(
wxWindow
*
parent
,
const
wxString
&
text
,
int
displaytime
)
/*****************************************************************************/
/* Affiche un Message d'Erreur ou d'avertissement.
si warn > 0 le dialogue disparait apres warn 0.1 secondes
*/
*
si warn > 0 le dialogue disparait apres warn 0.1 secondes
*/
{
wxMessageDialog
*
dialog
;
wxMessageDialog
*
dialog
;
if
(
displaytime
>
0
)
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Warning"
),
wxOK
|
wxICON_INFORMATION
|
wxSTAY_ON_TOP
,
displaytime
);
if
(
displaytime
>
0
)
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Warning"
),
wxOK
|
wxICON_INFORMATION
|
wxSTAY_ON_TOP
,
displaytime
);
else
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Error"
),
wxOK
|
wxICON_EXCLAMATION
|
wxSTAY_ON_TOP
,
0
);
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Error"
),
wxOK
|
wxICON_EXCLAMATION
|
wxSTAY_ON_TOP
,
0
);
dialog
->
ShowModal
();
dialog
->
Destroy
();
dialog
->
ShowModal
();
dialog
->
Destroy
();
}
/**************************************************************************/
void
DisplayInfo
(
wxWindow
*
parent
,
const
wxString
&
text
,
int
displaytime
)
void
DisplayInfo
(
wxWindow
*
parent
,
const
wxString
&
text
,
int
displaytime
)
/**************************************************************************/
/* Affiche un Message d'information.
*/
*/
{
wxMessageDialog
*
dialog
;
wxMessageDialog
*
dialog
;
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Infos:"
),
wxOK
|
wxICON_INFORMATION
|
wxSTAY_ON_TOP
,
displaytime
);
dialog
=
new
WinEDA_MessageDialog
(
parent
,
text
,
_
(
"Infos:"
),
wxOK
|
wxICON_INFORMATION
|
wxSTAY_ON_TOP
,
displaytime
);
dialog
->
ShowModal
();
dialog
->
Destroy
();
}
/**************************************************/
bool
IsOK
(
wxWindow
*
parent
,
const
wxString
&
text
)
bool
IsOK
(
wxWindow
*
parent
,
const
wxString
&
text
)
/**************************************************/
{
int
ii
;
ii
=
wxMessageBox
(
text
,
_
(
"Confirmation"
),
wxYES_NO
|
wxCENTRE
|
wxICON_HAND
,
parent
);
if
(
ii
==
wxYES
)
return
TRUE
;
int
ii
;
ii
=
wxMessageBox
(
text
,
_
(
"Confirmation"
),
wxYES_NO
|
wxCENTRE
|
wxICON_HAND
,
parent
);
if
(
ii
==
wxYES
)
return
TRUE
;
return
FALSE
;
}
/***********************************************************************/
int
Get_Message
(
const
wxString
&
title
,
wxString
&
buffer
,
wxWindow
*
frame
)
int
Get_Message
(
const
wxString
&
title
,
wxString
&
buffer
,
wxWindow
*
frame
)
/***********************************************************************/
/* Get a text from user
titre = titre a afficher
buffer : text enter by user
leading and trailing spaces are removed
if buffer != "" buffer is displayed
return:
0 if OK
!= 0 if ESCAPE
*/
*
titre = titre a afficher
*
buffer : text enter by user
*
leading and trailing spaces are removed
*
if buffer != "" buffer is displayed
*
return:
*
0 if OK
*
!= 0 if ESCAPE
*/
{
wxString
message
,
default_text
;
wxString
message
,
default_text
;
if
(
buffer
)
default_text
=
buffer
;
if
(
buffer
)
default_text
=
buffer
;
message
=
wxGetTextFromUser
(
title
,
_
(
"Text:"
),
default_text
,
frame
);
if
(
!
message
.
IsEmpty
()
)
message
=
wxGetTextFromUser
(
title
,
_
(
"Text:"
),
default_text
,
frame
);
if
(
!
message
.
IsEmpty
()
)
{
message
.
Trim
(
FALSE
);
// Remove blanks at beginning
message
.
Trim
(
TRUE
);
// Remove blanks at end
message
.
Trim
(
FALSE
);
// Remove blanks at beginning
message
.
Trim
(
TRUE
);
// Remove blanks at end
buffer
=
message
;
return
0
;
}
return
(
1
)
;
return
1
;
}
eeschema/eelibs_read_libraryfiles.cpp
View file @
0f452cc0
...
...
@@ -25,6 +25,11 @@ static int AddFootprintFilterList( EDA_LibComponentStruct* LibE
FILE
*
f
,
char
*
Line
,
int
*
LineNum
);
static
wxString
currentLibraryName
;
// If this code was written in C++ then this would not be needed.
/*************************************************************************************/
LibraryStruct
*
LoadLibraryName
(
WinEDA_DrawFrame
*
frame
,
const
wxString
&
FullLibName
,
const
wxString
&
LibName
)
...
...
@@ -61,6 +66,8 @@ LibraryStruct* LoadLibraryName( WinEDA_DrawFrame* frame,
return
NULL
;
}
currentLibraryName
=
FullLibName
;
NewLib
=
new
LibraryStruct
(
LIBRARY_TYPE_EESCHEMA
,
LibName
,
FullLibName
);
Entries
=
LoadLibraryAux
(
frame
,
NewLib
,
f
,
&
NumOfParts
);
...
...
@@ -473,7 +480,8 @@ EDA_LibComponentStruct* Read_Component_Definition( WinEDA_DrawFrame* frame, char
/* End line or block analysis: test for an error */
if
(
!
Res
)
{
/* Something went wrong there. */
Msg
.
Printf
(
wxT
(
" Error Line %d, Library not loaded"
),
*
LineNum
);
Msg
.
Printf
(
wxT
(
" Error at line %d of library
\n\"
%s
\"
,
\n
library not loaded"
),
*
LineNum
,
currentLibraryName
.
GetData
()
);
DisplayError
(
frame
,
Msg
);
delete
LibEntry
;
return
NULL
;
...
...
makefile.gtk
View file @
0f452cc0
MAKEGTK
=
$(MAKE)
-f
makefile.gtk
KICAD_SUBDIRS
=
common 3d-viewer pcbnew
#
eeschema eeschema/plugins cvpcb kicad gerbview
KICAD_SUBDIRS
=
common 3d-viewer pcbnew eeschema eeschema/plugins cvpcb kicad gerbview
KICAD_SUBDIRS_BIN
=
eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
KICAD_SUBDIRS_RES
=
internat modules template library
KICAD_SUBDIRS_HELP
=
help
...
...
pcbnew/dialog_drc.cpp
View file @
0f452cc0
...
...
@@ -637,7 +637,11 @@ void DrcDialog::OnStartdrcClick( wxCommandEvent& event )
// run all the tests, with no UI at this time.
m_tester
->
RunTests
();
m_Notebook
->
ChangeSelection
(
0
);
// display the 1at tab "... Markers ..."
#if wxCHECK_VERSION( 2, 8, 0 )
m_Notebook
->
ChangeSelection
(
0
);
// display the 1at tab "...Markers ..."
#else
m_Notebook
->
SetSelection
(
0
);
// display the 1at tab "... Markers..."
#endif
// Generate the report
...
...
@@ -712,7 +716,11 @@ void DrcDialog::OnListUnconnectedClick( wxCommandEvent& event )
m_tester
->
ListUnconnectedPads
();
#if wxCHECK_VERSION( 2, 8, 0 )
m_Notebook
->
ChangeSelection
(
1
);
// display the 2nd tab "Unconnected..."
#else
m_Notebook
->
SetSelection
(
1
);
// display the 2nd tab "Unconnected..."
#endif
// Generate the report
if
(
!
reportName
.
IsEmpty
()
)
...
...
share/zoom.cpp
View file @
0f452cc0
...
...
@@ -52,16 +52,10 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
ReDrawPanel
();
D
(
printf
(
"~ReDrawPanel x=%d, y=%d
\n
"
,
m_CurrentScreen
->
m_Curseur
.
x
,
m_CurrentScreen
->
m_Curseur
.
y
);)
/* Move the mouse cursor to the on grid graphic cursor position */
if
(
ToMouse
==
TRUE
)
{
DrawPanel
->
MouseToCursorSchema
();
D
(
printf
(
"~MouseToCursorSchema x=%d, y=%d
\n
"
,
m_CurrentScreen
->
m_Curseur
.
x
,
m_CurrentScreen
->
m_Curseur
.
y
);)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment