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
ad86e50a
Commit
ad86e50a
authored
May 29, 2012
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Derive pcbnew find dialog from DIALOG_SHIM.
parent
f2bd20ab
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
dialog_find.cpp
pcbnew/dialogs/dialog_find.cpp
+3
-13
dialog_find_base.cpp
pcbnew/dialogs/dialog_find_base.cpp
+3
-2
dialog_find_base.fbp
pcbnew/dialogs/dialog_find_base.fbp
+3
-3
dialog_find_base.h
pcbnew/dialogs/dialog_find_base.h
+5
-2
No files found.
pcbnew/dialogs/dialog_find.cpp
View file @
ad86e50a
/*
/*
* This program source code file is part of KICAD, a free EDA CAD application.
* This program source code file is part of KICAD, a free EDA CAD application.
*
*
* Copyright (C) 1992-2012 Marco Mattila <marcom99@gmail.com>
* Copyright (C) 2012 Marco Mattila <marcom99@gmail.com>
* Copyright (C) 2006 Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
* Copyright (C) 1992-2012 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2012 Kicad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -51,9 +52,6 @@ private:
...
@@ -51,9 +52,6 @@ private:
static
wxString
prevSearchString
;
static
wxString
prevSearchString
;
static
bool
warpMouse
;
static
bool
warpMouse
;
static
wxPoint
prevPosition
;
static
wxSize
prevSize
;
void
onButtonFindItemClick
(
wxCommandEvent
&
event
);
void
onButtonFindItemClick
(
wxCommandEvent
&
event
);
void
onButtonFindMarkerClick
(
wxCommandEvent
&
event
);
void
onButtonFindMarkerClick
(
wxCommandEvent
&
event
);
void
onButtonCloseClick
(
wxCommandEvent
&
event
);
void
onButtonCloseClick
(
wxCommandEvent
&
event
);
...
@@ -62,8 +60,6 @@ private:
...
@@ -62,8 +60,6 @@ private:
// Initialize static member variables
// Initialize static member variables
wxPoint
DIALOG_FIND
::
prevPosition
(
-
1
,
-
1
);
wxSize
DIALOG_FIND
::
prevSize
;
wxString
DIALOG_FIND
::
prevSearchString
;
wxString
DIALOG_FIND
::
prevSearchString
;
bool
DIALOG_FIND
::
warpMouse
=
true
;
bool
DIALOG_FIND
::
warpMouse
=
true
;
...
@@ -79,10 +75,6 @@ DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) : DIALOG_FIND_BASE( aParent
...
@@ -79,10 +75,6 @@ DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) : DIALOG_FIND_BASE( aParent
itemCount
=
markerCount
=
0
;
itemCount
=
markerCount
=
0
;
if
(
prevPosition
.
x
!=
-
1
)
SetSize
(
prevPosition
.
x
,
prevPosition
.
y
,
prevSize
.
x
,
prevSize
.
y
);
else
Center
();
Center
();
}
}
...
@@ -196,8 +188,6 @@ void DIALOG_FIND::onButtonFindMarkerClick( wxCommandEvent& aEvent )
...
@@ -196,8 +188,6 @@ void DIALOG_FIND::onButtonFindMarkerClick( wxCommandEvent& aEvent )
void
DIALOG_FIND
::
onClose
(
wxCloseEvent
&
aEvent
)
void
DIALOG_FIND
::
onClose
(
wxCloseEvent
&
aEvent
)
{
{
prevPosition
=
GetPosition
();
prevSize
=
GetSize
();
warpMouse
=
!
m_NoMouseWarpCheckBox
->
IsChecked
();
warpMouse
=
!
m_NoMouseWarpCheckBox
->
IsChecked
();
EndModal
(
1
);
EndModal
(
1
);
...
...
pcbnew/dialogs/dialog_find_base.cpp
View file @
ad86e50a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
DIALOG_FIND_BASE
::
DIALOG_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
DIALOG_FIND_BASE
::
DIALOG_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
DIALOG_SHIM
(
parent
,
id
,
title
,
pos
,
size
,
style
)
{
{
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
...
@@ -41,13 +41,14 @@ DIALOG_FIND_BASE::DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id, const wxStr
...
@@ -41,13 +41,14 @@ DIALOG_FIND_BASE::DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id, const wxStr
m_button2
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"Find Marker"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button2
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"Find Marker"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizer4
->
Add
(
m_button2
,
0
,
wxALL
,
5
);
bSizer4
->
Add
(
m_button2
,
0
,
wxALL
,
5
);
m_button3
=
new
wxButton
(
this
,
wxID_
ANY
,
_
(
"Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button3
=
new
wxButton
(
this
,
wxID_
CANCEL
,
_
(
"Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizer4
->
Add
(
m_button3
,
0
,
wxALL
,
5
);
bSizer4
->
Add
(
m_button3
,
0
,
wxALL
,
5
);
bSizerMain
->
Add
(
bSizer4
,
0
,
0
,
5
);
bSizerMain
->
Add
(
bSizer4
,
0
,
0
,
5
);
this
->
SetSizer
(
bSizerMain
);
this
->
SetSizer
(
bSizerMain
);
this
->
Layout
();
this
->
Layout
();
bSizerMain
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
this
->
Centre
(
wxBOTH
);
...
...
pcbnew/dialogs/dialog_find_base.fbp
View file @
ad86e50a
...
@@ -69,9 +69,9 @@
...
@@ -69,9 +69,9 @@
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"row"
></property>
<property
name=
"row"
></property>
<property
name=
"show"
>
1
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
>
350,150
</property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"subclass"
></property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
Find
</property>
<property
name=
"title"
>
Find
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></property>
...
@@ -614,7 +614,7 @@
...
@@ -614,7 +614,7 @@
<property
name=
"font"
></property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_
ANY
</property>
<property
name=
"id"
>
wxID_
CANCEL
</property>
<property
name=
"label"
>
Close
</property>
<property
name=
"label"
>
Close
</property>
<property
name=
"layer"
></property>
<property
name=
"layer"
></property>
<property
name=
"max_size"
></property>
<property
name=
"max_size"
></property>
...
...
pcbnew/dialogs/dialog_find_base.h
View file @
ad86e50a
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/gdicmn.h>
...
@@ -29,7 +32,7 @@
...
@@ -29,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_FIND_BASE
/// Class DIALOG_FIND_BASE
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_FIND_BASE
:
public
wxDialog
class
DIALOG_FIND_BASE
:
public
DIALOG_SHIM
{
{
private
:
private
:
...
@@ -50,7 +53,7 @@ class DIALOG_FIND_BASE : public wxDialog
...
@@ -50,7 +53,7 @@ class DIALOG_FIND_BASE : public wxDialog
public
:
public
:
DIALOG_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Find"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
350
,
150
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_FIND_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Find"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
-
1
,
-
1
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_FIND_BASE
();
~
DIALOG_FIND_BASE
();
};
};
...
...
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