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
9f811aaa
Commit
9f811aaa
authored
Oct 08, 2014
by
Brian Sidebotham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Changes before merge
parent
91f85dd0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1378 additions
and
1289 deletions
+1378
-1289
dialog_edit_libentry_fields_in_lib_base.fbp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
+1257
-1257
dialog_eeschema_options.cpp
eeschema/dialogs/dialog_eeschema_options.cpp
+20
-15
dialog_eeschema_options.h
eeschema/dialogs/dialog_eeschema_options.h
+1
-6
dialog_eeschema_options_base.cpp
eeschema/dialogs/dialog_eeschema_options_base.cpp
+3
-0
dialog_eeschema_options_base.fbp
eeschema/dialogs/dialog_eeschema_options_base.fbp
+85
-1
dialog_eeschema_options_base.h
eeschema/dialogs/dialog_eeschema_options_base.h
+12
-10
No files found.
eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
View file @
9f811aaa
This source diff could not be displayed because it is too large. You can
view the blob
instead.
eeschema/dialogs/dialog_eeschema_options.cpp
View file @
9f811aaa
...
...
@@ -31,6 +31,7 @@
#include <dialog_eeschema_options.h>
#include "wx/settings.h"
DIALOG_EESCHEMA_OPTIONS
::
DIALOG_EESCHEMA_OPTIONS
(
wxWindow
*
parent
)
:
DIALOG_EESCHEMA_OPTIONS_BASE
(
parent
)
...
...
@@ -38,7 +39,14 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
m_choiceUnits
->
SetFocus
();
m_sdbSizer1OK
->
SetDefault
();
// Setup the wxListCtrl for displaying the template fieldnames
// Dialog should not shrink beyond it's minimal size.
GetSizer
()
->
SetSizeHints
(
this
);
// The width returned by GetSize includes the amount taken up by the scroll bar, remove the
// scrollbar width
int
listWidth
=
templateFieldListCtrl
->
GetSize
().
GetWidth
()
-
1
;
// - wxSystemSettings::GetMetric( wxSYS_HSCROLL_Y );
wxListItem
col0
;
col0
.
SetId
(
0
);
col0
.
SetText
(
_
(
"Field Name"
)
);
...
...
@@ -54,31 +62,28 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
templateFieldListCtrl
->
InsertColumn
(
0
,
col0
);
templateFieldListCtrl
->
InsertColumn
(
1
,
col1
);
templateFieldListCtrl
->
InsertColumn
(
2
,
col2
);
templateFieldListCtrl
->
SetColumnWidth
(
0
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
templateFieldListCtrl
->
SetColumnWidth
(
1
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
templateFieldListCtrl
->
SetColumnWidth
(
2
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
templateFieldListCtrl
->
SetColumnWidth
(
0
,
200
);
templateFieldListCtrl
->
SetColumnWidth
(
1
,
200
);
templateFieldListCtrl
->
SetColumnWidth
(
2
,
75
);
// Invalid field selected and don't ignore selection events because
// they'll be from the user
selectedField
=
-
1
;
ignoreSelection
=
false
;
// Set the html help for th template editor
m_htmlWin2
->
SetPage
(
_
(
"<b>Template Field Names</b><br>"
"<p>Field names must be unique, and should be alpha-numeric only</p>"
"<p>Some field names are reserved and cannot be used. The following fieldnames are "
"reserved:</p>"
)
);
// Make sure we select the first tab of the options tab page
m_notebook1
->
SetSelection
(
0
);
}
void
DIALOG_EESCHEMA_OPTIONS
::
OnSize
(
wxSizeEvent
&
event
)
{
templateFieldListCtrl
->
SetColumnWidth
(
0
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
templateFieldListCtrl
->
SetColumnWidth
(
1
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
templateFieldListCtrl
->
SetColumnWidth
(
2
,
templateFieldListCtrl
->
GetViewRect
().
GetWidth
()
/
3
);
/* We're just eves dropping on the event, pass it on... */
event
.
Skip
();
}
void
DIALOG_EESCHEMA_OPTIONS
::
SetUnits
(
const
wxArrayString
&
units
,
int
select
)
{
wxASSERT
(
units
.
GetCount
()
>
0
...
...
eeschema/dialogs/dialog_eeschema_options.h
View file @
9f811aaa
...
...
@@ -70,12 +70,7 @@ protected:
* Deletes the selected template fieldname from the template fieldnames data
*/
void
OnDeleteButtonClick
(
wxCommandEvent
&
event
);
/**
* Function OnSize
* Resize any controls that are dynamically sized when the dialog is resized
*/
void
OnSize
(
wxSizeEvent
&
event
);
void
OnInitDialog
(
wxInitDialogEvent
&
event
);
/**
* Function copyPanelToSelected
...
...
eeschema/dialogs/dialog_eeschema_options_base.cpp
View file @
9f811aaa
...
...
@@ -242,6 +242,9 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fieldVisibleCheckbox
=
new
wxCheckBox
(
m_panel2
,
wxID_ANY
,
_
(
"Visible"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
fieldSizer
->
Add
(
fieldVisibleCheckbox
,
0
,
wxALL
,
5
);
m_htmlWin2
=
new
wxHtmlWindow
(
m_panel2
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxHW_SCROLLBAR_AUTO
);
fieldSizer
->
Add
(
m_htmlWin2
,
1
,
wxALL
|
wxEXPAND
,
5
);
bSizer6
->
Add
(
fieldSizer
,
1
,
wxEXPAND
,
5
);
...
...
eeschema/dialogs/dialog_eeschema_options_base.fbp
View file @
9f811aaa
...
...
@@ -45,7 +45,7 @@
<property
name=
"name"
>
DIALOG_EESCHEMA_OPTIONS_BASE
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE
|wxRESIZE_BORDER
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE
</property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
Schematic Editor Options
</property>
<property
name=
"tooltip"
></property>
...
...
@@ -4052,6 +4052,90 @@
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxHtmlWindow"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
<property
name=
"TopDockable"
>
1
</property>
<property
name=
"aui_layer"
></property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
<property
name=
"docking"
>
Left
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_htmlWin2
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxHW_SCROLLBAR_AUTO
</property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnHtmlCellClicked"
></event>
<event
name=
"OnHtmlCellHover"
></event>
<event
name=
"OnHtmlLinkClicked"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"0"
>
...
...
eeschema/dialogs/dialog_eeschema_options_base.h
View file @
9f811aaa
...
...
@@ -31,6 +31,7 @@ class DIALOG_SHIM;
#include <wx/icon.h>
#include <wx/listctrl.h>
#include <wx/textctrl.h>
#include <wx/html/htmlwin.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/notebook.h>
...
...
@@ -45,7 +46,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
{
DECLARE_EVENT_TABLE
()
private
:
// Private event handlers
void
_wxFB_OnSize
(
wxSizeEvent
&
event
){
OnSize
(
event
);
}
void
_wxFB_OnChooseUnits
(
wxCommandEvent
&
event
){
OnChooseUnits
(
event
);
}
...
...
@@ -54,8 +55,8 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
void
_wxFB_OnTemplateFieldSelected
(
wxListEvent
&
event
){
OnTemplateFieldSelected
(
event
);
}
void
_wxFB_OnAddButtonClick
(
wxCommandEvent
&
event
){
OnAddButtonClick
(
event
);
}
void
_wxFB_OnDeleteButtonClick
(
wxCommandEvent
&
event
){
OnDeleteButtonClick
(
event
);
}
protected
:
enum
{
...
...
@@ -64,7 +65,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
wxID_ADD_FIELD
,
wxID_DELETE_FIELD
};
wxNotebook
*
m_notebook1
;
wxPanel
*
m_panel1
;
wxStaticText
*
m_staticText2
;
...
...
@@ -110,12 +111,13 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
wxStaticText
*
fieldDefaultValueLabel
;
wxTextCtrl
*
fieldDefaultValueTextCtrl
;
wxCheckBox
*
fieldVisibleCheckbox
;
wxHtmlWindow
*
m_htmlWin2
;
wxButton
*
addFieldButton
;
wxButton
*
deleteFieldButton
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxButton
*
m_sdbSizer1OK
;
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnSize
(
wxSizeEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnChooseUnits
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
...
...
@@ -124,13 +126,13 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
virtual
void
OnTemplateFieldSelected
(
wxListEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnAddButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDeleteButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_EESCHEMA_OPTIONS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Schematic Editor Options"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
-
1
,
-
1
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_EESCHEMA_OPTIONS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Schematic Editor Options"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
-
1
,
-
1
),
long
style
=
wxDEFAULT_DIALOG_STYLE
);
~
DIALOG_EESCHEMA_OPTIONS_BASE
();
};
#endif //__DIALOG_EESCHEMA_OPTIONS_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