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
4a8bf70d
Commit
4a8bf70d
authored
Sep 06, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks
parent
9fba83b5
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
154 additions
and
146 deletions
+154
-146
macros.h
include/macros.h
+3
-3
pcbstruct.h
include/pcbstruct.h
+12
-4
wxstruct.h
include/wxstruct.h
+13
-3
collectors.cpp
pcbnew/collectors.cpp
+16
-37
collectors.h
pcbnew/collectors.h
+7
-0
edit.cpp
pcbnew/edit.cpp
+4
-0
onrightclick.cpp
pcbnew/onrightclick.cpp
+97
-98
pcbframe.cpp
pcbnew/pcbframe.cpp
+2
-1
No files found.
include/macros.h
View file @
4a8bf70d
...
@@ -11,12 +11,12 @@
...
@@ -11,12 +11,12 @@
#define CONV_FROM_UTF8(utf8string) (utf8string)
#define CONV_FROM_UTF8(utf8string) (utf8string)
#endif
#endif
/* violation of C++ standard, cannot use
MIN() and MAX()
/* violation of C++ standard, cannot use
min() and max(), i.e. in lowercase
#ifndef min
#ifndef min
#define
MIN
(x, y) ((x) > (y) ? (y) : (x))
#define
min
(x, y) ((x) > (y) ? (y) : (x))
#endif
#endif
#ifndef max
#ifndef max
#define
MAX
(x, y) ((x) > (y) ? (x) : (y))
#define
max
(x, y) ((x) > (y) ? (x) : (y))
#endif
#endif
*/
*/
...
...
include/pcbstruct.h
View file @
4a8bf70d
...
@@ -325,11 +325,19 @@ public:
...
@@ -325,11 +325,19 @@ public:
public
:
public
:
PCB_SCREEN
(
int
idscreen
);
PCB_SCREEN
(
int
idscreen
);
~
PCB_SCREEN
();
~
PCB_SCREEN
();
PCB_SCREEN
*
Next
()
{
return
(
PCB_SCREEN
*
)
Pnext
;
}
PCB_SCREEN
*
Next
()
{
return
(
PCB_SCREEN
*
)
Pnext
;
}
void
Init
();
void
Init
();
void
SetNextZoom
();
void
SetNextZoom
();
void
SetPreviousZoom
();
void
SetPreviousZoom
();
void
SetLastZoom
();
void
SetLastZoom
();
/**
* Function GetCurItem
* returns the currently selected BOARD_ITEM, overriding BASE_SCREEN::GetCurItem().
* @return BOARD_ITEM* - the one selected, or NULL.
*/
BOARD_ITEM
*
GetCurItem
()
const
{
return
(
BOARD_ITEM
*
)
BASE_SCREEN
::
GetCurItem
();
}
};
};
/***************************/
/***************************/
...
...
include/wxstruct.h
View file @
4a8bf70d
...
@@ -210,8 +210,8 @@ public:
...
@@ -210,8 +210,8 @@ public:
BASE_SCREEN
*
m_CurrentScreen
;
// SCREEN en cours
BASE_SCREEN
*
m_CurrentScreen
;
// SCREEN en cours
int
m_CurrentCursorShape
;
// shape for cursor (0 = default cursor)
int
m_CurrentCursorShape
;
// shape for cursor (0 = default cursor)
int
m_ID_current_state
;
//
Id du bouton actif du tool bar vertical
int
m_ID_current_state
;
//
/< Id of active button on the vertical toolbar
int
m_HTOOL_current_state
;
//
Id du bouton actif du tool bar horizontal
int
m_HTOOL_current_state
;
//
/< Id of active button on horizontal toolbar
int
m_InternalUnits
;
// nombre d'unites internes pour 1 pouce
int
m_InternalUnits
;
// nombre d'unites internes pour 1 pouce
// = 1000 pour schema, = 10000 pour PCB
// = 1000 pour schema, = 10000 pour PCB
...
@@ -394,6 +394,7 @@ public:
...
@@ -394,6 +394,7 @@ public:
bool
Clear_Pcb
(
wxDC
*
DC
,
bool
query
);
bool
Clear_Pcb
(
wxDC
*
DC
,
bool
query
);
BOARD_ITEM
*
PcbGeneralLocateAndDisplay
();
BOARD_ITEM
*
PcbGeneralLocateAndDisplay
();
BOARD_ITEM
*
Locate
(
int
typeloc
,
int
LayerSearch
);
BOARD_ITEM
*
Locate
(
int
typeloc
,
int
LayerSearch
);
#if defined(DEBUG)
#if defined(DEBUG)
/**
/**
...
@@ -562,7 +563,16 @@ public:
...
@@ -562,7 +563,16 @@ public:
void
PrepareLayerIndicator
();
void
PrepareLayerIndicator
();
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
/**
* Function OnRightClick
* populates a popup menu with the choices appropriate for the current context.
* The caller will add the ZOOM menu choices afterwards.
* @param aMousePos The current mouse position
* @param aPopMenu The menu to add to.
*/
void
OnRightClick
(
const
wxPoint
&
aMousePos
,
wxMenu
*
aPopMenu
);
void
OnSelectOptionToolbar
(
wxCommandEvent
&
event
);
void
OnSelectOptionToolbar
(
wxCommandEvent
&
event
);
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
...
...
pcbnew/collectors.cpp
View file @
4a8bf70d
...
@@ -47,6 +47,19 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
...
@@ -47,6 +47,19 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
};
};
const
KICAD_T
GENERAL_COLLECTOR
::
PrimaryItems
[]
=
{
TYPETEXTE
,
TYPEDRAWSEGMENT
,
TYPECOTATION
,
TYPEVIA
,
TYPETRACK
,
// TYPEPAD, TYPEPAD and TYPETEXTEMODULE are handled in a subsearch
// TYPETEXTEMODULE,
TYPEMODULE
,
EOT
};
/**
/**
* Function Inspect
* Function Inspect
* is the examining function within the INSPECTOR which is passed to the
* is the examining function within the INSPECTOR which is passed to the
...
@@ -223,42 +236,8 @@ exit:
...
@@ -223,42 +236,8 @@ exit:
}
}
// see collectors.h
/*
void GENERAL_COLLECTOR::Collect( BOARD* board, const wxPoint& refPos,
int aPreferredLayer, int aLayerMask )
{
Empty(); // empty the collection, primary criteria list
Empty2nd(); // empty the collection, secondary criteria list
SetPreferredLayer( aPreferredLayer );
SetLayerMask( aLayerMask );
// remember refPos, pass to Inspect()
SetRefPos( refPos );
#if defined(DEBUG)
std::cout << '\n';
#endif
// visit the board with the INSPECTOR (me).
board->Visit( this, // INSPECTOR* inspector
NULL, // const void* testData, not used here
m_ScanTypes);
SetTimeNow(); // when snapshot was taken
// append 2nd list onto end of the first "list"
for( unsigned i=0; i<list2nd.size(); ++i )
Append( list2nd[i] );
Empty2nd();
}
*/
// see collectors.h
// see collectors.h
void
GENERAL_COLLECTOR
::
Collect
(
BOARD_ITEM
*
aItem
,
const
wxPoint
&
r
efPos
,
void
GENERAL_COLLECTOR
::
Collect
(
BOARD_ITEM
*
aItem
,
const
wxPoint
&
aR
efPos
,
const
COLLECTORS_GUIDE
*
aGuide
)
const
COLLECTORS_GUIDE
*
aGuide
)
{
{
Empty
();
// empty the collection, primary criteria list
Empty
();
// empty the collection, primary criteria list
...
@@ -269,9 +248,9 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const wxPoint& refPos,
...
@@ -269,9 +248,9 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const wxPoint& refPos,
// remember where the snapshot was taken from and pass refPos to
// remember where the snapshot was taken from and pass refPos to
// the Inspect() function.
// the Inspect() function.
SetRefPos
(
r
efPos
);
SetRefPos
(
aR
efPos
);
// visit the board with the INSPECTOR (me).
// visit the board
or module
with the INSPECTOR (me).
aItem
->
Visit
(
this
,
// INSPECTOR* inspector
aItem
->
Visit
(
this
,
// INSPECTOR* inspector
NULL
,
// const void* testData, not used here
NULL
,
// const void* testData, not used here
m_ScanTypes
);
m_ScanTypes
);
...
...
pcbnew/collectors.h
View file @
4a8bf70d
...
@@ -192,6 +192,13 @@ public:
...
@@ -192,6 +192,13 @@ public:
static
const
KICAD_T
AllBoardItems
[];
static
const
KICAD_T
AllBoardItems
[];
/**
* A scan list for all primary board items, omitting items which are subsidiary to
* a MODULE, such as D_PAD and TEXTEMODULE.
*/
static
const
KICAD_T
PrimaryItems
[];
/**
/**
* Constructor GENERALCOLLECTOR
* Constructor GENERALCOLLECTOR
*/
*/
...
...
pcbnew/edit.cpp
View file @
4a8bf70d
...
@@ -351,6 +351,10 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -351,6 +351,10 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
#if defined(DEBUG)
std
::
cout
<<
"GetString="
<<
event
.
GetString
().
mb_str
()
<<
'\n'
;
#endif
wxGetMousePosition
(
&
pos
.
x
,
&
pos
.
y
);
wxGetMousePosition
(
&
pos
.
x
,
&
pos
.
y
);
...
...
pcbnew/onrightclick.cpp
View file @
4a8bf70d
This diff is collapsed.
Click to expand it.
pcbnew/pcbframe.cpp
View file @
4a8bf70d
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
BEGIN_EVENT_TABLE
(
WinEDA_PcbFrame
,
wxFrame
)
BEGIN_EVENT_TABLE
(
WinEDA_PcbFrame
,
wxFrame
)
COMMON_EVENTS_DRAWFRAME
EVT_SOCKET
(
ID_EDA_SOCKET_EVENT_SERV
,
WinEDA_PcbFrame
::
OnSockRequestServer
)
COMMON_EVENTS_DRAWFRAME
EVT_SOCKET
(
ID_EDA_SOCKET_EVENT_SERV
,
WinEDA_PcbFrame
::
OnSockRequestServer
)
EVT_SOCKET
(
ID_EDA_SOCKET_EVENT
,
WinEDA_PcbFrame
::
OnSockRequest
)
EVT_SOCKET
(
ID_EDA_SOCKET_EVENT
,
WinEDA_PcbFrame
::
OnSockRequest
)
EVT_KICAD_CHOICEBOX
(
ID_ON_ZOOM_SELECT
,
WinEDA_PcbFrame
::
OnSelectZoom
)
EVT_KICAD_CHOICEBOX
(
ID_ON_ZOOM_SELECT
,
WinEDA_PcbFrame
::
OnSelectZoom
)
...
...
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