kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31501
[FEATURE] Eeschema Line Styles
One of the Eeschema features that has been requested for a while is
customizable graphic line styles that allow greater differentiation in
schematic documentation. c.f.
https://bugs.launchpad.net/kicad/+bug/594059
https://bugs.launchpad.net/kicad/+bug/1405026
The limitation has been not wanting to change the existing schematic format.
I propose a way around this while implementing the desired feature.
Specifically, the attached patch allows the user to customize graphic lines
(schematic wires are disallowed), with the extra wire data being stored at
the end of the wire line. This change should be transparent to the
existing schematic format as the trailing characters are ignored in the
legacy file reader. Thus customization will be ignored if you are sharing
files between versions.
Second, to avoid large, useless diffs in versioning storage, the patch does
not store any additional formatting data unless it has been changed from
the default.
I'm attaching an image showing the line edit dialog as well as the patch
implementing this. Please let me know if there are any questions or
suggestions for improvement.
Best-
Seth
Attachment:
KicadScreenshot.png
Description: PNG image
From 6eb214e6b4ae5d122ccc211782d72fb4d61206bd Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <hillbrand@xxxxxxxxxxx>
Date: Tue, 31 Oct 2017 09:33:37 -0700
Subject: [PATCH] Eeschema: Adding line styling options
NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.
CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.
Fixes: lp:594059
* https://bugs.launchpad.net/kicad/+bug/594059
Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
---
common/gr_basic.cpp | 27 +-
eeschema/CMakeLists.txt | 2 +
eeschema/dialogs/dialog_edit_line_style.cpp | 90 +++
eeschema/dialogs/dialog_edit_line_style.h | 67 ++
eeschema/dialogs/dialog_edit_line_style_base.cpp | 132 ++++
eeschema/dialogs/dialog_edit_line_style_base.fbp | 859 +++++++++++++++++++++++
eeschema/dialogs/dialog_edit_line_style_base.h | 67 ++
eeschema/sch_collectors.cpp | 1 +
eeschema/sch_legacy_plugin.cpp | 31 +-
eeschema/sch_line.cpp | 151 +++-
eeschema/sch_line.h | 25 +
eeschema/schedit.cpp | 2 +
eeschema/schframe.h | 10 +
include/gr_basic.h | 6 +-
14 files changed, 1449 insertions(+), 21 deletions(-)
create mode 100644 eeschema/dialogs/dialog_edit_line_style.cpp
create mode 100644 eeschema/dialogs/dialog_edit_line_style.h
create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.cpp
create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.fbp
create mode 100644 eeschema/dialogs/dialog_edit_line_style_base.h
diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp
index 0ca4edccb..b69cb7713 100644
--- a/common/gr_basic.cpp
+++ b/common/gr_basic.cpp
@@ -356,18 +356,19 @@ void GRLine( EDA_RECT* ClipBox,
int x2,
int y2,
int width,
- COLOR4D Color )
+ COLOR4D Color,
+ wxPenStyle aStyle)
{
- GRSetColorPen( DC, Color, width );
+ GRSetColorPen( DC, Color, width, aStyle );
WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, width );
GRLastMoveToX = x2;
GRLastMoveToY = y2;
}
-void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor )
+void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor, wxPenStyle aStyle )
{
- GRLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, aColor );
+ GRLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, aColor, aStyle );
}
@@ -375,15 +376,15 @@ void GRDashedLine( EDA_RECT* ClipBox, wxDC* DC,
int x1, int y1, int x2, int y2,
int width, COLOR4D Color )
{
- GRLastMoveToX = x2;
- GRLastMoveToY = y2;
- s_DC_lastcolor = COLOR4D::UNSPECIFIED;
- GRSetColorPen( DC, Color, width, wxPENSTYLE_SHORT_DASH );
- WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, width );
- s_DC_lastcolor = COLOR4D::UNSPECIFIED;
- GRSetColorPen( DC, Color, width );
+ GRLine( ClipBox, DC, x1, y1, x2, y2, width, Color, wxPENSTYLE_SHORT_DASH );
}
+void GRDottedLine( EDA_RECT* ClipBox, wxDC* DC,
+ int x1, int y1, int x2, int y2,
+ int width, COLOR4D Color )
+{
+ GRLine( ClipBox, DC, x1, y1, x2, y2, width, Color, wxPENSTYLE_DOT );
+}
/*
* Move to a new position, in object space.
@@ -407,9 +408,7 @@ void GRLineTo( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int width, COLOR4D Col
void GRMixedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, COLOR4D Color )
{
- GRSetColorPen( DC, Color, width, wxPENSTYLE_DOT_DASH );
- GRLine( ClipBox, DC, x1, y1, x2, y2, width, Color );
- GRSetColorPen( DC, Color, width );
+ GRLine( ClipBox, DC, x1, y1, x2, y2, width, Color, wxPENSTYLE_DOT_DASH );
}
diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 6c6c3406f..5c4b7e762 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -39,6 +39,8 @@ set( EESCHEMA_DLGS
dialogs/dialog_edit_label_base.cpp
dialogs/dialog_edit_libentry_fields_in_lib.cpp
dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
+ dialogs/dialog_edit_line_style.cpp
+ dialogs/dialog_edit_line_style_base.cpp
dialogs/dialog_edit_one_field.cpp
dialogs/dialog_eeschema_config.cpp
dialogs/dialog_eeschema_config_fbp.cpp
diff --git a/eeschema/dialogs/dialog_edit_line_style.cpp b/eeschema/dialogs/dialog_edit_line_style.cpp
new file mode 100644
index 000000000..a727f348a
--- /dev/null
+++ b/eeschema/dialogs/dialog_edit_line_style.cpp
@@ -0,0 +1,90 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2017 Seth Hillbrand <hillbrand@xxxxxxxxxxx>
+ * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <dialog_edit_line_style.h>
+
+
+DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( wxWindow* parent ) :
+ DIALOG_EDIT_LINE_STYLE_BASE( parent )
+{
+ m_sdbSizer1Apply->SetLabel( _( "Default" ) );
+ m_lineStyle->SetSelection( 0 );
+
+ m_lineWidth->SetFocus();
+ defaultStyle = 0;
+ defaultWidth = "";
+ m_sdbSizer1OK->SetDefault();
+
+ // Now all widgets have the size fixed, call FinishDialogSettings
+ FinishDialogSettings();
+
+ // On some windows manager (Unity, XFCE), this dialog is
+ // not always raised, depending on this dialog is run.
+ // Force it to be raised
+ Raise();
+}
+
+void DIALOG_EDIT_LINE_STYLE::resetDefaults( wxCommandEvent& event )
+{
+ SetStyle( defaultStyle );
+ SetWidth( defaultWidth );
+ SetColor( defaultColor );
+ Refresh();
+}
+
+void DIALOG_EDIT_LINE_STYLE::SetColor( const COLOR4D& aColor )
+{
+ m_colorPicker->SetColour( aColor.ToColour() );
+}
+
+void DIALOG_EDIT_LINE_STYLE::SetStyle( const int aStyle )
+{
+ switch( aStyle )
+ {
+ case wxPENSTYLE_SHORT_DASH:
+ m_lineStyle->SetSelection( 1 );
+ break;
+ case wxPENSTYLE_DOT:
+ m_lineStyle->SetSelection( 2 );
+ break;
+ case wxPENSTYLE_DOT_DASH:
+ m_lineStyle->SetSelection( 3 );
+ break;
+ default:
+ m_lineStyle->SetSelection( 0 );
+ break;
+ }
+}
+
+int DIALOG_EDIT_LINE_STYLE::GetStyle()
+{
+ const int retval[4] =
+ {
+ wxPENSTYLE_SOLID,
+ wxPENSTYLE_SHORT_DASH,
+ wxPENSTYLE_DOT,
+ wxPENSTYLE_DOT_DASH,
+ };
+ return retval[ m_lineStyle->GetSelection() ];
+}
diff --git a/eeschema/dialogs/dialog_edit_line_style.h b/eeschema/dialogs/dialog_edit_line_style.h
new file mode 100644
index 000000000..522dba98e
--- /dev/null
+++ b/eeschema/dialogs/dialog_edit_line_style.h
@@ -0,0 +1,67 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2017 Seth Hillbrand <hillbrand@xxxxxxxxxxx>
+ * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __dialog_edit_line_style__
+#define __dialog_edit_line_style__
+
+
+/**
+ * @file
+ * Subclass of DIALOG_EDIT_LINE_STYLE_BASE, which is generated by wxFormBuilder.
+ */
+
+#include <dialog_edit_line_style_base.h>
+#include <sch_line.h>
+
+
+class DIALOG_EDIT_LINE_STYLE : public DIALOG_EDIT_LINE_STYLE_BASE
+{
+public:
+ DIALOG_EDIT_LINE_STYLE( wxWindow* parent );
+
+ void SetWidth( const wxString& aWidth ) { m_lineWidth->SetValue( aWidth ); }
+ void SetDefaultWidth( const wxString& aWidth ) { defaultWidth = aWidth; }
+ wxString GetWidth() const { return m_lineWidth->GetValue(); }
+
+ COLOR4D GetColor() const { return COLOR4D( m_colorPicker->GetColour() ); }
+ void SetColor( const COLOR4D& aColor );
+ void SetDefaultColor( const COLOR4D& aColor ) { defaultColor = aColor; }
+
+ void SetStyle( const int aStyle );
+ void SetDefaultStyle( const int aStyle ) { defaultStyle = aStyle; }
+ int GetStyle();
+
+ void SetLineWidthUnits(const wxString& aUnits)
+ {
+ m_staticWidthUnits->SetLabel( aUnits );
+ }
+private:
+ int defaultStyle;
+ wxString defaultWidth;
+ COLOR4D defaultColor;
+
+ void resetDefaults( wxCommandEvent& event ) override;
+};
+
+#endif // __dialog_edit_line_style__
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.cpp b/eeschema/dialogs/dialog_edit_line_style_base.cpp
new file mode 100644
index 000000000..53ba1fa1b
--- /dev/null
+++ b/eeschema/dialogs/dialog_edit_line_style_base.cpp
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov 9 2017)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_edit_line_style_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+BEGIN_EVENT_TABLE( DIALOG_EDIT_LINE_STYLE_BASE, DIALOG_SHIM )
+ EVT_BUTTON( wxID_APPLY, DIALOG_EDIT_LINE_STYLE_BASE::_wxFB_resetDefaults )
+END_EVENT_TABLE()
+
+DIALOG_EDIT_LINE_STYLE_BASE::DIALOG_EDIT_LINE_STYLE_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 );
+
+ wxBoxSizer* mainSizer;
+ mainSizer = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* dlgBorderSizer;
+ dlgBorderSizer = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText1 = new wxStaticText( this, wxID_ANY, _("General"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1->Wrap( -1 );
+ m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ dlgBorderSizer->Add( m_staticText1, 0, wxALIGN_LEFT, 3 );
+
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer31->Add( 0, 0, 1, wxEXPAND, 3 );
+
+ m_staticWidth1 = new wxStaticText( this, wxID_ANY, _("&Width:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticWidth1->Wrap( -1 );
+ bSizer31->Add( m_staticWidth1, 2, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
+
+
+ bSizer31->Add( 0, 0, 1, wxEXPAND, 3 );
+
+ m_lineWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ #ifdef __WXGTK__
+ if ( !m_lineWidth->HasFlag( wxTE_MULTILINE ) )
+ {
+ m_lineWidth->SetMaxLength( 6 );
+ }
+ #else
+ m_lineWidth->SetMaxLength( 6 );
+ #endif
+ bSizer31->Add( m_lineWidth, 2, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
+
+ m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticWidthUnits->Wrap( -1 );
+ bSizer31->Add( m_staticWidthUnits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
+
+
+ bSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+ dlgBorderSizer->Add( bSizer31, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer5;
+ bSizer5 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_staticText5 = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText5->Wrap( -1 );
+ bSizer5->Add( m_staticText5, 2, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+ bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
+
+ m_colorPicker = new wxColourPickerCtrl( this, wxID_ANY, wxColour( 0, 0, 0 ), wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
+ bSizer5->Add( m_colorPicker, 2, wxALL, 5 );
+
+
+ bSizer5->Add( 0, 0, 2, wxEXPAND, 5 );
+
+
+ dlgBorderSizer->Add( bSizer5, 1, wxEXPAND, 1 );
+
+ wxBoxSizer* bSizer4;
+ bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+
+ bSizer4->Add( 0, 0, 1, 0, 2 );
+
+ wxString m_lineStyleChoices[] = { _("Solid"), _("Dashed"), _("Dotted"), _("Dash-Dot") };
+ int m_lineStyleNChoices = sizeof( m_lineStyleChoices ) / sizeof( wxString );
+ m_lineStyle = new wxRadioBox( this, wxID_ANY, _("Line Style"), wxDefaultPosition, wxDefaultSize, m_lineStyleNChoices, m_lineStyleChoices, 4, wxRA_SPECIFY_ROWS );
+ m_lineStyle->SetSelection( 0 );
+ bSizer4->Add( m_lineStyle, 3, wxALL|wxEXPAND, 5 );
+
+
+ bSizer4->Add( 0, 0, 1, 0, 2 );
+
+
+ dlgBorderSizer->Add( bSizer4, 0, wxALL|wxEXPAND, 0 );
+
+
+ dlgBorderSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 1 );
+
+ m_sdbSizer1 = new wxStdDialogButtonSizer();
+ m_sdbSizer1OK = new wxButton( this, wxID_OK );
+ m_sdbSizer1->AddButton( m_sdbSizer1OK );
+ m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
+ m_sdbSizer1->AddButton( m_sdbSizer1Apply );
+ m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
+ m_sdbSizer1->Realize();
+
+ dlgBorderSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 0 );
+
+
+ mainSizer->Add( dlgBorderSizer, 1, wxALL|wxEXPAND, 12 );
+
+
+ this->SetSizer( mainSizer );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+}
+
+DIALOG_EDIT_LINE_STYLE_BASE::~DIALOG_EDIT_LINE_STYLE_BASE()
+{
+}
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.fbp b/eeschema/dialogs/dialog_edit_line_style_base.fbp
new file mode 100644
index 000000000..ab5e0378b
--- /dev/null
+++ b/eeschema/dialogs/dialog_edit_line_style_base.fbp
@@ -0,0 +1,859 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+ <FileVersion major="1" minor="13" />
+ <object class="Project" expanded="1">
+ <property name="class_decoration"></property>
+ <property name="code_generation">C++</property>
+ <property name="disconnect_events">1</property>
+ <property name="disconnect_mode">source_name</property>
+ <property name="disconnect_php_events">0</property>
+ <property name="disconnect_python_events">0</property>
+ <property name="embedded_files_path">res</property>
+ <property name="encoding">UTF-8</property>
+ <property name="event_generation">table</property>
+ <property name="file">dialog_edit_line_style_base</property>
+ <property name="first_id">1000</property>
+ <property name="help_provider">none</property>
+ <property name="internationalize">1</property>
+ <property name="name">dialog_edit_line_style</property>
+ <property name="namespace"></property>
+ <property name="path">.</property>
+ <property name="precompiled_header"></property>
+ <property name="relative_path">1</property>
+ <property name="skip_lua_events">1</property>
+ <property name="skip_php_events">1</property>
+ <property name="skip_python_events">1</property>
+ <property name="ui_table">UI</property>
+ <property name="use_enum">1</property>
+ <property name="use_microsoft_bom">0</property>
+ <object class="Dialog" expanded="1">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">DIALOG_EDIT_LINE_STYLE_BASE</property>
+ <property name="pos"></property>
+ <property name="size">296,310</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+ <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
+ <property name="title">Line Style</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></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 class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">mainSizer</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">12</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">dlgBorderSizer</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">3</property>
+ <property name="flag">wxALIGN_LEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" 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">,90,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">General</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_staticText1</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"></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>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></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 class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer31</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">3</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">3</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+ <property name="proportion">2</property>
+ <object class="wxStaticText" expanded="0">
+ <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="label">&Width:</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_staticWidth1</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"></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>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></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 class="sizeritem" expanded="0">
+ <property name="border">3</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">3</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+ <property name="proportion">2</property>
+ <object class="wxTextCtrl" expanded="0">
+ <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="maxlength">6</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_lineWidth</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"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type">bool</property>
+ <property name="validator_style">wxFILTER_NUMERIC</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable">m_isValid</property>
+ <property name="value"></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="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="OnText"></event>
+ <event name="OnTextEnter"></event>
+ <event name="OnTextMaxLen"></event>
+ <event name="OnTextURL"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">3</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxStaticText" expanded="0">
+ <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="label">mm</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_staticWidthUnits</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"></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>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></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 class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">1</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer5</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="1">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+ <property name="proportion">2</property>
+ <object class="wxStaticText" 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="label">Color:</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_staticText5</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"></property>
+ <property name="subclass">; forward_declare</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>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></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 class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="1">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">2</property>
+ <object class="wxColourPickerCtrl" 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="colour">0,0,0</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_colorPicker</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">wxCLRP_DEFAULT_STYLE</property>
+ <property name="subclass">; forward_declare</property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnColourChanged"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></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 class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">2</property>
+ <object class="spacer" expanded="1">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">0</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer4</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">2</property>
+ <property name="flag"></property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">3</property>
+ <object class="wxRadioBox" expanded="0">
+ <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="choices">"Solid" "Dashed" "Dotted" "Dash-Dot"</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="label">Line Style</property>
+ <property name="majorDimension">4</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_lineStyle</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="selection">0</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxRA_SPECIFY_ROWS</property>
+ <property name="subclass">; forward_declare</property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></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="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="OnRadioBox"></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 class="sizeritem" expanded="0">
+ <property name="border">2</property>
+ <property name="flag"></property>
+ <property name="proportion">1</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">1</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="spacer" expanded="1">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">0</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="1">
+ <property name="Apply">1</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer1</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick">resetDefaults</event>
+ <event name="OnCancelButtonClick"></event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick"></event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</wxFormBuilder_Project>
diff --git a/eeschema/dialogs/dialog_edit_line_style_base.h b/eeschema/dialogs/dialog_edit_line_style_base.h
new file mode 100644
index 000000000..35df03c7a
--- /dev/null
+++ b/eeschema/dialogs/dialog_edit_line_style_base.h
@@ -0,0 +1,67 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov 9 2017)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO *NOT* EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_EDIT_LINE_STYLE_BASE_H__
+#define __DIALOG_EDIT_LINE_STYLE_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+#include "dialog_shim.h"
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/textctrl.h>
+#include <wx/sizer.h>
+#include <wx/clrpicker.h>
+#include <wx/radiobox.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_EDIT_LINE_STYLE_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM
+{
+ DECLARE_EVENT_TABLE()
+ private:
+
+ // Private event handlers
+ void _wxFB_resetDefaults( wxCommandEvent& event ){ resetDefaults( event ); }
+
+
+ protected:
+ wxStaticText* m_staticText1;
+ wxStaticText* m_staticWidth1;
+ wxTextCtrl* m_lineWidth;
+ wxStaticText* m_staticWidthUnits;
+ wxStaticText* m_staticText5;
+ wxColourPickerCtrl* m_colorPicker;
+ wxRadioBox* m_lineStyle;
+ wxStdDialogButtonSizer* m_sdbSizer1;
+ wxButton* m_sdbSizer1OK;
+ wxButton* m_sdbSizer1Apply;
+ wxButton* m_sdbSizer1Cancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void resetDefaults( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+ bool m_isValid;
+
+ DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 296,310 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DIALOG_EDIT_LINE_STYLE_BASE();
+
+};
+
+#endif //__DIALOG_EDIT_LINE_STYLE_BASE_H__
diff --git a/eeschema/sch_collectors.cpp b/eeschema/sch_collectors.cpp
index 671c611a2..915d9616e 100644
--- a/eeschema/sch_collectors.cpp
+++ b/eeschema/sch_collectors.cpp
@@ -87,6 +87,7 @@ const KICAD_T SCH_COLLECTOR::EditableItems[] = {
SCH_SHEET_PIN_T,
SCH_SHEET_T,
SCH_BITMAP_T,
+ SCH_LINE_T,
EOT
};
diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp
index b7daee5ec..52d667e98 100644
--- a/eeschema/sch_legacy_plugin.cpp
+++ b/eeschema/sch_legacy_plugin.cpp
@@ -1145,6 +1145,25 @@ SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( FILE_LINE_READER& aReader )
end.x = parseInt( aReader, line, &line );
end.y = parseInt( aReader, line, &line );
+ if( !is_eol( *line ) )
+ {
+ int size = parseInt( aReader, line, &line );
+ wire->SetLineWidth( size );
+ }
+ if( !is_eol( *line ) )
+ {
+ int style = parseInt( aReader, line, &line );
+ wire->SetLineStyle( style );
+ }
+ if( !is_eol( *line ) )
+ {
+ double color[ 4 ] = { 0. };
+ for( int i = 0; i < 4 && !is_eol( *line ); i++ )
+ color[i] = parseDouble( aReader, line, &line );
+
+ wire->SetLineColor( color[0], color[1], color[2], color[3] );
+ }
+
wire->SetStartPoint( begin );
wire->SetEndPoint( end );
@@ -1954,6 +1973,9 @@ void SCH_LEGACY_PLUGIN::saveLine( SCH_LINE* aLine )
const char* layer = "Notes";
const char* width = "Line";
+ bool styled = aLine->GetPenSize() != aLine->GetDefaultWidth()
+ || aLine->GetLineStyle() != aLine->GetDefaultStyle()
+ || aLine->GetLineColor() != aLine->GetDefaultColor();
if( aLine->GetLayer() == LAYER_WIRE )
layer = "Wire";
@@ -1961,8 +1983,15 @@ void SCH_LEGACY_PLUGIN::saveLine( SCH_LINE* aLine )
layer = "Bus";
m_out->Print( 0, "Wire %s %s\n", layer, width );
- m_out->Print( 0, "\t%-4d %-4d %-4d %-4d\n", aLine->GetStartPoint().x, aLine->GetStartPoint().y,
+ m_out->Print( 0, "\t%-4d %-4d %-4d %-4d", aLine->GetStartPoint().x, aLine->GetStartPoint().y,
aLine->GetEndPoint().x, aLine->GetEndPoint().y );
+ if( styled )
+ m_out->Print( 0, " %-4d %-4d %-.4f %-.4f %-.4f %-.4f",
+ aLine->GetLineSize(), aLine->GetLineStyle(),
+ aLine->GetLineColor().r, aLine->GetLineColor().g,
+ aLine->GetLineColor().b, aLine->GetLineColor().a );
+
+ m_out->Print( 0, "\n");
}
diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp
index 21b6fe8fd..bc11c4f01 100644
--- a/eeschema/sch_line.cpp
+++ b/eeschema/sch_line.cpp
@@ -37,8 +37,10 @@
#include <general.h>
#include <protos.h>
#include <sch_line.h>
+#include <schframe.h>
#include <class_netlist_object.h>
+#include <dialogs/dialog_edit_line_style.h>
SCH_LINE::SCH_LINE( const wxPoint& pos, int layer ) :
SCH_ITEM( NULL, SCH_LINE_T )
@@ -46,6 +48,9 @@ SCH_LINE::SCH_LINE( const wxPoint& pos, int layer ) :
m_start = pos;
m_end = pos;
m_startIsDangling = m_endIsDangling = false;
+ m_size = 0;
+ m_style = 0;
+ m_color = COLOR4D::UNSPECIFIED;
switch( layer )
{
@@ -69,6 +74,9 @@ SCH_LINE::SCH_LINE( const SCH_LINE& aLine ) :
{
m_start = aLine.m_start;
m_end = aLine.m_end;
+ m_size = aLine.m_size;
+ m_style = aLine.m_style;
+ m_color = aLine.m_color;
m_startIsDangling = m_endIsDangling = false;
}
@@ -200,9 +208,84 @@ bool SCH_LINE::Load( LINE_READER& aLine, wxString& aErrorMsg )
return true;
}
+COLOR4D SCH_LINE::GetDefaultColor() const
+{
+ return GetLayerColor( m_Layer );
+}
+
+void SCH_LINE::SetLineColor( const COLOR4D aColor )
+{
+ if( aColor == GetDefaultColor() )
+ m_color = COLOR4D::UNSPECIFIED;
+ else
+ m_color = aColor;
+}
+
+void SCH_LINE::SetLineColor( const double r, const double g, const double b, const double a )
+{
+ COLOR4D defaultColor = GetDefaultColor();
+ COLOR4D newColor(r, g, b, a);
+ if( newColor == defaultColor )
+ m_color = COLOR4D::UNSPECIFIED;
+ else
+ m_color = newColor;
+}
+
+COLOR4D SCH_LINE::GetLineColor() const
+{
+ if( m_color == COLOR4D::UNSPECIFIED )
+ return GetLayerColor( m_Layer );
+
+ return m_color;
+}
+
+enum wxPenStyle SCH_LINE::GetDefaultStyle() const
+{
+ if( m_Layer == LAYER_NOTES )
+ return wxPENSTYLE_SHORT_DASH;
+
+ return wxPENSTYLE_SOLID;
+}
+
+void SCH_LINE::SetLineStyle( const int aStyle )
+{
+ if( aStyle == GetDefaultStyle() )
+ m_style = 0;
+ else
+ m_style = aStyle;
+}
+
+enum wxPenStyle SCH_LINE::GetLineStyle() const
+{
+ if( m_style > 0 )
+ return (enum wxPenStyle) m_style;
+
+ if( m_Layer == LAYER_NOTES )
+ return wxPENSTYLE_SHORT_DASH;
+
+ return wxPENSTYLE_SOLID;
+}
+
+int SCH_LINE::GetDefaultWidth() const
+{
+ if( m_Layer == LAYER_BUS )
+ return GetDefaultBusThickness();
+
+ return GetDefaultLineThickness();
+}
+
+void SCH_LINE::SetLineWidth( const int aSize )
+{
+ if( aSize == GetDefaultWidth() )
+ m_size = 0;
+ else
+ m_size = aSize;
+}
int SCH_LINE::GetPenSize() const
{
+ if( m_size > 0 )
+ return m_size;
if( m_Layer == LAYER_BUS )
return GetDefaultBusThickness();
@@ -219,6 +302,8 @@ void SCH_LINE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
if( Color != COLOR4D::UNSPECIFIED )
color = Color;
+ else if( m_color != COLOR4D::UNSPECIFIED )
+ color = m_color;
else
color = GetLayerColor( GetState( BRIGHTENED ) ? LAYER_BRIGHTENED : m_Layer );
@@ -233,10 +318,7 @@ void SCH_LINE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
if( ( m_Flags & ENDPOINT ) == 0 )
end += offset;
- if( m_Layer == LAYER_NOTES )
- GRDashedLine( panel->GetClipBox(), DC, start.x, start.y, end.x, end.y, width, color );
- else
- GRLine( panel->GetClipBox(), DC, start, end, width, color );
+ GRLine( panel->GetClipBox(), DC, start.x, start.y, end.x, end.y, width, color, GetLineStyle() );
if( m_startIsDangling )
DrawDanglingSymbol( panel, DC, start, color );
@@ -567,6 +649,20 @@ bool SCH_LINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy )
return rect.Intersects( m_start, m_end );
}
+void SCH_LINE::SwapData( SCH_ITEM* aItem )
+{
+ SCH_LINE* item = (SCH_LINE*) aItem;
+
+ std::swap( m_Layer, item->m_Layer );
+
+ std::swap( m_start, item->m_start );
+ std::swap( m_end, item->m_end );
+ std::swap( m_startIsDangling, item->m_startIsDangling );
+ std::swap( m_endIsDangling, item->m_endIsDangling );
+ std::swap( m_style, item->m_style );
+ std::swap( m_size, item->m_size );
+ std::swap( m_color, item->m_color );
+}
bool SCH_LINE::doIsConnected( const wxPoint& aPosition ) const
{
@@ -604,3 +700,50 @@ wxPoint SCH_LINE::MidPoint()
{
return wxPoint( ( m_start.x + m_end.x ) / 2, ( m_start.y + m_end.y ) / 2 );
}
+
+
+int SCH_EDIT_FRAME::EditLine( SCH_LINE* aLine, bool aRedraw )
+{
+ if( aLine == NULL )
+ return wxID_CANCEL;
+
+ // We purposely disallow editing everything except graphic lines
+ if( aLine->GetLayer() != LAYER_NOTES )
+ return wxID_CANCEL;
+
+ DIALOG_EDIT_LINE_STYLE dlg( this );
+ wxString units = GetUnitsLabel( g_UserUnit );
+ int old_style = aLine->GetLineStyle();
+ int old_width = aLine->GetPenSize();
+ COLOR4D old_color = aLine->GetLineColor();
+
+ dlg.SetDefaultStyle( aLine->GetDefaultStyle() );
+ dlg.SetDefaultWidth( StringFromValue( g_UserUnit, aLine->GetDefaultWidth(), false ) );
+ dlg.SetDefaultColor( aLine->GetDefaultColor() );
+
+ dlg.SetWidth( StringFromValue( g_UserUnit, old_width, false ) );
+ dlg.SetStyle( old_style );
+ dlg.SetLineWidthUnits( units );
+ dlg.SetColor( old_color );
+
+ if( dlg.ShowModal() == wxID_CANCEL )
+ return wxID_CANCEL;
+
+ int new_width = ValueFromString( dlg.GetWidth() );
+ int new_style = dlg.GetStyle();
+ COLOR4D new_color = dlg.GetColor();
+
+ if( new_width != old_width || new_style != old_style || new_color != old_color )
+ {
+ SaveCopyInUndoList( (SCH_ITEM*) aLine, UR_CHANGED );
+ aLine->SetLineWidth( new_width );
+ aLine->SetLineStyle( new_style );
+ aLine->SetLineColor( new_color );
+
+ OnModify();
+ if( aRedraw )
+ m_canvas->Refresh();
+ }
+
+ return wxID_OK;
+}
diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h
index 7b8cf5d1b..db5ab1873 100644
--- a/eeschema/sch_line.h
+++ b/eeschema/sch_line.h
@@ -45,6 +45,9 @@ class SCH_LINE : public SCH_ITEM
bool m_endIsDangling; ///< True if end point is not connected.
wxPoint m_start; ///< Line start point
wxPoint m_end; ///< Line end point
+ int m_size; ///< Line pensize
+ int m_style; ///< Line style
+ COLOR4D m_color; ///< Line color
public:
SCH_LINE( const wxPoint& pos = wxPoint( 0, 0 ), int layer = LAYER_NOTES );
@@ -76,6 +79,26 @@ public:
void SetEndPoint( const wxPoint& aPosition ) { m_end = aPosition; }
+ enum wxPenStyle GetDefaultStyle() const;
+
+ void SetLineStyle( const int aStyle );
+
+ enum wxPenStyle GetLineStyle() const;
+
+ void SetLineColor( const COLOR4D aColor );
+
+ void SetLineColor( const double r, const double g, const double b, const double a );
+
+ COLOR4D GetLineColor() const;
+
+ COLOR4D GetDefaultColor() const;
+
+ int GetDefaultWidth() const;
+
+ void SetLineWidth( const int aSize );
+
+ int GetLineSize() const { return m_size; }
+
const EDA_RECT GetBoundingBox() const override;
/**
@@ -147,6 +170,8 @@ public:
EDA_ITEM* Clone() const override;
+ void SwapData( SCH_ITEM* aItem ) override;
+
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override;
#endif
diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp
index b350c5634..e33743b32 100644
--- a/eeschema/schedit.cpp
+++ b/eeschema/schedit.cpp
@@ -1064,6 +1064,8 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
break;
case SCH_LINE_T: // These items have no param to edit
+ EditLine( (SCH_LINE*) item, true );
+ break;
case SCH_MARKER_T:
case SCH_JUNCTION_T:
case SCH_NO_CONNECT_T:
diff --git a/eeschema/schframe.h b/eeschema/schframe.h
index 72402e94c..005fae666 100644
--- a/eeschema/schframe.h
+++ b/eeschema/schframe.h
@@ -1036,6 +1036,16 @@ private:
/// Loads the cache library associated to the aFileName
bool LoadCacheLibrary( const wxString& aFileName );
+private:
+ /**
+ * Function EditLine
+ * displays the dialog for editing the parameters of \a aLine.
+ * @param aLine The Line/Wire/Bus to edit.
+ * @param aRedraw = true to refresh the screen
+ * @return The user response from the edit dialog.
+ */
+ int EditLine( SCH_LINE* aLine, bool aRedraw );
+
public:
/**
* Function EditSheet
diff --git a/include/gr_basic.h b/include/gr_basic.h
index 1e4d513d6..008d1cf0c 100644
--- a/include/gr_basic.h
+++ b/include/gr_basic.h
@@ -112,13 +112,15 @@ void GRForceBlackPen( bool flagforce );
bool GetGRForceBlackPenState( void );
void GRLine( EDA_RECT* aClipBox, wxDC* aDC,
- wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor );
+ wxPoint aStart, wxPoint aEnd, int aWidth, COLOR4D aColor, wxPenStyle aStyle = wxPENSTYLE_SOLID );
void GRLine( EDA_RECT* ClipBox, wxDC* DC,
- int x1, int y1, int x2, int y2, int width, COLOR4D Color );
+ int x1, int y1, int x2, int y2, int width, COLOR4D Color, wxPenStyle aStyle = wxPENSTYLE_SOLID );
void GRMixedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, COLOR4D Color );
void GRDashedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, COLOR4D Color );
+void GRDottedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
+ int width, COLOR4D Color );
void GRMoveTo( int x, int y );
void GRLineTo( EDA_RECT* ClipBox, wxDC* DC,
int x, int y, int width, COLOR4D Color );
--
2.11.0
Follow ups