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
3453e670
Commit
3453e670
authored
Dec 22, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: minor enhancements
parent
69b19f51
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
479 additions
and
426 deletions
+479
-426
dialog_edit_label.cpp
eeschema/dialogs/dialog_edit_label.cpp
+11
-14
dialog_edit_label_base.cpp
eeschema/dialogs/dialog_edit_label_base.cpp
+2
-1
dialog_edit_label_base.fbp
eeschema/dialogs/dialog_edit_label_base.fbp
+455
-401
dialog_edit_label_base.h
eeschema/dialogs/dialog_edit_label_base.h
+5
-4
dialog_sch_edit_sheet_pin_base.cpp
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp
+2
-2
dialog_sch_edit_sheet_pin_base.fbp
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp
+3
-3
dialog_sch_edit_sheet_pin_base.h
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h
+1
-1
No files found.
eeschema/dialogs/dialog_edit_label.cpp
View file @
3453e670
...
...
@@ -92,24 +92,18 @@ void DialogLabelEditor::InitDialog()
break
;
}
unsigned
MINTEXTWIDTH
=
40
;
// M's are big characters, a few establish a lot of width
int
MINTEXTWIDTH
=
40
;
// M's are big characters, a few establish a lot of width
if
(
m_CurrentText
->
m_Text
.
Length
()
<
MINTEXTWIDTH
)
int
max_len
=
0
;
if
(
!
multiLine
)
{
wxString
textWidth
;
textWidth
.
Append
(
'M'
,
MINTEXTWIDTH
);
EnsureTextCtrlWidth
(
m_textLabel
,
&
textWidth
);
}
else
if
(
!
multiLine
)
{
EnsureTextCtrlWidth
(
m_textLabel
);
max_len
=
m_CurrentText
->
m_Text
.
Length
();
}
else
{
// calculate the length of the biggest line
// we cannot use the length of the entire text that has no meaning
int
max_len
=
0
;
int
curr_len
=
0
;
int
curr_len
=
MINTEXTWIDTH
;
int
imax
=
m_CurrentText
->
m_Text
.
Len
();
for
(
int
count
=
0
;
count
<
imax
;
count
++
)
{
...
...
@@ -125,10 +119,13 @@ void DialogLabelEditor::InitDialog()
max_len
=
curr_len
;
}
}
wxString
textWidth
;
textWidth
.
Append
(
'M'
,
max_len
);
EnsureTextCtrlWidth
(
m_textLabel
,
&
textWidth
);
}
if
(
max_len
<
MINTEXTWIDTH
)
max_len
=
MINTEXTWIDTH
;
wxString
textWidth
;
textWidth
.
Append
(
'M'
,
MINTEXTWIDTH
);
EnsureTextCtrlWidth
(
m_textLabel
,
&
textWidth
);
// Set validators
m_TextOrient
->
SetSelection
(
m_CurrentText
->
GetSchematicTextOrientation
()
);
...
...
eeschema/dialogs/dialog_edit_label_base.cpp
View file @
3453e670
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 16 2008
)
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -107,4 +107,5 @@ DialogLabelEditor_Base::~DialogLabelEditor_Base()
m_textLabelMultiLine
->
Disconnect
(
wxEVT_COMMAND_TEXT_ENTER
,
wxCommandEventHandler
(
DialogLabelEditor_Base
::
OnEnterKey
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogLabelEditor_Base
::
OnCancelClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DialogLabelEditor_Base
::
OnOkClick
),
NULL
,
this
);
}
eeschema/dialogs/dialog_edit_label_base.fbp
View file @
3453e670
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_edit_label_base.h
View file @
3453e670
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 16 2008
)
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -54,12 +54,13 @@ class DialogLabelEditor_Base : public wxDialog
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnEnterKey
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnEnterKey
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DialogLabelEditor_Base
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Text Editor"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
359
,
347
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DialogLabelEditor_Base
();
...
...
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp
View file @
3453e670
...
...
@@ -11,7 +11,7 @@
DIALOG_SCH_EDIT_SHEET_PIN_BASE
::
DIALOG_SCH_EDIT_SHEET_PIN_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
(
wx
DefaultSize
,
wxDefaultSize
);
this
->
SetSizeHints
(
wx
Size
(
350
,
-
1
)
,
wxDefaultSize
);
wxBoxSizer
*
m_mainSizer
;
m_mainSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
...
@@ -21,6 +21,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
wxFlexGridSizer
*
fgSizer1
;
fgSizer1
=
new
wxFlexGridSizer
(
4
,
3
,
0
,
0
);
fgSizer1
->
AddGrowableCol
(
1
);
fgSizer1
->
SetFlexibleDirection
(
wxBOTH
);
fgSizer1
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_SPECIFIED
);
...
...
@@ -85,7 +86,6 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent
this
->
SetSizer
(
m_mainSizer
);
this
->
Layout
();
m_mainSizer
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
}
...
...
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp
View file @
3453e670
...
...
@@ -34,10 +34,10 @@
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
>
350,-1
</property>
<property
name=
"name"
>
DIALOG_SCH_EDIT_SHEET_PIN_BASE
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"size"
>
350,189
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"subclass"
></property>
<property
name=
"title"
>
Sheet Pin Properties
</property>
...
...
@@ -100,7 +100,7 @@
<object
class=
"wxFlexGridSizer"
expanded=
"1"
>
<property
name=
"cols"
>
3
</property>
<property
name=
"flexible_direction"
>
wxBOTH
</property>
<property
name=
"growablecols"
></property>
<property
name=
"growablecols"
>
1
</property>
<property
name=
"growablerows"
></property>
<property
name=
"hgap"
>
0
</property>
<property
name=
"minimum_size"
></property>
...
...
eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h
View file @
3453e670
...
...
@@ -52,7 +52,7 @@ class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog
public
:
DIALOG_SCH_EDIT_SHEET_PIN_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Sheet Pin Properties"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
DefaultSize
,
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_SCH_EDIT_SHEET_PIN_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Sheet Pin Properties"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wx
Size
(
350
,
189
)
,
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_SCH_EDIT_SHEET_PIN_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