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
eb1f89d0
Commit
eb1f89d0
authored
Aug 30, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing files
parent
6c14eee6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
312 additions
and
0 deletions
+312
-0
dialog_layer_selection_base.cpp
pcbnew/dialogs/dialog_layer_selection_base.cpp
+225
-0
dialog_layer_selection_base.h
pcbnew/dialogs/dialog_layer_selection_base.h
+87
-0
No files found.
pcbnew/dialogs/dialog_layer_selection_base.cpp
0 → 100644
View file @
eb1f89d0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_layer_selection_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_LAYER_SELECTION_BASE
::
DIALOG_LAYER_SELECTION_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
{
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
wxBoxSizer
*
bSizerMain
;
bSizerMain
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
bSizerUpper
;
bSizerUpper
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_leftGridLayers
=
new
wxGrid
(
this
,
ID_LEFT_LIST
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_leftGridLayers
->
CreateGrid
(
1
,
4
);
m_leftGridLayers
->
EnableEditing
(
false
);
m_leftGridLayers
->
EnableGridLines
(
true
);
m_leftGridLayers
->
EnableDragGridSize
(
false
);
m_leftGridLayers
->
SetMargins
(
0
,
3
);
// Columns
m_leftGridLayers
->
EnableDragColMove
(
false
);
m_leftGridLayers
->
EnableDragColSize
(
false
);
m_leftGridLayers
->
SetColLabelSize
(
0
);
m_leftGridLayers
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_leftGridLayers
->
EnableDragRowSize
(
false
);
m_leftGridLayers
->
SetRowLabelSize
(
0
);
m_leftGridLayers
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
m_leftGridLayers
->
SetLabelBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_WINDOW
)
);
// Cell Defaults
m_leftGridLayers
->
SetDefaultCellBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_MENU
)
);
m_leftGridLayers
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizerUpper
->
Add
(
m_leftGridLayers
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_rightGridLayers
=
new
wxGrid
(
this
,
ID_RIGHT_LIST
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_rightGridLayers
->
CreateGrid
(
1
,
4
);
m_rightGridLayers
->
EnableEditing
(
false
);
m_rightGridLayers
->
EnableGridLines
(
true
);
m_rightGridLayers
->
EnableDragGridSize
(
false
);
m_rightGridLayers
->
SetMargins
(
0
,
3
);
// Columns
m_rightGridLayers
->
EnableDragColMove
(
false
);
m_rightGridLayers
->
EnableDragColSize
(
false
);
m_rightGridLayers
->
SetColLabelSize
(
0
);
m_rightGridLayers
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_rightGridLayers
->
EnableDragRowSize
(
false
);
m_rightGridLayers
->
SetRowLabelSize
(
0
);
m_rightGridLayers
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
// Cell Defaults
m_rightGridLayers
->
SetDefaultCellBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_MENU
)
);
m_rightGridLayers
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizerUpper
->
Add
(
m_rightGridLayers
,
0
,
wxALL
|
wxEXPAND
,
5
);
bSizerMain
->
Add
(
bSizerUpper
,
1
,
wxEXPAND
,
5
);
m_buttonClear
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"Clear Selection"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizerMain
->
Add
(
m_buttonClear
,
0
,
wxALL
|
wxALIGN_RIGHT
,
5
);
this
->
SetSizer
(
bSizerMain
);
this
->
Layout
();
this
->
Centre
(
wxBOTH
);
// Connect Events
m_leftGridLayers
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnLeftGridClick
),
NULL
,
this
);
m_rightGridLayers
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnRightGridClick
),
NULL
,
this
);
m_buttonClear
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnClearSelection
),
NULL
,
this
);
}
DIALOG_LAYER_SELECTION_BASE
::~
DIALOG_LAYER_SELECTION_BASE
()
{
// Disconnect Events
m_leftGridLayers
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnLeftGridClick
),
NULL
,
this
);
m_rightGridLayers
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnRightGridClick
),
NULL
,
this
);
m_buttonClear
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_LAYER_SELECTION_BASE
::
OnClearSelection
),
NULL
,
this
);
}
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
{
this
->
SetSizeHints
(
wxDefaultSize
,
wxDefaultSize
);
wxBoxSizer
*
bSizerMain
;
bSizerMain
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
bSizerUpper
;
bSizerUpper
=
new
wxBoxSizer
(
wxHORIZONTAL
);
wxBoxSizer
*
bSizerLeft
;
bSizerLeft
=
new
wxBoxSizer
(
wxVERTICAL
);
m_staticTextTopLayer
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Top/Front Layer"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextTopLayer
->
Wrap
(
-
1
);
bSizerLeft
->
Add
(
m_staticTextTopLayer
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_leftGridLayers
=
new
wxGrid
(
this
,
ID_LEFT_LIST
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_leftGridLayers
->
CreateGrid
(
1
,
4
);
m_leftGridLayers
->
EnableEditing
(
false
);
m_leftGridLayers
->
EnableGridLines
(
true
);
m_leftGridLayers
->
EnableDragGridSize
(
false
);
m_leftGridLayers
->
SetMargins
(
0
,
3
);
// Columns
m_leftGridLayers
->
EnableDragColMove
(
false
);
m_leftGridLayers
->
EnableDragColSize
(
false
);
m_leftGridLayers
->
SetColLabelSize
(
0
);
m_leftGridLayers
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_leftGridLayers
->
EnableDragRowSize
(
false
);
m_leftGridLayers
->
SetRowLabelSize
(
0
);
m_leftGridLayers
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
m_leftGridLayers
->
SetLabelBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_WINDOW
)
);
// Cell Defaults
m_leftGridLayers
->
SetDefaultCellBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_MENU
)
);
m_leftGridLayers
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizerLeft
->
Add
(
m_leftGridLayers
,
1
,
wxALL
|
wxEXPAND
,
5
);
bSizerUpper
->
Add
(
bSizerLeft
,
1
,
wxEXPAND
,
5
);
wxBoxSizer
*
bSizerRight
;
bSizerRight
=
new
wxBoxSizer
(
wxVERTICAL
);
m_staticTextBottomLayer
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Bottom/Back Layer"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextBottomLayer
->
Wrap
(
-
1
);
bSizerRight
->
Add
(
m_staticTextBottomLayer
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_rightGridLayers
=
new
wxGrid
(
this
,
ID_RIGHT_LIST
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_rightGridLayers
->
CreateGrid
(
1
,
4
);
m_rightGridLayers
->
EnableEditing
(
false
);
m_rightGridLayers
->
EnableGridLines
(
true
);
m_rightGridLayers
->
EnableDragGridSize
(
false
);
m_rightGridLayers
->
SetMargins
(
0
,
3
);
// Columns
m_rightGridLayers
->
EnableDragColMove
(
false
);
m_rightGridLayers
->
EnableDragColSize
(
false
);
m_rightGridLayers
->
SetColLabelSize
(
0
);
m_rightGridLayers
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_rightGridLayers
->
EnableDragRowSize
(
false
);
m_rightGridLayers
->
SetRowLabelSize
(
0
);
m_rightGridLayers
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
// Cell Defaults
m_rightGridLayers
->
SetDefaultCellBackgroundColour
(
wxSystemSettings
::
GetColour
(
wxSYS_COLOUR_MENU
)
);
m_rightGridLayers
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizerRight
->
Add
(
m_rightGridLayers
,
1
,
wxALL
|
wxEXPAND
,
5
);
bSizerUpper
->
Add
(
bSizerRight
,
1
,
wxEXPAND
,
5
);
bSizerMain
->
Add
(
bSizerUpper
,
1
,
wxEXPAND
,
5
);
m_staticline1
=
new
wxStaticLine
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
bSizerMain
->
Add
(
m_staticline1
,
0
,
wxEXPAND
|
wxALL
,
5
);
m_sdbSizer
=
new
wxStdDialogButtonSizer
();
m_sdbSizerOK
=
new
wxButton
(
this
,
wxID_OK
);
m_sdbSizer
->
AddButton
(
m_sdbSizerOK
);
m_sdbSizerCancel
=
new
wxButton
(
this
,
wxID_CANCEL
);
m_sdbSizer
->
AddButton
(
m_sdbSizerCancel
);
m_sdbSizer
->
Realize
();
bSizerMain
->
Add
(
m_sdbSizer
,
0
,
wxEXPAND
,
5
);
this
->
SetSizer
(
bSizerMain
);
this
->
Layout
();
this
->
Centre
(
wxBOTH
);
// Connect Events
m_leftGridLayers
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnLeftGridClick
),
NULL
,
this
);
m_rightGridLayers
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnRightGridClick
),
NULL
,
this
);
m_sdbSizerCancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizerOK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnOKClick
),
NULL
,
this
);
}
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::~
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
()
{
// Disconnect Events
m_leftGridLayers
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnLeftGridClick
),
NULL
,
this
);
m_rightGridLayers
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnRightGridClick
),
NULL
,
this
);
m_sdbSizerCancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizerOK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
::
OnOKClick
),
NULL
,
this
);
}
pcbnew/dialogs/dialog_layer_selection_base.h
0 → 100644
View file @
eb1f89d0
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_LAYER_SELECTION_BASE_H__
#define __DIALOG_LAYER_SELECTION_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
#include <wx/font.h>
#include <wx/grid.h>
#include <wx/gdicmn.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/stattext.h>
#include <wx/statline.h>
///////////////////////////////////////////////////////////////////////////
#define ID_LEFT_LIST 1000
#define ID_RIGHT_LIST 1001
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LAYER_SELECTION_BASE
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_LAYER_SELECTION_BASE
:
public
wxDialog
{
private
:
protected
:
wxGrid
*
m_leftGridLayers
;
wxGrid
*
m_rightGridLayers
;
wxButton
*
m_buttonClear
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnLeftGridClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRightGridClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnClearSelection
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_LAYER_SELECTION_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Select Layer:"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
452
,
183
),
long
style
=
wxCAPTION
|
wxCLOSE_BOX
);
~
DIALOG_LAYER_SELECTION_BASE
();
};
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
:
public
wxDialog
{
private
:
protected
:
wxStaticText
*
m_staticTextTopLayer
;
wxGrid
*
m_leftGridLayers
;
wxStaticText
*
m_staticTextBottomLayer
;
wxGrid
*
m_rightGridLayers
;
wxStaticLine
*
m_staticline1
;
wxStdDialogButtonSizer
*
m_sdbSizer
;
wxButton
*
m_sdbSizerOK
;
wxButton
*
m_sdbSizerCancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnLeftGridClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRightGridClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOKClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Select Cpper Layer Pair:"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
332
,
175
),
long
style
=
wxDEFAULT_DIALOG_STYLE
);
~
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE
();
};
#endif //__DIALOG_LAYER_SELECTION_BASE_H__
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