Merged kicad-gal
This commit is contained in:
commit
c00533a150
|
@ -1,4 +1,4 @@
|
|||
include/boost
|
||||
boost_root
|
||||
.downloads-by-cmake
|
||||
common/netlist_keywords.*
|
||||
common/netlist_lexer.h
|
||||
|
|
|
@ -2,7 +2,6 @@ add_definitions(-DPCBNEW)
|
|||
|
||||
include_directories(BEFORE ${INC_BEFORE})
|
||||
include_directories(
|
||||
${Boost_INCLUDE_DIR}
|
||||
../pcbnew
|
||||
../polygon
|
||||
${INC_AFTER}
|
||||
|
|
443
CMakeLists.txt
443
CMakeLists.txt
|
@ -1,10 +1,10 @@
|
|||
project(kicad)
|
||||
project( kicad )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
|
||||
cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR )
|
||||
# because of http://public.kitware.com/Bug/view.php?id=10395
|
||||
|
||||
# Path to local CMake modules.
|
||||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
|
||||
|
||||
#
|
||||
# KiCad build options should be added below.
|
||||
|
@ -14,40 +14,33 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
|
|||
# reports.
|
||||
#
|
||||
|
||||
option(USE_PCBNEW_NANOMETRES
|
||||
"Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON)
|
||||
|
||||
# Russian GOST patch
|
||||
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
|
||||
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
|
||||
option( wxUSE_UNICODE "enable/disable building unicode ( default OFF)" )
|
||||
option( KICAD_GOST "enable/disable building using GOST notation for multiple gates per package ( default OFF)" )
|
||||
|
||||
#for those who bored with uppercase
|
||||
option(KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected")
|
||||
option( KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected" )
|
||||
|
||||
option(USE_WX_GRAPHICS_CONTEXT
|
||||
"Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental")
|
||||
option( USE_WX_GRAPHICS_CONTEXT
|
||||
"Use wxGraphicsContext for rendering ( default OFF). Warning, this is experimental" )
|
||||
|
||||
option(USE_WX_OVERLAY
|
||||
"Use wxOverlay: Always ON for MAC (default OFF). Warning, this is experimental")
|
||||
option( USE_WX_OVERLAY
|
||||
"Use wxOverlay: Always ON for MAC ( default OFF). Warning, this is experimental" )
|
||||
|
||||
#One of these 2 option *must* be set to ON:
|
||||
option(KICAD_STABLE_VERSION
|
||||
option( KICAD_STABLE_VERSION
|
||||
"set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)"
|
||||
)
|
||||
|
||||
option(KICAD_TESTING_VERSION
|
||||
"set this option to ON to build the testing version of KICAD. mainly used to set version ID (default OFF)"
|
||||
)
|
||||
|
||||
option(KICAD_SCRIPTING
|
||||
option( KICAD_SCRIPTING
|
||||
"set this option ON to build the scripting support inside kicad binaries"
|
||||
)
|
||||
|
||||
option(KICAD_SCRIPTING_MODULES
|
||||
option( KICAD_SCRIPTING_MODULES
|
||||
"set this option ON to build kicad modules that can be used from scripting languages"
|
||||
)
|
||||
|
||||
option(KICAD_SCRIPTING_WXPYTHON
|
||||
option( KICAD_SCRIPTING_WXPYTHON
|
||||
"set this option ON to build wxpython implementation for wx interface building in python and py.shell"
|
||||
)
|
||||
|
||||
|
@ -58,20 +51,16 @@ option(KICAD_SCRIPTING_WXPYTHON
|
|||
# python binary file should be is exec path.
|
||||
|
||||
|
||||
option(USE_FP_LIB_TABLE "Use the new footprint library table implementation. (default OFF)")
|
||||
option( USE_FP_LIB_TABLE "Use the new footprint library table implementation. ( default OFF)" )
|
||||
|
||||
#option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF )
|
||||
|
||||
|
||||
#Set version option (stable or testing)
|
||||
|
||||
if(KICAD_STABLE_VERSION AND KICAD_TESTING_VERSION )
|
||||
message(FATAL_ERROR "Only one KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION can be set to ON")
|
||||
elseif(NOT KICAD_STABLE_VERSION AND NOT KICAD_TESTING_VERSION)
|
||||
message(FATAL_ERROR "Either KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION must be set to ON")
|
||||
elseif(KICAD_STABLE_VERSION)
|
||||
add_definitions(-DKICAD_STABLE_VERSION)
|
||||
message( "Build stable version of KiCad")
|
||||
else()
|
||||
add_definitions(-DKICAD_TESTING_VERSION)
|
||||
message("Build testing (unstable) version of KiCad")
|
||||
if( KICAD_STABLE_VERSION)
|
||||
add_definitions( -DKICAD_STABLE_VERSION )
|
||||
message( STATUS "Building stable version of KiCad" )
|
||||
endif()
|
||||
|
||||
# All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they
|
||||
|
@ -86,14 +75,14 @@ set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake
|
|||
# Set flags for GCC.
|
||||
#================================================
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
||||
set(KICAD_GCC_RELEASE_BUILD_FLAGS "-O2")
|
||||
set(KICAD_GCC_RELEASE_DEBUG_FLAGS "")
|
||||
set( KICAD_GCC_RELEASE_BUILD_FLAGS "-O2" )
|
||||
set( KICAD_GCC_RELEASE_DEBUG_FLAGS "" )
|
||||
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GCC_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||
|
||||
# Added -Wno-narrowing on 10/7/12 to prevent a huge number of warnings when
|
||||
# compiling with GCC 4.7. This appears to be caused by and int to unsigned
|
||||
|
@ -102,38 +91,38 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
# see if the problem has been resolved. Wayne.
|
||||
#
|
||||
# Also note the optimization level is -O1 instead of the usual -O2 level
|
||||
# because boost::polygon has a function (inflate polygon) broken by
|
||||
# because boost::polygon has a function ( inflate polygon) broken by
|
||||
# the -O2 level with GCC 4.7 (works fine with with GCC 4.6).
|
||||
# This lower optimization level does not have a significant change on the speed.
|
||||
#
|
||||
# As newer versions of GCC and/or Boost are released, this code needs reviewed to
|
||||
# determine if the problems above have been fixed either in Boost or GCC.
|
||||
if(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
|
||||
set(KICAD_GCC_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1")
|
||||
set(KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing")
|
||||
if( GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7 )
|
||||
set( KICAD_GCC_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1" )
|
||||
set( KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing" )
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
message(STATUS
|
||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"")
|
||||
if( CMAKE_BUILD_TYPE STREQUAL Debug )
|
||||
message( STATUS
|
||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"" )
|
||||
else()
|
||||
message(STATUS
|
||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"")
|
||||
message( STATUS
|
||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"" )
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
if( MINGW )
|
||||
# According to some sources, under Windows -fPIC option is not needed:
|
||||
# http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html
|
||||
|
||||
# Set default flags for Release build.
|
||||
set(CMAKE_C_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++")
|
||||
set( CMAKE_C_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG" )
|
||||
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++" )
|
||||
|
||||
# Set default flags for Debug build.
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # SWIG macros on Windows
|
||||
set( CMAKE_C_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG" )
|
||||
set( CMAKE_MODULE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # SWIG macros on Windows
|
||||
|
||||
else()
|
||||
# We build DLL/DSOs from static libraries, so create position independent code
|
||||
|
@ -143,17 +132,17 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
|
||||
|
||||
# Thou shalt not link vaporware and tell us it's a valid DSO:
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined") # needed by SWIG macros on linux
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
|
||||
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) # needed by SWIG macros on linux
|
||||
|
||||
# Set default flags for Release build.
|
||||
set(CMAKE_C_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
|
||||
set( CMAKE_C_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG" )
|
||||
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
|
||||
|
||||
# Set default flags for Debug build.
|
||||
set(CMAKE_C_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG")
|
||||
set( CMAKE_C_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG" )
|
||||
endif()
|
||||
|
||||
# quiet GCC 4.8.1 while in boost
|
||||
|
@ -161,100 +150,100 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
|
||||
endif()
|
||||
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||
|
||||
if(wxUSE_UNICODE)
|
||||
add_definitions(-DwxUSE_UNICODE)
|
||||
if( wxUSE_UNICODE )
|
||||
add_definitions( -DwxUSE_UNICODE )
|
||||
endif()
|
||||
|
||||
if(KICAD_GOST)
|
||||
add_definitions(-DKICAD_GOST)
|
||||
if( KICAD_GOST )
|
||||
add_definitions( -DKICAD_GOST )
|
||||
endif()
|
||||
|
||||
if(KICAD_KEEPCASE)
|
||||
add_definitions(-DKICAD_KEEPCASE)
|
||||
if( KICAD_KEEPCASE )
|
||||
add_definitions( -DKICAD_KEEPCASE )
|
||||
endif()
|
||||
|
||||
if(USE_WX_OVERLAY OR APPLE)
|
||||
add_definitions(-DUSE_WX_OVERLAY)
|
||||
if( USE_WX_OVERLAY OR APPLE )
|
||||
add_definitions( -DUSE_WX_OVERLAY )
|
||||
endif()
|
||||
|
||||
if(KICAD_SCRIPTING)
|
||||
add_definitions(-DKICAD_SCRIPTING)
|
||||
if( KICAD_SCRIPTING )
|
||||
add_definitions( -DKICAD_SCRIPTING )
|
||||
endif()
|
||||
|
||||
if(KICAD_SCRIPTING_MODULES)
|
||||
add_definitions(-DKICAD_SCRIPTING_MODULES)
|
||||
if( KICAD_SCRIPTING_MODULES )
|
||||
add_definitions( -DKICAD_SCRIPTING_MODULES )
|
||||
endif()
|
||||
|
||||
if(KICAD_SCRIPTING_WXPYTHON)
|
||||
add_definitions(-DKICAD_SCRIPTING_WXPYTHON)
|
||||
if( KICAD_SCRIPTING_WXPYTHON )
|
||||
add_definitions( -DKICAD_SCRIPTING_WXPYTHON )
|
||||
endif()
|
||||
|
||||
if(USE_WX_GRAPHICS_CONTEXT)
|
||||
add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
|
||||
if( USE_WX_GRAPHICS_CONTEXT )
|
||||
add_definitions( -DUSE_WX_GRAPHICS_CONTEXT )
|
||||
endif()
|
||||
|
||||
# Allow user to override the default settings for adding images to menu items. By default
|
||||
# images in menu items are enabled on all platforms except OSX. This can be over ridden by
|
||||
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
|
||||
if(NOT DEFINED USE_IMAGES_IN_MENUS)
|
||||
if(NOT APPLE)
|
||||
set(USE_IMAGES_IN_MENUS ON)
|
||||
if( NOT DEFINED USE_IMAGES_IN_MENUS )
|
||||
if( NOT APPLE )
|
||||
set( USE_IMAGES_IN_MENUS ON )
|
||||
endif()
|
||||
else()
|
||||
if(USE_IMAGES_IN_MENUS)
|
||||
set(USE_IMAGES_IN_MENUS ON)
|
||||
if( USE_IMAGES_IN_MENUS )
|
||||
set( USE_IMAGES_IN_MENUS ON )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Locations for install targets.
|
||||
set(KICAD_BIN bin
|
||||
CACHE PATH "Location of KiCad binaries.")
|
||||
set( KICAD_BIN bin
|
||||
CACHE PATH "Location of KiCad binaries." )
|
||||
|
||||
if(UNIX)
|
||||
if( UNIX )
|
||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||
set(KICAD_PLUGINS lib/kicad/plugins
|
||||
CACHE PATH "Location of KiCad plugins.")
|
||||
set(KICAD_DATA share/kicad
|
||||
CACHE PATH "Location of KiCad data files.")
|
||||
set(KICAD_DOCS share/doc/kicad
|
||||
CACHE PATH "Location of KiCad documentation files.")
|
||||
set( KICAD_PLUGINS lib/kicad/plugins
|
||||
CACHE PATH "Location of KiCad plugins." )
|
||||
set( KICAD_DATA share/kicad
|
||||
CACHE PATH "Location of KiCad data files." )
|
||||
set( KICAD_DOCS share/doc/kicad
|
||||
CACHE PATH "Location of KiCad documentation files." )
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
if( MINGW )
|
||||
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
||||
set(CMAKE_INSTALL_PREFIX c:/kicad
|
||||
CACHE PATH "")
|
||||
set( CMAKE_INSTALL_PREFIX c:/kicad
|
||||
CACHE PATH "" )
|
||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||
set(KICAD_PLUGINS ${KICAD_BIN}/plugins
|
||||
CACHE PATH "Location of KiCad plugins.")
|
||||
set(KICAD_DATA share
|
||||
CACHE PATH "Location of KiCad data files.")
|
||||
set(KICAD_DOCS doc
|
||||
CACHE PATH "Location of KiCad documentation files.")
|
||||
set( KICAD_PLUGINS ${KICAD_BIN}/plugins
|
||||
CACHE PATH "Location of KiCad plugins." )
|
||||
set( KICAD_DATA share
|
||||
CACHE PATH "Location of KiCad data files." )
|
||||
set( KICAD_DOCS doc
|
||||
CACHE PATH "Location of KiCad documentation files." )
|
||||
endif()
|
||||
|
||||
set(KICAD_DEMOS ${KICAD_DATA}/demos
|
||||
CACHE PATH "Location of KiCad demo files.")
|
||||
set(KICAD_TEMPLATE ${KICAD_DATA}/template
|
||||
CACHE PATH "Location of KiCad template files.")
|
||||
set( KICAD_DEMOS ${KICAD_DATA}/demos
|
||||
CACHE PATH "Location of KiCad demo files." )
|
||||
set( KICAD_TEMPLATE ${KICAD_DATA}/template
|
||||
CACHE PATH "Location of KiCad template files." )
|
||||
|
||||
mark_as_advanced(KICAD_BIN
|
||||
mark_as_advanced( KICAD_BIN
|
||||
KICAD_PLUGINS
|
||||
KICAD_DATA
|
||||
KICAD_DOCS
|
||||
KICAD_DEMOS
|
||||
KICAD_TEMPLATE)
|
||||
KICAD_TEMPLATE )
|
||||
|
||||
include(Functions)
|
||||
include( Functions )
|
||||
|
||||
include( ExternalProject )
|
||||
|
||||
#================================================
|
||||
# Find libraries that are needed to build KiCad.
|
||||
#================================================
|
||||
include(CheckFindPackageResult)
|
||||
include( CheckFindPackageResult )
|
||||
|
||||
# Turn on wxWidgets compatibility mode for some classes
|
||||
add_definitions(-DWX_COMPATIBILITY)
|
||||
|
@ -262,8 +251,8 @@ add_definitions(-DWX_COMPATIBILITY)
|
|||
#######################
|
||||
# Find OpenGL library #
|
||||
#######################
|
||||
find_package(OpenGL QUIET)
|
||||
check_find_package_result(OPENGL_FOUND "OpenGL")
|
||||
find_package( OpenGL QUIET )
|
||||
check_find_package_result( OPENGL_FOUND "OpenGL" )
|
||||
|
||||
#####################
|
||||
# Find GLEW library #
|
||||
|
@ -277,9 +266,8 @@ check_find_package_result(GLEW_FOUND "GLEW")
|
|||
find_package(Cairo 1.8.1 QUIET)
|
||||
check_find_package_result(CAIRO_FOUND "Cairo")
|
||||
|
||||
##########################
|
||||
# Download Boost library #
|
||||
##########################
|
||||
# Download boost and possibly build parts of it
|
||||
#################################################
|
||||
include( download_boost )
|
||||
|
||||
|
||||
|
@ -291,118 +279,133 @@ include( download_boost )
|
|||
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
|
||||
|
||||
# On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base
|
||||
if(APPLE)
|
||||
find_package(wxWidgets COMPONENTS gl adv html core net base xml QUIET)
|
||||
else(APPLE)
|
||||
find_package(wxWidgets COMPONENTS gl aui adv html core net base xml QUIET)
|
||||
endif(APPLE)
|
||||
check_find_package_result(wxWidgets_FOUND "wxWidgets")
|
||||
if( APPLE )
|
||||
find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET )
|
||||
else( APPLE )
|
||||
find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET )
|
||||
endif( APPLE )
|
||||
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
|
||||
|
||||
|
||||
# Include wxWidgets macros.
|
||||
include(${wxWidgets_USE_FILE})
|
||||
include( ${wxWidgets_USE_FILE} )
|
||||
|
||||
# Include MinGW resource compiler.
|
||||
include(MinGWResourceCompiler)
|
||||
include( MinGWResourceCompiler )
|
||||
|
||||
# Generate build system specific header file.
|
||||
include(PerformFeatureChecks)
|
||||
include( PerformFeatureChecks )
|
||||
perform_feature_checks()
|
||||
|
||||
# Find GDI+ on windows if wxGraphicsContext is available.
|
||||
if(MINGW AND USE_WX_GRAPHICS_CONTEXT)
|
||||
find_package(GdiPlus)
|
||||
check_find_package_result(GDI_PLUS_FOUND "GDI+")
|
||||
if( MINGW AND USE_WX_GRAPHICS_CONTEXT )
|
||||
find_package( GdiPlus )
|
||||
check_find_package_result( GDI_PLUS_FOUND "GDI+" )
|
||||
endif()
|
||||
|
||||
# Find Python and other scripting resources
|
||||
if(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
|
||||
set(PythonInterp_FIND_VERSION)
|
||||
find_package(PythonInterp)
|
||||
check_find_package_result(PYTHONINTERP_FOUND "Python Interpreter")
|
||||
|
||||
# Get the correct Python site package install path from the Python interpreter found by
|
||||
# FindPythonInterp unless the user specifically defined a custom path.
|
||||
if(NOT PYTHON_SITE_PACKAGE_PATH)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()"
|
||||
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(NOT PYTHON_SITE_PACKAGE_PATH)
|
||||
message(FATAL_ERROR "Error occurred while attemping to find the Python site library path.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path.")
|
||||
mark_as_advanced(PYTHON_DEST)
|
||||
message( STATUS "Python module install path: ${PYTHON_DEST}")
|
||||
find_package(PythonLibs)
|
||||
include_directories(${PYTHON_INCLUDE_PATH}
|
||||
./scripting)
|
||||
endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
|
||||
|
||||
|
||||
|
||||
# Automagically create version header file.
|
||||
include(CreateBzrVersionHeader)
|
||||
create_bzr_version_header()
|
||||
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
|
||||
# This file may exist (created by an alternate process to the svn test above),
|
||||
# e.g. could be created by a checkout script that produces a source tar file.
|
||||
# This directive means the about box will have the svn date & revision in it,
|
||||
# but the hard coded release date (program version) will be preserved.
|
||||
add_definitions(-DHAVE_SVN_REVISION)
|
||||
endif()
|
||||
|
||||
# For include_directories(BEFORE ...), which _reverses_
|
||||
# the order during insertion, so put first wanted last, which is
|
||||
# ${CMAKE_SOURCE_DIR/include. Use '.' for current source dir since
|
||||
# we don't want expansion here and now, and don't need expansion of
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}, '.' will work for any source directory.
|
||||
set(INC_BEFORE
|
||||
# Assist with header file searching optimization:
|
||||
# INC_BEFORE and INC_AFTER are two lists which go at the front and back of the
|
||||
# header file search lists, respectively.
|
||||
# INC_BEFORE is for use with "include_directories( BEFORE ...)", which _reverses_
|
||||
# the order during insertion. (So put first wanted last, which is
|
||||
# ${CMAKE_SOURCE_DIR/include.) Use '.' for current source dir since
|
||||
# we don't want expansion here and now, which would happen if using ${CMAKE_CURRENT_SOURCE_DIR}.
|
||||
# Instead we use '.' which is applicable to any source directory below here as a result of
|
||||
# this lack of expansion.
|
||||
set( INC_BEFORE
|
||||
.
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
set(INC_AFTER
|
||||
set( INC_AFTER
|
||||
${Boost_INCLUDE_DIR}
|
||||
#include <config.h>
|
||||
${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
||||
# Find Python and other scripting resources
|
||||
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
||||
set( PythonInterp_FIND_VERSION )
|
||||
find_package( PythonInterp )
|
||||
check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
|
||||
|
||||
# Get the correct Python site package install path from the Python interpreter found by
|
||||
# FindPythonInterp unless the user specifically defined a custom path.
|
||||
if( NOT PYTHON_SITE_PACKAGE_PATH )
|
||||
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()"
|
||||
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if( NOT PYTHON_SITE_PACKAGE_PATH )
|
||||
message( FATAL_ERROR "Error occurred while attemping to find the Python site library path." )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path." )
|
||||
mark_as_advanced( PYTHON_DEST )
|
||||
message( STATUS "Python module install path: ${PYTHON_DEST}" )
|
||||
|
||||
find_package( PythonLibs )
|
||||
|
||||
#message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" )
|
||||
|
||||
# Infrequently needed headers go at end of search paths, append to INC_AFTER which
|
||||
# although is used for all components, should be a harmless hit for something like eeschema
|
||||
# so long as unused search paths are at the end like this.
|
||||
set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting )
|
||||
|
||||
#message( STATUS "/ INC_AFTER:${INC_AFTER}" )
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
# Automagically create version header file.
|
||||
include( CreateBzrVersionHeader )
|
||||
create_bzr_version_header()
|
||||
|
||||
if( EXISTS ${CMAKE_SOURCE_DIR}/include/config.h )
|
||||
# This file may exist ( created by an alternate process to the svn test above),
|
||||
# e.g. could be created by a checkout script that produces a source tar file.
|
||||
# This directive means the about box will have the svn date & revision in it,
|
||||
# but the hard coded release date ( program version) will be preserved.
|
||||
add_definitions( -DHAVE_SVN_REVISION )
|
||||
endif()
|
||||
|
||||
|
||||
#================================================
|
||||
# Let CMake look in these directories for nested
|
||||
# 'CMakeLists.txt' files to process
|
||||
#================================================
|
||||
|
||||
############################
|
||||
# Binaries (CMake targets) #
|
||||
# Binaries ( CMake targets ) #
|
||||
############################
|
||||
|
||||
add_subdirectory(bitmaps_png)
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(3d-viewer)
|
||||
add_subdirectory(cvpcb)
|
||||
add_subdirectory(eeschema)
|
||||
add_subdirectory(gerbview)
|
||||
add_subdirectory(kicad)
|
||||
add_subdirectory(pcbnew)
|
||||
add_subdirectory(pcbnew/pcad2kicadpcb_plugin)
|
||||
add_subdirectory(polygon)
|
||||
add_subdirectory(pagelayout_editor)
|
||||
add_subdirectory(potrace)
|
||||
add_subdirectory(bitmap2component)
|
||||
add_subdirectory(pcb_calculator)
|
||||
add_subdirectory(tools)
|
||||
#add_subdirectory(new)
|
||||
add_subdirectory( bitmaps_png )
|
||||
add_subdirectory( common )
|
||||
add_subdirectory( 3d-viewer )
|
||||
add_subdirectory( cvpcb )
|
||||
add_subdirectory( eeschema )
|
||||
add_subdirectory( gerbview )
|
||||
add_subdirectory( kicad )
|
||||
add_subdirectory( pcbnew )
|
||||
add_subdirectory( polygon )
|
||||
add_subdirectory( pagelayout_editor )
|
||||
add_subdirectory( potrace )
|
||||
add_subdirectory( bitmap2component )
|
||||
add_subdirectory( pcb_calculator )
|
||||
add_subdirectory( tools )
|
||||
#add_subdirectory( new )
|
||||
|
||||
|
||||
# Make all libs and executables depend on ExternalProject_Add( boost ),
|
||||
# except perhaps bitmap lib
|
||||
# except perhaps bitmap lib. This allows a multi-threaded build to succeed.
|
||||
add_dependencies( pcbnew boost )
|
||||
add_dependencies( eeschema boost )
|
||||
add_dependencies( cvpcb boost )
|
||||
add_dependencies( gal boost )
|
||||
add_dependencies( common boost )
|
||||
add_dependencies( pcbcommon boost )
|
||||
add_dependencies( 3d-viewer boost )
|
||||
|
@ -414,14 +417,14 @@ add_dependencies( pl_editor boost )
|
|||
#############
|
||||
# Resources #
|
||||
#############
|
||||
add_subdirectory(demos)
|
||||
add_subdirectory(template)
|
||||
add_subdirectory( demos )
|
||||
add_subdirectory( template )
|
||||
|
||||
#================================================
|
||||
# Doxygen Output
|
||||
#================================================
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
find_package( Doxygen )
|
||||
if( DOXYGEN_FOUND )
|
||||
add_custom_target( doxygen-docs
|
||||
${CMAKE_COMMAND} -E remove_directory Documentation/doxygen
|
||||
COMMAND ${DOXYGEN_EXECUTABLE}
|
||||
|
@ -440,67 +443,67 @@ endif()
|
|||
configure_file(
|
||||
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
IMMEDIATE @ONLY )
|
||||
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
add_custom_target( uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" )
|
||||
|
||||
|
||||
#================================================
|
||||
# Installation parameters
|
||||
#================================================
|
||||
install(FILES INSTALL.txt
|
||||
install( FILES INSTALL.txt
|
||||
DESTINATION ${KICAD_DOCS}
|
||||
COMPONENT resources)
|
||||
COMPONENT resources )
|
||||
|
||||
install(FILES resources/freeroute.jnlp
|
||||
install( FILES resources/freeroute.jnlp
|
||||
DESTINATION ${KICAD_BIN}
|
||||
COMPONENT resources)
|
||||
COMPONENT resources )
|
||||
|
||||
###
|
||||
# Install scripts
|
||||
###
|
||||
if(UNIX)
|
||||
install(DIRECTORY scripts
|
||||
if( UNIX )
|
||||
install( DIRECTORY scripts
|
||||
DESTINATION ${KICAD_DOCS}
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
PATTERN ".svn" EXCLUDE )
|
||||
endif()
|
||||
|
||||
###
|
||||
# FreeDesktop .desktop and MIME resources
|
||||
###
|
||||
if(UNIX)
|
||||
if( UNIX )
|
||||
# Set paths
|
||||
set(UNIX_MIME_DIR resources/linux/mime)
|
||||
set(UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk)
|
||||
set(UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime)
|
||||
set(UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons)
|
||||
set(UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications)
|
||||
set( UNIX_MIME_DIR resources/linux/mime )
|
||||
set( UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk )
|
||||
set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
|
||||
set( UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons )
|
||||
set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
|
||||
|
||||
# Install Mimelnk directory
|
||||
install(DIRECTORY ${UNIX_MIMELNK_FILES}
|
||||
install( DIRECTORY ${UNIX_MIMELNK_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
PATTERN ".svn" EXCLUDE )
|
||||
|
||||
# Install Mime directory
|
||||
install(DIRECTORY ${UNIX_ICONS_FILES}
|
||||
install( DIRECTORY ${UNIX_ICONS_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
PATTERN ".svn" EXCLUDE )
|
||||
|
||||
# Install Icons
|
||||
install(DIRECTORY ${UNIX_MIME_FILES}
|
||||
install( DIRECTORY ${UNIX_MIME_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
PATTERN ".svn" EXCLUDE )
|
||||
|
||||
# Install Applications directory (.desktop files)
|
||||
install(DIRECTORY ${UNIX_APPLICATIONS_FILES}
|
||||
install( DIRECTORY ${UNIX_APPLICATIONS_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||
COMPONENT resources
|
||||
PATTERN ".svn" EXCLUDE)
|
||||
PATTERN ".svn" EXCLUDE )
|
||||
endif()
|
||||
|
||||
include(CTest)
|
||||
include( CTest )
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# - helper module to find OSX frameworks
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
|
||||
set(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
|
||||
macro(CMAKE_FIND_FRAMEWORKS fwk)
|
||||
set(${fwk}_FRAMEWORKS)
|
||||
if(APPLE)
|
||||
foreach(dir
|
||||
~/Library/Frameworks/${fwk}.framework
|
||||
/Library/Frameworks/${fwk}.framework
|
||||
/System/Library/Frameworks/${fwk}.framework
|
||||
/Network/Library/Frameworks/${fwk}.framework)
|
||||
if(EXISTS ${dir})
|
||||
set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
endif()
|
|
@ -42,12 +42,16 @@ ELSE (WIN32)
|
|||
|
||||
IF (APPLE)
|
||||
# These values for Apple could probably do with improvement.
|
||||
FIND_PATH( GLEW_INCLUDE_DIR glew.h
|
||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
|
||||
/System/Library/Frameworks/GLEW.framework/Versions/A/Headers
|
||||
/opt/local/include
|
||||
${OPENGL_LIBRARY_DIR}
|
||||
)
|
||||
SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
|
||||
SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
|
||||
|
||||
FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
ELSE (APPLE)
|
||||
|
||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
|
||||
|
|
|
@ -0,0 +1,260 @@
|
|||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
|
||||
#
|
||||
# This function is intended to be used in FindXXX.cmake modules files.
|
||||
# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
|
||||
# It also sets the <UPPERCASED_NAME>_FOUND variable.
|
||||
# The package is considered found if all variables <var1>... listed contain
|
||||
# valid results, e.g. valid filepaths.
|
||||
#
|
||||
# There are two modes of this function. The first argument in both modes is
|
||||
# the name of the Find-module where it is called (in original casing).
|
||||
#
|
||||
# The first simple mode looks like this:
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
|
||||
# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
|
||||
# will be set to TRUE.
|
||||
# If DEFAULT_MSG is given as second argument, then the function will generate
|
||||
# itself useful success and error messages. You can also supply a custom error message
|
||||
# for the failure case. This is not recommended.
|
||||
#
|
||||
# The second mode is more powerful and also supports version checking:
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
|
||||
# [VERSION_VAR <versionvar>
|
||||
# [CONFIG_MODE]
|
||||
# [FAIL_MESSAGE "Custom failure message"] )
|
||||
#
|
||||
# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
|
||||
# will be set to TRUE.
|
||||
# After REQUIRED_VARS the variables which are required for this package are listed.
|
||||
# Following VERSION_VAR the name of the variable can be specified which holds
|
||||
# the version of the package which has been found. If this is done, this version
|
||||
# will be checked against the (potentially) specified required version used
|
||||
# in the find_package() call. The EXACT keyword is also handled. The default
|
||||
# messages include information about the required version and the version
|
||||
# which has been actually found, both if the version is ok or not.
|
||||
# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
|
||||
# a find_package(... NO_MODULE) call, in this case all the information
|
||||
# provided by the config-mode of find_package() will be evaluated
|
||||
# automatically.
|
||||
# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
|
||||
# used, the default message will be displayed.
|
||||
#
|
||||
# Example for mode 1:
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
|
||||
#
|
||||
# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
|
||||
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
|
||||
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
|
||||
# independent whether QUIET was used or not.
|
||||
# If it is found, success will be reported, including the content of <var1>.
|
||||
# On repeated Cmake runs, the same message won't be printed again.
|
||||
#
|
||||
# Example for mode 2:
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
|
||||
# VERSION_VAR BISON_VERSION)
|
||||
# In this case, BISON is considered to be found if the variable(s) listed
|
||||
# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
|
||||
# Also the version of BISON will be checked by using the version contained
|
||||
# in BISON_VERSION.
|
||||
# Since no FAIL_MESSAGE is given, the default messages will be printed.
|
||||
#
|
||||
# Another example for mode 2:
|
||||
#
|
||||
# FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE)
|
||||
# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
|
||||
# and adds an additional search directory for automoc4.
|
||||
# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
|
||||
# success/error message.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2007-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
INCLUDE(FindPackageMessage)
|
||||
INCLUDE(CMakeParseArguments)
|
||||
|
||||
# internal helper macro
|
||||
MACRO(_FPHSA_FAILURE_MESSAGE _msg)
|
||||
IF (${_NAME}_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "${_msg}")
|
||||
ELSE (${_NAME}_FIND_REQUIRED)
|
||||
IF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "${_msg}")
|
||||
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
ENDIF (${_NAME}_FIND_REQUIRED)
|
||||
ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
|
||||
|
||||
|
||||
# internal helper macro to generate the failure message when used in CONFIG_MODE:
|
||||
MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
|
||||
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
|
||||
IF(${_NAME}_CONFIG)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
|
||||
ELSE(${_NAME}_CONFIG)
|
||||
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
|
||||
# List them all in the error message:
|
||||
IF(${_NAME}_CONSIDERED_CONFIGS)
|
||||
SET(configsText "")
|
||||
LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
|
||||
MATH(EXPR configsCount "${configsCount} - 1")
|
||||
FOREACH(currentConfigIndex RANGE ${configsCount})
|
||||
LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
|
||||
LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
|
||||
SET(configsText "${configsText} ${filename} (version ${version})\n")
|
||||
ENDFOREACH(currentConfigIndex)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
|
||||
|
||||
ELSE(${_NAME}_CONSIDERED_CONFIGS)
|
||||
# Simple case: No Config-file was found at all:
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
|
||||
ENDIF(${_NAME}_CONSIDERED_CONFIGS)
|
||||
ENDIF(${_NAME}_CONFIG)
|
||||
ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
|
||||
|
||||
|
||||
FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
||||
|
||||
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
|
||||
# new extended or in the "old" mode:
|
||||
SET(options CONFIG_MODE)
|
||||
SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
|
||||
SET(multiValueArgs REQUIRED_VARS)
|
||||
SET(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
|
||||
LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
|
||||
|
||||
IF(${INDEX} EQUAL -1)
|
||||
SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
|
||||
SET(FPHSA_REQUIRED_VARS ${ARGN})
|
||||
SET(FPHSA_VERSION_VAR)
|
||||
ELSE(${INDEX} EQUAL -1)
|
||||
|
||||
CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
|
||||
|
||||
IF(FPHSA_UNPARSED_ARGUMENTS)
|
||||
MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
|
||||
ENDIF(FPHSA_UNPARSED_ARGUMENTS)
|
||||
|
||||
IF(NOT FPHSA_FAIL_MESSAGE)
|
||||
SET(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
|
||||
ENDIF(NOT FPHSA_FAIL_MESSAGE)
|
||||
ENDIF(${INDEX} EQUAL -1)
|
||||
|
||||
# now that we collected all arguments, process them
|
||||
|
||||
IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
|
||||
SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
|
||||
ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
|
||||
|
||||
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
|
||||
# when it successfully found the config-file, including version checking:
|
||||
IF(FPHSA_CONFIG_MODE)
|
||||
LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
|
||||
LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
|
||||
SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
|
||||
ENDIF(FPHSA_CONFIG_MODE)
|
||||
|
||||
IF(NOT FPHSA_REQUIRED_VARS)
|
||||
MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
|
||||
ENDIF(NOT FPHSA_REQUIRED_VARS)
|
||||
|
||||
LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
|
||||
|
||||
STRING(TOUPPER ${_NAME} _NAME_UPPER)
|
||||
STRING(TOLOWER ${_NAME} _NAME_LOWER)
|
||||
|
||||
# collect all variables which were not found, so they can be printed, so the
|
||||
# user knows better what went wrong (#6375)
|
||||
SET(MISSING_VARS "")
|
||||
SET(DETAILS "")
|
||||
SET(${_NAME_UPPER}_FOUND TRUE)
|
||||
# check if all passed variables are valid
|
||||
FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
|
||||
IF(NOT ${_CURRENT_VAR})
|
||||
SET(${_NAME_UPPER}_FOUND FALSE)
|
||||
SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
|
||||
ELSE(NOT ${_CURRENT_VAR})
|
||||
SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
|
||||
ENDIF(NOT ${_CURRENT_VAR})
|
||||
ENDFOREACH(_CURRENT_VAR)
|
||||
|
||||
|
||||
# version handling:
|
||||
SET(VERSION_MSG "")
|
||||
SET(VERSION_OK TRUE)
|
||||
SET(VERSION ${${FPHSA_VERSION_VAR}} )
|
||||
IF (${_NAME}_FIND_VERSION)
|
||||
|
||||
IF(VERSION)
|
||||
|
||||
IF(${_NAME}_FIND_VERSION_EXACT) # exact version required
|
||||
IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
|
||||
SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
|
||||
SET(VERSION_OK FALSE)
|
||||
ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
|
||||
SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
|
||||
ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
|
||||
|
||||
ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified:
|
||||
IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
|
||||
SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
|
||||
SET(VERSION_OK FALSE)
|
||||
ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
|
||||
SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
|
||||
ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
|
||||
ENDIF(${_NAME}_FIND_VERSION_EXACT)
|
||||
|
||||
ELSE(VERSION)
|
||||
|
||||
# if the package was not found, but a version was given, add that to the output:
|
||||
IF(${_NAME}_FIND_VERSION_EXACT)
|
||||
SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
|
||||
ELSE(${_NAME}_FIND_VERSION_EXACT)
|
||||
SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
|
||||
ENDIF(${_NAME}_FIND_VERSION_EXACT)
|
||||
|
||||
ENDIF(VERSION)
|
||||
ELSE (${_NAME}_FIND_VERSION)
|
||||
IF(VERSION)
|
||||
SET(VERSION_MSG "(found version \"${VERSION}\")")
|
||||
ENDIF(VERSION)
|
||||
ENDIF (${_NAME}_FIND_VERSION)
|
||||
|
||||
IF(VERSION_OK)
|
||||
SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
|
||||
ELSE(VERSION_OK)
|
||||
SET(${_NAME_UPPER}_FOUND FALSE)
|
||||
ENDIF(VERSION_OK)
|
||||
|
||||
|
||||
# print the result:
|
||||
IF (${_NAME_UPPER}_FOUND)
|
||||
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
|
||||
ELSE (${_NAME_UPPER}_FOUND)
|
||||
|
||||
IF(FPHSA_CONFIG_MODE)
|
||||
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
|
||||
ELSE(FPHSA_CONFIG_MODE)
|
||||
IF(NOT VERSION_OK)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
|
||||
ELSE(NOT VERSION_OK)
|
||||
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
|
||||
ENDIF(NOT VERSION_OK)
|
||||
ENDIF(FPHSA_CONFIG_MODE)
|
||||
|
||||
ENDIF (${_NAME_UPPER}_FOUND)
|
||||
|
||||
SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
|
||||
|
||||
ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
|
|
@ -0,0 +1,175 @@
|
|||
# - Find python interpreter
|
||||
# This module finds if Python interpreter is installed and determines where the
|
||||
# executables are. This code sets the following variables:
|
||||
#
|
||||
# PYTHONINTERP_FOUND - Was the Python executable found
|
||||
# PYTHON_EXECUTABLE - path to the Python interpreter
|
||||
#
|
||||
# PYTHON_VERSION_STRING - Python version found e.g. 2.5.2
|
||||
# PYTHON_VERSION_MAJOR - Python major version found e.g. 2
|
||||
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
|
||||
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
|
||||
#
|
||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
||||
# version numbers that should be taken into account when searching for Python.
|
||||
# You need to set this variable before calling find_package(PythonInterp).
|
||||
#
|
||||
# You can point to a preferred python install to use by setting the following
|
||||
# to the point at the root directory of the python install:
|
||||
#
|
||||
# PYTHON_ROOT_DIR - The root directory of the python install
|
||||
#=============================================================================
|
||||
# Copyright 2005-2010 Kitware, Inc.
|
||||
# Copyright 2011 Bjoern Ricks <bjoern.ricks@gmail.com>
|
||||
# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
unset(_Python_NAMES)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonInterp_FIND_VERSION)
|
||||
if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||
string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION}")
|
||||
string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
|
||||
list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN} python${_PYTHON_FIND_MAJ})
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
if(NOT PythonInterp_FIND_VERSION_EXACT)
|
||||
foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
|
||||
if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
||||
list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
unset(_PYTHON_FIND_MAJ_MIN)
|
||||
unset(_PYTHON_FIND_MAJ)
|
||||
else()
|
||||
list(APPEND _Python_NAMES python${PythonInterp_FIND_VERSION})
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonInterp_FIND_VERSION}_VERSIONS})
|
||||
endif()
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
|
||||
endif()
|
||||
|
||||
list(APPEND _Python_NAMES python)
|
||||
|
||||
# Search for the preferred executable first
|
||||
if( ${PYTHON_ROOT_DIR} )
|
||||
# Search for any of the executable names solely in the directory we've
|
||||
# been pointed to. Failure to find the python executable here is a fatal
|
||||
# fail.
|
||||
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}
|
||||
PATHS ${PYTHON_ROOT_DIR}
|
||||
NO_DEFAULT_PATH )
|
||||
else()
|
||||
# If there is no specific path given, look for python in the path
|
||||
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
|
||||
endif()
|
||||
|
||||
# Set up the versions we know about, in the order we will search. Always add
|
||||
# the user supplied additional versions to the front.
|
||||
set(_Python_VERSIONS
|
||||
${Python_ADDITIONAL_VERSIONS}
|
||||
${_PYTHON_FIND_OTHER_VERSIONS}
|
||||
)
|
||||
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
unset(_PYTHON1_VERSIONS)
|
||||
unset(_PYTHON2_VERSIONS)
|
||||
unset(_PYTHON3_VERSIONS)
|
||||
|
||||
# Search for newest python version if python executable isn't found
|
||||
if(NOT PYTHON_EXECUTABLE)
|
||||
|
||||
# If using the MINGW compiler, we mustn't find the standard python
|
||||
# distribution because of multiple C-Runtime errors. We must instead
|
||||
# use the Python-a-mingw-us distribution
|
||||
if(MINGW)
|
||||
list( APPEND _Python_PPATHS ${PYTHON_ROOT_DIR} )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.9" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.8" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.7" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.6" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.5" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.4" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.3" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.2" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.1" )
|
||||
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.0" )
|
||||
else()
|
||||
list( APPEND _Python_PPATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] )
|
||||
endif()
|
||||
|
||||
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
|
||||
set(_Python_NAMES python${_CURRENT_VERSION})
|
||||
if(WIN32)
|
||||
list(APPEND _Python_NAMES python)
|
||||
endif()
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES ${_Python_NAMES}
|
||||
PATHS ${_Python_PPATHS}
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# determine python version string
|
||||
if(PYTHON_EXECUTABLE)
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c
|
||||
"import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
|
||||
OUTPUT_VARIABLE _VERSION
|
||||
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||
ERROR_QUIET)
|
||||
if(NOT _PYTHON_VERSION_RESULT)
|
||||
string(REPLACE ";" "." PYTHON_VERSION_STRING "${_VERSION}")
|
||||
list(GET _VERSION 0 PYTHON_VERSION_MAJOR)
|
||||
list(GET _VERSION 1 PYTHON_VERSION_MINOR)
|
||||
list(GET _VERSION 2 PYTHON_VERSION_PATCH)
|
||||
if(PYTHON_VERSION_PATCH EQUAL 0)
|
||||
# it's called "Python 2.7", not "2.7.0"
|
||||
string(REGEX REPLACE "\\.0$" "" PYTHON_VERSION_STRING "${PYTHON_VERSION_STRING}")
|
||||
endif()
|
||||
else()
|
||||
# sys.version predates sys.version_info, so use that
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write(sys.version)"
|
||||
OUTPUT_VARIABLE _VERSION
|
||||
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||
ERROR_QUIET)
|
||||
if(NOT _PYTHON_VERSION_RESULT)
|
||||
string(REGEX REPLACE " .*" "" PYTHON_VERSION_STRING "${_VERSION}")
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}")
|
||||
if(PYTHON_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+.*")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}")
|
||||
else()
|
||||
set(PYTHON_VERSION_PATCH "0")
|
||||
endif()
|
||||
else()
|
||||
# sys.version was first documented for Python 1.5, so assume
|
||||
# this is older.
|
||||
set(PYTHON_VERSION_STRING "1.4")
|
||||
set(PYTHON_VERSION_MAJOR "1")
|
||||
set(PYTHON_VERSION_MAJOR "4")
|
||||
set(PYTHON_VERSION_MAJOR "0")
|
||||
endif()
|
||||
endif()
|
||||
unset(_PYTHON_VERSION_RESULT)
|
||||
unset(_VERSION)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
|
@ -0,0 +1,338 @@
|
|||
# - Find python libraries
|
||||
# This module finds if Python is installed and determines where the
|
||||
# include files and libraries are. It also determines what the name of
|
||||
# the library is. This code sets the following variables:
|
||||
#
|
||||
# PYTHONLIBS_FOUND - have the Python libs been found
|
||||
# PYTHON_LIBRARIES - path to the python library
|
||||
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
|
||||
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
|
||||
# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
|
||||
# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8)
|
||||
#
|
||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
||||
# version numbers that should be taken into account when searching for Python.
|
||||
# You need to set this variable before calling find_package(PythonLibs).
|
||||
#
|
||||
# You can point to a preferred python install to use by setting the following
|
||||
# to the point at the root directory of the python install:
|
||||
#
|
||||
# PYTHON_ROOT_DIR - The root directory of the python install
|
||||
#
|
||||
# If you'd like to specify the installation of Python to use, you should modify
|
||||
# the following cache variables:
|
||||
# PYTHON_LIBRARY - path to the python library
|
||||
# PYTHON_INCLUDE_DIR - path to where Python.h is found
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
|
||||
# Search for the python framework on Apple.
|
||||
CMAKE_FIND_FRAMEWORKS(Python)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonLibs_FIND_VERSION)
|
||||
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||
string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
|
||||
string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
if(PythonLibs_FIND_VERSION_EXACT)
|
||||
if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
|
||||
endif()
|
||||
else()
|
||||
foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
|
||||
if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
||||
list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
unset(_PYTHON_FIND_MAJ_MIN)
|
||||
unset(_PYTHON_FIND_MAJ)
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
|
||||
endif()
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
|
||||
endif()
|
||||
|
||||
# Set up the versions we know about, in the order we will search. Always add
|
||||
# the user supplied additional versions to the front.
|
||||
set(_Python_VERSIONS
|
||||
${Python_ADDITIONAL_VERSIONS}
|
||||
${_PYTHON_FIND_OTHER_VERSIONS}
|
||||
)
|
||||
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
unset(_PYTHON1_VERSIONS)
|
||||
unset(_PYTHON2_VERSIONS)
|
||||
unset(_PYTHON3_VERSIONS)
|
||||
|
||||
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
|
||||
string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
|
||||
if(WIN32)
|
||||
if(MINGW)
|
||||
find_library(PYTHON_DEBUG_LIBRARY
|
||||
NAMES python{$_CURRENT_VERSION}_d
|
||||
PATHS
|
||||
"${PYTHON_ROOT_DIR}"
|
||||
"C:/python/${_CURRENT_VERSION}.9"
|
||||
"C:/python/${_CURRENT_VERSION}.8"
|
||||
"C:/python/${_CURRENT_VERSION}.7"
|
||||
"C:/python/${_CURRENT_VERSION}.6"
|
||||
"C:/python/${_CURRENT_VERSION}.5"
|
||||
"C:/python/${_CURRENT_VERSION}.4"
|
||||
"C:/python/${_CURRENT_VERSION}.3"
|
||||
"C:/python/${_CURRENT_VERSION}.2"
|
||||
"C:/python/${_CURRENT_VERSION}.1"
|
||||
"C:/python/${_CURRENT_VERSION}.0"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
else()
|
||||
find_library(PYTHON_DEBUG_LIBRARY
|
||||
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
find_library(PYTHON_LIBRARY
|
||||
NAMES python${_CURRENT_VERSION}
|
||||
PATHS
|
||||
"${PYTHON_ROOT_DIR}"
|
||||
"C:/python/${_CURRENT_VERSION}.9"
|
||||
"C:/python/${_CURRENT_VERSION}.8"
|
||||
"C:/python/${_CURRENT_VERSION}.7"
|
||||
"C:/python/${_CURRENT_VERSION}.6"
|
||||
"C:/python/${_CURRENT_VERSION}.5"
|
||||
"C:/python/${_CURRENT_VERSION}.4"
|
||||
"C:/python/${_CURRENT_VERSION}.3"
|
||||
"C:/python/${_CURRENT_VERSION}.2"
|
||||
"C:/python/${_CURRENT_VERSION}.1"
|
||||
"C:/python/${_CURRENT_VERSION}.0"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
else()
|
||||
find_library(PYTHON_LIBRARY
|
||||
NAMES
|
||||
python${_CURRENT_VERSION_NO_DOTS}
|
||||
python${_CURRENT_VERSION}mu
|
||||
python${_CURRENT_VERSION}m
|
||||
python${_CURRENT_VERSION}u
|
||||
python${_CURRENT_VERSION}
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
|
||||
# Avoid finding the .dll in the PATH. We want the .lib.
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
endif()
|
||||
|
||||
# Look for the static library in the Python config directory
|
||||
find_library(PYTHON_LIBRARY
|
||||
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
|
||||
# Avoid finding the .dll in the PATH. We want the .lib.
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
# This is where the static library is usually located
|
||||
PATH_SUFFIXES python${_CURRENT_VERSION}/config
|
||||
)
|
||||
|
||||
|
||||
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
|
||||
# PYTHON_INCLUDE_DIR is not set.
|
||||
if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
|
||||
set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
|
||||
"Path to where Python.h is found" FORCE)
|
||||
endif()
|
||||
|
||||
set(PYTHON_FRAMEWORK_INCLUDES)
|
||||
if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
|
||||
foreach(dir ${Python_FRAMEWORKS})
|
||||
set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
|
||||
${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
find_path(PYTHON_INCLUDE_DIR
|
||||
NAMES Python.h
|
||||
PATHS
|
||||
"${PYTHON_ROOT_DIR}/include"
|
||||
"C:/python/${_CURRENT_VERSION}.9/include"
|
||||
"C:/python/${_CURRENT_VERSION}.8/include"
|
||||
"C:/python/${_CURRENT_VERSION}.7/include"
|
||||
"C:/python/${_CURRENT_VERSION}.6/include"
|
||||
"C:/python/${_CURRENT_VERSION}.5/include"
|
||||
"C:/python/${_CURRENT_VERSION}.4/include"
|
||||
"C:/python/${_CURRENT_VERSION}.3/include"
|
||||
"C:/python/${_CURRENT_VERSION}.2/include"
|
||||
"C:/python/${_CURRENT_VERSION}.1/include"
|
||||
"C:/python/${_CURRENT_VERSION}.0/include"
|
||||
)
|
||||
else()
|
||||
find_path(PYTHON_INCLUDE_DIR
|
||||
NAMES Python.h
|
||||
PATHS
|
||||
${PYTHON_FRAMEWORK_INCLUDES}
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
|
||||
PATH_SUFFIXES
|
||||
python${_CURRENT_VERSION}mu
|
||||
python${_CURRENT_VERSION}m
|
||||
python${_CURRENT_VERSION}u
|
||||
python${_CURRENT_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
# For backward compatibility, set PYTHON_INCLUDE_PATH.
|
||||
set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
|
||||
|
||||
if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
|
||||
file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
|
||||
REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
|
||||
string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
|
||||
PYTHONLIBS_VERSION_STRING "${python_version_str}")
|
||||
unset(python_version_str)
|
||||
endif()
|
||||
|
||||
if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
mark_as_advanced(
|
||||
PYTHON_DEBUG_LIBRARY
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
|
||||
# cache entries because they are meant to specify the location of a single
|
||||
# library. We now set the variables listed by the documentation for this
|
||||
# module.
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
|
||||
|
||||
# These variables have been historically named in this module different from
|
||||
# what SELECT_LIBRARY_CONFIGURATIONS() expects.
|
||||
set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
|
||||
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
|
||||
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
|
||||
# Unset this, this prefix doesn't match the module prefix, they are different
|
||||
# for historical reasons.
|
||||
unset(PYTHON_FOUND)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
|
||||
REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
|
||||
VERSION_VAR PYTHONLIBS_VERSION_STRING)
|
||||
|
||||
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
|
||||
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
|
||||
# in your sources to initialize the static python modules
|
||||
function(PYTHON_ADD_MODULE _NAME )
|
||||
get_property(_TARGET_SUPPORTS_SHARED_LIBS
|
||||
GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
|
||||
option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
|
||||
option(PYTHON_MODULE_${_NAME}_BUILD_SHARED
|
||||
"Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
|
||||
|
||||
# Mark these options as advanced
|
||||
mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME}
|
||||
PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
|
||||
if(PYTHON_ENABLE_MODULE_${_NAME})
|
||||
if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
set(PY_MODULE_TYPE MODULE)
|
||||
else()
|
||||
set(PY_MODULE_TYPE STATIC)
|
||||
set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME})
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME})
|
||||
add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
|
||||
# target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
|
||||
|
||||
if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
|
||||
set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
|
||||
if(WIN32 AND NOT CYGWIN)
|
||||
set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(PYTHON_WRITE_MODULES_HEADER _filename)
|
||||
|
||||
get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST)
|
||||
|
||||
get_filename_component(_name "${_filename}" NAME)
|
||||
string(REPLACE "." "_" _name "${_name}")
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
|
||||
|
||||
set(_filenameTmp "${_filename}.in")
|
||||
file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
|
||||
file(APPEND ${_filenameTmp}
|
||||
"#ifndef ${_nameUpper}
|
||||
#define ${_nameUpper}
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern \"C\" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
")
|
||||
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${_filenameTmp}
|
||||
"#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
")
|
||||
|
||||
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
|
||||
foreach(_currentModule ${PY_STATIC_MODULES_LIST})
|
||||
file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n")
|
||||
endforeach()
|
||||
file(APPEND ${_filenameTmp} "}\n\n")
|
||||
file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
|
||||
|
||||
# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
|
||||
|
||||
endfunction()
|
|
@ -56,6 +56,18 @@ macro(perform_feature_checks)
|
|||
# mean won't fail somewhere down the line.
|
||||
check_include_file("iso646.h" HAVE_ISO646_H)
|
||||
|
||||
# The STDINT header file test is required because MinGW under Windows
|
||||
# doesn't define HAVE_STDINT_H even though it does have it.
|
||||
#
|
||||
# We need to add it to the global compiler definitions as config.h is not
|
||||
# included in pyport.h which is where the problem ocurrs without this
|
||||
# fix.
|
||||
check_include_file("stdint.h" HAVE_STDINT_H)
|
||||
|
||||
if( HAVE_STDINT_H )
|
||||
add_definitions( -DHAVE_STDINT_H )
|
||||
endif()
|
||||
|
||||
# no place is this used, and "HAVE_STRINGS_H", if present in config.h then
|
||||
# conflicts with /usr/include/python2.6/Python.h. Please rename the macro if
|
||||
# re-introduce this.
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose good
|
||||
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
|
||||
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
|
||||
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
|
||||
# and basename_LIBRARY_RELEASE will be set to the release value. If only
|
||||
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
|
||||
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY and
|
||||
# basename_LIBRARIES will be set with debug and optimized flags specifying the
|
||||
# library to be used for the given configuration. If no build type has been set
|
||||
# or the generator in use does not support configuration types, then
|
||||
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
# Utility macro to check if one variable exists while another doesn't, and set
|
||||
# one that doesn't exist to the one that exists.
|
||||
macro( _set_library_name basename GOOD BAD )
|
||||
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
|
||||
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
# if only the release version was found, set the debug to be the release
|
||||
# version.
|
||||
_set_library_name( ${basename} RELEASE DEBUG )
|
||||
# if only the debug version was found, set the release value to be the
|
||||
# debug value.
|
||||
_set_library_name( ${basename} DEBUG RELEASE )
|
||||
|
||||
# Set a default case, which will come into effect if
|
||||
# -no build type is set and the generator only supports one build type
|
||||
# at a time (i.e. CMAKE_CONFIGURATION_TYPES is false)
|
||||
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are the same
|
||||
# -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are both empty
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
|
||||
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
|
||||
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
|
||||
set( ${basename}_LIBRARY "" )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
|
||||
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
|
||||
endforeach()
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
|
||||
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
|
||||
endforeach()
|
||||
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
|
||||
"The ${basename} library" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif()
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY
|
||||
${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro()
|
|
@ -75,17 +75,14 @@
|
|||
|
||||
#cmakedefine USE_IMAGES_IN_MENUS 1
|
||||
|
||||
/// Definitions to enable the s-expression file formats and nanometer units.
|
||||
#cmakedefine USE_PCBNEW_NANOMETRES
|
||||
|
||||
/// The legacy file format revision of the *.brd file created by this build
|
||||
#if defined(USE_PCBNEW_NANOMETRES)
|
||||
#define LEGACY_BOARD_FILE_VERSION 2
|
||||
#else
|
||||
#define LEGACY_BOARD_FILE_VERSION 1
|
||||
#endif
|
||||
#define LEGACY_BOARD_FILE_VERSION 2
|
||||
|
||||
/// Definition to compile with Pcbnew footprint library table implementation.
|
||||
#cmakedefine USE_FP_LIB_TABLE
|
||||
|
||||
/// When defined, build the GITHUB_PLUGIN for pcbnew.
|
||||
#cmakedefine BUILD_GITHUB_PLUGIN
|
||||
|
||||
|
||||
#endif // CONFIG_H_
|
||||
|
|
|
@ -22,11 +22,43 @@
|
|||
|
||||
|
||||
|
||||
# Download and patch boost headers to a particular version.
|
||||
# Assumes include( ExternalProject ) was done inline previous to this file.
|
||||
# Download a particular boost version, and patch it [and build it if BUILD_GITHUB_PLUGIN].
|
||||
# Assumes include( ExternalProject ) was done inline previous to this file
|
||||
# and that set( DOWNLOAD_DIR ... ) was set in a higher context.
|
||||
|
||||
|
||||
#-----<configure>----------------------------------------------------------------
|
||||
|
||||
if( false )
|
||||
set( BOOST_RELEASE 1.53.0 )
|
||||
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
|
||||
else()
|
||||
set( BOOST_RELEASE 1.54.0 )
|
||||
set( BOOST_MD5 15cb8c0803064faef0c4ddf5bc5ca279 ) # re-calc this on every RELEASE change
|
||||
endif()
|
||||
|
||||
# The boost headers [and static libs if built] go here, at the top of KiCad
|
||||
# source tree in boost_root.
|
||||
set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" )
|
||||
|
||||
|
||||
if( BUILD_GITHUB_PLUGIN )
|
||||
# Space separated list which indicates the subset of boost libraries to compile.
|
||||
set( BOOST_LIBS_BUILT
|
||||
#filesystem
|
||||
system
|
||||
#regex
|
||||
#program_options
|
||||
#date_time
|
||||
#thread
|
||||
#exception
|
||||
unit_test_framework
|
||||
)
|
||||
endif()
|
||||
|
||||
#-----</configure>---------------------------------------------------------------
|
||||
|
||||
|
||||
set( BOOST_RELEASE 1.53.0 )
|
||||
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
|
||||
|
||||
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
|
||||
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
|
||||
|
@ -36,26 +68,101 @@ set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
|
|||
# download, the patch is applied. This lets you regenerate a new patch at any time
|
||||
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
|
||||
|
||||
# include only the headers in the repo.
|
||||
# repo = "${headers}/../.bzr" = "<SOURCE_DIR>/.bzr"
|
||||
set( headers ${PREFIX}/src/boost/boost )
|
||||
# path to the boost headers in the repo.
|
||||
# repo = "${headers_src}/../.bzr" = "<SOURCE_DIR>/.bzr"
|
||||
set( headers_src "${PREFIX}/src/boost/boost" )
|
||||
|
||||
|
||||
ExternalProject_Add( boost
|
||||
PREFIX ${PREFIX}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
||||
URL_MD5 ${BOOST_MD5}
|
||||
# don't look at this:
|
||||
function( set_boost_lib_names libs output )
|
||||
foreach( lib ${libs} )
|
||||
set( fullpath_lib, "${BOOST_ROOT}/lib/libboost_${lib}.a" )
|
||||
message( STATUS "fullpath_lib:${fullpath_lib}" )
|
||||
set( output ${output} ${fullpath_lib} )
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# The patch command executes with the working directory set to <SOURCE_DIR>
|
||||
PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch
|
||||
|
||||
CONFIGURE_COMMAND ""
|
||||
if( BUILD_GITHUB_PLUGIN )
|
||||
|
||||
# remove then re-copy into the include/boost directory during next two steps:
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${headers} ${PROJECT_SOURCE_DIR}/include/boost
|
||||
)
|
||||
# (BTW "test" yields "unit_test_framework" when passed to bootstrap.{sh,bat} ).
|
||||
message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" )
|
||||
string( REPLACE "unit_test_framework" "test" libs_csv "${BOOST_LIBS_BUILT}" )
|
||||
message( STATUS "REPLACE libs_csv:${libs_csv}" )
|
||||
|
||||
string( REGEX REPLACE "\\;" "," libs_csv "${libs_csv}" )
|
||||
message( STATUS "libs_csv:${libs_csv}" )
|
||||
|
||||
if( MINGW )
|
||||
set( bootstrap "bootstart.bat mingw" )
|
||||
else()
|
||||
set( bootstrap bootstrap.sh )
|
||||
endif()
|
||||
|
||||
ExternalProject_Add( boost
|
||||
PREFIX "${PREFIX}"
|
||||
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
|
||||
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
||||
URL_MD5 ${BOOST_MD5}
|
||||
|
||||
# The patch command executes with the working directory set to <SOURCE_DIR>
|
||||
PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch"
|
||||
|
||||
# [Mis-]use this step to erase all the boost headers and libraries before
|
||||
# replacing them below.
|
||||
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${BOOST_ROOT}"
|
||||
|
||||
BINARY_DIR "${PREFIX}/src/boost/"
|
||||
CONFIGURE_COMMAND ${bootstrap}
|
||||
--with-libraries=${libs_csv}
|
||||
|
||||
BUILD_COMMAND b2
|
||||
variant=release
|
||||
threading=multi
|
||||
toolset=gcc
|
||||
link=static
|
||||
--prefix=${BOOST_ROOT}
|
||||
install
|
||||
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
file( GLOB boost_libs "${BOOST_ROOT}/lib/*" )
|
||||
#message( STATUS BOOST_ROOT:${BOOST_ROOT} boost_libs:${boost_libs} )
|
||||
set( Boost_LIBRARIES ${boost_libs} CACHE FILEPATH "Boost libraries directory" )
|
||||
set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )
|
||||
|
||||
|
||||
else( BUILD_GITHUB_PLUGIN )
|
||||
|
||||
|
||||
ExternalProject_Add( boost
|
||||
PREFIX "${PREFIX}"
|
||||
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
|
||||
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
||||
URL_MD5 ${BOOST_MD5}
|
||||
|
||||
# The patch command executes with the working directory set to <SOURCE_DIR>
|
||||
PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch"
|
||||
|
||||
# Dick 18-Aug-2013:
|
||||
# [mis-]use this UPDATE_COMMAND opportunity to remove the old place of boost headers.
|
||||
# Can eventually remove this step after headers are moved from <kicad_src>/include/boost
|
||||
# to <kicad_src>/boost_root/include/boost over the next several months.
|
||||
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PROJECT_SOURCE_DIR}/include/boost"
|
||||
|
||||
CONFIGURE_COMMAND ""
|
||||
|
||||
# remove then re-copy into the include/boost directory during next two steps:
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${BOOST_ROOT}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "${headers_src}" "${BOOST_ROOT}/include/boost"
|
||||
)
|
||||
|
||||
# Until my find_package() support is done for my boost.
|
||||
set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" )
|
||||
|
||||
|
||||
endif( BUILD_GITHUB_PLUGIN )
|
||||
|
||||
|
||||
ExternalProject_Add_Step( boost bzr_commit_boost
|
||||
|
@ -66,8 +173,8 @@ ExternalProject_Add_Step( boost bzr_commit_boost
|
|||
|
||||
|
||||
ExternalProject_Add_Step( boost bzr_add_boost
|
||||
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers}
|
||||
COMMAND bzr add -q ${headers}
|
||||
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src}
|
||||
COMMAND bzr add -q ${headers_src}
|
||||
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
||||
DEPENDERS bzr_commit_boost
|
||||
)
|
||||
|
@ -79,3 +186,4 @@ ExternalProject_Add_Step( boost bzr_init_boost
|
|||
DEPENDERS bzr_add_boost
|
||||
DEPENDEES download
|
||||
)
|
||||
|
||||
|
|
|
@ -111,10 +111,6 @@ This option is used to enable or disable building KiCad with images in menu
|
|||
items. If this is not defined when CMake is used to create the build files,
|
||||
images will be included in menu items on all platforms except OSX.
|
||||
|
||||
USE_PCBNEW_NANOMETRES (ON/OFF)
|
||||
This option is used to enable or disable the nano-meter internal units for
|
||||
Pcbnew. The default is ON.
|
||||
|
||||
KICAD_GOST (ON/OFF)
|
||||
-------------------
|
||||
This option is used to enable or disable the GOST notation for multiple gates
|
||||
|
|
|
@ -25,10 +25,10 @@ Contribute to KiCad (under Linux)
|
|||
6) Compile:
|
||||
cd kicad_john
|
||||
mkdir build; cd build
|
||||
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake ../ -DCMAKE_BUILD_TYPE=Debug
|
||||
to build a debug version
|
||||
or
|
||||
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake ../ -DCMAKE_BUILD_TYPE=Release
|
||||
to build a release version
|
||||
make
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ include_directories(BEFORE ${INC_BEFORE})
|
|||
include_directories(
|
||||
./dialogs
|
||||
./dialog_about
|
||||
${Boost_INCLUDE_DIR}
|
||||
${CAIRO_INCLUDE_DIR}
|
||||
${GLEW_INCLUDE_DIR}
|
||||
../3d-viewer
|
||||
../pcbnew
|
||||
../polygon
|
||||
|
@ -57,9 +57,10 @@ set(GAL_SRCS
|
|||
add_library(gal STATIC ${GAL_SRCS})
|
||||
add_dependencies(gal shader_headers)
|
||||
|
||||
if(WIN32)
|
||||
# Only for win32 cross compilation using MXE
|
||||
if(WIN32 AND MSYS)
|
||||
add_definitions(-DGLEW_STATIC)
|
||||
endif(WIN32)
|
||||
endif(WIN32 AND MSYS)
|
||||
|
||||
set(COMMON_ABOUT_DLG_SRCS
|
||||
dialog_about/AboutDialog_main.cpp
|
||||
|
|
|
@ -288,10 +288,10 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex )
|
|||
}
|
||||
|
||||
|
||||
wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
|
||||
wxRealPoint* aGridSize ) const
|
||||
wxPoint BASE_SCREEN::getNearestGridPosition( const wxPoint& aPosition,
|
||||
const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const
|
||||
{
|
||||
wxPoint pt;
|
||||
wxPoint pt;
|
||||
wxRealPoint gridSize;
|
||||
|
||||
if( aGridSize )
|
||||
|
@ -299,13 +299,13 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
|
|||
else
|
||||
gridSize = GetGridSize();
|
||||
|
||||
wxPoint gridOrigin = m_GridOrigin;
|
||||
|
||||
double offset = fmod( gridOrigin.x, gridSize.x );
|
||||
double offset = fmod( aGridOrigin.x, gridSize.x );
|
||||
int x = KiROUND( (aPosition.x - offset) / gridSize.x );
|
||||
|
||||
pt.x = KiROUND( x * gridSize.x + offset );
|
||||
|
||||
offset = fmod( gridOrigin.y, gridSize.y );
|
||||
offset = fmod( aGridOrigin.y, gridSize.y );
|
||||
|
||||
int y = KiROUND( (aPosition.y - offset) / gridSize.y );
|
||||
pt.y = KiROUND ( y * gridSize.y + offset );
|
||||
|
||||
|
@ -313,19 +313,19 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
|
|||
}
|
||||
|
||||
|
||||
wxPoint BASE_SCREEN::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize ) const
|
||||
wxPoint BASE_SCREEN::getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const
|
||||
{
|
||||
if( aOnGrid )
|
||||
return GetNearestGridPosition( m_crossHairPosition, aGridSize );
|
||||
return getNearestGridPosition( m_crossHairPosition, aGridOrigin, aGridSize );
|
||||
|
||||
return m_crossHairPosition;
|
||||
}
|
||||
|
||||
|
||||
wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const
|
||||
wxPoint BASE_SCREEN::getCrossHairScreenPosition() const
|
||||
{
|
||||
wxPoint pos = m_crossHairPosition - m_DrawOrg;
|
||||
double scalar = GetScalingFactor();
|
||||
double scalar = GetScalingFactor();
|
||||
|
||||
pos.x = KiROUND( (double) pos.x * scalar );
|
||||
pos.y = KiROUND( (double) pos.y * scalar );
|
||||
|
@ -334,10 +334,10 @@ wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const
|
|||
}
|
||||
|
||||
|
||||
void BASE_SCREEN::SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid )
|
||||
void BASE_SCREEN::setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid )
|
||||
{
|
||||
if( aSnapToGrid )
|
||||
m_crossHairPosition = GetNearestGridPosition( aPosition );
|
||||
m_crossHairPosition = getNearestGridPosition( aPosition, aGridOrigin, NULL );
|
||||
else
|
||||
m_crossHairPosition = aPosition;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
* depending on the application.
|
||||
*/
|
||||
|
||||
#include <macros.h>
|
||||
#include <base_struct.h>
|
||||
#include <class_title_block.h>
|
||||
#include <common.h>
|
||||
|
@ -187,7 +188,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed )
|
|||
|
||||
|
||||
/* Convert a value to a string using double notation.
|
||||
* For readability, the mantissa has 3 or more digits (max 8 digits),
|
||||
* For readability, the mantissa has 3 or more digits,
|
||||
* the trailing 0 are removed if the mantissa has more than 3 digits
|
||||
* and some trailing 0
|
||||
* This function should be used to display values in dialogs because a value
|
||||
|
@ -198,23 +199,39 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed )
|
|||
*/
|
||||
wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
|
||||
{
|
||||
wxString stringValue;
|
||||
double value_to_print;
|
||||
|
||||
value_to_print = To_User_Unit( aUnit, aValue );
|
||||
double value_to_print = To_User_Unit( aUnit, aValue );
|
||||
|
||||
#if defined( EESCHEMA )
|
||||
stringValue.Printf( wxT( "%.3f" ), value_to_print );
|
||||
#else
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
stringValue.Printf( wxT( "%.8f" ), value_to_print );
|
||||
#else
|
||||
stringValue.Printf( wxT( "%.4f" ), value_to_print );
|
||||
#endif
|
||||
wxString stringValue = wxString::Format( wxT( "%.3f" ), value_to_print );
|
||||
|
||||
// Strip trailing zeros. However, keep at least 3 digits in mantissa
|
||||
// For readability
|
||||
StripTrailingZeros( stringValue, 3 );
|
||||
|
||||
#else
|
||||
|
||||
char buf[50];
|
||||
int len;
|
||||
|
||||
if( value_to_print != 0.0 && fabs( value_to_print ) <= 0.0001 )
|
||||
{
|
||||
len = sprintf( buf, "%.10f", value_to_print );
|
||||
|
||||
while( --len > 0 && buf[len] == '0' )
|
||||
buf[len] = '\0';
|
||||
|
||||
if( buf[len]=='.' || buf[len]==',' )
|
||||
buf[len] = '\0';
|
||||
else
|
||||
++len;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = sprintf( buf, "%.10g", value_to_print );
|
||||
}
|
||||
|
||||
wxString stringValue( buf, wxConvUTF8 );
|
||||
|
||||
#endif
|
||||
|
||||
if( aAddUnitSymbol )
|
||||
|
@ -269,8 +286,6 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue )
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
|
||||
{
|
||||
double value;
|
||||
|
|
|
@ -502,13 +502,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
|
|||
tmp << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << wxT( "\n" );
|
||||
|
||||
tmp << wxT( "Options: USE_PCBNEW_NANOMETRES=" );
|
||||
#ifdef USE_PCBNEW_NANOMETRES
|
||||
tmp << wxT( "ON\n" );
|
||||
#else
|
||||
tmp << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
|
||||
#ifdef USE_WX_GRAPHICS_CONTEXT
|
||||
tmp << wxT( "ON\n" );
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
BLOCK_SELECTOR::BLOCK_SELECTOR() :
|
||||
EDA_RECT()
|
||||
{
|
||||
m_state = STATE_NO_BLOCK; /* State (enum BLOCK_STATE_T) of block. */
|
||||
m_command = BLOCK_IDLE; /* Type (enum BLOCK_COMMAND_T) of operation. */
|
||||
m_state = STATE_NO_BLOCK; // State (enum BLOCK_STATE_T) of block.
|
||||
m_command = BLOCK_IDLE; // Type (enum BLOCK_COMMAND_T) of operation.
|
||||
m_color = BROWN;
|
||||
}
|
||||
|
||||
|
@ -62,24 +62,24 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
|
|||
case BLOCK_IDLE:
|
||||
break;
|
||||
|
||||
case BLOCK_MOVE: /* Move */
|
||||
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
||||
case BLOCK_MOVE: // Move
|
||||
case BLOCK_PRESELECT_MOVE: // Move with preselection list
|
||||
msg = _( "Block Move" );
|
||||
break;
|
||||
|
||||
case BLOCK_DRAG: /* Drag */
|
||||
case BLOCK_DRAG: // Drag
|
||||
msg = _( "Block Drag" );
|
||||
break;
|
||||
|
||||
case BLOCK_COPY: /* Copy */
|
||||
case BLOCK_COPY: // Copy
|
||||
msg = _( "Block Copy" );
|
||||
break;
|
||||
|
||||
case BLOCK_DELETE: /* Delete */
|
||||
case BLOCK_DELETE: // Delete
|
||||
msg = _( "Block Delete" );
|
||||
break;
|
||||
|
||||
case BLOCK_SAVE: /* Save */
|
||||
case BLOCK_SAVE: // Save
|
||||
msg = _( "Block Save" );
|
||||
break;
|
||||
|
||||
|
@ -87,20 +87,20 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
|
|||
msg = _( "Block Paste" );
|
||||
break;
|
||||
|
||||
case BLOCK_ZOOM: /* Window Zoom */
|
||||
case BLOCK_ZOOM: // Window Zoom
|
||||
msg = _( "Win Zoom" );
|
||||
break;
|
||||
|
||||
case BLOCK_ROTATE: /* Rotate 90 deg */
|
||||
case BLOCK_ROTATE: // Rotate 90 deg
|
||||
msg = _( "Block Rotate" );
|
||||
break;
|
||||
|
||||
case BLOCK_FLIP: /* Flip */
|
||||
case BLOCK_FLIP: // Flip
|
||||
msg = _( "Block Flip" );
|
||||
break;
|
||||
|
||||
case BLOCK_MIRROR_X:
|
||||
case BLOCK_MIRROR_Y: /* mirror */
|
||||
case BLOCK_MIRROR_Y: // mirror
|
||||
msg = _( "Block Mirror" );
|
||||
break;
|
||||
|
||||
|
@ -185,15 +185,15 @@ void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoin
|
|||
if( aErase )
|
||||
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||
|
||||
block->SetLastCursorPosition( aPanel->GetScreen()->GetCrossHairPosition() );
|
||||
block->SetEnd( aPanel->GetScreen()->GetCrossHairPosition() );
|
||||
block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||
block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() );
|
||||
|
||||
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||
|
||||
if( block->GetState() == STATE_BLOCK_INIT )
|
||||
{
|
||||
if( block->GetWidth() || block->GetHeight() )
|
||||
/* 2nd point exists: the rectangle is not surface anywhere */
|
||||
// 2nd point exists: the rectangle is not surface anywhere
|
||||
block->SetState( STATE_BLOCK_END );
|
||||
}
|
||||
}
|
||||
|
@ -203,14 +203,14 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
|||
{
|
||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
||||
|
||||
if( aPanel->IsMouseCaptured() ) /* Erase current drawing on screen */
|
||||
if( aPanel->IsMouseCaptured() ) // Erase current drawing on screen
|
||||
{
|
||||
/* Clear block outline. */
|
||||
// Clear block outline.
|
||||
aPanel->CallMouseCapture( aDC, wxDefaultPosition, false );
|
||||
aPanel->SetMouseCapture( NULL, NULL );
|
||||
screen->SetCurItem( NULL );
|
||||
|
||||
/* Delete the picked wrapper if this is a picked list. */
|
||||
// Delete the picked wrapper if this is a picked list.
|
||||
if( screen->m_BlockLocate.GetCommand() != BLOCK_PASTE )
|
||||
screen->m_BlockLocate.ClearItemsList();
|
||||
}
|
||||
|
|
|
@ -10,15 +10,10 @@
|
|||
#endif
|
||||
|
||||
|
||||
#if defined KICAD_TESTING_VERSION
|
||||
# define VERSION_STABILITY "testing"
|
||||
#elif defined KICAD_STABLE_VERSION
|
||||
#if defined KICAD_STABLE_VERSION
|
||||
# define VERSION_STABILITY "stable"
|
||||
#else
|
||||
# define VERSION_STABILITY "unknown"
|
||||
# warning "unknown version stability"
|
||||
# warning "please: when running CMAKE, add -DKICAD_TESTING_VERSION=ON"
|
||||
# warning "or -DKICAD_STABLE_VERSION=ON option"
|
||||
# define VERSION_STABILITY "product"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -27,8 +22,11 @@
|
|||
*/
|
||||
wxString GetBuildVersion()
|
||||
{
|
||||
static wxString msg;
|
||||
msg.Printf( wxT("%s-%s"),
|
||||
wxT( KICAD_BUILD_VERSION ), wxT( VERSION_STABILITY ));
|
||||
wxString msg = wxString::Format(
|
||||
wxT( "%s-%s" ),
|
||||
wxT( KICAD_BUILD_VERSION ),
|
||||
wxT( VERSION_STABILITY )
|
||||
);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
|||
info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) );
|
||||
|
||||
/* Copyright information */
|
||||
info.SetCopyright( wxT( "(C) 1992-2012 KiCad Developers Team" ) );
|
||||
info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) );
|
||||
|
||||
/* KiCad build version */
|
||||
wxString version;
|
||||
|
@ -203,98 +203,109 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
|||
* which should be represented by the same icon.
|
||||
*/
|
||||
|
||||
/* The developers */
|
||||
info.AddDeveloper( new Contributor( wxT( "Jean-Pierre Charras" ),
|
||||
wxT( "jp.charras@wanadoo.fr" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Jerry Jacobs" ),
|
||||
wxT( "xor.gate.engineering@gmail.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "KBool Library" ),
|
||||
wxT( "http://boolean.klaasholwerda.nl/bool.html" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Marco Serantoni" ),
|
||||
wxT( "marco.serantoni@gmail.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Miguel Angel Ajo Pelayo" ),
|
||||
wxT( "miguelangel@nbee.es" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Rafael Sokolowski" ),
|
||||
wxT( "rafael.sokolowski@web.de" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) );
|
||||
info.AddDeveloper( new Contributor( wxT( "Wayne Stambaugh" ),
|
||||
wxT( "stambaughw@verizon.net" ) ) );
|
||||
// The developers
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Wayne Stambaugh" ), wxT( "stambaughw@verizon.net" ) ) );
|
||||
|
||||
/* The document writers */
|
||||
info.AddDocWriter( new Contributor( wxT( "Jean-Pierre Charras" ),
|
||||
wxT( "jp.charras@wanadoo.fr" ) ) );
|
||||
info.AddDocWriter( new Contributor( wxT( "Igor Plyatov" ),
|
||||
wxT( "plyatov@gmail.com" ) ) );
|
||||
info.AddDocWriter( new Contributor( wxT( "Fabrizio Tappero" ),
|
||||
wxT( "fabrizio.tappero@gmail.com" ) ) );
|
||||
// alphabetically by last name after main 3 above:
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ) ) );
|
||||
|
||||
/*
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "KBool Library" ), wxT( "http://boolean.klaasholwerda.nl/bool.html" ) ) );
|
||||
*/
|
||||
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Miguel Angel Ajo Pelayo" ),wxT( "miguelangel@nbee.es" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Marco Serantoni" ), wxT( "marco.serantoni@gmail.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Brian Sidebotham" ), wxT( "brian.sidebotham@gmail.com" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ) ) );
|
||||
info.AddDeveloper(
|
||||
new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) );
|
||||
|
||||
// The document writers
|
||||
info.AddDocWriter(
|
||||
new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) );
|
||||
info.AddDocWriter(
|
||||
new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ) ) );
|
||||
info.AddDocWriter(
|
||||
new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ) ) );
|
||||
|
||||
/* The translators
|
||||
* As category the language to which the translation was done is used
|
||||
* and as icon the national flag of the corresponding country.
|
||||
*/
|
||||
info.AddTranslator( new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ),
|
||||
wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Jerry Jacobs" ),
|
||||
wxT( "xor.gate.engineering@gmail.com" ), wxT( "Dutch (NL)" ),
|
||||
KiBitmapNew( lang_nl_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ),
|
||||
wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Jean-Pierre Charras" ),
|
||||
wxT( "jp.charras@wanadoo.fr" ),
|
||||
wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ),
|
||||
wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ),
|
||||
wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ),
|
||||
wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ),
|
||||
wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ),
|
||||
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ),
|
||||
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Rafael Sokolowski" ),
|
||||
wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ),
|
||||
KiBitmapNew( lang_de_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Kenta Yonekura" ),
|
||||
wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ),
|
||||
KiBitmapNew( lang_jp_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
|
||||
wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ),
|
||||
KiBitmapNew( lang_gr_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Massimo Cioce" ),
|
||||
wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ),
|
||||
KiBitmapNew( lang_it_xpm ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Evgeniy Ivanov" ),
|
||||
wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ),
|
||||
KiBitmapNew( lang_bg_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ), wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ),wxT( "Dutch (NL)" ), KiBitmapNew( lang_nl_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ), wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ), wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ), wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ), KiBitmapNew( lang_de_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Kenta Yonekura" ), wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ), KiBitmapNew( lang_jp_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
|
||||
wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ), KiBitmapNew( lang_gr_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Massimo Cioce" ), wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ), KiBitmapNew( lang_it_xpm ) ) );
|
||||
info.AddTranslator(
|
||||
new Contributor( wxT( "Evgeniy Ivanov" ), wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ),KiBitmapNew( lang_bg_xpm ) ) );
|
||||
|
||||
// TODO: are these all russian translators,
|
||||
// placed them here now,
|
||||
// or else align them below other language maintainer with mail adress
|
||||
info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "David Briscoe" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "David Briscoe" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) );
|
||||
|
||||
/* Programm credits for icons */
|
||||
info.AddArtist( new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ),
|
||||
wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ),
|
||||
wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ),
|
||||
wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
||||
info.AddArtist( new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ),
|
||||
wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
||||
// Programm credits for icons
|
||||
info.AddArtist(
|
||||
new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist(
|
||||
new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ), wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
||||
info.AddArtist(
|
||||
new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
||||
info.AddArtist(
|
||||
new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="10" />
|
||||
<FileVersion major="1" minor="11" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="class_decoration" />
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
|
@ -14,73 +14,73 @@
|
|||
<property name="help_provider">none</property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">MyProject</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="namespace" />
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="precompiled_header" />
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="center"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="center" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="extra_style" />
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">dialog_about_base</property>
|
||||
<property name="pos"></property>
|
||||
<property name="pos" />
|
||||
<property name="size">750,450</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="subclass" />
|
||||
<property name="title">About...</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnChar"></event>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<event name="OnActivate" />
|
||||
<event name="OnActivateApp" />
|
||||
<event name="OnChar" />
|
||||
<event name="OnClose">OnClose</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnHibernate" />
|
||||
<event name="OnIconize" />
|
||||
<event name="OnIdle" />
|
||||
<event name="OnInitDialog" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size" />
|
||||
<property name="name">bSizer1</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size" />
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
|
@ -108,53 +108,53 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBitmap" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="bitmap" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_bitmapApp</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -162,7 +162,7 @@
|
|||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">10</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size" />
|
||||
<property name="name">b_apptitleSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
|
@ -171,55 +171,55 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="fg" />
|
||||
<property name="font">,90,92,14,70,0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">App Title</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_staticTextAppTitle</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -227,55 +227,55 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Copyright Info</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_staticTextCopyright</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -283,55 +283,55 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Build Version Info</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_staticTextBuildVersion</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -339,55 +339,55 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Lib Version Info</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_staticTextLibVersion</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxALIGN_CENTRE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -409,53 +409,53 @@
|
|||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_staticline1</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -463,63 +463,63 @@
|
|||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="proportion">2</property>
|
||||
<object class="wxAuiNotebook" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size">750,350</property>
|
||||
<property name="name">m_auiNotebook</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style">wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="subclass" />
|
||||
<property name="tab_ctrl_height">-1</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="uniform_bitmap_size"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="tooltip" />
|
||||
<property name="uniform_bitmap_size" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAuiNotebookAllowDND"></event>
|
||||
<event name="OnAuiNotebookBeginDrag"></event>
|
||||
<event name="OnAuiNotebookButton"></event>
|
||||
<event name="OnAuiNotebookDragMotion"></event>
|
||||
<event name="OnAuiNotebookEndDrag"></event>
|
||||
<event name="OnAuiNotebookPageChanged"></event>
|
||||
<event name="OnAuiNotebookPageChanging"></event>
|
||||
<event name="OnAuiNotebookPageClose"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<event name="OnAuiNotebookAllowDND" />
|
||||
<event name="OnAuiNotebookBeginDrag" />
|
||||
<event name="OnAuiNotebookButton" />
|
||||
<event name="OnAuiNotebookDragMotion" />
|
||||
<event name="OnAuiNotebookEndDrag" />
|
||||
<event name="OnAuiNotebookPageChanged" />
|
||||
<event name="OnAuiNotebookPageChanging" />
|
||||
<event name="OnAuiNotebookPageClose" />
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
|
@ -527,56 +527,56 @@
|
|||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="bg" />
|
||||
<property name="context_help" />
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="fg" />
|
||||
<property name="font" />
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_CANCEL</property>
|
||||
<property name="label">OK</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="maximum_size" />
|
||||
<property name="minimum_size" />
|
||||
<property name="name">m_buttonOK</property>
|
||||
<property name="permission">private</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="pos" />
|
||||
<property name="size" />
|
||||
<property name="style" />
|
||||
<property name="subclass" />
|
||||
<property name="tooltip" />
|
||||
<property name="validator_data_type" />
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="validator_variable" />
|
||||
<property name="window_extra_style" />
|
||||
<property name="window_name" />
|
||||
<property name="window_style" />
|
||||
<event name="OnButtonClick">OnOkClick</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<event name="OnChar" />
|
||||
<event name="OnEnterWindow" />
|
||||
<event name="OnEraseBackground" />
|
||||
<event name="OnKeyDown" />
|
||||
<event name="OnKeyUp" />
|
||||
<event name="OnKillFocus" />
|
||||
<event name="OnLeaveWindow" />
|
||||
<event name="OnLeftDClick" />
|
||||
<event name="OnLeftDown" />
|
||||
<event name="OnLeftUp" />
|
||||
<event name="OnMiddleDClick" />
|
||||
<event name="OnMiddleDown" />
|
||||
<event name="OnMiddleUp" />
|
||||
<event name="OnMotion" />
|
||||
<event name="OnMouseEvents" />
|
||||
<event name="OnMouseWheel" />
|
||||
<event name="OnPaint" />
|
||||
<event name="OnRightDClick" />
|
||||
<event name="OnRightDown" />
|
||||
<event name="OnRightUp" />
|
||||
<event name="OnSetFocus" />
|
||||
<event name="OnSize" />
|
||||
<event name="OnUpdateUI" />
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <wxstruct.h>
|
||||
#include <worksheet_shape_builder.h>
|
||||
#include <class_base_screen.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#include <wx/valgen.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
@ -125,8 +126,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
|
|||
}
|
||||
|
||||
// initialize the page layout descr filename
|
||||
m_plDescrFileName = BASE_SCREEN::m_PageLayoutDescrFileName;
|
||||
m_filePicker->SetPath( m_plDescrFileName );
|
||||
SetWksFileName( BASE_SCREEN::m_PageLayoutDescrFileName );
|
||||
|
||||
|
||||
#ifdef EESCHEMA
|
||||
|
@ -401,13 +401,13 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
|
|||
{
|
||||
bool retSuccess = false;
|
||||
|
||||
m_plDescrFileName = m_filePicker->GetPath();
|
||||
wxString fileName = GetWksFileName();
|
||||
|
||||
if( m_plDescrFileName != BASE_SCREEN::m_PageLayoutDescrFileName )
|
||||
if( fileName != BASE_SCREEN::m_PageLayoutDescrFileName )
|
||||
{
|
||||
if( !m_plDescrFileName.IsEmpty() )
|
||||
if( !fileName.IsEmpty() )
|
||||
{
|
||||
wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( m_plDescrFileName );
|
||||
wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( fileName );
|
||||
if( !wxFileExists( fullFileName ) )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -418,26 +418,9 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
|
|||
}
|
||||
}
|
||||
|
||||
// Try to remove the path, if the path is the current working dir,
|
||||
// or the dir of kicad.pro (template)
|
||||
wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( m_plDescrFileName );
|
||||
wxFileName fn = shortFileName;
|
||||
|
||||
// For Win/Linux/macOS compatibility, a relative path is a good idea
|
||||
if( fn.IsAbsolute() )
|
||||
{
|
||||
fn.MakeRelativeTo( wxGetCwd() );
|
||||
wxString msg;
|
||||
msg.Printf( _( "The page layout descr filename has changed\n"
|
||||
"Do you want to use the relative path:\n%s"),
|
||||
fn.GetFullPath().GetData() );
|
||||
if( IsOK( this, msg ) )
|
||||
shortFileName = fn.GetFullPath();
|
||||
}
|
||||
|
||||
BASE_SCREEN::m_PageLayoutDescrFileName = shortFileName;
|
||||
BASE_SCREEN::m_PageLayoutDescrFileName = fileName;
|
||||
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
|
||||
pglayout.SetPageLayout( shortFileName );
|
||||
pglayout.SetPageLayout( fileName );
|
||||
m_localPrjConfigChanged = true;
|
||||
}
|
||||
|
||||
|
@ -793,7 +776,35 @@ void DIALOG_PAGES_SETTINGS::GetCustomSizeMilsFromDialog()
|
|||
}
|
||||
|
||||
// Called on .kicad_wks file description selection change
|
||||
void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxFileDirPickerEvent& event )
|
||||
void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
|
||||
{
|
||||
// Currently: Nothing to do.
|
||||
// Display a file picker dialog
|
||||
wxFileDialog fileDialog( this, _( "Select Page Layout Descr File" ),
|
||||
wxGetCwd(), GetWksFileName(),
|
||||
PageLayoutDescrFileWildcard,
|
||||
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
if( fileDialog.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
wxString fileName = fileDialog.GetPath();
|
||||
|
||||
// Try to remove the path, if the path is the current working dir,
|
||||
// or the dir of kicad.pro (template)
|
||||
wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( fileName );
|
||||
wxFileName fn = shortFileName;
|
||||
|
||||
// For Win/Linux/macOS compatibility, a relative path is a good idea
|
||||
if( fn.IsAbsolute() && fileName != GetWksFileName() )
|
||||
{
|
||||
fn.MakeRelativeTo( wxGetCwd() );
|
||||
wxString msg;
|
||||
msg.Printf( _( "The page layout descr filename has changed\n"
|
||||
"Do you want to use the relative path:\n%s"),
|
||||
fn.GetFullPath().GetData() );
|
||||
if( IsOK( this, msg ) )
|
||||
shortFileName = fn.GetFullPath();
|
||||
}
|
||||
|
||||
SetWksFileName( shortFileName );
|
||||
}
|
||||
|
|
|
@ -45,9 +45,6 @@ private:
|
|||
PAGE_INFO m_pageInfo; /// Temporary page info.
|
||||
bool m_customFmt; /// true if the page selection is custom
|
||||
TITLE_BLOCK m_tb; /// Temporary title block (basic inscriptions).
|
||||
wxString m_plDescrFileName; /// Temporary BASE_SCREEN::m_PageLayoutDescrFileName copy
|
||||
|
||||
|
||||
|
||||
public:
|
||||
DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
|
||||
|
@ -55,24 +52,23 @@ public:
|
|||
|
||||
const wxString GetWksFileName()
|
||||
{
|
||||
return m_filePicker->GetPath();
|
||||
return m_textCtrlFilePicker->GetValue();
|
||||
}
|
||||
|
||||
void SetWksFileName(const wxString& aFilename )
|
||||
{
|
||||
m_filePicker->SetPath( aFilename );
|
||||
m_textCtrlFilePicker->SetValue( aFilename );
|
||||
}
|
||||
|
||||
void EnableWksFileNamePicker( bool aEnable )
|
||||
{
|
||||
m_filePicker->Enable( aEnable );
|
||||
m_textCtrlFilePicker->Enable( aEnable );
|
||||
m_buttonBrowse->Enable( aEnable );
|
||||
}
|
||||
|
||||
private:
|
||||
void initDialog(); // Initialisation of member variables
|
||||
|
||||
// void OnCloseWindow( wxCloseEvent& event );
|
||||
|
||||
// event handler for wxID_OK
|
||||
void OnOkClick( wxCommandEvent& event );
|
||||
|
||||
|
@ -99,7 +95,7 @@ private:
|
|||
void OnDateApplyClick( wxCommandEvent& event );
|
||||
|
||||
// .kicad_wks file description selection
|
||||
void OnWksFileSelection( wxFileDirPickerEvent& event );
|
||||
void OnWksFileSelection( wxCommandEvent& event );
|
||||
|
||||
// Save in the current title block the new page settings
|
||||
// return true if changes are made, or false if not
|
||||
|
|
|
@ -350,8 +350,11 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
wxBoxSizer* bSizerfileSelection;
|
||||
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.kicad_wks"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN|wxFLP_USE_TEXTCTRL );
|
||||
bSizerfileSelection->Add( m_filePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||
bSizerfileSelection->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 );
|
||||
|
@ -393,7 +396,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind
|
|||
m_TextComment2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
|
||||
m_TextComment3->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
|
||||
m_TextComment4->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
|
||||
m_filePicker->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
|
||||
}
|
||||
|
@ -415,7 +418,7 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE()
|
|||
m_TextComment2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this );
|
||||
m_TextComment3->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this );
|
||||
m_TextComment4->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this );
|
||||
m_filePicker->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this );
|
||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
|
||||
|
||||
|
|
|
@ -4235,9 +4235,9 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxFilePickerCtrl" expanded="1">
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -4268,12 +4268,12 @@
|
|||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="message">Select a file</property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_filePicker</property>
|
||||
<property name="name">m_textCtrlFilePicker</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -4283,7 +4283,7 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxFLP_OPEN|wxFLP_USE_TEXTCTRL</property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
|
@ -4292,14 +4292,104 @@
|
|||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="wildcard">*.kicad_wks</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnFileChanged">OnWksFileSelection</event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Browse</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonBrowse</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxBU_EXACTFIT</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnWksFileSelection</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
|
|
|
@ -33,7 +33,6 @@ class DIALOG_SHIM;
|
|||
#include <wx/datectrl.h>
|
||||
#include <wx/dateevt.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/filepicker.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -113,7 +112,8 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
wxTextCtrl* m_TextComment4;
|
||||
wxCheckBox* m_Comment4Export;
|
||||
wxStaticText* m_staticTextfilename;
|
||||
wxFilePickerCtrl* m_filePicker;
|
||||
wxTextCtrl* m_textCtrlFilePicker;
|
||||
wxButton* m_buttonBrowse;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
@ -133,7 +133,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
|||
virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnComment4TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnWksFileSelection( wxFileDirPickerEvent& event ) { event.Skip(); }
|
||||
virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
|
|
@ -118,26 +118,18 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent,
|
|||
m_snapToGrid = true;
|
||||
m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
|
||||
|
||||
|
||||
//#define ZOOM_DISPLAY_SIZE 60
|
||||
//#define COORD_DISPLAY_SIZE 165
|
||||
//#define DELTA_DISPLAY_SIZE 245
|
||||
//#define UNITS_DISPLAY_SIZE 65
|
||||
#define FUNCTION_DISPLAY_SIZE 110
|
||||
|
||||
CreateStatusBar( 6 );
|
||||
|
||||
// set the size of the status bar subwindows:
|
||||
|
||||
wxWindow* stsbar = GetStatusBar();
|
||||
|
||||
|
||||
int dims[] = {
|
||||
|
||||
// balance of status bar on far left is set to a default or whatever is left over.
|
||||
// remainder of status bar on far left is set to a default or whatever is left over.
|
||||
-1,
|
||||
|
||||
// When using GetTextSize() remember the width of '1' is not the same
|
||||
// When using GetTextSize() remember the width of character '1' is not the same
|
||||
// as the width of '0' unless the font is fixed width, and it usually won't be.
|
||||
|
||||
// zoom:
|
||||
|
@ -152,7 +144,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent,
|
|||
// units display, Inches is bigger than mm
|
||||
GetTextSize( _( "Inches" ), stsbar ).x + 10,
|
||||
|
||||
FUNCTION_DISPLAY_SIZE,
|
||||
// Size for the panel used as "Current tool in play": will take longest string from
|
||||
// void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) in pcbnew/edit.cpp
|
||||
GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x + 10,
|
||||
};
|
||||
|
||||
SetStatusWidths( DIM( dims ), dims );
|
||||
|
@ -234,7 +228,6 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
|
|||
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
|
||||
{
|
||||
SetGridVisibility( !IsGridVisible() );
|
||||
|
||||
if( m_galCanvasActive )
|
||||
{
|
||||
m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||
|
@ -392,7 +385,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
|
|||
*/
|
||||
m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
|
||||
screen->SetGrid( id );
|
||||
screen->SetCrossHairPosition( screen->RefPos( true ) );
|
||||
SetCrossHairPosition( RefPos( true ) );
|
||||
|
||||
if( m_galCanvasActive )
|
||||
{
|
||||
|
@ -442,7 +435,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
|
|||
m_galCanvas->Refresh();
|
||||
}
|
||||
else
|
||||
RedrawScreen( GetScreen()->GetScrollCenterPosition(), false );
|
||||
RedrawScreen( GetScrollCenterPosition(), false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -528,7 +521,7 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const
|
|||
wxPoint pos = aPosition;
|
||||
|
||||
if( m_currentScreen != NULL && m_snapToGrid )
|
||||
pos = m_currentScreen->GetNearestGridPosition( aPosition );
|
||||
pos = GetNearestGridPosition( aPosition );
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
@ -759,12 +752,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
|||
{
|
||||
BASE_SCREEN* screen = GetScreen();
|
||||
|
||||
if( screen == NULL || m_canvas == NULL )
|
||||
if( !screen || !m_canvas )
|
||||
return;
|
||||
|
||||
// There are no safety limits on these calculations, so in NANOMETRES build it
|
||||
// still blows up. This is incomplete work.
|
||||
|
||||
double scale = screen->GetScalingFactor();
|
||||
|
||||
wxLogTrace( traceScrollSettings, wxT( "Center Position = ( %d, %d ), scale = %.10g" ),
|
||||
|
@ -797,7 +787,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
|||
DBOX clientRectIU( wxPoint( xIU, yIU ), wxSize( clientSizeIU.x, clientSizeIU.y ) );
|
||||
wxPoint centerPositionIU;
|
||||
|
||||
#if 1 || defined( USE_PCBNEW_NANOMETRES )
|
||||
// put "int" limits on the clientRect
|
||||
if( clientRectIU.GetLeft() < VIRT_MIN )
|
||||
clientRectIU.MoveLeftTo( VIRT_MIN );
|
||||
|
@ -807,7 +796,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
|||
clientRectIU.MoveRightTo( VIRT_MAX );
|
||||
if( clientRectIU.GetBottom() > VIRT_MAX )
|
||||
clientRectIU.MoveBottomTo( VIRT_MAX );
|
||||
#endif
|
||||
|
||||
centerPositionIU.x = KiROUND( clientRectIU.GetX() + clientRectIU.GetWidth() / 2 );
|
||||
centerPositionIU.y = KiROUND( clientRectIU.GetY() + clientRectIU.GetHeight() / 2 );
|
||||
|
@ -880,11 +868,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
|||
}
|
||||
}
|
||||
|
||||
#if 1 || defined( USE_PCBNEW_NANOMETRES )
|
||||
// put "int" limits on the virtualSizeIU
|
||||
virtualSizeIU.x = std::min( virtualSizeIU.x, MAX_AXIS );
|
||||
virtualSizeIU.y = std::min( virtualSizeIU.y, MAX_AXIS );
|
||||
#endif
|
||||
|
||||
if( screen->m_Center )
|
||||
{
|
||||
|
@ -911,7 +897,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
|||
|
||||
// Calculate the scroll bar position in internal units to place the
|
||||
// center position at the center of client rectangle.
|
||||
screen->SetScrollCenterPosition( centerPositionIU );
|
||||
SetScrollCenterPosition( centerPositionIU );
|
||||
|
||||
double posX = centerPositionIU.x - clientRectIU.GetWidth() / 2.0 - screen->m_DrawOrg.x;
|
||||
double posY = centerPositionIU.y - clientRectIU.GetHeight() / 2.0 - screen->m_DrawOrg.y;
|
||||
|
@ -990,7 +976,7 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
|
|||
// Set up grid settings
|
||||
gal->SetGridVisibility( IsGridVisible() );
|
||||
gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) );
|
||||
gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) );
|
||||
gal->SetGridOrigin( VECTOR2D( GetGridOrigin() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1019,3 +1005,71 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
|
|||
if( aEnable )
|
||||
m_galCanvas->SetFocus();
|
||||
}
|
||||
|
||||
//-----< BASE_SCREEN API moved here >--------------------------------------------
|
||||
|
||||
wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const
|
||||
{
|
||||
// subject to change, borrow from old BASE_SCREEN for now.
|
||||
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getCrossHairPosition( aInvertY );
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid )
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
screen->setCrossHairPosition( aPosition, GetGridOrigin(), aSnapToGrid );
|
||||
}
|
||||
|
||||
|
||||
wxPoint EDA_DRAW_FRAME::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize ) const
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getCursorPosition( aOnGrid, GetGridOrigin(), aGridSize );
|
||||
}
|
||||
|
||||
|
||||
wxPoint EDA_DRAW_FRAME::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize ) const
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getNearestGridPosition( aPosition, GetGridOrigin(), aGridSize );
|
||||
}
|
||||
|
||||
|
||||
wxPoint EDA_DRAW_FRAME::GetCrossHairScreenPosition() const
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getCrossHairScreenPosition();
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::SetMousePosition( const wxPoint& aPosition )
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
screen->setMousePosition( aPosition );
|
||||
}
|
||||
|
||||
|
||||
wxPoint EDA_DRAW_FRAME::RefPos( bool useMouse ) const
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->refPos( useMouse );
|
||||
}
|
||||
|
||||
|
||||
const wxPoint& EDA_DRAW_FRAME::GetScrollCenterPosition() const
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getScrollCenterPosition();
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::SetScrollCenterPosition( const wxPoint& aPoint )
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
screen->setScrollCenterPosition( aPoint );
|
||||
}
|
||||
|
||||
//-----</BASE_SCREEN API moved here >--------------------------------------------
|
||||
|
|
|
@ -153,9 +153,11 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
|
|||
wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
|
||||
}
|
||||
|
||||
|
||||
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
|
||||
{
|
||||
return ( EDA_DRAW_FRAME* ) wxWindow::GetParent();
|
||||
wxWindow* mom = wxScrolledWindow::GetParent();
|
||||
return (EDA_DRAW_FRAME*) mom;
|
||||
}
|
||||
|
||||
|
||||
|
@ -189,7 +191,7 @@ void EDA_DRAW_PANEL::DrawCrossHair( wxDC* aDC, EDA_COLOR_T aColor )
|
|||
if( m_cursorLevel != 0 || aDC == NULL || !m_showCrossHair )
|
||||
return;
|
||||
|
||||
wxPoint cursor = GetScreen()->GetCrossHairPosition();
|
||||
wxPoint cursor = GetParent()->GetCrossHairPosition();
|
||||
|
||||
GRSetDrawMode( aDC, GR_XOR );
|
||||
|
||||
|
@ -305,7 +307,7 @@ wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition()
|
|||
|
||||
void EDA_DRAW_PANEL::MoveCursorToCrossHair()
|
||||
{
|
||||
MoveCursor( GetScreen()->GetCrossHairPosition() );
|
||||
MoveCursor( GetParent()->GetCrossHairPosition() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -441,10 +443,10 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
|
|||
|
||||
double scale = GetParent()->GetScreen()->GetScalingFactor();
|
||||
|
||||
wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition();
|
||||
wxPoint center = GetParent()->GetScrollCenterPosition();
|
||||
center.x += KiROUND( (double) ( x - tmpX ) / scale );
|
||||
center.y += KiROUND( (double) ( y - tmpY ) / scale );
|
||||
GetParent()->GetScreen()->SetScrollCenterPosition( center );
|
||||
GetParent()->SetScrollCenterPosition( center );
|
||||
|
||||
Scroll( x, y );
|
||||
event.Skip();
|
||||
|
@ -617,7 +619,7 @@ void EDA_DRAW_PANEL::DrawBackGround( wxDC* DC )
|
|||
DrawAuxiliaryAxis( DC, GR_COPY );
|
||||
|
||||
if( GetParent()->m_showGridAxis )
|
||||
DrawGridAxis( DC, GR_COPY );
|
||||
DrawGridAxis( DC, GR_COPY, GetParent()->GetGridOrigin() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -653,7 +655,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC )
|
|||
if( screenGridSize.x < MIN_GRID_SIZE || screenGridSize.y < MIN_GRID_SIZE )
|
||||
return;
|
||||
|
||||
org = screen->GetNearestGridPosition( org, &gridSize );
|
||||
org = GetParent()->GetNearestGridPosition( org, &gridSize );
|
||||
|
||||
// Setting the nearest grid position can select grid points outside the clip box.
|
||||
// Incrementing the start point by one grid step should prevent drawing grid points
|
||||
|
@ -748,7 +750,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC )
|
|||
|
||||
void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, GR_DRAWMODE aDrawMode )
|
||||
{
|
||||
wxPoint origin = GetParent()->GetOriginAxisPosition();
|
||||
wxPoint origin = GetParent()->GetAuxOrigin();
|
||||
|
||||
if( origin == wxPoint( 0, 0 ) )
|
||||
return;
|
||||
|
@ -776,33 +778,30 @@ void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, GR_DRAWMODE aDrawMode )
|
|||
}
|
||||
|
||||
|
||||
void EDA_DRAW_PANEL::DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode )
|
||||
void EDA_DRAW_PANEL::DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aGridOrigin )
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen();
|
||||
|
||||
if( !GetParent()->m_showGridAxis
|
||||
|| ( screen->m_GridOrigin.x == 0 && screen->m_GridOrigin.y == 0 ) )
|
||||
if( !GetParent()->m_showGridAxis || ( !aGridOrigin.x && !aGridOrigin.y ) )
|
||||
return;
|
||||
|
||||
EDA_COLOR_T color = GetParent()->GetGridColor();
|
||||
wxSize pageSize = GetParent()->GetPageSizeIU();
|
||||
EDA_COLOR_T color = GetParent()->GetGridColor();
|
||||
wxSize pageSize = GetParent()->GetPageSizeIU();
|
||||
|
||||
GRSetDrawMode( aDC, aDrawMode );
|
||||
|
||||
// Draw the Y axis
|
||||
GRDashedLine( &m_ClipBox, aDC,
|
||||
screen->m_GridOrigin.x,
|
||||
aGridOrigin.x,
|
||||
-pageSize.y,
|
||||
screen->m_GridOrigin.x,
|
||||
aGridOrigin.x,
|
||||
pageSize.y,
|
||||
0, color );
|
||||
|
||||
// Draw the X axis
|
||||
GRDashedLine( &m_ClipBox, aDC,
|
||||
-pageSize.x,
|
||||
screen->m_GridOrigin.y,
|
||||
aGridOrigin.y,
|
||||
pageSize.x,
|
||||
screen->m_GridOrigin.y,
|
||||
aGridOrigin.y,
|
||||
0, color );
|
||||
}
|
||||
|
||||
|
@ -854,7 +853,7 @@ void EDA_DRAW_PANEL::OnMouseLeaving( wxMouseEvent& event )
|
|||
cross_hair_pos.x = dc.DeviceToLogicalX( cross_hair_pos.x );
|
||||
cross_hair_pos.y = dc.DeviceToLogicalY( cross_hair_pos.y );
|
||||
|
||||
GetScreen()->SetCrossHairPosition( cross_hair_pos );
|
||||
GetParent()->SetCrossHairPosition( cross_hair_pos );
|
||||
|
||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_POPUP_ZOOM_CENTER );
|
||||
cmd.SetEventObject( this );
|
||||
|
@ -884,7 +883,7 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
|||
}
|
||||
|
||||
INSTALL_UNBUFFERED_DC( dc, this );
|
||||
GetScreen()->SetCrossHairPosition( event.GetLogicalPosition( dc ) );
|
||||
GetParent()->SetCrossHairPosition( event.GetLogicalPosition( dc ) );
|
||||
|
||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||
cmd.SetEventObject( this );
|
||||
|
@ -978,7 +977,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
DC.SetBackground( *wxBLACK_BRUSH );
|
||||
|
||||
// Compute the cursor position in drawing (logical) units.
|
||||
screen->SetMousePosition( event.GetLogicalPosition( DC ) );
|
||||
GetParent()->SetMousePosition( event.GetLogicalPosition( DC ) );
|
||||
|
||||
int kbstat = 0;
|
||||
|
||||
|
@ -994,7 +993,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
// Calling Double Click and Click functions :
|
||||
if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) )
|
||||
{
|
||||
GetParent()->OnLeftDClick( &DC, screen->RefPos( true ) );
|
||||
GetParent()->OnLeftDClick( &DC, GetParent()->RefPos( true ) );
|
||||
|
||||
// inhibit a response to the mouse left button release,
|
||||
// because we have a double click, and we do not want a new
|
||||
|
@ -1011,7 +1010,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
m_ignoreNextLeftButtonRelease = false;
|
||||
|
||||
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK && !ignoreEvt )
|
||||
GetParent()->OnLeftClick( &DC, screen->RefPos( true ) );
|
||||
GetParent()->OnLeftClick( &DC, GetParent()->RefPos( true ) );
|
||||
|
||||
}
|
||||
else if( !event.LeftIsDown() )
|
||||
|
@ -1035,7 +1034,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
m_PanStartCenter.y *= ppuy;
|
||||
}
|
||||
else
|
||||
m_PanStartCenter = GetParent()->GetScreen()->GetScrollCenterPosition();
|
||||
m_PanStartCenter = GetParent()->GetScrollCenterPosition();
|
||||
|
||||
m_PanStartEventPosition = event.GetPosition();
|
||||
|
||||
|
@ -1109,10 +1108,10 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
|
||||
double scale = GetParent()->GetScreen()->GetScalingFactor();
|
||||
|
||||
wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition();
|
||||
wxPoint center = GetParent()->GetScrollCenterPosition();
|
||||
center.x += KiROUND( (double) ( x - tmpX ) / scale ) / ppux;
|
||||
center.y += KiROUND( (double) ( y - tmpY ) / scale ) / ppuy;
|
||||
GetParent()->GetScreen()->SetScrollCenterPosition( center );
|
||||
GetParent()->SetScrollCenterPosition( center );
|
||||
|
||||
Refresh();
|
||||
Update();
|
||||
|
@ -1172,7 +1171,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
* (a filter creates a delay for the real block command start, and
|
||||
* we must remember this point)
|
||||
*/
|
||||
m_CursorStartPos = screen->GetCrossHairPosition();
|
||||
m_CursorStartPos = GetParent()->GetCrossHairPosition();
|
||||
}
|
||||
|
||||
if( m_enableBlockCommands && !(localbutt & GR_M_DCLICK) )
|
||||
|
@ -1331,15 +1330,13 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
|||
|
||||
INSTALL_UNBUFFERED_DC( DC, this );
|
||||
|
||||
BASE_SCREEN* Screen = GetScreen();
|
||||
|
||||
// Some key commands use the current mouse position: refresh it.
|
||||
pos = wxGetMousePosition() - GetScreenPosition();
|
||||
|
||||
// Compute the cursor position in drawing units. Also known as logical units to wxDC.
|
||||
pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );
|
||||
Screen->SetMousePosition( pos );
|
||||
|
||||
GetParent()->SetMousePosition( pos );
|
||||
GetParent()->GeneralControl( &DC, pos, localkey );
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
using namespace KiGfx;
|
||||
|
||||
|
||||
const double STROKE_FONT::LINE_HEIGHT_RATIO = 1.6;
|
||||
|
||||
|
||||
STROKE_FONT::STROKE_FONT( GAL* aGal ) :
|
||||
m_gal( aGal ),
|
||||
m_bold( false ),
|
||||
|
|
|
@ -462,6 +462,43 @@ void WORKSHEET_DATAITEM_TEXT::IncrementLabel( int aIncr )
|
|||
m_FullText << (wxChar) ( aIncr + lbchar );
|
||||
}
|
||||
|
||||
// Replace the '\''n' sequence by EOL
|
||||
// and the sequence '\''\' by only one '\' in m_FullText
|
||||
// if m_FullTextis a multiline text (i;e.contains '\n') return true
|
||||
bool WORKSHEET_DATAITEM_TEXT::ReplaceAntiSlashSequence()
|
||||
{
|
||||
bool multiline = false;
|
||||
|
||||
for( unsigned ii = 0; ii < m_FullText.Len(); ii++ )
|
||||
{
|
||||
if( m_FullText[ii] == '\n' )
|
||||
multiline = true;
|
||||
|
||||
else if( m_FullText[ii] == '\\' )
|
||||
{
|
||||
if( ++ii >= m_FullText.Len() )
|
||||
break;
|
||||
|
||||
if( m_FullText[ii] == '\\' )
|
||||
{
|
||||
// a double \\ sequence is replaced by a single \ char
|
||||
m_FullText.Remove(ii, 1);
|
||||
ii--;
|
||||
}
|
||||
else if( m_FullText[ii] == 'n' )
|
||||
{
|
||||
// Replace the "\n" sequence by a EOL char
|
||||
multiline = true;
|
||||
m_FullText[ii] = '\n';
|
||||
m_FullText.Remove(ii-1, 1);
|
||||
ii--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return multiline;
|
||||
}
|
||||
|
||||
void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
|
||||
{
|
||||
m_ConstrainedTextSize = m_TextSize;
|
||||
|
@ -501,3 +538,4 @@ void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
|
|||
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,8 +152,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
|
|||
else
|
||||
{
|
||||
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
|
||||
if( wsText->m_FullText.Replace( wxT("\\n" ), wxT("\n") ) > 0 )
|
||||
multilines = true;
|
||||
multilines = wsText->ReplaceAntiSlashSequence();
|
||||
}
|
||||
|
||||
if( wsText->m_FullText.IsEmpty() )
|
||||
|
|
|
@ -76,6 +76,7 @@ fp_poly
|
|||
fp_text
|
||||
full
|
||||
general
|
||||
grid_origin
|
||||
gr_arc
|
||||
gr_circle
|
||||
gr_curve
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <macros.h>
|
||||
#include <reporter.h>
|
||||
|
||||
|
||||
REPORTER& REPORTER::Report( const char* aText )
|
||||
{
|
||||
Report( FROM_UTF8( aText ) );
|
||||
|
|
|
@ -136,8 +136,8 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
|||
msg << aTextbase[ii];
|
||||
continue;
|
||||
}
|
||||
ii++;
|
||||
if( ii >= aTextbase.Len() )
|
||||
|
||||
if( ++ii >= aTextbase.Len() )
|
||||
break;
|
||||
|
||||
wxChar format = aTextbase[ii];
|
||||
|
@ -174,7 +174,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
|||
|
||||
case 'F':
|
||||
{
|
||||
wxFileName fn( *m_fileName );
|
||||
wxFileName fn( m_fileName );
|
||||
msg += fn.GetFullName();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -59,7 +59,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
|
|||
void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
|
||||
{
|
||||
wxPoint dPos = posBefore - m_canvas->GetClientSize() / 2; // relative screen position to center before zoom
|
||||
wxPoint newScreenPos = m_canvas->ToDeviceXY( GetScreen()->GetCrossHairPosition() ); // screen position of crosshair after zoom
|
||||
wxPoint newScreenPos = m_canvas->ToDeviceXY( GetCrossHairPosition() ); // screen position of crosshair after zoom
|
||||
wxPoint newCenter = m_canvas->ToLogicalXY( newScreenPos - dPos );
|
||||
|
||||
AdjustScrollBars( newCenter );
|
||||
|
@ -91,10 +91,10 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
|
|||
screen->SetScalingFactor( bestzoom );
|
||||
|
||||
if( screen->m_FirstRedraw )
|
||||
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
|
||||
SetCrossHairPosition( GetScrollCenterPosition() );
|
||||
|
||||
if( !m_galCanvasActive )
|
||||
RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer );
|
||||
RedrawScreen( GetScrollCenterPosition(), aWarpPointer );
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,19 +132,19 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
|
|||
int id = event.GetId();
|
||||
bool zoom_at_cursor = false;
|
||||
BASE_SCREEN* screen = GetScreen();
|
||||
wxPoint center = screen->GetScrollCenterPosition();
|
||||
wxPoint center = GetScrollCenterPosition();
|
||||
|
||||
switch( id )
|
||||
{
|
||||
case ID_OFFCENTER_ZOOM_IN:
|
||||
center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() );
|
||||
center = m_canvas->ToDeviceXY( GetCrossHairPosition() );
|
||||
if( screen->SetPreviousZoom() )
|
||||
RedrawScreen2( center );
|
||||
break;
|
||||
|
||||
case ID_POPUP_ZOOM_IN:
|
||||
zoom_at_cursor = true;
|
||||
center = screen->GetCrossHairPosition();
|
||||
center = GetCrossHairPosition();
|
||||
|
||||
// fall thru
|
||||
case ID_ZOOM_IN:
|
||||
|
@ -153,14 +153,14 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_OFFCENTER_ZOOM_OUT:
|
||||
center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() );
|
||||
center = m_canvas->ToDeviceXY( GetCrossHairPosition() );
|
||||
if( screen->SetNextZoom() )
|
||||
RedrawScreen2( center );
|
||||
break;
|
||||
|
||||
case ID_POPUP_ZOOM_OUT:
|
||||
zoom_at_cursor = true;
|
||||
center = screen->GetCrossHairPosition();
|
||||
center = GetCrossHairPosition();
|
||||
|
||||
// fall thru
|
||||
case ID_ZOOM_OUT:
|
||||
|
@ -173,7 +173,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_POPUP_ZOOM_CENTER:
|
||||
center = screen->GetCrossHairPosition();
|
||||
center = GetCrossHairPosition();
|
||||
RedrawScreen( center, true );
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
add_definitions(-DCVPCB)
|
||||
add_definitions( -DCVPCB )
|
||||
|
||||
###
|
||||
# Includes
|
||||
###
|
||||
|
||||
include_directories(BEFORE ${INC_BEFORE})
|
||||
include_directories( BEFORE ${INC_BEFORE} )
|
||||
include_directories(
|
||||
./dialogs
|
||||
${Boost_INCLUDE_DIR}
|
||||
../3d-viewer
|
||||
../pcbnew
|
||||
../polygon
|
||||
|
@ -18,14 +17,14 @@ include_directories(
|
|||
###
|
||||
# Sources
|
||||
###
|
||||
set(CVPCB_DIALOGS
|
||||
set( CVPCB_DIALOGS
|
||||
dialogs/dialog_cvpcb_config.cpp
|
||||
dialogs/dialog_cvpcb_config_fbp.cpp
|
||||
dialogs/dialog_display_options.cpp
|
||||
dialogs/dialog_display_options_base.cpp
|
||||
)
|
||||
|
||||
set(CVPCB_SRCS
|
||||
set( CVPCB_SRCS
|
||||
../common/base_units.cpp
|
||||
../pcbnew/board_items_to_polygon_shape_transform.cpp
|
||||
../pcbnew/class_drc_item.cpp
|
||||
|
@ -46,32 +45,35 @@ set(CVPCB_SRCS
|
|||
###
|
||||
# Windows resource file
|
||||
###
|
||||
if(WIN32)
|
||||
if(MINGW)
|
||||
if( WIN32 )
|
||||
if( MINGW )
|
||||
# CVPCB_RESOURCES variable is set by the macro.
|
||||
mingw_resource_compiler(cvpcb)
|
||||
else(MINGW)
|
||||
set(CVPCB_RESOURCES cvpcb.rc)
|
||||
endif(MINGW)
|
||||
endif(WIN32)
|
||||
mingw_resource_compiler( cvpcb )
|
||||
else()
|
||||
set( CVPCB_RESOURCES cvpcb.rc )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###
|
||||
# Apple resource files
|
||||
###
|
||||
if(APPLE)
|
||||
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
|
||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
|
||||
endif(APPLE)
|
||||
if( APPLE )
|
||||
set( CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns )
|
||||
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
|
||||
|
||||
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
|
||||
|
||||
set( MACOSX_BUNDLE_ICON_FILE cvpcb.icns )
|
||||
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb )
|
||||
endif()
|
||||
|
||||
###
|
||||
# Create the cvpcb executable
|
||||
###
|
||||
add_executable(cvpcb WIN32 MACOSX_BUNDLE
|
||||
add_executable( cvpcb WIN32 MACOSX_BUNDLE
|
||||
${CVPCB_SRCS}
|
||||
${CVPCB_DIALOGS}
|
||||
${CVPCB_RESOURCES}
|
||||
|
@ -80,32 +82,30 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE
|
|||
###
|
||||
# Set properties for APPLE on cvpcb target
|
||||
###
|
||||
if(APPLE)
|
||||
set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||
endif(APPLE)
|
||||
if( APPLE )
|
||||
set_target_properties( cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
|
||||
endif()
|
||||
|
||||
###
|
||||
# Link executable target cvpcb with correct libraries
|
||||
###
|
||||
target_link_libraries(cvpcb
|
||||
target_link_libraries( cvpcb
|
||||
3d-viewer
|
||||
pcbcommon
|
||||
pcad2kicadpcb
|
||||
common
|
||||
bitmaps
|
||||
polygon
|
||||
gal
|
||||
${wxWidgets_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
${GLEW_LIBRARIES}
|
||||
${CAIRO_LIBRARIES}
|
||||
)
|
||||
|
||||
target_link_libraries(cvpcb
|
||||
gal
|
||||
${GLEW_LIBRARIES}
|
||||
${CAIRO_LIBRARIES}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# Only for win32 cross compilation using MXE
|
||||
if(WIN32 AND MSYS)
|
||||
target_link_libraries(cvpcb
|
||||
opengl32
|
||||
glu32
|
||||
|
@ -114,11 +114,12 @@ target_link_libraries(cvpcb
|
|||
freetype
|
||||
bz2
|
||||
)
|
||||
endif(WIN32)
|
||||
endif(WIN32 AND MSYS)
|
||||
|
||||
###
|
||||
# Add cvpcb as install target
|
||||
###
|
||||
install(TARGETS cvpcb
|
||||
DESTINATION ${KICAD_BIN}
|
||||
COMPONENT binary)
|
||||
install( TARGETS cvpcb
|
||||
DESTINATION ${KICAD_BIN}
|
||||
COMPONENT binary
|
||||
)
|
||||
|
|
|
@ -339,8 +339,8 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
|||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||
cmd.SetEventObject( this );
|
||||
|
||||
pos = screen->GetNearestGridPosition( pos );
|
||||
oldpos = screen->GetCrossHairPosition();
|
||||
pos = GetNearestGridPosition( pos );
|
||||
oldpos = GetCrossHairPosition();
|
||||
gridSize = screen->GetGridSize();
|
||||
|
||||
switch( aHotKey )
|
||||
|
@ -371,7 +371,7 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
|||
break;
|
||||
|
||||
case ' ':
|
||||
screen->m_O_Curseur = screen->GetCrossHairPosition();
|
||||
screen->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD8: /* cursor moved up */
|
||||
|
@ -399,14 +399,14 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
|||
break;
|
||||
}
|
||||
|
||||
screen->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
|
||||
if( oldpos != screen->GetCrossHairPosition() )
|
||||
if( oldpos != GetCrossHairPosition() )
|
||||
{
|
||||
pos = screen->GetCrossHairPosition();
|
||||
screen->SetCrossHairPosition( oldpos );
|
||||
pos = GetCrossHairPosition();
|
||||
SetCrossHairPosition( oldpos );
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
screen->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
EESchema-LIBRARY Version 2.3 Date: 18/12/2011 10:04:44
|
||||
EESchema-LIBRARY Version 2.3
|
||||
#encoding utf-8
|
||||
#
|
||||
# 4003APG120
|
||||
#
|
||||
DEF 4003APG120 U 0 40 Y Y 1 F N
|
||||
F0 "U" 0 100 70 H V C CNN
|
||||
F1 "4003APG120" 0 -100 70 H V C CNN
|
||||
F0 "U" 400 2800 70 H V C CNN
|
||||
F1 "4003APG120" 0 -2850 70 H V C CNN
|
||||
F2 "PGA120" 0 -2950 40 H V C CNN
|
||||
F3 "" 400 2800 60 H V C CNN
|
||||
ALIAS 4003PG120
|
||||
DRAW
|
||||
S -800 -2700 800 2700 0 1 0 N
|
||||
|
@ -134,6 +136,8 @@ ENDDEF
|
|||
DEF 628128 U 0 40 Y Y 1 F N
|
||||
F0 "U" 50 0 70 H V C CNN
|
||||
F1 "628128" 300 -1200 70 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
X VCC 32 0 1100 0 D 60 60 0 0 W N
|
||||
X GND 16 0 -1100 0 U 60 60 0 0 W N
|
||||
|
@ -175,6 +179,8 @@ ENDDEF
|
|||
DEF 74LS245 U 0 10 Y Y 1 F N
|
||||
F0 "U" 100 575 60 H V L BNN
|
||||
F1 "74LS245" 50 -575 60 H V L TNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
ALIAS 74HC245
|
||||
DRAW
|
||||
X GND 10 0 -550 0 U 60 60 0 0 W N
|
||||
|
@ -208,6 +214,8 @@ ENDDEF
|
|||
DEF 74LS541 U 0 30 Y Y 1 F N
|
||||
F0 "U" 0 575 60 H V C BNN
|
||||
F1 "74LS541" 0 -575 60 H V C TNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
X GND 10 -200 -550 0 U 60 60 0 0 W N
|
||||
X VCC 20 -200 550 0 D 60 60 0 0 W N
|
||||
|
@ -243,6 +251,8 @@ ENDDEF
|
|||
DEF 74LS688 U 0 40 Y Y 1 F N
|
||||
F0 "U" 0 950 60 H V C CNN
|
||||
F1 "74LS688" 0 -950 60 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
X GND 10 -300 -900 0 R 60 60 0 0 W N
|
||||
X VCC 20 -300 900 0 R 60 60 0 0 W N
|
||||
|
@ -273,6 +283,8 @@ ENDDEF
|
|||
DEF BUSPC BUS 0 40 Y Y 1 F N
|
||||
F0 "BUS" 0 100 70 H V C CNN
|
||||
F1 "BUSPC" 0 -100 70 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
S -600 -1600 600 1600 0 1 0 N
|
||||
X GND 1 -900 1500 300 R 60 60 1 1 P
|
||||
|
@ -343,16 +355,18 @@ ENDDEF
|
|||
# C
|
||||
#
|
||||
DEF C C 0 10 N Y 1 F N
|
||||
F0 "C" 50 100 50 H V L CNN
|
||||
F1 "C" 50 -100 50 H V L CNN
|
||||
F0 "C" 0 100 40 H V L CNN
|
||||
F1 "C" 6 -85 40 H V L CNN
|
||||
F2 "" 38 -150 30 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
SM*
|
||||
C?
|
||||
C1-1
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 2 0 1 20 -100 -30 100 -30 N
|
||||
P 2 0 1 20 -100 30 100 30 N
|
||||
P 2 0 1 20 -80 -30 80 -30 N
|
||||
P 2 0 1 20 -80 30 80 30 N
|
||||
X ~ 1 0 200 170 D 40 40 1 1 P
|
||||
X ~ 2 0 -200 170 U 40 40 1 1 P
|
||||
ENDDRAW
|
||||
|
@ -363,6 +377,8 @@ ENDDEF
|
|||
DEF CONN_8X2 P 0 40 Y Y 1 F N
|
||||
F0 "P" 0 450 60 H V C CNN
|
||||
F1 "CONN_8X2" 0 0 50 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
S -100 400 100 -400 0 1 0 N
|
||||
X ~ 1 -400 350 300 R 60 60 1 1 P I
|
||||
|
@ -387,15 +403,17 @@ ENDDEF
|
|||
# CP
|
||||
#
|
||||
DEF CP C 0 10 N N 1 F N
|
||||
F0 "C" 50 100 50 H V L CNN
|
||||
F1 "CP" 50 -100 50 H V L CNN
|
||||
F0 "C" 50 100 40 H V L CNN
|
||||
F1 "CP" 50 -100 40 H V L CNN
|
||||
F2 "" 100 -150 30 H V C CNN
|
||||
F3 "" 0 0 300 H V C CNN
|
||||
ALIAS CAPAPOL
|
||||
$FPLIST
|
||||
CP*
|
||||
SM*
|
||||
$ENDFPLIST
|
||||
DRAW
|
||||
P 4 0 1 8 -100 50 -100 -50 100 -50 100 50 N
|
||||
P 4 0 1 8 -80 50 -80 -50 80 -50 80 50 N
|
||||
P 4 0 1 0 -50 50 -50 -20 50 -20 50 50 F
|
||||
X ~ 1 0 200 150 D 40 40 1 1 P
|
||||
X ~ 2 0 -200 150 U 40 40 1 1 P
|
||||
|
@ -407,6 +425,8 @@ ENDDEF
|
|||
DEF CRYSTAL X 0 40 N N 1 F N
|
||||
F0 "X" 0 150 60 H V C CNN
|
||||
F1 "CRYSTAL" 0 -150 60 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
P 2 0 1 16 -100 100 -100 -100 N
|
||||
P 2 0 1 16 100 100 100 -100 N
|
||||
|
@ -421,6 +441,8 @@ ENDDEF
|
|||
DEF DB25 J 0 40 Y N 1 F N
|
||||
F0 "J" 50 1350 70 H V C CNN
|
||||
F1 "DB25" -50 -1350 70 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
DB25*
|
||||
$ENDFPLIST
|
||||
|
@ -516,6 +538,8 @@ ENDDEF
|
|||
DEF EP600 U 0 40 Y Y 1 F N
|
||||
F0 "U" 0 100 70 H V C CNN
|
||||
F1 "EP600" 0 -500 70 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
S -500 -850 500 850 0 1 0 N
|
||||
X CLK1 1 -800 750 300 R 60 60 1 1 I C
|
||||
|
@ -550,6 +574,8 @@ ENDDEF
|
|||
DEF ~GND #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 0 30 H I C CNN
|
||||
F1 "GND" 0 -70 30 H I C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
|
||||
X GND 1 0 0 0 U 30 30 1 1 W N
|
||||
|
@ -561,6 +587,8 @@ ENDDEF
|
|||
DEF LED D 0 40 Y N 1 F N
|
||||
F0 "D" 0 100 50 H V C CNN
|
||||
F1 "LED" 0 -100 50 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
$FPLIST
|
||||
LED-3MM
|
||||
LED-5MM
|
||||
|
@ -585,6 +613,8 @@ ENDDEF
|
|||
DEF PWR_FLAG #FLG 0 0 N N 1 F P
|
||||
F0 "#FLG" 0 95 30 H I C CNN
|
||||
F1 "PWR_FLAG" 0 180 30 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
X pwr 1 0 0 0 U 20 20 0 0 w
|
||||
P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N
|
||||
|
@ -594,8 +624,10 @@ ENDDEF
|
|||
# R
|
||||
#
|
||||
DEF R R 0 0 N Y 1 F N
|
||||
F0 "R" 80 0 50 V V C CNN
|
||||
F1 "R" 0 0 50 V V C CNN
|
||||
F0 "R" 80 0 40 V V C CNN
|
||||
F1 "R" 7 1 40 V V C CNN
|
||||
F2 "" -70 0 30 V V C CNN
|
||||
F3 "" 0 0 30 H V C CNN
|
||||
$FPLIST
|
||||
R?
|
||||
SM0603
|
||||
|
@ -615,6 +647,8 @@ ENDDEF
|
|||
DEF RR9 RR 0 40 Y N 1 F N
|
||||
F0 "RR" 50 600 70 H V C CNN
|
||||
F1 "RR9" 30 0 70 V V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
P 6 0 1 0 -50 -450 -50 550 50 550 100 500 100 -450 -50 -450 N
|
||||
X COM 1 -350 500 300 R 60 60 1 1 P I
|
||||
|
@ -635,6 +669,8 @@ ENDDEF
|
|||
DEF VCC #PWR 0 0 Y Y 1 F P
|
||||
F0 "#PWR" 0 100 30 H I C CNN
|
||||
F1 "VCC" 0 100 30 H V C CNN
|
||||
F2 "" 0 0 60 H V C CNN
|
||||
F3 "" 0 0 60 H V C CNN
|
||||
DRAW
|
||||
X VCC 1 0 0 0 U 20 20 0 0 W N
|
||||
C 0 50 20 0 1 0 N
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Cmp-Mod V01 Created by CvPCB (2011-03-30 BZR 2935)-testing date = 02/04/2011 13:22:13
|
||||
Cmp-Mod V01 Created by CvPcb (2013-08-20 BZR 4294)-product date = 21/08/2013 18:12:43
|
||||
|
||||
BeginCmp
|
||||
TimeStamp = /322D3011;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
update=02/04/2011 15:02:30
|
||||
update=07/08/2013 15:44:03
|
||||
version=1
|
||||
last_client=pcbnew
|
||||
[common]
|
||||
|
@ -14,31 +14,11 @@ NetIExt=net
|
|||
EquName1=devcms
|
||||
[eeschema]
|
||||
version=1
|
||||
PageLayoutDescrFile=pagelayout_logo.kicad_wks
|
||||
SubpartIdSeparator=0
|
||||
SubpartFirstId=65
|
||||
LibDir=
|
||||
NetFmt=1
|
||||
HPGLSpd=20
|
||||
HPGLDm=15
|
||||
HPGLNum=1
|
||||
offX_A4=0
|
||||
offY_A4=0
|
||||
offX_A3=0
|
||||
offY_A3=0
|
||||
offX_A2=0
|
||||
offY_A2=0
|
||||
offX_A1=0
|
||||
offY_A1=0
|
||||
offX_A0=0
|
||||
offY_A0=0
|
||||
offX_A=0
|
||||
offY_A=0
|
||||
offX_B=0
|
||||
offY_B=0
|
||||
offX_C=0
|
||||
offY_C=0
|
||||
offX_D=0
|
||||
offY_D=0
|
||||
offX_E=0
|
||||
offY_E=0
|
||||
NetFmtName=
|
||||
RptD_X=0
|
||||
RptD_Y=100
|
||||
RptLab=1
|
||||
|
@ -58,21 +38,24 @@ LibName11=special
|
|||
LibName12=image
|
||||
[pcbnew]
|
||||
version=1
|
||||
PadDrlX=354
|
||||
PadDimH=550
|
||||
PadDimV=550
|
||||
BoardThickness=630
|
||||
TxtPcbV=800
|
||||
TxtPcbH=600
|
||||
TxtModV=600
|
||||
TxtModH=600
|
||||
TxtModW=120
|
||||
VEgarde=100
|
||||
DrawLar=150
|
||||
EdgeLar=50
|
||||
TxtLar=170
|
||||
MSegLar=150
|
||||
PageLayoutDescrFile=pagelayout_logo.kicad_wks
|
||||
LastNetListRead=interf_u.net
|
||||
UseCmpFile=1
|
||||
PadDrill=0.89916
|
||||
PadDrillOvalY=0.89916
|
||||
PadSizeH=1.397
|
||||
PadSizeV=1.397
|
||||
PcbTextSizeV=2.032
|
||||
PcbTextSizeH=1.524
|
||||
PcbTextThickness=0.4318
|
||||
ModuleTextSizeV=1.524
|
||||
ModuleTextSizeH=1.524
|
||||
ModuleTextSizeThickness=0.3048
|
||||
SolderMaskClearance=0.254
|
||||
SolderMaskMinWidth=0
|
||||
DrawSegmentWidth=0.381
|
||||
BoardOutlineThickness=0.127
|
||||
ModuleOutlineThickness=0.381
|
||||
[pcbnew/libraries]
|
||||
LibDir=
|
||||
LibName1=connect
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
EESchema Schematic File Version 2 date 18/12/2011 10:04:44
|
||||
EESchema Schematic File Version 2
|
||||
LIBS:power
|
||||
LIBS:device
|
||||
LIBS:conn
|
||||
|
@ -12,9 +12,9 @@ LIBS:xilinx
|
|||
LIBS:special
|
||||
LIBS:image
|
||||
LIBS:interf_u-cache
|
||||
EELAYER 25 0
|
||||
EELAYER 24 0
|
||||
EELAYER END
|
||||
$Descr A3 16535 11700
|
||||
$Descr A3 16535 11693
|
||||
encoding utf-8
|
||||
Sheet 1 1
|
||||
Title "INTERFACE UNIVERSEL"
|
||||
|
@ -27,7 +27,7 @@ Comment3 "Comment 3"
|
|||
Comment4 "Comment 4"
|
||||
$EndDescr
|
||||
$Bitmap
|
||||
Pos 11200 10550
|
||||
Pos 9350 10600
|
||||
Scale 1,000000
|
||||
Data
|
||||
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 E5 00 00 01 0E 08 02 00 00 00 F9 5F 47
|
||||
|
@ -1181,7 +1181,7 @@ BF FD 96 77 9E 38 7E F1 EC E1 55 E2 AF 2F E0 1B 5F F9 FC FE BD 4F B9 56 EB C9 C9
|
|||
29 65 D5 9A 89 35 EB 37 F6 E3 02 4F 95 57 89 BF 1E 63 D9 CA D5 CB 7E 65 BC F3 FF E1 D5 7A 1F CE
|
||||
A2 94 8E 79 E6 79 49 E6 FD 75 9E B9 C4 BC BF CE 33 97 98 F7 D7 79 E6 12 F3 FE 3A CF 5C E2 E7 E2
|
||||
03 93 93 93 FD BA 8E 79 E6 39 19 8E FB EB DC 15 0B E6 F9 D5 61 7E 3F 30 CF 5C 62 DE 5F E7 99 4B
|
||||
FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 3F $EndBitmap
|
||||
FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 10
|
||||
EndData
|
||||
$EndBitmap
|
||||
Wire Bus Line
|
||||
|
@ -1794,6 +1794,8 @@ U 1 1 4A087146
|
|||
P 5250 1950
|
||||
F 0 "U3" H 5250 2525 60 0000 C BNN
|
||||
F 1 "74LS541" H 5250 1375 60 0000 C TNN
|
||||
F 2 "DIP-20__300" H 5250 1250 60 0000 C CNN
|
||||
F 3 "" H 5250 1950 60 0001 C CNN
|
||||
1 5250 1950
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1805,6 +1807,8 @@ U 1 1 43020357
|
|||
P 14350 4800
|
||||
F 0 "#PWR01" H 14350 4800 30 0001 C CNN
|
||||
F 1 "GND" H 14350 4730 30 0001 C CNN
|
||||
F 2 "" H 14350 4800 60 0001 C CNN
|
||||
F 3 "" H 14350 4800 60 0001 C CNN
|
||||
1 14350 4800
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1814,6 +1818,8 @@ U 1 1 43020354
|
|||
P 13550 4800
|
||||
F 0 "#PWR02" H 13550 4800 30 0001 C CNN
|
||||
F 1 "GND" H 13550 4730 30 0001 C CNN
|
||||
F 2 "" H 13550 4800 60 0001 C CNN
|
||||
F 3 "" H 13550 4800 60 0001 C CNN
|
||||
1 13550 4800
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1823,6 +1829,8 @@ U 1 1 43020343
|
|||
P 4550 2550
|
||||
F 0 "#PWR03" H 4550 2550 30 0001 C CNN
|
||||
F 1 "GND" H 4550 2480 30 0001 C CNN
|
||||
F 2 "" H 4550 2550 60 0001 C CNN
|
||||
F 3 "" H 4550 2550 60 0001 C CNN
|
||||
1 4550 2550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1832,6 +1840,8 @@ U 1 1 4302032E
|
|||
P 1200 7700
|
||||
F 0 "#PWR04" H 1200 7700 30 0001 C CNN
|
||||
F 1 "GND" H 1200 7630 30 0001 C CNN
|
||||
F 2 "" H 1200 7700 60 0001 C CNN
|
||||
F 3 "" H 1200 7700 60 0001 C CNN
|
||||
1 1200 7700
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1841,6 +1851,8 @@ U 1 1 43020328
|
|||
P 2600 9350
|
||||
F 0 "#PWR05" H 2600 9350 30 0001 C CNN
|
||||
F 1 "GND" H 2600 9280 30 0001 C CNN
|
||||
F 2 "" H 2600 9350 60 0001 C CNN
|
||||
F 3 "" H 2600 9350 60 0001 C CNN
|
||||
1 2600 9350
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1850,6 +1862,8 @@ U 1 1 38CEA284
|
|||
P 3250 9300
|
||||
F 0 "#FLG06" H 3250 9570 30 0001 C CNN
|
||||
F 1 "PWR_FLAG" H 3250 9530 30 0000 C CNN
|
||||
F 2 "" H 3250 9300 60 0001 C CNN
|
||||
F 3 "" H 3250 9300 60 0001 C CNN
|
||||
1 3250 9300
|
||||
-1 0 0 1
|
||||
$EndComp
|
||||
|
@ -1859,6 +1873,8 @@ U 1 1 38C8E81F
|
|||
P 3250 8900
|
||||
F 0 "#PWR07" H 3250 9170 30 0001 C CNN
|
||||
F 1 "PWR_FLAG" H 3250 9130 30 0000 C CNN
|
||||
F 2 "" H 3250 8900 60 0001 C CNN
|
||||
F 3 "" H 3250 8900 60 0001 C CNN
|
||||
1 3250 8900
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1868,6 +1884,8 @@ U 1 1 38C8E014
|
|||
P 8450 2550
|
||||
F 0 "#PWR08" H 8450 2650 30 0001 C CNN
|
||||
F 1 "VCC" H 8450 2650 30 0000 C CNN
|
||||
F 2 "" H 8450 2550 60 0001 C CNN
|
||||
F 3 "" H 8450 2550 60 0001 C CNN
|
||||
1 8450 2550
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1877,6 +1895,8 @@ U 1 1 4A33B1CF
|
|||
P 1350 4250
|
||||
F 0 "#PWR09" H 1350 4450 40 0001 C CNN
|
||||
F 1 "VCC" H 1350 4400 40 0000 C CNN
|
||||
F 2 "" H 1350 4250 60 0001 C CNN
|
||||
F 3 "" H 1350 4250 60 0001 C CNN
|
||||
1 1350 4250
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
|
@ -1886,6 +1906,8 @@ U 1 1 4A33B1D0
|
|||
P 1350 1650
|
||||
F 0 "#PWR010" H 1350 1850 40 0001 C CNN
|
||||
F 1 "VCC" H 1350 1800 40 0000 C CNN
|
||||
F 2 "" H 1350 1650 60 0001 C CNN
|
||||
F 3 "" H 1350 1650 60 0001 C CNN
|
||||
1 1350 1650
|
||||
0 -1 -1 0
|
||||
$EndComp
|
||||
|
@ -1895,6 +1917,8 @@ U 1 1 4A33B1D1
|
|||
P 10050 3000
|
||||
F 0 "#PWR011" H 10050 3100 30 0001 C CNN
|
||||
F 1 "VCC" H 10050 3100 30 0000 C CNN
|
||||
F 2 "" H 10050 3000 60 0001 C CNN
|
||||
F 3 "" H 10050 3000 60 0001 C CNN
|
||||
1 10050 3000
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1904,6 +1928,8 @@ U 1 1 4A33B1D2
|
|||
P 6100 9900
|
||||
F 0 "#PWR012" H 6100 10000 30 0001 C CNN
|
||||
F 1 "VCC" H 6100 10000 30 0000 C CNN
|
||||
F 2 "" H 6100 9900 60 0001 C CNN
|
||||
F 3 "" H 6100 9900 60 0001 C CNN
|
||||
1 6100 9900
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1913,6 +1939,8 @@ U 1 1 38C8DFD2
|
|||
P 2600 8850
|
||||
F 0 "#PWR013" H 2600 8950 30 0001 C CNN
|
||||
F 1 "VCC" H 2600 8950 30 0000 C CNN
|
||||
F 2 "" H 2600 8850 60 0001 C CNN
|
||||
F 3 "" H 2600 8850 60 0001 C CNN
|
||||
1 2600 8850
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -1994,6 +2022,8 @@ U 1 1 3268ED7F
|
|||
P 6850 2550
|
||||
F 0 "#GND014" H 6850 2550 30 0001 C CNN
|
||||
F 1 "GND" H 6850 2480 30 0001 C CNN
|
||||
F 2 "" H 6850 2550 60 0001 C CNN
|
||||
F 3 "" H 6850 2550 60 0001 C CNN
|
||||
1 6850 2550
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2019,7 +2049,8 @@ U 1 1 32568D1E
|
|||
P 1700 7250
|
||||
F 0 "JP1" H 1700 7750 70 0000 C CNN
|
||||
F 1 "CONN_8X2" V 1700 7250 70 0000 C CNN
|
||||
F 2 "pin_array_8x2" H 1700 7800 60 0000 C CNN
|
||||
F 2 "pin_array_8x2" H 1700 7850 60 0000 C CNN
|
||||
F 3 "" H 1700 7250 60 0001 C CNN
|
||||
1 1700 7250
|
||||
1 0 0 1
|
||||
$EndComp
|
||||
|
@ -2032,6 +2063,8 @@ U 1 1 32567A22
|
|||
P 3250 7950
|
||||
F 0 "#015" H 3250 8150 40 0001 C CNN
|
||||
F 1 "VCC" H 3250 8100 40 0000 C CNN
|
||||
F 2 "" H 3250 7950 60 0001 C CNN
|
||||
F 3 "" H 3250 7950 60 0001 C CNN
|
||||
1 3250 7950
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2042,6 +2075,7 @@ P 2750 8300
|
|||
F 0 "RR1" V 2800 8300 70 0000 C CNN
|
||||
F 1 "9x1K" V 2770 8630 70 0000 C CNN
|
||||
F 2 "r_pack9" V 2900 8350 60 0000 C CNN
|
||||
F 3 "" H 2750 8300 60 0001 C CNN
|
||||
1 2750 8300
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2083,6 +2117,8 @@ U 1 1 325676D0
|
|||
P 14650 6100
|
||||
F 0 "#016" H 14650 6100 30 0001 C CNN
|
||||
F 1 "GND" H 14650 6030 30 0001 C CNN
|
||||
F 2 "" H 14650 6100 60 0001 C CNN
|
||||
F 3 "" H 14650 6100 60 0001 C CNN
|
||||
1 14650 6100
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2095,6 +2131,7 @@ P 15200 7200
|
|||
F 0 "P1" H 15250 8550 70 0000 C CNN
|
||||
F 1 "DB25FEMELLE" H 15150 5850 70 0000 C CNN
|
||||
F 2 "DB25FC" H 15150 5750 60 0000 C CNN
|
||||
F 3 "" H 15200 7200 60 0001 C CNN
|
||||
1 15200 7200
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2297,6 +2334,7 @@ P 6350 9900
|
|||
F 0 "R3" V 6430 9900 50 0000 C CNN
|
||||
F 1 "10K" V 6350 9900 50 0000 C CNN
|
||||
F 2 "R3" V 6250 9900 60 0000 C CNN
|
||||
F 3 "" H 6350 9900 60 0001 C CNN
|
||||
1 6350 9900
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2346,7 +2384,8 @@ U 1 1 3240023F
|
|||
P 7700 9050
|
||||
F 0 "U5" H 7750 10200 70 0000 C CNN
|
||||
F 1 "628128" H 7700 7900 70 0000 C CNN
|
||||
F 2 "32dip600" H 7700 7800 60 0000 C CNN
|
||||
F 2 "DIP-32__600" H 7700 7800 60 0000 C CNN
|
||||
F 3 "" H 7700 9050 60 0001 C CNN
|
||||
1 7700 9050
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2378,6 +2417,8 @@ U 1 1 32332C72
|
|||
P 8450 1050
|
||||
F 0 "#017" H 8450 1150 30 0001 C CNN
|
||||
F 1 "VCC" H 8450 1150 30 0000 C CNN
|
||||
F 2 "" H 8450 1050 60 0001 C CNN
|
||||
F 3 "" H 8450 1050 60 0001 C CNN
|
||||
1 8450 1050
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2389,6 +2430,8 @@ U 1 1 32331877
|
|||
P 6850 1050
|
||||
F 0 "#018" H 6850 1050 30 0001 C CNN
|
||||
F 1 "GND" H 6850 980 30 0001 C CNN
|
||||
F 2 "" H 6850 1050 60 0001 C CNN
|
||||
F 3 "" H 6850 1050 60 0001 C CNN
|
||||
1 6850 1050
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2466,6 +2509,8 @@ U 1 1 32308380
|
|||
P 14650 1750
|
||||
F 0 "#019" H 14650 1750 30 0001 C CNN
|
||||
F 1 "GND" H 14650 1680 30 0001 C CNN
|
||||
F 2 "" H 14650 1750 60 0001 C CNN
|
||||
F 3 "" H 14650 1750 60 0001 C CNN
|
||||
1 14650 1750
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2475,6 +2520,8 @@ U 1 1 3230837A
|
|||
P 14250 2200
|
||||
F 0 "#020" H 14250 2200 30 0001 C CNN
|
||||
F 1 "GND" H 14250 2130 30 0001 C CNN
|
||||
F 2 "" H 14250 2200 60 0001 C CNN
|
||||
F 3 "" H 14250 2200 60 0001 C CNN
|
||||
1 14250 2200
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2558,6 +2605,8 @@ U 1 1 32307FB9
|
|||
P 1350 4450
|
||||
F 0 "#021" H 1350 4450 40 0001 C CNN
|
||||
F 1 "GND" H 1350 4380 40 0000 C CNN
|
||||
F 2 "" H 1350 4450 60 0001 C CNN
|
||||
F 3 "" H 1350 4450 60 0001 C CNN
|
||||
1 1350 4450
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2567,6 +2616,8 @@ U 1 1 32307FA7
|
|||
P 1350 1450
|
||||
F 0 "#022" H 1350 1450 40 0001 C CNN
|
||||
F 1 "GND" H 1350 1380 40 0000 C CNN
|
||||
F 2 "" H 1350 1450 60 0001 C CNN
|
||||
F 3 "" H 1350 1450 60 0001 C CNN
|
||||
1 1350 1450
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2577,6 +2628,7 @@ P 14350 4600
|
|||
F 0 "C3" V 14450 4750 50 0000 C CNN
|
||||
F 1 "47pF" V 14450 4450 50 0000 C CNN
|
||||
F 2 "C1" H 14550 4600 60 0000 C CNN
|
||||
F 3 "" H 14350 4600 60 0001 C CNN
|
||||
1 14350 4600
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2587,6 +2639,7 @@ P 13550 4600
|
|||
F 0 "C2" V 13650 4750 50 0000 C CNN
|
||||
F 1 "47pF" V 13650 4450 50 0000 C CNN
|
||||
F 2 "C1" H 13350 4600 60 0000 C CNN
|
||||
F 3 "" H 13550 4600 60 0001 C CNN
|
||||
1 13550 4600
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2597,6 +2650,7 @@ P 13950 4150
|
|||
F 0 "X1" H 13950 4350 70 0000 C CNN
|
||||
F 1 "8MHz" H 13950 3950 70 0000 C CNN
|
||||
F 2 "HC-18UH" H 13950 3850 60 0000 C CNN
|
||||
F 3 "" H 13950 4150 60 0001 C CNN
|
||||
1 13950 4150
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2607,6 +2661,7 @@ P 14900 3700
|
|||
F 0 "R2" V 14980 3700 50 0000 C CNN
|
||||
F 1 "1K" V 14900 3700 50 0000 C CNN
|
||||
F 2 "R3" V 14800 3700 60 0000 C CNN
|
||||
F 3 "" H 14900 3700 60 0001 C CNN
|
||||
1 14900 3700
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2617,6 +2672,7 @@ P 13950 3700
|
|||
F 0 "R1" V 14030 3700 50 0000 C CNN
|
||||
F 1 "100K" V 13950 3700 50 0000 C CNN
|
||||
F 2 "R3" V 13850 3700 60 0000 C CNN
|
||||
F 3 "" H 13950 3700 60 0001 C CNN
|
||||
1 13950 3700
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2627,6 +2683,7 @@ P 4450 9100
|
|||
F 0 "C1" H 4500 9200 50 0000 L CNN
|
||||
F 1 "47uF" H 4500 9000 50 0000 L CNN
|
||||
F 2 "CP6" H 4650 9100 60 0000 C CNN
|
||||
F 3 "" H 4450 9100 60 0001 C CNN
|
||||
1 4450 9100
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2637,6 +2694,7 @@ P 3800 9100
|
|||
F 0 "C4" H 3850 9200 50 0000 L CNN
|
||||
F 1 "47uF" H 3850 9000 50 0000 L CNN
|
||||
F 2 "CP6" H 4000 9100 60 0000 C CNN
|
||||
F 3 "" H 3800 9100 60 0001 C CNN
|
||||
1 3800 9100
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2647,6 +2705,7 @@ P 3250 9100
|
|||
F 0 "C5" H 3300 9200 50 0000 L CNN
|
||||
F 1 "47uF" H 3300 9000 50 0000 L CNN
|
||||
F 2 "CP6" H 3450 9100 60 0000 C CNN
|
||||
F 3 "" H 3250 9100 60 0001 C CNN
|
||||
1 3250 9100
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2657,6 +2716,7 @@ P 2600 9100
|
|||
F 0 "C6" H 2650 9200 50 0000 L CNN
|
||||
F 1 "47uF" H 2650 9000 50 0000 L CNN
|
||||
F 2 "CP6" H 2800 9100 60 0000 C CNN
|
||||
F 3 "" H 2600 9100 60 0001 C CNN
|
||||
1 2600 9100
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2682,7 +2742,8 @@ U 1 1 322D35B4
|
|||
P 4600 6900
|
||||
F 0 "U2" H 4600 7850 60 0000 C CNN
|
||||
F 1 "74LS688" H 4600 5950 60 0000 C CIB
|
||||
F 2 "20dip300" H 4600 5850 60 0000 C CNB
|
||||
F 2 "DIP-20__300" H 4600 5850 60 0000 C CNB
|
||||
F 3 "" H 4600 6900 60 0001 C CNN
|
||||
1 4600 6900
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2693,6 +2754,7 @@ P 11200 5700
|
|||
F 0 "U9" H 11200 8450 70 0000 C CNN
|
||||
F 1 "4003APG120" H 11200 2950 70 0000 C CNN
|
||||
F 2 "PGA120" H 11200 2850 60 0000 C CNN
|
||||
F 3 "" H 11200 5700 60 0001 C CNN
|
||||
F 4 "50$" H 11200 5700 60 0001 C CNN "price"
|
||||
F 5 "test" H 11200 5700 60 0001 C CNN "Field5"
|
||||
1 11200 5700
|
||||
|
@ -2705,6 +2767,7 @@ P 14250 2000
|
|||
F 0 "D2" H 14250 2100 50 0000 C CNN
|
||||
F 1 "LED" H 14250 1900 50 0000 C CNN
|
||||
F 2 "LEDV" V 14250 2250 60 0000 C CNN
|
||||
F 3 "" H 14250 2000 60 0001 C CNN
|
||||
1 14250 2000
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2715,6 +2778,7 @@ P 14650 1550
|
|||
F 0 "D1" H 14650 1650 50 0000 C CNN
|
||||
F 1 "LED" H 14650 1450 50 0000 C CNN
|
||||
F 2 "LEDV" V 14650 1800 60 0000 C CNN
|
||||
F 3 "" H 14650 1550 60 0001 C CNN
|
||||
1 14650 1550
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2725,6 +2789,7 @@ P 13700 1500
|
|||
F 0 "R5" V 13780 1500 50 0000 C CNN
|
||||
F 1 "330" V 13700 1500 50 0000 C CNN
|
||||
F 2 "R3" V 13730 1680 30 0000 C CNN
|
||||
F 3 "" H 13700 1500 60 0001 C CNN
|
||||
1 13700 1500
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2735,6 +2800,7 @@ P 13700 1050
|
|||
F 0 "R4" V 13780 1050 50 0000 C CNN
|
||||
F 1 "330" V 13700 1050 50 0000 C CNN
|
||||
F 2 "R3" V 13850 1050 60 0000 C CNN
|
||||
F 3 "" H 13700 1050 60 0001 C CNN
|
||||
1 13700 1050
|
||||
0 1 1 0
|
||||
$EndComp
|
||||
|
@ -2743,8 +2809,9 @@ L EP600 U8
|
|||
U 1 1 322D321C
|
||||
P 7650 1800
|
||||
F 0 "U8" H 7650 1900 70 0000 C CNN
|
||||
F 1 "EP600" H 7650 1300 70 0000 C CNN
|
||||
F 2 "24dip300" H 7700 1000 60 0000 C CNN
|
||||
F 1 "EP600" H 7650 850 70 0000 C CNN
|
||||
F 2 "DIP-24__300" H 7700 750 60 0000 C CNN
|
||||
F 3 "" H 7650 1800 60 0001 C CNN
|
||||
1 7650 1800
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2754,7 +2821,8 @@ U 1 1 322D31F4
|
|||
P 5200 3600
|
||||
F 0 "U1" H 5300 4175 60 0000 L BNN
|
||||
F 1 "74LS245" H 5250 3025 60 0000 L TNN
|
||||
F 2 "20dip300" H 5350 3100 60 0000 C CNN
|
||||
F 2 "DIP-20__300" H 5400 2900 60 0000 C CNN
|
||||
F 3 "" H 5200 3600 60 0001 C CNN
|
||||
1 5200 3600
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
@ -2762,9 +2830,10 @@ $Comp
|
|||
L BUSPC BUS1
|
||||
U 1 1 322D3011
|
||||
P 2250 2950
|
||||
F 0 "BUS1" H 2250 3050 70 0000 C CNN
|
||||
F 1 "BUSPC" H 2250 2850 70 0000 C CNN
|
||||
F 2 "BUS_PC" H 2250 1250 60 0000 C CNN
|
||||
F 0 "BUS1" H 2200 4600 70 0000 C CNN
|
||||
F 1 "BUSPC" H 2200 1250 70 0000 C CNN
|
||||
F 2 "BUS_PC" H 2202 1160 60 0000 C CNN
|
||||
F 3 "" H 2250 2950 60 0001 C CNN
|
||||
1 2250 2950
|
||||
1 0 0 -1
|
||||
$EndComp
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
( page_layout
|
||||
( setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) )
|
||||
( rect (comment "rect around the title block") (linewidth 0.15) (start 110 34) (end 2 2) )
|
||||
( rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )
|
||||
( line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) )
|
||||
( tbtext "1" (pos 25 1 ltcorner) (font (size 1.3 1.3))(repeat 100) (incrx 50) )
|
||||
( line (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50) )
|
||||
( tbtext "1" (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) )
|
||||
( line (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50) )
|
||||
( tbtext "A" (pos 1 25 ltcorner) (font (size 1.3 1.3))
|
||||
(justify center)(repeat 100) (incry 50) )
|
||||
( line (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50) )
|
||||
( tbtext "A" (pos 1 25 rtcorner) (font (size 1.3 1.3))
|
||||
(justify center) (repeat 100) (incry 50) )
|
||||
( tbtext "Date: %D" (pos 87 6.9) )
|
||||
( line (start 110 5.5) end 2 5.5) )
|
||||
( tbtext "%K" (pos 109 4.1) (comment "Kicad version" ) )
|
||||
( line (start 110 8.5) end 2 8.5) )
|
||||
( tbtext "Rev: %R" (pos 24 6.9)(font bold)(justify left) )
|
||||
( tbtext "Size: %Z" (comment "Paper format name")(pos 109 6.9) )
|
||||
( tbtext "Id: %S/%N" (comment "Sheet id")(pos 24 4.1) )
|
||||
( line (start 110 12.5) end 2 12.5) )
|
||||
( tbtext "Title: %T" (pos 109 10.7)(font bold (size 2 2)) )
|
||||
( tbtext "File: %F" (pos 109 14.3) )
|
||||
( line (start 110 18.5) end 2 18.5) )
|
||||
( tbtext "Sheet: %P" (pos 109 17) )
|
||||
( tbtext "%Y" (comment "Company name") (pos 109 20)(font bold) )
|
||||
( tbtext "%C0" (comment "Comment 0") (pos 109 23) )
|
||||
( tbtext "%C1" (comment "Comment 1") (pos 109 26) )
|
||||
( tbtext "%C2" (comment "Comment 2") (pos 109 29) )
|
||||
( tbtext "%C3" (comment "Comment 3") (pos 109 32) )
|
||||
( line (start 90 8.5) (end 90 5.5) )
|
||||
( line (start 26 8.5) (end 26 2) )
|
||||
|
||||
( rect (comment "rect around the logo") (linewidth 0.15) (start 157 34) (end 110 2) )
|
||||
(polygon (pos 134 18 rbcorner) (rotate 20) (linewidth 0.00254)
|
||||
(pts (xy 20.574 8.382) (xy 19.9009 8.382) (xy 19.9009 6.26364) (xy 19.7485 5.98932)
|
||||
(xy 19.71802 5.92328) (xy 19.69262 5.83946) (xy 19.66976 5.72262) (xy 19.65198 5.56006)
|
||||
(xy 19.63674 5.33908) (xy 19.6215 5.04952) (xy 19.61134 4.67614) (xy 19.60372 4.20624)
|
||||
(xy 19.5961 3.62712) (xy 19.58848 2.92862) (xy 19.5834 2.09296) (xy 19.57832 1.11252)
|
||||
(xy 19.57578 0.27432) (xy 19.55038 -5.16636) (xy 18.15592 -5.16636) (xy 17.69364 -5.16382)
|
||||
(xy 17.29232 -5.15874) (xy 16.98752 -5.15112) (xy 16.80464 -5.14096) (xy 16.764 -5.13334)
|
||||
(xy 16.79194 -5.0419) (xy 16.8656 -4.85648) (xy 16.891 -4.79806) (xy 16.93672 -4.64312)
|
||||
(xy 16.97228 -4.42468) (xy 16.99514 -4.11734) (xy 17.01038 -3.69824) (xy 17.01546 -3.14198)
|
||||
(xy 17.018 -2.82702) (xy 17.01546 -2.25806) (xy 17.01292 -1.83896) (xy 17.0053 -1.5494)
|
||||
(xy 16.99006 -1.36652) (xy 16.9672 -1.27508) (xy 16.93164 -1.25222) (xy 16.88592 -1.28016)
|
||||
(xy 16.8656 -1.29794) (xy 16.47444 -1.5494) (xy 15.96644 -1.71704) (xy 15.3797 -1.7907)
|
||||
(xy 15.2527 -1.79324) (xy 14.53134 -1.71958) (xy 13.89634 -1.50622) (xy 13.35278 -1.14808)
|
||||
(xy 12.9032 -0.65024) (xy 12.5476 -0.0127) (xy 12.28598 0.762) (xy 12.22756 1.016)
|
||||
(xy 12.1539 1.50368) (xy 12.11326 2.07264) (xy 12.10564 2.667) (xy 12.13104 3.23342)
|
||||
(xy 12.18692 3.71348) (xy 12.2301 3.91668) (xy 12.49934 4.66344) (xy 12.88288 5.2959)
|
||||
(xy 13.36802 5.8039) (xy 13.94968 6.17982) (xy 14.39164 6.35508) (xy 14.76248 6.41858)
|
||||
(xy 15.21968 6.4262) (xy 15.69466 6.38302) (xy 16.11376 6.29158) (xy 16.20266 6.2611)
|
||||
(xy 16.49984 6.1341) (xy 16.76146 5.99694) (xy 16.87576 5.92074) (xy 17.06118 5.7912)
|
||||
(xy 17.15262 5.78104) (xy 17.1831 5.9055) (xy 17.18564 6.00964) (xy 17.18564 6.26364)
|
||||
(xy 18.542 6.26364) (xy 19.9009 6.26364) (xy 19.9009 8.382) (xy 11.51636 8.382)
|
||||
(xy 11.51636 6.26364) (xy 11.3665 6.03504) (xy 11.32586 5.9563) (xy 11.2903 5.84962)
|
||||
(xy 11.26236 5.69468) (xy 11.24204 5.4737) (xy 11.22172 5.17144) (xy 11.20648 4.76504)
|
||||
(xy 11.19124 4.2418) (xy 11.17854 3.57886) (xy 11.16838 3.00736) (xy 11.1506 2.16408)
|
||||
(xy 11.13282 1.47066) (xy 11.10996 0.90932) (xy 11.07694 0.45974) (xy 11.03122 0.10414)
|
||||
(xy 10.97026 -0.1778) (xy 10.89152 -0.40386) (xy 10.78738 -0.59436) (xy 10.6553 -0.76962)
|
||||
(xy 10.49274 -0.94234) (xy 10.40892 -1.0287) (xy 9.93394 -1.38684) (xy 9.34212 -1.63576)
|
||||
(xy 8.64616 -1.77546) (xy 7.85622 -1.80086) (xy 6.99262 -1.7145) (xy 6.31952 -1.57988)
|
||||
(xy 5.92836 -1.48844) (xy 5.58038 -1.41478) (xy 5.31622 -1.36906) (xy 5.19938 -1.35636)
|
||||
(xy 5.0419 -1.32588) (xy 4.99364 -1.27254) (xy 5.02666 -1.1557) (xy 5.10794 -0.92964)
|
||||
(xy 5.22224 -0.635) (xy 5.35432 -0.31496) (xy 5.48132 -0.01524) (xy 5.588 0.22098)
|
||||
(xy 5.65658 0.35052) (xy 5.6642 0.36068) (xy 5.76834 0.36322) (xy 5.98424 0.31496)
|
||||
(xy 6.26872 0.22098) (xy 6.3119 0.2032) (xy 6.83768 0.04572) (xy 7.3406 -0.03048)
|
||||
(xy 7.79018 -0.0254) (xy 8.14324 0.0635) (xy 8.2677 0.13462) (xy 8.49376 0.40132)
|
||||
(xy 8.60044 0.68326) (xy 8.69188 1.05664) (xy 7.66826 1.10744) (xy 6.97738 1.16078)
|
||||
(xy 6.41096 1.24968) (xy 5.92836 1.3843) (xy 5.49148 1.5748) (xy 5.24764 1.70942)
|
||||
(xy 4.77012 2.08534) (xy 4.4196 2.54762) (xy 4.19608 3.0734) (xy 4.09448 3.63474)
|
||||
(xy 4.11988 4.20878) (xy 4.26974 4.76758) (xy 4.54406 5.28828) (xy 4.9403 5.74294)
|
||||
(xy 5.31876 6.02742) (xy 5.85978 6.2738) (xy 6.47954 6.40588) (xy 7.12724 6.42112)
|
||||
(xy 7.74954 6.30936) (xy 7.75208 6.30936) (xy 8.06958 6.18744) (xy 8.37438 6.02742)
|
||||
(xy 8.46582 5.96646) (xy 8.763 5.74802) (xy 8.7884 6.00456) (xy 8.8138 6.26364)
|
||||
(xy 10.16508 6.26364) (xy 11.51636 6.26364) (xy 11.51636 8.382) (xy 4.13766 8.382)
|
||||
(xy 4.13766 5.44068) (xy 4.10972 5.36702) (xy 4.0132 5.1816) (xy 3.86334 4.91744)
|
||||
(xy 3.68046 4.6101) (xy 3.48742 4.29006) (xy 3.29946 3.99034) (xy 3.1369 3.74142)
|
||||
(xy 3.10896 3.70078) (xy 2.9464 3.46456) (xy 2.65684 3.7211) (xy 2.20726 4.05892)
|
||||
(xy 1.76276 4.26212) (xy 1.27254 4.34848) (xy 1.05664 4.3561) (xy 0.70104 4.34594)
|
||||
(xy 0.43942 4.29768) (xy 0.19558 4.19862) (xy 0.05842 4.11988) (xy -0.38862 3.76682)
|
||||
(xy -0.75946 3.28168) (xy -1.03378 2.7051) (xy -1.07188 2.58572) (xy -1.143 2.30378)
|
||||
(xy -1.19126 1.98374) (xy -1.21666 1.58496) (xy -1.22936 1.0668) (xy -1.22936 0.889)
|
||||
(xy -1.22428 0.381) (xy -1.21158 0) (xy -1.17856 -0.30226) (xy -1.12776 -0.56896)
|
||||
(xy -1.04902 -0.84328) (xy -1.02108 -0.92964) (xy -0.75438 -1.53416) (xy -0.3937 -2.01676)
|
||||
(xy 0.04318 -2.36474) (xy 0.54864 -2.57048) (xy 0.99822 -2.62636) (xy 1.54686 -2.55524)
|
||||
(xy 2.05486 -2.35712) (xy 2.35712 -2.15138) (xy 2.5527 -1.98882) (xy 2.68986 -1.88468)
|
||||
(xy 2.7305 -1.86436) (xy 2.794 -1.9304) (xy 2.92608 -2.10312) (xy 3.10388 -2.35458)
|
||||
(xy 3.30962 -2.65176) (xy 3.51536 -2.96164) (xy 3.70586 -3.25374) (xy 3.85318 -3.4925)
|
||||
(xy 3.94208 -3.64998) (xy 3.95732 -3.69316) (xy 3.86588 -3.74396) (xy 3.66268 -3.85064)
|
||||
(xy 3.3782 -3.99288) (xy 3.22326 -4.06654) (xy 2.54508 -4.36118) (xy 1.92532 -4.5466)
|
||||
(xy 1.31318 -4.64058) (xy 0.87122 -4.65836) (xy 0.02286 -4.59232) (xy -0.7493 -4.38912)
|
||||
(xy -1.46558 -4.0386) (xy -2.15392 -3.5306) (xy -2.38252 -3.32232) (xy -2.9464 -2.70764)
|
||||
(xy -3.37312 -2.04978) (xy -3.6957 -1.30302) (xy -3.82524 -0.87376) (xy -3.94208 -0.26924)
|
||||
(xy -4.00304 0.43434) (xy -4.00812 1.17348) (xy -3.95986 1.88976) (xy -3.85572 2.52222)
|
||||
(xy -3.82524 2.64922) (xy -3.51028 3.53314) (xy -3.07848 4.32562) (xy -2.53746 5.0165)
|
||||
(xy -1.905 5.588) (xy -1.19126 6.02488) (xy -0.44958 6.30682) (xy 0.01016 6.39064)
|
||||
(xy 0.57404 6.4262) (xy 1.17856 6.41604) (xy 1.76276 6.3627) (xy 2.26822 6.26364)
|
||||
(xy 2.286 6.25856) (xy 2.72288 6.11124) (xy 3.23088 5.90296) (xy 3.73888 5.66166)
|
||||
(xy 4.13766 5.44068) (xy 4.13766 8.382) (xy 0 8.382) (xy -4.74218 8.382)
|
||||
(xy -4.74218 1.7653) (xy -4.74218 0.71882) (xy -4.74218 -0.55118) (xy -4.74218 -1.66116)
|
||||
(xy -4.74218 -2.62382) (xy -4.74472 -3.44678) (xy -4.7498 -4.14528) (xy -4.75742 -4.7244)
|
||||
(xy -4.77012 -5.19938) (xy -4.79044 -5.57784) (xy -4.81584 -5.87248) (xy -4.84886 -6.09346)
|
||||
(xy -4.8895 -6.2484) (xy -4.94284 -6.35254) (xy -5.0038 -6.4135) (xy -5.07746 -6.44144)
|
||||
(xy -5.16382 -6.44906) (xy -5.26542 -6.44398) (xy -5.37972 -6.4389) (xy -5.40512 -6.4389)
|
||||
(xy -5.6515 -6.4516) (xy -5.79374 -6.51002) (xy -5.90042 -6.65734) (xy -5.969 -6.79958)
|
||||
(xy -6.23062 -7.1755) (xy -6.57606 -7.4295) (xy -6.97738 -7.56158) (xy -7.40156 -7.57682)
|
||||
(xy -7.81558 -7.47014) (xy -8.1915 -7.24662) (xy -8.49376 -6.90626) (xy -8.58774 -6.73354)
|
||||
(xy -8.72998 -6.43636) (xy -14.05382 -6.43636) (xy -15.14602 -6.43636) (xy -16.08074 -6.43382)
|
||||
(xy -16.87068 -6.43128) (xy -17.52854 -6.42874) (xy -18.06702 -6.42112) (xy -18.49628 -6.4135)
|
||||
(xy -18.83156 -6.40334) (xy -19.08302 -6.39064) (xy -19.2659 -6.3754) (xy -19.38782 -6.35508)
|
||||
(xy -19.46402 -6.33222) (xy -19.50974 -6.30428) (xy -19.50974 -6.30174) (xy -19.53514 -6.26618)
|
||||
(xy -19.55546 -6.1976) (xy -19.57324 -6.08838) (xy -19.59102 -5.92582) (xy -19.60372 -5.69976)
|
||||
(xy -19.61388 -5.40004) (xy -19.6215 -5.0165) (xy -19.62912 -4.53644) (xy -19.6342 -3.95224)
|
||||
(xy -19.63928 -3.24866) (xy -19.64182 -2.41808) (xy -19.64182 -1.4478) (xy -19.64436 -0.32766)
|
||||
(xy -19.64436 0.71882) (xy -19.64436 1.9685) (xy -19.64182 3.06324) (xy -19.64182 4.00812)
|
||||
(xy -19.63928 4.81584) (xy -19.6342 5.49656) (xy -19.62912 6.06552) (xy -19.6215 6.52526)
|
||||
(xy -19.61134 6.8961) (xy -19.60118 7.18058) (xy -19.58848 7.39394) (xy -19.5707 7.54634)
|
||||
(xy -19.55292 7.64794) (xy -19.53006 7.71144) (xy -19.50974 7.73938) (xy -19.47418 7.76224)
|
||||
(xy -19.4056 7.7851) (xy -19.29892 7.80288) (xy -19.1389 7.81812) (xy -18.91538 7.83082)
|
||||
(xy -18.62074 7.84098) (xy -18.24228 7.85114) (xy -17.76984 7.85622) (xy -17.1958 7.86384)
|
||||
(xy -16.50238 7.86638) (xy -15.68704 7.86892) (xy -14.732 7.87146) (xy -13.63218 7.87146)
|
||||
(xy -12.37488 7.87146) (xy -12.192 7.874) (xy -10.91438 7.87146) (xy -9.79424 7.87146)
|
||||
(xy -8.82142 7.86892) (xy -7.98576 7.86638) (xy -7.2771 7.86384) (xy -6.68782 7.85876)
|
||||
(xy -6.20014 7.85114) (xy -5.81152 7.84352) (xy -5.50672 7.83336) (xy -5.27304 7.81812)
|
||||
(xy -5.1054 7.80542) (xy -4.9911 7.78764) (xy -4.91998 7.76732) (xy -4.87934 7.74192)
|
||||
(xy -4.8768 7.73938) (xy -4.8514 7.70128) (xy -4.83108 7.6327) (xy -4.8133 7.52348)
|
||||
(xy -4.79552 7.36092) (xy -4.78282 7.1374) (xy -4.77266 6.83768) (xy -4.76504 6.45414)
|
||||
(xy -4.75742 5.97408) (xy -4.75234 5.38734) (xy -4.74726 4.6863) (xy -4.74472 3.85318)
|
||||
(xy -4.74472 2.88544) (xy -4.74218 1.7653) (xy -4.74218 8.382) (xy -20.574 8.382)
|
||||
(xy -20.574 0) (xy -20.574 -8.382) (xy 0 -8.382) (xy 20.574 -8.382)
|
||||
(xy 20.574 0) (xy 20.574 8.382) (xy 20.574 8.382))
|
||||
(pts (xy -9.4742 6.26364) (xy -11.25728 6.26364) (xy -13.04036 6.26364) (xy -13.04036 6.0071)
|
||||
(xy -13.07846 5.76072) (xy -13.17752 5.48386) (xy -13.20038 5.4356) (xy -13.28674 5.29336)
|
||||
(xy -13.45692 5.0419) (xy -13.68806 4.70662) (xy -13.96746 4.31292) (xy -14.27226 3.88112)
|
||||
(xy -14.58976 3.4417) (xy -14.8971 3.02006) (xy -15.1765 2.63652) (xy -15.41526 2.31902)
|
||||
(xy -15.58798 2.09296) (xy -15.67942 1.98882) (xy -15.7099 2.03454) (xy -15.73022 2.24282)
|
||||
(xy -15.74038 2.61874) (xy -15.74292 3.15976) (xy -15.7353 3.76682) (xy -15.72514 4.37896)
|
||||
(xy -15.71244 4.84886) (xy -15.69974 5.19684) (xy -15.67688 5.45084) (xy -15.64894 5.63372)
|
||||
(xy -15.6083 5.76834) (xy -15.55496 5.88518) (xy -15.5194 5.94614) (xy -15.33144 6.26364)
|
||||
(xy -16.96974 6.26364) (xy -18.61058 6.26364) (xy -18.45056 5.94868) (xy -18.415 5.87502)
|
||||
(xy -18.38706 5.78612) (xy -18.36166 5.67182) (xy -18.34134 5.51688) (xy -18.3261 5.30606)
|
||||
(xy -18.3134 5.02666) (xy -18.30324 4.66598) (xy -18.29816 4.20624) (xy -18.29308 3.63728)
|
||||
(xy -18.29054 2.94386) (xy -18.29054 2.11328) (xy -18.29054 1.12776) (xy -18.288 0.889)
|
||||
(xy -18.29054 -0.13208) (xy -18.29054 -0.99568) (xy -18.29308 -1.71958) (xy -18.29562 -2.31394)
|
||||
(xy -18.30324 -2.79654) (xy -18.31086 -3.18008) (xy -18.32356 -3.47472) (xy -18.3388 -3.70078)
|
||||
(xy -18.35658 -3.86588) (xy -18.37944 -3.9878) (xy -18.40738 -4.08178) (xy -18.4404 -4.15798)
|
||||
(xy -18.45056 -4.17322) (xy -18.61058 -4.48818) (xy -17.01038 -4.48818) (xy -16.51 -4.48564)
|
||||
(xy -16.07566 -4.48056) (xy -15.73022 -4.4704) (xy -15.49908 -4.4577) (xy -15.41018 -4.44246)
|
||||
(xy -15.44574 -4.3434) (xy -15.53464 -4.16052) (xy -15.55496 -4.12496) (xy -15.61084 -3.9878)
|
||||
(xy -15.65402 -3.7973) (xy -15.6845 -3.52806) (xy -15.70736 -3.15468) (xy -15.72514 -2.64922)
|
||||
(xy -15.73276 -2.37236) (xy -15.75054 -1.70434) (xy -15.75816 -1.20396) (xy -15.748 -0.86106)
|
||||
(xy -15.70228 -0.6731) (xy -15.61084 -0.63754) (xy -15.46098 -0.74422) (xy -15.24 -0.99314)
|
||||
(xy -14.93266 -1.37668) (xy -14.5288 -1.8923) (xy -14.51102 -1.91516) (xy -14.04112 -2.51714)
|
||||
(xy -13.67028 -3.00482) (xy -13.39088 -3.39344) (xy -13.18768 -3.70078) (xy -13.0556 -3.94208)
|
||||
(xy -12.9794 -4.13004) (xy -12.95654 -4.28244) (xy -12.954 -4.29768) (xy -12.954 -4.48818)
|
||||
(xy -11.23696 -4.48818) (xy -9.51992 -4.48818) (xy -10.07364 -3.91668) (xy -10.25398 -3.7211)
|
||||
(xy -10.50544 -3.43154) (xy -10.81278 -3.06832) (xy -11.1633 -2.64922) (xy -11.54176 -2.19202)
|
||||
(xy -11.93038 -1.71704) (xy -12.319 -1.23952) (xy -12.68476 -0.78232) (xy -13.02004 -0.36068)
|
||||
(xy -13.30452 0.00254) (xy -13.5255 0.2921) (xy -13.66774 0.49022) (xy -13.716 0.57404)
|
||||
(xy -13.66774 0.66294) (xy -13.53058 0.86868) (xy -13.31976 1.17348) (xy -13.04798 1.55702)
|
||||
(xy -12.7254 2.00406) (xy -12.3698 2.49428) (xy -11.99388 3.00736) (xy -11.61034 3.5306)
|
||||
(xy -11.23442 4.0386) (xy -10.87628 4.51866) (xy -10.55116 4.95046) (xy -10.27176 5.31622)
|
||||
(xy -10.05332 5.59562) (xy -9.91108 5.76834) (xy -9.4742 6.26364) (xy -9.4742 6.26364))
|
||||
(pts (xy -5.75818 6.23316) (xy -5.83946 6.24332) (xy -6.06044 6.25094) (xy -6.39826 6.25856)
|
||||
(xy -6.82498 6.26364) (xy -7.239 6.26364) (xy -7.71906 6.2611) (xy -8.13562 6.25856)
|
||||
(xy -8.4582 6.25094) (xy -8.6614 6.24078) (xy -8.72236 6.23316) (xy -8.69188 6.14172)
|
||||
(xy -8.61822 5.95376) (xy -8.59536 5.89534) (xy -8.5598 5.72262) (xy -8.52932 5.40512)
|
||||
(xy -8.50392 4.9657) (xy -8.4836 4.42468) (xy -8.46836 3.81) (xy -8.4582 3.14198)
|
||||
(xy -8.45566 2.44602) (xy -8.45566 1.74498) (xy -8.46074 1.06172) (xy -8.47344 0.42164)
|
||||
(xy -8.49122 -0.15494) (xy -8.51408 -0.64262) (xy -8.54202 -1.01854) (xy -8.57504 -1.25984)
|
||||
(xy -8.59028 -1.31572) (xy -8.7122 -1.61036) (xy -7.36346 -1.61036) (xy -6.01218 -1.61036)
|
||||
(xy -6.01218 1.99136) (xy -6.01218 2.8956) (xy -6.00964 3.6449) (xy -6.00456 4.2545)
|
||||
(xy -5.9944 4.74472) (xy -5.98424 5.12572) (xy -5.96646 5.41274) (xy -5.94614 5.6261)
|
||||
(xy -5.92074 5.77596) (xy -5.89026 5.88264) (xy -5.88518 5.89534) (xy -5.8039 6.09854)
|
||||
(xy -5.76072 6.22046) (xy -5.75818 6.23316) (xy -5.75818 6.23316))
|
||||
(pts (xy 8.636 3.4544) (xy 8.62838 3.80238) (xy 8.60298 4.0259) (xy 8.54964 4.17322)
|
||||
(xy 8.45312 4.28752) (xy 8.4455 4.29514) (xy 8.08736 4.52628) (xy 7.66826 4.64058)
|
||||
(xy 7.24408 4.62788) (xy 7.05866 4.572) (xy 6.77672 4.37388) (xy 6.5913 4.07924)
|
||||
(xy 6.5405 3.74142) (xy 6.54558 3.70078) (xy 6.60146 3.45186) (xy 6.68782 3.25882)
|
||||
(xy 6.70052 3.24104) (xy 6.96468 3.03784) (xy 7.35076 2.88798) (xy 7.81812 2.8067)
|
||||
(xy 8.0645 2.794) (xy 8.636 2.794) (xy 8.636 3.4544) (xy 8.636 3.4544))
|
||||
(pts (xy 17.018 4.04876) (xy 16.7259 4.2291) (xy 16.34744 4.3942) (xy 15.94358 4.46024)
|
||||
(xy 15.56766 4.4196) (xy 15.35938 4.3307) (xy 15.13332 4.15544) (xy 14.9733 3.93192)
|
||||
(xy 14.86408 3.6322) (xy 14.80058 3.23342) (xy 14.77518 2.70764) (xy 14.77264 2.45364)
|
||||
(xy 14.79296 1.77546) (xy 14.859 1.23952) (xy 14.97076 0.82296) (xy 15.1384 0.508)
|
||||
(xy 15.33652 0.29718) (xy 15.66418 0.127) (xy 16.06042 0.08382) (xy 16.48714 0.17018)
|
||||
(xy 16.68018 0.254) (xy 17.018 0.42672) (xy 17.018 2.23774) (xy 17.018 4.04876)
|
||||
(xy 17.018 4.04876)) )
|
||||
)
|
|
@ -6,7 +6,6 @@ include_directories(
|
|||
./dialogs
|
||||
../common
|
||||
../common/dialogs
|
||||
${Boost_INCLUDE_DIR}
|
||||
${INC_AFTER}
|
||||
)
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
block->SetState( state );
|
||||
block->SetCommand( command );
|
||||
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
||||
GetScreen()->SetCrossHairPosition( block->GetEnd() );
|
||||
SetCrossHairPosition( block->GetEnd() );
|
||||
|
||||
if( block->GetCommand() != BLOCK_ABORT )
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
|
@ -237,8 +237,8 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
{
|
||||
// Compute the rotation center and put it on grid:
|
||||
wxPoint rotationPoint = block->Centre();
|
||||
rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint );
|
||||
GetScreen()->SetCrossHairPosition( rotationPoint );
|
||||
rotationPoint = GetNearestGridPosition( rotationPoint );
|
||||
SetCrossHairPosition( rotationPoint );
|
||||
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
||||
RotateListOfItems( block->GetItems(), rotationPoint );
|
||||
OnModify();
|
||||
|
@ -433,8 +433,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
|||
{
|
||||
/* Compute the rotation center and put it on grid */
|
||||
wxPoint rotationPoint = block->Centre();
|
||||
rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint );
|
||||
GetScreen()->SetCrossHairPosition( rotationPoint );
|
||||
rotationPoint = GetNearestGridPosition( rotationPoint );
|
||||
SetCrossHairPosition( rotationPoint );
|
||||
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
||||
RotateListOfItems( block->GetItems(), rotationPoint );
|
||||
OnModify();
|
||||
|
@ -452,8 +452,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
|||
{
|
||||
/* Compute the mirror center and put it on grid */
|
||||
wxPoint mirrorPoint = block->Centre();
|
||||
mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint );
|
||||
GetScreen()->SetCrossHairPosition( mirrorPoint );
|
||||
mirrorPoint = GetNearestGridPosition( mirrorPoint );
|
||||
SetCrossHairPosition( mirrorPoint );
|
||||
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_X, mirrorPoint );
|
||||
MirrorX( block->GetItems(), mirrorPoint );
|
||||
OnModify();
|
||||
|
@ -471,8 +471,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
|||
{
|
||||
/* Compute the mirror center and put it on grid */
|
||||
wxPoint mirrorPoint = block->Centre();
|
||||
mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint );
|
||||
GetScreen()->SetCrossHairPosition( mirrorPoint );
|
||||
mirrorPoint = GetNearestGridPosition( mirrorPoint );
|
||||
SetCrossHairPosition( mirrorPoint );
|
||||
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_Y, mirrorPoint );
|
||||
MirrorY( block->GetItems(), mirrorPoint );
|
||||
OnModify();
|
||||
|
@ -519,7 +519,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
|||
}
|
||||
|
||||
/* Repaint new view. */
|
||||
block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
||||
block->SetMoveVector( aPanel->GetParent()->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
||||
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
||||
|
||||
for( unsigned ii = 0; ii < block->GetCount(); ii++ )
|
||||
|
|
|
@ -99,8 +99,8 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
GetScreen()->m_BlockLocate.SetState( state );
|
||||
GetScreen()->m_BlockLocate.SetCommand( command );
|
||||
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
||||
GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
|
||||
GetScreen()->m_BlockLocate.GetBottom() ) );
|
||||
SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
|
||||
GetScreen()->m_BlockLocate.GetBottom() ) );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
SaveCopyInUndoList( m_component );
|
||||
|
||||
pt = GetScreen()->m_BlockLocate.Centre();
|
||||
pt = GetScreen()->GetNearestGridPosition( pt );
|
||||
pt = GetNearestGridPosition( pt );
|
||||
NEGATE( pt.y );
|
||||
|
||||
if ( m_component )
|
||||
|
@ -183,7 +183,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
m_component->MirrorSelectedItemsH( pt );
|
||||
else if( block_cmd == BLOCK_MIRROR_X)
|
||||
m_component->MirrorSelectedItemsV( pt );
|
||||
else if( block_cmd == BLOCK_ROTATE)
|
||||
else if( block_cmd == BLOCK_ROTATE )
|
||||
m_component->RotateSelectedItems( pt );
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
SaveCopyInUndoList( m_component );
|
||||
|
||||
pt = GetScreen()->m_BlockLocate.Centre();
|
||||
pt = GetScreen()->GetNearestGridPosition( pt );
|
||||
pt = GetNearestGridPosition( pt );
|
||||
NEGATE( pt.y );
|
||||
|
||||
if ( m_component )
|
||||
|
@ -342,7 +342,7 @@ void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
|||
}
|
||||
|
||||
// Repaint new view
|
||||
block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
||||
block->SetMoveVector( parent->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
||||
|
||||
GRSetDrawMode( aDC, g_XorMode );
|
||||
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
||||
|
|
|
@ -81,8 +81,9 @@ static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
|
|||
}
|
||||
}
|
||||
|
||||
wxPoint endpos = aPanel->GetScreen()->GetCrossHairPosition();
|
||||
SCH_EDIT_FRAME * frame = ( SCH_EDIT_FRAME * ) aPanel->GetParent();
|
||||
SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) aPanel->GetParent();
|
||||
|
||||
wxPoint endpos = frame->GetCrossHairPosition();
|
||||
|
||||
if( frame->GetForceHVLines() ) /* Coerce the line to vertical or horizontal one: */
|
||||
ComputeBreakPoint( (SCH_LINE*) s_wires.GetLast()->Back(), endpos );
|
||||
|
@ -105,7 +106,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
|
|||
{
|
||||
SCH_LINE* segment;
|
||||
SCH_LINE* nextSegment;
|
||||
wxPoint cursorpos = GetScreen()->GetCrossHairPosition();
|
||||
wxPoint cursorpos = GetCrossHairPosition();
|
||||
|
||||
// We should know if a segment is currently in progress
|
||||
segment = (SCH_LINE*) GetScreen()->GetCurItem();
|
||||
|
@ -161,7 +162,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
|
|||
}
|
||||
|
||||
m_canvas->SetMouseCapture( DrawSegment, AbortCreateNewLine );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
}
|
||||
else // A segment is in progress: terminates the current segment and add a new segment.
|
||||
{
|
||||
|
@ -238,7 +239,8 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC )
|
|||
return;
|
||||
|
||||
// Get the last non-null wire (this is the last created segment).
|
||||
m_itemToRepeat = segment = (SCH_LINE*) s_wires.GetLast();
|
||||
SetRepeatItem( segment = (SCH_LINE*) s_wires.GetLast() );
|
||||
|
||||
screen->SetCurItem( NULL );
|
||||
m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false );
|
||||
|
||||
|
@ -340,7 +342,7 @@ void SCH_EDIT_FRAME::DeleteCurrentSegment( wxDC* DC )
|
|||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
if( ( screen->GetCurItem() == NULL ) || !screen->GetCurItem()->IsNew() )
|
||||
return;
|
||||
|
@ -358,7 +360,7 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition,
|
|||
{
|
||||
SCH_JUNCTION* junction = new SCH_JUNCTION( aPosition );
|
||||
|
||||
m_itemToRepeat = junction;
|
||||
SetRepeatItem( junction );
|
||||
|
||||
m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
|
||||
junction->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
|
@ -377,19 +379,19 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition,
|
|||
|
||||
SCH_NO_CONNECT* SCH_EDIT_FRAME::AddNoConnect( wxDC* aDC, const wxPoint& aPosition )
|
||||
{
|
||||
SCH_NO_CONNECT* NewNoConnect;
|
||||
SCH_NO_CONNECT* no_connect = new SCH_NO_CONNECT( aPosition );
|
||||
|
||||
NewNoConnect = new SCH_NO_CONNECT( aPosition );
|
||||
m_itemToRepeat = NewNoConnect;
|
||||
SetRepeatItem( no_connect );
|
||||
|
||||
m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
|
||||
NewNoConnect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
no_connect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
|
||||
m_canvas->CrossHairOn( aDC ); // Display schematic cursor
|
||||
|
||||
GetScreen()->Append( NewNoConnect );
|
||||
GetScreen()->Append( no_connect );
|
||||
OnModify();
|
||||
SaveCopyInUndoList( NewNoConnect, UR_NEW );
|
||||
return NewNoConnect;
|
||||
SaveCopyInUndoList( no_connect, UR_NEW );
|
||||
return no_connect;
|
||||
}
|
||||
|
||||
|
||||
|
@ -419,34 +421,44 @@ static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
|
||||
void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
|
||||
{
|
||||
if( m_itemToRepeat == NULL )
|
||||
SCH_ITEM* repeater = GetRepeatItem();
|
||||
|
||||
if( !repeater )
|
||||
return;
|
||||
|
||||
m_itemToRepeat = (SCH_ITEM*) m_itemToRepeat->Clone();
|
||||
//D( repeater>Show( 0, std::cout ); )
|
||||
|
||||
if( m_itemToRepeat->Type() == SCH_COMPONENT_T ) // If repeat component then put in move mode
|
||||
// clone the repeater, move it, insert into display list, then save a copy
|
||||
// via SetRepeatItem();
|
||||
|
||||
SCH_ITEM* my_clone = (SCH_ITEM*) repeater->Clone();
|
||||
|
||||
// If cloning a component then put into 'move' mode.
|
||||
if( my_clone->Type() == SCH_COMPONENT_T )
|
||||
{
|
||||
wxPoint pos = GetScreen()->GetCrossHairPosition() -
|
||||
( (SCH_COMPONENT*) m_itemToRepeat )->GetPosition();
|
||||
m_itemToRepeat->SetFlags( IS_NEW );
|
||||
( (SCH_COMPONENT*) m_itemToRepeat )->SetTimeStamp( GetNewTimeStamp() );
|
||||
m_itemToRepeat->Move( pos );
|
||||
m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
|
||||
MoveItem( m_itemToRepeat, DC );
|
||||
return;
|
||||
wxPoint pos = GetCrossHairPosition() -
|
||||
( (SCH_COMPONENT*) my_clone )->GetPosition();
|
||||
|
||||
my_clone->SetFlags( IS_NEW );
|
||||
( (SCH_COMPONENT*) my_clone )->SetTimeStamp( GetNewTimeStamp() );
|
||||
my_clone->Move( pos );
|
||||
my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
|
||||
MoveItem( my_clone, DC );
|
||||
}
|
||||
|
||||
m_itemToRepeat->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) );
|
||||
|
||||
if( m_itemToRepeat->CanIncrementLabel() )
|
||||
( (SCH_TEXT*) m_itemToRepeat )->IncrementLabel();
|
||||
|
||||
if( m_itemToRepeat )
|
||||
else
|
||||
{
|
||||
GetScreen()->Append( m_itemToRepeat );
|
||||
my_clone->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) );
|
||||
|
||||
if( my_clone->CanIncrementLabel() )
|
||||
( (SCH_TEXT*) my_clone )->IncrementLabel();
|
||||
|
||||
GetScreen()->Append( my_clone );
|
||||
GetScreen()->TestDanglingEnds();
|
||||
m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
SaveCopyInUndoList( m_itemToRepeat, UR_NEW );
|
||||
m_itemToRepeat->ClearFlags();
|
||||
my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
SaveCopyInUndoList( my_clone, UR_NEW );
|
||||
my_clone->ClearFlags();
|
||||
}
|
||||
|
||||
// clone my_clone, now that it has been moved, thus saving new position.
|
||||
SetRepeatItem( my_clone );
|
||||
}
|
||||
|
|
|
@ -45,10 +45,9 @@ static int s_LastShape = '\\';
|
|||
|
||||
SCH_BUS_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusBusEntry( wxDC* aDC )
|
||||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
||||
// Create and place a new bus entry at cursor position
|
||||
SCH_BUS_BUS_ENTRY* busEntry = new SCH_BUS_BUS_ENTRY( screen->GetCrossHairPosition(), s_LastShape );
|
||||
SCH_BUS_BUS_ENTRY* busEntry = new SCH_BUS_BUS_ENTRY( GetCrossHairPosition(), s_LastShape );
|
||||
|
||||
busEntry->SetFlags( IS_NEW );
|
||||
GetScreen()->SetCurItem( busEntry );
|
||||
addCurrentItemToList( aDC );
|
||||
|
@ -57,10 +56,9 @@ SCH_BUS_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusBusEntry( wxDC* aDC )
|
|||
|
||||
SCH_BUS_WIRE_ENTRY* SCH_EDIT_FRAME::CreateBusWireEntry( wxDC* aDC )
|
||||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
||||
// Create and place a new bus entry at cursor position
|
||||
SCH_BUS_WIRE_ENTRY* busEntry = new SCH_BUS_WIRE_ENTRY( screen->GetCrossHairPosition(), s_LastShape );
|
||||
SCH_BUS_WIRE_ENTRY* busEntry = new SCH_BUS_WIRE_ENTRY( GetCrossHairPosition(), s_LastShape );
|
||||
|
||||
busEntry->SetFlags( IS_NEW );
|
||||
GetScreen()->SetCurItem( busEntry );
|
||||
addCurrentItemToList( aDC );
|
||||
|
|
|
@ -731,7 +731,7 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter )
|
|||
|
||||
try
|
||||
{
|
||||
aFormatter.Print( 0, "%s Date: %s\n", DOCFILE_IDENT, TO_UTF8( DateAndTime() ) );
|
||||
aFormatter.Print( 0, "%s\n", DOCFILE_IDENT );
|
||||
|
||||
for( LIB_ALIAS_MAP::iterator it=aliases.begin(); it!=aliases.end(); it++ )
|
||||
{
|
||||
|
@ -752,8 +752,8 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter )
|
|||
|
||||
bool CMP_LIBRARY::SaveHeader( OUTPUTFORMATTER& aFormatter )
|
||||
{
|
||||
aFormatter.Print( 0, "%s %d.%d Date: %s\n", LIBFILE_IDENT,
|
||||
LIB_VERSION_MAJOR, LIB_VERSION_MINOR, TO_UTF8( DateAndTime() ) );
|
||||
aFormatter.Print( 0, "%s %d.%d\n", LIBFILE_IDENT,
|
||||
LIB_VERSION_MAJOR, LIB_VERSION_MINOR );
|
||||
|
||||
aFormatter.Print( 0, "#encoding utf-8\n");
|
||||
|
||||
|
|
|
@ -35,6 +35,26 @@
|
|||
#include <general.h>
|
||||
#include <sch_component.h>
|
||||
|
||||
#include <wx/regex.h>
|
||||
|
||||
|
||||
/**
|
||||
* The regular expression string for label bus notation. Valid bus labels are defined as
|
||||
* one or more non-whitespace characters from the beginning of the string followed by the
|
||||
* bus notation [nn...mm] with no characters after the closing bracket.
|
||||
*/
|
||||
static wxRegEx busLabelRe( wxT( "^([^[:space:]]+)(\\[[\\d]+\\.+[\\d]+\\])$" ), wxRE_ADVANCED );
|
||||
|
||||
|
||||
bool IsBusLabel( const wxString& aLabel )
|
||||
{
|
||||
wxCHECK_MSG( busLabelRe.IsValid(), false,
|
||||
wxT( "Invalid regular expression in IsBusLabel()." ) );
|
||||
|
||||
return busLabelRe.Matches( aLabel );
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
#include <iostream>
|
||||
|
@ -220,31 +240,32 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem
|
|||
wxCHECK_RET( false, wxT( "Net list object type is not valid." ) );
|
||||
|
||||
unsigned i;
|
||||
wxString tmp, busName;
|
||||
wxString tmp, busName, busNumber;
|
||||
long begin, end, member;
|
||||
|
||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
||||
i = m_Label.Find( '[' );
|
||||
busName = busLabelRe.GetMatch( m_Label, 1 );
|
||||
busNumber = busLabelRe.GetMatch( m_Label, 2 );
|
||||
|
||||
busName = m_Label.Left( i );
|
||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
||||
i = busNumber.Find( '[' );
|
||||
i++;
|
||||
|
||||
while( m_Label[i] != '.' && i < m_Label.Len() )
|
||||
while( busNumber[i] != '.' && i < busNumber.Len() )
|
||||
{
|
||||
tmp.Append( m_Label[i] );
|
||||
tmp.Append( busNumber[i] );
|
||||
i++;
|
||||
}
|
||||
|
||||
tmp.ToLong( &begin );
|
||||
|
||||
while( m_Label[i] == '.' && i < m_Label.Len() )
|
||||
while( busNumber[i] == '.' && i < busNumber.Len() )
|
||||
i++;
|
||||
|
||||
tmp.Empty();
|
||||
|
||||
while( m_Label[i] != ']' && i < m_Label.Len() )
|
||||
while( busNumber[i] != ']' && i < busNumber.Len() )
|
||||
{
|
||||
tmp.Append( m_Label[i] );
|
||||
tmp.Append( busNumber[i] );
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,11 +96,7 @@ enum NET_CONNECTION_T {
|
|||
* @param aLabel A wxString object containing the label to test.
|
||||
* @return true if text is a bus notation format otherwise false is returned.
|
||||
*/
|
||||
inline bool IsBusLabel( const wxString& aLabel )
|
||||
{
|
||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
||||
return aLabel.Find( '[' ) != wxNOT_FOUND;
|
||||
}
|
||||
extern bool IsBusLabel( const wxString& aLabel );
|
||||
|
||||
|
||||
class NETLIST_OBJECT
|
||||
|
|
|
@ -56,7 +56,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
|
|||
wxString msg;
|
||||
LIB_PIN* Pin = NULL;
|
||||
SCH_COMPONENT* LibItem = NULL;
|
||||
wxPoint gridPosition = GetScreen()->GetNearestGridPosition( aPosition );
|
||||
wxPoint gridPosition = GetNearestGridPosition( aPosition );
|
||||
|
||||
// Check the on grid position first. There is more likely to be multiple items on
|
||||
// grid than off grid.
|
||||
|
@ -222,9 +222,9 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
snapToGrid = true;
|
||||
|
||||
if( snapToGrid )
|
||||
pos = screen->GetNearestGridPosition( pos );
|
||||
pos = GetNearestGridPosition( pos );
|
||||
|
||||
oldpos = screen->GetCrossHairPosition();
|
||||
oldpos = GetCrossHairPosition();
|
||||
gridSize = screen->GetGridSize();
|
||||
|
||||
switch( aHotKey )
|
||||
|
@ -261,14 +261,14 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
}
|
||||
|
||||
// Update cursor position.
|
||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
|
||||
if( oldpos != screen->GetCrossHairPosition() )
|
||||
if( oldpos != GetCrossHairPosition() )
|
||||
{
|
||||
pos = screen->GetCrossHairPosition();
|
||||
screen->SetCrossHairPosition( oldpos, false);
|
||||
pos = GetCrossHairPosition();
|
||||
SetCrossHairPosition( oldpos, false);
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
@ -304,7 +304,6 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
|
||||
{
|
||||
wxRealPoint gridSize;
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
wxPoint oldpos;
|
||||
wxPoint pos = aPosition;
|
||||
|
||||
|
@ -320,10 +319,10 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
snapToGrid = true;
|
||||
|
||||
if( snapToGrid )
|
||||
pos = screen->GetNearestGridPosition( pos );
|
||||
pos = GetNearestGridPosition( pos );
|
||||
|
||||
oldpos = screen->GetCrossHairPosition();
|
||||
gridSize = screen->GetGridSize();
|
||||
oldpos = GetCrossHairPosition();
|
||||
gridSize = GetScreen()->GetGridSize();
|
||||
|
||||
switch( aHotKey )
|
||||
{
|
||||
|
@ -359,14 +358,14 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
}
|
||||
|
||||
// Update the cursor position.
|
||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
|
||||
if( oldpos != screen->GetCrossHairPosition() )
|
||||
if( oldpos != GetCrossHairPosition() )
|
||||
{
|
||||
pos = screen->GetCrossHairPosition();
|
||||
screen->SetCrossHairPosition( oldpos, false );
|
||||
pos = GetCrossHairPosition();
|
||||
SetCrossHairPosition( oldpos, false );
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
||||
SetCrossHairPosition( pos, snapToGrid );
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
@ -403,8 +402,8 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
wxPoint oldpos;
|
||||
wxPoint pos = aPosition;
|
||||
|
||||
pos = screen->GetNearestGridPosition( pos );
|
||||
oldpos = screen->GetCrossHairPosition();
|
||||
pos = GetNearestGridPosition( pos );
|
||||
oldpos = GetCrossHairPosition();
|
||||
gridSize = screen->GetGridSize();
|
||||
|
||||
switch( aHotKey )
|
||||
|
@ -441,14 +440,14 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
}
|
||||
|
||||
// Update cursor position.
|
||||
screen->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
|
||||
if( oldpos != screen->GetCrossHairPosition() )
|
||||
if( oldpos != GetCrossHairPosition() )
|
||||
{
|
||||
pos = screen->GetCrossHairPosition();
|
||||
screen->SetCrossHairPosition( oldpos );
|
||||
pos = GetCrossHairPosition();
|
||||
SetCrossHairPosition( oldpos );
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
screen->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <appl_wxstruct.h>
|
||||
|
@ -112,6 +113,7 @@ private:
|
|||
void addFieldButtonHandler( wxCommandEvent& event );
|
||||
void deleteFieldButtonHandler( wxCommandEvent& event );
|
||||
void moveUpButtonHandler( wxCommandEvent& event );
|
||||
void showButtonHandler( wxCommandEvent& event );
|
||||
|
||||
SCH_FIELD* findField( const wxString& aFieldName );
|
||||
|
||||
|
@ -252,8 +254,11 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
|
|||
if( m_Cmp->GetUnit() )
|
||||
{
|
||||
int unit_selection = unitChoice->GetCurrentSelection() + 1;
|
||||
STATUS_FLAGS flags = m_Cmp->GetFlags();
|
||||
m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection );
|
||||
m_Cmp->SetUnit( unit_selection );
|
||||
m_Cmp->ClearFlags();
|
||||
m_Cmp->SetFlags( flags ); // Restore m_Flag modified by SetUnit()
|
||||
}
|
||||
|
||||
switch( orientationRadioBox->GetSelection() )
|
||||
|
@ -327,13 +332,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event
|
|||
&& !m_Parent->GetTemplates().HasFieldName( m_FieldsBuf[i].GetName( false ) )
|
||||
&& !removeRemainingFields )
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
msg.Printf( _( "The field name <%s> does not have a value and is not defined in "
|
||||
"the field template list. Empty field values are invalid an will "
|
||||
"be removed from the component. Do you wish to remove this and "
|
||||
"all remaining undefined fields?" ),
|
||||
GetChars( m_FieldsBuf[i].GetName( false ) ) );
|
||||
wxString msg = wxString::Format(
|
||||
_( "The field name <%s> does not have a value and is not defined in "
|
||||
"the field template list. Empty field values are invalid an will "
|
||||
"be removed from the component. Do you wish to remove this and "
|
||||
"all remaining undefined fields?" ),
|
||||
GetChars( m_FieldsBuf[i].GetName( false ) )
|
||||
);
|
||||
|
||||
wxMessageDialog dlg( this, msg, _( "Remove Fields" ), wxYES_NO | wxNO_DEFAULT );
|
||||
|
||||
|
@ -428,6 +433,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event )
|
||||
{
|
||||
wxString datasheet_uri = fieldValueTextCtrl->GetValue();
|
||||
::wxLaunchDefaultBrowser( datasheet_uri );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::moveUpButtonHandler( wxCommandEvent& event )
|
||||
{
|
||||
unsigned fieldNdx = getSelectedFieldNdx();
|
||||
|
@ -721,6 +733,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
|
|||
|
||||
fieldValueTextCtrl->SetValue( field.GetText() );
|
||||
|
||||
m_show_datasheet_button->Enable( fieldNdx == DATASHEET );
|
||||
|
||||
// For power symbols, the value is NOR editable, because value and pin
|
||||
// name must be same and can be edited only in library editor
|
||||
if( fieldNdx == VALUE && m_LibEntry && m_LibEntry->IsPower() )
|
||||
|
|
|
@ -178,26 +178,25 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
|||
fieldNameTextCtrl->SetMaxLength( 0 );
|
||||
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
||||
|
||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* fieldTextBoxSizer;
|
||||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fieldValueLabel->Wrap( -1 );
|
||||
fieldTextBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 );
|
||||
fieldNameBoxSizer->Add( fieldValueLabel, 0, wxALIGN_TOP|wxTOP, 5 );
|
||||
|
||||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fieldValueTextCtrl->SetMaxLength( 0 );
|
||||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||
fieldValueTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
||||
|
||||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
||||
fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
||||
|
||||
m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") );
|
||||
|
||||
fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
|
||||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxEXPAND, 5 );
|
||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerPosSize;
|
||||
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||
|
@ -271,6 +270,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
|||
|
||||
this->SetSizer( mainSizer );
|
||||
this->Layout();
|
||||
mainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
|
||||
|
@ -279,6 +279,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
|||
addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
|
||||
deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
|
||||
moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
|
||||
m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showButtonHandler ), NULL, this );
|
||||
stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
|
||||
stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
|
@ -292,6 +293,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
|||
addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this );
|
||||
deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this );
|
||||
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this );
|
||||
m_show_datasheet_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showButtonHandler ), NULL, this );
|
||||
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this );
|
||||
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this );
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">700,496</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Component Properties</property>
|
||||
|
@ -1808,7 +1808,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -1900,7 +1900,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1989,20 +1989,9 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fieldTextBoxSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP</property>
|
||||
<property name="flag">wxALIGN_TOP|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2083,11 +2072,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="0">
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -2136,7 +2125,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">The text (or value) of the currently selected field</property>
|
||||
<property name="tooltip">The name of the currently selected field
Some fixed fields names are not editable</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -2174,6 +2163,94 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show in Browser</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_show_datasheet_button</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">showButtonHandler</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
|
|
@ -63,6 +63,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
|
|||
wxTextCtrl* fieldNameTextCtrl;
|
||||
wxStaticText* fieldValueLabel;
|
||||
wxTextCtrl* fieldValueTextCtrl;
|
||||
wxButton* m_show_datasheet_button;
|
||||
wxStaticText* textSizeLabel;
|
||||
wxTextCtrl* textSizeTextCtrl;
|
||||
wxStaticText* m_staticTextUnitSize;
|
||||
|
@ -83,13 +84,14 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
|
|||
virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void showButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,496 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
|
||||
|
||||
};
|
||||
|
|
|
@ -102,13 +102,19 @@ void DIALOG_LABEL_EDITOR::InitDialog()
|
|||
if( m_CurrentText->IsMultilineAllowed() )
|
||||
{
|
||||
m_textLabel = m_textLabelMultiLine;
|
||||
m_textLabelSingleLine->Show(false);
|
||||
m_textLabelSingleLine->Show( false );
|
||||
multiLine = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textLabel = m_textLabelSingleLine;
|
||||
m_textLabelMultiLine->Show(false);
|
||||
m_textLabelMultiLine->Show( false );
|
||||
wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator();
|
||||
wxArrayString excludes;
|
||||
|
||||
// Add invalid label characters to this list.
|
||||
excludes.Add( wxT( " " ) );
|
||||
validator->SetExcludes( excludes );
|
||||
}
|
||||
|
||||
m_textLabel->SetValue( m_CurrentText->GetText() );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 30 2013)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -32,9 +32,13 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
|||
bSizeText = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_textLabelSingleLine->SetMaxLength( 0 );
|
||||
m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
|
||||
|
||||
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
||||
|
||||
m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
|
||||
m_textLabelMultiLine->SetMaxLength( 0 );
|
||||
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
|
||||
|
||||
bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
|
||||
|
@ -50,6 +54,7 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
|||
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TextSize->SetMaxLength( 0 );
|
||||
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
|
|
@ -253,10 +253,10 @@
|
|||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="validator_data_type">wxString</property>
|
||||
<property name="validator_style">wxFILTER_EXCLUDE_CHAR_LIST</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable">m_labelText</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 10 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 30 2013)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -11,6 +11,8 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class DIALOG_SHIM;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -19,6 +21,7 @@
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/button.h>
|
||||
|
@ -62,6 +65,7 @@ class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM
|
|||
|
||||
|
||||
public:
|
||||
wxString m_labelText;
|
||||
|
||||
DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LABEL_EDITOR_BASE();
|
||||
|
|
|
@ -77,6 +77,7 @@ private:
|
|||
void moveUpButtonHandler( wxCommandEvent& event );
|
||||
void OnCancelButtonClick( wxCommandEvent& event );
|
||||
void OnOKButtonClick( wxCommandEvent& event );
|
||||
void showButtonHandler( wxCommandEvent& event );
|
||||
|
||||
// internal functions:
|
||||
void setSelectedFieldNdx( int aFieldNdx );
|
||||
|
@ -379,6 +380,13 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler( wxCommandEvent& event )
|
||||
{
|
||||
wxString datasheet_uri = fieldValueTextCtrl->GetValue();
|
||||
::wxLaunchDefaultBrowser( datasheet_uri );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::setSelectedFieldNdx( int aFieldNdx )
|
||||
{
|
||||
// deselect old selection, but I think this is done by single selection
|
||||
|
@ -645,6 +653,8 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel()
|
|||
|
||||
textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( g_UserUnit, field.GetSize().x ) );
|
||||
|
||||
m_show_datasheet_button->Enable( fieldNdx == DATASHEET );
|
||||
|
||||
wxPoint coord = field.GetTextPosition();
|
||||
wxPoint zero;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 30 2013)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -109,26 +109,25 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
|||
fieldNameTextCtrl->SetMaxLength( 0 );
|
||||
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||
|
||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* fieldTextBoxSizer;
|
||||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fieldValueLabel->Wrap( -1 );
|
||||
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 );
|
||||
fieldNameBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 );
|
||||
|
||||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fieldValueTextCtrl->SetMaxLength( 0 );
|
||||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||
|
||||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
||||
fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_show_datasheet_button->SetToolTip( _("If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser.") );
|
||||
|
||||
fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
|
||||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizerPosSize;
|
||||
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||
|
@ -200,6 +199,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
|||
|
||||
this->SetSizer( mainSizer );
|
||||
this->Layout();
|
||||
mainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) );
|
||||
|
@ -208,6 +208,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
|||
addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this );
|
||||
deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this );
|
||||
moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this );
|
||||
m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::showButtonHandler ), NULL, this );
|
||||
stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this );
|
||||
stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
|
@ -221,6 +222,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BAS
|
|||
addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this );
|
||||
deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this );
|
||||
moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this );
|
||||
m_show_datasheet_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::showButtonHandler ), NULL, this );
|
||||
stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this );
|
||||
stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this );
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">615,456</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">Fields Properties</property>
|
||||
|
@ -975,7 +975,7 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fieldNameBoxSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
|
@ -1065,7 +1065,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1154,20 +1154,9 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">fieldTextBoxSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag"></property>
|
||||
<property name="flag">wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1250,7 +1239,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1339,6 +1328,94 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show in Browser</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_show_datasheet_button</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">showButtonHandler</event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||
// C++ code generated with wxFormBuilder (version Apr 30 2013)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -51,6 +51,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
|
|||
wxTextCtrl* fieldNameTextCtrl;
|
||||
wxStaticText* fieldValueLabel;
|
||||
wxTextCtrl* fieldValueTextCtrl;
|
||||
wxButton* m_show_datasheet_button;
|
||||
wxStaticText* textSizeLabel;
|
||||
wxTextCtrl* textSizeTextCtrl;
|
||||
wxStaticText* m_staticTextUnitSize;
|
||||
|
@ -72,13 +73,14 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
|
|||
virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void showButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 615,456 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -205,7 +205,7 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
m_lastMarkerFound = marker;
|
||||
m_parent->GetScreen()->SetCrossHairPosition( marker->m_Pos );
|
||||
m_parent->SetCrossHairPosition( marker->m_Pos );
|
||||
m_parent->RedrawScreen( marker->m_Pos, false);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
|
|||
// (NULL if not found)
|
||||
if( m_lastMarkerFound )
|
||||
{
|
||||
m_parent->GetScreen()->SetCrossHairPosition( m_lastMarkerFound->m_Pos );
|
||||
m_parent->SetCrossHairPosition( m_lastMarkerFound->m_Pos );
|
||||
m_parent->RedrawScreen( m_lastMarkerFound->m_Pos, true);
|
||||
// prevent a mouse left button release event in
|
||||
// coming from the ERC dialog double click
|
||||
|
|
|
@ -93,7 +93,7 @@ static void moveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosit
|
|||
}
|
||||
|
||||
// Draw the bitmap at it's new position.
|
||||
image->SetPosition( screen->GetCrossHairPosition() );
|
||||
image->SetPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||
image->Draw( aPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
wxPoint pos = GetScreen()->GetCrossHairPosition();
|
||||
wxPoint pos = GetCrossHairPosition();
|
||||
|
||||
SCH_BITMAP* image = new SCH_BITMAP( pos );
|
||||
|
||||
|
@ -144,12 +144,12 @@ void SCH_EDIT_FRAME::MoveImage( SCH_BITMAP* aImageItem, wxDC* aDC )
|
|||
|
||||
m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap );
|
||||
GetScreen()->SetCurItem( aImageItem );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
SetUndoItem( aImageItem );
|
||||
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
GetScreen()->SetCrossHairPosition( aImageItem->GetPosition() );
|
||||
SetCrossHairPosition( aImageItem->GetPosition() );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
|
|
|
@ -72,25 +72,25 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
|
|||
{
|
||||
SCH_TEXT* textItem = NULL;
|
||||
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
case LAYER_NOTES:
|
||||
textItem = new SCH_TEXT( GetScreen()->GetCrossHairPosition() );
|
||||
textItem = new SCH_TEXT( GetCrossHairPosition() );
|
||||
break;
|
||||
|
||||
case LAYER_LOCLABEL:
|
||||
textItem = new SCH_LABEL( GetScreen()->GetCrossHairPosition() );
|
||||
textItem = new SCH_LABEL( GetCrossHairPosition() );
|
||||
break;
|
||||
|
||||
case LAYER_HIERLABEL:
|
||||
textItem = new SCH_HIERLABEL( GetScreen()->GetCrossHairPosition() );
|
||||
textItem = new SCH_HIERLABEL( GetCrossHairPosition() );
|
||||
textItem->SetShape( lastGlobalLabelShape );
|
||||
break;
|
||||
|
||||
case LAYER_GLOBLABEL:
|
||||
textItem = new SCH_GLOBALLABEL( GetScreen()->GetCrossHairPosition() );
|
||||
textItem = new SCH_GLOBALLABEL( GetCrossHairPosition() );
|
||||
textItem->SetShape( lastGlobalLabelShape );
|
||||
break;
|
||||
|
||||
|
@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
OnModify();
|
||||
newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||
m_canvas->CrossHairOn( &dc ); // redraw schematic cursor
|
||||
|
|
|
@ -90,7 +90,7 @@ void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event )
|
|||
m_CurrentSheet->UpdateAllScreenReferences();
|
||||
}
|
||||
|
||||
sheetFoundIn->LastScreen()->SetCrossHairPosition( lastMarker->GetPosition() );
|
||||
SetCrossHairPosition( lastMarker->GetPosition() );
|
||||
|
||||
RedrawScreen( lastMarker->GetPosition(), warpCursor );
|
||||
|
||||
|
@ -213,7 +213,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
|||
|
||||
if( centerAndRedraw )
|
||||
{
|
||||
GetScreen()->SetCrossHairPosition(pos);
|
||||
SetCrossHairPosition( pos );
|
||||
RedrawScreen( pos, aWarpMouse );
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
|||
if( aWarpMouse )
|
||||
m_canvas->MoveCursor( pos );
|
||||
|
||||
GetScreen()->SetCrossHairPosition(pos);
|
||||
SetCrossHairPosition( pos );
|
||||
|
||||
m_canvas->CrossHairOn( &dc );
|
||||
}
|
||||
|
@ -351,7 +351,8 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
|
|||
SetScreen( sheet->LastScreen() );
|
||||
}
|
||||
|
||||
sheet->LastScreen()->SetCrossHairPosition( data.GetPosition() );
|
||||
// careful here
|
||||
SetCrossHairPosition( data.GetPosition() );
|
||||
|
||||
RedrawScreen( data.GetPosition(), warpCursor );
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC,
|
|||
{
|
||||
int unit = 1;
|
||||
int convert = 1;
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
m_canvas->SetIgnoreMouseEvents( true );
|
||||
|
||||
wxString Name = SelectComponentFromLibrary( aLibname, aHistoryList, aUseLibBrowser,
|
||||
|
@ -231,7 +231,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC,
|
|||
|
||||
SCH_COMPONENT* component;
|
||||
component = new SCH_COMPONENT( *Entry, m_CurrentSheet, unit, convert,
|
||||
GetScreen()->GetCrossHairPosition(), true );
|
||||
GetCrossHairPosition(), true );
|
||||
|
||||
// Set the m_ChipName value, from component name in lib, for aliases
|
||||
// Note if Entry is found, and if Name is an alias of a component,
|
||||
|
|
|
@ -268,7 +268,7 @@ void HIERARCHY_NAVIG_DLG::OnSelect( wxTreeEvent& event )
|
|||
|
||||
void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||
{
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
ClearMsgPanel();
|
||||
|
||||
SCH_SCREEN* screen = m_CurrentSheet->LastScreen();
|
||||
|
@ -284,12 +284,12 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
|||
{
|
||||
Zoom_Automatique( false );
|
||||
screen->m_FirstRedraw = false;
|
||||
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
|
||||
SetCrossHairPosition( GetScrollCenterPosition() );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
}
|
||||
else
|
||||
{
|
||||
RedrawScreen( screen->GetScrollCenterPosition(), true );
|
||||
RedrawScreen( GetScrollCenterPosition(), true );
|
||||
}
|
||||
|
||||
// Now refresh m_canvas. Should be not necessary, but because screen has changed
|
||||
|
|
|
@ -74,14 +74,14 @@
|
|||
*/
|
||||
|
||||
|
||||
/* local variables */
|
||||
/* Hotkey list: */
|
||||
// local variables
|
||||
// Hotkey list:
|
||||
|
||||
/**
|
||||
* Common commands
|
||||
*/
|
||||
|
||||
/* Fit on Screen */
|
||||
// Fit on Screen
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkZoomAuto( wxT( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
|
||||
#else
|
||||
|
@ -92,7 +92,7 @@ static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0'
|
|||
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
|
||||
ID_POPUP_ZOOM_CENTER );
|
||||
|
||||
/* Refresh Screen */
|
||||
// Refresh Screen
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
|
||||
#else
|
||||
|
@ -100,14 +100,14 @@ static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL
|
|||
ID_ZOOM_REDRAW );
|
||||
#endif
|
||||
|
||||
/* Zoom In */
|
||||
// Zoom In
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
|
||||
#else
|
||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN );
|
||||
#endif
|
||||
|
||||
/* Zoom Out */
|
||||
// Zoom Out
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
|
||||
#else
|
||||
|
@ -115,13 +115,13 @@ static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-', I
|
|||
#endif
|
||||
|
||||
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
|
||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
||||
HK_RESET_LOCAL_COORD, ' ' );
|
||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||
|
||||
/* Undo */
|
||||
|
||||
// Undo
|
||||
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||
|
||||
/* Redo */
|
||||
// Redo
|
||||
#if !defined( __WXMAC__ )
|
||||
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
|
||||
#else
|
||||
|
@ -358,8 +358,8 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: /* Reset the relative coord */
|
||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
||||
case HK_ZOOM_IN:
|
||||
|
@ -385,7 +385,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
break;
|
||||
|
||||
case HK_REPEAT_LAST:
|
||||
if( notBusy && m_itemToRepeat && ( m_itemToRepeat->GetFlags() == 0 ) )
|
||||
if( notBusy )
|
||||
RepeatDrawItem( aDC );
|
||||
break;
|
||||
|
||||
|
@ -561,8 +561,8 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
DisplayHotkeyList( this, s_Libedit_Hokeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: /* Reset the relative coord */
|
||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
||||
case HK_ZOOM_IN:
|
||||
|
|
|
@ -218,7 +218,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
|
|||
|
||||
GetScreen()->m_Center = true;
|
||||
|
||||
GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||
SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||
|
||||
LoadSettings();
|
||||
|
||||
|
@ -402,7 +402,7 @@ double LIB_EDIT_FRAME::BestZoom()
|
|||
BoundaryBox = m_component->GetBoundingBox( m_unit, m_convert );
|
||||
dx = BoundaryBox.GetWidth();
|
||||
dy = BoundaryBox.GetHeight();
|
||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -411,7 +411,7 @@ double LIB_EDIT_FRAME::BestZoom()
|
|||
dx = pageInfo.GetSizeIU().x;
|
||||
dy = pageInfo.GetSizeIU().y;
|
||||
|
||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
}
|
||||
|
||||
size = m_canvas->GetClientSize();
|
||||
|
@ -753,7 +753,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
STATUS_FLAGS oldFlags = m_drawItem->GetFlags();
|
||||
m_drawItem->ClearFlags();
|
||||
m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform );
|
||||
( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetScreen()->GetCrossHairPosition( true ) );
|
||||
( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetCrossHairPosition( true ) );
|
||||
m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform );
|
||||
m_drawItem->SetFlags( oldFlags );
|
||||
m_lastDrawItem = NULL;
|
||||
|
@ -1139,7 +1139,7 @@ LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
|
|||
if( item == NULL )
|
||||
return NULL;
|
||||
|
||||
wxPoint pos = GetScreen()->GetNearestGridPosition( aPosition );
|
||||
wxPoint pos = GetNearestGridPosition( aPosition );
|
||||
|
||||
if( item == NULL && aPosition != pos )
|
||||
item = locateItem( pos, aFilterList );
|
||||
|
|
|
@ -52,13 +52,13 @@ static wxArrayString s_PowerNameList;
|
|||
|
||||
void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||
{
|
||||
SCH_ITEM* item = GetScreen()->GetCurItem();
|
||||
wxPoint gridPosition = GetGridPosition( aPosition );
|
||||
SCH_ITEM* item = GetScreen()->GetCurItem();
|
||||
wxPoint gridPosition = GetGridPosition( aPosition );
|
||||
|
||||
if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) )
|
||||
{
|
||||
m_canvas->SetAutoPanRequest( false );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
if( item && item->GetFlags() )
|
||||
{
|
||||
|
@ -120,7 +120,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
m_CurrentSheet->Pop();
|
||||
DisplayCurrentSheet();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_NOCONN_BUTT:
|
||||
|
@ -128,8 +127,9 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
if( false == GetScreen()->GetItem( gridPosition, 0, SCH_NO_CONNECT_T ) )
|
||||
{
|
||||
m_itemToRepeat = AddNoConnect( aDC, gridPosition );
|
||||
GetScreen()->SetCurItem( m_itemToRepeat );
|
||||
SCH_NO_CONNECT* no_connect = AddNoConnect( aDC, gridPosition );
|
||||
SetRepeatItem( no_connect );
|
||||
GetScreen()->SetCurItem( no_connect );
|
||||
m_canvas->SetAutoPanRequest( true );
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_JUNCTION_BUTT:
|
||||
|
@ -145,8 +144,9 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
if( false == GetScreen()->GetItem( gridPosition, 0, SCH_JUNCTION_T ) )
|
||||
{
|
||||
m_itemToRepeat = AddJunction( aDC, gridPosition, true );
|
||||
GetScreen()->SetCurItem( m_itemToRepeat );
|
||||
SCH_JUNCTION* junction = AddJunction( aDC, gridPosition, true );
|
||||
SetRepeatItem( junction );
|
||||
GetScreen()->SetCurItem( junction );
|
||||
m_canvas->SetAutoPanRequest( true );
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_WIRETOBUS_ENTRY_BUTT:
|
||||
|
@ -168,6 +167,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
addCurrentItemToList( aDC );
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_BUSTOBUS_ENTRY_BUTT:
|
||||
if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
|
||||
{
|
||||
|
@ -209,7 +209,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_ADD_IMAGE_BUTT:
|
||||
|
@ -222,7 +221,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_LABEL_BUTT:
|
||||
|
@ -235,7 +233,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_GLABEL_BUTT:
|
||||
|
@ -254,7 +251,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_SHEET_SYMBOL_BUTT:
|
||||
|
@ -272,7 +268,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_IMPORT_HLABEL_BUTT:
|
||||
|
@ -294,7 +289,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_SCH_PLACE_COMPONENT:
|
||||
|
@ -307,7 +301,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ID_PLACE_POWER_BUTT:
|
||||
|
@ -321,7 +314,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
{
|
||||
addCurrentItemToList( aDC );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -663,8 +663,8 @@ void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunct
|
|||
void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
||||
{
|
||||
SCH_SCREEN* screen = frame->GetScreen();
|
||||
wxPoint pos = screen->GetCrossHairPosition();
|
||||
wxString msg;
|
||||
wxPoint pos = frame->GetCrossHairPosition();
|
||||
wxString msg;
|
||||
|
||||
if( Wire == NULL )
|
||||
{
|
||||
|
@ -691,9 +691,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
|||
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ),
|
||||
KiBitmap( delete_connection_xpm ) );
|
||||
|
||||
SCH_LINE* line = screen->GetWireOrBus( screen->GetCrossHairPosition() );
|
||||
SCH_LINE* line = screen->GetWireOrBus( frame->GetCrossHairPosition() );
|
||||
|
||||
if( line && !line->IsEndPoint( screen->GetCrossHairPosition() ) )
|
||||
if( line && !line->IsEndPoint( frame->GetCrossHairPosition() ) )
|
||||
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ),
|
||||
KiBitmap( break_line_xpm ) );
|
||||
|
||||
|
@ -713,8 +713,8 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
|||
|
||||
void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
|
||||
{
|
||||
wxPoint pos = frame->GetScreen()->GetCrossHairPosition();
|
||||
wxString msg;
|
||||
wxPoint pos = frame->GetCrossHairPosition();
|
||||
wxString msg;
|
||||
|
||||
if( Bus == NULL )
|
||||
{
|
||||
|
|
|
@ -210,7 +210,7 @@ void LIB_EDIT_FRAME::PlacePin()
|
|||
return;
|
||||
}
|
||||
|
||||
newpos = GetScreen()->GetCrossHairPosition( true );
|
||||
newpos = GetCrossHairPosition( true );
|
||||
|
||||
// Test for an other pin in same new position:
|
||||
for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) )
|
||||
|
@ -308,7 +308,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC )
|
|||
startPos.x = OldPos.x;
|
||||
startPos.y = -OldPos.y;
|
||||
// m_canvas->CrossHairOff( DC );
|
||||
GetScreen()->SetCrossHairPosition( startPos );
|
||||
SetCrossHairPosition( startPos );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
|
||||
MSG_PANEL_ITEMS items;
|
||||
|
@ -350,7 +350,7 @@ static void DrawMovePin( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
|
|||
}
|
||||
|
||||
// Redraw pin in new position
|
||||
CurrentPin->Move( aPanel->GetScreen()->GetCrossHairPosition( true ) );
|
||||
CurrentPin->Move( aPanel->GetParent()->GetCrossHairPosition( true ) );
|
||||
CurrentPin->Draw( aPanel, aDC, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode,
|
||||
&showPinText, DefaultTransform );
|
||||
|
||||
|
@ -388,7 +388,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
|
|||
if( SynchronizePins() )
|
||||
pin->SetFlags( IS_LINKED );
|
||||
|
||||
pin->Move( GetScreen()->GetCrossHairPosition( true ) );
|
||||
pin->Move( GetCrossHairPosition( true ) );
|
||||
pin->SetLength( LastPinLength );
|
||||
pin->SetOrientation( LastPinOrient );
|
||||
pin->SetType( LastPinType );
|
||||
|
@ -555,10 +555,10 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
|
|||
if( SynchronizePins() )
|
||||
Pin->SetFlags( IS_LINKED );
|
||||
|
||||
wxPoint savepos = GetScreen()->GetCrossHairPosition();
|
||||
wxPoint savepos = GetCrossHairPosition();
|
||||
m_canvas->CrossHairOff( DC );
|
||||
GetScreen()->SetCrossHairPosition( wxPoint( Pin->GetPosition().x,
|
||||
-Pin->GetPosition().y ) );
|
||||
|
||||
SetCrossHairPosition( wxPoint( Pin->GetPosition().x, -Pin->GetPosition().y ) );
|
||||
|
||||
// Add this new pin in list, and creates pins for others parts if needed
|
||||
m_drawItem = Pin;
|
||||
|
@ -566,7 +566,7 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
|
|||
PlacePin();
|
||||
m_lastDrawItem = Pin;
|
||||
|
||||
GetScreen()->SetCrossHairPosition( savepos );
|
||||
SetCrossHairPosition( savepos );
|
||||
m_canvas->CrossHairOn( DC );
|
||||
|
||||
MSG_PANEL_ITEMS items;
|
||||
|
|
|
@ -73,17 +73,17 @@ const wxSize SCH_BASE_FRAME::GetPageSizeIU() const
|
|||
}
|
||||
|
||||
|
||||
const wxPoint& SCH_BASE_FRAME::GetOriginAxisPosition() const
|
||||
const wxPoint& SCH_BASE_FRAME::GetAuxOrigin() const
|
||||
{
|
||||
wxASSERT( GetScreen() );
|
||||
return GetScreen()->GetOriginAxisPosition();
|
||||
return GetScreen()->GetAuxOrigin();
|
||||
}
|
||||
|
||||
|
||||
void SCH_BASE_FRAME::SetOriginAxisPosition( const wxPoint& aPosition )
|
||||
void SCH_BASE_FRAME::SetAuxOrigin( const wxPoint& aPosition )
|
||||
{
|
||||
wxASSERT( GetScreen() );
|
||||
GetScreen()->SetOriginAxisPosition( aPosition );
|
||||
GetScreen()->SetAuxOrigin( aPosition );
|
||||
}
|
||||
|
||||
|
||||
|
@ -113,8 +113,8 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
|||
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||
|
||||
// Display absolute coordinates:
|
||||
double dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x );
|
||||
double dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y );
|
||||
double dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x );
|
||||
double dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y );
|
||||
|
||||
if ( g_UserUnit == MILLIMETRES )
|
||||
{
|
||||
|
@ -147,8 +147,9 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
|||
SetStatusText( line, 2 );
|
||||
|
||||
// Display relative coordinates:
|
||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
|
||||
dXpos = To_User_Unit( g_UserUnit, dx );
|
||||
dYpos = To_User_Unit( g_UserUnit, dy );
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
{
|
||||
case ID_HIERARCHY:
|
||||
InstallHierarchyFrame( &dc, pos );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
break;
|
||||
|
||||
case wxID_CUT:
|
||||
|
@ -127,12 +127,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
HandleBlockEndByPopUp( BLOCK_DELETE, &dc );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
SetSheetNumberAndCount();
|
||||
break;
|
||||
|
||||
case wxID_PASTE:
|
||||
HandleBlockBegin( &dc, BLOCK_PASTE, screen->GetCrossHairPosition() );
|
||||
HandleBlockBegin( &dc, BLOCK_PASTE, GetCrossHairPosition() );
|
||||
break;
|
||||
|
||||
case ID_POPUP_SCH_ENTRY_SELECT_SLASH:
|
||||
|
@ -165,12 +165,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
case ID_POPUP_SCH_BEGIN_WIRE:
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
OnLeftClick( &dc, screen->GetCrossHairPosition() );
|
||||
OnLeftClick( &dc, GetCrossHairPosition() );
|
||||
break;
|
||||
|
||||
case ID_POPUP_SCH_BEGIN_BUS:
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
OnLeftClick( &dc, screen->GetCrossHairPosition() );
|
||||
OnLeftClick( &dc, GetCrossHairPosition() );
|
||||
break;
|
||||
|
||||
case ID_POPUP_SCH_SET_SHAPE_TEXT:
|
||||
|
@ -182,7 +182,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
m_canvas->MoveCursorToCrossHair();
|
||||
DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION );
|
||||
screen->SetCurItem( NULL );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
screen->TestDanglingEnds( m_canvas, &dc );
|
||||
m_canvas->Refresh();
|
||||
break;
|
||||
|
@ -194,7 +194,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
oldWires.SetOwnership( false ); // Prevent DLIST for deleting items in destructor.
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
screen->ExtractWires( oldWires, true );
|
||||
screen->BreakSegment( screen->GetCrossHairPosition() );
|
||||
screen->BreakSegment( GetCrossHairPosition() );
|
||||
|
||||
if( oldWires.GetCount() != 0 )
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
DeleteItem( item );
|
||||
screen->SetCurItem( NULL );
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
screen->TestDanglingEnds( m_canvas, &dc );
|
||||
SetSheetNumberAndCount();
|
||||
OnModify();
|
||||
|
@ -344,7 +344,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
case ID_POPUP_SCH_ADD_JUNCTION:
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
screen->SetCurItem( AddJunction( &dc, screen->GetCrossHairPosition(), true ) );
|
||||
screen->SetCurItem( AddJunction( &dc, GetCrossHairPosition(), true ) );
|
||||
screen->TestDanglingEnds( m_canvas, &dc );
|
||||
screen->SetCurItem( NULL );
|
||||
break;
|
||||
|
@ -375,7 +375,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
// End switch ( id ) (Command execution)
|
||||
|
||||
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
@ -445,7 +445,7 @@ void SCH_EDIT_FRAME::OnMoveItem( wxCommandEvent& aEvent )
|
|||
}
|
||||
|
||||
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
@ -561,7 +561,7 @@ void SCH_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
|||
break;
|
||||
|
||||
default:
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
}
|
||||
|
||||
// Simulate left click event if we got here from a hot key.
|
||||
|
@ -588,7 +588,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool aFullConnection )
|
|||
{
|
||||
PICKED_ITEMS_LIST pickList;
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
wxPoint pos = screen->GetCrossHairPosition();
|
||||
wxPoint pos = GetCrossHairPosition();
|
||||
|
||||
if( screen->GetConnection( pos, pickList, aFullConnection ) != 0 )
|
||||
{
|
||||
|
@ -603,7 +603,7 @@ bool SCH_EDIT_FRAME::DeleteItemAtCrossHair( wxDC* DC )
|
|||
SCH_ITEM* item;
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
||||
item = LocateItem( screen->GetCrossHairPosition(), SCH_COLLECTOR::ParentItems );
|
||||
item = LocateItem( GetCrossHairPosition(), SCH_COLLECTOR::ParentItems );
|
||||
|
||||
if( item )
|
||||
{
|
||||
|
@ -637,7 +637,7 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio
|
|||
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||
#endif
|
||||
|
||||
item->SetPosition( screen->GetCrossHairPosition() );
|
||||
item->SetPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||
|
||||
// Draw the item item at it's new position.
|
||||
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||
|
@ -695,7 +695,7 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC )
|
|||
{
|
||||
wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) );
|
||||
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
if( !aItem->IsNew() )
|
||||
{
|
||||
|
@ -713,7 +713,7 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC )
|
|||
m_canvas->CrossHairOff( aDC );
|
||||
|
||||
if( aItem->Type() != SCH_SHEET_PIN_T )
|
||||
GetScreen()->SetCrossHairPosition( aItem->GetPosition() );
|
||||
SetCrossHairPosition( aItem->GetPosition() );
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
|
||||
|
@ -959,7 +959,7 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent )
|
|||
// is to simulate a block drag command
|
||||
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
||||
{
|
||||
if( !HandleBlockBegin( &dc, BLOCK_DRAG, screen->GetCrossHairPosition() ) )
|
||||
if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetCrossHairPosition() ) )
|
||||
break;
|
||||
|
||||
// Give a non null size to the search block:
|
||||
|
|
|
@ -177,7 +177,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
|
|||
const wxPoint& aPosition, const wxSize& aSize,
|
||||
long aStyle ) :
|
||||
SCH_BASE_FRAME( aParent, SCHEMATIC_FRAME_TYPE, aTitle, aPosition, aSize,
|
||||
aStyle, SCH_EDIT_FRAME_NAME )
|
||||
aStyle, SCH_EDIT_FRAME_NAME ),
|
||||
m_item_to_repeat( 0 )
|
||||
{
|
||||
m_FrameName = SCH_EDIT_FRAME_NAME;
|
||||
m_showAxis = false; // true to show axis
|
||||
|
@ -207,8 +208,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
|
|||
icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) );
|
||||
SetIcon( icon );
|
||||
|
||||
m_itemToRepeat = NULL;
|
||||
|
||||
/* Get config */
|
||||
LoadSettings();
|
||||
|
||||
|
@ -268,8 +267,10 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
|
|||
|
||||
SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
||||
{
|
||||
delete m_item_to_repeat; // we own the cloned object, see this->SetRepeatItem()
|
||||
|
||||
SetScreen( NULL );
|
||||
delete m_CurrentSheet; // a SCH_SHEET_PATH, on the heap.
|
||||
delete m_CurrentSheet; // a SCH_SHEET_PATH, on the heap.
|
||||
delete m_undoItem;
|
||||
delete g_RootSheet;
|
||||
delete m_findReplaceData;
|
||||
|
@ -281,6 +282,32 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
|||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::SetRepeatItem( SCH_ITEM* aItem )
|
||||
{
|
||||
// we cannot store a pointer to an item in the display list here since
|
||||
// that item may be deleted, such as part of a line concatonation or other.
|
||||
// So simply always keep a copy of the object which is to be repeated.
|
||||
|
||||
SCH_ITEM* old = m_item_to_repeat;
|
||||
SCH_ITEM* cur = aItem;
|
||||
|
||||
if( cur != old )
|
||||
{
|
||||
if( cur )
|
||||
{
|
||||
aItem = (SCH_ITEM*) cur->Clone();
|
||||
|
||||
// Clone() preserves the flags, we want 'em cleared.
|
||||
aItem->ClearFlags();
|
||||
}
|
||||
|
||||
m_item_to_repeat = aItem;
|
||||
|
||||
delete old;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::SetSheetNumberAndCount()
|
||||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
@ -501,7 +528,7 @@ double SCH_EDIT_FRAME::BestZoom()
|
|||
|
||||
double bestzoom = std::max( zx, zy );
|
||||
|
||||
GetScreen()->SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) );
|
||||
SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) );
|
||||
|
||||
return bestzoom;
|
||||
}
|
||||
|
@ -869,7 +896,7 @@ bool SCH_EDIT_FRAME::isAutoSaveRequired() const
|
|||
void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC )
|
||||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
SCH_ITEM* item = screen->GetCurItem();
|
||||
SCH_ITEM* item = screen->GetCurItem();
|
||||
|
||||
wxCHECK_RET( item != NULL, wxT( "Cannot add current item to list." ) );
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
if( aSheet == NULL )
|
||||
return false;
|
||||
|
||||
/* Get the new texts */
|
||||
// Get the new texts
|
||||
DIALOG_SCH_SHEET_PROPS dlg( this );
|
||||
|
||||
wxString units = GetUnitsLabel( g_UserUnit );
|
||||
|
@ -244,8 +244,8 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
|||
|
||||
if( sheet->IsResized() )
|
||||
{
|
||||
int width = screen->GetCrossHairPosition().x - sheet->GetPosition().x;
|
||||
int height = screen->GetCrossHairPosition().y - sheet->GetPosition().y;
|
||||
int width = aPanel->GetParent()->GetCrossHairPosition().x - sheet->GetPosition().x;
|
||||
int height = aPanel->GetParent()->GetCrossHairPosition().y - sheet->GetPosition().y;
|
||||
|
||||
// If the sheet doesn't have any pins, clamp the minimum size to the default values.
|
||||
width = ( width < MIN_SHEET_WIDTH ) ? MIN_SHEET_WIDTH : width;
|
||||
|
@ -263,12 +263,13 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
|||
sheet->GetMinWidth() + gridSizeX : width;
|
||||
}
|
||||
|
||||
wxPoint grid = screen->GetNearestGridPosition( wxPoint( pos.x + width, pos.y + height ) );
|
||||
wxPoint grid = aPanel->GetParent()->GetNearestGridPosition(
|
||||
wxPoint( pos.x + width, pos.y + height ) );
|
||||
sheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );
|
||||
}
|
||||
else if( sheet->IsMoving() )
|
||||
{
|
||||
moveVector = screen->GetCrossHairPosition() - pos;
|
||||
moveVector = aPanel->GetParent()->GetCrossHairPosition() - pos;
|
||||
sheet->Move( moveVector );
|
||||
}
|
||||
|
||||
|
@ -276,11 +277,12 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
|||
}
|
||||
|
||||
|
||||
/* Complete sheet move. */
|
||||
// Complete sheet move.
|
||||
static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||
{
|
||||
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
||||
SCH_ITEM* item = screen->GetCurItem();
|
||||
SCH_ITEM* item = screen->GetCurItem();
|
||||
|
||||
SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent();
|
||||
|
||||
if( (item == NULL) || (item->Type() != SCH_SHEET_T) || (parent == NULL) )
|
||||
|
@ -319,12 +321,12 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
|||
}
|
||||
|
||||
|
||||
/* Create hierarchy sheet. */
|
||||
// Create hierarchy sheet.
|
||||
SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
|
||||
{
|
||||
m_itemToRepeat = NULL;
|
||||
SetRepeatItem( NULL );
|
||||
|
||||
SCH_SHEET* sheet = new SCH_SHEET( GetScreen()->GetCrossHairPosition() );
|
||||
SCH_SHEET* sheet = new SCH_SHEET( GetCrossHairPosition() );
|
||||
|
||||
sheet->SetFlags( IS_NEW | IS_RESIZED );
|
||||
sheet->SetTimeStamp( GetNewTimeStamp() );
|
||||
|
@ -338,7 +340,9 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
|
|||
m_canvas->SetMouseCapture( MoveOrResizeSheet, ExitSheet );
|
||||
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
GetScreen()->SetCrossHairPosition( sheet->GetResizePosition() );
|
||||
|
||||
SetCrossHairPosition( sheet->GetResizePosition() );
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
|
@ -356,7 +360,7 @@ void SCH_EDIT_FRAME::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
GetChars( aSheet->GetClass() ) ) );
|
||||
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
GetScreen()->SetCrossHairPosition( aSheet->GetResizePosition() );
|
||||
SetCrossHairPosition( aSheet->GetResizePosition() );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
|
@ -377,7 +381,7 @@ void SCH_EDIT_FRAME::StartMoveSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
return;
|
||||
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
GetScreen()->SetCrossHairPosition( aSheet->GetPosition() );
|
||||
SetCrossHairPosition( aSheet->GetPosition() );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
|
||||
if( !aSheet->IsNew() )
|
||||
|
|
|
@ -136,7 +136,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
return;
|
||||
|
||||
bool newItem = item->IsNew();
|
||||
item->EndEdit( parent->GetScreen()->GetCrossHairPosition( true ), true );
|
||||
item->EndEdit( parent->GetCrossHairPosition( true ), true );
|
||||
|
||||
if( newItem )
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC )
|
||||
{
|
||||
m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn );
|
||||
wxPoint drawPos = GetScreen()->GetCrossHairPosition( true );
|
||||
wxPoint drawPos = GetCrossHairPosition( true );
|
||||
|
||||
// no temp copy -> the current version of component will be used for Undo
|
||||
// This is normal when adding new items to the current component
|
||||
|
@ -239,7 +239,7 @@ void LIB_EDIT_FRAME::GraphicItemBeginDraw( wxDC* DC )
|
|||
if( m_drawItem == NULL )
|
||||
return;
|
||||
|
||||
wxPoint pos = GetScreen()->GetCrossHairPosition( true );
|
||||
wxPoint pos = GetCrossHairPosition( true );
|
||||
|
||||
if( m_drawItem->ContinueEdit( pos ) )
|
||||
{
|
||||
|
@ -264,21 +264,20 @@ static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
|||
if( item == NULL )
|
||||
return;
|
||||
|
||||
BASE_SCREEN* Screen = aPanel->GetScreen();
|
||||
|
||||
item->SetEraseLastDrawItem( aErase );
|
||||
|
||||
// if item is the reference field, we must add the current unit id
|
||||
if( item->Type() == LIB_FIELD_T )
|
||||
{
|
||||
int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit();
|
||||
wxString text = ((LIB_FIELD*)item)->GetFullText( unit );
|
||||
item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ),
|
||||
int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit();
|
||||
wxString text = ((LIB_FIELD*)item)->GetFullText( unit );
|
||||
|
||||
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
|
||||
UNSPECIFIED_COLOR, g_XorMode, &text,
|
||||
DefaultTransform );
|
||||
}
|
||||
else
|
||||
item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ),
|
||||
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
|
||||
UNSPECIFIED_COLOR, g_XorMode, NULL,
|
||||
DefaultTransform );
|
||||
}
|
||||
|
@ -298,7 +297,7 @@ void LIB_EDIT_FRAME::StartMoveDrawSymbol( wxDC* DC )
|
|||
if( m_drawItem->Type() == LIB_FIELD_T )
|
||||
m_drawItem->BeginEdit( IS_MOVED, m_drawItem->GetPosition() );
|
||||
else
|
||||
m_drawItem->BeginEdit( IS_MOVED, GetScreen()->GetCrossHairPosition( true ) );
|
||||
m_drawItem->BeginEdit( IS_MOVED, GetCrossHairPosition( true ) );
|
||||
|
||||
m_canvas->SetMouseCapture( RedrawWhileMovingCursor, AbortSymbolTraceOn );
|
||||
m_canvas->CallMouseCapture( DC, wxDefaultPosition, true );
|
||||
|
@ -312,7 +311,7 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC )
|
|||
return;
|
||||
|
||||
TempCopyComponent();
|
||||
m_drawItem->BeginEdit( IS_RESIZED, GetScreen()->GetCrossHairPosition( true ) );
|
||||
m_drawItem->BeginEdit( IS_RESIZED, GetCrossHairPosition( true ) );
|
||||
m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn );
|
||||
m_canvas->CallMouseCapture( DC, wxDefaultPosition, true );
|
||||
}
|
||||
|
@ -322,14 +321,13 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC )
|
|||
static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||
bool aErase )
|
||||
{
|
||||
BASE_SCREEN* Screen = aPanel->GetScreen();
|
||||
LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
|
||||
|
||||
if( item == NULL )
|
||||
return;
|
||||
|
||||
item->SetEraseLastDrawItem( aErase );
|
||||
item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL,
|
||||
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL,
|
||||
DefaultTransform );
|
||||
}
|
||||
|
||||
|
@ -357,7 +355,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
|||
if( m_drawItem->IsNew() )
|
||||
m_component->AddDrawItem( m_drawItem );
|
||||
|
||||
m_drawItem->EndEdit( GetScreen()->GetCrossHairPosition( true ) );
|
||||
m_drawItem->EndEdit( GetCrossHairPosition( true ) );
|
||||
|
||||
m_drawItem = NULL;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol()
|
|||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||
SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
m_canvas->SetIgnoreMouseEvents( false );
|
||||
|
||||
|
@ -238,7 +238,9 @@ void LIB_EDIT_FRAME::PlaceAnchor()
|
|||
if( m_component == NULL )
|
||||
return;
|
||||
|
||||
wxPoint offset( -GetScreen()->GetCrossHairPosition().x, GetScreen()->GetCrossHairPosition().y );
|
||||
const wxPoint& cross_hair = GetCrossHairPosition();
|
||||
|
||||
wxPoint offset( -cross_hair.x, cross_hair.y );
|
||||
|
||||
OnModify( );
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ void LIB_VIEW_FRAME::OnSize( wxSizeEvent& SizeEv )
|
|||
|
||||
void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event )
|
||||
{
|
||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
||||
|
@ -348,18 +348,16 @@ double LIB_VIEW_FRAME::BestZoom()
|
|||
* search for line static const int VIEWPORT_EXTENT = 1000;
|
||||
* and replace by static const int VIEWPORT_EXTENT = 10000;
|
||||
*/
|
||||
LIB_COMPONENT* component = NULL;
|
||||
CMP_LIBRARY* lib;
|
||||
double bestzoom = 16.0; // default value for bestzoom
|
||||
|
||||
lib = CMP_LIBRARY::FindLibrary( m_libraryName );
|
||||
LIB_COMPONENT* component = NULL;
|
||||
double bestzoom = 16.0; // default value for bestzoom
|
||||
CMP_LIBRARY* lib = CMP_LIBRARY::FindLibrary( m_libraryName );
|
||||
|
||||
if( lib )
|
||||
component = lib->FindComponent( m_entryName );
|
||||
|
||||
if( component == NULL )
|
||||
{
|
||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||
return bestzoom;
|
||||
}
|
||||
|
||||
|
@ -382,7 +380,7 @@ double LIB_VIEW_FRAME::BestZoom()
|
|||
if( bestzoom < GetScreen()->m_ZoomList[0] )
|
||||
bestzoom = GetScreen()->m_ZoomList[0];
|
||||
|
||||
GetScreen()->SetScrollCenterPosition( BoundaryBox.Centre() );
|
||||
SetScrollCenterPosition( BoundaryBox.Centre() );
|
||||
|
||||
return bestzoom;
|
||||
}
|
||||
|
|
|
@ -171,10 +171,11 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
|||
|
||||
if( screen->m_BlockLocate.GetState() != STATE_BLOCK_STOP )
|
||||
{
|
||||
screen->m_BlockLocate.SetMoveVector( wxPoint( screen->GetCrossHairPosition().x -
|
||||
screen->m_BlockLocate.GetRight(),
|
||||
screen->GetCrossHairPosition().y -
|
||||
screen->m_BlockLocate.GetBottom() ) );
|
||||
const wxPoint& cross_hair = aPanel->GetParent()->GetCrossHairPosition();
|
||||
|
||||
screen->m_BlockLocate.SetMoveVector(
|
||||
wxPoint( cross_hair.x - screen->m_BlockLocate.GetRight(),
|
||||
cross_hair.y - screen->m_BlockLocate.GetBottom() ) );
|
||||
}
|
||||
|
||||
screen->m_BlockLocate.Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, Color );
|
||||
|
@ -195,10 +196,10 @@ void GERBVIEW_FRAME::Block_Move( wxDC* DC )
|
|||
wxPoint delta;
|
||||
wxPoint oldpos;
|
||||
|
||||
oldpos = GetScreen()->GetCrossHairPosition();
|
||||
oldpos = GetCrossHairPosition();
|
||||
m_canvas->SetMouseCaptureCallback( NULL );
|
||||
|
||||
GetScreen()->SetCrossHairPosition( oldpos );
|
||||
SetCrossHairPosition( oldpos );
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
GetScreen()->SetModify();
|
||||
GetScreen()->m_BlockLocate.Normalize();
|
||||
|
|
|
@ -38,12 +38,12 @@ public:
|
|||
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
||||
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
||||
|
||||
const wxPoint& GetOriginAxisPosition() const
|
||||
const wxPoint& GetAuxOrigin() const
|
||||
{
|
||||
return m_originAxisPosition;
|
||||
}
|
||||
|
||||
void SetOriginAxisPosition( const wxPoint& aPosition )
|
||||
void SetAuxOrigin( const wxPoint& aPosition )
|
||||
{
|
||||
m_originAxisPosition = aPosition;
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
wxPoint oldpos;
|
||||
wxPoint pos = aPosition;
|
||||
|
||||
pos = GetScreen()->GetNearestGridPosition( pos );
|
||||
pos = GetNearestGridPosition( pos );
|
||||
|
||||
oldpos = GetScreen()->GetCrossHairPosition();
|
||||
oldpos = GetCrossHairPosition();
|
||||
gridSize = GetScreen()->GetGridSize();
|
||||
|
||||
switch( aHotKey )
|
||||
|
@ -73,14 +73,14 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
|||
break;
|
||||
}
|
||||
|
||||
GetScreen()->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
|
||||
if( oldpos != GetScreen()->GetCrossHairPosition() )
|
||||
if( oldpos != GetCrossHairPosition() )
|
||||
{
|
||||
pos = GetScreen()->GetCrossHairPosition();
|
||||
GetScreen()->SetCrossHairPosition( oldpos );
|
||||
pos = GetCrossHairPosition();
|
||||
SetCrossHairPosition( oldpos );
|
||||
m_canvas->CrossHairOff( aDC );
|
||||
GetScreen()->SetCrossHairPosition( pos );
|
||||
SetCrossHairPosition( pos );
|
||||
m_canvas->CrossHairOn( aDC );
|
||||
|
||||
if( m_canvas->IsMouseCaptured() )
|
||||
|
|
|
@ -196,7 +196,7 @@ double GERBVIEW_FRAME::BestZoom()
|
|||
|
||||
double x = (double) bbox.GetWidth() / (double) size.x;
|
||||
double y = (double) bbox.GetHeight() / (double) size.y;
|
||||
GetScreen()->SetScrollCenterPosition( bbox.Centre() );
|
||||
SetScrollCenterPosition( bbox.Centre() );
|
||||
|
||||
double best_zoom = std::max( x, y );
|
||||
return best_zoom;
|
||||
|
@ -733,17 +733,17 @@ void GERBVIEW_FRAME::SetTitleBlock( const TITLE_BLOCK& aTitleBlock )
|
|||
}
|
||||
|
||||
|
||||
const wxPoint& GERBVIEW_FRAME::GetOriginAxisPosition() const
|
||||
const wxPoint& GERBVIEW_FRAME::GetAuxOrigin() const
|
||||
{
|
||||
wxASSERT( m_gerberLayout );
|
||||
return m_gerberLayout->GetOriginAxisPosition();
|
||||
return m_gerberLayout->GetAuxOrigin();
|
||||
}
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::SetOriginAxisPosition( const wxPoint& aPosition )
|
||||
void GERBVIEW_FRAME::SetAuxOrigin( const wxPoint& aPosition )
|
||||
{
|
||||
wxASSERT( m_gerberLayout );
|
||||
m_gerberLayout->SetOriginAxisPosition( aPosition );
|
||||
m_gerberLayout->SetAuxOrigin( aPosition );
|
||||
}
|
||||
|
||||
|
||||
|
@ -800,8 +800,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
|||
{
|
||||
double theta, ro;
|
||||
|
||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
|
||||
// atan2 in the 0,0 case returns 0
|
||||
theta = RAD2DEG( atan2( -dy, dx ) );
|
||||
|
@ -829,9 +829,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
|||
}
|
||||
|
||||
// Display absolute coordinates:
|
||||
dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x );
|
||||
dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y );
|
||||
|
||||
dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x );
|
||||
dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y );
|
||||
|
||||
wxString absformatter;
|
||||
|
||||
|
@ -859,8 +858,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
|||
if( !m_DisplayOptions.m_DisplayPolarCood ) // display relative cartesian coordinates
|
||||
{
|
||||
// Display relative coordinates:
|
||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||
dXpos = To_User_Unit( g_UserUnit, dx );
|
||||
dYpos = To_User_Unit( g_UserUnit, dy );
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ public:
|
|||
|
||||
class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME
|
||||
{
|
||||
GBR_LAYOUT* m_gerberLayout;
|
||||
GBR_LAYOUT* m_gerberLayout;
|
||||
wxPoint m_grid_origin;
|
||||
|
||||
public:
|
||||
GBR_DISPLAY_OPTIONS m_DisplayOptions;
|
||||
|
||||
|
@ -126,8 +128,14 @@ public:
|
|||
const PAGE_INFO& GetPageSettings() const; // overload
|
||||
const wxSize GetPageSizeIU() const; // overload
|
||||
|
||||
const wxPoint& GetOriginAxisPosition() const; // overload
|
||||
void SetOriginAxisPosition( const wxPoint& aPosition ); // overload
|
||||
const wxPoint& GetAuxOrigin() const; // overload
|
||||
void SetAuxOrigin( const wxPoint& aPoint ); // overload
|
||||
|
||||
const wxPoint& GetGridOrigin() const { return m_grid_origin; } // overload
|
||||
void SetGridOrigin( const wxPoint& aPoint ) // overload
|
||||
{
|
||||
m_grid_origin = aPoint;
|
||||
}
|
||||
|
||||
const TITLE_BLOCK& GetTitleBlock() const; // overload
|
||||
void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload
|
||||
|
|
|
@ -31,30 +31,28 @@
|
|||
* and see this list for some ascii keys (space ...)
|
||||
*/
|
||||
|
||||
/* local variables */
|
||||
/* Hotkey list: */
|
||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
||||
HK_RESET_LOCAL_COORD, ' ' );
|
||||
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
||||
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
|
||||
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
|
||||
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
|
||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
|
||||
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
|
||||
static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' );
|
||||
static EDA_HOTKEY HkTrackDisplayMode( wxT( "Track Display Mode" ),
|
||||
HK_SWITCH_GBR_ITEMS_DISPLAY_MODE, 'F' );
|
||||
// local variables
|
||||
// Hotkey list:
|
||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||
static EDA_HOTKEY HkSetGridOrigin( wxT("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S' );
|
||||
|
||||
static EDA_HOTKEY HkSwitch2NextCopperLayer( wxT( "Switch to Next Layer" ),
|
||||
HK_SWITCH_LAYER_TO_NEXT, '+' );
|
||||
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ),
|
||||
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
||||
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
||||
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
|
||||
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
|
||||
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
|
||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
|
||||
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
|
||||
static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' );
|
||||
static EDA_HOTKEY HkTrackDisplayMode( wxT( "Track Display Mode" ), HK_SWITCH_GBR_ITEMS_DISPLAY_MODE, 'F' );
|
||||
|
||||
static EDA_HOTKEY HkSwitch2NextCopperLayer( wxT( "Switch to Next Layer" ), HK_SWITCH_LAYER_TO_NEXT, '+' );
|
||||
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ), HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
||||
|
||||
// List of common hotkey descriptors
|
||||
EDA_HOTKEY* s_Gerbview_Hotkey_List[] = {
|
||||
&HkHelp,
|
||||
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
||||
&HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord,
|
||||
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
||||
&HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin,
|
||||
&HkTrackDisplayMode,
|
||||
&HkSwitch2NextCopperLayer,
|
||||
&HkSwitch2PreviousCopperLayer,
|
||||
|
@ -130,8 +128,12 @@ void GERBVIEW_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: /*Reset the relative coord */
|
||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
||||
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_SWITCH_UNITS:
|
||||
|
|
|
@ -44,7 +44,7 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc
|
|||
bool found = false;
|
||||
|
||||
if( aTypeloc == CURSEUR_ON_GRILLE )
|
||||
ref = GetScreen()->GetNearestGridPosition( ref );
|
||||
ref = GetNearestGridPosition( ref );
|
||||
|
||||
LAYER_NUM layer = getActiveLayer();
|
||||
|
||||
|
|
|
@ -75,53 +75,134 @@ typedef std::vector< GRID_TYPE > GRIDS;
|
|||
class BASE_SCREEN : public EDA_ITEM
|
||||
{
|
||||
private:
|
||||
GRIDS m_grids; ///< List of valid grid sizes.
|
||||
bool m_FlagModified; ///< Indicates current drawing has been modified.
|
||||
bool m_FlagSave; ///< Indicates automatic file save.
|
||||
EDA_ITEM* m_CurrentItem; ///< Currently selected object
|
||||
GRID_TYPE m_Grid; ///< Current grid selection.
|
||||
wxPoint m_scrollCenter; ///< Current scroll center point in logical units.
|
||||
wxPoint m_MousePosition; ///< Mouse cursor coordinate in logical units.
|
||||
|
||||
GRIDS m_grids; ///< List of valid grid sizes.
|
||||
bool m_FlagModified; ///< Indicates current drawing has been modified.
|
||||
bool m_FlagSave; ///< Indicates automatic file save.
|
||||
EDA_ITEM* m_CurrentItem; ///< Currently selected object
|
||||
GRID_TYPE m_Grid; ///< Current grid selection.
|
||||
wxPoint m_scrollCenter; ///< Current scroll center point in logical units.
|
||||
wxPoint m_MousePosition; ///< Mouse cursor coordinate in logical units.
|
||||
|
||||
/**
|
||||
* The cross hair position in logical (drawing) units. The cross hair is not the cursor
|
||||
* position. It is an addition indicator typically drawn on grid to indicate to the
|
||||
* user where the current action will be performed.
|
||||
*/
|
||||
wxPoint m_crossHairPosition;
|
||||
wxPoint m_crossHairPosition;
|
||||
|
||||
double m_Zoom; ///< Current zoom coefficient.
|
||||
double m_Zoom; ///< Current zoom coefficient.
|
||||
|
||||
//----< Old public API now is private, and migratory>------------------------
|
||||
// called only from EDA_DRAW_FRAME
|
||||
friend class EDA_DRAW_FRAME;
|
||||
|
||||
/**
|
||||
* Function getCrossHairPosition
|
||||
* return the current cross hair position in logical (drawing) coordinates.
|
||||
* @param aInvertY Inverts the Y axis position.
|
||||
* @return The cross hair position in drawing coordinates.
|
||||
*/
|
||||
wxPoint getCrossHairPosition( bool aInvertY ) const
|
||||
{
|
||||
if( aInvertY )
|
||||
return wxPoint( m_crossHairPosition.x, -m_crossHairPosition.y );
|
||||
|
||||
return wxPoint( m_crossHairPosition.x, m_crossHairPosition.y );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function setCrossHairPosition
|
||||
* sets the screen cross hair position to \a aPosition in logical (drawing) units.
|
||||
* @param aPosition The new cross hair position.
|
||||
* @param aGridOrigin Origin point of the snap grid.
|
||||
* @param aSnapToGrid Sets the cross hair position to the nearest grid position to
|
||||
* \a aPosition.
|
||||
*
|
||||
*/
|
||||
void setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid );
|
||||
|
||||
/**
|
||||
* Function getCursorScreenPosition
|
||||
* returns the cross hair position in device (display) units.b
|
||||
* @return The current cross hair position.
|
||||
*/
|
||||
wxPoint getCrossHairScreenPosition() const;
|
||||
|
||||
/**
|
||||
* Function getNearestGridPosition
|
||||
* returns the nearest \a aGridSize location to \a aPosition.
|
||||
* @param aPosition The position to check.
|
||||
* @param aGridOrigin The origin point of the snap grid.
|
||||
* @param aGridSize The grid size to locate to if provided. If NULL then the current
|
||||
* grid size is used.
|
||||
* @return The nearst grid position.
|
||||
*/
|
||||
wxPoint getNearestGridPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin,
|
||||
wxRealPoint* aGridSize ) const;
|
||||
|
||||
/**
|
||||
* Function getCursorPosition
|
||||
* returns the current cursor position in logical (drawing) units.
|
||||
* @param aOnGrid Returns the nearest grid position at the current cursor position.
|
||||
* @param aGridOrigin Origin point of the snap grid.
|
||||
* @param aGridSize Custom grid size instead of the current grid size. Only valid
|
||||
* if \a aOnGrid is true.
|
||||
* @return The current cursor position.
|
||||
*/
|
||||
wxPoint getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const;
|
||||
|
||||
void setMousePosition( const wxPoint& aPosition ) { m_MousePosition = aPosition; }
|
||||
|
||||
/**
|
||||
* Function RefPos
|
||||
* Return the reference position, coming from either the mouse position
|
||||
* or the cursor position.
|
||||
*
|
||||
* @param useMouse If true, return mouse position, else cursor's.
|
||||
*
|
||||
* @return wxPoint - The reference point, either the mouse position or
|
||||
* the cursor position.
|
||||
*/
|
||||
wxPoint refPos( bool useMouse ) const
|
||||
{
|
||||
return useMouse ? m_MousePosition : m_crossHairPosition;
|
||||
}
|
||||
|
||||
const wxPoint& getScrollCenterPosition() const { return m_scrollCenter; }
|
||||
void setScrollCenterPosition( const wxPoint& aPoint ) { m_scrollCenter = aPoint; }
|
||||
|
||||
//----</Old public API now is private, and migratory>------------------------
|
||||
|
||||
|
||||
public:
|
||||
static wxString m_PageLayoutDescrFileName; ///< the name of the page layout descr file,
|
||||
///< or emty to used the default pagelayout
|
||||
wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen
|
||||
|
||||
wxPoint m_O_Curseur; ///< Relative Screen cursor coordinate (on grid)
|
||||
///< in user units. (coordinates from last reset position)
|
||||
wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen
|
||||
|
||||
wxPoint m_O_Curseur; ///< Relative Screen cursor coordinate (on grid)
|
||||
///< in user units. (coordinates from last reset position)
|
||||
|
||||
// Scrollbars management:
|
||||
int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction.
|
||||
int m_ScrollPixelsPerUnitY; ///< Pixels per scroll unit in the vertical direction.
|
||||
int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction.
|
||||
int m_ScrollPixelsPerUnitY; ///< Pixels per scroll unit in the vertical direction.
|
||||
|
||||
wxSize m_ScrollbarNumber; /* Current virtual draw area size in scroll units.
|
||||
wxSize m_ScrollbarNumber; /**< Current virtual draw area size in scroll units.
|
||||
* m_ScrollbarNumber * m_ScrollPixelsPerUnit =
|
||||
* virtual draw area size in pixels */
|
||||
|
||||
wxPoint m_ScrollbarPos; ///< Current scroll bar position in scroll units.
|
||||
wxPoint m_ScrollbarPos; ///< Current scroll bar position in scroll units.
|
||||
|
||||
wxPoint m_StartVisu; /* Coordinates in drawing units of the current
|
||||
* view position (upper left corner of device)
|
||||
*/
|
||||
wxPoint m_StartVisu; /**< Coordinates in drawing units of the current
|
||||
* view position (upper left corner of device)
|
||||
*/
|
||||
|
||||
bool m_Center; /* Center on screen. If true (0.0) is centered
|
||||
* on screen coordinates can be < 0 and
|
||||
* > 0 except for schematics.
|
||||
* false: when coordinates can only be >= 0
|
||||
* Schematic */
|
||||
bool m_FirstRedraw;
|
||||
bool m_Center; /**< Center on screen. If true (0.0) is centered
|
||||
* on screen coordinates can be < 0 and
|
||||
* > 0 except for schematics.
|
||||
* false: when coordinates can only be >= 0
|
||||
* Schematic */
|
||||
bool m_FirstRedraw;
|
||||
|
||||
// Undo/redo list of commands
|
||||
UNDO_REDO_CONTAINER m_UndoList; ///< Objects list for the undo command (old data)
|
||||
|
@ -134,8 +215,6 @@ public:
|
|||
int m_ScreenNumber;
|
||||
int m_NumberOfScreens;
|
||||
|
||||
wxPoint m_GridOrigin;
|
||||
|
||||
std::vector<double> m_ZoomList; ///< standard zoom (i.e. scale) coefficients.
|
||||
bool m_IsPrinting;
|
||||
|
||||
|
@ -164,30 +243,6 @@ public:
|
|||
*/
|
||||
virtual int MilsToIuScalar() { return 1; }
|
||||
|
||||
/**
|
||||
* Function GetCrossHairPosition
|
||||
* return the current cross hair position in logical (drawing) coordinates.
|
||||
* @param aInvertY Inverts the Y axis position.
|
||||
* @return The cross hair position in drawing coordinates.
|
||||
*/
|
||||
wxPoint GetCrossHairPosition( bool aInvertY = false ) const
|
||||
{
|
||||
if( aInvertY )
|
||||
return wxPoint( m_crossHairPosition.x, -m_crossHairPosition.y );
|
||||
|
||||
return wxPoint( m_crossHairPosition.x, m_crossHairPosition.y );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetCrossHairPosition
|
||||
* sets the screen cross hair position to \a aPosition in logical (drawing) units.
|
||||
* @param aPosition The new cross hair position.
|
||||
* @param aSnapToGrid Sets the cross hair position to the nearest grid position to
|
||||
* \a aPosition.
|
||||
*
|
||||
*/
|
||||
void SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid = true );
|
||||
|
||||
/* general Undo/Redo command control */
|
||||
|
||||
/**
|
||||
|
@ -247,19 +302,17 @@ public:
|
|||
return m_UndoList.m_CommandsList.size();
|
||||
}
|
||||
|
||||
|
||||
int GetRedoCommandCount() const
|
||||
{
|
||||
return m_RedoList.m_CommandsList.size();
|
||||
}
|
||||
|
||||
|
||||
void SetModify() { m_FlagModified = true; }
|
||||
void ClrModify() { m_FlagModified = false;; }
|
||||
void SetSave() { m_FlagSave = true; }
|
||||
void ClrSave() { m_FlagSave = false; }
|
||||
bool IsModify() const { return m_FlagModified; }
|
||||
bool IsSave() const { return m_FlagSave; }
|
||||
void SetModify() { m_FlagModified = true; }
|
||||
void ClrModify() { m_FlagModified = false; }
|
||||
void SetSave() { m_FlagSave = true; }
|
||||
void ClrSave() { m_FlagSave = false; }
|
||||
bool IsModify() const { return m_FlagModified; }
|
||||
bool IsSave() const { return m_FlagSave; }
|
||||
|
||||
|
||||
//----<zoom stuff>---------------------------------------------------------
|
||||
|
@ -349,8 +402,6 @@ public:
|
|||
*/
|
||||
const GRID_TYPE& GetGrid() const { return m_Grid; }
|
||||
|
||||
const wxPoint& GetGridOrigin() const { return m_GridOrigin; }
|
||||
|
||||
void SetGrid( const wxRealPoint& size );
|
||||
|
||||
/**
|
||||
|
@ -388,51 +439,6 @@ public:
|
|||
*/
|
||||
void GetGrids( GRIDS& aList );
|
||||
|
||||
void SetMousePosition( const wxPoint& aPosition ) { m_MousePosition = aPosition; }
|
||||
|
||||
/**
|
||||
* Function RefPos
|
||||
* Return the reference position, coming from either the mouse position
|
||||
* or the cursor position.
|
||||
*
|
||||
* @param useMouse If true, return mouse position, else cursor's.
|
||||
*
|
||||
* @return wxPoint - The reference point, either the mouse position or
|
||||
* the cursor position.
|
||||
*/
|
||||
wxPoint RefPos( bool useMouse ) const
|
||||
{
|
||||
return useMouse ? m_MousePosition : m_crossHairPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetCursorPosition
|
||||
* returns the current cursor position in logical (drawing) units.
|
||||
* @param aOnGrid Returns the nearest grid position at the current cursor position.
|
||||
* @param aGridSize Custom grid size instead of the current grid size. Only valid
|
||||
* if \a aOnGrid is true.
|
||||
* @return The current cursor position.
|
||||
*/
|
||||
wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ) const;
|
||||
|
||||
/**
|
||||
* Function GetCursorScreenPosition
|
||||
* returns the cross hair position in device (display) units.b
|
||||
* @return The current cross hair position.
|
||||
*/
|
||||
wxPoint GetCrossHairScreenPosition() const;
|
||||
|
||||
/**
|
||||
* Function GetNearestGridPosition
|
||||
* returns the nearest \a aGridSize location to \a aPosition.
|
||||
* @param aPosition The position to check.
|
||||
* @param aGridSize The grid size to locate to if provided. If NULL then the current
|
||||
* grid size is used.
|
||||
* @return The nearst grid position.
|
||||
*/
|
||||
wxPoint GetNearestGridPosition( const wxPoint& aPosition,
|
||||
wxRealPoint* aGridSize = NULL ) const;
|
||||
|
||||
/**
|
||||
* Function GetClass
|
||||
* returns the class name.
|
||||
|
@ -447,12 +453,6 @@ public:
|
|||
|
||||
void ClearBlockCommand() { m_BlockLocate.Clear(); }
|
||||
|
||||
const wxPoint& GetScrollCenterPosition() const { return m_scrollCenter; }
|
||||
void SetScrollCenterPosition( const wxPoint& aCenterPosition )
|
||||
{
|
||||
m_scrollCenter = aCenterPosition;
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||
#endif
|
||||
|
|
|
@ -18,7 +18,7 @@ class BOARD_DESIGN_SETTINGS
|
|||
{
|
||||
public:
|
||||
bool m_MicroViasAllowed; ///< true to allow micro vias
|
||||
int m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA)
|
||||
int m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA)
|
||||
|
||||
/// if true, when creating a new track starting on an existing track, use this track width
|
||||
bool m_UseConnectedTrackWidth;
|
||||
|
@ -45,6 +45,8 @@ public:
|
|||
wxSize m_ModuleTextSize; ///< Default footprint texts size
|
||||
int m_ModuleTextWidth;
|
||||
int m_ModuleSegmentWidth;
|
||||
wxPoint m_AuxOrigin; ///< origin for plot exports
|
||||
wxPoint m_GridOrigin; ///< origin for grid offsets
|
||||
|
||||
D_PAD m_Pad_Master;
|
||||
|
||||
|
|
|
@ -55,52 +55,55 @@ typedef void ( *END_MOUSE_CAPTURE_CALLBACK )( EDA_DRAW_PANEL* aPanel, wxDC* aDC
|
|||
class EDA_DRAW_PANEL : public wxScrolledWindow
|
||||
{
|
||||
private:
|
||||
int m_currentCursor; ///< Current mouse cursor shape id.
|
||||
int m_defaultCursor; ///< The default mouse cursor shape id.
|
||||
bool m_showCrossHair; ///< Indicate if cross hair is to be shown.
|
||||
int m_cursorLevel; ///< Index for cursor redraw in XOR mode.
|
||||
int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit.
|
||||
int m_scrollIncrementY; ///< Y axis scroll increment in pixels per unit.
|
||||
wxPoint m_CursorStartPos; ///< Used for testing the cursor movement.
|
||||
wxPoint m_PanStartCenter; ///< Initial scroll center position when pan started
|
||||
wxPoint m_PanStartEventPosition; ///< Initial position of mouse event when pan started
|
||||
int m_currentCursor; ///< Current mouse cursor shape id.
|
||||
int m_defaultCursor; ///< The default mouse cursor shape id.
|
||||
bool m_showCrossHair; ///< Indicate if cross hair is to be shown.
|
||||
int m_cursorLevel; ///< Index for cursor redraw in XOR mode.
|
||||
int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit.
|
||||
int m_scrollIncrementY; ///< Y axis scroll increment in pixels per unit.
|
||||
|
||||
wxPoint m_CursorStartPos; ///< Used for testing the cursor movement.
|
||||
wxPoint m_PanStartCenter; ///< Initial scroll center position when pan started
|
||||
wxPoint m_PanStartEventPosition; ///< Initial position of mouse event when pan started
|
||||
|
||||
/// The drawing area used to redraw the screen which is usually the visible area
|
||||
/// of the drawing in internal units.
|
||||
EDA_RECT m_ClipBox;
|
||||
EDA_RECT m_ClipBox;
|
||||
|
||||
bool m_abortRequest; ///< Flag used to abort long commands.
|
||||
bool m_abortRequest; ///< Flag used to abort long commands.
|
||||
|
||||
bool m_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center
|
||||
bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning.
|
||||
bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true
|
||||
///< true to limit panning to scrollbar current limits
|
||||
///< false to used unlimited pan
|
||||
bool m_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center
|
||||
bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning.
|
||||
bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true
|
||||
///< true to limit panning to scrollbar current limits
|
||||
///< false to used unlimited pan
|
||||
|
||||
bool m_enableAutoPan; ///< True to enable automatic panning.
|
||||
bool m_enableAutoPan; ///< True to enable automatic panning.
|
||||
|
||||
/// true to request an auto pan. Valid only when m_enableAutoPan = true.
|
||||
bool m_requestAutoPan;
|
||||
bool m_requestAutoPan; ///< true to request an auto pan. Valid only when m_enableAutoPan = true.
|
||||
|
||||
bool m_ignoreMouseEvents; ///< Ignore mouse events when true.
|
||||
bool m_ignoreMouseEvents; ///< Ignore mouse events when true.
|
||||
|
||||
/* Used to inhibit a response to a mouse left button release, after a double click
|
||||
* (when releasing the left button at the end of the second click. Used in Eeschema
|
||||
* to inhibit a mouse left release command when switching between hierarchical sheets
|
||||
* on a double click.
|
||||
*/
|
||||
bool m_ignoreNextLeftButtonRelease; ///< Ignore the next mouse left button release when true.
|
||||
bool m_ignoreNextLeftButtonRelease; ///< Ignore the next mouse left button release when true.
|
||||
|
||||
bool m_enableBlockCommands; ///< True enables block commands.
|
||||
bool m_enableBlockCommands; ///< True enables block commands.
|
||||
|
||||
int m_minDragEventCount; /* Count the drag events. Used to filter mouse moves before starting a
|
||||
* block command. A block command can be started only if
|
||||
* MinDragEventCount > MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND
|
||||
* in order to avoid spurious block commands. */
|
||||
/**
|
||||
* Count the drag events. Used to filter mouse moves before starting a
|
||||
* block command. A block command can be started only if
|
||||
* MinDragEventCount > MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND in order to avoid
|
||||
* spurious block commands.
|
||||
*/
|
||||
int m_minDragEventCount;
|
||||
|
||||
/// True when drawing in mirror mode. Used by the draw arc function, because arcs
|
||||
/// are oriented, and in mirror mode, orientations are reversed.
|
||||
bool m_PrintIsMirrored;
|
||||
bool m_PrintIsMirrored;
|
||||
|
||||
/// Mouse capture move callback function.
|
||||
MOUSE_CAPTURE_CALLBACK m_mouseCaptureCallback;
|
||||
|
@ -108,9 +111,10 @@ private:
|
|||
/// Abort mouse capture callback function.
|
||||
END_MOUSE_CAPTURE_CALLBACK m_endMouseCaptureCallback;
|
||||
|
||||
// useful to avoid false start block in certain cases
|
||||
// (like switch from a sheet to an other sheet
|
||||
int m_canStartBlock; // >= 0 (or >= n) if a block can start
|
||||
/// useful to avoid false start block in certain cases
|
||||
/// (like switch from a sheet to an other sheet
|
||||
/// >= 0 (or >= n) if a block can start
|
||||
int m_canStartBlock;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -119,7 +123,7 @@ public:
|
|||
|
||||
BASE_SCREEN* GetScreen();
|
||||
|
||||
virtual EDA_DRAW_FRAME* GetParent();
|
||||
EDA_DRAW_FRAME* GetParent();
|
||||
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
|
||||
|
@ -155,9 +159,8 @@ public:
|
|||
|
||||
void SetEnableBlockCommands( bool aEnable ) { m_enableBlockCommands = aEnable; }
|
||||
|
||||
bool GetPrintMirrored() const { return m_PrintIsMirrored; }
|
||||
|
||||
void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; }
|
||||
bool GetPrintMirrored() const { return m_PrintIsMirrored; }
|
||||
void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; }
|
||||
|
||||
void SetCanStartBlock( int aStartBlock ) { m_canStartBlock = aStartBlock; }
|
||||
|
||||
|
@ -196,8 +199,9 @@ public:
|
|||
* the grid origin is set by user, and is not (0,0)
|
||||
* @param aDC = current Device Context
|
||||
* @param aDrawMode = draw mode (GR_COPY, GR_OR ..)
|
||||
* @param aGridOrigin = the absolute coordinate of grid origin for snap.
|
||||
*/
|
||||
void DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode );
|
||||
void DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aGridOrigin );
|
||||
|
||||
void OnEraseBackground( wxEraseEvent& event ) { }
|
||||
|
||||
|
@ -324,7 +328,7 @@ public:
|
|||
* warps the cursor to the current cross hair position.
|
||||
*/
|
||||
void MoveCursorToCrossHair();
|
||||
|
||||
|
||||
/**
|
||||
* Function ToDeviceXY
|
||||
* transforms logical to device coordinates
|
||||
|
|
|
@ -73,8 +73,8 @@ private:
|
|||
|
||||
TITLE_BLOCK m_titles;
|
||||
|
||||
/// Position of the origin axis, which is used in exports mostly, but not yet in EESCHEMA
|
||||
wxPoint m_originAxisPosition;
|
||||
/// Origin of the auxilliary axis, which is used in exports mostly, but not yet in EESCHEMA
|
||||
wxPoint m_aux_origin;
|
||||
|
||||
DLIST< SCH_ITEM > m_drawList; ///< Object list for the screen.
|
||||
/// @todo use DLIST<SCH_ITEM> or superior container
|
||||
|
@ -108,12 +108,12 @@ public:
|
|||
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
||||
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
||||
|
||||
void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
|
||||
void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; }
|
||||
|
||||
const wxString& GetFileName() const { return m_fileName; }
|
||||
const wxString& GetFileName() const { return m_fileName; }
|
||||
|
||||
const wxPoint& GetOriginAxisPosition() const { return m_originAxisPosition; }
|
||||
void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; }
|
||||
const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
|
||||
void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
|
||||
|
||||
const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
|
||||
//TITLE_BLOCK& GetTitleBlock() const { return (TITLE_BLOCK&) m_titles; }
|
||||
|
|
|
@ -19,15 +19,17 @@ class WS_DRAW_ITEM_TEXT; // Forward declaration
|
|||
#define USE_ITALIC (1<<1) // has meaning for texts
|
||||
#define USE_ALT_COLOR (1<<2)
|
||||
#define SELECTED_STATE (1<<3) // When set, use the hight light color to draw item
|
||||
#define LOCATE_STARTPOINT (1<<4) // Used in locate function:set by locate function
|
||||
#define NEW_ITEM (1<<4) // Set for new items which can be deleted
|
||||
// by an abort command
|
||||
#define LOCATE_STARTPOINT (1<<5) // Used in locate function:set by locate function
|
||||
// if the start point is located
|
||||
#define LOCATE_ENDPOINT (1<<5) // Used in locate function:set by locate function
|
||||
#define LOCATE_ENDPOINT (1<<6) // Used in locate function:set by locate function
|
||||
// if the end point is located
|
||||
#define PAGE1OPTION (3<<6) // flag to manage items drawn or not drawn only
|
||||
#define PAGE1OPTION (3<<7) // flag to manage items drawn or not drawn only
|
||||
// on page 1: NONE = item on all pages
|
||||
#define PAGE1OPTION_NONE (0<<6) // NONE = item on all pages
|
||||
#define PAGE1OPTION_PAGE1ONLY (1<<6) // = item only on page 1
|
||||
#define PAGE1OPTION_NOTONPAGE1 (2<<6) // = item on all pages but page 1
|
||||
#define PAGE1OPTION_NONE (0<<7) // NONE = item on all pages
|
||||
#define PAGE1OPTION_PAGE1ONLY (1<<7) // = item only on page 1
|
||||
#define PAGE1OPTION_NOTONPAGE1 (2<<7) // = item on all pages but page 1
|
||||
|
||||
// A coordinate is relative to a page corner.
|
||||
// Any of the 4 corners can be a reference.
|
||||
|
@ -418,6 +420,14 @@ public:
|
|||
*/
|
||||
void SetConstrainedTextSize();
|
||||
|
||||
|
||||
/** Replace the '\''n' sequence by EOL
|
||||
* and the sequence '\''\' by only one '\'
|
||||
* inside m_FullText
|
||||
* @return true if the EOL symbol is found or is inserted (multiline text)
|
||||
*/
|
||||
bool ReplaceAntiSlashSequence();
|
||||
|
||||
/**
|
||||
* @return true is a bold font should be selected
|
||||
*/
|
||||
|
|
|
@ -31,11 +31,10 @@
|
|||
#ifndef _CONVERT_FROM_IU_
|
||||
#define _CONVERT_FROM_IU_
|
||||
|
||||
#include <config.h> // USE_PCBNEW_NANOMETRES is defined here
|
||||
#include <config.h>
|
||||
|
||||
/// Convert from internal units to user units.
|
||||
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
#if defined(GERBVIEW)
|
||||
#define MM_PER_IU 1.0 / 1e5 // Gerbview uses 10 micrometer.
|
||||
#else
|
||||
|
@ -43,32 +42,19 @@
|
|||
#endif
|
||||
#define MILS_PER_IU ( MM_PER_IU * 0.0254 )
|
||||
#define DECIMILS_PER_IU (MM_PER_IU * 0.00254 )
|
||||
#else // Pcbnew in deci-mils.
|
||||
#define DECIMILS_PER_IU 1
|
||||
#define MILS_PER_IU 0.1
|
||||
#define MM_PER_IU (25.4 / 1e4)
|
||||
#endif
|
||||
|
||||
/// Convert PCBNEW internal units (iu) to mils.
|
||||
inline int Iu2Mils( int iu )
|
||||
{
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
double x = iu * MILS_PER_IU;
|
||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||
#else
|
||||
return iu * MILS_PER_IU;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Convert PCBNEW internal units (iu) to deci-mils.
|
||||
inline int Iu2DMils( int iu )
|
||||
{
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
double x = iu * DECIMILS_PER_IU;
|
||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||
#else
|
||||
return iu;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else // Eeschema and anything else.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CONVERT_TO_BIU_H_
|
||||
#define CONVERT_TO_BIU_H_
|
||||
|
||||
#include <config.h> // USE_PCBNEW_NANOMETRES is defined here
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* @file convert_to_biu.h
|
||||
|
@ -18,41 +18,26 @@
|
|||
|
||||
/// Scaling factor to convert mils to internal units.
|
||||
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
#if defined(GERBVIEW)
|
||||
#define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers.
|
||||
#else
|
||||
#define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer.
|
||||
#endif
|
||||
#define IU_PER_MILS (IU_PER_MM * 0.0254)
|
||||
#define IU_PER_DECIMILS (IU_PER_MM * 0.00254)
|
||||
|
||||
#else // Pcbnew compiled for deci-mils.
|
||||
#define IU_PER_DECIMILS 1
|
||||
#define IU_PER_MILS 10.0
|
||||
#define IU_PER_MM (1e4 / 25.4)
|
||||
#if defined(GERBVIEW)
|
||||
#define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers.
|
||||
#else
|
||||
#define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer.
|
||||
#endif
|
||||
#define IU_PER_MILS (IU_PER_MM * 0.0254)
|
||||
#define IU_PER_DECIMILS (IU_PER_MM * 0.00254)
|
||||
|
||||
/// Convert mils to PCBNEW internal units (iu).
|
||||
inline int Mils2iu( int mils )
|
||||
{
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
double x = mils * IU_PER_MILS;
|
||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||
#else
|
||||
return mils * IU_PER_MILS;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Convert deci-mils to PCBNEW internal units (iu).
|
||||
inline int DMils2iu( int dmils )
|
||||
{
|
||||
#if defined( USE_PCBNEW_NANOMETRES )
|
||||
double x = dmils * IU_PER_DECIMILS;
|
||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||
#else
|
||||
return dmils;
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined (PL_EDITOR)
|
||||
|
|
|
@ -182,7 +182,7 @@ private:
|
|||
*/
|
||||
VECTOR2D computeTextSize( const std::string& aText ) const;
|
||||
|
||||
static const double LINE_HEIGHT_RATIO = 1.6;
|
||||
static const double LINE_HEIGHT_RATIO;
|
||||
};
|
||||
} // namespace KiGfx
|
||||
|
||||
|
|
|
@ -217,6 +217,8 @@ void ParseHotkeyConfig( const wxString& data, struct EDA_HOTKEY_CONFIG* aDescLis
|
|||
enum common_hotkey_id_commnand {
|
||||
HK_NOT_FOUND = 0,
|
||||
HK_RESET_LOCAL_COORD,
|
||||
HK_SET_GRID_ORIGIN,
|
||||
HK_RESET_GRID_ORIGIN,
|
||||
HK_HELP,
|
||||
HK_ZOOM_IN,
|
||||
HK_ZOOM_OUT,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue