From 039ac92480a09266146fc5b0c9ec67a32a2565ad Mon Sep 17 00:00:00 2001
From: saurabhb17
Date: Wed, 26 Feb 2020 16:04:40 +0530
Subject: Added secondary files
---
pagelayout_editor/CMakeLists.txt | 165 +
pagelayout_editor/Info.plist | 35 +
pagelayout_editor/class_pl_editor_layout.cpp | 53 +
pagelayout_editor/class_pl_editor_layout.h | 97 +
pagelayout_editor/class_pl_editor_screen.cpp | 140 +
pagelayout_editor/class_pl_editor_screen.h | 80 +
pagelayout_editor/controle.cpp | 62 +
pagelayout_editor/design_tree_frame.cpp | 291 +
pagelayout_editor/design_tree_frame.h | 108 +
pagelayout_editor/dialogs/dialog_new_dataitem.cpp | 185 +
.../dialogs/dialog_new_dataitem_base.cpp | 157 +
.../dialogs/dialog_new_dataitem_base.fbp | 1666 +++++
.../dialogs/dialog_new_dataitem_base.h | 76 +
pagelayout_editor/dialogs/dialogs_for_printing.cpp | 251 +
.../dialogs/properties_frame_base.cpp | 638 ++
.../dialogs/properties_frame_base.fbp | 7684 ++++++++++++++++++++
pagelayout_editor/dialogs/properties_frame_base.h | 145 +
pagelayout_editor/events_functions.cpp | 589 ++
pagelayout_editor/files.cpp | 260 +
pagelayout_editor/hotkeys.cpp | 256 +
pagelayout_editor/hotkeys.h | 51 +
pagelayout_editor/invoke_pl_editor_dialog.h | 67 +
pagelayout_editor/menubar.cpp | 183 +
pagelayout_editor/onleftclick.cpp | 77 +
pagelayout_editor/onrightclick.cpp | 127 +
pagelayout_editor/page_layout_writer.cpp | 472 ++
pagelayout_editor/pl_editor.cpp | 206 +
pagelayout_editor/pl_editor.icns | Bin 0 -> 12539 bytes
pagelayout_editor/pl_editor.rc | 3 +
pagelayout_editor/pl_editor_config.cpp | 104 +
pagelayout_editor/pl_editor_doc.icns | Bin 0 -> 55232 bytes
pagelayout_editor/pl_editor_frame.cpp | 786 ++
pagelayout_editor/pl_editor_frame.h | 374 +
pagelayout_editor/pl_editor_id.h | 79 +
pagelayout_editor/pl_editor_undo_redo.cpp | 161 +
pagelayout_editor/properties_frame.cpp | 493 ++
pagelayout_editor/properties_frame.h | 70 +
pagelayout_editor/toolbars_pl_editor.cpp | 167 +
38 files changed, 16358 insertions(+)
create mode 100644 pagelayout_editor/CMakeLists.txt
create mode 100644 pagelayout_editor/Info.plist
create mode 100644 pagelayout_editor/class_pl_editor_layout.cpp
create mode 100644 pagelayout_editor/class_pl_editor_layout.h
create mode 100644 pagelayout_editor/class_pl_editor_screen.cpp
create mode 100644 pagelayout_editor/class_pl_editor_screen.h
create mode 100644 pagelayout_editor/controle.cpp
create mode 100644 pagelayout_editor/design_tree_frame.cpp
create mode 100644 pagelayout_editor/design_tree_frame.h
create mode 100644 pagelayout_editor/dialogs/dialog_new_dataitem.cpp
create mode 100644 pagelayout_editor/dialogs/dialog_new_dataitem_base.cpp
create mode 100644 pagelayout_editor/dialogs/dialog_new_dataitem_base.fbp
create mode 100644 pagelayout_editor/dialogs/dialog_new_dataitem_base.h
create mode 100644 pagelayout_editor/dialogs/dialogs_for_printing.cpp
create mode 100644 pagelayout_editor/dialogs/properties_frame_base.cpp
create mode 100644 pagelayout_editor/dialogs/properties_frame_base.fbp
create mode 100644 pagelayout_editor/dialogs/properties_frame_base.h
create mode 100644 pagelayout_editor/events_functions.cpp
create mode 100644 pagelayout_editor/files.cpp
create mode 100644 pagelayout_editor/hotkeys.cpp
create mode 100644 pagelayout_editor/hotkeys.h
create mode 100644 pagelayout_editor/invoke_pl_editor_dialog.h
create mode 100644 pagelayout_editor/menubar.cpp
create mode 100644 pagelayout_editor/onleftclick.cpp
create mode 100644 pagelayout_editor/onrightclick.cpp
create mode 100644 pagelayout_editor/page_layout_writer.cpp
create mode 100644 pagelayout_editor/pl_editor.cpp
create mode 100644 pagelayout_editor/pl_editor.icns
create mode 100644 pagelayout_editor/pl_editor.rc
create mode 100644 pagelayout_editor/pl_editor_config.cpp
create mode 100644 pagelayout_editor/pl_editor_doc.icns
create mode 100644 pagelayout_editor/pl_editor_frame.cpp
create mode 100644 pagelayout_editor/pl_editor_frame.h
create mode 100644 pagelayout_editor/pl_editor_id.h
create mode 100644 pagelayout_editor/pl_editor_undo_redo.cpp
create mode 100644 pagelayout_editor/properties_frame.cpp
create mode 100644 pagelayout_editor/properties_frame.h
create mode 100644 pagelayout_editor/toolbars_pl_editor.cpp
(limited to 'pagelayout_editor')
diff --git a/pagelayout_editor/CMakeLists.txt b/pagelayout_editor/CMakeLists.txt
new file mode 100644
index 0000000..5177c56
--- /dev/null
+++ b/pagelayout_editor/CMakeLists.txt
@@ -0,0 +1,165 @@
+# the map generation creates on Windows/gcc a lot of useless warnings
+# so disable it on windows
+if( WIN32 AND NOT CMAKE_CROSSCOMPILING )
+ set( MAKE_LINK_MAPS false )
+else()
+ set( MAKE_LINK_MAPS true )
+endif()
+
+add_definitions(-DPL_EDITOR)
+
+include_directories(BEFORE ${INC_BEFORE})
+include_directories(
+ dialogs
+ ../common/dialogs
+ ${INC_AFTER}
+ )
+
+set( PL_EDITOR_SRCS
+ dialogs/properties_frame_base.cpp
+ dialogs/dialogs_for_printing.cpp
+ dialogs/dialog_new_dataitem_base.cpp
+ dialogs/dialog_new_dataitem.cpp
+ class_pl_editor_screen.cpp
+ class_pl_editor_layout.cpp
+ design_tree_frame.cpp
+ events_functions.cpp
+ controle.cpp
+ files.cpp
+ onleftclick.cpp
+ onrightclick.cpp
+ page_layout_writer.cpp
+ pl_editor_config.cpp
+ pl_editor_frame.cpp
+ pl_editor_undo_redo.cpp
+ properties_frame.cpp
+ hotkeys.cpp
+ menubar.cpp
+ toolbars_pl_editor.cpp
+ )
+
+set( PL_EDITOR_EXTRA_SRCS
+ ../common/base_screen.cpp
+ ../common/base_units.cpp
+ ../common/eda_text.cpp
+ ../common/class_page_info.cpp
+ ../common/dialogs/dialog_page_settings.cpp
+)
+
+
+if( MINGW )
+ # PL_EDITOR_RESOURCES variable is set by the macro.
+ mingw_resource_compiler( pl_editor )
+else()
+ set( PL_EDITOR_RESOURCES pl_editor.rc )
+endif()
+
+
+if( APPLE )
+ # setup bundle
+ set( PL_EDITOR_RESOURCES pl_editor.icns pl_editor_doc.icns )
+ set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor.icns" PROPERTIES
+ MACOSX_PACKAGE_LOCATION Resources
+ )
+ set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pl_editor_doc.icns" PROPERTIES
+ MACOSX_PACKAGE_LOCATION Resources
+ )
+ set( MACOSX_BUNDLE_ICON_FILE pl_editor.icns )
+ set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-pcb.kicad )
+ set( MACOSX_BUNDLE_NAME pl_editor )
+endif()
+
+# a very small program launcher for pl_editor_kiface
+add_executable( pl_editor WIN32 MACOSX_BUNDLE
+ ../common/single_top.cpp
+ ../common/pgm_base.cpp
+ ${PL_EDITOR_RESOURCES}
+ )
+set_source_files_properties( ../common/single_top.cpp PROPERTIES
+ COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PL_EDITOR;PGM_DATA_FILE_EXT=\"kicad_wks\";BUILD_KIWAY_DLL"
+ )
+target_link_libraries( pl_editor
+ #singletop # replaces common, giving us restrictive control and link warnings.
+ # There's way too much crap coming in from common yet.
+ common
+ bitmaps
+ ${wxWidgets_LIBRARIES}
+ )
+
+if( MAKE_LINK_MAPS )
+ set_target_properties( pl_editor PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=pl_editor.map" )
+endif()
+
+# the main pl_editor program, in DSO form.
+add_library( pl_editor_kiface MODULE
+ pl_editor.cpp
+ ${PL_EDITOR_SRCS}
+ ${DIALOGS_SRCS}
+ ${PL_EDITOR_EXTRA_SRCS}
+ )
+target_link_libraries( pl_editor_kiface
+ common
+ polygon
+ bitmaps
+ gal
+ ${wxWidgets_LIBRARIES}
+ ${GDI_PLUS_LIBRARIES}
+ )
+set_target_properties( pl_editor_kiface PROPERTIES
+ OUTPUT_NAME pl_editor
+ PREFIX ${KIFACE_PREFIX}
+ SUFFIX ${KIFACE_SUFFIX}
+ )
+set_source_files_properties( pl_editor.cpp PROPERTIES
+ # The KIFACE is in pcbnew.cpp, export it:
+ COMPILE_DEFINITIONS "BUILD_KIWAY_DLL;COMPILING_DLL"
+ )
+
+if( MAKE_LINK_MAPS )
+ set_target_properties( pl_editor_kiface PROPERTIES
+ LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=_pl_editor.kiface.map" )
+endif()
+
+# if building pl_editor, then also build pl_editor_kiface if out of date.
+add_dependencies( pl_editor pl_editor_kiface )
+
+# these 2 binaries are a matched set, keep them together:
+if( APPLE )
+ set_target_properties( pl_editor PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
+ )
+
+ # puts binaries into the *.app bundle while linking
+ set_target_properties( pl_editor_kiface PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
+ )
+
+ # put individual bundle outside of main bundle as a first step
+ # will be pulled into the main bundle when creating main bundle
+ install( TARGETS pl_editor
+ DESTINATION ${KICAD_BIN}
+ COMPONENT binary
+ )
+ install( CODE "
+ # override default embedded path settings
+ ${OSX_BUNDLE_OVERRIDE_PATHS}
+
+ # do all the work
+ include( BundleUtilities )
+ fixup_bundle( ${KICAD_BIN}/pl_editor.app/Contents/MacOS/pl_editor
+ \"\"
+ \"\"
+ )
+ " COMPONENT Runtime
+ )
+else()
+ install( TARGETS pl_editor
+ DESTINATION ${KICAD_BIN}
+ COMPONENT binary
+ )
+ install( TARGETS pl_editor_kiface
+ DESTINATION ${KICAD_BIN}
+ COMPONENT binary
+ )
+endif()
diff --git a/pagelayout_editor/Info.plist b/pagelayout_editor/Info.plist
new file mode 100644
index 0000000..169550f
--- /dev/null
+++ b/pagelayout_editor/Info.plist
@@ -0,0 +1,35 @@
+
+
+
+
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeRole Editor
+ CFBundleTypeExtensions
+
+ kicad_wks
+
+ CFBundleTypeIconFile pl_editor_doc.icns
+ CFBundleTypeName pl_editor document
+ LSHandlerRank Owner
+
+
+ CFBundleDevelopmentRegion English
+ CFBundleExecutable pl_editor
+ CFBundleGetInfoString
+ CFBundleIconFile pl_editor.icns
+ CFBundleIdentifier org.kicad-pcb.pl_editor
+ CFBundleInfoDictionaryVersion 6.0
+ CFBundleLongVersionString
+ CFBundleName pl_editor
+ CFBundlePackageType APPL
+ CFBundleShortVersionString
+ CFBundleSignature ????
+ CFBundleVersion
+ CSResourcesFileMapped
+ LSRequiresCarbon
+ NSHumanReadableCopyright
+ NSHighResolutionCapable True
+
+
diff --git a/pagelayout_editor/class_pl_editor_layout.cpp b/pagelayout_editor/class_pl_editor_layout.cpp
new file mode 100644
index 0000000..a40de53
--- /dev/null
+++ b/pagelayout_editor/class_pl_editor_layout.cpp
@@ -0,0 +1,53 @@
+/**
+ * @file class_pl_editor_layout.cpp
+ * @brief PL_EDITOR_LAYOUT class functions.
+ */
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+
+#include
+#include
+#include
+
+PL_EDITOR_LAYOUT::PL_EDITOR_LAYOUT()
+{
+ PAGE_INFO pageInfo( wxT( "A4" ) );
+ SetPageSettings( pageInfo );
+}
+
+
+PL_EDITOR_LAYOUT::~PL_EDITOR_LAYOUT()
+{
+}
+
+EDA_RECT PL_EDITOR_LAYOUT::ComputeBoundingBox()
+{
+ EDA_RECT bbox;
+
+ SetBoundingBox( bbox );
+ return bbox;
+}
diff --git a/pagelayout_editor/class_pl_editor_layout.h b/pagelayout_editor/class_pl_editor_layout.h
new file mode 100644
index 0000000..db04fcc
--- /dev/null
+++ b/pagelayout_editor/class_pl_editor_layout.h
@@ -0,0 +1,97 @@
+/**
+ * @file class_pl_editor_layout.h
+ */
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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 CLASS_PL_EDITOR_LAYOUT_H
+#define CLASS_PL_EDITOR_LAYOUT_H
+
+#include
+#include
+#include
+
+class EDA_DRAW_PANEL;
+
+
+/**
+ * Class PL_EDITOR_LAYOUT
+ * holds list of GERBER_DRAW_ITEM currently loaded.
+ */
+class PL_EDITOR_LAYOUT
+{
+private:
+ EDA_RECT m_BoundingBox;
+ PAGE_INFO m_paper;
+ TITLE_BLOCK m_titles;
+
+public:
+ PL_EDITOR_LAYOUT();
+ ~PL_EDITOR_LAYOUT();
+
+ const PAGE_INFO& GetPageSettings() const { return m_paper; }
+ void SetPageSettings( const PAGE_INFO& aPageSettings )
+ {
+ m_paper = aPageSettings;
+ }
+
+ const wxPoint& GetAuxOrigin() const
+ {
+ static wxPoint zero( 0, 0 );
+ return zero;
+ }
+
+ const TITLE_BLOCK& GetTitleBlock() const
+ {
+ return m_titles;
+ }
+
+ void SetTitleBlock( const TITLE_BLOCK& aTitleBlock )
+ {
+ m_titles = aTitleBlock;
+ }
+
+ /**
+ * Function ComputeBoundingBox
+ * calculates the bounding box containing all Gerber items.
+ * @return EDA_RECT - the full item list bounding box
+ */
+ EDA_RECT ComputeBoundingBox();
+
+ /**
+ * Function GetBoundingBox
+ * may be called soon after ComputeBoundingBox() to return the same EDA_RECT,
+ * as long as the CLASS_PL_EDITOR_LAYOUT has not changed.
+ */
+ const EDA_RECT GetBoundingBox() const { return m_BoundingBox; } // override
+
+ void SetBoundingBox( const EDA_RECT& aBox ) { m_BoundingBox = aBox; }
+
+#if defined(DEBUG)
+ void Show( int nestLevel, std::ostream& os ) const; // overload
+
+#endif
+};
+
+#endif // #ifndef CLASS_PL_EDITOR_LAYOUT_H
diff --git a/pagelayout_editor/class_pl_editor_screen.cpp b/pagelayout_editor/class_pl_editor_screen.cpp
new file mode 100644
index 0000000..66a0840
--- /dev/null
+++ b/pagelayout_editor/class_pl_editor_screen.cpp
@@ -0,0 +1,140 @@
+/**
+ * @file class_pl_editor_screen.cpp
+ */
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+#include
+#include
+
+
+#define MM_GRID( x ) wxRealPoint( x * IU_PER_MM, x * IU_PER_MM )
+#define ZOOM_FACTOR( x ) ( x * IU_PER_MM / 1000 )
+
+
+/**
+ Default zoom values.
+ Roughly a 1.5 progression.
+*/
+static const double pl_editorZoomList[] =
+{
+ ZOOM_FACTOR( 5 ),
+ ZOOM_FACTOR( 7.0 ),
+ ZOOM_FACTOR( 10.0 ),
+ ZOOM_FACTOR( 15.0 ),
+ ZOOM_FACTOR( 22.0 ),
+ ZOOM_FACTOR( 35.0 ),
+ ZOOM_FACTOR( 50.0 ),
+ ZOOM_FACTOR( 80.0 ),
+ ZOOM_FACTOR( 120.0 ),
+ ZOOM_FACTOR( 160.0 ),
+ ZOOM_FACTOR( 230.0 ),
+ ZOOM_FACTOR( 290.0 ),
+ ZOOM_FACTOR( 380.0 ),
+ ZOOM_FACTOR( 500.0 ),
+ ZOOM_FACTOR( 750.0 ),
+ ZOOM_FACTOR( 1000.0 ),
+ ZOOM_FACTOR( 1500.0 ),
+ ZOOM_FACTOR( 2000.0 ),
+ ZOOM_FACTOR( 3000.0 ),
+};
+
+
+// Default grid sizes for PCB editor screens.
+static GRID_TYPE pl_editorGridList[] =
+{
+ // predefined grid list in mm
+ { ID_POPUP_GRID_LEVEL_1MM, MM_GRID( 1.0 ) },
+ { ID_POPUP_GRID_LEVEL_0_5MM, MM_GRID( 0.5 ) },
+ { ID_POPUP_GRID_LEVEL_0_25MM, MM_GRID( 0.25 ) },
+ { ID_POPUP_GRID_LEVEL_0_2MM, MM_GRID( 0.2 ) },
+ { ID_POPUP_GRID_LEVEL_0_1MM, MM_GRID( 0.1 ) },
+};
+
+
+PL_EDITOR_SCREEN::PL_EDITOR_SCREEN( const wxSize& aPageSizeIU ) :
+ BASE_SCREEN( SCREEN_T )
+{
+ for( unsigned i = 0; i < DIM( pl_editorZoomList ); ++i )
+ m_ZoomList.push_back( pl_editorZoomList[i] );
+
+ for( unsigned i = 0; i < DIM( pl_editorGridList ); ++i )
+ AddGrid( pl_editorGridList[i] );
+
+ // pl_editor uses the same frame position as schematic and board editors
+ m_Center = false;
+
+ // Set the working grid size to a reasonable value
+ SetGrid( MM_GRID( 1.0 ) );
+
+ SetZoom( ZOOM_FACTOR( 350 ) ); // a default value for zoom
+
+ InitDataPoints( aPageSizeIU );
+ m_NumberOfScreens = 2;
+}
+
+
+PL_EDITOR_SCREEN::~PL_EDITOR_SCREEN()
+{
+ ClearUndoRedoList();
+}
+
+
+// virtual function
+int PL_EDITOR_SCREEN::MilsToIuScalar()
+{
+ return (int)IU_PER_MILS;
+}
+
+
+/* Virtual function needed by classes derived from BASE_SCREEN
+ * this is a virtual pure function in BASE_SCREEN
+ */
+void PL_EDITOR_SCREEN::ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList,
+ int aItemCount )
+{
+ if( aItemCount == 0 )
+ return;
+
+ unsigned icnt = aList.m_CommandsList.size();
+
+ if( aItemCount > 0 )
+ icnt = aItemCount;
+
+ for( unsigned ii = 0; ii < icnt; ii++ )
+ {
+ if( aList.m_CommandsList.size() == 0 )
+ break;
+
+ PICKED_ITEMS_LIST* curr_cmd = aList.m_CommandsList[0];
+ aList.m_CommandsList.erase( aList.m_CommandsList.begin() );
+
+ curr_cmd->ClearListAndDeleteItems();
+ delete curr_cmd; // Delete command
+ }
+}
diff --git a/pagelayout_editor/class_pl_editor_screen.h b/pagelayout_editor/class_pl_editor_screen.h
new file mode 100644
index 0000000..957180f
--- /dev/null
+++ b/pagelayout_editor/class_pl_editor_screen.h
@@ -0,0 +1,80 @@
+/**
+ * @file class_pl_editor_screen.h
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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 CLASS_PL_EDITOR_SCREEN_H_
+#define CLASS_PL_EDITOR_SCREEN_H_
+
+
+#include
+#include
+
+class WORKSHEET_DATAITEM;
+
+
+/* Handle info to display a board */
+class PL_EDITOR_SCREEN : public BASE_SCREEN
+{
+public:
+ /**
+ * Constructor
+ * @param aPageSizeIU is the size of the initial paper page in internal units.
+ */
+ PL_EDITOR_SCREEN( const wxSize& aPageSizeIU );
+
+ ~PL_EDITOR_SCREEN();
+
+ virtual int MilsToIuScalar();
+
+ /**
+ * Function ClearUndoORRedoList
+ * virtual pure in BASE_SCREEN, so it must be defined here
+ */
+
+ void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 );
+ /**
+ * Function GetCurItem
+ * returns the currently selected WORKSHEET_DATAITEM, overriding
+ * BASE_SCREEN::GetCurItem().
+ * @return WORKSHEET_DATAITEM* - the one selected, or NULL.
+ */
+
+ WORKSHEET_DATAITEM* GetCurItem() const
+ {
+ return (WORKSHEET_DATAITEM*) BASE_SCREEN::GetCurItem();
+ }
+
+ /**
+ * Function SetCurItem
+ * sets the currently selected object, m_CurrentItem.
+ * @param aItem Any object derived from WORKSHEET_DATAITEM
+ */
+ void SetCurItem( WORKSHEET_DATAITEM* aItem ) { BASE_SCREEN::SetCurItem( (EDA_ITEM*)aItem ); }
+};
+
+
+#endif // CLASS_PL_EDITOR_SCREEN_H_
diff --git a/pagelayout_editor/controle.cpp b/pagelayout_editor/controle.cpp
new file mode 100644
index 0000000..e14c18d
--- /dev/null
+++ b/pagelayout_editor/controle.cpp
@@ -0,0 +1,62 @@
+/**
+ * @file pagelayout_editor/controle.cpp
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+
+
+bool PL_EDITOR_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
+{
+ bool eventHandled = true;
+
+ // Filter out the 'fake' mouse motion after a keyboard movement
+ if( !aHotKey && m_movingCursorWithKeyboard )
+ {
+ m_movingCursorWithKeyboard = false;
+ return false;
+ }
+
+ wxPoint pos = aPosition;
+ wxPoint oldpos = GetCrossHairPosition();
+ GeneralControlKeyMovement( aHotKey, &pos, true );
+
+ // Update cursor position.
+ SetCrossHairPosition( pos, true );
+ RefreshCrossHair( oldpos, aPosition, aDC );
+
+ if( aHotKey )
+ {
+ eventHandled = OnHotKey( aDC, aHotKey, aPosition );
+ }
+
+ UpdateStatusBar();
+
+ return eventHandled;
+}
diff --git a/pagelayout_editor/design_tree_frame.cpp b/pagelayout_editor/design_tree_frame.cpp
new file mode 100644
index 0000000..59fe1e0
--- /dev/null
+++ b/pagelayout_editor/design_tree_frame.cpp
@@ -0,0 +1,291 @@
+/**
+ * @file design_tree_frame.cpp
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+#include
+#include
+#include
+
+/* XPM
+ * This bitmap is used to show item types
+ */
+static const char* root_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #008080",
+ " xxxx ",
+ " xxx ",
+ " xxx ",
+ " xxx ",
+ "xxxxxxxxxxx ",
+ "xxxxxxxxxxxx",
+ "xxxxxxxxxxx ",
+ " xxx ",
+ " xxx ",
+ " xxx ",
+ " xxxx ",
+ " "
+};
+
+static const char* line_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #008080",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xx ",
+ "xxxxxxxxxxxx",
+ "xxxxxxxxxxxx"
+};
+
+static const char* rect_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #000080",
+ "xxxxxxxxxxxx",
+ "xxxxxxxxxxxx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xx xx",
+ "xxxxxxxxxxxx",
+ "xxxxxxxxxxxx"
+};
+
+static const char* text_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #800000",
+ " xxxxxxxxxx ",
+ "xxxxxxxxxxxx",
+ "xx xx xx",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xxxx ",
+ " xxxxxx "
+};
+
+static const char* poly_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #008000",
+ " xx ",
+ " xxxx ",
+ " xxxxxx ",
+ " xxxxxxxx ",
+ " xxxxxxxxxx ",
+ "xxxxxxxxxxxx",
+ "xxxxxxxxxxxx",
+ " xxxxxxxxxx ",
+ " xxxxxxxx ",
+ " xxxxxx ",
+ " xxxx ",
+ " xx "
+};
+
+static const char* img_xpm[] =
+{
+ "12 12 2 1",
+ " c None",
+ "x c #800000",
+ " xx ",
+ " xxxxxx ",
+ " xx xx ",
+ "xx xx",
+ "xx xx",
+ " xx xx ",
+ " xxxxxx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx ",
+ " xx "
+};
+
+// Event table:
+
+
+DESIGN_TREE_FRAME::DESIGN_TREE_FRAME( PL_EDITOR_FRAME* aParent ) :
+ wxTreeCtrl( aParent, ID_DESIGN_TREE_FRAME )
+{
+ // icons size is not know (depending on they are built)
+ // so get it:
+ wxSize iconsize;
+ wxBitmap root_bm( root_xpm );
+
+ iconsize.x = root_bm.GetWidth();
+ iconsize.y = root_bm.GetHeight();
+
+ // Make an image list containing small icons
+ m_imageList = new wxImageList( iconsize.x, iconsize.y, true, 6 );
+
+ m_imageList->Add( root_bm ); // root symbol
+ m_imageList->Add( wxBitmap( line_xpm ) ); // line item
+ m_imageList->Add( wxBitmap( rect_xpm ) ); // rect item
+ m_imageList->Add( wxBitmap( text_xpm ) ); // text item
+ m_imageList->Add( wxBitmap( poly_xpm ) ); // poly item
+ m_imageList->Add( wxBitmap( img_xpm ) ); // bitmap item
+
+ SetImageList( m_imageList );
+}
+
+
+DESIGN_TREE_FRAME::~DESIGN_TREE_FRAME()
+{
+ delete m_imageList;
+}
+
+
+wxSize DESIGN_TREE_FRAME::GetMinSize() const
+{
+ return wxSize( 100, -1 );
+}
+
+
+void DESIGN_TREE_FRAME::ReCreateDesignTree()
+{
+ wxWindowUpdateLocker dummy(this); // Avoid flicker when rebuilding the tree
+
+ DeleteAllItems();
+
+ const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
+
+ // root tree:
+ wxFileName fn( ((PL_EDITOR_FRAME*) GetParent())->GetCurrFileName() );
+ wxTreeItemId rootitem;
+
+ if( fn.GetName().IsEmpty() )
+ rootitem = AddRoot( wxT( "" ), 0, 0 );
+ else
+ rootitem = AddRoot( fn.GetName(), 0, 0 );
+
+ SetItemBold( rootitem, true );
+
+ // Now adding all current items
+ for( unsigned ii = 0; ii < pglayout.GetCount(); ii++ )
+ {
+ WORKSHEET_DATAITEM* item = pglayout.GetItem( ii );
+ int img = 0;
+ switch( item->GetType() )
+ {
+ case WORKSHEET_DATAITEM::WS_SEGMENT: img = 1; break;
+ case WORKSHEET_DATAITEM::WS_RECT: img = 2; break;
+ case WORKSHEET_DATAITEM::WS_TEXT: img = 3; break;
+ case WORKSHEET_DATAITEM::WS_POLYPOLYGON: img = 4; break;
+ case WORKSHEET_DATAITEM::WS_BITMAP: img = 5; break;
+ }
+ wxTreeItemId cell= AppendItem( rootitem, item->m_Name, img, img );
+ DESIGN_TREE_ITEM_DATA* data = new DESIGN_TREE_ITEM_DATA( item );
+ SetItemData( cell, data );
+ }
+
+ Expand( rootitem );
+}
+
+
+// Select the tree item corresponding to the WORKSHEET_DATAITEM aItem
+void DESIGN_TREE_FRAME::SelectCell( WORKSHEET_DATAITEM* aItem )
+{
+ wxTreeItemId rootcell = GetRootItem();
+ wxTreeItemIdValue cookie;
+
+ wxTreeItemId cell = GetFirstChild( rootcell, cookie );
+
+ while( cell.IsOk() )
+ {
+ DESIGN_TREE_ITEM_DATA* data = (DESIGN_TREE_ITEM_DATA*) GetItemData( cell );
+
+ if( data->GetItem() == aItem )
+ {
+ SelectItem( cell );
+ return;
+ }
+
+ cell = GetNextChild( rootcell, cookie );
+ }
+}
+
+//return the page layout item managed by the cell
+WORKSHEET_DATAITEM* DESIGN_TREE_FRAME::GetPageLayoutItem( wxTreeItemId aCell ) const
+{
+ DESIGN_TREE_ITEM_DATA* data = (DESIGN_TREE_ITEM_DATA*) GetItemData( aCell );
+ if( data )
+ return data->GetItem();
+ else
+ return NULL;
+}
+
+/* return the page layout item managed by the selected cell (or NULL)
+ */
+WORKSHEET_DATAITEM* DESIGN_TREE_FRAME::GetPageLayoutSelectedItem() const
+{
+ wxTreeItemId cell;
+ cell = GetSelection();
+
+ if( cell.IsOk() )
+ return GetPageLayoutItem( cell );
+
+ return NULL;
+}
+
+/* return the page layout item index managed by the selected cell (or -1)
+ */
+int DESIGN_TREE_FRAME::GetSelectedItemIndex()
+{
+ WORKSHEET_DATAITEM*item = GetPageLayoutSelectedItem();
+
+ if( item == NULL )
+ return -1;
+
+ WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
+ return pglayout.GetItemIndex( item );
+}
diff --git a/pagelayout_editor/design_tree_frame.h b/pagelayout_editor/design_tree_frame.h
new file mode 100644
index 0000000..1ff901e
--- /dev/null
+++ b/pagelayout_editor/design_tree_frame.h
@@ -0,0 +1,108 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+ */
+
+/**
+ * @file design_tree_frame.h
+ */
+
+#ifndef _DESIGN_TREE_FRAME_H
+#define _DESIGN_TREE_FRAME_H
+
+#include
+
+#include
+
+class WORKSHEET_DATAITEM;
+
+/** class DESIGN_TREE_ITEM
+ * Handle one item for the page layoiut design
+ */
+class DESIGN_TREE_ITEM_DATA : public wxTreeItemData
+{
+private:
+ WORKSHEET_DATAITEM* m_wsItem; // the page layout item owned by me
+
+public:
+
+ DESIGN_TREE_ITEM_DATA( WORKSHEET_DATAITEM* aItem = NULL )
+ {
+ m_wsItem = aItem;
+ }
+
+ /** @return the item managed by the cell
+ */
+ WORKSHEET_DATAITEM* GetItem() const
+ {
+ return m_wsItem;
+ }
+
+ /** Set the link to the item managed by the cell
+ */
+ void SetItem( WORKSHEET_DATAITEM* aItem )
+ {
+ m_wsItem = aItem;
+ }
+};
+
+
+/**
+ * Class DESIGN_TREE_FRAME is the left window showing the list of items
+ */
+
+class DESIGN_TREE_FRAME : protected wxTreeCtrl
+{
+ friend class PL_EDITOR_FRAME;
+
+private:
+ wxImageList* m_imageList;
+
+public:
+ DESIGN_TREE_FRAME( PL_EDITOR_FRAME* aParent );
+ ~DESIGN_TREE_FRAME();
+
+ void ReCreateDesignTree();
+ wxSize GetMinSize() const;
+
+ /** @return the page layout item managed by the cell
+ */
+ WORKSHEET_DATAITEM* GetPageLayoutItem(wxTreeItemId aCell) const;
+
+ /** @return the page layout item managed by the selected cell (or NULL)
+ */
+ WORKSHEET_DATAITEM* GetPageLayoutSelectedItem() const;
+
+ /** @return the page layout item index managed by the selected cell (or -1)
+ */
+ int GetSelectedItemIndex();
+
+ // Select the tree item corresponding to the WORKSHEET_DATAITEM aItem
+ void SelectCell( WORKSHEET_DATAITEM* aItem );
+
+ void SelectCell( const wxTreeItemId &aTreeItem, bool aSelect=true )
+ {
+ SelectItem( aTreeItem, aSelect );
+ }
+};
+
+#endif /* _DESIGN_TREE_FRAME_H */
diff --git a/pagelayout_editor/dialogs/dialog_new_dataitem.cpp b/pagelayout_editor/dialogs/dialog_new_dataitem.cpp
new file mode 100644
index 0000000..12a6744
--- /dev/null
+++ b/pagelayout_editor/dialogs/dialog_new_dataitem.cpp
@@ -0,0 +1,185 @@
+/**
+ * @file dialog_new_dataitem.cpp
+ * @brief a dialog called on creating a new plage layout data item.
+*/
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+
+#include
+#include
+#include
+
+class DIALOG_NEW_DATAITEM : public DIALOG_NEW_DATAITEM_BASE
+{
+ WORKSHEET_DATAITEM* m_item;
+
+public:
+ DIALOG_NEW_DATAITEM( PL_EDITOR_FRAME* aCaller, WORKSHEET_DATAITEM* aItem );
+
+private:
+ void OnCancelClick( wxCommandEvent& event );
+ void OnOKClick( wxCommandEvent& event );
+
+ void initDlg();
+};
+
+
+int InvokeDialogNewItem( PL_EDITOR_FRAME* aCaller, WORKSHEET_DATAITEM* aItem )
+{
+ DIALOG_NEW_DATAITEM dlg( aCaller, aItem );
+ return dlg.ShowModal();
+}
+
+DIALOG_NEW_DATAITEM::DIALOG_NEW_DATAITEM( PL_EDITOR_FRAME* aCaller,
+ WORKSHEET_DATAITEM* aItem )
+ : DIALOG_NEW_DATAITEM_BASE( aCaller )
+{
+ m_item = aItem;
+ initDlg();
+
+ GetSizer()->SetSizeHints( this );
+ Centre();
+}
+
+void DIALOG_NEW_DATAITEM::OnCancelClick( wxCommandEvent& event )
+{
+ EndModal( wxID_CANCEL);
+}
+
+void DIALOG_NEW_DATAITEM::OnOKClick( wxCommandEvent& event )
+{
+ if( m_item->GetType() == WORKSHEET_DATAITEM::WS_TEXT )
+ {
+ WORKSHEET_DATAITEM_TEXT* text = ((WORKSHEET_DATAITEM_TEXT*)m_item);
+ text->m_TextBase = m_textCtrlText->GetValue();
+ // For multiline texts, replace the '\n' char by the "\\n" sequence",
+ // in internal string
+ text->m_TextBase.Replace( wxT("\n"), wxT("\\n") );
+ }
+
+ wxString msg;
+
+ // Import Start point
+ double dtmp;
+ msg = m_textCtrlPosX->GetValue();
+ msg.ToDouble( &dtmp );
+ m_item->m_Pos.m_Pos.x = dtmp;
+
+ msg = m_textCtrlPosY->GetValue();
+ msg.ToDouble( &dtmp );
+ m_item->m_Pos.m_Pos.y = dtmp;
+
+ switch( m_choiceCornerPos->GetSelection() )
+ {
+ case 2: m_item->m_Pos.m_Anchor = RB_CORNER; break;
+ case 0: m_item->m_Pos.m_Anchor = RT_CORNER; break;
+ case 3: m_item->m_Pos.m_Anchor = LB_CORNER; break;
+ case 1: m_item->m_Pos.m_Anchor = LT_CORNER; break;
+ }
+
+ // Import End point
+ msg = m_textCtrlEndX->GetValue();
+ msg.ToDouble( &dtmp );
+ m_item->m_End.m_Pos.x = dtmp;
+
+ msg = m_textCtrlEndY->GetValue();
+ msg.ToDouble( &dtmp );
+ m_item->m_End.m_Pos.y = dtmp;
+
+ switch( m_choiceCornerEnd->GetSelection() )
+ {
+ case 2: m_item->m_End.m_Anchor = RB_CORNER; break;
+ case 0: m_item->m_End.m_Anchor = RT_CORNER; break;
+ case 3: m_item->m_End.m_Anchor = LB_CORNER; break;
+ case 1: m_item->m_End.m_Anchor = LT_CORNER; break;
+ }
+
+ EndModal( wxID_OK);
+}
+
+void DIALOG_NEW_DATAITEM::initDlg()
+{
+ // Disable useless widgets, depending on WORKSHEET_DATAITEM type
+ switch( m_item->GetType() )
+ {
+ case WORKSHEET_DATAITEM::WS_SEGMENT:
+ case WORKSHEET_DATAITEM::WS_RECT:
+ m_textCtrlText->Enable( false );
+ break;
+
+ case WORKSHEET_DATAITEM::WS_BITMAP:
+ case WORKSHEET_DATAITEM::WS_POLYPOLYGON:
+ m_textCtrlText->Enable( false );
+ // fall through
+ case WORKSHEET_DATAITEM::WS_TEXT:
+ m_textCtrlEndX->Enable( false );
+ m_textCtrlEndY->Enable( false );
+ m_choiceCornerEnd->Enable( false );
+ break;
+ }
+
+ wxString msg;
+
+ // Position/ start point
+ msg.Printf( wxT("%.3f"), m_item->m_Pos.m_Pos.x );
+ m_textCtrlPosX->SetValue( msg );
+ msg.Printf( wxT("%.3f"), m_item->m_Pos.m_Pos.y );
+ m_textCtrlPosY->SetValue( msg );
+ switch( m_item->m_Pos.m_Anchor )
+ {
+ case RB_CORNER: // right bottom corner
+ m_choiceCornerPos->SetSelection( 2 ); break;
+ case RT_CORNER: // right top corner
+ m_choiceCornerPos->SetSelection( 0 ); break;
+ case LB_CORNER: // left bottom corner
+ m_choiceCornerPos->SetSelection( 3 ); break;
+ case LT_CORNER: // left top corner
+ m_choiceCornerPos->SetSelection( 1 ); break;
+ }
+
+ // End point
+ msg.Printf( wxT("%.3f"), m_item->m_End.m_Pos.x );
+ m_textCtrlEndX->SetValue( msg );
+ msg.Printf( wxT("%.3f"), m_item->m_End.m_Pos.y );
+ m_textCtrlEndY->SetValue( msg );
+ switch( m_item->m_End.m_Anchor )
+ {
+ case RB_CORNER: // right bottom corner
+ m_choiceCornerEnd->SetSelection( 2 ); break;
+ case RT_CORNER: // right top corner
+ m_choiceCornerEnd->SetSelection( 0 ); break;
+ case LB_CORNER: // left bottom corner
+ m_choiceCornerEnd->SetSelection( 3 ); break;
+ case LT_CORNER: // left top corner
+ m_choiceCornerEnd->SetSelection( 1 ); break;
+ }
+
+ if( m_item->GetType() == WORKSHEET_DATAITEM::WS_TEXT )
+ m_textCtrlText->SetValue( ((WORKSHEET_DATAITEM_TEXT*)m_item)->m_TextBase );
+}
diff --git a/pagelayout_editor/dialogs/dialog_new_dataitem_base.cpp b/pagelayout_editor/dialogs/dialog_new_dataitem_base.cpp
new file mode 100644
index 0000000..0bb94bc
--- /dev/null
+++ b/pagelayout_editor/dialogs/dialog_new_dataitem_base.cpp
@@ -0,0 +1,157 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 8 2012)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_new_dataitem_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DIALOG_NEW_DATAITEM_BASE::DIALOG_NEW_DATAITEM_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* bSizerMain;
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerUpper;
+ bSizerUpper = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerPos;
+ bSizerPos = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerPosXY;
+ bSizerPosXY = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextPosX = new wxStaticText( this, wxID_ANY, _("Pos X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosX->Wrap( -1 );
+ bSizerPosXY->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlPosX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerPosXY->Add( m_textCtrlPosX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_staticTextPosY = new wxStaticText( this, wxID_ANY, _("Pos Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosY->Wrap( -1 );
+ bSizerPosXY->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlPosY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerPosXY->Add( m_textCtrlPosY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerPos->Add( bSizerPosXY, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer6;
+ bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextOrgPos = new wxStaticText( this, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextOrgPos->Wrap( -1 );
+ bSizer6->Add( m_staticTextOrgPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxString m_choiceCornerPosChoices[] = { _("Upper Right"), _("Upper Left"), _("Lower Right"), _("Lower Left") };
+ int m_choiceCornerPosNChoices = sizeof( m_choiceCornerPosChoices ) / sizeof( wxString );
+ m_choiceCornerPos = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCornerPosNChoices, m_choiceCornerPosChoices, 0 );
+ m_choiceCornerPos->SetSelection( 2 );
+ bSizer6->Add( m_choiceCornerPos, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerPos->Add( bSizer6, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerUpper->Add( bSizerPos, 1, wxEXPAND, 5 );
+
+ m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerUpper->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
+
+ m_SizerEndPosition = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerEndXY;
+ bSizerEndXY = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextEndX = new wxStaticText( this, wxID_ANY, _("End X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextEndX->Wrap( -1 );
+ bSizerEndXY->Add( m_staticTextEndX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlEndX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerEndXY->Add( m_textCtrlEndX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_staticTextEndY = new wxStaticText( this, wxID_ANY, _("End Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextEndY->Wrap( -1 );
+ bSizerEndXY->Add( m_staticTextEndY, 0, wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlEndY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerEndXY->Add( m_textCtrlEndY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ m_SizerEndPosition->Add( bSizerEndXY, 1, 0, 5 );
+
+ wxBoxSizer* bSizer61;
+ bSizer61 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextOrgPos1 = new wxStaticText( this, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextOrgPos1->Wrap( -1 );
+ bSizer61->Add( m_staticTextOrgPos1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxString m_choiceCornerEndChoices[] = { _("Upper Right"), _("Upper Left"), _("Lower Right"), _("Lower Left") };
+ int m_choiceCornerEndNChoices = sizeof( m_choiceCornerEndChoices ) / sizeof( wxString );
+ m_choiceCornerEnd = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCornerEndNChoices, m_choiceCornerEndChoices, 0 );
+ m_choiceCornerEnd->SetSelection( 2 );
+ bSizer61->Add( m_choiceCornerEnd, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ m_SizerEndPosition->Add( bSizer61, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerUpper->Add( m_SizerEndPosition, 1, wxEXPAND, 5 );
+
+ m_staticlineEndXY = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerUpper->Add( m_staticlineEndXY, 0, wxEXPAND | wxALL, 5 );
+
+ m_SizerText = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTitle->Wrap( -1 );
+ m_SizerText->Add( m_staticTextTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+ m_textCtrlText->SetMinSize( wxSize( 300,-1 ) );
+
+ m_SizerText->Add( m_textCtrlText, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ m_SizerText->Add( m_staticline3, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerUpper->Add( m_SizerText, 1, wxEXPAND, 5 );
+
+
+ bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
+
+ m_sdbSizerButtons = new wxStdDialogButtonSizer();
+ m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
+ m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
+ m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
+ m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
+ m_sdbSizerButtons->Realize();
+
+ bSizerMain->Add( m_sdbSizerButtons, 0, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizerMain );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NEW_DATAITEM_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NEW_DATAITEM_BASE::OnOKClick ), NULL, this );
+}
+
+DIALOG_NEW_DATAITEM_BASE::~DIALOG_NEW_DATAITEM_BASE()
+{
+ // Disconnect Events
+ m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NEW_DATAITEM_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NEW_DATAITEM_BASE::OnOKClick ), NULL, this );
+
+}
diff --git a/pagelayout_editor/dialogs/dialog_new_dataitem_base.fbp b/pagelayout_editor/dialogs/dialog_new_dataitem_base.fbp
new file mode 100644
index 0000000..01f823f
--- /dev/null
+++ b/pagelayout_editor/dialogs/dialog_new_dataitem_base.fbp
@@ -0,0 +1,1666 @@
+
+
+
+
+
diff --git a/pagelayout_editor/dialogs/dialog_new_dataitem_base.h b/pagelayout_editor/dialogs/dialog_new_dataitem_base.h
new file mode 100644
index 0000000..8716392
--- /dev/null
+++ b/pagelayout_editor/dialogs/dialog_new_dataitem_base.h
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 8 2012)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_NEW_DATAITEM_BASE_H__
+#define __DIALOG_NEW_DATAITEM_BASE_H__
+
+#include
+#include
+#include
+class DIALOG_SHIM;
+
+#include "dialog_shim.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_NEW_DATAITEM_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_NEW_DATAITEM_BASE : public DIALOG_SHIM
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextPosX;
+ wxTextCtrl* m_textCtrlPosX;
+ wxStaticText* m_staticTextPosY;
+ wxTextCtrl* m_textCtrlPosY;
+ wxStaticText* m_staticTextOrgPos;
+ wxChoice* m_choiceCornerPos;
+ wxStaticLine* m_staticline2;
+ wxBoxSizer* m_SizerEndPosition;
+ wxStaticText* m_staticTextEndX;
+ wxTextCtrl* m_textCtrlEndX;
+ wxStaticText* m_staticTextEndY;
+ wxTextCtrl* m_textCtrlEndY;
+ wxStaticText* m_staticTextOrgPos1;
+ wxChoice* m_choiceCornerEnd;
+ wxStaticLine* m_staticlineEndXY;
+ wxBoxSizer* m_SizerText;
+ wxStaticText* m_staticTextTitle;
+ wxTextCtrl* m_textCtrlText;
+ wxStaticLine* m_staticline3;
+ wxStdDialogButtonSizer* m_sdbSizerButtons;
+ wxButton* m_sdbSizerButtonsOK;
+ wxButton* m_sdbSizerButtonsCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DIALOG_NEW_DATAITEM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Item"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 328,335 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DIALOG_NEW_DATAITEM_BASE();
+
+};
+
+#endif //__DIALOG_NEW_DATAITEM_BASE_H__
diff --git a/pagelayout_editor/dialogs/dialogs_for_printing.cpp b/pagelayout_editor/dialogs/dialogs_for_printing.cpp
new file mode 100644
index 0000000..5ed93f4
--- /dev/null
+++ b/pagelayout_editor/dialogs/dialogs_for_printing.cpp
@@ -0,0 +1,251 @@
+/**
+ * @file dialogs_for_printing.cpp
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+/**
+ * Custom print out for printing schematics.
+ */
+class PLEDITOR_PRINTOUT : public wxPrintout
+{
+private:
+ PL_EDITOR_FRAME* m_parent;
+
+public:
+ PLEDITOR_PRINTOUT( PL_EDITOR_FRAME* aParent, const wxString& aTitle ) :
+ wxPrintout( aTitle )
+ {
+ wxASSERT( aParent != NULL );
+ m_parent = aParent;
+ }
+
+ bool OnPrintPage( int aPageNum );
+ bool HasPage( int aPageNum ) { return ( aPageNum <= 2 ); }
+ void GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo );
+ void DrawPage( int aPageNum );
+};
+
+/**
+ * Custom print preview frame.
+ */
+class PLEDITOR_PREVIEW_FRAME : public wxPreviewFrame
+{
+ PL_EDITOR_FRAME* m_parent;
+
+public:
+ PLEDITOR_PREVIEW_FRAME( wxPrintPreview* aPreview, PL_EDITOR_FRAME* aParent,
+ const wxString& aTitle, const wxPoint& aPos = wxDefaultPosition,
+ const wxSize& aSize = wxDefaultSize ) :
+ wxPreviewFrame( aPreview, aParent, aTitle, aPos, aSize )
+ {
+ m_parent = aParent;
+ }
+
+ bool Show( bool show ) // overload
+ {
+ bool ret;
+
+ // Show or hide the window. If hiding, save current position and size.
+ // If showing, use previous position and size.
+ if( show )
+ {
+ bool centre = false;
+ if( s_size.x == 0 || s_size.y == 0 )
+ {
+ s_size = (m_parent->GetSize() * 3) / 4;
+ s_pos = wxDefaultPosition;
+ centre = true;
+ }
+
+ SetSize( s_pos.x, s_pos.y, s_size.x, s_size.y, 0 );
+
+ if( centre )
+ Center();
+
+ ret = wxPreviewFrame::Show( show );
+ }
+ else
+ {
+ // Save the dialog's position & size before hiding
+ s_size = GetSize();
+ s_pos = GetPosition();
+
+ ret = wxPreviewFrame::Show( show );
+ }
+ return ret;
+ }
+
+private:
+ static wxPoint s_pos;
+ static wxSize s_size;
+
+ DECLARE_CLASS( PLEDITOR_PREVIEW_FRAME )
+ DECLARE_EVENT_TABLE()
+ DECLARE_NO_COPY_CLASS( PLEDITOR_PREVIEW_FRAME )
+};
+
+wxPoint PLEDITOR_PREVIEW_FRAME::s_pos;
+wxSize PLEDITOR_PREVIEW_FRAME::s_size;
+
+IMPLEMENT_CLASS( PLEDITOR_PREVIEW_FRAME, wxPreviewFrame )
+
+BEGIN_EVENT_TABLE( PLEDITOR_PREVIEW_FRAME, wxPreviewFrame )
+ EVT_CLOSE( PLEDITOR_PREVIEW_FRAME::OnCloseWindow )
+END_EVENT_TABLE()
+
+
+bool PLEDITOR_PRINTOUT::OnPrintPage( int aPageNum )
+{
+ DrawPage( aPageNum );
+ return true;
+}
+
+
+void PLEDITOR_PRINTOUT::GetPageInfo( int* minPage, int* maxPage,
+ int* selPageFrom, int* selPageTo )
+{
+ *minPage = *selPageFrom = 1;
+ *maxPage = *selPageTo = 2;
+}
+
+/*
+ * This is the real print function: print the active screen
+ */
+void PLEDITOR_PRINTOUT::DrawPage( int aPageNum )
+{
+ int oldZoom;
+ wxPoint tmp_startvisu;
+ wxSize pageSizeIU; // Page size in internal units
+ wxPoint old_org;
+ EDA_RECT oldClipBox;
+ wxRect fitRect;
+ wxDC* dc = GetDC();
+ EDA_DRAW_PANEL* panel = m_parent->GetCanvas();
+ PL_EDITOR_SCREEN* screen = m_parent->GetScreen();
+
+ // Save current scale factor, offsets, and clip box.
+ tmp_startvisu = screen->m_StartVisu;
+ oldZoom = screen->GetZoom();
+ old_org = screen->m_DrawOrg;
+
+ oldClipBox = *panel->GetClipBox();
+
+ // Change clip box to print the whole page.
+ #define MAX_VALUE (INT_MAX/2) // MAX_VALUE is the max we can use in an integer
+ // and that allows calculations without overflow
+ panel->SetClipBox( EDA_RECT( wxPoint( 0, 0 ), wxSize( MAX_VALUE, MAX_VALUE ) ) );
+
+ // Change scale factor and offset to print the whole page.
+
+ pageSizeIU = m_parent->GetPageSettings().GetSizeIU();
+ FitThisSizeToPaper( pageSizeIU );
+ fitRect = GetLogicalPaperRect();
+
+ int xoffset = ( fitRect.width - pageSizeIU.x ) / 2;
+ int yoffset = ( fitRect.height - pageSizeIU.y ) / 2;
+
+ OffsetLogicalOrigin( xoffset, yoffset );
+
+ GRResetPenAndBrush( dc );
+ GRForceBlackPen( true );
+ screen->m_IsPrinting = true;
+
+ EDA_COLOR_T bg_color = m_parent->GetDrawBgColor();
+ m_parent->SetDrawBgColor( WHITE );
+
+ screen->m_ScreenNumber = aPageNum;
+ m_parent->DrawWorkSheet( dc, screen, 0, IU_PER_MILS, wxEmptyString );
+
+ m_parent->SetDrawBgColor( bg_color );
+ screen->m_IsPrinting = false;
+ panel->SetClipBox( oldClipBox );
+
+ GRForceBlackPen( false );
+
+ screen->m_StartVisu = tmp_startvisu;
+ screen->m_DrawOrg = old_org;
+ screen->SetZoom( oldZoom );
+}
+
+
+int InvokeDialogPrint( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData,
+ wxPageSetupDialogData* aPageSetupData )
+{
+ int pageCount = 2;
+
+ wxPrintDialogData printDialogData( *aPrintData );
+ printDialogData.SetMaxPage( pageCount );
+
+ if( pageCount > 1 )
+ printDialogData.EnablePageNumbers( true );
+
+ wxPrinter printer( &printDialogData );
+ PLEDITOR_PRINTOUT printout( aCaller, _( "Print Page Layout" ) );
+
+ if( !printer.Print( aCaller, &printout, true ) )
+ {
+ if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
+ wxMessageBox( _( "An error occurred attempting to print the page layout." ),
+ _( "Printing" ), wxOK );
+ return 0;
+ }
+
+ *aPageSetupData = printer.GetPrintDialogData().GetPrintData();
+
+ return 1;
+}
+
+int InvokeDialogPrintPreview( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData )
+{
+ // Pass two printout objects: for preview, and possible printing.
+ wxString title = _( "Preview" );
+ wxPrintPreview* preview = new wxPrintPreview( new PLEDITOR_PRINTOUT( aCaller, title ),
+ new PLEDITOR_PRINTOUT( aCaller, title ),
+ aPrintData );
+
+ preview->SetZoom( 70 );
+
+ PLEDITOR_PREVIEW_FRAME* frame = new PLEDITOR_PREVIEW_FRAME( preview, aCaller, title );
+
+ frame->Initialize();
+ frame->Show( true );
+
+ return 1;
+}
+
diff --git a/pagelayout_editor/dialogs/properties_frame_base.cpp b/pagelayout_editor/dialogs/properties_frame_base.cpp
new file mode 100644
index 0000000..f4075f9
--- /dev/null
+++ b/pagelayout_editor/dialogs/properties_frame_base.cpp
@@ -0,0 +1,638 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Mar 9 2015)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "properties_frame_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+ wxBoxSizer* bSizerpanel;
+ bSizerpanel = new wxBoxSizer( wxVERTICAL );
+
+ m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_swItemProperties = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
+ m_swItemProperties->SetScrollRate( 5, 5 );
+ wxBoxSizer* bSizerMain;
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerButt;
+ bSizerButt = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerType;
+ bSizerType = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextType = new wxStaticText( m_swItemProperties, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextType->Wrap( -1 );
+ m_staticTextType->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerType->Add( m_staticTextType, 0, wxLEFT|wxRIGHT, 5 );
+
+ m_textCtrlType = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ bSizerType->Add( m_textCtrlType, 0, wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerButt->Add( bSizerType, 0, 0, 5 );
+
+ wxBoxSizer* bSizerPageOpt;
+ bSizerPageOpt = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextPageOpt = new wxStaticText( m_swItemProperties, wxID_ANY, _("Page 1 option"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPageOpt->Wrap( -1 );
+ m_staticTextPageOpt->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
+
+ bSizerPageOpt->Add( m_staticTextPageOpt, 0, wxLEFT|wxRIGHT, 5 );
+
+ wxString m_choicePageOptChoices[] = { _("None"), _("Page 1 only"), _("Not on page 1") };
+ int m_choicePageOptNChoices = sizeof( m_choicePageOptChoices ) / sizeof( wxString );
+ m_choicePageOpt = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePageOptNChoices, m_choicePageOptChoices, 0 );
+ m_choicePageOpt->SetSelection( 0 );
+ bSizerPageOpt->Add( m_choicePageOpt, 0, wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerButt->Add( bSizerPageOpt, 0, 0, 5 );
+
+
+ bSizerMain->Add( bSizerButt, 0, 0, 5 );
+
+ m_staticline5 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_SizerTextOptions = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextText = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextText->Wrap( -1 );
+ m_SizerTextOptions->Add( m_staticTextText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlText = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+ m_SizerTextOptions->Add( m_textCtrlText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerFontOpt;
+ bSizerFontOpt = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerJustify;
+ bSizerJustify = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextHjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("H justification"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextHjust->Wrap( -1 );
+ bSizerJustify->Add( m_staticTextHjust, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ wxString m_choiceHjustifyChoices[] = { _("Left"), _("Center"), _("Right") };
+ int m_choiceHjustifyNChoices = sizeof( m_choiceHjustifyChoices ) / sizeof( wxString );
+ m_choiceHjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHjustifyNChoices, m_choiceHjustifyChoices, 0 );
+ m_choiceHjustify->SetSelection( 0 );
+ bSizerJustify->Add( m_choiceHjustify, 0, wxEXPAND|wxALL, 5 );
+
+ m_checkBoxBold = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Bold"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerJustify->Add( m_checkBoxBold, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerFontOpt->Add( bSizerJustify, 0, 0, 5 );
+
+ wxBoxSizer* bSizerBoldItalic;
+ bSizerBoldItalic = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextVjust = new wxStaticText( m_swItemProperties, wxID_ANY, _("V justification"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextVjust->Wrap( -1 );
+ bSizerBoldItalic->Add( m_staticTextVjust, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+ wxString m_choiceVjustifyChoices[] = { _("Top"), _("Center"), _("Bottom") };
+ int m_choiceVjustifyNChoices = sizeof( m_choiceVjustifyChoices ) / sizeof( wxString );
+ m_choiceVjustify = new wxChoice( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceVjustifyNChoices, m_choiceVjustifyChoices, 0 );
+ m_choiceVjustify->SetSelection( 1 );
+ bSizerBoldItalic->Add( m_choiceVjustify, 0, wxEXPAND|wxALL, 5 );
+
+ m_checkBoxItalic = new wxCheckBox( m_swItemProperties, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerBoldItalic->Add( m_checkBoxItalic, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerFontOpt->Add( bSizerBoldItalic, 1, 0, 5 );
+
+
+ m_SizerTextOptions->Add( bSizerFontOpt, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerTextSize;
+ bSizerTextSize = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerTsizeX;
+ bSizerTsizeX = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTexTsizeX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Width (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTexTsizeX->Wrap( -1 );
+ bSizerTsizeX->Add( m_staticTexTsizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlTextSizeX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerTsizeX->Add( m_textCtrlTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerTextSize->Add( bSizerTsizeX, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerTsizeY;
+ bSizerTsizeY = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextTsizeY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Height (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTsizeY->Wrap( -1 );
+ bSizerTsizeY->Add( m_staticTextTsizeY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlTextSizeY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerTsizeY->Add( m_textCtrlTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerTextSize->Add( bSizerTsizeY, 1, wxEXPAND, 5 );
+
+
+ m_SizerTextOptions->Add( bSizerTextSize, 0, 0, 5 );
+
+ m_staticTextConstraints = new wxStaticText( m_swItemProperties, wxID_ANY, _("Constraints:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConstraints->Wrap( -1 );
+ m_SizerTextOptions->Add( m_staticTextConstraints, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizerConstraints;
+ bSizerConstraints = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer42;
+ bSizer42 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextConstraintX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConstraintX->Wrap( -1 );
+ bSizer42->Add( m_staticTextConstraintX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlConstraintX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer42->Add( m_textCtrlConstraintX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerConstraints->Add( bSizer42, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer52;
+ bSizer52 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextConstraintY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Max Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextConstraintY->Wrap( -1 );
+ bSizer52->Add( m_staticTextConstraintY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlConstraintY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer52->Add( m_textCtrlConstraintY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerConstraints->Add( bSizer52, 1, wxEXPAND, 5 );
+
+
+ m_SizerTextOptions->Add( bSizerConstraints, 0, 0, 5 );
+
+ m_staticline6 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ m_SizerTextOptions->Add( m_staticline6, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerMain->Add( m_SizerTextOptions, 0, wxEXPAND, 5 );
+
+ m_buttonOK = new wxButton( m_swItemProperties, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonOK->SetDefault();
+ bSizerMain->Add( m_buttonOK, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticline8 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline8, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_staticTextComment = new wxStaticText( m_swItemProperties, wxID_ANY, _("Comment"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextComment->Wrap( -1 );
+ bSizerMain->Add( m_staticTextComment, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlComment = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerMain->Add( m_textCtrlComment, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+ m_staticline2 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizerPos;
+ bSizerPos = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerPosXY;
+ bSizerPosXY = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer4;
+ bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextPosX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Pos X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosX->Wrap( -1 );
+ bSizer4->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlPosX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer4->Add( m_textCtrlPosX, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerPosXY->Add( bSizer4, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer5;
+ bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextPosY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Pos Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextPosY->Wrap( -1 );
+ bSizer5->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlPosY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer5->Add( m_textCtrlPosY, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerPosXY->Add( bSizer5, 1, wxEXPAND, 5 );
+
+
+ bSizerPos->Add( bSizerPosXY, 1, 0, 5 );
+
+ wxBoxSizer* bSizer6;
+ bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextOrgPos = new wxStaticText( m_swItemProperties, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextOrgPos->Wrap( -1 );
+ bSizer6->Add( m_staticTextOrgPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_comboBoxCornerPos = new wxComboBox( m_swItemProperties, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ m_comboBoxCornerPos->Append( _("Upper Right") );
+ m_comboBoxCornerPos->Append( _("Upper Left") );
+ m_comboBoxCornerPos->Append( _("Lower Right") );
+ m_comboBoxCornerPos->Append( _("Lower Left") );
+ m_comboBoxCornerPos->SetSelection( 2 );
+ bSizer6->Add( m_comboBoxCornerPos, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerPos->Add( bSizer6, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerMain->Add( bSizerPos, 0, 0, 5 );
+
+ m_SizerEndPosition = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerEndXY;
+ bSizerEndXY = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer41;
+ bSizer41 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextEndX = new wxStaticText( m_swItemProperties, wxID_ANY, _("End X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextEndX->Wrap( -1 );
+ bSizer41->Add( m_staticTextEndX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlEndX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer41->Add( m_textCtrlEndX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerEndXY->Add( bSizer41, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer51;
+ bSizer51 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextEndY = new wxStaticText( m_swItemProperties, wxID_ANY, _("End Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextEndY->Wrap( -1 );
+ bSizer51->Add( m_staticTextEndY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlEndY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer51->Add( m_textCtrlEndY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerEndXY->Add( bSizer51, 1, wxEXPAND, 5 );
+
+
+ m_SizerEndPosition->Add( bSizerEndXY, 1, 0, 5 );
+
+ wxBoxSizer* bSizer61;
+ bSizer61 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextOrgEnd = new wxStaticText( m_swItemProperties, wxID_ANY, _("Origin"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextOrgEnd->Wrap( -1 );
+ bSizer61->Add( m_staticTextOrgEnd, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_comboBoxCornerEnd = new wxComboBox( m_swItemProperties, wxID_ANY, _("Lower Right"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+ m_comboBoxCornerEnd->Append( _("Upper Right") );
+ m_comboBoxCornerEnd->Append( _("Upper Left") );
+ m_comboBoxCornerEnd->Append( _("Lower Right") );
+ m_comboBoxCornerEnd->Append( _("Lower Left") );
+ m_comboBoxCornerEnd->SetSelection( 2 );
+ bSizer61->Add( m_comboBoxCornerEnd, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ m_SizerEndPosition->Add( bSizer61, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerMain->Add( m_SizerEndPosition, 0, 0, 5 );
+
+ m_SizerLineThickness = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerThickness;
+ bSizerThickness = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextThickness->Wrap( -1 );
+ bSizerThickness->Add( m_staticTextThickness, 0, wxLEFT|wxRIGHT, 5 );
+
+ m_textCtrlThickness = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerThickness->Add( m_textCtrlThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ m_SizerLineThickness->Add( bSizerThickness, 0, wxEXPAND, 5 );
+
+ m_staticTextInfoThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Set to 0 to use default"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextInfoThickness->Wrap( -1 );
+ m_SizerLineThickness->Add( m_staticTextInfoThickness, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerMain->Add( m_SizerLineThickness, 0, 0, 5 );
+
+ m_SizerRotation = new wxBoxSizer( wxVERTICAL );
+
+ m_staticline1 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ m_SizerRotation->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizerRotation;
+ bSizerRotation = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextRot = new wxStaticText( m_swItemProperties, wxID_ANY, _("Rotation"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRot->Wrap( -1 );
+ bSizerRotation->Add( m_staticTextRot, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlRotation = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerRotation->Add( m_textCtrlRotation, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ m_SizerRotation->Add( bSizerRotation, 0, wxEXPAND, 5 );
+
+
+ bSizerMain->Add( m_SizerRotation, 0, wxEXPAND, 5 );
+
+ m_SizerBitmapPPI = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticTextBitmapPPI = new wxStaticText( m_swItemProperties, wxID_ANY, _("Bitmap PPI"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBitmapPPI->Wrap( -1 );
+ m_SizerBitmapPPI->Add( m_staticTextBitmapPPI, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_textCtrlBitmapPPI = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizerBitmapPPI->Add( m_textCtrlBitmapPPI, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizerMain->Add( m_SizerBitmapPPI, 0, wxEXPAND, 5 );
+
+ m_staticline4 = new wxStaticLine( m_swItemProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_staticTextRepeatPrms = new wxStaticText( m_swItemProperties, wxID_ANY, _("Repeat parameters:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRepeatPrms->Wrap( -1 );
+ bSizerMain->Add( m_staticTextRepeatPrms, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer20;
+ bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer611;
+ bSizer611 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextRepeatCnt = new wxStaticText( m_swItemProperties, wxID_ANY, _("Repeat count"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextRepeatCnt->Wrap( -1 );
+ bSizer611->Add( m_staticTextRepeatCnt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlRepeatCount = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer611->Add( m_textCtrlRepeatCount, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizer20->Add( bSizer611, 1, 0, 5 );
+
+ m_SizerTextIncrementLabel = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextInclabel = new wxStaticText( m_swItemProperties, wxID_ANY, _("Text Increment"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextInclabel->Wrap( -1 );
+ m_SizerTextIncrementLabel->Add( m_staticTextInclabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlTextIncrement = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ m_SizerTextIncrementLabel->Add( m_textCtrlTextIncrement, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizer20->Add( m_SizerTextIncrementLabel, 1, wxEXPAND, 5 );
+
+
+ bSizerMain->Add( bSizer20, 0, 0, 5 );
+
+ wxBoxSizer* bSizerPosY1;
+ bSizerPosY1 = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer411;
+ bSizer411 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextStepX = new wxStaticText( m_swItemProperties, wxID_ANY, _("Step X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStepX->Wrap( -1 );
+ bSizer411->Add( m_staticTextStepX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlStepX = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer411->Add( m_textCtrlStepX, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ bSizerPosY1->Add( bSizer411, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer511;
+ bSizer511 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextStepY = new wxStaticText( m_swItemProperties, wxID_ANY, _("Step Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextStepY->Wrap( -1 );
+ bSizer511->Add( m_staticTextStepY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlStepY = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer511->Add( m_textCtrlStepY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerPosY1->Add( bSizer511, 1, wxEXPAND, 5 );
+
+
+ bSizerMain->Add( bSizerPosY1, 0, 0, 5 );
+
+
+ m_swItemProperties->SetSizer( bSizerMain );
+ m_swItemProperties->Layout();
+ bSizerMain->Fit( m_swItemProperties );
+ m_notebook->AddPage( m_swItemProperties, _("Item Properties"), true );
+ m_swGeneralOpts = new wxScrolledWindow( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTAB_TRAVERSAL|wxVSCROLL );
+ m_swGeneralOpts->SetScrollRate( 5, 5 );
+ wxBoxSizer* bSizerGeneralOpts;
+ bSizerGeneralOpts = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizerGeneralOpts1;
+ bSizerGeneralOpts1 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextDefVal = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Default Values:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefVal->Wrap( -1 );
+ bSizerGeneralOpts1->Add( m_staticTextDefVal, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizerDefTextSize;
+ bSizerDefTextSize = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerDefTsizeX;
+ bSizerDefTsizeX = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextDefTsX = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Size X (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefTsX->Wrap( -1 );
+ bSizerDefTsizeX->Add( m_staticTextDefTsX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlDefaultTextSizeX = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefTsizeX->Add( m_textCtrlDefaultTextSizeX, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefTextSize->Add( bSizerDefTsizeX, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerDefTsizeY;
+ bSizerDefTsizeY = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextDefTsY = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Size Y (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefTsY->Wrap( -1 );
+ bSizerDefTsizeY->Add( m_staticTextDefTsY, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlDefaultTextSizeY = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefTsizeY->Add( m_textCtrlDefaultTextSizeY, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefTextSize->Add( bSizerDefTsizeY, 1, wxEXPAND, 5 );
+
+
+ bSizerGeneralOpts1->Add( bSizerDefTextSize, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerDefLineWidth;
+ bSizerDefLineWidth = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizer25;
+ bSizer25 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextDefLineW = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Line Thickness (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefLineW->Wrap( -1 );
+ bSizer25->Add( m_staticTextDefLineW, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlDefaultLineWidth = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer25->Add( m_textCtrlDefaultLineWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefLineWidth->Add( bSizer25, 1, 0, 5 );
+
+ wxBoxSizer* bSizerDefTextThickness;
+ bSizerDefTextThickness = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText22 = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Text Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText22->Wrap( -1 );
+ bSizerDefTextThickness->Add( m_staticText22, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlDefaultTextThickness = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefTextThickness->Add( m_textCtrlDefaultTextThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefLineWidth->Add( bSizerDefTextThickness, 1, 0, 5 );
+
+
+ bSizerGeneralOpts1->Add( bSizerDefLineWidth, 0, wxEXPAND, 5 );
+
+
+ bSizerGeneralOpts->Add( bSizerGeneralOpts1, 0, 0, 5 );
+
+ m_buttonDefault = new wxButton( m_swGeneralOpts, wxID_ANY, _("Set to Default"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerGeneralOpts->Add( m_buttonDefault, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticline9 = new wxStaticLine( m_swGeneralOpts, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerGeneralOpts->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
+
+ wxBoxSizer* bSizerGeneraMargins;
+ bSizerGeneraMargins = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextMargins = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Page Margins"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMargins->Wrap( -1 );
+ bSizerGeneraMargins->Add( m_staticTextMargins, 0, wxALL, 5 );
+
+ wxBoxSizer* bSizerDefLRMargins;
+ bSizerDefLRMargins = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerDefLeftMargin;
+ bSizerDefLeftMargin = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextLeftMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Left Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextLeftMargin->Wrap( -1 );
+ bSizerDefLeftMargin->Add( m_staticTextLeftMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlLeftMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefLeftMargin->Add( m_textCtrlLeftMargin, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefLRMargins->Add( bSizerDefLeftMargin, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerDefTsizeY1;
+ bSizerDefTsizeY1 = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextDefRightMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Right Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextDefRightMargin->Wrap( -1 );
+ bSizerDefTsizeY1->Add( m_staticTextDefRightMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlRightMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefTsizeY1->Add( m_textCtrlRightMargin, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefLRMargins->Add( bSizerDefTsizeY1, 1, wxEXPAND, 5 );
+
+
+ bSizerGeneraMargins->Add( bSizerDefLRMargins, 0, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerDefTBMargins;
+ bSizerDefTBMargins = new wxBoxSizer( wxHORIZONTAL );
+
+ wxBoxSizer* bSizerTopMargin;
+ bSizerTopMargin = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextTopMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Top Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextTopMargin->Wrap( -1 );
+ bSizerTopMargin->Add( m_staticTextTopMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlTopMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerTopMargin->Add( m_textCtrlTopMargin, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefTBMargins->Add( bSizerTopMargin, 1, 0, 5 );
+
+ wxBoxSizer* bSizerDefBottomMargin;
+ bSizerDefBottomMargin = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextBottomMargin = new wxStaticText( m_swGeneralOpts, wxID_ANY, _("Bottom Margin (mm)"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBottomMargin->Wrap( -1 );
+ bSizerDefBottomMargin->Add( m_staticTextBottomMargin, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_textCtrlDefaultBottomMargin = new wxTextCtrl( m_swGeneralOpts, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerDefBottomMargin->Add( m_textCtrlDefaultBottomMargin, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
+
+
+ bSizerDefTBMargins->Add( bSizerDefBottomMargin, 1, 0, 5 );
+
+
+ bSizerGeneraMargins->Add( bSizerDefTBMargins, 0, wxEXPAND, 5 );
+
+
+ bSizerGeneralOpts->Add( bSizerGeneraMargins, 0, 0, 5 );
+
+ m_buttonGeneralOptsOK = new wxButton( m_swGeneralOpts, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_buttonGeneralOptsOK->SetDefault();
+ bSizerGeneralOpts->Add( m_buttonGeneralOptsOK, 0, wxALL|wxEXPAND, 5 );
+
+
+ m_swGeneralOpts->SetSizer( bSizerGeneralOpts );
+ m_swGeneralOpts->Layout();
+ bSizerGeneralOpts->Fit( m_swGeneralOpts );
+ m_notebook->AddPage( m_swGeneralOpts, _("General Options"), false );
+
+ bSizerpanel->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
+
+
+ this->SetSizer( bSizerpanel );
+ this->Layout();
+
+ // Connect Events
+ m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
+ m_buttonDefault->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnSetDefaultValues ), NULL, this );
+ m_buttonGeneralOptsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
+}
+
+PANEL_PROPERTIES_BASE::~PANEL_PROPERTIES_BASE()
+{
+ // Disconnect Events
+ m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
+ m_buttonDefault->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnSetDefaultValues ), NULL, this );
+ m_buttonGeneralOptsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PROPERTIES_BASE::OnAcceptPrms ), NULL, this );
+
+}
diff --git a/pagelayout_editor/dialogs/properties_frame_base.fbp b/pagelayout_editor/dialogs/properties_frame_base.fbp
new file mode 100644
index 0000000..335e750
--- /dev/null
+++ b/pagelayout_editor/dialogs/properties_frame_base.fbp
@@ -0,0 +1,7684 @@
+
+
+
+
+
+ C++
+ 1
+ source_name
+ 0
+ 0
+ res
+ UTF-8
+ connect
+ properties_frame_base
+ 1000
+ none
+ 1
+ properties_frame
+
+ .
+
+ 1
+ 1
+ 1
+ 1
+ UI
+ 1
+ 0
+
+ 0
+ wxAUI_MGR_DEFAULT
+
+
+ 1
+ 1
+ impl_virtual
+
+
+ 0
+ wxID_ANY
+
+
+ PANEL_PROPERTIES_BASE
+
+ 315,782
+
+
+
+
+ wxTAB_TRAVERSAL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bSizerpanel
+ wxVERTICAL
+ none
+
+ 5
+ wxEXPAND | wxALL
+ 1
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_notebook
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Item Properties
+ 1
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+ 0
+
+ 1
+ m_swItemProperties
+ 1
+
+
+ protected
+ 1
+
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ock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+
+ 0
+
+
+
+ 0
+
+ 1
+ m_textCtrlDefaultBottomMargin
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ wxALL|wxEXPAND
+ 0
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+ 1
+ 0
+ 1
+
+ 1
+ 1
+ 0
+ Dock
+ 0
+ Left
+ 1
+
+ 1
+
+ 0
+ 0
+ wxID_ANY
+ Accept
+
+ 0
+
+
+ 0
+
+ 1
+ m_buttonGeneralOptsOK
+ 1
+
+
+ protected
+ 1
+
+ Resizable
+ 1
+
+
+
+ 0
+
+
+ wxFILTER_NONE
+ wxDefaultValidator
+
+
+
+
+ OnAcceptPrms
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pagelayout_editor/dialogs/properties_frame_base.h b/pagelayout_editor/dialogs/properties_frame_base.h
new file mode 100644
index 0000000..28ab1f4
--- /dev/null
+++ b/pagelayout_editor/dialogs/properties_frame_base.h
@@ -0,0 +1,145 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Mar 9 2015)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PROPERTIES_FRAME_BASE_H__
+#define __PROPERTIES_FRAME_BASE_H__
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PANEL_PROPERTIES_BASE
+///////////////////////////////////////////////////////////////////////////////
+class PANEL_PROPERTIES_BASE : public wxPanel
+{
+ private:
+
+ protected:
+ wxNotebook* m_notebook;
+ wxScrolledWindow* m_swItemProperties;
+ wxStaticText* m_staticTextType;
+ wxTextCtrl* m_textCtrlType;
+ wxStaticText* m_staticTextPageOpt;
+ wxChoice* m_choicePageOpt;
+ wxStaticLine* m_staticline5;
+ wxBoxSizer* m_SizerTextOptions;
+ wxStaticText* m_staticTextText;
+ wxTextCtrl* m_textCtrlText;
+ wxStaticText* m_staticTextHjust;
+ wxChoice* m_choiceHjustify;
+ wxCheckBox* m_checkBoxBold;
+ wxStaticText* m_staticTextVjust;
+ wxChoice* m_choiceVjustify;
+ wxCheckBox* m_checkBoxItalic;
+ wxStaticText* m_staticTexTsizeX;
+ wxTextCtrl* m_textCtrlTextSizeX;
+ wxStaticText* m_staticTextTsizeY;
+ wxTextCtrl* m_textCtrlTextSizeY;
+ wxStaticText* m_staticTextConstraints;
+ wxStaticText* m_staticTextConstraintX;
+ wxTextCtrl* m_textCtrlConstraintX;
+ wxStaticText* m_staticTextConstraintY;
+ wxTextCtrl* m_textCtrlConstraintY;
+ wxStaticLine* m_staticline6;
+ wxButton* m_buttonOK;
+ wxStaticLine* m_staticline8;
+ wxStaticText* m_staticTextComment;
+ wxTextCtrl* m_textCtrlComment;
+ wxStaticLine* m_staticline2;
+ wxStaticText* m_staticTextPosX;
+ wxTextCtrl* m_textCtrlPosX;
+ wxStaticText* m_staticTextPosY;
+ wxTextCtrl* m_textCtrlPosY;
+ wxStaticText* m_staticTextOrgPos;
+ wxComboBox* m_comboBoxCornerPos;
+ wxBoxSizer* m_SizerEndPosition;
+ wxStaticText* m_staticTextEndX;
+ wxTextCtrl* m_textCtrlEndX;
+ wxStaticText* m_staticTextEndY;
+ wxTextCtrl* m_textCtrlEndY;
+ wxStaticText* m_staticTextOrgEnd;
+ wxComboBox* m_comboBoxCornerEnd;
+ wxBoxSizer* m_SizerLineThickness;
+ wxStaticText* m_staticTextThickness;
+ wxTextCtrl* m_textCtrlThickness;
+ wxStaticText* m_staticTextInfoThickness;
+ wxBoxSizer* m_SizerRotation;
+ wxStaticLine* m_staticline1;
+ wxStaticText* m_staticTextRot;
+ wxTextCtrl* m_textCtrlRotation;
+ wxBoxSizer* m_SizerBitmapPPI;
+ wxStaticText* m_staticTextBitmapPPI;
+ wxTextCtrl* m_textCtrlBitmapPPI;
+ wxStaticLine* m_staticline4;
+ wxStaticText* m_staticTextRepeatPrms;
+ wxStaticText* m_staticTextRepeatCnt;
+ wxTextCtrl* m_textCtrlRepeatCount;
+ wxBoxSizer* m_SizerTextIncrementLabel;
+ wxStaticText* m_staticTextInclabel;
+ wxTextCtrl* m_textCtrlTextIncrement;
+ wxStaticText* m_staticTextStepX;
+ wxTextCtrl* m_textCtrlStepX;
+ wxStaticText* m_staticTextStepY;
+ wxTextCtrl* m_textCtrlStepY;
+ wxScrolledWindow* m_swGeneralOpts;
+ wxStaticText* m_staticTextDefVal;
+ wxStaticText* m_staticTextDefTsX;
+ wxTextCtrl* m_textCtrlDefaultTextSizeX;
+ wxStaticText* m_staticTextDefTsY;
+ wxTextCtrl* m_textCtrlDefaultTextSizeY;
+ wxStaticText* m_staticTextDefLineW;
+ wxTextCtrl* m_textCtrlDefaultLineWidth;
+ wxStaticText* m_staticText22;
+ wxTextCtrl* m_textCtrlDefaultTextThickness;
+ wxButton* m_buttonDefault;
+ wxStaticLine* m_staticline9;
+ wxStaticText* m_staticTextMargins;
+ wxStaticText* m_staticTextLeftMargin;
+ wxTextCtrl* m_textCtrlLeftMargin;
+ wxStaticText* m_staticTextDefRightMargin;
+ wxTextCtrl* m_textCtrlRightMargin;
+ wxStaticText* m_staticTextTopMargin;
+ wxTextCtrl* m_textCtrlTopMargin;
+ wxStaticText* m_staticTextBottomMargin;
+ wxTextCtrl* m_textCtrlDefaultBottomMargin;
+ wxButton* m_buttonGeneralOptsOK;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnAcceptPrms( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSetDefaultValues( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 315,782 ), long style = wxTAB_TRAVERSAL );
+ ~PANEL_PROPERTIES_BASE();
+
+};
+
+#endif //__PROPERTIES_FRAME_BASE_H__
diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp
new file mode 100644
index 0000000..1c6ec10
--- /dev/null
+++ b/pagelayout_editor/events_functions.cpp
@@ -0,0 +1,589 @@
+/**
+ * @file pagelayout_editor/events_functions.cpp
+ * @brief page layout editor command event functions.
+ */
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
+ EVT_CLOSE( PL_EDITOR_FRAME::OnCloseWindow )
+
+ // Desing tree event:
+ EVT_TREE_SEL_CHANGED( ID_DESIGN_TREE_FRAME, PL_EDITOR_FRAME::OnTreeSelection )
+ EVT_TREE_ITEM_MIDDLE_CLICK( ID_DESIGN_TREE_FRAME, PL_EDITOR_FRAME::OnTreeMiddleClick )
+ EVT_TREE_ITEM_RIGHT_CLICK( ID_DESIGN_TREE_FRAME, PL_EDITOR_FRAME::OnTreeRightClick )
+
+ // Menu Files:
+ EVT_MENU( wxID_NEW, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( wxID_OPEN, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( wxID_SAVE, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( wxID_SAVEAS, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( wxID_FILE, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( ID_LOAD_DEFAULT_PAGE_LAYOUT, PL_EDITOR_FRAME::Files_io )
+ EVT_MENU( ID_APPEND_DESCR_FILE, PL_EDITOR_FRAME::Files_io )
+
+ EVT_MENU( ID_GEN_PLOT, PL_EDITOR_FRAME::ToPlotter )
+
+ EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, PL_EDITOR_FRAME::OnFileHistory )
+
+ EVT_MENU( wxID_EXIT, PL_EDITOR_FRAME::OnQuit )
+
+ // menu Preferences
+ EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END, PL_EDITOR_FRAME::Process_Config )
+ EVT_MENU( ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR, EDA_BASE_FRAME::OnSelectPreferredEditor )
+ EVT_MENU( wxID_PREFERENCES, PL_EDITOR_FRAME::Process_Config )
+ EVT_MENU( ID_MENU_SWITCH_BGCOLOR, PL_EDITOR_FRAME::Process_Config )
+ EVT_MENU( ID_MENU_GRID_ONOFF, PL_EDITOR_FRAME::Process_Config )
+
+ // Menu Help
+ EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
+ EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
+ EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
+
+ EVT_TOOL( wxID_CUT, PL_EDITOR_FRAME::Process_Special_Functions )
+ EVT_TOOL( wxID_UNDO, PL_EDITOR_FRAME::GetLayoutFromUndoList )
+ EVT_TOOL( wxID_REDO, PL_EDITOR_FRAME::GetLayoutFromRedoList )
+ EVT_TOOL( wxID_PRINT, PL_EDITOR_FRAME::ToPrinter )
+ EVT_TOOL( wxID_PREVIEW, PL_EDITOR_FRAME::ToPrinter )
+ EVT_TOOL( ID_SHEET_SET, PL_EDITOR_FRAME::Process_Special_Functions )
+ EVT_TOOL( ID_SHOW_REAL_MODE, PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode )
+ EVT_TOOL( ID_SHOW_PL_EDITOR_MODE, PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode )
+ EVT_CHOICE( ID_SELECT_COORDINATE_ORIGIN, PL_EDITOR_FRAME::OnSelectCoordOriginCorner)
+ EVT_CHOICE( ID_SELECT_PAGE_NUMBER, PL_EDITOR_FRAME::Process_Special_Functions)
+
+ // Vertical toolbar:
+ EVT_TOOL( ID_NO_TOOL_SELECTED, PL_EDITOR_FRAME::Process_Special_Functions )
+
+ EVT_MENU_RANGE( ID_POPUP_START_RANGE, ID_POPUP_END_RANGE,
+ PL_EDITOR_FRAME::Process_Special_Functions )
+
+ EVT_UPDATE_UI( ID_SHOW_REAL_MODE, PL_EDITOR_FRAME::OnUpdateTitleBlockDisplayNormalMode )
+ EVT_UPDATE_UI( ID_SHOW_PL_EDITOR_MODE, PL_EDITOR_FRAME::OnUpdateTitleBlockDisplaySpecialMode )
+
+END_EVENT_TABLE()
+
+
+/* Handles the selection of tools, menu, and popup menu commands.
+ */
+void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
+{
+ int id = event.GetId();
+ int idx;
+ wxString msg;
+ WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
+ WORKSHEET_DATAITEM* item = NULL;
+ wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
+ cmd.SetEventObject( this );
+
+ switch( id )
+ {
+ case ID_NO_TOOL_SELECTED:
+ SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
+ break;
+
+ case ID_SELECT_PAGE_NUMBER:
+ m_canvas->Refresh();
+ break;
+
+ case ID_SHEET_SET:
+ {
+ DIALOG_PAGES_SETTINGS dlg( this );
+ dlg.SetWksFileName( GetCurrFileName() );
+ dlg.EnableWksFileNamePicker( false );
+ dlg.ShowModal();
+
+ cmd.SetId( ID_ZOOM_PAGE );
+ wxPostEvent( this, cmd );
+ }
+ break;
+
+ case ID_POPUP_CANCEL_CURRENT_COMMAND:
+ break;
+
+ case ID_POPUP_DESIGN_TREE_ITEM_DELETE:
+ case ID_POPUP_ITEM_DELETE:
+ case wxID_CUT:
+ // Delete item, and select the previous item
+ item = m_treePagelayout->GetPageLayoutSelectedItem();
+
+ if( item == NULL )
+ break;
+
+ SaveCopyInUndoList();
+ idx = pglayout.GetItemIndex( item );
+ pglayout.Remove( item );
+ RebuildDesignTree();
+
+ if( id == ID_POPUP_DESIGN_TREE_ITEM_DELETE )
+ {
+ item = pglayout.GetItem( (unsigned) (idx-1) );
+
+ if( item )
+ m_treePagelayout->SelectCell( item );
+ }
+
+ item = NULL;
+ OnModify();
+ m_canvas->Refresh();
+ break;
+
+ case ID_POPUP_ITEM_ADD_LINE:
+ SaveCopyInUndoList();
+ idx = m_treePagelayout->GetSelectedItemIndex();
+ item = AddPageLayoutItem( WORKSHEET_DATAITEM::WS_SEGMENT, idx );
+
+ if( InvokeDialogNewItem( this, item ) == wxID_CANCEL )
+ {
+ RemoveLastCommandInUndoList();
+ pglayout.Remove( item );
+ RebuildDesignTree();
+ item = NULL;
+ }
+ else
+ {
+ // Put the new item in move mode, after putting the cursor
+ // on the start point:
+ wxPoint position = item->GetStartPosUi();
+ SetCrossHairPosition( position, false );
+ position = GetCrossHairPosition();
+
+ if( m_canvas->IsPointOnDisplay( position ) )
+ m_canvas->MoveCursorToCrossHair();
+ else
+ RedrawScreen( position, true );
+
+ item->SetFlags( NEW_ITEM );
+ MoveItem( item );
+ }
+ break;
+
+ case ID_POPUP_ITEM_ADD_RECT:
+ SaveCopyInUndoList();
+ idx = m_treePagelayout->GetSelectedItemIndex();
+ item = AddPageLayoutItem( WORKSHEET_DATAITEM::WS_RECT, idx );
+
+ if( InvokeDialogNewItem( this, item ) == wxID_CANCEL )
+ {
+ RemoveLastCommandInUndoList();
+ pglayout.Remove( item );
+ RebuildDesignTree();
+ item = NULL;
+ }
+ else
+ {
+ // Put the new item in move mode, after putting the cursor
+ // on the start point:
+ wxPoint position = item->GetStartPosUi();
+ SetCrossHairPosition( position, false );
+ position = GetCrossHairPosition();
+
+ if( m_canvas->IsPointOnDisplay( position ) )
+ m_canvas->MoveCursorToCrossHair();
+ else
+ RedrawScreen( position, true );
+
+ item->SetFlags( NEW_ITEM );
+ MoveItem( item );
+ }
+ break;
+
+ case ID_POPUP_ITEM_ADD_TEXT:
+ SaveCopyInUndoList();
+ idx = m_treePagelayout->GetSelectedItemIndex();
+ item = AddPageLayoutItem( WORKSHEET_DATAITEM::WS_TEXT, idx );
+ if( InvokeDialogNewItem( this, item ) == wxID_CANCEL )
+ {
+ RemoveLastCommandInUndoList();
+ pglayout.Remove( item );
+ RebuildDesignTree();
+ item = NULL;
+ }
+ else
+ {
+ // Put the new text in move mode:
+ item->SetFlags( NEW_ITEM | LOCATE_STARTPOINT );
+ MoveItem( item );
+ }
+ break;
+
+ case ID_POPUP_ITEM_ADD_BITMAP:
+ SaveCopyInUndoList();
+ idx = m_treePagelayout->GetSelectedItemIndex();
+ item = AddPageLayoutItem( WORKSHEET_DATAITEM::WS_BITMAP, idx );
+ if( item && InvokeDialogNewItem( this, item ) == wxID_CANCEL )
+ {
+ RemoveLastCommandInUndoList();
+ pglayout.Remove( item );
+ RebuildDesignTree();
+ item = NULL;
+ }
+ if( item )
+ {
+ // Put the new text in move mode:
+ item->SetFlags( NEW_ITEM | LOCATE_STARTPOINT );
+ MoveItem( item );
+ }
+ break;
+
+ case ID_POPUP_ITEM_APPEND_PAGE_LAYOUT:
+ cmd.SetId( ID_APPEND_DESCR_FILE );
+ wxPostEvent( this, cmd );
+ break;
+
+ case ID_POPUP_ITEM_PLACE:
+ item = GetScreen()->GetCurItem();
+ PlaceItem( item );
+ break;
+
+ case ID_POPUP_ITEM_PLACE_CANCEL:
+ if( m_canvas->IsMouseCaptured() )
+ m_canvas->EndMouseCapture();
+ break;
+
+ case ID_POPUP_ITEM_MOVE_START_POINT:
+ item = m_treePagelayout->GetPageLayoutSelectedItem();
+ // Ensure flags are properly set
+ item->ClearFlags( LOCATE_ENDPOINT );
+ item->SetFlags( LOCATE_STARTPOINT );
+ MoveItem( item );
+ break;
+
+ case ID_POPUP_ITEM_MOVE_END_POINT:
+ item = m_treePagelayout->GetPageLayoutSelectedItem();
+ // Ensure flags are properly set
+ item->ClearFlags( LOCATE_STARTPOINT );
+ item->SetFlags( LOCATE_ENDPOINT );
+ MoveItem( item );
+ break;
+
+ case ID_POPUP_ITEM_MOVE:
+ item = m_treePagelayout->GetPageLayoutSelectedItem();
+ item->ClearFlags( LOCATE_ENDPOINT|LOCATE_STARTPOINT );
+ MoveItem( item );
+ break;
+
+ default:
+ wxMessageBox( wxT( "PL_EDITOR_FRAME::Process_Special_Functions error" ) );
+ break;
+ }
+
+ if( item )
+ {
+ OnModify();
+ m_propertiesPagelayout->CopyPrmsFromItemToPanel( item );
+ m_treePagelayout->SelectCell( item );
+ }
+
+}
+
+
+/*
+ * Function moveItem: called when the mouse cursor is moving
+ * moves the item currently selected (or the start point or the end point)
+ * to the cursor position
+ */
+DPOINT initialPosition; // The initial position of the item to move, in mm
+wxPoint initialPositionUi; // The initial position of the item to move, in Ui
+wxPoint initialCursorPosition; // The initial position of the cursor
+
+static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase )
+{
+ PL_EDITOR_SCREEN* screen = (PL_EDITOR_SCREEN*) aPanel->GetScreen();
+ WORKSHEET_DATAITEM *item = screen->GetCurItem();
+
+ wxCHECK_RET( (item != NULL), wxT( "Cannot move NULL item." ) );
+ wxPoint position = aPanel->GetParent()->GetCrossHairPosition()
+ - ( initialCursorPosition - initialPositionUi );
+ wxPoint previous_position;
+
+ if( (item->GetFlags() & LOCATE_STARTPOINT) )
+ {
+ previous_position = item->GetStartPosUi();
+ item->MoveStartPointToUi( position );
+ }
+ else if( (item->GetFlags() & LOCATE_ENDPOINT) )
+ {
+ previous_position = item->GetEndPosUi();
+ item->MoveEndPointToUi( position );
+ }
+ else
+ {
+ previous_position = item->GetStartPosUi();
+ item->MoveToUi( position );
+ }
+
+ // Draw the item item at it's new position, if it is modified,
+ // (does not happen each time the mouse is moved, because the
+ // item is placed on grid)
+ // to avoid useless computation time.
+ if( previous_position != position )
+ aPanel->Refresh();
+}
+
+
+/*
+ * Function abortMoveItem: called when an item is currently moving,
+ * and when the user aborts the move command.
+ * Restores the initial position of the item
+ */
+static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
+{
+ PL_EDITOR_SCREEN* screen = (PL_EDITOR_SCREEN*) aPanel->GetScreen();
+ WORKSHEET_DATAITEM *item = screen->GetCurItem();
+
+ if( item->GetFlags() & NEW_ITEM )
+ {
+ PL_EDITOR_FRAME* plframe = (PL_EDITOR_FRAME*) aPanel->GetParent();
+ plframe->RemoveLastCommandInUndoList();
+ WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
+ pglayout.Remove( item );
+ plframe->RebuildDesignTree();
+ }
+ else
+ {
+ if( (item->GetFlags() & LOCATE_STARTPOINT) )
+ {
+ item->MoveStartPointTo( initialPosition );
+ }
+ else if( (item->GetFlags() & LOCATE_ENDPOINT) )
+ {
+ item->MoveEndPointTo( initialPosition );
+ }
+ else
+ item->MoveTo( initialPosition );
+ }
+
+ aPanel->SetMouseCapture( NULL, NULL );
+ screen->SetCurItem( NULL );
+ aPanel->Refresh();
+}
+
+
+void PL_EDITOR_FRAME::MoveItem( WORKSHEET_DATAITEM* aItem )
+{
+ wxCHECK_RET( aItem != NULL, wxT( "Cannot move NULL item" ) );
+ initialPosition = aItem->GetStartPos();
+ initialPositionUi = aItem->GetStartPosUi();
+ initialCursorPosition = GetCrossHairPosition();
+
+ if( (aItem->GetFlags() & LOCATE_ENDPOINT) )
+ {
+ initialPosition = aItem->GetEndPos();
+ initialPositionUi = aItem->GetEndPosUi();
+ }
+
+ if( aItem->GetFlags() & (LOCATE_STARTPOINT|LOCATE_ENDPOINT) )
+ {
+ SetCrossHairPosition( initialPositionUi, false );
+ initialCursorPosition = GetCrossHairPosition();
+
+ if( m_canvas->IsPointOnDisplay( initialCursorPosition ) )
+ {
+ m_canvas->MoveCursorToCrossHair();
+ m_canvas->Refresh();
+ }
+ else
+ {
+ RedrawScreen( initialCursorPosition, true );
+ }
+ }
+
+ m_canvas->SetMouseCapture( moveItem, abortMoveItem );
+ GetScreen()->SetCurItem( aItem );
+}
+
+
+/**
+* Save in Undo list the layout, and place an item being moved.
+* @param aItem is the item moved
+*/
+void PL_EDITOR_FRAME::PlaceItem( WORKSHEET_DATAITEM* aItem )
+{
+ DPOINT currStartPos = aItem->GetStartPos();
+ DPOINT currEndPos = aItem->GetEndPos();
+
+ aItem->ClearFlags( NEW_ITEM );
+
+ // Save the curren layout before changes
+ if( (aItem->GetFlags() & LOCATE_STARTPOINT) )
+ {
+ aItem->MoveStartPointTo( initialPosition );
+ }
+ else if( aItem->GetFlags() & LOCATE_ENDPOINT )
+ {
+ aItem->MoveEndPointTo( initialPosition );
+ }
+ else
+ aItem->MoveTo( initialPosition );
+
+ SaveCopyInUndoList();
+
+ // Re-place the item
+ aItem->MoveStartPointTo( currStartPos );
+ aItem->MoveEndPointTo( currEndPos );
+
+ m_canvas->SetMouseCapture( NULL, NULL );
+ GetScreen()->SetCurItem( NULL );
+}
+
+
+/* called when the user select one of the 4 page corner as corner
+ * reference (or the left top paper corner)
+ */
+void PL_EDITOR_FRAME::OnSelectCoordOriginCorner( wxCommandEvent& event )
+{
+ m_originSelectChoice = m_originSelectBox->GetSelection();
+ UpdateStatusBar(); // Update grid origin
+ m_canvas->Refresh();
+}
+
+
+void PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode( wxCommandEvent& event )
+{
+ WORKSHEET_DATAITEM::m_SpecialMode = (event.GetId() == ID_SHOW_PL_EDITOR_MODE);
+ m_canvas->Refresh();
+}
+
+
+void PL_EDITOR_FRAME::OnQuit( wxCommandEvent& event )
+{
+ Close( true );
+}
+
+
+void PL_EDITOR_FRAME::ToPlotter(wxCommandEvent& event)
+{
+ wxMessageBox( wxT( "Not yet available" ) );
+}
+
+
+void PL_EDITOR_FRAME::ToPrinter(wxCommandEvent& event)
+{
+ // static print data and page setup data, to remember settings during the session
+ static wxPrintData* s_PrintData;
+ static wxPageSetupDialogData* s_pageSetupData = (wxPageSetupDialogData*) NULL;
+
+ const PAGE_INFO& pageInfo = GetPageSettings();
+
+ if( s_PrintData == NULL ) // First print
+ {
+ s_PrintData = new wxPrintData();
+ s_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); // Default resolution = HIGH;
+ }
+
+ if( !s_PrintData->Ok() )
+ {
+ wxMessageBox( _( "Error Init Printer info" ) );
+ return;
+ }
+
+ if( s_pageSetupData == NULL )
+ s_pageSetupData = new wxPageSetupDialogData( *s_PrintData );
+
+ s_pageSetupData->SetPaperId( pageInfo.GetPaperId() );
+ s_pageSetupData->GetPrintData().SetOrientation( pageInfo.GetWxOrientation() );
+
+ if( pageInfo.IsCustom() )
+ {
+ if( pageInfo.IsPortrait() )
+ s_pageSetupData->SetPaperSize( wxSize( Mils2mm( pageInfo.GetWidthMils() ),
+ Mils2mm( pageInfo.GetHeightMils() ) ) );
+ else
+ s_pageSetupData->SetPaperSize( wxSize( Mils2mm( pageInfo.GetHeightMils() ),
+ Mils2mm( pageInfo.GetWidthMils() ) ) );
+ }
+
+ *s_PrintData = s_pageSetupData->GetPrintData();
+
+ if( event.GetId() == wxID_PREVIEW )
+ InvokeDialogPrintPreview( this, s_PrintData );
+ else
+ InvokeDialogPrint( this, s_PrintData, s_pageSetupData );
+}
+
+
+void PL_EDITOR_FRAME::OnTreeSelection( wxTreeEvent& event )
+{
+ WORKSHEET_DATAITEM* item = GetSelectedItem();
+
+ if( item )
+ m_propertiesPagelayout->CopyPrmsFromItemToPanel( item );
+
+ m_canvas->Refresh();
+}
+
+
+void PL_EDITOR_FRAME::OnTreeMiddleClick( wxTreeEvent& event )
+{
+}
+
+
+extern void AddNewItemsCommand( wxMenu* aMainMenu );
+
+
+void PL_EDITOR_FRAME::OnTreeRightClick( wxTreeEvent& event )
+{
+ m_treePagelayout->SelectCell( event.GetItem() );
+
+ wxMenu popMenu;
+ AddNewItemsCommand( &popMenu );
+
+ popMenu.AppendSeparator();
+ AddMenuItem( &popMenu, ID_POPUP_DESIGN_TREE_ITEM_DELETE, _( "Delete" ),
+ KiBitmap( delete_xpm ) );
+
+ PopupMenu( &popMenu );
+}
+
+
+void PL_EDITOR_FRAME::OnUpdateTitleBlockDisplayNormalMode( wxUpdateUIEvent& event )
+{
+ event.Check( WORKSHEET_DATAITEM::m_SpecialMode == false );
+}
+
+
+void PL_EDITOR_FRAME::OnUpdateTitleBlockDisplaySpecialMode( wxUpdateUIEvent& event )
+{
+ event.Check( WORKSHEET_DATAITEM::m_SpecialMode == true );
+}
diff --git a/pagelayout_editor/files.cpp b/pagelayout_editor/files.cpp
new file mode 100644
index 0000000..b161125
--- /dev/null
+++ b/pagelayout_editor/files.cpp
@@ -0,0 +1,260 @@
+/**
+ * @file pagelayout_editor/files.cpp
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+void PL_EDITOR_FRAME::OnFileHistory( wxCommandEvent& event )
+{
+ wxString filename;
+
+ filename = GetFileFromHistory( event.GetId(), _( "Page Layout Description File" ) );
+
+ if( filename != wxEmptyString )
+ {
+ if( GetScreen()->IsModify() && !IsOK( this,
+ _( "The current page layout has been modified.\n"
+ "Do you wish to discard the changes?" ) ) )
+ return;
+
+ m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor() );
+ ::wxSetWorkingDirectory( ::wxPathOnly( filename ) );
+ if( LoadPageLayoutDescrFile( filename ) )
+ {
+ wxString msg;
+ msg.Printf( _("File <%s> loaded"), GetChars( filename ) );
+ SetStatusText( msg );
+ }
+
+ OnNewPageLayout();
+ }
+}
+
+/* File commands. */
+void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
+{
+ wxString msg;
+ int id = event.GetId();
+ wxString filename = GetCurrFileName();
+ WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
+
+ if( filename.IsEmpty() && id == wxID_SAVE )
+ id = wxID_SAVEAS;
+
+ switch( id )
+ {
+ case ID_LOAD_DEFAULT_PAGE_LAYOUT:
+ case wxID_NEW:
+ case wxID_OPEN:
+ if( GetScreen()->IsModify() && !IsOK( this,
+ _( "The current page layout has been modified.\n"
+ "Do you wish to discard the changes?" ) ) )
+ return;
+ break;
+
+ default:
+ break;
+ }
+
+
+ switch( id )
+ {
+ case ID_LOAD_DEFAULT_PAGE_LAYOUT:
+ pglayout.SetPageLayout();
+ OnNewPageLayout();
+ break;
+
+ case wxID_NEW:
+ pglayout.AllowVoidList( true );
+ SetCurrFileName( wxEmptyString );
+ pglayout.ClearList();
+ OnNewPageLayout();
+ break;
+
+ case ID_APPEND_DESCR_FILE:
+ {
+ wxFileDialog openFileDialog(this, _("Append Page Layout Descr File"),
+ wxEmptyString,
+ wxEmptyString, PageLayoutDescrFileWildcard, wxFD_OPEN);
+
+ if (openFileDialog.ShowModal() == wxID_CANCEL)
+ return;
+
+ filename = openFileDialog.GetPath();
+ if( ! InsertPageLayoutDescrFile( filename ) )
+ {
+ wxString msg;
+ msg.Printf( _("Unable to load %s file"), GetChars( filename ) );
+ wxMessageBox( msg );
+ }
+ else
+ {
+ GetScreen()->SetModify();
+ RebuildDesignTree();
+ m_canvas->Refresh();
+ msg.Printf( _("File <%s> inserted"), GetChars( filename ) );
+ SetStatusText( msg );
+ }
+ }
+ break;
+
+ case wxID_OPEN:
+ {
+ wxFileDialog openFileDialog(this, _("Open file"), wxEmptyString,
+ wxEmptyString, PageLayoutDescrFileWildcard, wxFD_OPEN);
+
+ if (openFileDialog.ShowModal() == wxID_CANCEL)
+ return;
+
+ filename = openFileDialog.GetPath();
+ if( ! LoadPageLayoutDescrFile( filename ) )
+ {
+ wxString msg;
+ msg.Printf( _("Unable to load %s file"), GetChars( filename ) );
+ wxMessageBox( msg );
+ }
+ else
+ {
+ OnNewPageLayout();
+ msg.Printf( _("File <%s> loaded"), GetChars( filename ) );
+ SetStatusText( msg );
+ }
+ }
+ break;
+
+ case wxID_SAVE:
+ if( !SavePageLayoutDescrFile( filename ) )
+ {
+ msg.Printf( _("Unable to write <%s>"), GetChars( filename ) );
+ wxMessageBox( msg );
+ }
+ else
+ {
+ msg.Printf( _("File <%s> written"), GetChars( filename ) );
+ SetStatusText( msg );
+ }
+ break;
+
+ case wxID_SAVEAS:
+ {
+ wxFileDialog openFileDialog(this, _("Create file"), wxEmptyString,
+ wxEmptyString, PageLayoutDescrFileWildcard, wxFD_SAVE);
+
+ if (openFileDialog.ShowModal() == wxID_CANCEL)
+ return;
+
+ filename = openFileDialog.GetPath();
+ // Ensure the file has the right extension:
+ // because a name like name.subname.subsubname is legal,
+ // add the right extension without replacing the wxFileName
+ // extension
+ wxFileName fn(filename);
+
+ if( fn.GetExt() != PageLayoutDescrFileExtension )
+ filename << wxT(".") << PageLayoutDescrFileExtension;
+
+ if( !SavePageLayoutDescrFile( filename ) )
+ {
+ wxString msg;
+ msg.Printf( _("Unable to create <%s>"), GetChars( filename ) );
+ wxMessageBox( msg );
+ }
+
+ else
+ {
+ msg.Printf( _("File <%s> written"), GetChars( filename ) );
+ SetStatusText( msg );
+ if( GetCurrFileName().IsEmpty() )
+ SetCurrFileName( filename );
+ }
+ }
+ break;
+
+ default:
+ wxMessageBox( wxT( "File_io: unexpected command id" ) );
+ break;
+ }
+}
+
+/* Loads a .kicad_wks page layout descr file
+ */
+bool PL_EDITOR_FRAME::LoadPageLayoutDescrFile( const wxString& aFullFileName )
+{
+ if( wxFileExists( aFullFileName ) )
+ {
+ WORKSHEET_LAYOUT::GetTheInstance().SetPageLayout( aFullFileName );
+ SetCurrFileName( aFullFileName );
+ UpdateFileHistory( aFullFileName );
+ GetScreen()->ClrModify();
+ return true;
+ }
+
+ return false;
+}
+
+/* Inserts a .kicad_wks page layout descr file
+ * same as LoadPageLayoutDescrFile, but the new data is added
+ * to the previous data.
+ */
+bool PL_EDITOR_FRAME::InsertPageLayoutDescrFile( const wxString& aFullFileName )
+{
+ if( wxFileExists( aFullFileName ) )
+ {
+ const bool append = true;
+ SaveCopyInUndoList();
+ WORKSHEET_LAYOUT::GetTheInstance().SetPageLayout( aFullFileName, append );
+ return true;
+ }
+
+ return false;
+}
+
+
+/* Save the current layout in a .kicad_wks page layout descr file
+ */
+bool PL_EDITOR_FRAME::SavePageLayoutDescrFile( const wxString& aFullFileName )
+{
+ if( ! aFullFileName.IsEmpty() )
+ {
+ WORKSHEET_LAYOUT::GetTheInstance().Save( aFullFileName );
+ GetScreen()->ClrModify();
+ return true;
+ }
+
+ return false;
+}
diff --git a/pagelayout_editor/hotkeys.cpp b/pagelayout_editor/hotkeys.cpp
new file mode 100644
index 0000000..095553e
--- /dev/null
+++ b/pagelayout_editor/hotkeys.cpp
@@ -0,0 +1,256 @@
+/**
+ * @file pagelayout_editor/hotkeys.cpp
+ */
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+// Remark: the hotkey message info is used as keyword in hotkey config files and
+// as comments in help windows, therefore translated only when displayed
+// they are marked _HKI to be extracted by translation tools
+// See hotkeys_basic.h for more info
+
+
+/* How to add a new hotkey:
+ * add a new id in the enum hotkey_id_commnand like MY_NEW_ID_FUNCTION.
+ * add a new EDA_HOTKEY entry like:
+ * static EDA_HOTKEY HkMyNewEntry(_HKI("Command Label"), MY_NEW_ID_FUNCTION, default key value);
+ * 'Command Label' is the name used in hotkey list display, and the identifier in the
+ * hotkey list file
+ * 'MY_NEW_ID_FUNCTION' is the id event function used in the switch in OnHotKey() function.
+ * 'Default key value' is the default hotkey for this command.
+ * Can be overrided by the user hotkey list
+ * Add the 'HkMyNewEntry' pointer in the s_PlEditor_Hotkey_List list
+ * Add the new code in the switch in OnHotKey() function.
+ *
+ * Note: If an hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX)
+ * is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp)
+ * and see this list for some ascii keys (space ...)
+ */
+
+// Hotkey list:
+
+// mouse click command:
+static EDA_HOTKEY HkMouseLeftClick( _HKI( "Mouse Left Click" ), HK_LEFT_CLICK, WXK_RETURN, 0 );
+static EDA_HOTKEY HkMouseLeftDClick( _HKI( "Mouse Left Double Click" ), HK_LEFT_DCLICK, WXK_END, 0 );
+
+static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ),
+ HK_RESET_LOCAL_COORD, ' ' );
+static EDA_HOTKEY HkZoomAuto( _HKI( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
+static EDA_HOTKEY HkZoomCenter( _HKI( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
+ ID_POPUP_ZOOM_CENTER );
+static EDA_HOTKEY HkZoomRedraw( _HKI( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
+static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
+static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
+static EDA_HOTKEY HkHelp( _HKI( "Help (this window)" ), HK_HELP, '?' );
+static EDA_HOTKEY HkMoveItem( _HKI( "Move Item" ), HK_MOVE_ITEM, 'M', ID_POPUP_ITEM_MOVE );
+static EDA_HOTKEY HkPlaceItem( _HKI( "Place Item" ), HK_PLACE_ITEM, 'P', ID_POPUP_ITEM_PLACE );
+static EDA_HOTKEY HkMoveStartPoint( _HKI( "Move Start Point" ), HK_MOVE_START_POINT, 'S',
+ ID_POPUP_ITEM_MOVE_START_POINT );
+static EDA_HOTKEY HkMoveEndPoint( _HKI( "Move End Point" ), HK_MOVE_END_POINT, 'E',
+ ID_POPUP_ITEM_MOVE_END_POINT );
+static EDA_HOTKEY HkDeleteItem( _HKI( "Delete Item" ), HK_DELETE_ITEM, WXK_DELETE,
+ ID_POPUP_ITEM_DELETE );
+
+// Undo Redo
+static EDA_HOTKEY HkUndo( _HKI( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
+static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
+
+// List of common hotkey descriptors
+EDA_HOTKEY* s_Common_Hotkey_List[] =
+{
+ &HkHelp,
+ &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
+ &HkZoomAuto, &HkResetLocalCoord,
+ &HkUndo, &HkRedo,
+ &HkMouseLeftClick,
+ &HkMouseLeftDClick,
+ NULL
+};
+
+EDA_HOTKEY* s_PlEditor_Hotkey_List[] =
+{
+ &HkMoveItem, &HkMoveStartPoint,
+ &HkMoveEndPoint,
+ &HkPlaceItem,
+ &HkDeleteItem,
+ NULL
+};
+
+// Titles for hotkey editor and hotkey display
+static wxString commonSectionTitle( _HKI( "Common" ) );
+
+// list of sections and corresponding hotkey list for Pl_Editor
+// (used to create an hotkey config file)
+static wxString s_PlEditorSectionTag( wxT( "[pl_editor]" ) );
+static wxString s_PlEditorSectionTitle( _HKI( "Page Layout Editor" ) );
+
+struct EDA_HOTKEY_CONFIG PlEditorHokeysDescr[] =
+{
+ { &g_CommonSectionTag, s_Common_Hotkey_List, &commonSectionTitle },
+ { &s_PlEditorSectionTag, s_PlEditor_Hotkey_List, &s_PlEditorSectionTitle },
+ { NULL, NULL, NULL }
+};
+
+
+EDA_HOTKEY* PL_EDITOR_FRAME::GetHotKeyDescription( int aCommand ) const
+{
+ EDA_HOTKEY* HK_Descr = GetDescriptorFromCommand( aCommand, s_Common_Hotkey_List );
+
+ if( HK_Descr == NULL )
+ HK_Descr = GetDescriptorFromCommand( aCommand, s_PlEditor_Hotkey_List );
+
+ return HK_Descr;
+}
+
+
+bool PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode,
+ const wxPoint& aPosition, EDA_ITEM* aItem )
+{
+ bool busy = GetScreen()->GetCurItem() != NULL;
+ wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
+ cmd.SetEventObject( this );
+
+ /* Convert lower to upper case (the usual toupper function has problem with non ascii
+ * codes like function keys */
+ if( (aHotkeyCode >= 'a') && (aHotkeyCode <= 'z') )
+ aHotkeyCode += 'A' - 'a';
+
+ EDA_HOTKEY * HK_Descr = GetDescriptorFromHotkey( aHotkeyCode, s_PlEditor_Hotkey_List );
+
+ if( HK_Descr == NULL )
+ HK_Descr = GetDescriptorFromHotkey( aHotkeyCode, s_Common_Hotkey_List );
+
+ if( HK_Descr == NULL )
+ return false;
+
+ WORKSHEET_DATAITEM* item;
+
+ switch( HK_Descr->m_Idcommand )
+ {
+ case HK_NOT_FOUND:
+ return false;
+
+ case HK_LEFT_CLICK:
+ OnLeftClick( aDC, aPosition );
+ break;
+
+ case HK_LEFT_DCLICK: // Simulate a double left click: generate 2 events
+ OnLeftClick( aDC, aPosition );
+ OnLeftDClick( aDC, aPosition );
+ break;
+
+ case HK_HELP: // Display Current hotkey list
+ DisplayHotkeyList( this, PlEditorHokeysDescr );
+ break;
+
+ case HK_UNDO:
+ case HK_REDO:
+ if( busy )
+ break;
+ cmd.SetId( HK_Descr->m_IdMenuEvent );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_ZOOM_IN:
+ cmd.SetId( ID_POPUP_ZOOM_IN );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_ZOOM_OUT:
+ cmd.SetId( ID_POPUP_ZOOM_OUT );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_ZOOM_REDRAW:
+ cmd.SetId( ID_ZOOM_REDRAW );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_ZOOM_CENTER:
+ cmd.SetId( ID_POPUP_ZOOM_CENTER );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_ZOOM_AUTO:
+ cmd.SetId( ID_ZOOM_PAGE );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_RESET_LOCAL_COORD: // Reset the relative coord
+ GetScreen()->m_O_Curseur = GetCrossHairPosition();
+ break;
+
+ case HK_SET_GRID_ORIGIN:
+ SetGridOrigin( GetCrossHairPosition() );
+ break;
+
+ case HK_MOVE_ITEM:
+ case HK_MOVE_START_POINT:
+ case HK_MOVE_END_POINT:
+ case HK_DELETE_ITEM:
+ if( busy )
+ break;
+
+ if( (item = Locate( aPosition )) == NULL )
+ break;
+
+ // Only rect and lines have a end point.
+ if( HK_Descr->m_Idcommand == HK_MOVE_END_POINT && !item->HasEndPoint() )
+ break;
+
+ if( m_treePagelayout->GetPageLayoutSelectedItem() != item )
+ m_treePagelayout->SelectCell( item );
+
+ cmd.SetId( HK_Descr->m_IdMenuEvent );
+ GetEventHandler()->ProcessEvent( cmd );
+ break;
+
+ case HK_PLACE_ITEM:
+ if( busy )
+ {
+ cmd.SetId( HK_Descr->m_IdMenuEvent );
+ GetEventHandler()->ProcessEvent( cmd );
+ }
+ break;
+
+ default:
+ wxMessageBox( wxT( "Unknown hotkey" ) );
+ return false;
+ }
+
+ return true;
+}
diff --git a/pagelayout_editor/hotkeys.h b/pagelayout_editor/hotkeys.h
new file mode 100644
index 0000000..92c6e53
--- /dev/null
+++ b/pagelayout_editor/hotkeys.h
@@ -0,0 +1,51 @@
+/**
+ * @file pagelayout_editor/hotkeys.h
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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 PL_EDITOR_KOTKEYS_H_
+#define PL_EDITOR_KOTKEYS_H_
+
+#include
+
+// List of hot keys id.
+// see also enum common_hotkey_id_commnand in hotkeys_basic.h
+// for shared hotkeys id
+enum hotkey_id_commnand {
+ HK_SWITCH_UNITS = HK_COMMON_END,
+ HK_MOVE_ITEM,
+ HK_MOVE_START_POINT,
+ HK_MOVE_END_POINT,
+ HK_PLACE_ITEM,
+ HK_DELETE_ITEM,
+ HK_LEFT_CLICK,
+ HK_LEFT_DCLICK
+};
+
+// List of hotkey descriptors for PlEditor.
+extern struct EDA_HOTKEY_CONFIG PlEditorHokeysDescr[];
+
+#endif // PL_EDITOR_KOTKEYS_H_
diff --git a/pagelayout_editor/invoke_pl_editor_dialog.h b/pagelayout_editor/invoke_pl_editor_dialog.h
new file mode 100644
index 0000000..ecd4b96
--- /dev/null
+++ b/pagelayout_editor/invoke_pl_editor_dialog.h
@@ -0,0 +1,67 @@
+/**
+ * @file invoke_pl_editor_dialog.h
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck
+ * Copyright (C) 2013 KiCad Developers, see change_log.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
+ */
+
+// This header is an insolation layer between top most frames and any number of
+// DIALOG classes which can be called from a frame window.
+// It is a place to put invocation functions for [modal] dialogs, with benefits:
+//
+// 1) The information about each dialog class is not exposed to the frame.
+// So therefore the DIALOG class can often be kept out of a header file entirely.
+//
+// 2) The information about the calling frame is not necessarily exposed to
+// to the called dialog class, at least not in here.
+
+// The actual InvokeDialog() function is usually coded at the bottom of the
+// DIALOG_.cpp file.
+
+
+#ifndef INVOKE_PL_EDITOR_DIALOG_H_
+#define INVOKE_PL_EDITOR_DIALOG_H_
+
+// Often this is not used in the prototypes, since wxFrame is good enough and would
+// represent maximum information hiding.
+class PL_EDITOR_FRAME;
+class WORKSHEET_DATAITEM;
+class wxPrintData;
+class wxPageSetupDialogData;
+
+
+/// Create and show DIALOG_NEW_DATAITEM and return whatever
+/// DIALOG_NEW_DATAITEM::ShowModal() returns.
+int InvokeDialogNewItem( PL_EDITOR_FRAME* aCaller, WORKSHEET_DATAITEM* aItem );
+
+/// Create and show a print dialog
+/// returns 1 if OK, 0 , there is a problem.
+int InvokeDialogPrint( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData,
+ wxPageSetupDialogData* aPageSetupData );
+
+/// Create and show a print preview dialog
+/// returns 1 if OK, 0 , there is a problem.
+int InvokeDialogPrintPreview( PL_EDITOR_FRAME* aCaller, wxPrintData* aPrintData );
+
+#endif // INVOKE_PL_EDITOR_DIALOG_H_
diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp
new file mode 100644
index 0000000..090bc18
--- /dev/null
+++ b/pagelayout_editor/menubar.cpp
@@ -0,0 +1,183 @@
+/**
+ * @file pagelayout_editor/menubar.cpp
+ * @brief (Re)Create the main menubar for Pl_Editor
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+void PL_EDITOR_FRAME::ReCreateMenuBar()
+{
+ // Create and try to get the current menubar
+ wxMenuBar* menuBar = GetMenuBar();
+
+ if( !menuBar )
+ menuBar = new wxMenuBar();
+
+ // Delete all existing menus so they can be rebuilt.
+ // This allows language changes of the menu text on the fly.
+ menuBar->Freeze();
+
+ while( menuBar->GetMenuCount() )
+ delete menuBar->Remove( 0 );
+
+ // Recreate all menus:
+
+ // Menu File:
+ wxMenu* fileMenu = new wxMenu;
+
+ // Load
+ AddMenuItem( fileMenu, wxID_NEW,
+ _( "&New Page Layout Design" ),
+ wxEmptyString, KiBitmap( pagelayout_new_xpm ) );
+ AddMenuItem( fileMenu, wxID_OPEN,
+ _( "Load Page Layout &File" ),
+ wxEmptyString, KiBitmap( pagelayout_load_xpm ) );
+ AddMenuItem( fileMenu, ID_LOAD_DEFAULT_PAGE_LAYOUT,
+ _( "Load &Default Page Layout" ),
+ wxEmptyString, KiBitmap( pagelayout_load_default_xpm ) );
+
+ // Recent gerber files
+ static wxMenu* openRecentMenu;
+
+ // Add this menu to list menu managed by m_fileHistory
+ // (the file history will be updated when adding/removing files in history
+ if( openRecentMenu )
+ Kiface().GetFileHistory().RemoveMenu( openRecentMenu );
+
+ openRecentMenu = new wxMenu();
+
+ Kiface().GetFileHistory().UseMenu( openRecentMenu );
+ Kiface().GetFileHistory().AddFilesToMenu();
+
+ AddMenuItem( fileMenu, openRecentMenu,
+ wxID_ANY, _( "Open &Recent Page Layout File" ),
+ wxEmptyString, KiBitmap( pagelayout_recent_xpm ) );
+
+ fileMenu->AppendSeparator();
+ // Save current sheet
+ AddMenuItem( fileMenu, wxID_SAVE,
+ _( "&Save Page Layout Design" ),
+ wxEmptyString, KiBitmap( save_xpm ) );
+
+ // Save current sheet as
+ AddMenuItem( fileMenu, wxID_SAVEAS,
+ _( "Save Page Layout Design &As" ),
+ wxEmptyString, KiBitmap( save_as_xpm ) );
+
+ // Print
+ fileMenu->AppendSeparator();
+ AddMenuItem( fileMenu, wxID_PRINT, _( "&Print" ),
+ wxEmptyString, KiBitmap( print_button_xpm ) );
+ AddMenuItem( fileMenu, wxID_PREVIEW, _( "Print Pre&view" ),
+ wxEmptyString, KiBitmap( print_button_xpm ) );
+
+ // Separator
+ fileMenu->AppendSeparator();
+
+ // Exit
+ AddMenuItem( fileMenu, wxID_EXIT,
+ _( "&Close" ),
+ _( "&Close Page Layout Editor" ),
+ KiBitmap( exit_xpm ) );
+
+ // Menu for preferences
+ wxMenu* preferencesMenu = new wxMenu;
+
+ AddMenuItem( preferencesMenu,
+ ID_MENU_SWITCH_BGCOLOR,
+ GetDrawBgColor() == WHITE ?
+ _( "&Background Black" ) : _( "&Background White" ),
+ wxEmptyString, KiBitmap( palette_xpm ) );
+
+ AddMenuItem( preferencesMenu,
+ ID_MENU_GRID_ONOFF,
+ IsGridVisible() ? _( "Hide &Grid" ) : _( "Show &Grid" ),
+ wxEmptyString, KiBitmap( grid_xpm ) );
+
+ // Text editor selection
+ AddMenuItem( preferencesMenu,
+ ID_MENU_PL_EDITOR_SELECT_PREFERED_EDITOR,
+ _( "&Text Editor" ),
+ _( "Select your preferred text editor" ),
+ KiBitmap( editor_xpm ) );
+
+ // Language submenu
+ Pgm().AddMenuLanguageList( preferencesMenu );
+
+ // Hotkey submenu
+ AddHotkeyConfigMenu( preferencesMenu );
+
+ // Menu Help
+ wxMenu* helpMenu = new wxMenu;
+
+ // Version info
+ AddHelpVersionInfoMenuEntry( helpMenu );
+
+ // Contents
+ AddMenuItem( helpMenu,
+ wxID_HELP,
+ _( "Page Layout Editor &Manual" ),
+ _( "Open the Page Layout Editor Manual" ),
+ KiBitmap( online_help_xpm ) );
+
+ AddMenuItem( helpMenu,
+ wxID_INDEX,
+ _( "&Getting Started in KiCad" ),
+ _( "Open \"Getting Started in KiCad\" guide for beginners" ),
+ KiBitmap( help_xpm ) );
+
+ // Separator
+ helpMenu->AppendSeparator();
+
+ // About Kicad
+ AddMenuItem( helpMenu,
+ wxID_ABOUT,
+ _( "&About Kicad" ),
+ _( "About KiCad" ),
+ KiBitmap( info_xpm ) );
+
+ // Append menus to the menubar
+ menuBar->Append( fileMenu, _( "&File" ) );
+ menuBar->Append( preferencesMenu, _( "&Preferences" ) );
+ menuBar->Append( helpMenu, _( "&Help" ) );
+
+ menuBar->Thaw();
+
+ // Associate the menu bar with the frame, if no previous menubar
+ if( GetMenuBar() == NULL )
+ SetMenuBar( menuBar );
+ else
+ menuBar->Refresh();
+}
diff --git a/pagelayout_editor/onleftclick.cpp b/pagelayout_editor/onleftclick.cpp
new file mode 100644
index 0000000..ed467ee
--- /dev/null
+++ b/pagelayout_editor/onleftclick.cpp
@@ -0,0 +1,77 @@
+/**
+ * @file pagelayout_editor/onleftclick.cpp
+ * @brief functions called on left or double left click mouse event
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2013 CERN
+ *
+ * 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
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+/* Process the command triggered by the left button of the mouse when a tool
+ * is already selected.
+ */
+void PL_EDITOR_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
+{
+ WORKSHEET_DATAITEM* item = GetScreen()->GetCurItem();
+
+ if( item ) // An item is currently in edit: place it
+ {
+ PlaceItem( item );
+ m_propertiesPagelayout->CopyPrmsFromItemToPanel( item );
+ m_canvas->Refresh();
+ return;
+ }
+
+ item = m_treePagelayout->GetPageLayoutSelectedItem();
+ WORKSHEET_DATAITEM* newitem = Locate( aPosition );
+
+ if( newitem == NULL )
+ return;
+
+ if( newitem != item )
+ {
+ item = newitem;
+ m_treePagelayout->SelectCell( item );
+ m_canvas->Refresh();
+ }
+}
+
+
+/* Called on a double click of left mouse button.
+ */
+void PL_EDITOR_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition )
+{
+ // Currently: no nothing
+}
diff --git a/pagelayout_editor/onrightclick.cpp b/pagelayout_editor/onrightclick.cpp
new file mode 100644
index 0000000..bcb7a19
--- /dev/null
+++ b/pagelayout_editor/onrightclick.cpp
@@ -0,0 +1,127 @@
+/**
+ * @file pagelayout_editor/onrightclick.cpp
+ * @brief functions called on rigth click mouse event
+*/
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2013 CERN
+ *
+ * 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
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+// Helper function to add menuitems relative to items creation
+void AddNewItemsCommand( wxMenu* aMainMenu )
+{
+ AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_LINE, _( "Add Line" ),
+ KiBitmap( add_dashed_line_xpm ) );
+ AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_RECT, _( "Add Rectangle" ),
+ KiBitmap( add_rectangle_xpm ) );
+ AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_TEXT, _( "Add Text" ),
+ KiBitmap( add_text_xpm ) );
+ AddMenuItem( aMainMenu, ID_POPUP_ITEM_APPEND_PAGE_LAYOUT,
+ _( "Append Page Layout Descr File" ),
+ KiBitmap( import_xpm ) );
+ AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_BITMAP,
+ _( "Add Bitmap" ),
+ KiBitmap( image_xpm ) );
+}
+
+/* Prepare the right-click pullup menu.
+ * The menu already has a list of zoom commands.
+ */
+bool PL_EDITOR_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* aPopMenu )
+{
+ bool busy = GetScreen()->GetCurItem() != NULL;
+ wxString msg;
+
+ if( ! busy ) // No item currently edited
+ {
+ WORKSHEET_DATAITEM* old_item = m_treePagelayout->GetPageLayoutSelectedItem();
+ WORKSHEET_DATAITEM* item = Locate( aPosition );
+
+ if( item && old_item != item )
+ {
+ m_treePagelayout->SelectCell( item );
+ m_canvas->Refresh();
+ }
+
+ // Add menus to edit and delete the item
+ if( item )
+ {
+ if( (item->GetFlags() & LOCATE_STARTPOINT) )
+ {
+ msg = AddHotkeyName( _( "Move Start Point" ), PlEditorHokeysDescr,
+ HK_MOVE_START_POINT );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_MOVE_START_POINT, msg,
+ KiBitmap( move_xpm ) );
+ }
+
+ if( (item->GetFlags() & LOCATE_ENDPOINT ) )
+ {
+ msg = AddHotkeyName( _( "Move End Point" ), PlEditorHokeysDescr,
+ HK_MOVE_END_POINT );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_MOVE_END_POINT, msg,
+ KiBitmap( move_xpm ) );
+ }
+
+ msg = AddHotkeyName( _( "Move Item" ), PlEditorHokeysDescr,
+ HK_MOVE_ITEM );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_MOVE, msg,
+ KiBitmap( move_xpm ) );
+ aPopMenu->AppendSeparator();
+
+ msg = AddHotkeyName( _( "Delete" ), PlEditorHokeysDescr,
+ HK_DELETE_ITEM );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_DELETE, msg, KiBitmap( delete_xpm ) );
+ aPopMenu->AppendSeparator();
+ }
+ }
+ else // An item is currently in edit
+ {
+ msg = AddHotkeyName( _( "Place Item" ), PlEditorHokeysDescr,
+ HK_PLACE_ITEM );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE, msg,
+ KiBitmap( move_xpm ) );
+ AddMenuItem( aPopMenu, ID_POPUP_ITEM_PLACE_CANCEL, _( "Cancel" ),
+ KiBitmap( cancel_xpm ) );
+ aPopMenu->AppendSeparator();
+ }
+
+ if( ! busy )
+ {
+ AddNewItemsCommand( aPopMenu );
+ aPopMenu->AppendSeparator();
+ }
+
+ return true;
+}
diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp
new file mode 100644
index 0000000..1ddba50
--- /dev/null
+++ b/pagelayout_editor/page_layout_writer.cpp
@@ -0,0 +1,472 @@
+/**
+ * @file page_layout_writer.cpp
+ * @brief write an S expression of description of graphic items and texts
+ * to build a title block and page layout
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2013 CERN
+ * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
+ *
+ * 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
+#include
+#include
+#include
+#include
+#include