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
45021493
Commit
45021493
authored
Jan 16, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Plain Diff
switch to comboboxes on page size dialogs, fix PLUGIN header
parents
286c62d8
2c84a28f
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
498 additions
and
485 deletions
+498
-485
class_page_info.cpp
common/class_page_info.cpp
+30
-15
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+29
-25
dialog_page_settings.h
common/dialogs/dialog_page_settings.h
+1
-4
dialog_page_settings_base.cpp
common/dialogs/dialog_page_settings_base.cpp
+28
-28
dialog_page_settings_base.fbp
common/dialogs/dialog_page_settings_base.fbp
+396
-402
dialog_page_settings_base.h
common/dialogs/dialog_page_settings_base.h
+5
-8
common.h
include/common.h
+5
-0
files.cpp
pcbnew/files.cpp
+2
-2
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+2
-1
No files found.
common/class_page_info.cpp
View file @
45021493
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -29,9 +30,9 @@ const wxString PAGE_INFO::Custom( wxT( "User" ) );
// Standard page sizes in mils, all constants
#if defined(KICAD_GOST)
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
8283
,
11700
),
wxT
(
"A4"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
8268
,
11700
),
wxT
(
"A4"
)
);
#else
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
11700
,
8267
),
wxT
(
"A4"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
11700
,
8268
),
wxT
(
"A4"
)
);
#endif
const
PAGE_INFO
PAGE_INFO
::
pageA3
(
wxSize
(
16535
,
11700
),
wxT
(
"A3"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA2
(
wxSize
(
23400
,
16535
),
wxT
(
"A2"
)
);
...
...
@@ -42,9 +43,15 @@ const PAGE_INFO PAGE_INFO::pageB( wxSize( 17000, 11000 ), wxT( "B" ) );
const
PAGE_INFO
PAGE_INFO
::
pageC
(
wxSize
(
22000
,
17000
),
wxT
(
"C"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageD
(
wxSize
(
34000
,
22000
),
wxT
(
"D"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageE
(
wxSize
(
44000
,
34000
),
wxT
(
"E"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageGERBER
(
wxSize
(
32000
,
32000
),
wxT
(
"GERBER"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageGERBER
(
wxSize
(
32000
,
32000
),
wxT
(
"GERBER"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageUser
(
wxSize
(
17000
,
11000
),
Custom
);
// US paper sizes
const
PAGE_INFO
PAGE_INFO
::
pageUSLetter
(
wxSize
(
11000
,
8500
),
wxT
(
"USLetter"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageUSLegal
(
wxSize
(
14000
,
8500
),
wxT
(
"USLegal"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageUSLedger
(
wxSize
(
17000
,
11000
),
wxT
(
"USLedger"
)
);
// Custom paper size for next instantiation of type "User"
int
PAGE_INFO
::
s_user_width
=
17000
;
int
PAGE_INFO
::
s_user_height
=
11000
;
...
...
@@ -65,6 +72,9 @@ wxArrayString PAGE_INFO::GetStandardSizes()
&pageD,
&pageE,
// &pageGERBER, // standard?
&pageUSLetter,
&pageUSLegal,
&pageUSLedger,
&pageUser,
};
...
...
@@ -122,6 +132,12 @@ bool PAGE_INFO::SetType( const wxString& aType )
*
this
=
pageE
;
else
if
(
aType
==
pageGERBER
.
GetType
()
)
*
this
=
pageGERBER
;
else
if
(
aType
==
pageUSLetter
.
GetType
()
)
*
this
=
pageUSLetter
;
else
if
(
aType
==
pageUSLegal
.
GetType
()
)
*
this
=
pageUSLegal
;
else
if
(
aType
==
pageUSLedger
.
GetType
()
)
*
this
=
pageUSLedger
;
else
if
(
aType
==
pageUser
.
GetType
()
)
{
// pageUser is const, and may not and does not hold the custom size,
...
...
@@ -201,4 +217,3 @@ void PAGE_INFO::SetHeightMils( int aHeightInMils )
{
m_size
.
y
=
clampHeight
(
aHeightInMils
);
}
common/dialogs/dialog_page_settings.cpp
View file @
45021493
...
...
@@ -75,12 +75,14 @@ void DIALOG_PAGES_SETTINGS::initDialog()
const
PAGE_INFO
&
pageInfo
=
m_Parent
->
GetPageSettings
();
if
(
!
pageInfo
.
IsCustom
()
)
m_
landscapeCheckbox
->
SetValue
(
!
pageInfo
.
IsPortrait
()
);
m_
orientationComboBox
->
SetSelection
(
pageInfo
.
IsPortrait
()
);
setCurrentPageSizeSelection
(
pageInfo
.
GetType
()
);
// only a click fires the radiobutton selected event, so have to fabricate this check
onRadioButtonSelected
();
// only a click fires the selection changed event, so have to fabricate this check
wxCommandEvent
junk
;
onPaperSizeChoice
(
junk
);
switch
(
g_UserUnit
)
{
...
...
@@ -175,25 +177,19 @@ void DIALOG_PAGES_SETTINGS::OnCancelClick( wxCommandEvent& event )
}
void
DIALOG_PAGES_SETTINGS
::
on
RadioButtonSelected
(
)
void
DIALOG_PAGES_SETTINGS
::
on
PaperSizeChoice
(
wxCommandEvent
&
event
)
{
if
(
PAGE_INFO
::
Custom
==
m_PageSizeBox
->
GetStringSelection
(
)
)
if
(
m_paperSizeComboBox
->
GetStringSelection
().
Contains
(
PAGE_INFO
::
Custom
)
)
{
m_
landscapeCheckb
ox
->
Enable
(
false
);
m_
orientationComboB
ox
->
Enable
(
false
);
}
else
{
m_
landscapeCheckb
ox
->
Enable
(
true
);
m_
orientationComboB
ox
->
Enable
(
true
);
}
}
void
DIALOG_PAGES_SETTINGS
::
onRadioButtonSelected
(
wxCommandEvent
&
event
)
{
onRadioButtonSelected
();
// no event arg
}
void
DIALOG_PAGES_SETTINGS
::
SavePageSettings
(
wxCommandEvent
&
event
)
{
wxString
msg
;
...
...
@@ -238,19 +234,27 @@ void DIALOG_PAGES_SETTINGS::SavePageSettings( wxCommandEvent& event )
*/
}
int
radioSelection
=
m_PageSizeBox
->
GetSelection
();
if
(
radioSelection
<
0
)
radioSelection
=
0
;
// wxFormBuilder must use "A4", "A3", etc for choices, in all languages/translations
wxString
paperType
=
m_
PageSizeBox
->
GetString
(
radioSelection
);
wxString
paperType
=
m_
paperSizeComboBox
->
GetStringSelection
(
);
// construct pageInfo _after_ user settings have been established in case the
// paperType is custom, otherwise User width and height will not go into effect right away.
PAGE_INFO
pageInfo
(
paperType
);
PAGE_INFO
pageInfo
;
if
(
paperType
.
Contains
(
PAGE_INFO
::
Custom
)
)
{
pageInfo
.
SetType
(
PAGE_INFO
::
Custom
);
}
else
{
pageInfo
.
SetPortrait
(
m_orientationComboBox
->
GetSelection
()
);
if
(
PAGE_INFO
::
Custom
!=
paperType
)
pageInfo
.
SetPortrait
(
!
m_landscapeCheckbox
->
IsChecked
()
);
// here we assume translators will keep original paper size spellings
if
(
!
pageInfo
.
SetType
(
paperType
)
)
{
wxASSERT_MSG
(
FALSE
,
wxT
(
"the translation for paper size must preserve original spellings"
)
);
}
}
m_Parent
->
SetPageSettings
(
pageInfo
);
...
...
@@ -305,19 +309,19 @@ void DIALOG_PAGES_SETTINGS::setCurrentPageSizeSelection( const wxString& aPaperS
// use wxFormBuilder to store the sheet type in the wxRadioButton's label
// i.e. "A4", "A3", etc, anywhere within the text of the label.
D
(
printf
(
"m_
PageSizeBox->GetCount() = %d
\n
"
,
(
int
)
m_PageSize
Box
->
GetCount
()
);)
D
(
printf
(
"m_
paperSizeComboBox->GetCount() = %d
\n
"
,
(
int
)
m_paperSizeCombo
Box
->
GetCount
()
);)
// search all the child wxRadioButtons for a label containing our paper type
for
(
unsigned
i
=
0
;
i
<
m_
PageSize
Box
->
GetCount
();
++
i
)
for
(
unsigned
i
=
0
;
i
<
m_
paperSizeCombo
Box
->
GetCount
();
++
i
)
{
// parse each label looking for aPaperSize within it
wxStringTokenizer
st
(
m_
PageSize
Box
->
GetString
(
i
)
);
wxStringTokenizer
st
(
m_
paperSizeCombo
Box
->
GetString
(
i
)
);
while
(
st
.
HasMoreTokens
()
)
{
if
(
st
.
GetNextToken
()
==
aPaperSize
)
{
m_
PageSize
Box
->
SetSelection
(
i
);
m_
paperSizeCombo
Box
->
SetSelection
(
i
);
return
;
}
}
...
...
common/dialogs/dialog_page_settings.h
View file @
45021493
...
...
@@ -36,14 +36,11 @@ private:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void
OnCancelClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_RADIOBOX_SELECTED
void
onRadioButtonSelected
(
wxCommandEvent
&
event
);
void
setCurrentPageSizeSelection
(
const
wxString
&
aPaperSize
);
void
SavePageSettings
(
wxCommandEvent
&
event
);
void
ReturnSizeSelected
(
wxCommandEvent
&
event
);
void
on
RadioButtonSelected
(
);
void
on
PaperSizeChoice
(
wxCommandEvent
&
event
);
};
#endif // _DIALOG_PAGES_SETTINGS_H_
common/dialogs/dialog_page_settings_base.cpp
View file @
45021493
...
...
@@ -21,62 +21,62 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
wxFlexGridSizer
*
LeftColumnSizer
;
LeftColumnSizer
=
new
wxFlexGridSizer
(
6
,
1
,
0
,
0
);
LeftColumnSizer
->
AddGrowableRow
(
0
);
LeftColumnSizer
->
AddGrowableRow
(
1
);
LeftColumnSizer
->
AddGrowableRow
(
3
);
LeftColumnSizer
->
AddGrowableRow
(
4
);
LeftColumnSizer
->
AddGrowableRow
(
5
);
LeftColumnSizer
->
AddGrowableRow
(
2
);
LeftColumnSizer
->
SetFlexibleDirection
(
wxBOTH
);
LeftColumnSizer
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_SPECIFIED
);
wxString
m_PageSizeBoxChoices
[]
=
{
_
(
"A4"
),
_
(
"A3"
),
_
(
"A2"
),
_
(
"A1"
),
_
(
"A0"
),
_
(
"A"
),
_
(
"B"
),
_
(
"C"
),
_
(
"D"
),
_
(
"E"
),
_
(
"User"
)
};
int
m_PageSizeBoxNChoices
=
sizeof
(
m_PageSizeBoxChoices
)
/
sizeof
(
wxString
);
m_PageSizeBox
=
new
wxRadioBox
(
this
,
wxID_ANY
,
_
(
"Page Size:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PageSizeBoxNChoices
,
m_PageSizeBoxChoices
,
1
,
wxRA_SPECIFY_COLS
);
m_PageSizeBox
->
SetSelection
(
9
);
LeftColumnSizer
->
Add
(
m_PageSizeBox
,
0
,
wxALL
|
wxEXPAND
,
5
);
wxStaticBoxSizer
*
sbSizer9
;
sbSizer9
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Paper Size:"
)
),
wxVERTICAL
);
wxString
m_paperSizeComboBoxChoices
[]
=
{
_
(
"A4"
),
_
(
"A3"
),
_
(
"A2"
),
_
(
"A1"
),
_
(
"A0"
),
_
(
"A"
),
_
(
"B"
),
_
(
"C"
),
_
(
"D"
),
_
(
"E"
),
_
(
"USLetter"
),
_
(
"USLegal"
),
_
(
"USLedger"
),
_
(
"User (Custom)"
)
};
int
m_paperSizeComboBoxNChoices
=
sizeof
(
m_paperSizeComboBoxChoices
)
/
sizeof
(
wxString
);
m_paperSizeComboBox
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_paperSizeComboBoxNChoices
,
m_paperSizeComboBoxChoices
,
0
);
m_paperSizeComboBox
->
SetSelection
(
0
);
sbSizer9
->
Add
(
m_paperSizeComboBox
,
0
,
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
5
,
0
,
1
,
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
sbSizer9
,
0
,
wxALL
|
wxEXPAND
,
5
);
wxStaticBoxSizer
*
sbSizer8
;
sbSizer8
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Orientation:"
)
),
wxVERTICAL
);
m_landscapeCheckbox
=
new
wxCheckBox
(
this
,
wxID_ANY
,
_
(
"Landscape"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_landscapeCheckbox
->
SetValue
(
true
);
m_landscapeCheckbox
->
SetToolTip
(
_
(
"Check for landscape, uncheck for portrait"
)
);
wxString
m_orientationComboBoxChoices
[]
=
{
_
(
"Landscape"
),
_
(
"Portrait"
)
};
int
m_orientationComboBoxNChoices
=
sizeof
(
m_orientationComboBoxChoices
)
/
sizeof
(
wxString
);
m_orientationComboBox
=
new
wxChoice
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
m_orientationComboBoxNChoices
,
m_orientationComboBoxChoices
,
0
);
m_orientationComboBox
->
SetSelection
(
0
);
sbSizer8
->
Add
(
m_orientationComboBox
,
0
,
wxALL
|
wxEXPAND
,
5
);
sbSizer8
->
Add
(
m_landscapeCheckbox
,
0
,
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
sbSizer8
,
0
,
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
sbSizer8
,
1
,
wxALL
|
wxEXPAND
,
5
);
wxStaticBoxSizer
*
sbSizer10
;
sbSizer10
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Custom Page Size:"
)
),
wxVERTICAL
);
wxBoxSizer
*
bSizerXsize
;
bSizerXsize
=
new
wxBoxSizer
(
wxVERTICAL
);
UserPageSizeX
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"
User Page Size X:
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
UserPageSizeX
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"
Width:
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
UserPageSizeX
->
Wrap
(
-
1
);
bSizerXsize
->
Add
(
UserPageSizeX
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_TextUserSizeX
=
new
wxTextCtrl
(
this
,
ID_TEXTCTRL_USER_PAGE_SIZE_X
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizerXsize
->
Add
(
m_TextUserSizeX
,
0
,
wx
BOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
bSizerXsize
->
Add
(
m_TextUserSizeX
,
0
,
wx
ALIGN_LEFT
|
wxALIGN_TOP
|
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
bSizerXsize
,
1
,
wxEXPAND
,
5
);
sbSizer10
->
Add
(
bSizerXsize
,
1
,
wxALIGN_TOP
|
wxALL
|
wxEXPAND
,
5
);
wxBoxSizer
*
bSizerYsize
;
bSizerYsize
=
new
wxBoxSizer
(
wxVERTICAL
);
UserPageSizeY
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"
User Page Size Y:
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
UserPageSizeY
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"
Height:
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
UserPageSizeY
->
Wrap
(
-
1
);
bSizerYsize
->
Add
(
UserPageSizeY
,
0
,
wx
TOP
|
wxRIGHT
|
wxLEFT
,
5
);
bSizerYsize
->
Add
(
UserPageSizeY
,
0
,
wx
ALIGN_TOP
|
wxALL
,
5
);
m_TextUserSizeY
=
new
wxTextCtrl
(
this
,
ID_TEXTCTRL_USER_PAGE_SIZE_Y
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizerYsize
->
Add
(
m_TextUserSizeY
,
0
,
wx
BOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
bSizerYsize
->
Add
(
m_TextUserSizeY
,
0
,
wx
ALIGN_TOP
|
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
bSizerYsize
,
1
,
wxEXPAND
,
5
);
sbSizer10
->
Add
(
bSizerYsize
,
1
,
wxALIGN_TOP
|
wxALL
|
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
5
,
5
,
1
,
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
5
,
5
,
1
,
wxEXPAND
,
5
);
LeftColumnSizer
->
Add
(
sbSizer10
,
1
,
wxALL
|
wxEXPAND
,
5
);
bUpperSizerH
->
Add
(
LeftColumnSizer
,
0
,
wxEXPAND
,
5
);
...
...
@@ -219,7 +219,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
// Connect Events
this
->
Connect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnCloseWindow
)
);
m_
PageSizeBox
->
Connect
(
wxEVT_COMMAND_RADIOBOX_SELECTED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
onRadioButtonSelected
),
NULL
,
this
);
m_
paperSizeComboBox
->
Connect
(
wxEVT_COMMAND_CHOICE_SELECTED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
onPaperSizeChoice
),
NULL
,
this
);
m_TextUserSizeX
->
Connect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnTextctrlUserPageSizeXTextUpdated
),
NULL
,
this
);
m_TextUserSizeY
->
Connect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnTextctrlUserPageSizeYTextUpdated
),
NULL
,
this
);
m_TitleExport
->
Connect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnCheckboxTitleClick
),
NULL
,
this
);
...
...
@@ -231,7 +231,7 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_CLOSE_WINDOW
,
wxCloseEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnCloseWindow
)
);
m_
PageSizeBox
->
Disconnect
(
wxEVT_COMMAND_RADIOBOX_SELECTED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
onRadioButtonSelected
),
NULL
,
this
);
m_
paperSizeComboBox
->
Disconnect
(
wxEVT_COMMAND_CHOICE_SELECTED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
onPaperSizeChoice
),
NULL
,
this
);
m_TextUserSizeX
->
Disconnect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnTextctrlUserPageSizeXTextUpdated
),
NULL
,
this
);
m_TextUserSizeY
->
Disconnect
(
wxEVT_COMMAND_TEXT_UPDATED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnTextctrlUserPageSizeYTextUpdated
),
NULL
,
this
);
m_TitleExport
->
Disconnect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
DIALOG_PAGES_SETTINGS_BASE
::
OnCheckboxTitleClick
),
NULL
,
this
);
...
...
common/dialogs/dialog_page_settings_base.fbp
View file @
45021493
This diff is collapsed.
Click to expand it.
common/dialogs/dialog_page_settings_base.h
View file @
45021493
...
...
@@ -11,16 +11,16 @@
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/
radiobox
.h>
#include <wx/
choice
.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
...
...
@@ -50,15 +50,12 @@ class DIALOG_PAGES_SETTINGS_BASE : public wxDialog
private
:
protected
:
wxRadioBox
*
m_PageSizeBox
;
wxCheckBox
*
m_landscapeCheckbox
;
wxChoice
*
m_paperSizeComboBox
;
wxChoice
*
m_orientationComboBox
;
wxStaticText
*
UserPageSizeX
;
wxTextCtrl
*
m_TextUserSizeX
;
wxStaticText
*
UserPageSizeY
;
wxTextCtrl
*
m_TextUserSizeY
;
wxStaticText
*
m_TextSheetCount
;
wxStaticText
*
m_TextSheetNumber
;
...
...
@@ -82,7 +79,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public wxDialog
// Virtual event handlers, overide them in your derived class
virtual
void
OnCloseWindow
(
wxCloseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
on
RadioButtonSelected
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
on
PaperSizeChoice
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnTextctrlUserPageSizeXTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnTextctrlUserPageSizeYTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCheckboxTitleClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
...
...
include/common.h
View file @
45021493
...
...
@@ -247,6 +247,11 @@ private:
static
const
PAGE_INFO
pageD
;
static
const
PAGE_INFO
pageE
;
static
const
PAGE_INFO
pageGERBER
;
static
const
PAGE_INFO
pageUSLetter
;
static
const
PAGE_INFO
pageUSLegal
;
static
const
PAGE_INFO
pageUSLedger
;
static
const
PAGE_INFO
pageUser
;
// all dimensions here are in mils
...
...
pcbnew/files.cpp
View file @
45021493
...
...
@@ -478,8 +478,8 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
{
wxString
header
=
wxString
::
Format
(
wxT
(
"PCBNEW-BOARD Version %d date %s
\n\n
# Created by Pcbnew%s
\n\n
"
),
BOARD_FILE_VERSION
,
TO_UTF8
(
DateAndTime
()
),
TO_UTF8
(
GetBuildVersion
()
)
);
BOARD_FILE_VERSION
,
DateAndTime
().
GetData
(
),
GetBuildVersion
().
GetData
(
)
);
PROPERTIES
props
;
...
...
pcbnew/kicad_plugin.cpp
View file @
45021493
...
...
@@ -2654,8 +2654,9 @@ void KICAD_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, PROPERTIES* a
if
(
m_props
)
{
wxString
header
=
(
*
m_props
)[
"header"
];
// save a file header, if caller provided one (with trailing \n hopefully).
fprintf
(
m_fp
,
"%s"
,
TO_UTF8
(
(
*
m_props
)[
"header"
]
)
);
fprintf
(
m_fp
,
"%s"
,
TO_UTF8
(
header
)
);
}
saveAllSections
();
...
...
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