Merged kicad-gal
This commit is contained in:
commit
c00533a150
|
@ -1,4 +1,4 @@
|
||||||
include/boost
|
boost_root
|
||||||
.downloads-by-cmake
|
.downloads-by-cmake
|
||||||
common/netlist_keywords.*
|
common/netlist_keywords.*
|
||||||
common/netlist_lexer.h
|
common/netlist_lexer.h
|
||||||
|
|
|
@ -2,7 +2,6 @@ add_definitions(-DPCBNEW)
|
||||||
|
|
||||||
include_directories(BEFORE ${INC_BEFORE})
|
include_directories(BEFORE ${INC_BEFORE})
|
||||||
include_directories(
|
include_directories(
|
||||||
${Boost_INCLUDE_DIR}
|
|
||||||
../pcbnew
|
../pcbnew
|
||||||
../polygon
|
../polygon
|
||||||
${INC_AFTER}
|
${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
|
# because of http://public.kitware.com/Bug/view.php?id=10395
|
||||||
|
|
||||||
# Path to local CMake modules.
|
# 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.
|
# KiCad build options should be added below.
|
||||||
|
@ -14,40 +14,33 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||||
# reports.
|
# reports.
|
||||||
#
|
#
|
||||||
|
|
||||||
option(USE_PCBNEW_NANOMETRES
|
|
||||||
"Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON)
|
|
||||||
|
|
||||||
# Russian GOST patch
|
# Russian GOST patch
|
||||||
option(wxUSE_UNICODE "enable/disable building unicode (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)")
|
option( KICAD_GOST "enable/disable building using GOST notation for multiple gates per package ( default OFF)" )
|
||||||
|
|
||||||
#for those who bored with uppercase
|
#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
|
option( USE_WX_GRAPHICS_CONTEXT
|
||||||
"Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental")
|
"Use wxGraphicsContext for rendering ( default OFF). Warning, this is experimental" )
|
||||||
|
|
||||||
option(USE_WX_OVERLAY
|
option( USE_WX_OVERLAY
|
||||||
"Use wxOverlay: Always ON for MAC (default OFF). Warning, this is experimental")
|
"Use wxOverlay: Always ON for MAC ( default OFF). Warning, this is experimental" )
|
||||||
|
|
||||||
#One of these 2 option *must* be set to ON:
|
#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)"
|
"set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)"
|
||||||
)
|
)
|
||||||
|
|
||||||
option(KICAD_TESTING_VERSION
|
option( KICAD_SCRIPTING
|
||||||
"set this option to ON to build the testing version of KICAD. mainly used to set version ID (default OFF)"
|
|
||||||
)
|
|
||||||
|
|
||||||
option(KICAD_SCRIPTING
|
|
||||||
"set this option ON to build the scripting support inside kicad binaries"
|
"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"
|
"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"
|
"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.
|
# 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)
|
#Set version option (stable or testing)
|
||||||
|
|
||||||
if(KICAD_STABLE_VERSION AND KICAD_TESTING_VERSION )
|
if( KICAD_STABLE_VERSION)
|
||||||
message(FATAL_ERROR "Only one KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION can be set to ON")
|
add_definitions( -DKICAD_STABLE_VERSION )
|
||||||
elseif(NOT KICAD_STABLE_VERSION AND NOT KICAD_TESTING_VERSION)
|
message( STATUS "Building stable version of KiCad" )
|
||||||
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")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they
|
# 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.
|
# 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_BUILD_FLAGS "-O2" )
|
||||||
set(KICAD_GCC_RELEASE_DEBUG_FLAGS "")
|
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_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
|
# 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
|
# 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.
|
# see if the problem has been resolved. Wayne.
|
||||||
#
|
#
|
||||||
# Also note the optimization level is -O1 instead of the usual -O2 level
|
# 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).
|
# 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.
|
# 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
|
# 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.
|
# 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)
|
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_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1" )
|
||||||
set(KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing")
|
set( KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if( CMAKE_BUILD_TYPE STREQUAL Debug )
|
||||||
message(STATUS
|
message( STATUS
|
||||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"")
|
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"" )
|
||||||
else()
|
else()
|
||||||
message(STATUS
|
message( STATUS
|
||||||
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"")
|
"Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if( MINGW )
|
||||||
# According to some sources, under Windows -fPIC option is not needed:
|
# According to some sources, under Windows -fPIC option is not needed:
|
||||||
# http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html
|
# http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html
|
||||||
|
|
||||||
# Set default flags for Release build.
|
# Set default flags for Release build.
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG")
|
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_CXX_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG" )
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++")
|
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++" )
|
||||||
|
|
||||||
# Set default flags for Debug build.
|
# Set default flags for Debug build.
|
||||||
set(CMAKE_C_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG")
|
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_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_MODULE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # SWIG macros on Windows
|
||||||
|
|
||||||
else()
|
else()
|
||||||
# We build DLL/DSOs from static libraries, so create position independent code
|
# 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" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
|
||||||
|
|
||||||
# Thou shalt not link vaporware and tell us it's a valid DSO:
|
# Thou shalt not link vaporware and tell us it's a valid DSO:
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
|
||||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined") # needed by SWIG macros on linux
|
set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) # needed by SWIG macros on linux
|
||||||
|
|
||||||
# Set default flags for Release build.
|
# Set default flags for Release build.
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG")
|
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_CXX_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG" )
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
|
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
|
||||||
|
|
||||||
# Set default flags for Debug build.
|
# Set default flags for Debug build.
|
||||||
set(CMAKE_C_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")
|
set( CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# quiet GCC 4.8.1 while in boost
|
# 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" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
||||||
if(wxUSE_UNICODE)
|
if( wxUSE_UNICODE )
|
||||||
add_definitions(-DwxUSE_UNICODE)
|
add_definitions( -DwxUSE_UNICODE )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KICAD_GOST)
|
if( KICAD_GOST )
|
||||||
add_definitions(-DKICAD_GOST)
|
add_definitions( -DKICAD_GOST )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KICAD_KEEPCASE)
|
if( KICAD_KEEPCASE )
|
||||||
add_definitions(-DKICAD_KEEPCASE)
|
add_definitions( -DKICAD_KEEPCASE )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_WX_OVERLAY OR APPLE)
|
if( USE_WX_OVERLAY OR APPLE )
|
||||||
add_definitions(-DUSE_WX_OVERLAY)
|
add_definitions( -DUSE_WX_OVERLAY )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KICAD_SCRIPTING)
|
if( KICAD_SCRIPTING )
|
||||||
add_definitions(-DKICAD_SCRIPTING)
|
add_definitions( -DKICAD_SCRIPTING )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KICAD_SCRIPTING_MODULES)
|
if( KICAD_SCRIPTING_MODULES )
|
||||||
add_definitions(-DKICAD_SCRIPTING_MODULES)
|
add_definitions( -DKICAD_SCRIPTING_MODULES )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(KICAD_SCRIPTING_WXPYTHON)
|
if( KICAD_SCRIPTING_WXPYTHON )
|
||||||
add_definitions(-DKICAD_SCRIPTING_WXPYTHON)
|
add_definitions( -DKICAD_SCRIPTING_WXPYTHON )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_WX_GRAPHICS_CONTEXT)
|
if( USE_WX_GRAPHICS_CONTEXT )
|
||||||
add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
|
add_definitions( -DUSE_WX_GRAPHICS_CONTEXT )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Allow user to override the default settings for adding images to menu items. By default
|
# 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
|
# 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.
|
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
|
||||||
if(NOT DEFINED USE_IMAGES_IN_MENUS)
|
if( NOT DEFINED USE_IMAGES_IN_MENUS )
|
||||||
if(NOT APPLE)
|
if( NOT APPLE )
|
||||||
set(USE_IMAGES_IN_MENUS ON)
|
set( USE_IMAGES_IN_MENUS ON )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(USE_IMAGES_IN_MENUS)
|
if( USE_IMAGES_IN_MENUS )
|
||||||
set(USE_IMAGES_IN_MENUS ON)
|
set( USE_IMAGES_IN_MENUS ON )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Locations for install targets.
|
# Locations for install targets.
|
||||||
set(KICAD_BIN bin
|
set( KICAD_BIN bin
|
||||||
CACHE PATH "Location of KiCad binaries.")
|
CACHE PATH "Location of KiCad binaries." )
|
||||||
|
|
||||||
if(UNIX)
|
if( UNIX )
|
||||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||||
set(KICAD_PLUGINS lib/kicad/plugins
|
set( KICAD_PLUGINS lib/kicad/plugins
|
||||||
CACHE PATH "Location of KiCad plugins.")
|
CACHE PATH "Location of KiCad plugins." )
|
||||||
set(KICAD_DATA share/kicad
|
set( KICAD_DATA share/kicad
|
||||||
CACHE PATH "Location of KiCad data files.")
|
CACHE PATH "Location of KiCad data files." )
|
||||||
set(KICAD_DOCS share/doc/kicad
|
set( KICAD_DOCS share/doc/kicad
|
||||||
CACHE PATH "Location of KiCad documentation files.")
|
CACHE PATH "Location of KiCad documentation files." )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if( MINGW )
|
||||||
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
||||||
set(CMAKE_INSTALL_PREFIX c:/kicad
|
set( CMAKE_INSTALL_PREFIX c:/kicad
|
||||||
CACHE PATH "")
|
CACHE PATH "" )
|
||||||
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||||
set(KICAD_PLUGINS ${KICAD_BIN}/plugins
|
set( KICAD_PLUGINS ${KICAD_BIN}/plugins
|
||||||
CACHE PATH "Location of KiCad plugins.")
|
CACHE PATH "Location of KiCad plugins." )
|
||||||
set(KICAD_DATA share
|
set( KICAD_DATA share
|
||||||
CACHE PATH "Location of KiCad data files.")
|
CACHE PATH "Location of KiCad data files." )
|
||||||
set(KICAD_DOCS doc
|
set( KICAD_DOCS doc
|
||||||
CACHE PATH "Location of KiCad documentation files.")
|
CACHE PATH "Location of KiCad documentation files." )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(KICAD_DEMOS ${KICAD_DATA}/demos
|
set( KICAD_DEMOS ${KICAD_DATA}/demos
|
||||||
CACHE PATH "Location of KiCad demo files.")
|
CACHE PATH "Location of KiCad demo files." )
|
||||||
set(KICAD_TEMPLATE ${KICAD_DATA}/template
|
set( KICAD_TEMPLATE ${KICAD_DATA}/template
|
||||||
CACHE PATH "Location of KiCad template files.")
|
CACHE PATH "Location of KiCad template files." )
|
||||||
|
|
||||||
mark_as_advanced(KICAD_BIN
|
mark_as_advanced( KICAD_BIN
|
||||||
KICAD_PLUGINS
|
KICAD_PLUGINS
|
||||||
KICAD_DATA
|
KICAD_DATA
|
||||||
KICAD_DOCS
|
KICAD_DOCS
|
||||||
KICAD_DEMOS
|
KICAD_DEMOS
|
||||||
KICAD_TEMPLATE)
|
KICAD_TEMPLATE )
|
||||||
|
|
||||||
include(Functions)
|
include( Functions )
|
||||||
|
|
||||||
include( ExternalProject )
|
include( ExternalProject )
|
||||||
|
|
||||||
#================================================
|
#================================================
|
||||||
# Find libraries that are needed to build KiCad.
|
# Find libraries that are needed to build KiCad.
|
||||||
#================================================
|
#================================================
|
||||||
include(CheckFindPackageResult)
|
include( CheckFindPackageResult )
|
||||||
|
|
||||||
# Turn on wxWidgets compatibility mode for some classes
|
# Turn on wxWidgets compatibility mode for some classes
|
||||||
add_definitions(-DWX_COMPATIBILITY)
|
add_definitions(-DWX_COMPATIBILITY)
|
||||||
|
@ -262,8 +251,8 @@ add_definitions(-DWX_COMPATIBILITY)
|
||||||
#######################
|
#######################
|
||||||
# Find OpenGL library #
|
# Find OpenGL library #
|
||||||
#######################
|
#######################
|
||||||
find_package(OpenGL QUIET)
|
find_package( OpenGL QUIET )
|
||||||
check_find_package_result(OPENGL_FOUND "OpenGL")
|
check_find_package_result( OPENGL_FOUND "OpenGL" )
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Find GLEW library #
|
# Find GLEW library #
|
||||||
|
@ -277,9 +266,8 @@ check_find_package_result(GLEW_FOUND "GLEW")
|
||||||
find_package(Cairo 1.8.1 QUIET)
|
find_package(Cairo 1.8.1 QUIET)
|
||||||
check_find_package_result(CAIRO_FOUND "Cairo")
|
check_find_package_result(CAIRO_FOUND "Cairo")
|
||||||
|
|
||||||
##########################
|
# Download boost and possibly build parts of it
|
||||||
# Download Boost library #
|
#################################################
|
||||||
##########################
|
|
||||||
include( download_boost )
|
include( download_boost )
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,118 +279,133 @@ include( download_boost )
|
||||||
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
|
# 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
|
# On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base
|
||||||
if(APPLE)
|
if( APPLE )
|
||||||
find_package(wxWidgets COMPONENTS gl adv html core net base xml QUIET)
|
find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET )
|
||||||
else(APPLE)
|
else( APPLE )
|
||||||
find_package(wxWidgets COMPONENTS gl aui adv html core net base xml QUIET)
|
find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET )
|
||||||
endif(APPLE)
|
endif( APPLE )
|
||||||
check_find_package_result(wxWidgets_FOUND "wxWidgets")
|
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
|
||||||
|
|
||||||
|
|
||||||
# Include wxWidgets macros.
|
# Include wxWidgets macros.
|
||||||
include(${wxWidgets_USE_FILE})
|
include( ${wxWidgets_USE_FILE} )
|
||||||
|
|
||||||
# Include MinGW resource compiler.
|
# Include MinGW resource compiler.
|
||||||
include(MinGWResourceCompiler)
|
include( MinGWResourceCompiler )
|
||||||
|
|
||||||
# Generate build system specific header file.
|
# Generate build system specific header file.
|
||||||
include(PerformFeatureChecks)
|
include( PerformFeatureChecks )
|
||||||
perform_feature_checks()
|
perform_feature_checks()
|
||||||
|
|
||||||
# Find GDI+ on windows if wxGraphicsContext is available.
|
# Find GDI+ on windows if wxGraphicsContext is available.
|
||||||
if(MINGW AND USE_WX_GRAPHICS_CONTEXT)
|
if( MINGW AND USE_WX_GRAPHICS_CONTEXT )
|
||||||
find_package(GdiPlus)
|
find_package( GdiPlus )
|
||||||
check_find_package_result(GDI_PLUS_FOUND "GDI+")
|
check_find_package_result( GDI_PLUS_FOUND "GDI+" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find Python and other scripting resources
|
# Assist with header file searching optimization:
|
||||||
if(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
|
# INC_BEFORE and INC_AFTER are two lists which go at the front and back of the
|
||||||
set(PythonInterp_FIND_VERSION)
|
# header file search lists, respectively.
|
||||||
find_package(PythonInterp)
|
# INC_BEFORE is for use with "include_directories( BEFORE ...)", which _reverses_
|
||||||
check_find_package_result(PYTHONINTERP_FOUND "Python Interpreter")
|
# the order during insertion. (So put first wanted last, which is
|
||||||
|
# ${CMAKE_SOURCE_DIR/include.) Use '.' for current source dir since
|
||||||
# Get the correct Python site package install path from the Python interpreter found by
|
# we don't want expansion here and now, which would happen if using ${CMAKE_CURRENT_SOURCE_DIR}.
|
||||||
# FindPythonInterp unless the user specifically defined a custom path.
|
# Instead we use '.' which is applicable to any source directory below here as a result of
|
||||||
if(NOT PYTHON_SITE_PACKAGE_PATH)
|
# this lack of expansion.
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()"
|
set( INC_BEFORE
|
||||||
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
|
|
||||||
.
|
.
|
||||||
${CMAKE_SOURCE_DIR}/include
|
${CMAKE_SOURCE_DIR}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
set(INC_AFTER
|
set( INC_AFTER
|
||||||
|
${Boost_INCLUDE_DIR}
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
${CMAKE_BINARY_DIR}
|
${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
|
# Let CMake look in these directories for nested
|
||||||
# 'CMakeLists.txt' files to process
|
# 'CMakeLists.txt' files to process
|
||||||
#================================================
|
#================================================
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Binaries (CMake targets) #
|
# Binaries ( CMake targets ) #
|
||||||
############################
|
############################
|
||||||
|
|
||||||
add_subdirectory(bitmaps_png)
|
add_subdirectory( bitmaps_png )
|
||||||
add_subdirectory(common)
|
add_subdirectory( common )
|
||||||
add_subdirectory(3d-viewer)
|
add_subdirectory( 3d-viewer )
|
||||||
add_subdirectory(cvpcb)
|
add_subdirectory( cvpcb )
|
||||||
add_subdirectory(eeschema)
|
add_subdirectory( eeschema )
|
||||||
add_subdirectory(gerbview)
|
add_subdirectory( gerbview )
|
||||||
add_subdirectory(kicad)
|
add_subdirectory( kicad )
|
||||||
add_subdirectory(pcbnew)
|
add_subdirectory( pcbnew )
|
||||||
add_subdirectory(pcbnew/pcad2kicadpcb_plugin)
|
add_subdirectory( polygon )
|
||||||
add_subdirectory(polygon)
|
add_subdirectory( pagelayout_editor )
|
||||||
add_subdirectory(pagelayout_editor)
|
add_subdirectory( potrace )
|
||||||
add_subdirectory(potrace)
|
add_subdirectory( bitmap2component )
|
||||||
add_subdirectory(bitmap2component)
|
add_subdirectory( pcb_calculator )
|
||||||
add_subdirectory(pcb_calculator)
|
add_subdirectory( tools )
|
||||||
add_subdirectory(tools)
|
#add_subdirectory( new )
|
||||||
#add_subdirectory(new)
|
|
||||||
|
|
||||||
|
|
||||||
# Make all libs and executables depend on ExternalProject_Add( boost ),
|
# 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( pcbnew boost )
|
||||||
add_dependencies( eeschema boost )
|
add_dependencies( eeschema boost )
|
||||||
add_dependencies( cvpcb boost )
|
add_dependencies( cvpcb boost )
|
||||||
|
add_dependencies( gal boost )
|
||||||
add_dependencies( common boost )
|
add_dependencies( common boost )
|
||||||
add_dependencies( pcbcommon boost )
|
add_dependencies( pcbcommon boost )
|
||||||
add_dependencies( 3d-viewer boost )
|
add_dependencies( 3d-viewer boost )
|
||||||
|
@ -414,14 +417,14 @@ add_dependencies( pl_editor boost )
|
||||||
#############
|
#############
|
||||||
# Resources #
|
# Resources #
|
||||||
#############
|
#############
|
||||||
add_subdirectory(demos)
|
add_subdirectory( demos )
|
||||||
add_subdirectory(template)
|
add_subdirectory( template )
|
||||||
|
|
||||||
#================================================
|
#================================================
|
||||||
# Doxygen Output
|
# Doxygen Output
|
||||||
#================================================
|
#================================================
|
||||||
find_package(Doxygen)
|
find_package( Doxygen )
|
||||||
if(DOXYGEN_FOUND)
|
if( DOXYGEN_FOUND )
|
||||||
add_custom_target( doxygen-docs
|
add_custom_target( doxygen-docs
|
||||||
${CMAKE_COMMAND} -E remove_directory Documentation/doxygen
|
${CMAKE_COMMAND} -E remove_directory Documentation/doxygen
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE}
|
COMMAND ${DOXYGEN_EXECUTABLE}
|
||||||
|
@ -440,67 +443,67 @@ endif()
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
|
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
IMMEDIATE @ONLY)
|
IMMEDIATE @ONLY )
|
||||||
|
|
||||||
add_custom_target(uninstall
|
add_custom_target( uninstall
|
||||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" )
|
||||||
|
|
||||||
|
|
||||||
#================================================
|
#================================================
|
||||||
# Installation parameters
|
# Installation parameters
|
||||||
#================================================
|
#================================================
|
||||||
install(FILES INSTALL.txt
|
install( FILES INSTALL.txt
|
||||||
DESTINATION ${KICAD_DOCS}
|
DESTINATION ${KICAD_DOCS}
|
||||||
COMPONENT resources)
|
COMPONENT resources )
|
||||||
|
|
||||||
install(FILES resources/freeroute.jnlp
|
install( FILES resources/freeroute.jnlp
|
||||||
DESTINATION ${KICAD_BIN}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT resources)
|
COMPONENT resources )
|
||||||
|
|
||||||
###
|
###
|
||||||
# Install scripts
|
# Install scripts
|
||||||
###
|
###
|
||||||
if(UNIX)
|
if( UNIX )
|
||||||
install(DIRECTORY scripts
|
install( DIRECTORY scripts
|
||||||
DESTINATION ${KICAD_DOCS}
|
DESTINATION ${KICAD_DOCS}
|
||||||
COMPONENT resources
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
###
|
###
|
||||||
# FreeDesktop .desktop and MIME resources
|
# FreeDesktop .desktop and MIME resources
|
||||||
###
|
###
|
||||||
if(UNIX)
|
if( UNIX )
|
||||||
# Set paths
|
# Set paths
|
||||||
set(UNIX_MIME_DIR resources/linux/mime)
|
set( UNIX_MIME_DIR resources/linux/mime )
|
||||||
set(UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk)
|
set( UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk )
|
||||||
set(UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime)
|
set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
|
||||||
set(UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons)
|
set( UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons )
|
||||||
set(UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications)
|
set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
|
||||||
|
|
||||||
# Install Mimelnk directory
|
# Install Mimelnk directory
|
||||||
install(DIRECTORY ${UNIX_MIMELNK_FILES}
|
install( DIRECTORY ${UNIX_MIMELNK_FILES}
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||||
COMPONENT resources
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE )
|
||||||
|
|
||||||
# Install Mime directory
|
# Install Mime directory
|
||||||
install(DIRECTORY ${UNIX_ICONS_FILES}
|
install( DIRECTORY ${UNIX_ICONS_FILES}
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||||
COMPONENT resources
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE )
|
||||||
|
|
||||||
# Install Icons
|
# Install Icons
|
||||||
install(DIRECTORY ${UNIX_MIME_FILES}
|
install( DIRECTORY ${UNIX_MIME_FILES}
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||||
COMPONENT resources
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE )
|
||||||
|
|
||||||
# Install Applications directory (.desktop files)
|
# Install Applications directory (.desktop files)
|
||||||
install(DIRECTORY ${UNIX_APPLICATIONS_FILES}
|
install( DIRECTORY ${UNIX_APPLICATIONS_FILES}
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/share
|
||||||
COMPONENT resources
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE )
|
||||||
endif()
|
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)
|
IF (APPLE)
|
||||||
# These values for Apple could probably do with improvement.
|
# 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
|
/System/Library/Frameworks/GLEW.framework/Versions/A/Headers
|
||||||
|
/opt/local/include
|
||||||
${OPENGL_LIBRARY_DIR}
|
${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)
|
ELSE (APPLE)
|
||||||
|
|
||||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
|
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.
|
# mean won't fail somewhere down the line.
|
||||||
check_include_file("iso646.h" HAVE_ISO646_H)
|
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
|
# 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
|
# conflicts with /usr/include/python2.6/Python.h. Please rename the macro if
|
||||||
# re-introduce this.
|
# 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
|
#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
|
/// The legacy file format revision of the *.brd file created by this build
|
||||||
#if defined(USE_PCBNEW_NANOMETRES)
|
#define LEGACY_BOARD_FILE_VERSION 2
|
||||||
#define LEGACY_BOARD_FILE_VERSION 2
|
|
||||||
#else
|
|
||||||
#define LEGACY_BOARD_FILE_VERSION 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Definition to compile with Pcbnew footprint library table implementation.
|
/// Definition to compile with Pcbnew footprint library table implementation.
|
||||||
#cmakedefine USE_FP_LIB_TABLE
|
#cmakedefine USE_FP_LIB_TABLE
|
||||||
|
|
||||||
|
/// When defined, build the GITHUB_PLUGIN for pcbnew.
|
||||||
|
#cmakedefine BUILD_GITHUB_PLUGIN
|
||||||
|
|
||||||
|
|
||||||
#endif // CONFIG_H_
|
#endif // CONFIG_H_
|
||||||
|
|
|
@ -22,11 +22,43 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Download and patch boost headers to a particular version.
|
# 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.
|
# 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}" )
|
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
|
||||||
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
|
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
|
# 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.
|
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
|
||||||
|
|
||||||
# include only the headers in the repo.
|
# path to the boost headers in the repo.
|
||||||
# repo = "${headers}/../.bzr" = "<SOURCE_DIR>/.bzr"
|
# repo = "${headers_src}/../.bzr" = "<SOURCE_DIR>/.bzr"
|
||||||
set( headers ${PREFIX}/src/boost/boost )
|
set( headers_src "${PREFIX}/src/boost/boost" )
|
||||||
|
|
||||||
|
|
||||||
ExternalProject_Add( boost
|
# don't look at this:
|
||||||
PREFIX ${PREFIX}
|
function( set_boost_lib_names libs output )
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
foreach( lib ${libs} )
|
||||||
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
set( fullpath_lib, "${BOOST_ROOT}/lib/libboost_${lib}.a" )
|
||||||
URL_MD5 ${BOOST_MD5}
|
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:
|
# (BTW "test" yields "unit_test_framework" when passed to bootstrap.{sh,bat} ).
|
||||||
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
|
message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" )
|
||||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${headers} ${PROJECT_SOURCE_DIR}/include/boost
|
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
|
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
|
ExternalProject_Add_Step( boost bzr_add_boost
|
||||||
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers}
|
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src}
|
||||||
COMMAND bzr add -q ${headers}
|
COMMAND bzr add -q ${headers_src}
|
||||||
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
||||||
DEPENDERS bzr_commit_boost
|
DEPENDERS bzr_commit_boost
|
||||||
)
|
)
|
||||||
|
@ -79,3 +186,4 @@ ExternalProject_Add_Step( boost bzr_init_boost
|
||||||
DEPENDERS bzr_add_boost
|
DEPENDERS bzr_add_boost
|
||||||
DEPENDEES download
|
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,
|
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.
|
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)
|
KICAD_GOST (ON/OFF)
|
||||||
-------------------
|
-------------------
|
||||||
This option is used to enable or disable the GOST notation for multiple gates
|
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:
|
6) Compile:
|
||||||
cd kicad_john
|
cd kicad_john
|
||||||
mkdir build; cd build
|
mkdir build; cd build
|
||||||
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug
|
cmake ../ -DCMAKE_BUILD_TYPE=Debug
|
||||||
to build a debug version
|
to build a debug version
|
||||||
or
|
or
|
||||||
cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Release
|
cmake ../ -DCMAKE_BUILD_TYPE=Release
|
||||||
to build a release version
|
to build a release version
|
||||||
make
|
make
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ include_directories(BEFORE ${INC_BEFORE})
|
||||||
include_directories(
|
include_directories(
|
||||||
./dialogs
|
./dialogs
|
||||||
./dialog_about
|
./dialog_about
|
||||||
${Boost_INCLUDE_DIR}
|
|
||||||
${CAIRO_INCLUDE_DIR}
|
${CAIRO_INCLUDE_DIR}
|
||||||
|
${GLEW_INCLUDE_DIR}
|
||||||
../3d-viewer
|
../3d-viewer
|
||||||
../pcbnew
|
../pcbnew
|
||||||
../polygon
|
../polygon
|
||||||
|
@ -57,9 +57,10 @@ set(GAL_SRCS
|
||||||
add_library(gal STATIC ${GAL_SRCS})
|
add_library(gal STATIC ${GAL_SRCS})
|
||||||
add_dependencies(gal shader_headers)
|
add_dependencies(gal shader_headers)
|
||||||
|
|
||||||
if(WIN32)
|
# Only for win32 cross compilation using MXE
|
||||||
|
if(WIN32 AND MSYS)
|
||||||
add_definitions(-DGLEW_STATIC)
|
add_definitions(-DGLEW_STATIC)
|
||||||
endif(WIN32)
|
endif(WIN32 AND MSYS)
|
||||||
|
|
||||||
set(COMMON_ABOUT_DLG_SRCS
|
set(COMMON_ABOUT_DLG_SRCS
|
||||||
dialog_about/AboutDialog_main.cpp
|
dialog_about/AboutDialog_main.cpp
|
||||||
|
|
|
@ -288,10 +288,10 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
|
wxPoint BASE_SCREEN::getNearestGridPosition( const wxPoint& aPosition,
|
||||||
wxRealPoint* aGridSize ) const
|
const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const
|
||||||
{
|
{
|
||||||
wxPoint pt;
|
wxPoint pt;
|
||||||
wxRealPoint gridSize;
|
wxRealPoint gridSize;
|
||||||
|
|
||||||
if( aGridSize )
|
if( aGridSize )
|
||||||
|
@ -299,13 +299,13 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition,
|
||||||
else
|
else
|
||||||
gridSize = GetGridSize();
|
gridSize = GetGridSize();
|
||||||
|
|
||||||
wxPoint gridOrigin = m_GridOrigin;
|
double offset = fmod( aGridOrigin.x, gridSize.x );
|
||||||
|
|
||||||
double offset = fmod( gridOrigin.x, gridSize.x );
|
|
||||||
int x = KiROUND( (aPosition.x - offset) / gridSize.x );
|
int x = KiROUND( (aPosition.x - offset) / gridSize.x );
|
||||||
|
|
||||||
pt.x = KiROUND( x * gridSize.x + offset );
|
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 );
|
int y = KiROUND( (aPosition.y - offset) / gridSize.y );
|
||||||
pt.y = KiROUND ( y * gridSize.y + offset );
|
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 )
|
if( aOnGrid )
|
||||||
return GetNearestGridPosition( m_crossHairPosition, aGridSize );
|
return getNearestGridPosition( m_crossHairPosition, aGridOrigin, aGridSize );
|
||||||
|
|
||||||
return m_crossHairPosition;
|
return m_crossHairPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const
|
wxPoint BASE_SCREEN::getCrossHairScreenPosition() const
|
||||||
{
|
{
|
||||||
wxPoint pos = m_crossHairPosition - m_DrawOrg;
|
wxPoint pos = m_crossHairPosition - m_DrawOrg;
|
||||||
double scalar = GetScalingFactor();
|
double scalar = GetScalingFactor();
|
||||||
|
|
||||||
pos.x = KiROUND( (double) pos.x * scalar );
|
pos.x = KiROUND( (double) pos.x * scalar );
|
||||||
pos.y = KiROUND( (double) pos.y * 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 )
|
if( aSnapToGrid )
|
||||||
m_crossHairPosition = GetNearestGridPosition( aPosition );
|
m_crossHairPosition = getNearestGridPosition( aPosition, aGridOrigin, NULL );
|
||||||
else
|
else
|
||||||
m_crossHairPosition = aPosition;
|
m_crossHairPosition = aPosition;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
* depending on the application.
|
* depending on the application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <macros.h>
|
||||||
#include <base_struct.h>
|
#include <base_struct.h>
|
||||||
#include <class_title_block.h>
|
#include <class_title_block.h>
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
@ -187,7 +188,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed )
|
||||||
|
|
||||||
|
|
||||||
/* Convert a value to a string using double notation.
|
/* 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
|
* the trailing 0 are removed if the mantissa has more than 3 digits
|
||||||
* and some trailing 0
|
* and some trailing 0
|
||||||
* This function should be used to display values in dialogs because a value
|
* 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 ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
|
||||||
{
|
{
|
||||||
wxString stringValue;
|
double value_to_print = To_User_Unit( aUnit, aValue );
|
||||||
double value_to_print;
|
|
||||||
|
|
||||||
value_to_print = To_User_Unit( aUnit, aValue );
|
|
||||||
|
|
||||||
#if defined( EESCHEMA )
|
#if defined( EESCHEMA )
|
||||||
stringValue.Printf( wxT( "%.3f" ), value_to_print );
|
wxString stringValue = wxString::Format( 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
|
|
||||||
|
|
||||||
// Strip trailing zeros. However, keep at least 3 digits in mantissa
|
// Strip trailing zeros. However, keep at least 3 digits in mantissa
|
||||||
// For readability
|
// For readability
|
||||||
StripTrailingZeros( stringValue, 3 );
|
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
|
#endif
|
||||||
|
|
||||||
if( aAddUnitSymbol )
|
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 )
|
int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
|
||||||
{
|
{
|
||||||
double value;
|
double value;
|
||||||
|
|
|
@ -502,13 +502,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
|
||||||
tmp << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
tmp << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << wxT( "\n" );
|
<< ( 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=" );
|
tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
|
||||||
#ifdef USE_WX_GRAPHICS_CONTEXT
|
#ifdef USE_WX_GRAPHICS_CONTEXT
|
||||||
tmp << wxT( "ON\n" );
|
tmp << wxT( "ON\n" );
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
BLOCK_SELECTOR::BLOCK_SELECTOR() :
|
BLOCK_SELECTOR::BLOCK_SELECTOR() :
|
||||||
EDA_RECT()
|
EDA_RECT()
|
||||||
{
|
{
|
||||||
m_state = STATE_NO_BLOCK; /* State (enum BLOCK_STATE_T) of block. */
|
m_state = STATE_NO_BLOCK; // State (enum BLOCK_STATE_T) of block.
|
||||||
m_command = BLOCK_IDLE; /* Type (enum BLOCK_COMMAND_T) of operation. */
|
m_command = BLOCK_IDLE; // Type (enum BLOCK_COMMAND_T) of operation.
|
||||||
m_color = BROWN;
|
m_color = BROWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,24 +62,24 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
|
||||||
case BLOCK_IDLE:
|
case BLOCK_IDLE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_MOVE: /* Move */
|
case BLOCK_MOVE: // Move
|
||||||
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
|
case BLOCK_PRESELECT_MOVE: // Move with preselection list
|
||||||
msg = _( "Block Move" );
|
msg = _( "Block Move" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DRAG: /* Drag */
|
case BLOCK_DRAG: // Drag
|
||||||
msg = _( "Block Drag" );
|
msg = _( "Block Drag" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_COPY: /* Copy */
|
case BLOCK_COPY: // Copy
|
||||||
msg = _( "Block Copy" );
|
msg = _( "Block Copy" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DELETE: /* Delete */
|
case BLOCK_DELETE: // Delete
|
||||||
msg = _( "Block Delete" );
|
msg = _( "Block Delete" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_SAVE: /* Save */
|
case BLOCK_SAVE: // Save
|
||||||
msg = _( "Block Save" );
|
msg = _( "Block Save" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -87,20 +87,20 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame )
|
||||||
msg = _( "Block Paste" );
|
msg = _( "Block Paste" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_ZOOM: /* Window Zoom */
|
case BLOCK_ZOOM: // Window Zoom
|
||||||
msg = _( "Win Zoom" );
|
msg = _( "Win Zoom" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_ROTATE: /* Rotate 90 deg */
|
case BLOCK_ROTATE: // Rotate 90 deg
|
||||||
msg = _( "Block Rotate" );
|
msg = _( "Block Rotate" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_FLIP: /* Flip */
|
case BLOCK_FLIP: // Flip
|
||||||
msg = _( "Block Flip" );
|
msg = _( "Block Flip" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_MIRROR_X:
|
case BLOCK_MIRROR_X:
|
||||||
case BLOCK_MIRROR_Y: /* mirror */
|
case BLOCK_MIRROR_Y: // mirror
|
||||||
msg = _( "Block Mirror" );
|
msg = _( "Block Mirror" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -185,15 +185,15 @@ void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoin
|
||||||
if( aErase )
|
if( aErase )
|
||||||
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||||
|
|
||||||
block->SetLastCursorPosition( aPanel->GetScreen()->GetCrossHairPosition() );
|
block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||||
block->SetEnd( aPanel->GetScreen()->GetCrossHairPosition() );
|
block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() );
|
||||||
|
|
||||||
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() );
|
||||||
|
|
||||||
if( block->GetState() == STATE_BLOCK_INIT )
|
if( block->GetState() == STATE_BLOCK_INIT )
|
||||||
{
|
{
|
||||||
if( block->GetWidth() || block->GetHeight() )
|
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 );
|
block->SetState( STATE_BLOCK_END );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,14 +203,14 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
{
|
{
|
||||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
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->CallMouseCapture( aDC, wxDefaultPosition, false );
|
||||||
aPanel->SetMouseCapture( NULL, NULL );
|
aPanel->SetMouseCapture( NULL, NULL );
|
||||||
screen->SetCurItem( 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 )
|
if( screen->m_BlockLocate.GetCommand() != BLOCK_PASTE )
|
||||||
screen->m_BlockLocate.ClearItemsList();
|
screen->m_BlockLocate.ClearItemsList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,15 +10,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined KICAD_TESTING_VERSION
|
#if defined KICAD_STABLE_VERSION
|
||||||
# define VERSION_STABILITY "testing"
|
|
||||||
#elif defined KICAD_STABLE_VERSION
|
|
||||||
# define VERSION_STABILITY "stable"
|
# define VERSION_STABILITY "stable"
|
||||||
#else
|
#else
|
||||||
# define VERSION_STABILITY "unknown"
|
# define VERSION_STABILITY "product"
|
||||||
# warning "unknown version stability"
|
|
||||||
# warning "please: when running CMAKE, add -DKICAD_TESTING_VERSION=ON"
|
|
||||||
# warning "or -DKICAD_STABLE_VERSION=ON option"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,8 +22,11 @@
|
||||||
*/
|
*/
|
||||||
wxString GetBuildVersion()
|
wxString GetBuildVersion()
|
||||||
{
|
{
|
||||||
static wxString msg;
|
wxString msg = wxString::Format(
|
||||||
msg.Printf( wxT("%s-%s"),
|
wxT( "%s-%s" ),
|
||||||
wxT( KICAD_BUILD_VERSION ), wxT( VERSION_STABILITY ));
|
wxT( KICAD_BUILD_VERSION ),
|
||||||
|
wxT( VERSION_STABILITY )
|
||||||
|
);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
||||||
info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) );
|
info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) );
|
||||||
|
|
||||||
/* Copyright information */
|
/* Copyright information */
|
||||||
info.SetCopyright( wxT( "(C) 1992-2012 KiCad Developers Team" ) );
|
info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) );
|
||||||
|
|
||||||
/* KiCad build version */
|
/* KiCad build version */
|
||||||
wxString version;
|
wxString version;
|
||||||
|
@ -203,98 +203,109 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
||||||
* which should be represented by the same icon.
|
* which should be represented by the same icon.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The developers */
|
// The developers
|
||||||
info.AddDeveloper( new Contributor( wxT( "Jean-Pierre Charras" ),
|
info.AddDeveloper(
|
||||||
wxT( "jp.charras@wanadoo.fr" ) ) );
|
new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) );
|
||||||
info.AddDeveloper( new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
|
info.AddDeveloper(
|
||||||
info.AddDeveloper( new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
|
new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
|
||||||
info.AddDeveloper( new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) );
|
info.AddDeveloper(
|
||||||
info.AddDeveloper( new Contributor( wxT( "Jerry Jacobs" ),
|
new Contributor( wxT( "Wayne Stambaugh" ), wxT( "stambaughw@verizon.net" ) ) );
|
||||||
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 document writers */
|
// alphabetically by last name after main 3 above:
|
||||||
info.AddDocWriter( new Contributor( wxT( "Jean-Pierre Charras" ),
|
info.AddDeveloper(
|
||||||
wxT( "jp.charras@wanadoo.fr" ) ) );
|
new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
|
||||||
info.AddDocWriter( new Contributor( wxT( "Igor Plyatov" ),
|
info.AddDeveloper(
|
||||||
wxT( "plyatov@gmail.com" ) ) );
|
new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) );
|
||||||
info.AddDocWriter( new Contributor( wxT( "Fabrizio Tappero" ),
|
info.AddDeveloper(
|
||||||
wxT( "fabrizio.tappero@gmail.com" ) ) );
|
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
|
/* The translators
|
||||||
* As category the language to which the translation was done is used
|
* As category the language to which the translation was done is used
|
||||||
* and as icon the national flag of the corresponding country.
|
* and as icon the national flag of the corresponding country.
|
||||||
*/
|
*/
|
||||||
info.AddTranslator( new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ),
|
info.AddTranslator(
|
||||||
wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
|
new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ), wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Jerry Jacobs" ),
|
info.AddTranslator(
|
||||||
wxT( "xor.gate.engineering@gmail.com" ), wxT( "Dutch (NL)" ),
|
new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ),wxT( "Dutch (NL)" ), KiBitmapNew( lang_nl_xpm ) ) );
|
||||||
KiBitmapNew( lang_nl_xpm ) ) );
|
info.AddTranslator(
|
||||||
info.AddTranslator( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ),
|
new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ), wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
|
||||||
wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
|
info.AddTranslator(
|
||||||
info.AddTranslator( new Contributor( wxT( "Jean-Pierre Charras" ),
|
new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ), wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
|
||||||
wxT( "jp.charras@wanadoo.fr" ),
|
info.AddTranslator(
|
||||||
wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
|
new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ), wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ),
|
info.AddTranslator(
|
||||||
wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
|
new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ),
|
info.AddTranslator(
|
||||||
wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
|
new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ),
|
info.AddTranslator(
|
||||||
wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ),
|
info.AddTranslator(
|
||||||
wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
|
new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ),
|
info.AddTranslator(
|
||||||
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ),
|
info.AddTranslator(
|
||||||
wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
|
new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ), KiBitmapNew( lang_de_xpm ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Rafael Sokolowski" ),
|
info.AddTranslator(
|
||||||
wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ),
|
new Contributor( wxT( "Kenta Yonekura" ), wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ), KiBitmapNew( lang_jp_xpm ) ) );
|
||||||
KiBitmapNew( lang_de_xpm ) ) );
|
info.AddTranslator(
|
||||||
info.AddTranslator( new Contributor( wxT( "Kenta Yonekura" ),
|
new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
|
||||||
wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ),
|
wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ), KiBitmapNew( lang_gr_xpm ) ) );
|
||||||
KiBitmapNew( lang_jp_xpm ) ) );
|
info.AddTranslator(
|
||||||
info.AddTranslator( new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
|
new Contributor( wxT( "Massimo Cioce" ), wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ), KiBitmapNew( lang_it_xpm ) ) );
|
||||||
wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ),
|
info.AddTranslator(
|
||||||
KiBitmapNew( lang_gr_xpm ) ) );
|
new Contributor( wxT( "Evgeniy Ivanov" ), wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ),KiBitmapNew( lang_bg_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,
|
// TODO: are these all russian translators,
|
||||||
// placed them here now,
|
// placed them here now,
|
||||||
// or else align them below other language maintainer with mail adress
|
// 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( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "David Briscoe" ), 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( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) );
|
||||||
info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) );
|
info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) );
|
||||||
|
|
||||||
/* Programm credits for icons */
|
// Programm credits for icons
|
||||||
info.AddArtist( new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ),
|
info.AddArtist(
|
||||||
wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
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" ),
|
info.AddArtist(
|
||||||
wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) );
|
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" ),
|
info.AddArtist(
|
||||||
wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
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" ),
|
info.AddArtist(
|
||||||
wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
|
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" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
<wxFormBuilder_Project>
|
<wxFormBuilder_Project>
|
||||||
<FileVersion major="1" minor="10" />
|
<FileVersion major="1" minor="11" />
|
||||||
<object class="Project" expanded="1">
|
<object class="Project" expanded="1">
|
||||||
<property name="class_decoration"></property>
|
<property name="class_decoration" />
|
||||||
<property name="code_generation">C++</property>
|
<property name="code_generation">C++</property>
|
||||||
<property name="disconnect_events">1</property>
|
<property name="disconnect_events">1</property>
|
||||||
<property name="disconnect_mode">source_name</property>
|
<property name="disconnect_mode">source_name</property>
|
||||||
|
@ -14,73 +14,73 @@
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">MyProject</property>
|
<property name="name">MyProject</property>
|
||||||
<property name="namespace"></property>
|
<property name="namespace" />
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="precompiled_header" />
|
||||||
<property name="relative_path">1</property>
|
<property name="relative_path">1</property>
|
||||||
<property name="skip_python_events">1</property>
|
<property name="skip_python_events">1</property>
|
||||||
<property name="use_enum">1</property>
|
<property name="use_enum">1</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<object class="Dialog" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="center"></property>
|
<property name="center" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="event_handler">impl_virtual</property>
|
<property name="event_handler">impl_virtual</property>
|
||||||
<property name="extra_style"></property>
|
<property name="extra_style" />
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</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="minimum_size">-1,-1</property>
|
||||||
<property name="name">dialog_about_base</property>
|
<property name="name">dialog_about_base</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size">750,450</property>
|
<property name="size">750,450</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP</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="title">About...</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<event name="OnActivate"></event>
|
<event name="OnActivate" />
|
||||||
<event name="OnActivateApp"></event>
|
<event name="OnActivateApp" />
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnClose">OnClose</event>
|
<event name="OnClose">OnClose</event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnHibernate"></event>
|
<event name="OnHibernate" />
|
||||||
<event name="OnIconize"></event>
|
<event name="OnIconize" />
|
||||||
<event name="OnIdle"></event>
|
<event name="OnIdle" />
|
||||||
<event name="OnInitDialog"></event>
|
<event name="OnInitDialog" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
<object class="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="0">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">bSizer1</property>
|
<property name="name">bSizer1</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="0">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">bSizer3</property>
|
<property name="name">bSizer3</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
@ -108,53 +108,53 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStaticBitmap" expanded="0">
|
<object class="wxStaticBitmap" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_bitmapApp</property>
|
<property name="name">m_bitmapApp</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">10</property>
|
<property name="proportion">10</property>
|
||||||
<object class="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="0">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">b_apptitleSizer</property>
|
<property name="name">b_apptitleSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
|
@ -171,55 +171,55 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">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="font">,90,92,14,70,0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">App Title</property>
|
<property name="label">App Title</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_staticTextAppTitle</property>
|
<property name="name">m_staticTextAppTitle</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxALIGN_CENTRE</property>
|
<property name="style">wxALIGN_CENTRE</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -227,55 +227,55 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Copyright Info</property>
|
<property name="label">Copyright Info</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_staticTextCopyright</property>
|
<property name="name">m_staticTextCopyright</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxALIGN_CENTRE</property>
|
<property name="style">wxALIGN_CENTRE</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -283,55 +283,55 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP</property>
|
<property name="flag">wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Build Version Info</property>
|
<property name="label">Build Version Info</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_staticTextBuildVersion</property>
|
<property name="name">m_staticTextBuildVersion</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxALIGN_CENTRE</property>
|
<property name="style">wxALIGN_CENTRE</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -339,55 +339,55 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
<property name="flag">wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Lib Version Info</property>
|
<property name="label">Lib Version Info</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_staticTextLibVersion</property>
|
<property name="name">m_staticTextLibVersion</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxALIGN_CENTRE</property>
|
<property name="style">wxALIGN_CENTRE</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
@ -409,53 +409,53 @@
|
||||||
<property name="flag">wxEXPAND | wxALL</property>
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticLine" expanded="0">
|
<object class="wxStaticLine" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_staticline1</property>
|
<property name="name">m_staticline1</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxLI_HORIZONTAL</property>
|
<property name="style">wxLI_HORIZONTAL</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -463,63 +463,63 @@
|
||||||
<property name="flag">wxEXPAND | wxALL</property>
|
<property name="flag">wxEXPAND | wxALL</property>
|
||||||
<property name="proportion">2</property>
|
<property name="proportion">2</property>
|
||||||
<object class="wxAuiNotebook" expanded="0">
|
<object class="wxAuiNotebook" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</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="minimum_size">750,350</property>
|
||||||
<property name="name">m_auiNotebook</property>
|
<property name="name">m_auiNotebook</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style">wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH</property>
|
<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="tab_ctrl_height">-1</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="uniform_bitmap_size"></property>
|
<property name="uniform_bitmap_size" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<event name="OnAuiNotebookAllowDND"></event>
|
<event name="OnAuiNotebookAllowDND" />
|
||||||
<event name="OnAuiNotebookBeginDrag"></event>
|
<event name="OnAuiNotebookBeginDrag" />
|
||||||
<event name="OnAuiNotebookButton"></event>
|
<event name="OnAuiNotebookButton" />
|
||||||
<event name="OnAuiNotebookDragMotion"></event>
|
<event name="OnAuiNotebookDragMotion" />
|
||||||
<event name="OnAuiNotebookEndDrag"></event>
|
<event name="OnAuiNotebookEndDrag" />
|
||||||
<event name="OnAuiNotebookPageChanged"></event>
|
<event name="OnAuiNotebookPageChanged" />
|
||||||
<event name="OnAuiNotebookPageChanging"></event>
|
<event name="OnAuiNotebookPageChanging" />
|
||||||
<event name="OnAuiNotebookPageClose"></event>
|
<event name="OnAuiNotebookPageClose" />
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
|
@ -527,56 +527,56 @@
|
||||||
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
<property name="flag">wxALIGN_CENTER|wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="0">
|
<object class="wxButton" expanded="0">
|
||||||
<property name="bg"></property>
|
<property name="bg" />
|
||||||
<property name="context_help"></property>
|
<property name="context_help" />
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="default">1</property>
|
<property name="default">1</property>
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg" />
|
||||||
<property name="font"></property>
|
<property name="font" />
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_CANCEL</property>
|
<property name="id">wxID_CANCEL</property>
|
||||||
<property name="label">OK</property>
|
<property name="label">OK</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size" />
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size" />
|
||||||
<property name="name">m_buttonOK</property>
|
<property name="name">m_buttonOK</property>
|
||||||
<property name="permission">private</property>
|
<property name="permission">private</property>
|
||||||
<property name="pos"></property>
|
<property name="pos" />
|
||||||
<property name="size"></property>
|
<property name="size" />
|
||||||
<property name="style"></property>
|
<property name="style" />
|
||||||
<property name="subclass"></property>
|
<property name="subclass" />
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip" />
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type" />
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable" />
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style" />
|
||||||
<property name="window_name"></property>
|
<property name="window_name" />
|
||||||
<property name="window_style"></property>
|
<property name="window_style" />
|
||||||
<event name="OnButtonClick">OnOkClick</event>
|
<event name="OnButtonClick">OnOkClick</event>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar" />
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow" />
|
||||||
<event name="OnEraseBackground"></event>
|
<event name="OnEraseBackground" />
|
||||||
<event name="OnKeyDown"></event>
|
<event name="OnKeyDown" />
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp" />
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus" />
|
||||||
<event name="OnLeaveWindow"></event>
|
<event name="OnLeaveWindow" />
|
||||||
<event name="OnLeftDClick"></event>
|
<event name="OnLeftDClick" />
|
||||||
<event name="OnLeftDown"></event>
|
<event name="OnLeftDown" />
|
||||||
<event name="OnLeftUp"></event>
|
<event name="OnLeftUp" />
|
||||||
<event name="OnMiddleDClick"></event>
|
<event name="OnMiddleDClick" />
|
||||||
<event name="OnMiddleDown"></event>
|
<event name="OnMiddleDown" />
|
||||||
<event name="OnMiddleUp"></event>
|
<event name="OnMiddleUp" />
|
||||||
<event name="OnMotion"></event>
|
<event name="OnMotion" />
|
||||||
<event name="OnMouseEvents"></event>
|
<event name="OnMouseEvents" />
|
||||||
<event name="OnMouseWheel"></event>
|
<event name="OnMouseWheel" />
|
||||||
<event name="OnPaint"></event>
|
<event name="OnPaint" />
|
||||||
<event name="OnRightDClick"></event>
|
<event name="OnRightDClick" />
|
||||||
<event name="OnRightDown"></event>
|
<event name="OnRightDown" />
|
||||||
<event name="OnRightUp"></event>
|
<event name="OnRightUp" />
|
||||||
<event name="OnSetFocus"></event>
|
<event name="OnSetFocus" />
|
||||||
<event name="OnSize"></event>
|
<event name="OnSize" />
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI" />
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <wxstruct.h>
|
#include <wxstruct.h>
|
||||||
#include <worksheet_shape_builder.h>
|
#include <worksheet_shape_builder.h>
|
||||||
#include <class_base_screen.h>
|
#include <class_base_screen.h>
|
||||||
|
#include <wildcards_and_files_ext.h>
|
||||||
|
|
||||||
#include <wx/valgen.h>
|
#include <wx/valgen.h>
|
||||||
#include <wx/tokenzr.h>
|
#include <wx/tokenzr.h>
|
||||||
|
@ -125,8 +126,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize the page layout descr filename
|
// initialize the page layout descr filename
|
||||||
m_plDescrFileName = BASE_SCREEN::m_PageLayoutDescrFileName;
|
SetWksFileName( BASE_SCREEN::m_PageLayoutDescrFileName );
|
||||||
m_filePicker->SetPath( m_plDescrFileName );
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef EESCHEMA
|
#ifdef EESCHEMA
|
||||||
|
@ -401,13 +401,13 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
|
||||||
{
|
{
|
||||||
bool retSuccess = false;
|
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 ) )
|
if( !wxFileExists( fullFileName ) )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
@ -418,26 +418,9 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to remove the path, if the path is the current working dir,
|
BASE_SCREEN::m_PageLayoutDescrFileName = fileName;
|
||||||
// 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;
|
|
||||||
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
|
WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
|
||||||
pglayout.SetPageLayout( shortFileName );
|
pglayout.SetPageLayout( fileName );
|
||||||
m_localPrjConfigChanged = true;
|
m_localPrjConfigChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,7 +776,35 @@ void DIALOG_PAGES_SETTINGS::GetCustomSizeMilsFromDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called on .kicad_wks file description selection change
|
// 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.
|
PAGE_INFO m_pageInfo; /// Temporary page info.
|
||||||
bool m_customFmt; /// true if the page selection is custom
|
bool m_customFmt; /// true if the page selection is custom
|
||||||
TITLE_BLOCK m_tb; /// Temporary title block (basic inscriptions).
|
TITLE_BLOCK m_tb; /// Temporary title block (basic inscriptions).
|
||||||
wxString m_plDescrFileName; /// Temporary BASE_SCREEN::m_PageLayoutDescrFileName copy
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
|
DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent );
|
||||||
|
@ -55,24 +52,23 @@ public:
|
||||||
|
|
||||||
const wxString GetWksFileName()
|
const wxString GetWksFileName()
|
||||||
{
|
{
|
||||||
return m_filePicker->GetPath();
|
return m_textCtrlFilePicker->GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWksFileName(const wxString& aFilename )
|
void SetWksFileName(const wxString& aFilename )
|
||||||
{
|
{
|
||||||
m_filePicker->SetPath( aFilename );
|
m_textCtrlFilePicker->SetValue( aFilename );
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableWksFileNamePicker( bool aEnable )
|
void EnableWksFileNamePicker( bool aEnable )
|
||||||
{
|
{
|
||||||
m_filePicker->Enable( aEnable );
|
m_textCtrlFilePicker->Enable( aEnable );
|
||||||
|
m_buttonBrowse->Enable( aEnable );
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initDialog(); // Initialisation of member variables
|
void initDialog(); // Initialisation of member variables
|
||||||
|
|
||||||
// void OnCloseWindow( wxCloseEvent& event );
|
|
||||||
|
|
||||||
// event handler for wxID_OK
|
// event handler for wxID_OK
|
||||||
void OnOkClick( wxCommandEvent& event );
|
void OnOkClick( wxCommandEvent& event );
|
||||||
|
|
||||||
|
@ -99,7 +95,7 @@ private:
|
||||||
void OnDateApplyClick( wxCommandEvent& event );
|
void OnDateApplyClick( wxCommandEvent& event );
|
||||||
|
|
||||||
// .kicad_wks file description selection
|
// .kicad_wks file description selection
|
||||||
void OnWksFileSelection( wxFileDirPickerEvent& event );
|
void OnWksFileSelection( wxCommandEvent& event );
|
||||||
|
|
||||||
// Save in the current title block the new page settings
|
// Save in the current title block the new page settings
|
||||||
// return true if changes are made, or false if not
|
// 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;
|
wxBoxSizer* bSizerfileSelection;
|
||||||
bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL );
|
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 );
|
m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerfileSelection->Add( m_filePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
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 );
|
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_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_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_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_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 );
|
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_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_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_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_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 );
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this );
|
||||||
|
|
||||||
|
|
|
@ -4235,9 +4235,9 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<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>
|
<property name="proportion">1</property>
|
||||||
<object class="wxFilePickerCtrl" expanded="1">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -4268,12 +4268,12 @@
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="message">Select a file</property>
|
<property name="maxlength"></property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</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_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -4283,7 +4283,7 @@
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style">wxFLP_OPEN|wxFLP_USE_TEXTCTRL</property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
|
@ -4292,14 +4292,104 @@
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable"></property>
|
||||||
<property name="value"></property>
|
<property name="value"></property>
|
||||||
<property name="wildcard">*.kicad_wks</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnChar"></event>
|
<event name="OnChar"></event>
|
||||||
<event name="OnEnterWindow"></event>
|
<event name="OnEnterWindow"></event>
|
||||||
<event name="OnEraseBackground"></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="OnKeyDown"></event>
|
||||||
<event name="OnKeyUp"></event>
|
<event name="OnKeyUp"></event>
|
||||||
<event name="OnKillFocus"></event>
|
<event name="OnKillFocus"></event>
|
||||||
|
|
|
@ -33,7 +33,6 @@ class DIALOG_SHIM;
|
||||||
#include <wx/datectrl.h>
|
#include <wx/datectrl.h>
|
||||||
#include <wx/dateevt.h>
|
#include <wx/dateevt.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/filepicker.h>
|
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -113,7 +112,8 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
||||||
wxTextCtrl* m_TextComment4;
|
wxTextCtrl* m_TextComment4;
|
||||||
wxCheckBox* m_Comment4Export;
|
wxCheckBox* m_Comment4Export;
|
||||||
wxStaticText* m_staticTextfilename;
|
wxStaticText* m_staticTextfilename;
|
||||||
wxFilePickerCtrl* m_filePicker;
|
wxTextCtrl* m_textCtrlFilePicker;
|
||||||
|
wxButton* m_buttonBrowse;
|
||||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||||
wxButton* m_sdbSizer1OK;
|
wxButton* m_sdbSizer1OK;
|
||||||
wxButton* m_sdbSizer1Cancel;
|
wxButton* m_sdbSizer1Cancel;
|
||||||
|
@ -133,7 +133,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM
|
||||||
virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnComment4TextUpdated( 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 OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnOkClick( 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_snapToGrid = true;
|
||||||
m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight();
|
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 );
|
CreateStatusBar( 6 );
|
||||||
|
|
||||||
// set the size of the status bar subwindows:
|
// set the size of the status bar subwindows:
|
||||||
|
|
||||||
wxWindow* stsbar = GetStatusBar();
|
wxWindow* stsbar = GetStatusBar();
|
||||||
|
|
||||||
|
|
||||||
int dims[] = {
|
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,
|
-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.
|
// as the width of '0' unless the font is fixed width, and it usually won't be.
|
||||||
|
|
||||||
// zoom:
|
// zoom:
|
||||||
|
@ -152,7 +144,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent,
|
||||||
// units display, Inches is bigger than mm
|
// units display, Inches is bigger than mm
|
||||||
GetTextSize( _( "Inches" ), stsbar ).x + 10,
|
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 );
|
SetStatusWidths( DIM( dims ), dims );
|
||||||
|
@ -234,7 +228,6 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
|
||||||
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
|
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
SetGridVisibility( !IsGridVisible() );
|
SetGridVisibility( !IsGridVisible() );
|
||||||
|
|
||||||
if( m_galCanvasActive )
|
if( m_galCanvasActive )
|
||||||
{
|
{
|
||||||
m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
|
m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
|
||||||
|
@ -392,7 +385,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
|
||||||
*/
|
*/
|
||||||
m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
|
m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
|
||||||
screen->SetGrid( id );
|
screen->SetGrid( id );
|
||||||
screen->SetCrossHairPosition( screen->RefPos( true ) );
|
SetCrossHairPosition( RefPos( true ) );
|
||||||
|
|
||||||
if( m_galCanvasActive )
|
if( m_galCanvasActive )
|
||||||
{
|
{
|
||||||
|
@ -442,7 +435,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
|
||||||
m_galCanvas->Refresh();
|
m_galCanvas->Refresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RedrawScreen( GetScreen()->GetScrollCenterPosition(), false );
|
RedrawScreen( GetScrollCenterPosition(), false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,7 +521,7 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const
|
||||||
wxPoint pos = aPosition;
|
wxPoint pos = aPosition;
|
||||||
|
|
||||||
if( m_currentScreen != NULL && m_snapToGrid )
|
if( m_currentScreen != NULL && m_snapToGrid )
|
||||||
pos = m_currentScreen->GetNearestGridPosition( aPosition );
|
pos = GetNearestGridPosition( aPosition );
|
||||||
|
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
@ -759,12 +752,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
||||||
{
|
{
|
||||||
BASE_SCREEN* screen = GetScreen();
|
BASE_SCREEN* screen = GetScreen();
|
||||||
|
|
||||||
if( screen == NULL || m_canvas == NULL )
|
if( !screen || !m_canvas )
|
||||||
return;
|
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();
|
double scale = screen->GetScalingFactor();
|
||||||
|
|
||||||
wxLogTrace( traceScrollSettings, wxT( "Center Position = ( %d, %d ), scale = %.10g" ),
|
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 ) );
|
DBOX clientRectIU( wxPoint( xIU, yIU ), wxSize( clientSizeIU.x, clientSizeIU.y ) );
|
||||||
wxPoint centerPositionIU;
|
wxPoint centerPositionIU;
|
||||||
|
|
||||||
#if 1 || defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
// put "int" limits on the clientRect
|
// put "int" limits on the clientRect
|
||||||
if( clientRectIU.GetLeft() < VIRT_MIN )
|
if( clientRectIU.GetLeft() < VIRT_MIN )
|
||||||
clientRectIU.MoveLeftTo( VIRT_MIN );
|
clientRectIU.MoveLeftTo( VIRT_MIN );
|
||||||
|
@ -807,7 +796,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
|
||||||
clientRectIU.MoveRightTo( VIRT_MAX );
|
clientRectIU.MoveRightTo( VIRT_MAX );
|
||||||
if( clientRectIU.GetBottom() > VIRT_MAX )
|
if( clientRectIU.GetBottom() > VIRT_MAX )
|
||||||
clientRectIU.MoveBottomTo( VIRT_MAX );
|
clientRectIU.MoveBottomTo( VIRT_MAX );
|
||||||
#endif
|
|
||||||
|
|
||||||
centerPositionIU.x = KiROUND( clientRectIU.GetX() + clientRectIU.GetWidth() / 2 );
|
centerPositionIU.x = KiROUND( clientRectIU.GetX() + clientRectIU.GetWidth() / 2 );
|
||||||
centerPositionIU.y = KiROUND( clientRectIU.GetY() + clientRectIU.GetHeight() / 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
|
// put "int" limits on the virtualSizeIU
|
||||||
virtualSizeIU.x = std::min( virtualSizeIU.x, MAX_AXIS );
|
virtualSizeIU.x = std::min( virtualSizeIU.x, MAX_AXIS );
|
||||||
virtualSizeIU.y = std::min( virtualSizeIU.y, MAX_AXIS );
|
virtualSizeIU.y = std::min( virtualSizeIU.y, MAX_AXIS );
|
||||||
#endif
|
|
||||||
|
|
||||||
if( screen->m_Center )
|
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
|
// Calculate the scroll bar position in internal units to place the
|
||||||
// center position at the center of client rectangle.
|
// 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 posX = centerPositionIU.x - clientRectIU.GetWidth() / 2.0 - screen->m_DrawOrg.x;
|
||||||
double posY = centerPositionIU.y - clientRectIU.GetHeight() / 2.0 - screen->m_DrawOrg.y;
|
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
|
// Set up grid settings
|
||||||
gal->SetGridVisibility( IsGridVisible() );
|
gal->SetGridVisibility( IsGridVisible() );
|
||||||
gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) );
|
gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) );
|
||||||
gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) );
|
gal->SetGridOrigin( VECTOR2D( GetGridOrigin() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1019,3 +1005,71 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
|
||||||
if( aEnable )
|
if( aEnable )
|
||||||
m_galCanvas->SetFocus();
|
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 );
|
wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
|
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 )
|
if( m_cursorLevel != 0 || aDC == NULL || !m_showCrossHair )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxPoint cursor = GetScreen()->GetCrossHairPosition();
|
wxPoint cursor = GetParent()->GetCrossHairPosition();
|
||||||
|
|
||||||
GRSetDrawMode( aDC, GR_XOR );
|
GRSetDrawMode( aDC, GR_XOR );
|
||||||
|
|
||||||
|
@ -305,7 +307,7 @@ wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition()
|
||||||
|
|
||||||
void EDA_DRAW_PANEL::MoveCursorToCrossHair()
|
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();
|
double scale = GetParent()->GetScreen()->GetScalingFactor();
|
||||||
|
|
||||||
wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition();
|
wxPoint center = GetParent()->GetScrollCenterPosition();
|
||||||
center.x += KiROUND( (double) ( x - tmpX ) / scale );
|
center.x += KiROUND( (double) ( x - tmpX ) / scale );
|
||||||
center.y += KiROUND( (double) ( y - tmpY ) / scale );
|
center.y += KiROUND( (double) ( y - tmpY ) / scale );
|
||||||
GetParent()->GetScreen()->SetScrollCenterPosition( center );
|
GetParent()->SetScrollCenterPosition( center );
|
||||||
|
|
||||||
Scroll( x, y );
|
Scroll( x, y );
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
@ -617,7 +619,7 @@ void EDA_DRAW_PANEL::DrawBackGround( wxDC* DC )
|
||||||
DrawAuxiliaryAxis( DC, GR_COPY );
|
DrawAuxiliaryAxis( DC, GR_COPY );
|
||||||
|
|
||||||
if( GetParent()->m_showGridAxis )
|
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 )
|
if( screenGridSize.x < MIN_GRID_SIZE || screenGridSize.y < MIN_GRID_SIZE )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
org = screen->GetNearestGridPosition( org, &gridSize );
|
org = GetParent()->GetNearestGridPosition( org, &gridSize );
|
||||||
|
|
||||||
// Setting the nearest grid position can select grid points outside the clip box.
|
// 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
|
// 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 )
|
void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, GR_DRAWMODE aDrawMode )
|
||||||
{
|
{
|
||||||
wxPoint origin = GetParent()->GetOriginAxisPosition();
|
wxPoint origin = GetParent()->GetAuxOrigin();
|
||||||
|
|
||||||
if( origin == wxPoint( 0, 0 ) )
|
if( origin == wxPoint( 0, 0 ) )
|
||||||
return;
|
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 || ( !aGridOrigin.x && !aGridOrigin.y ) )
|
||||||
|
|
||||||
if( !GetParent()->m_showGridAxis
|
|
||||||
|| ( screen->m_GridOrigin.x == 0 && screen->m_GridOrigin.y == 0 ) )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EDA_COLOR_T color = GetParent()->GetGridColor();
|
EDA_COLOR_T color = GetParent()->GetGridColor();
|
||||||
wxSize pageSize = GetParent()->GetPageSizeIU();
|
wxSize pageSize = GetParent()->GetPageSizeIU();
|
||||||
|
|
||||||
GRSetDrawMode( aDC, aDrawMode );
|
GRSetDrawMode( aDC, aDrawMode );
|
||||||
|
|
||||||
// Draw the Y axis
|
// Draw the Y axis
|
||||||
GRDashedLine( &m_ClipBox, aDC,
|
GRDashedLine( &m_ClipBox, aDC,
|
||||||
screen->m_GridOrigin.x,
|
aGridOrigin.x,
|
||||||
-pageSize.y,
|
-pageSize.y,
|
||||||
screen->m_GridOrigin.x,
|
aGridOrigin.x,
|
||||||
pageSize.y,
|
pageSize.y,
|
||||||
0, color );
|
0, color );
|
||||||
|
|
||||||
// Draw the X axis
|
// Draw the X axis
|
||||||
GRDashedLine( &m_ClipBox, aDC,
|
GRDashedLine( &m_ClipBox, aDC,
|
||||||
-pageSize.x,
|
-pageSize.x,
|
||||||
screen->m_GridOrigin.y,
|
aGridOrigin.y,
|
||||||
pageSize.x,
|
pageSize.x,
|
||||||
screen->m_GridOrigin.y,
|
aGridOrigin.y,
|
||||||
0, color );
|
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.x = dc.DeviceToLogicalX( cross_hair_pos.x );
|
||||||
cross_hair_pos.y = dc.DeviceToLogicalY( cross_hair_pos.y );
|
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 );
|
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_POPUP_ZOOM_CENTER );
|
||||||
cmd.SetEventObject( this );
|
cmd.SetEventObject( this );
|
||||||
|
@ -884,7 +883,7 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( dc, this );
|
INSTALL_UNBUFFERED_DC( dc, this );
|
||||||
GetScreen()->SetCrossHairPosition( event.GetLogicalPosition( dc ) );
|
GetParent()->SetCrossHairPosition( event.GetLogicalPosition( dc ) );
|
||||||
|
|
||||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||||
cmd.SetEventObject( this );
|
cmd.SetEventObject( this );
|
||||||
|
@ -978,7 +977,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
||||||
DC.SetBackground( *wxBLACK_BRUSH );
|
DC.SetBackground( *wxBLACK_BRUSH );
|
||||||
|
|
||||||
// Compute the cursor position in drawing (logical) units.
|
// Compute the cursor position in drawing (logical) units.
|
||||||
screen->SetMousePosition( event.GetLogicalPosition( DC ) );
|
GetParent()->SetMousePosition( event.GetLogicalPosition( DC ) );
|
||||||
|
|
||||||
int kbstat = 0;
|
int kbstat = 0;
|
||||||
|
|
||||||
|
@ -994,7 +993,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
||||||
// Calling Double Click and Click functions :
|
// Calling Double Click and Click functions :
|
||||||
if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) )
|
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,
|
// inhibit a response to the mouse left button release,
|
||||||
// because we have a double click, and we do not want a new
|
// 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;
|
m_ignoreNextLeftButtonRelease = false;
|
||||||
|
|
||||||
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK && !ignoreEvt )
|
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() )
|
else if( !event.LeftIsDown() )
|
||||||
|
@ -1035,7 +1034,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
||||||
m_PanStartCenter.y *= ppuy;
|
m_PanStartCenter.y *= ppuy;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_PanStartCenter = GetParent()->GetScreen()->GetScrollCenterPosition();
|
m_PanStartCenter = GetParent()->GetScrollCenterPosition();
|
||||||
|
|
||||||
m_PanStartEventPosition = event.GetPosition();
|
m_PanStartEventPosition = event.GetPosition();
|
||||||
|
|
||||||
|
@ -1109,10 +1108,10 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
||||||
|
|
||||||
double scale = GetParent()->GetScreen()->GetScalingFactor();
|
double scale = GetParent()->GetScreen()->GetScalingFactor();
|
||||||
|
|
||||||
wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition();
|
wxPoint center = GetParent()->GetScrollCenterPosition();
|
||||||
center.x += KiROUND( (double) ( x - tmpX ) / scale ) / ppux;
|
center.x += KiROUND( (double) ( x - tmpX ) / scale ) / ppux;
|
||||||
center.y += KiROUND( (double) ( y - tmpY ) / scale ) / ppuy;
|
center.y += KiROUND( (double) ( y - tmpY ) / scale ) / ppuy;
|
||||||
GetParent()->GetScreen()->SetScrollCenterPosition( center );
|
GetParent()->SetScrollCenterPosition( center );
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
Update();
|
Update();
|
||||||
|
@ -1172,7 +1171,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
||||||
* (a filter creates a delay for the real block command start, and
|
* (a filter creates a delay for the real block command start, and
|
||||||
* we must remember this point)
|
* we must remember this point)
|
||||||
*/
|
*/
|
||||||
m_CursorStartPos = screen->GetCrossHairPosition();
|
m_CursorStartPos = GetParent()->GetCrossHairPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_enableBlockCommands && !(localbutt & GR_M_DCLICK) )
|
if( m_enableBlockCommands && !(localbutt & GR_M_DCLICK) )
|
||||||
|
@ -1331,15 +1330,13 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( DC, this );
|
INSTALL_UNBUFFERED_DC( DC, this );
|
||||||
|
|
||||||
BASE_SCREEN* Screen = GetScreen();
|
|
||||||
|
|
||||||
// Some key commands use the current mouse position: refresh it.
|
// Some key commands use the current mouse position: refresh it.
|
||||||
pos = wxGetMousePosition() - GetScreenPosition();
|
pos = wxGetMousePosition() - GetScreenPosition();
|
||||||
|
|
||||||
// Compute the cursor position in drawing units. Also known as logical units to wxDC.
|
// Compute the cursor position in drawing units. Also known as logical units to wxDC.
|
||||||
pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );
|
pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );
|
||||||
Screen->SetMousePosition( pos );
|
|
||||||
|
|
||||||
|
GetParent()->SetMousePosition( pos );
|
||||||
GetParent()->GeneralControl( &DC, pos, localkey );
|
GetParent()->GeneralControl( &DC, pos, localkey );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
|
|
||||||
using namespace KiGfx;
|
using namespace KiGfx;
|
||||||
|
|
||||||
|
|
||||||
|
const double STROKE_FONT::LINE_HEIGHT_RATIO = 1.6;
|
||||||
|
|
||||||
|
|
||||||
STROKE_FONT::STROKE_FONT( GAL* aGal ) :
|
STROKE_FONT::STROKE_FONT( GAL* aGal ) :
|
||||||
m_gal( aGal ),
|
m_gal( aGal ),
|
||||||
m_bold( false ),
|
m_bold( false ),
|
||||||
|
|
|
@ -462,6 +462,43 @@ void WORKSHEET_DATAITEM_TEXT::IncrementLabel( int aIncr )
|
||||||
m_FullText << (wxChar) ( aIncr + lbchar );
|
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()
|
void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
|
||||||
{
|
{
|
||||||
m_ConstrainedTextSize = m_TextSize;
|
m_ConstrainedTextSize = m_TextSize;
|
||||||
|
@ -501,3 +538,4 @@ void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize()
|
||||||
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
|
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,8 +152,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
|
wsText->m_FullText = BuildFullText( wsText->m_TextBase );
|
||||||
if( wsText->m_FullText.Replace( wxT("\\n" ), wxT("\n") ) > 0 )
|
multilines = wsText->ReplaceAntiSlashSequence();
|
||||||
multilines = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( wsText->m_FullText.IsEmpty() )
|
if( wsText->m_FullText.IsEmpty() )
|
||||||
|
|
|
@ -76,6 +76,7 @@ fp_poly
|
||||||
fp_text
|
fp_text
|
||||||
full
|
full
|
||||||
general
|
general
|
||||||
|
grid_origin
|
||||||
gr_arc
|
gr_arc
|
||||||
gr_circle
|
gr_circle
|
||||||
gr_curve
|
gr_curve
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
#include <reporter.h>
|
#include <reporter.h>
|
||||||
|
|
||||||
|
|
||||||
REPORTER& REPORTER::Report( const char* aText )
|
REPORTER& REPORTER::Report( const char* aText )
|
||||||
{
|
{
|
||||||
Report( FROM_UTF8( aText ) );
|
Report( FROM_UTF8( aText ) );
|
||||||
|
|
|
@ -136,8 +136,8 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
||||||
msg << aTextbase[ii];
|
msg << aTextbase[ii];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ii++;
|
|
||||||
if( ii >= aTextbase.Len() )
|
if( ++ii >= aTextbase.Len() )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
wxChar format = aTextbase[ii];
|
wxChar format = aTextbase[ii];
|
||||||
|
@ -174,7 +174,7 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
{
|
{
|
||||||
wxFileName fn( *m_fileName );
|
wxFileName fn( m_fileName );
|
||||||
msg += fn.GetFullName();
|
msg += fn.GetFullName();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -59,7 +59,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
|
||||||
void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
|
void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
|
||||||
{
|
{
|
||||||
wxPoint dPos = posBefore - m_canvas->GetClientSize() / 2; // relative screen position to center before zoom
|
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 );
|
wxPoint newCenter = m_canvas->ToLogicalXY( newScreenPos - dPos );
|
||||||
|
|
||||||
AdjustScrollBars( newCenter );
|
AdjustScrollBars( newCenter );
|
||||||
|
@ -91,10 +91,10 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
|
||||||
screen->SetScalingFactor( bestzoom );
|
screen->SetScalingFactor( bestzoom );
|
||||||
|
|
||||||
if( screen->m_FirstRedraw )
|
if( screen->m_FirstRedraw )
|
||||||
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
|
SetCrossHairPosition( GetScrollCenterPosition() );
|
||||||
|
|
||||||
if( !m_galCanvasActive )
|
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();
|
int id = event.GetId();
|
||||||
bool zoom_at_cursor = false;
|
bool zoom_at_cursor = false;
|
||||||
BASE_SCREEN* screen = GetScreen();
|
BASE_SCREEN* screen = GetScreen();
|
||||||
wxPoint center = screen->GetScrollCenterPosition();
|
wxPoint center = GetScrollCenterPosition();
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
{
|
{
|
||||||
case ID_OFFCENTER_ZOOM_IN:
|
case ID_OFFCENTER_ZOOM_IN:
|
||||||
center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() );
|
center = m_canvas->ToDeviceXY( GetCrossHairPosition() );
|
||||||
if( screen->SetPreviousZoom() )
|
if( screen->SetPreviousZoom() )
|
||||||
RedrawScreen2( center );
|
RedrawScreen2( center );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_ZOOM_IN:
|
case ID_POPUP_ZOOM_IN:
|
||||||
zoom_at_cursor = true;
|
zoom_at_cursor = true;
|
||||||
center = screen->GetCrossHairPosition();
|
center = GetCrossHairPosition();
|
||||||
|
|
||||||
// fall thru
|
// fall thru
|
||||||
case ID_ZOOM_IN:
|
case ID_ZOOM_IN:
|
||||||
|
@ -153,14 +153,14 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_OFFCENTER_ZOOM_OUT:
|
case ID_OFFCENTER_ZOOM_OUT:
|
||||||
center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() );
|
center = m_canvas->ToDeviceXY( GetCrossHairPosition() );
|
||||||
if( screen->SetNextZoom() )
|
if( screen->SetNextZoom() )
|
||||||
RedrawScreen2( center );
|
RedrawScreen2( center );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_ZOOM_OUT:
|
case ID_POPUP_ZOOM_OUT:
|
||||||
zoom_at_cursor = true;
|
zoom_at_cursor = true;
|
||||||
center = screen->GetCrossHairPosition();
|
center = GetCrossHairPosition();
|
||||||
|
|
||||||
// fall thru
|
// fall thru
|
||||||
case ID_ZOOM_OUT:
|
case ID_ZOOM_OUT:
|
||||||
|
@ -173,7 +173,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_ZOOM_CENTER:
|
case ID_POPUP_ZOOM_CENTER:
|
||||||
center = screen->GetCrossHairPosition();
|
center = GetCrossHairPosition();
|
||||||
RedrawScreen( center, true );
|
RedrawScreen( center, true );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
add_definitions(-DCVPCB)
|
add_definitions( -DCVPCB )
|
||||||
|
|
||||||
###
|
###
|
||||||
# Includes
|
# Includes
|
||||||
###
|
###
|
||||||
|
|
||||||
include_directories(BEFORE ${INC_BEFORE})
|
include_directories( BEFORE ${INC_BEFORE} )
|
||||||
include_directories(
|
include_directories(
|
||||||
./dialogs
|
./dialogs
|
||||||
${Boost_INCLUDE_DIR}
|
|
||||||
../3d-viewer
|
../3d-viewer
|
||||||
../pcbnew
|
../pcbnew
|
||||||
../polygon
|
../polygon
|
||||||
|
@ -18,14 +17,14 @@ include_directories(
|
||||||
###
|
###
|
||||||
# Sources
|
# Sources
|
||||||
###
|
###
|
||||||
set(CVPCB_DIALOGS
|
set( CVPCB_DIALOGS
|
||||||
dialogs/dialog_cvpcb_config.cpp
|
dialogs/dialog_cvpcb_config.cpp
|
||||||
dialogs/dialog_cvpcb_config_fbp.cpp
|
dialogs/dialog_cvpcb_config_fbp.cpp
|
||||||
dialogs/dialog_display_options.cpp
|
dialogs/dialog_display_options.cpp
|
||||||
dialogs/dialog_display_options_base.cpp
|
dialogs/dialog_display_options_base.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CVPCB_SRCS
|
set( CVPCB_SRCS
|
||||||
../common/base_units.cpp
|
../common/base_units.cpp
|
||||||
../pcbnew/board_items_to_polygon_shape_transform.cpp
|
../pcbnew/board_items_to_polygon_shape_transform.cpp
|
||||||
../pcbnew/class_drc_item.cpp
|
../pcbnew/class_drc_item.cpp
|
||||||
|
@ -46,32 +45,35 @@ set(CVPCB_SRCS
|
||||||
###
|
###
|
||||||
# Windows resource file
|
# Windows resource file
|
||||||
###
|
###
|
||||||
if(WIN32)
|
if( WIN32 )
|
||||||
if(MINGW)
|
if( MINGW )
|
||||||
# CVPCB_RESOURCES variable is set by the macro.
|
# CVPCB_RESOURCES variable is set by the macro.
|
||||||
mingw_resource_compiler(cvpcb)
|
mingw_resource_compiler( cvpcb )
|
||||||
else(MINGW)
|
else()
|
||||||
set(CVPCB_RESOURCES cvpcb.rc)
|
set( CVPCB_RESOURCES cvpcb.rc )
|
||||||
endif(MINGW)
|
endif()
|
||||||
endif(WIN32)
|
endif()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Apple resource files
|
# Apple resource files
|
||||||
###
|
###
|
||||||
if(APPLE)
|
if( APPLE )
|
||||||
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
|
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.icns"
|
||||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
|
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
|
||||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
||||||
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
|
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
|
PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
|
||||||
endif(APPLE)
|
|
||||||
|
set( MACOSX_BUNDLE_ICON_FILE cvpcb.icns )
|
||||||
|
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb )
|
||||||
|
endif()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Create the cvpcb executable
|
# Create the cvpcb executable
|
||||||
###
|
###
|
||||||
add_executable(cvpcb WIN32 MACOSX_BUNDLE
|
add_executable( cvpcb WIN32 MACOSX_BUNDLE
|
||||||
${CVPCB_SRCS}
|
${CVPCB_SRCS}
|
||||||
${CVPCB_DIALOGS}
|
${CVPCB_DIALOGS}
|
||||||
${CVPCB_RESOURCES}
|
${CVPCB_RESOURCES}
|
||||||
|
@ -80,32 +82,30 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE
|
||||||
###
|
###
|
||||||
# Set properties for APPLE on cvpcb target
|
# Set properties for APPLE on cvpcb target
|
||||||
###
|
###
|
||||||
if(APPLE)
|
if( APPLE )
|
||||||
set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
set_target_properties( cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist )
|
||||||
endif(APPLE)
|
endif()
|
||||||
|
|
||||||
###
|
###
|
||||||
# Link executable target cvpcb with correct libraries
|
# Link executable target cvpcb with correct libraries
|
||||||
###
|
###
|
||||||
target_link_libraries(cvpcb
|
target_link_libraries( cvpcb
|
||||||
3d-viewer
|
3d-viewer
|
||||||
pcbcommon
|
pcbcommon
|
||||||
pcad2kicadpcb
|
pcad2kicadpcb
|
||||||
common
|
common
|
||||||
bitmaps
|
bitmaps
|
||||||
polygon
|
polygon
|
||||||
|
gal
|
||||||
${wxWidgets_LIBRARIES}
|
${wxWidgets_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${GDI_PLUS_LIBRARIES}
|
${GDI_PLUS_LIBRARIES}
|
||||||
|
${GLEW_LIBRARIES}
|
||||||
|
${CAIRO_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(cvpcb
|
# Only for win32 cross compilation using MXE
|
||||||
gal
|
if(WIN32 AND MSYS)
|
||||||
${GLEW_LIBRARIES}
|
|
||||||
${CAIRO_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
target_link_libraries(cvpcb
|
target_link_libraries(cvpcb
|
||||||
opengl32
|
opengl32
|
||||||
glu32
|
glu32
|
||||||
|
@ -114,11 +114,12 @@ target_link_libraries(cvpcb
|
||||||
freetype
|
freetype
|
||||||
bz2
|
bz2
|
||||||
)
|
)
|
||||||
endif(WIN32)
|
endif(WIN32 AND MSYS)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Add cvpcb as install target
|
# Add cvpcb as install target
|
||||||
###
|
###
|
||||||
install(TARGETS cvpcb
|
install( TARGETS cvpcb
|
||||||
DESTINATION ${KICAD_BIN}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT binary)
|
COMPONENT binary
|
||||||
|
)
|
||||||
|
|
|
@ -339,8 +339,8 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
||||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||||
cmd.SetEventObject( this );
|
cmd.SetEventObject( this );
|
||||||
|
|
||||||
pos = screen->GetNearestGridPosition( pos );
|
pos = GetNearestGridPosition( pos );
|
||||||
oldpos = screen->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
gridSize = screen->GetGridSize();
|
gridSize = screen->GetGridSize();
|
||||||
|
|
||||||
switch( aHotKey )
|
switch( aHotKey )
|
||||||
|
@ -371,7 +371,7 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ' ':
|
case ' ':
|
||||||
screen->m_O_Curseur = screen->GetCrossHairPosition();
|
screen->m_O_Curseur = GetCrossHairPosition();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_NUMPAD8: /* cursor moved up */
|
case WXK_NUMPAD8: /* cursor moved up */
|
||||||
|
@ -399,14 +399,14 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
|
|
||||||
if( oldpos != screen->GetCrossHairPosition() )
|
if( oldpos != GetCrossHairPosition() )
|
||||||
{
|
{
|
||||||
pos = screen->GetCrossHairPosition();
|
pos = GetCrossHairPosition();
|
||||||
screen->SetCrossHairPosition( oldpos );
|
SetCrossHairPosition( oldpos );
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
screen->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( m_canvas->IsMouseCaptured() )
|
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
|
#encoding utf-8
|
||||||
#
|
#
|
||||||
# 4003APG120
|
# 4003APG120
|
||||||
#
|
#
|
||||||
DEF 4003APG120 U 0 40 Y Y 1 F N
|
DEF 4003APG120 U 0 40 Y Y 1 F N
|
||||||
F0 "U" 0 100 70 H V C CNN
|
F0 "U" 400 2800 70 H V C CNN
|
||||||
F1 "4003APG120" 0 -100 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
|
ALIAS 4003PG120
|
||||||
DRAW
|
DRAW
|
||||||
S -800 -2700 800 2700 0 1 0 N
|
S -800 -2700 800 2700 0 1 0 N
|
||||||
|
@ -134,6 +136,8 @@ ENDDEF
|
||||||
DEF 628128 U 0 40 Y Y 1 F N
|
DEF 628128 U 0 40 Y Y 1 F N
|
||||||
F0 "U" 50 0 70 H V C CNN
|
F0 "U" 50 0 70 H V C CNN
|
||||||
F1 "628128" 300 -1200 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
|
DRAW
|
||||||
X VCC 32 0 1100 0 D 60 60 0 0 W N
|
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
|
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
|
DEF 74LS245 U 0 10 Y Y 1 F N
|
||||||
F0 "U" 100 575 60 H V L BNN
|
F0 "U" 100 575 60 H V L BNN
|
||||||
F1 "74LS245" 50 -575 60 H V L TNN
|
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
|
ALIAS 74HC245
|
||||||
DRAW
|
DRAW
|
||||||
X GND 10 0 -550 0 U 60 60 0 0 W N
|
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
|
DEF 74LS541 U 0 30 Y Y 1 F N
|
||||||
F0 "U" 0 575 60 H V C BNN
|
F0 "U" 0 575 60 H V C BNN
|
||||||
F1 "74LS541" 0 -575 60 H V C TNN
|
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
|
DRAW
|
||||||
X GND 10 -200 -550 0 U 60 60 0 0 W N
|
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
|
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
|
DEF 74LS688 U 0 40 Y Y 1 F N
|
||||||
F0 "U" 0 950 60 H V C CNN
|
F0 "U" 0 950 60 H V C CNN
|
||||||
F1 "74LS688" 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
|
DRAW
|
||||||
X GND 10 -300 -900 0 R 60 60 0 0 W N
|
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
|
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
|
DEF BUSPC BUS 0 40 Y Y 1 F N
|
||||||
F0 "BUS" 0 100 70 H V C CNN
|
F0 "BUS" 0 100 70 H V C CNN
|
||||||
F1 "BUSPC" 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
|
DRAW
|
||||||
S -600 -1600 600 1600 0 1 0 N
|
S -600 -1600 600 1600 0 1 0 N
|
||||||
X GND 1 -900 1500 300 R 60 60 1 1 P
|
X GND 1 -900 1500 300 R 60 60 1 1 P
|
||||||
|
@ -343,16 +355,18 @@ ENDDEF
|
||||||
# C
|
# C
|
||||||
#
|
#
|
||||||
DEF C C 0 10 N Y 1 F N
|
DEF C C 0 10 N Y 1 F N
|
||||||
F0 "C" 50 100 50 H V L CNN
|
F0 "C" 0 100 40 H V L CNN
|
||||||
F1 "C" 50 -100 50 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
|
$FPLIST
|
||||||
SM*
|
SM*
|
||||||
C?
|
C?
|
||||||
C1-1
|
C1-1
|
||||||
$ENDFPLIST
|
$ENDFPLIST
|
||||||
DRAW
|
DRAW
|
||||||
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 -100 30 100 30 N
|
P 2 0 1 20 -80 30 80 30 N
|
||||||
X ~ 1 0 200 170 D 40 40 1 1 P
|
X ~ 1 0 200 170 D 40 40 1 1 P
|
||||||
X ~ 2 0 -200 170 U 40 40 1 1 P
|
X ~ 2 0 -200 170 U 40 40 1 1 P
|
||||||
ENDDRAW
|
ENDDRAW
|
||||||
|
@ -363,6 +377,8 @@ ENDDEF
|
||||||
DEF CONN_8X2 P 0 40 Y Y 1 F N
|
DEF CONN_8X2 P 0 40 Y Y 1 F N
|
||||||
F0 "P" 0 450 60 H V C CNN
|
F0 "P" 0 450 60 H V C CNN
|
||||||
F1 "CONN_8X2" 0 0 50 V 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
|
DRAW
|
||||||
S -100 400 100 -400 0 1 0 N
|
S -100 400 100 -400 0 1 0 N
|
||||||
X ~ 1 -400 350 300 R 60 60 1 1 P I
|
X ~ 1 -400 350 300 R 60 60 1 1 P I
|
||||||
|
@ -387,15 +403,17 @@ ENDDEF
|
||||||
# CP
|
# CP
|
||||||
#
|
#
|
||||||
DEF CP C 0 10 N N 1 F N
|
DEF CP C 0 10 N N 1 F N
|
||||||
F0 "C" 50 100 50 H V L CNN
|
F0 "C" 50 100 40 H V L CNN
|
||||||
F1 "CP" 50 -100 50 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
|
ALIAS CAPAPOL
|
||||||
$FPLIST
|
$FPLIST
|
||||||
CP*
|
CP*
|
||||||
SM*
|
SM*
|
||||||
$ENDFPLIST
|
$ENDFPLIST
|
||||||
DRAW
|
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
|
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 ~ 1 0 200 150 D 40 40 1 1 P
|
||||||
X ~ 2 0 -200 150 U 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
|
DEF CRYSTAL X 0 40 N N 1 F N
|
||||||
F0 "X" 0 150 60 H V C CNN
|
F0 "X" 0 150 60 H V C CNN
|
||||||
F1 "CRYSTAL" 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
|
DRAW
|
||||||
P 2 0 1 16 -100 100 -100 -100 N
|
P 2 0 1 16 -100 100 -100 -100 N
|
||||||
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
|
DEF DB25 J 0 40 Y N 1 F N
|
||||||
F0 "J" 50 1350 70 H V C CNN
|
F0 "J" 50 1350 70 H V C CNN
|
||||||
F1 "DB25" -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
|
$FPLIST
|
||||||
DB25*
|
DB25*
|
||||||
$ENDFPLIST
|
$ENDFPLIST
|
||||||
|
@ -516,6 +538,8 @@ ENDDEF
|
||||||
DEF EP600 U 0 40 Y Y 1 F N
|
DEF EP600 U 0 40 Y Y 1 F N
|
||||||
F0 "U" 0 100 70 H V C CNN
|
F0 "U" 0 100 70 H V C CNN
|
||||||
F1 "EP600" 0 -500 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
|
DRAW
|
||||||
S -500 -850 500 850 0 1 0 N
|
S -500 -850 500 850 0 1 0 N
|
||||||
X CLK1 1 -800 750 300 R 60 60 1 1 I C
|
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
|
DEF ~GND #PWR 0 0 Y Y 1 F P
|
||||||
F0 "#PWR" 0 0 30 H I C CNN
|
F0 "#PWR" 0 0 30 H I C CNN
|
||||||
F1 "GND" 0 -70 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
|
DRAW
|
||||||
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
|
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
|
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
|
DEF LED D 0 40 Y N 1 F N
|
||||||
F0 "D" 0 100 50 H V C CNN
|
F0 "D" 0 100 50 H V C CNN
|
||||||
F1 "LED" 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
|
$FPLIST
|
||||||
LED-3MM
|
LED-3MM
|
||||||
LED-5MM
|
LED-5MM
|
||||||
|
@ -585,6 +613,8 @@ ENDDEF
|
||||||
DEF PWR_FLAG #FLG 0 0 N N 1 F P
|
DEF PWR_FLAG #FLG 0 0 N N 1 F P
|
||||||
F0 "#FLG" 0 95 30 H I C CNN
|
F0 "#FLG" 0 95 30 H I C CNN
|
||||||
F1 "PWR_FLAG" 0 180 30 H V 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
|
DRAW
|
||||||
X pwr 1 0 0 0 U 20 20 0 0 w
|
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
|
P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N
|
||||||
|
@ -594,8 +624,10 @@ ENDDEF
|
||||||
# R
|
# R
|
||||||
#
|
#
|
||||||
DEF R R 0 0 N Y 1 F N
|
DEF R R 0 0 N Y 1 F N
|
||||||
F0 "R" 80 0 50 V V C CNN
|
F0 "R" 80 0 40 V V C CNN
|
||||||
F1 "R" 0 0 50 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
|
$FPLIST
|
||||||
R?
|
R?
|
||||||
SM0603
|
SM0603
|
||||||
|
@ -615,6 +647,8 @@ ENDDEF
|
||||||
DEF RR9 RR 0 40 Y N 1 F N
|
DEF RR9 RR 0 40 Y N 1 F N
|
||||||
F0 "RR" 50 600 70 H V C CNN
|
F0 "RR" 50 600 70 H V C CNN
|
||||||
F1 "RR9" 30 0 70 V 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
|
DRAW
|
||||||
P 6 0 1 0 -50 -450 -50 550 50 550 100 500 100 -450 -50 -450 N
|
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
|
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
|
DEF VCC #PWR 0 0 Y Y 1 F P
|
||||||
F0 "#PWR" 0 100 30 H I C CNN
|
F0 "#PWR" 0 100 30 H I C CNN
|
||||||
F1 "VCC" 0 100 30 H V 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
|
DRAW
|
||||||
X VCC 1 0 0 0 U 20 20 0 0 W N
|
X VCC 1 0 0 0 U 20 20 0 0 W N
|
||||||
C 0 50 20 0 1 0 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
|
BeginCmp
|
||||||
TimeStamp = /322D3011;
|
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
|
version=1
|
||||||
last_client=pcbnew
|
last_client=pcbnew
|
||||||
[common]
|
[common]
|
||||||
|
@ -14,31 +14,11 @@ NetIExt=net
|
||||||
EquName1=devcms
|
EquName1=devcms
|
||||||
[eeschema]
|
[eeschema]
|
||||||
version=1
|
version=1
|
||||||
|
PageLayoutDescrFile=pagelayout_logo.kicad_wks
|
||||||
|
SubpartIdSeparator=0
|
||||||
|
SubpartFirstId=65
|
||||||
LibDir=
|
LibDir=
|
||||||
NetFmt=1
|
NetFmtName=
|
||||||
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
|
|
||||||
RptD_X=0
|
RptD_X=0
|
||||||
RptD_Y=100
|
RptD_Y=100
|
||||||
RptLab=1
|
RptLab=1
|
||||||
|
@ -58,21 +38,24 @@ LibName11=special
|
||||||
LibName12=image
|
LibName12=image
|
||||||
[pcbnew]
|
[pcbnew]
|
||||||
version=1
|
version=1
|
||||||
PadDrlX=354
|
PageLayoutDescrFile=pagelayout_logo.kicad_wks
|
||||||
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
|
|
||||||
LastNetListRead=interf_u.net
|
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]
|
[pcbnew/libraries]
|
||||||
LibDir=
|
LibDir=
|
||||||
LibName1=connect
|
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:power
|
||||||
LIBS:device
|
LIBS:device
|
||||||
LIBS:conn
|
LIBS:conn
|
||||||
|
@ -12,9 +12,9 @@ LIBS:xilinx
|
||||||
LIBS:special
|
LIBS:special
|
||||||
LIBS:image
|
LIBS:image
|
||||||
LIBS:interf_u-cache
|
LIBS:interf_u-cache
|
||||||
EELAYER 25 0
|
EELAYER 24 0
|
||||||
EELAYER END
|
EELAYER END
|
||||||
$Descr A3 16535 11700
|
$Descr A3 16535 11693
|
||||||
encoding utf-8
|
encoding utf-8
|
||||||
Sheet 1 1
|
Sheet 1 1
|
||||||
Title "INTERFACE UNIVERSEL"
|
Title "INTERFACE UNIVERSEL"
|
||||||
|
@ -27,7 +27,7 @@ Comment3 "Comment 3"
|
||||||
Comment4 "Comment 4"
|
Comment4 "Comment 4"
|
||||||
$EndDescr
|
$EndDescr
|
||||||
$Bitmap
|
$Bitmap
|
||||||
Pos 11200 10550
|
Pos 9350 10600
|
||||||
Scale 1,000000
|
Scale 1,000000
|
||||||
Data
|
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
|
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
|
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
|
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
|
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
|
EndData
|
||||||
$EndBitmap
|
$EndBitmap
|
||||||
Wire Bus Line
|
Wire Bus Line
|
||||||
|
@ -1794,6 +1794,8 @@ U 1 1 4A087146
|
||||||
P 5250 1950
|
P 5250 1950
|
||||||
F 0 "U3" H 5250 2525 60 0000 C BNN
|
F 0 "U3" H 5250 2525 60 0000 C BNN
|
||||||
F 1 "74LS541" H 5250 1375 60 0000 C TNN
|
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 5250 1950
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1805,6 +1807,8 @@ U 1 1 43020357
|
||||||
P 14350 4800
|
P 14350 4800
|
||||||
F 0 "#PWR01" H 14350 4800 30 0001 C CNN
|
F 0 "#PWR01" H 14350 4800 30 0001 C CNN
|
||||||
F 1 "GND" H 14350 4730 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 14350 4800
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1814,6 +1818,8 @@ U 1 1 43020354
|
||||||
P 13550 4800
|
P 13550 4800
|
||||||
F 0 "#PWR02" H 13550 4800 30 0001 C CNN
|
F 0 "#PWR02" H 13550 4800 30 0001 C CNN
|
||||||
F 1 "GND" H 13550 4730 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 13550 4800
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1823,6 +1829,8 @@ U 1 1 43020343
|
||||||
P 4550 2550
|
P 4550 2550
|
||||||
F 0 "#PWR03" H 4550 2550 30 0001 C CNN
|
F 0 "#PWR03" H 4550 2550 30 0001 C CNN
|
||||||
F 1 "GND" H 4550 2480 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 4550 2550
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1832,6 +1840,8 @@ U 1 1 4302032E
|
||||||
P 1200 7700
|
P 1200 7700
|
||||||
F 0 "#PWR04" H 1200 7700 30 0001 C CNN
|
F 0 "#PWR04" H 1200 7700 30 0001 C CNN
|
||||||
F 1 "GND" H 1200 7630 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 1200 7700
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1841,6 +1851,8 @@ U 1 1 43020328
|
||||||
P 2600 9350
|
P 2600 9350
|
||||||
F 0 "#PWR05" H 2600 9350 30 0001 C CNN
|
F 0 "#PWR05" H 2600 9350 30 0001 C CNN
|
||||||
F 1 "GND" H 2600 9280 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 2600 9350
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1850,6 +1862,8 @@ U 1 1 38CEA284
|
||||||
P 3250 9300
|
P 3250 9300
|
||||||
F 0 "#FLG06" H 3250 9570 30 0001 C CNN
|
F 0 "#FLG06" H 3250 9570 30 0001 C CNN
|
||||||
F 1 "PWR_FLAG" H 3250 9530 30 0000 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 3250 9300
|
||||||
-1 0 0 1
|
-1 0 0 1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1859,6 +1873,8 @@ U 1 1 38C8E81F
|
||||||
P 3250 8900
|
P 3250 8900
|
||||||
F 0 "#PWR07" H 3250 9170 30 0001 C CNN
|
F 0 "#PWR07" H 3250 9170 30 0001 C CNN
|
||||||
F 1 "PWR_FLAG" H 3250 9130 30 0000 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 3250 8900
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1868,6 +1884,8 @@ U 1 1 38C8E014
|
||||||
P 8450 2550
|
P 8450 2550
|
||||||
F 0 "#PWR08" H 8450 2650 30 0001 C CNN
|
F 0 "#PWR08" H 8450 2650 30 0001 C CNN
|
||||||
F 1 "VCC" H 8450 2650 30 0000 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 8450 2550
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1877,6 +1895,8 @@ U 1 1 4A33B1CF
|
||||||
P 1350 4250
|
P 1350 4250
|
||||||
F 0 "#PWR09" H 1350 4450 40 0001 C CNN
|
F 0 "#PWR09" H 1350 4450 40 0001 C CNN
|
||||||
F 1 "VCC" H 1350 4400 40 0000 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
|
1 1350 4250
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1886,6 +1906,8 @@ U 1 1 4A33B1D0
|
||||||
P 1350 1650
|
P 1350 1650
|
||||||
F 0 "#PWR010" H 1350 1850 40 0001 C CNN
|
F 0 "#PWR010" H 1350 1850 40 0001 C CNN
|
||||||
F 1 "VCC" H 1350 1800 40 0000 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
|
1 1350 1650
|
||||||
0 -1 -1 0
|
0 -1 -1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1895,6 +1917,8 @@ U 1 1 4A33B1D1
|
||||||
P 10050 3000
|
P 10050 3000
|
||||||
F 0 "#PWR011" H 10050 3100 30 0001 C CNN
|
F 0 "#PWR011" H 10050 3100 30 0001 C CNN
|
||||||
F 1 "VCC" H 10050 3100 30 0000 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 10050 3000
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1904,6 +1928,8 @@ U 1 1 4A33B1D2
|
||||||
P 6100 9900
|
P 6100 9900
|
||||||
F 0 "#PWR012" H 6100 10000 30 0001 C CNN
|
F 0 "#PWR012" H 6100 10000 30 0001 C CNN
|
||||||
F 1 "VCC" H 6100 10000 30 0000 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 6100 9900
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1913,6 +1939,8 @@ U 1 1 38C8DFD2
|
||||||
P 2600 8850
|
P 2600 8850
|
||||||
F 0 "#PWR013" H 2600 8950 30 0001 C CNN
|
F 0 "#PWR013" H 2600 8950 30 0001 C CNN
|
||||||
F 1 "VCC" H 2600 8950 30 0000 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 2600 8850
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -1994,6 +2022,8 @@ U 1 1 3268ED7F
|
||||||
P 6850 2550
|
P 6850 2550
|
||||||
F 0 "#GND014" H 6850 2550 30 0001 C CNN
|
F 0 "#GND014" H 6850 2550 30 0001 C CNN
|
||||||
F 1 "GND" H 6850 2480 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
|
1 6850 2550
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2019,7 +2049,8 @@ U 1 1 32568D1E
|
||||||
P 1700 7250
|
P 1700 7250
|
||||||
F 0 "JP1" H 1700 7750 70 0000 C CNN
|
F 0 "JP1" H 1700 7750 70 0000 C CNN
|
||||||
F 1 "CONN_8X2" V 1700 7250 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 1700 7250
|
||||||
1 0 0 1
|
1 0 0 1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2032,6 +2063,8 @@ U 1 1 32567A22
|
||||||
P 3250 7950
|
P 3250 7950
|
||||||
F 0 "#015" H 3250 8150 40 0001 C CNN
|
F 0 "#015" H 3250 8150 40 0001 C CNN
|
||||||
F 1 "VCC" H 3250 8100 40 0000 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
|
1 3250 7950
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2042,6 +2075,7 @@ P 2750 8300
|
||||||
F 0 "RR1" V 2800 8300 70 0000 C CNN
|
F 0 "RR1" V 2800 8300 70 0000 C CNN
|
||||||
F 1 "9x1K" V 2770 8630 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 2 "r_pack9" V 2900 8350 60 0000 C CNN
|
||||||
|
F 3 "" H 2750 8300 60 0001 C CNN
|
||||||
1 2750 8300
|
1 2750 8300
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2083,6 +2117,8 @@ U 1 1 325676D0
|
||||||
P 14650 6100
|
P 14650 6100
|
||||||
F 0 "#016" H 14650 6100 30 0001 C CNN
|
F 0 "#016" H 14650 6100 30 0001 C CNN
|
||||||
F 1 "GND" H 14650 6030 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
|
1 14650 6100
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2095,6 +2131,7 @@ P 15200 7200
|
||||||
F 0 "P1" H 15250 8550 70 0000 C CNN
|
F 0 "P1" H 15250 8550 70 0000 C CNN
|
||||||
F 1 "DB25FEMELLE" H 15150 5850 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 2 "DB25FC" H 15150 5750 60 0000 C CNN
|
||||||
|
F 3 "" H 15200 7200 60 0001 C CNN
|
||||||
1 15200 7200
|
1 15200 7200
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2297,6 +2334,7 @@ P 6350 9900
|
||||||
F 0 "R3" V 6430 9900 50 0000 C CNN
|
F 0 "R3" V 6430 9900 50 0000 C CNN
|
||||||
F 1 "10K" V 6350 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 2 "R3" V 6250 9900 60 0000 C CNN
|
||||||
|
F 3 "" H 6350 9900 60 0001 C CNN
|
||||||
1 6350 9900
|
1 6350 9900
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2346,7 +2384,8 @@ U 1 1 3240023F
|
||||||
P 7700 9050
|
P 7700 9050
|
||||||
F 0 "U5" H 7750 10200 70 0000 C CNN
|
F 0 "U5" H 7750 10200 70 0000 C CNN
|
||||||
F 1 "628128" H 7700 7900 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 7700 9050
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2378,6 +2417,8 @@ U 1 1 32332C72
|
||||||
P 8450 1050
|
P 8450 1050
|
||||||
F 0 "#017" H 8450 1150 30 0001 C CNN
|
F 0 "#017" H 8450 1150 30 0001 C CNN
|
||||||
F 1 "VCC" H 8450 1150 30 0000 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 8450 1050
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2389,6 +2430,8 @@ U 1 1 32331877
|
||||||
P 6850 1050
|
P 6850 1050
|
||||||
F 0 "#018" H 6850 1050 30 0001 C CNN
|
F 0 "#018" H 6850 1050 30 0001 C CNN
|
||||||
F 1 "GND" H 6850 980 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
|
1 6850 1050
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2466,6 +2509,8 @@ U 1 1 32308380
|
||||||
P 14650 1750
|
P 14650 1750
|
||||||
F 0 "#019" H 14650 1750 30 0001 C CNN
|
F 0 "#019" H 14650 1750 30 0001 C CNN
|
||||||
F 1 "GND" H 14650 1680 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 14650 1750
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2475,6 +2520,8 @@ U 1 1 3230837A
|
||||||
P 14250 2200
|
P 14250 2200
|
||||||
F 0 "#020" H 14250 2200 30 0001 C CNN
|
F 0 "#020" H 14250 2200 30 0001 C CNN
|
||||||
F 1 "GND" H 14250 2130 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 14250 2200
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2558,6 +2605,8 @@ U 1 1 32307FB9
|
||||||
P 1350 4450
|
P 1350 4450
|
||||||
F 0 "#021" H 1350 4450 40 0001 C CNN
|
F 0 "#021" H 1350 4450 40 0001 C CNN
|
||||||
F 1 "GND" H 1350 4380 40 0000 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
|
1 1350 4450
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2567,6 +2616,8 @@ U 1 1 32307FA7
|
||||||
P 1350 1450
|
P 1350 1450
|
||||||
F 0 "#022" H 1350 1450 40 0001 C CNN
|
F 0 "#022" H 1350 1450 40 0001 C CNN
|
||||||
F 1 "GND" H 1350 1380 40 0000 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
|
1 1350 1450
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2577,6 +2628,7 @@ P 14350 4600
|
||||||
F 0 "C3" V 14450 4750 50 0000 C CNN
|
F 0 "C3" V 14450 4750 50 0000 C CNN
|
||||||
F 1 "47pF" V 14450 4450 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 2 "C1" H 14550 4600 60 0000 C CNN
|
||||||
|
F 3 "" H 14350 4600 60 0001 C CNN
|
||||||
1 14350 4600
|
1 14350 4600
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2587,6 +2639,7 @@ P 13550 4600
|
||||||
F 0 "C2" V 13650 4750 50 0000 C CNN
|
F 0 "C2" V 13650 4750 50 0000 C CNN
|
||||||
F 1 "47pF" V 13650 4450 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 2 "C1" H 13350 4600 60 0000 C CNN
|
||||||
|
F 3 "" H 13550 4600 60 0001 C CNN
|
||||||
1 13550 4600
|
1 13550 4600
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2597,6 +2650,7 @@ P 13950 4150
|
||||||
F 0 "X1" H 13950 4350 70 0000 C CNN
|
F 0 "X1" H 13950 4350 70 0000 C CNN
|
||||||
F 1 "8MHz" H 13950 3950 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 2 "HC-18UH" H 13950 3850 60 0000 C CNN
|
||||||
|
F 3 "" H 13950 4150 60 0001 C CNN
|
||||||
1 13950 4150
|
1 13950 4150
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2607,6 +2661,7 @@ P 14900 3700
|
||||||
F 0 "R2" V 14980 3700 50 0000 C CNN
|
F 0 "R2" V 14980 3700 50 0000 C CNN
|
||||||
F 1 "1K" V 14900 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 2 "R3" V 14800 3700 60 0000 C CNN
|
||||||
|
F 3 "" H 14900 3700 60 0001 C CNN
|
||||||
1 14900 3700
|
1 14900 3700
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2617,6 +2672,7 @@ P 13950 3700
|
||||||
F 0 "R1" V 14030 3700 50 0000 C CNN
|
F 0 "R1" V 14030 3700 50 0000 C CNN
|
||||||
F 1 "100K" V 13950 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 2 "R3" V 13850 3700 60 0000 C CNN
|
||||||
|
F 3 "" H 13950 3700 60 0001 C CNN
|
||||||
1 13950 3700
|
1 13950 3700
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2627,6 +2683,7 @@ P 4450 9100
|
||||||
F 0 "C1" H 4500 9200 50 0000 L CNN
|
F 0 "C1" H 4500 9200 50 0000 L CNN
|
||||||
F 1 "47uF" H 4500 9000 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 2 "CP6" H 4650 9100 60 0000 C CNN
|
||||||
|
F 3 "" H 4450 9100 60 0001 C CNN
|
||||||
1 4450 9100
|
1 4450 9100
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2637,6 +2694,7 @@ P 3800 9100
|
||||||
F 0 "C4" H 3850 9200 50 0000 L CNN
|
F 0 "C4" H 3850 9200 50 0000 L CNN
|
||||||
F 1 "47uF" H 3850 9000 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 2 "CP6" H 4000 9100 60 0000 C CNN
|
||||||
|
F 3 "" H 3800 9100 60 0001 C CNN
|
||||||
1 3800 9100
|
1 3800 9100
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2647,6 +2705,7 @@ P 3250 9100
|
||||||
F 0 "C5" H 3300 9200 50 0000 L CNN
|
F 0 "C5" H 3300 9200 50 0000 L CNN
|
||||||
F 1 "47uF" H 3300 9000 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 2 "CP6" H 3450 9100 60 0000 C CNN
|
||||||
|
F 3 "" H 3250 9100 60 0001 C CNN
|
||||||
1 3250 9100
|
1 3250 9100
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2657,6 +2716,7 @@ P 2600 9100
|
||||||
F 0 "C6" H 2650 9200 50 0000 L CNN
|
F 0 "C6" H 2650 9200 50 0000 L CNN
|
||||||
F 1 "47uF" H 2650 9000 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 2 "CP6" H 2800 9100 60 0000 C CNN
|
||||||
|
F 3 "" H 2600 9100 60 0001 C CNN
|
||||||
1 2600 9100
|
1 2600 9100
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2682,7 +2742,8 @@ U 1 1 322D35B4
|
||||||
P 4600 6900
|
P 4600 6900
|
||||||
F 0 "U2" H 4600 7850 60 0000 C CNN
|
F 0 "U2" H 4600 7850 60 0000 C CNN
|
||||||
F 1 "74LS688" H 4600 5950 60 0000 C CIB
|
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 4600 6900
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2693,6 +2754,7 @@ P 11200 5700
|
||||||
F 0 "U9" H 11200 8450 70 0000 C CNN
|
F 0 "U9" H 11200 8450 70 0000 C CNN
|
||||||
F 1 "4003APG120" H 11200 2950 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 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 4 "50$" H 11200 5700 60 0001 C CNN "price"
|
||||||
F 5 "test" H 11200 5700 60 0001 C CNN "Field5"
|
F 5 "test" H 11200 5700 60 0001 C CNN "Field5"
|
||||||
1 11200 5700
|
1 11200 5700
|
||||||
|
@ -2705,6 +2767,7 @@ P 14250 2000
|
||||||
F 0 "D2" H 14250 2100 50 0000 C CNN
|
F 0 "D2" H 14250 2100 50 0000 C CNN
|
||||||
F 1 "LED" H 14250 1900 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 2 "LEDV" V 14250 2250 60 0000 C CNN
|
||||||
|
F 3 "" H 14250 2000 60 0001 C CNN
|
||||||
1 14250 2000
|
1 14250 2000
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2715,6 +2778,7 @@ P 14650 1550
|
||||||
F 0 "D1" H 14650 1650 50 0000 C CNN
|
F 0 "D1" H 14650 1650 50 0000 C CNN
|
||||||
F 1 "LED" H 14650 1450 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 2 "LEDV" V 14650 1800 60 0000 C CNN
|
||||||
|
F 3 "" H 14650 1550 60 0001 C CNN
|
||||||
1 14650 1550
|
1 14650 1550
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2725,6 +2789,7 @@ P 13700 1500
|
||||||
F 0 "R5" V 13780 1500 50 0000 C CNN
|
F 0 "R5" V 13780 1500 50 0000 C CNN
|
||||||
F 1 "330" V 13700 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 2 "R3" V 13730 1680 30 0000 C CNN
|
||||||
|
F 3 "" H 13700 1500 60 0001 C CNN
|
||||||
1 13700 1500
|
1 13700 1500
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2735,6 +2800,7 @@ P 13700 1050
|
||||||
F 0 "R4" V 13780 1050 50 0000 C CNN
|
F 0 "R4" V 13780 1050 50 0000 C CNN
|
||||||
F 1 "330" V 13700 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 2 "R3" V 13850 1050 60 0000 C CNN
|
||||||
|
F 3 "" H 13700 1050 60 0001 C CNN
|
||||||
1 13700 1050
|
1 13700 1050
|
||||||
0 1 1 0
|
0 1 1 0
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2743,8 +2809,9 @@ L EP600 U8
|
||||||
U 1 1 322D321C
|
U 1 1 322D321C
|
||||||
P 7650 1800
|
P 7650 1800
|
||||||
F 0 "U8" H 7650 1900 70 0000 C CNN
|
F 0 "U8" H 7650 1900 70 0000 C CNN
|
||||||
F 1 "EP600" H 7650 1300 70 0000 C CNN
|
F 1 "EP600" H 7650 850 70 0000 C CNN
|
||||||
F 2 "24dip300" H 7700 1000 60 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 7650 1800
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2754,7 +2821,8 @@ U 1 1 322D31F4
|
||||||
P 5200 3600
|
P 5200 3600
|
||||||
F 0 "U1" H 5300 4175 60 0000 L BNN
|
F 0 "U1" H 5300 4175 60 0000 L BNN
|
||||||
F 1 "74LS245" H 5250 3025 60 0000 L TNN
|
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 5200 3600
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$EndComp
|
||||||
|
@ -2762,9 +2830,10 @@ $Comp
|
||||||
L BUSPC BUS1
|
L BUSPC BUS1
|
||||||
U 1 1 322D3011
|
U 1 1 322D3011
|
||||||
P 2250 2950
|
P 2250 2950
|
||||||
F 0 "BUS1" H 2250 3050 70 0000 C CNN
|
F 0 "BUS1" H 2200 4600 70 0000 C CNN
|
||||||
F 1 "BUSPC" H 2250 2850 70 0000 C CNN
|
F 1 "BUSPC" H 2200 1250 70 0000 C CNN
|
||||||
F 2 "BUS_PC" H 2250 1250 60 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 2250 2950
|
||||||
1 0 0 -1
|
1 0 0 -1
|
||||||
$EndComp
|
$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
|
./dialogs
|
||||||
../common
|
../common
|
||||||
../common/dialogs
|
../common/dialogs
|
||||||
${Boost_INCLUDE_DIR}
|
|
||||||
${INC_AFTER}
|
${INC_AFTER}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
block->SetState( state );
|
block->SetState( state );
|
||||||
block->SetCommand( command );
|
block->SetCommand( command );
|
||||||
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
||||||
GetScreen()->SetCrossHairPosition( block->GetEnd() );
|
SetCrossHairPosition( block->GetEnd() );
|
||||||
|
|
||||||
if( block->GetCommand() != BLOCK_ABORT )
|
if( block->GetCommand() != BLOCK_ABORT )
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
@ -237,8 +237,8 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
{
|
{
|
||||||
// Compute the rotation center and put it on grid:
|
// Compute the rotation center and put it on grid:
|
||||||
wxPoint rotationPoint = block->Centre();
|
wxPoint rotationPoint = block->Centre();
|
||||||
rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint );
|
rotationPoint = GetNearestGridPosition( rotationPoint );
|
||||||
GetScreen()->SetCrossHairPosition( rotationPoint );
|
SetCrossHairPosition( rotationPoint );
|
||||||
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
||||||
RotateListOfItems( block->GetItems(), rotationPoint );
|
RotateListOfItems( block->GetItems(), rotationPoint );
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -433,8 +433,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
||||||
{
|
{
|
||||||
/* Compute the rotation center and put it on grid */
|
/* Compute the rotation center and put it on grid */
|
||||||
wxPoint rotationPoint = block->Centre();
|
wxPoint rotationPoint = block->Centre();
|
||||||
rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint );
|
rotationPoint = GetNearestGridPosition( rotationPoint );
|
||||||
GetScreen()->SetCrossHairPosition( rotationPoint );
|
SetCrossHairPosition( rotationPoint );
|
||||||
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint );
|
||||||
RotateListOfItems( block->GetItems(), rotationPoint );
|
RotateListOfItems( block->GetItems(), rotationPoint );
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -452,8 +452,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
||||||
{
|
{
|
||||||
/* Compute the mirror center and put it on grid */
|
/* Compute the mirror center and put it on grid */
|
||||||
wxPoint mirrorPoint = block->Centre();
|
wxPoint mirrorPoint = block->Centre();
|
||||||
mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint );
|
mirrorPoint = GetNearestGridPosition( mirrorPoint );
|
||||||
GetScreen()->SetCrossHairPosition( mirrorPoint );
|
SetCrossHairPosition( mirrorPoint );
|
||||||
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_X, mirrorPoint );
|
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_X, mirrorPoint );
|
||||||
MirrorX( block->GetItems(), mirrorPoint );
|
MirrorX( block->GetItems(), mirrorPoint );
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -471,8 +471,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
||||||
{
|
{
|
||||||
/* Compute the mirror center and put it on grid */
|
/* Compute the mirror center and put it on grid */
|
||||||
wxPoint mirrorPoint = block->Centre();
|
wxPoint mirrorPoint = block->Centre();
|
||||||
mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint );
|
mirrorPoint = GetNearestGridPosition( mirrorPoint );
|
||||||
GetScreen()->SetCrossHairPosition( mirrorPoint );
|
SetCrossHairPosition( mirrorPoint );
|
||||||
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_Y, mirrorPoint );
|
SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_Y, mirrorPoint );
|
||||||
MirrorY( block->GetItems(), mirrorPoint );
|
MirrorY( block->GetItems(), mirrorPoint );
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -519,7 +519,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Repaint new view. */
|
/* 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() );
|
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
||||||
|
|
||||||
for( unsigned ii = 0; ii < block->GetCount(); ii++ )
|
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.SetState( state );
|
||||||
GetScreen()->m_BlockLocate.SetCommand( command );
|
GetScreen()->m_BlockLocate.SetCommand( command );
|
||||||
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand );
|
||||||
GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
|
SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(),
|
||||||
GetScreen()->m_BlockLocate.GetBottom() ) );
|
GetScreen()->m_BlockLocate.GetBottom() ) );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
SaveCopyInUndoList( m_component );
|
SaveCopyInUndoList( m_component );
|
||||||
|
|
||||||
pt = GetScreen()->m_BlockLocate.Centre();
|
pt = GetScreen()->m_BlockLocate.Centre();
|
||||||
pt = GetScreen()->GetNearestGridPosition( pt );
|
pt = GetNearestGridPosition( pt );
|
||||||
NEGATE( pt.y );
|
NEGATE( pt.y );
|
||||||
|
|
||||||
if ( m_component )
|
if ( m_component )
|
||||||
|
@ -183,7 +183,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
||||||
m_component->MirrorSelectedItemsH( pt );
|
m_component->MirrorSelectedItemsH( pt );
|
||||||
else if( block_cmd == BLOCK_MIRROR_X)
|
else if( block_cmd == BLOCK_MIRROR_X)
|
||||||
m_component->MirrorSelectedItemsV( pt );
|
m_component->MirrorSelectedItemsV( pt );
|
||||||
else if( block_cmd == BLOCK_ROTATE)
|
else if( block_cmd == BLOCK_ROTATE )
|
||||||
m_component->RotateSelectedItems( pt );
|
m_component->RotateSelectedItems( pt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
SaveCopyInUndoList( m_component );
|
SaveCopyInUndoList( m_component );
|
||||||
|
|
||||||
pt = GetScreen()->m_BlockLocate.Centre();
|
pt = GetScreen()->m_BlockLocate.Centre();
|
||||||
pt = GetScreen()->GetNearestGridPosition( pt );
|
pt = GetNearestGridPosition( pt );
|
||||||
NEGATE( pt.y );
|
NEGATE( pt.y );
|
||||||
|
|
||||||
if ( m_component )
|
if ( m_component )
|
||||||
|
@ -342,7 +342,7 @@ void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repaint new view
|
// Repaint new view
|
||||||
block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
block->SetMoveVector( parent->GetCrossHairPosition() - block->GetLastCursorPosition() );
|
||||||
|
|
||||||
GRSetDrawMode( aDC, g_XorMode );
|
GRSetDrawMode( aDC, g_XorMode );
|
||||||
block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() );
|
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: */
|
if( frame->GetForceHVLines() ) /* Coerce the line to vertical or horizontal one: */
|
||||||
ComputeBreakPoint( (SCH_LINE*) s_wires.GetLast()->Back(), endpos );
|
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* segment;
|
||||||
SCH_LINE* nextSegment;
|
SCH_LINE* nextSegment;
|
||||||
wxPoint cursorpos = GetScreen()->GetCrossHairPosition();
|
wxPoint cursorpos = GetCrossHairPosition();
|
||||||
|
|
||||||
// We should know if a segment is currently in progress
|
// We should know if a segment is currently in progress
|
||||||
segment = (SCH_LINE*) GetScreen()->GetCurItem();
|
segment = (SCH_LINE*) GetScreen()->GetCurItem();
|
||||||
|
@ -161,7 +162,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_canvas->SetMouseCapture( DrawSegment, AbortCreateNewLine );
|
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.
|
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;
|
return;
|
||||||
|
|
||||||
// Get the last non-null wire (this is the last created segment).
|
// 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 );
|
screen->SetCurItem( NULL );
|
||||||
m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false );
|
m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false );
|
||||||
|
|
||||||
|
@ -340,7 +342,7 @@ void SCH_EDIT_FRAME::DeleteCurrentSegment( wxDC* DC )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
|
|
||||||
if( ( screen->GetCurItem() == NULL ) || !screen->GetCurItem()->IsNew() )
|
if( ( screen->GetCurItem() == NULL ) || !screen->GetCurItem()->IsNew() )
|
||||||
return;
|
return;
|
||||||
|
@ -358,7 +360,7 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition,
|
||||||
{
|
{
|
||||||
SCH_JUNCTION* junction = new SCH_JUNCTION( aPosition );
|
SCH_JUNCTION* junction = new SCH_JUNCTION( aPosition );
|
||||||
|
|
||||||
m_itemToRepeat = junction;
|
SetRepeatItem( junction );
|
||||||
|
|
||||||
m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
|
m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
|
||||||
junction->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
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* 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 );
|
SetRepeatItem( no_connect );
|
||||||
m_itemToRepeat = NewNoConnect;
|
|
||||||
|
|
||||||
m_canvas->CrossHairOff( aDC ); // Erase schematic cursor
|
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
|
m_canvas->CrossHairOn( aDC ); // Display schematic cursor
|
||||||
|
|
||||||
GetScreen()->Append( NewNoConnect );
|
GetScreen()->Append( no_connect );
|
||||||
OnModify();
|
OnModify();
|
||||||
SaveCopyInUndoList( NewNoConnect, UR_NEW );
|
SaveCopyInUndoList( no_connect, UR_NEW );
|
||||||
return NewNoConnect;
|
return no_connect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -419,34 +421,44 @@ static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
|
void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
|
||||||
{
|
{
|
||||||
if( m_itemToRepeat == NULL )
|
SCH_ITEM* repeater = GetRepeatItem();
|
||||||
|
|
||||||
|
if( !repeater )
|
||||||
return;
|
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() -
|
wxPoint pos = GetCrossHairPosition() -
|
||||||
( (SCH_COMPONENT*) m_itemToRepeat )->GetPosition();
|
( (SCH_COMPONENT*) my_clone )->GetPosition();
|
||||||
m_itemToRepeat->SetFlags( IS_NEW );
|
|
||||||
( (SCH_COMPONENT*) m_itemToRepeat )->SetTimeStamp( GetNewTimeStamp() );
|
my_clone->SetFlags( IS_NEW );
|
||||||
m_itemToRepeat->Move( pos );
|
( (SCH_COMPONENT*) my_clone )->SetTimeStamp( GetNewTimeStamp() );
|
||||||
m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
|
my_clone->Move( pos );
|
||||||
MoveItem( m_itemToRepeat, DC );
|
my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode );
|
||||||
return;
|
MoveItem( my_clone, DC );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
m_itemToRepeat->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) );
|
|
||||||
|
|
||||||
if( m_itemToRepeat->CanIncrementLabel() )
|
|
||||||
( (SCH_TEXT*) m_itemToRepeat )->IncrementLabel();
|
|
||||||
|
|
||||||
if( m_itemToRepeat )
|
|
||||||
{
|
{
|
||||||
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();
|
GetScreen()->TestDanglingEnds();
|
||||||
m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
SaveCopyInUndoList( m_itemToRepeat, UR_NEW );
|
SaveCopyInUndoList( my_clone, UR_NEW );
|
||||||
m_itemToRepeat->ClearFlags();
|
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_BUS_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusBusEntry( wxDC* aDC )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
|
||||||
|
|
||||||
// Create and place a new bus entry at cursor position
|
// 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 );
|
busEntry->SetFlags( IS_NEW );
|
||||||
GetScreen()->SetCurItem( busEntry );
|
GetScreen()->SetCurItem( busEntry );
|
||||||
addCurrentItemToList( aDC );
|
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_BUS_WIRE_ENTRY* SCH_EDIT_FRAME::CreateBusWireEntry( wxDC* aDC )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
|
||||||
|
|
||||||
// Create and place a new bus entry at cursor position
|
// 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 );
|
busEntry->SetFlags( IS_NEW );
|
||||||
GetScreen()->SetCurItem( busEntry );
|
GetScreen()->SetCurItem( busEntry );
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
|
|
|
@ -731,7 +731,7 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter )
|
||||||
|
|
||||||
try
|
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++ )
|
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 )
|
bool CMP_LIBRARY::SaveHeader( OUTPUTFORMATTER& aFormatter )
|
||||||
{
|
{
|
||||||
aFormatter.Print( 0, "%s %d.%d Date: %s\n", LIBFILE_IDENT,
|
aFormatter.Print( 0, "%s %d.%d\n", LIBFILE_IDENT,
|
||||||
LIB_VERSION_MAJOR, LIB_VERSION_MINOR, TO_UTF8( DateAndTime() ) );
|
LIB_VERSION_MAJOR, LIB_VERSION_MINOR );
|
||||||
|
|
||||||
aFormatter.Print( 0, "#encoding utf-8\n");
|
aFormatter.Print( 0, "#encoding utf-8\n");
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,26 @@
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <sch_component.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)
|
#if defined(DEBUG)
|
||||||
|
|
||||||
#include <iostream>
|
#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." ) );
|
wxCHECK_RET( false, wxT( "Net list object type is not valid." ) );
|
||||||
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
wxString tmp, busName;
|
wxString tmp, busName, busNumber;
|
||||||
long begin, end, member;
|
long begin, end, member;
|
||||||
|
|
||||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
busName = busLabelRe.GetMatch( m_Label, 1 );
|
||||||
i = m_Label.Find( '[' );
|
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++;
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp.ToLong( &begin );
|
tmp.ToLong( &begin );
|
||||||
|
|
||||||
while( m_Label[i] == '.' && i < m_Label.Len() )
|
while( busNumber[i] == '.' && i < busNumber.Len() )
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
tmp.Empty();
|
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++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,7 @@ enum NET_CONNECTION_T {
|
||||||
* @param aLabel A wxString object containing the label to test.
|
* @param aLabel A wxString object containing the label to test.
|
||||||
* @return true if text is a bus notation format otherwise false is returned.
|
* @return true if text is a bus notation format otherwise false is returned.
|
||||||
*/
|
*/
|
||||||
inline bool IsBusLabel( const wxString& aLabel )
|
extern bool IsBusLabel( const wxString& aLabel );
|
||||||
{
|
|
||||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
|
||||||
return aLabel.Find( '[' ) != wxNOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class NETLIST_OBJECT
|
class NETLIST_OBJECT
|
||||||
|
|
|
@ -56,7 +56,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
|
||||||
wxString msg;
|
wxString msg;
|
||||||
LIB_PIN* Pin = NULL;
|
LIB_PIN* Pin = NULL;
|
||||||
SCH_COMPONENT* LibItem = 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
|
// Check the on grid position first. There is more likely to be multiple items on
|
||||||
// grid than off grid.
|
// grid than off grid.
|
||||||
|
@ -222,9 +222,9 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
snapToGrid = true;
|
snapToGrid = true;
|
||||||
|
|
||||||
if( snapToGrid )
|
if( snapToGrid )
|
||||||
pos = screen->GetNearestGridPosition( pos );
|
pos = GetNearestGridPosition( pos );
|
||||||
|
|
||||||
oldpos = screen->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
gridSize = screen->GetGridSize();
|
gridSize = screen->GetGridSize();
|
||||||
|
|
||||||
switch( aHotKey )
|
switch( aHotKey )
|
||||||
|
@ -261,14 +261,14 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update cursor position.
|
// Update cursor position.
|
||||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
SetCrossHairPosition( pos, snapToGrid );
|
||||||
|
|
||||||
if( oldpos != screen->GetCrossHairPosition() )
|
if( oldpos != GetCrossHairPosition() )
|
||||||
{
|
{
|
||||||
pos = screen->GetCrossHairPosition();
|
pos = GetCrossHairPosition();
|
||||||
screen->SetCrossHairPosition( oldpos, false);
|
SetCrossHairPosition( oldpos, false);
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
SetCrossHairPosition( pos, snapToGrid );
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( m_canvas->IsMouseCaptured() )
|
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 )
|
void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
|
||||||
{
|
{
|
||||||
wxRealPoint gridSize;
|
wxRealPoint gridSize;
|
||||||
SCH_SCREEN* screen = GetScreen();
|
|
||||||
wxPoint oldpos;
|
wxPoint oldpos;
|
||||||
wxPoint pos = aPosition;
|
wxPoint pos = aPosition;
|
||||||
|
|
||||||
|
@ -320,10 +319,10 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
snapToGrid = true;
|
snapToGrid = true;
|
||||||
|
|
||||||
if( snapToGrid )
|
if( snapToGrid )
|
||||||
pos = screen->GetNearestGridPosition( pos );
|
pos = GetNearestGridPosition( pos );
|
||||||
|
|
||||||
oldpos = screen->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
gridSize = screen->GetGridSize();
|
gridSize = GetScreen()->GetGridSize();
|
||||||
|
|
||||||
switch( aHotKey )
|
switch( aHotKey )
|
||||||
{
|
{
|
||||||
|
@ -359,14 +358,14 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the cursor position.
|
// Update the cursor position.
|
||||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
SetCrossHairPosition( pos, snapToGrid );
|
||||||
|
|
||||||
if( oldpos != screen->GetCrossHairPosition() )
|
if( oldpos != GetCrossHairPosition() )
|
||||||
{
|
{
|
||||||
pos = screen->GetCrossHairPosition();
|
pos = GetCrossHairPosition();
|
||||||
screen->SetCrossHairPosition( oldpos, false );
|
SetCrossHairPosition( oldpos, false );
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
screen->SetCrossHairPosition( pos, snapToGrid );
|
SetCrossHairPosition( pos, snapToGrid );
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( m_canvas->IsMouseCaptured() )
|
if( m_canvas->IsMouseCaptured() )
|
||||||
|
@ -403,8 +402,8 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
wxPoint oldpos;
|
wxPoint oldpos;
|
||||||
wxPoint pos = aPosition;
|
wxPoint pos = aPosition;
|
||||||
|
|
||||||
pos = screen->GetNearestGridPosition( pos );
|
pos = GetNearestGridPosition( pos );
|
||||||
oldpos = screen->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
gridSize = screen->GetGridSize();
|
gridSize = screen->GetGridSize();
|
||||||
|
|
||||||
switch( aHotKey )
|
switch( aHotKey )
|
||||||
|
@ -441,14 +440,14 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update cursor position.
|
// Update cursor position.
|
||||||
screen->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
|
|
||||||
if( oldpos != screen->GetCrossHairPosition() )
|
if( oldpos != GetCrossHairPosition() )
|
||||||
{
|
{
|
||||||
pos = screen->GetCrossHairPosition();
|
pos = GetCrossHairPosition();
|
||||||
screen->SetCrossHairPosition( oldpos );
|
SetCrossHairPosition( oldpos );
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
screen->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( m_canvas->IsMouseCaptured() )
|
if( m_canvas->IsMouseCaptured() )
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wx/tooltip.h>
|
#include <wx/tooltip.h>
|
||||||
|
#include <wx/hyperlink.h>
|
||||||
|
|
||||||
#include <fctsys.h>
|
#include <fctsys.h>
|
||||||
#include <appl_wxstruct.h>
|
#include <appl_wxstruct.h>
|
||||||
|
@ -112,6 +113,7 @@ private:
|
||||||
void addFieldButtonHandler( wxCommandEvent& event );
|
void addFieldButtonHandler( wxCommandEvent& event );
|
||||||
void deleteFieldButtonHandler( wxCommandEvent& event );
|
void deleteFieldButtonHandler( wxCommandEvent& event );
|
||||||
void moveUpButtonHandler( wxCommandEvent& event );
|
void moveUpButtonHandler( wxCommandEvent& event );
|
||||||
|
void showButtonHandler( wxCommandEvent& event );
|
||||||
|
|
||||||
SCH_FIELD* findField( const wxString& aFieldName );
|
SCH_FIELD* findField( const wxString& aFieldName );
|
||||||
|
|
||||||
|
@ -252,8 +254,11 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
|
||||||
if( m_Cmp->GetUnit() )
|
if( m_Cmp->GetUnit() )
|
||||||
{
|
{
|
||||||
int unit_selection = unitChoice->GetCurrentSelection() + 1;
|
int unit_selection = unitChoice->GetCurrentSelection() + 1;
|
||||||
|
STATUS_FLAGS flags = m_Cmp->GetFlags();
|
||||||
m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection );
|
m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection );
|
||||||
m_Cmp->SetUnit( unit_selection );
|
m_Cmp->SetUnit( unit_selection );
|
||||||
|
m_Cmp->ClearFlags();
|
||||||
|
m_Cmp->SetFlags( flags ); // Restore m_Flag modified by SetUnit()
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( orientationRadioBox->GetSelection() )
|
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 ) )
|
&& !m_Parent->GetTemplates().HasFieldName( m_FieldsBuf[i].GetName( false ) )
|
||||||
&& !removeRemainingFields )
|
&& !removeRemainingFields )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg = wxString::Format(
|
||||||
|
_( "The field name <%s> does not have a value and is not defined in "
|
||||||
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 "
|
||||||
"the field template list. Empty field values are invalid an will "
|
"be removed from the component. Do you wish to remove this and "
|
||||||
"be removed from the component. Do you wish to remove this and "
|
"all remaining undefined fields?" ),
|
||||||
"all remaining undefined fields?" ),
|
GetChars( m_FieldsBuf[i].GetName( false ) )
|
||||||
GetChars( m_FieldsBuf[i].GetName( false ) ) );
|
);
|
||||||
|
|
||||||
wxMessageDialog dlg( this, msg, _( "Remove Fields" ), wxYES_NO | wxNO_DEFAULT );
|
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 )
|
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::moveUpButtonHandler( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
unsigned fieldNdx = getSelectedFieldNdx();
|
unsigned fieldNdx = getSelectedFieldNdx();
|
||||||
|
@ -721,6 +733,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
|
||||||
|
|
||||||
fieldValueTextCtrl->SetValue( field.GetText() );
|
fieldValueTextCtrl->SetValue( field.GetText() );
|
||||||
|
|
||||||
|
m_show_datasheet_button->Enable( fieldNdx == DATASHEET );
|
||||||
|
|
||||||
// For power symbols, the value is NOR editable, because value and pin
|
// For power symbols, the value is NOR editable, because value and pin
|
||||||
// name must be same and can be edited only in library editor
|
// name must be same and can be edited only in library editor
|
||||||
if( fieldNdx == VALUE && m_LibEntry && m_LibEntry->IsPower() )
|
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->SetMaxLength( 0 );
|
||||||
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
||||||
|
|
||||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* fieldTextBoxSizer;
|
|
||||||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldValueLabel->Wrap( -1 );
|
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 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldValueTextCtrl->SetMaxLength( 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;
|
wxFlexGridSizer* fgSizerPosSize;
|
||||||
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
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->SetSizer( mainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
mainSizer->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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="minimum_size"></property>
|
||||||
<property name="name">DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP</property>
|
<property name="name">DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP</property>
|
||||||
<property name="pos"></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="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="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Component Properties</property>
|
<property name="title">Component Properties</property>
|
||||||
|
@ -1808,7 +1808,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
@ -1900,7 +1900,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="0">
|
<object class="wxTextCtrl" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1989,20 +1989,9 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</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">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxTOP</property>
|
<property name="flag">wxALIGN_TOP|wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -2083,11 +2072,11 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="0">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -2136,7 +2125,7 @@
|
||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</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_data_type"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
@ -2174,6 +2163,94 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</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>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
|
|
|
@ -63,6 +63,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
|
||||||
wxTextCtrl* fieldNameTextCtrl;
|
wxTextCtrl* fieldNameTextCtrl;
|
||||||
wxStaticText* fieldValueLabel;
|
wxStaticText* fieldValueLabel;
|
||||||
wxTextCtrl* fieldValueTextCtrl;
|
wxTextCtrl* fieldValueTextCtrl;
|
||||||
|
wxButton* m_show_datasheet_button;
|
||||||
wxStaticText* textSizeLabel;
|
wxStaticText* textSizeLabel;
|
||||||
wxTextCtrl* textSizeTextCtrl;
|
wxTextCtrl* textSizeTextCtrl;
|
||||||
wxStaticText* m_staticTextUnitSize;
|
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 addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void moveUpButtonHandler( 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 OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
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();
|
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -102,13 +102,19 @@ void DIALOG_LABEL_EDITOR::InitDialog()
|
||||||
if( m_CurrentText->IsMultilineAllowed() )
|
if( m_CurrentText->IsMultilineAllowed() )
|
||||||
{
|
{
|
||||||
m_textLabel = m_textLabelMultiLine;
|
m_textLabel = m_textLabelMultiLine;
|
||||||
m_textLabelSingleLine->Show(false);
|
m_textLabelSingleLine->Show( false );
|
||||||
multiLine = true;
|
multiLine = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_textLabel = m_textLabelSingleLine;
|
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() );
|
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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// 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 );
|
bSizeText = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
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 );
|
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 = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
|
||||||
|
m_textLabelMultiLine->SetMaxLength( 0 );
|
||||||
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
|
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
|
||||||
|
|
||||||
bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
|
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 );
|
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
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 );
|
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
||||||
|
|
||||||
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
|
|
@ -253,10 +253,10 @@
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type">wxString</property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_EXCLUDE_CHAR_LIST</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxTextValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable">m_labelText</property>
|
||||||
<property name="value"></property>
|
<property name="value"></property>
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -11,6 +11,8 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
class DIALOG_SHIM;
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
|
@ -19,6 +21,7 @@
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/valtext.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/radiobox.h>
|
#include <wx/radiobox.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
@ -62,6 +65,7 @@ class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
|
|
||||||
public:
|
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( 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();
|
~DIALOG_LABEL_EDITOR_BASE();
|
||||||
|
|
|
@ -77,6 +77,7 @@ private:
|
||||||
void moveUpButtonHandler( wxCommandEvent& event );
|
void moveUpButtonHandler( wxCommandEvent& event );
|
||||||
void OnCancelButtonClick( wxCommandEvent& event );
|
void OnCancelButtonClick( wxCommandEvent& event );
|
||||||
void OnOKButtonClick( wxCommandEvent& event );
|
void OnOKButtonClick( wxCommandEvent& event );
|
||||||
|
void showButtonHandler( wxCommandEvent& event );
|
||||||
|
|
||||||
// internal functions:
|
// internal functions:
|
||||||
void setSelectedFieldNdx( int aFieldNdx );
|
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 )
|
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::setSelectedFieldNdx( int aFieldNdx )
|
||||||
{
|
{
|
||||||
// deselect old selection, but I think this is done by single selection
|
// 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 ) );
|
textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( g_UserUnit, field.GetSize().x ) );
|
||||||
|
|
||||||
|
m_show_datasheet_button->Enable( fieldNdx == DATASHEET );
|
||||||
|
|
||||||
wxPoint coord = field.GetTextPosition();
|
wxPoint coord = field.GetTextPosition();
|
||||||
wxPoint zero;
|
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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// 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->SetMaxLength( 0 );
|
||||||
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||||
|
|
||||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* fieldTextBoxSizer;
|
|
||||||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldValueLabel->Wrap( -1 );
|
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 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldValueTextCtrl->SetMaxLength( 0 );
|
fieldValueTextCtrl->SetMaxLength( 0 );
|
||||||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
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;
|
wxFlexGridSizer* fgSizerPosSize;
|
||||||
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
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->SetSizer( mainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
mainSizer->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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 );
|
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="minimum_size"></property>
|
||||||
<property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property>
|
<property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property>
|
||||||
<property name="pos"></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="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="title">Fields Properties</property>
|
<property name="title">Fields Properties</property>
|
||||||
|
@ -975,7 +975,7 @@
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="0">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">fieldNameBoxSizer</property>
|
<property name="name">fieldNameBoxSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
|
@ -1065,7 +1065,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="1">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1154,20 +1154,9 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</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">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag"></property>
|
<property name="flag">wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxStaticText" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1250,7 +1239,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxBOTTOM|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="1">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1339,6 +1328,94 @@
|
||||||
<event name="OnUpdateUI"></event>
|
<event name="OnUpdateUI"></event>
|
||||||
</object>
|
</object>
|
||||||
</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>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<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/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -51,6 +51,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
|
||||||
wxTextCtrl* fieldNameTextCtrl;
|
wxTextCtrl* fieldNameTextCtrl;
|
||||||
wxStaticText* fieldValueLabel;
|
wxStaticText* fieldValueLabel;
|
||||||
wxTextCtrl* fieldValueTextCtrl;
|
wxTextCtrl* fieldValueTextCtrl;
|
||||||
|
wxButton* m_show_datasheet_button;
|
||||||
wxStaticText* textSizeLabel;
|
wxStaticText* textSizeLabel;
|
||||||
wxTextCtrl* textSizeTextCtrl;
|
wxTextCtrl* textSizeTextCtrl;
|
||||||
wxStaticText* m_staticTextUnitSize;
|
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 addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void moveUpButtonHandler( 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 OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||||
|
|
||||||
|
|
||||||
public:
|
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();
|
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -205,7 +205,7 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lastMarkerFound = marker;
|
m_lastMarkerFound = marker;
|
||||||
m_parent->GetScreen()->SetCrossHairPosition( marker->m_Pos );
|
m_parent->SetCrossHairPosition( marker->m_Pos );
|
||||||
m_parent->RedrawScreen( marker->m_Pos, false);
|
m_parent->RedrawScreen( marker->m_Pos, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event )
|
||||||
// (NULL if not found)
|
// (NULL if not found)
|
||||||
if( m_lastMarkerFound )
|
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);
|
m_parent->RedrawScreen( m_lastMarkerFound->m_Pos, true);
|
||||||
// prevent a mouse left button release event in
|
// prevent a mouse left button release event in
|
||||||
// coming from the ERC dialog double click
|
// 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.
|
// 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 );
|
image->Draw( aPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint pos = GetScreen()->GetCrossHairPosition();
|
wxPoint pos = GetCrossHairPosition();
|
||||||
|
|
||||||
SCH_BITMAP* image = new SCH_BITMAP( pos );
|
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 );
|
m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap );
|
||||||
GetScreen()->SetCurItem( aImageItem );
|
GetScreen()->SetCurItem( aImageItem );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
|
|
||||||
SetUndoItem( aImageItem );
|
SetUndoItem( aImageItem );
|
||||||
|
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( aImageItem->GetPosition() );
|
SetCrossHairPosition( aImageItem->GetPosition() );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
|
|
|
@ -72,25 +72,25 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
|
||||||
{
|
{
|
||||||
SCH_TEXT* textItem = NULL;
|
SCH_TEXT* textItem = NULL;
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
|
|
||||||
switch( aType )
|
switch( aType )
|
||||||
{
|
{
|
||||||
case LAYER_NOTES:
|
case LAYER_NOTES:
|
||||||
textItem = new SCH_TEXT( GetScreen()->GetCrossHairPosition() );
|
textItem = new SCH_TEXT( GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LAYER_LOCLABEL:
|
case LAYER_LOCLABEL:
|
||||||
textItem = new SCH_LABEL( GetScreen()->GetCrossHairPosition() );
|
textItem = new SCH_LABEL( GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LAYER_HIERLABEL:
|
case LAYER_HIERLABEL:
|
||||||
textItem = new SCH_HIERLABEL( GetScreen()->GetCrossHairPosition() );
|
textItem = new SCH_HIERLABEL( GetCrossHairPosition() );
|
||||||
textItem->SetShape( lastGlobalLabelShape );
|
textItem->SetShape( lastGlobalLabelShape );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LAYER_GLOBLABEL:
|
case LAYER_GLOBLABEL:
|
||||||
textItem = new SCH_GLOBALLABEL( GetScreen()->GetCrossHairPosition() );
|
textItem = new SCH_GLOBALLABEL( GetCrossHairPosition() );
|
||||||
textItem->SetShape( lastGlobalLabelShape );
|
textItem->SetShape( lastGlobalLabelShape );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
OnModify();
|
OnModify();
|
||||||
newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
m_canvas->CrossHairOn( &dc ); // redraw schematic cursor
|
m_canvas->CrossHairOn( &dc ); // redraw schematic cursor
|
||||||
|
|
|
@ -90,7 +90,7 @@ void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event )
|
||||||
m_CurrentSheet->UpdateAllScreenReferences();
|
m_CurrentSheet->UpdateAllScreenReferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
sheetFoundIn->LastScreen()->SetCrossHairPosition( lastMarker->GetPosition() );
|
SetCrossHairPosition( lastMarker->GetPosition() );
|
||||||
|
|
||||||
RedrawScreen( lastMarker->GetPosition(), warpCursor );
|
RedrawScreen( lastMarker->GetPosition(), warpCursor );
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
||||||
|
|
||||||
if( centerAndRedraw )
|
if( centerAndRedraw )
|
||||||
{
|
{
|
||||||
GetScreen()->SetCrossHairPosition(pos);
|
SetCrossHairPosition( pos );
|
||||||
RedrawScreen( pos, aWarpMouse );
|
RedrawScreen( pos, aWarpMouse );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
||||||
if( aWarpMouse )
|
if( aWarpMouse )
|
||||||
m_canvas->MoveCursor( pos );
|
m_canvas->MoveCursor( pos );
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition(pos);
|
SetCrossHairPosition( pos );
|
||||||
|
|
||||||
m_canvas->CrossHairOn( &dc );
|
m_canvas->CrossHairOn( &dc );
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,8 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
|
||||||
SetScreen( sheet->LastScreen() );
|
SetScreen( sheet->LastScreen() );
|
||||||
}
|
}
|
||||||
|
|
||||||
sheet->LastScreen()->SetCrossHairPosition( data.GetPosition() );
|
// careful here
|
||||||
|
SetCrossHairPosition( data.GetPosition() );
|
||||||
|
|
||||||
RedrawScreen( data.GetPosition(), warpCursor );
|
RedrawScreen( data.GetPosition(), warpCursor );
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC,
|
||||||
{
|
{
|
||||||
int unit = 1;
|
int unit = 1;
|
||||||
int convert = 1;
|
int convert = 1;
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
m_canvas->SetIgnoreMouseEvents( true );
|
m_canvas->SetIgnoreMouseEvents( true );
|
||||||
|
|
||||||
wxString Name = SelectComponentFromLibrary( aLibname, aHistoryList, aUseLibBrowser,
|
wxString Name = SelectComponentFromLibrary( aLibname, aHistoryList, aUseLibBrowser,
|
||||||
|
@ -231,7 +231,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC,
|
||||||
|
|
||||||
SCH_COMPONENT* component;
|
SCH_COMPONENT* component;
|
||||||
component = new SCH_COMPONENT( *Entry, m_CurrentSheet, unit, convert,
|
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
|
// 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,
|
// 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()
|
void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||||
{
|
{
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
ClearMsgPanel();
|
ClearMsgPanel();
|
||||||
|
|
||||||
SCH_SCREEN* screen = m_CurrentSheet->LastScreen();
|
SCH_SCREEN* screen = m_CurrentSheet->LastScreen();
|
||||||
|
@ -284,12 +284,12 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||||
{
|
{
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
screen->m_FirstRedraw = false;
|
screen->m_FirstRedraw = false;
|
||||||
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
|
SetCrossHairPosition( GetScrollCenterPosition() );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RedrawScreen( screen->GetScrollCenterPosition(), true );
|
RedrawScreen( GetScrollCenterPosition(), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now refresh m_canvas. Should be not necessary, but because screen has changed
|
// Now refresh m_canvas. Should be not necessary, but because screen has changed
|
||||||
|
|
|
@ -74,14 +74,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* local variables */
|
// local variables
|
||||||
/* Hotkey list: */
|
// Hotkey list:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common commands
|
* Common commands
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Fit on Screen */
|
// Fit on Screen
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkZoomAuto( wxT( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
|
static EDA_HOTKEY HkZoomAuto( wxT( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE );
|
||||||
#else
|
#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,
|
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4,
|
||||||
ID_POPUP_ZOOM_CENTER );
|
ID_POPUP_ZOOM_CENTER );
|
||||||
|
|
||||||
/* Refresh Screen */
|
// Refresh Screen
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
|
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW );
|
||||||
#else
|
#else
|
||||||
|
@ -100,14 +100,14 @@ static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL
|
||||||
ID_ZOOM_REDRAW );
|
ID_ZOOM_REDRAW );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Zoom In */
|
// Zoom In
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
|
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN );
|
||||||
#else
|
#else
|
||||||
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN );
|
static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Zoom Out */
|
// Zoom Out
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
|
static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT );
|
||||||
#else
|
#else
|
||||||
|
@ -115,13 +115,13 @@ static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-', I
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
|
static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' );
|
||||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||||
HK_RESET_LOCAL_COORD, ' ' );
|
|
||||||
|
|
||||||
/* Undo */
|
|
||||||
|
// Undo
|
||||||
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO );
|
||||||
|
|
||||||
/* Redo */
|
// Redo
|
||||||
#if !defined( __WXMAC__ )
|
#if !defined( __WXMAC__ )
|
||||||
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
|
static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO );
|
||||||
#else
|
#else
|
||||||
|
@ -358,8 +358,8 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||||
DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
|
DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_RESET_LOCAL_COORD: /* Reset the relative coord */
|
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_ZOOM_IN:
|
case HK_ZOOM_IN:
|
||||||
|
@ -385,7 +385,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_REPEAT_LAST:
|
case HK_REPEAT_LAST:
|
||||||
if( notBusy && m_itemToRepeat && ( m_itemToRepeat->GetFlags() == 0 ) )
|
if( notBusy )
|
||||||
RepeatDrawItem( aDC );
|
RepeatDrawItem( aDC );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -561,8 +561,8 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||||
DisplayHotkeyList( this, s_Libedit_Hokeys_Descr );
|
DisplayHotkeyList( this, s_Libedit_Hokeys_Descr );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_RESET_LOCAL_COORD: /* Reset the relative coord */
|
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_ZOOM_IN:
|
case HK_ZOOM_IN:
|
||||||
|
|
|
@ -218,7 +218,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
GetScreen()->m_Center = true;
|
GetScreen()->m_Center = true;
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) );
|
SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ double LIB_EDIT_FRAME::BestZoom()
|
||||||
BoundaryBox = m_component->GetBoundingBox( m_unit, m_convert );
|
BoundaryBox = m_component->GetBoundingBox( m_unit, m_convert );
|
||||||
dx = BoundaryBox.GetWidth();
|
dx = BoundaryBox.GetWidth();
|
||||||
dy = BoundaryBox.GetHeight();
|
dy = BoundaryBox.GetHeight();
|
||||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ double LIB_EDIT_FRAME::BestZoom()
|
||||||
dx = pageInfo.GetSizeIU().x;
|
dx = pageInfo.GetSizeIU().x;
|
||||||
dy = pageInfo.GetSizeIU().y;
|
dy = pageInfo.GetSizeIU().y;
|
||||||
|
|
||||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
size = m_canvas->GetClientSize();
|
size = m_canvas->GetClientSize();
|
||||||
|
@ -753,7 +753,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
STATUS_FLAGS oldFlags = m_drawItem->GetFlags();
|
STATUS_FLAGS oldFlags = m_drawItem->GetFlags();
|
||||||
m_drawItem->ClearFlags();
|
m_drawItem->ClearFlags();
|
||||||
m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform );
|
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->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform );
|
||||||
m_drawItem->SetFlags( oldFlags );
|
m_drawItem->SetFlags( oldFlags );
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
|
@ -1139,7 +1139,7 @@ LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
wxPoint pos = GetScreen()->GetNearestGridPosition( aPosition );
|
wxPoint pos = GetNearestGridPosition( aPosition );
|
||||||
|
|
||||||
if( item == NULL && aPosition != pos )
|
if( item == NULL && aPosition != pos )
|
||||||
item = locateItem( pos, aFilterList );
|
item = locateItem( pos, aFilterList );
|
||||||
|
|
|
@ -52,13 +52,13 @@ static wxArrayString s_PowerNameList;
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
SCH_ITEM* item = GetScreen()->GetCurItem();
|
SCH_ITEM* item = GetScreen()->GetCurItem();
|
||||||
wxPoint gridPosition = GetGridPosition( aPosition );
|
wxPoint gridPosition = GetGridPosition( aPosition );
|
||||||
|
|
||||||
if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) )
|
if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) )
|
||||||
{
|
{
|
||||||
m_canvas->SetAutoPanRequest( false );
|
m_canvas->SetAutoPanRequest( false );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
|
|
||||||
if( item && item->GetFlags() )
|
if( item && item->GetFlags() )
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
m_CurrentSheet->Pop();
|
m_CurrentSheet->Pop();
|
||||||
DisplayCurrentSheet();
|
DisplayCurrentSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_NOCONN_BUTT:
|
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 ) )
|
if( false == GetScreen()->GetItem( gridPosition, 0, SCH_NO_CONNECT_T ) )
|
||||||
{
|
{
|
||||||
m_itemToRepeat = AddNoConnect( aDC, gridPosition );
|
SCH_NO_CONNECT* no_connect = AddNoConnect( aDC, gridPosition );
|
||||||
GetScreen()->SetCurItem( m_itemToRepeat );
|
SetRepeatItem( no_connect );
|
||||||
|
GetScreen()->SetCurItem( no_connect );
|
||||||
m_canvas->SetAutoPanRequest( true );
|
m_canvas->SetAutoPanRequest( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_JUNCTION_BUTT:
|
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 ) )
|
if( false == GetScreen()->GetItem( gridPosition, 0, SCH_JUNCTION_T ) )
|
||||||
{
|
{
|
||||||
m_itemToRepeat = AddJunction( aDC, gridPosition, true );
|
SCH_JUNCTION* junction = AddJunction( aDC, gridPosition, true );
|
||||||
GetScreen()->SetCurItem( m_itemToRepeat );
|
SetRepeatItem( junction );
|
||||||
|
GetScreen()->SetCurItem( junction );
|
||||||
m_canvas->SetAutoPanRequest( true );
|
m_canvas->SetAutoPanRequest( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_WIRETOBUS_ENTRY_BUTT:
|
case ID_WIRETOBUS_ENTRY_BUTT:
|
||||||
|
@ -168,6 +167,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_BUSTOBUS_ENTRY_BUTT:
|
case ID_BUSTOBUS_ENTRY_BUTT:
|
||||||
if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
|
if( ( item == NULL ) || ( item->GetFlags() == 0 ) )
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_ADD_IMAGE_BUTT:
|
case ID_ADD_IMAGE_BUTT:
|
||||||
|
@ -222,7 +221,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LABEL_BUTT:
|
case ID_LABEL_BUTT:
|
||||||
|
@ -235,7 +233,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_GLABEL_BUTT:
|
case ID_GLABEL_BUTT:
|
||||||
|
@ -254,7 +251,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SHEET_SYMBOL_BUTT:
|
case ID_SHEET_SYMBOL_BUTT:
|
||||||
|
@ -272,7 +268,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_IMPORT_HLABEL_BUTT:
|
case ID_IMPORT_HLABEL_BUTT:
|
||||||
|
@ -294,7 +289,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_SCH_PLACE_COMPONENT:
|
case ID_SCH_PLACE_COMPONENT:
|
||||||
|
@ -307,7 +301,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PLACE_POWER_BUTT:
|
case ID_PLACE_POWER_BUTT:
|
||||||
|
@ -321,7 +314,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
addCurrentItemToList( aDC );
|
addCurrentItemToList( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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 )
|
void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = frame->GetScreen();
|
SCH_SCREEN* screen = frame->GetScreen();
|
||||||
wxPoint pos = screen->GetCrossHairPosition();
|
wxPoint pos = frame->GetCrossHairPosition();
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( Wire == NULL )
|
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" ),
|
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ),
|
||||||
KiBitmap( delete_connection_xpm ) );
|
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" ),
|
AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ),
|
||||||
KiBitmap( break_line_xpm ) );
|
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 )
|
void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
|
||||||
{
|
{
|
||||||
wxPoint pos = frame->GetScreen()->GetCrossHairPosition();
|
wxPoint pos = frame->GetCrossHairPosition();
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( Bus == NULL )
|
if( Bus == NULL )
|
||||||
{
|
{
|
||||||
|
|
|
@ -210,7 +210,7 @@ void LIB_EDIT_FRAME::PlacePin()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
newpos = GetScreen()->GetCrossHairPosition( true );
|
newpos = GetCrossHairPosition( true );
|
||||||
|
|
||||||
// Test for an other pin in same new position:
|
// Test for an other pin in same new position:
|
||||||
for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) )
|
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.x = OldPos.x;
|
||||||
startPos.y = -OldPos.y;
|
startPos.y = -OldPos.y;
|
||||||
// m_canvas->CrossHairOff( DC );
|
// m_canvas->CrossHairOff( DC );
|
||||||
GetScreen()->SetCrossHairPosition( startPos );
|
SetCrossHairPosition( startPos );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
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
|
// 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,
|
CurrentPin->Draw( aPanel, aDC, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode,
|
||||||
&showPinText, DefaultTransform );
|
&showPinText, DefaultTransform );
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
|
||||||
if( SynchronizePins() )
|
if( SynchronizePins() )
|
||||||
pin->SetFlags( IS_LINKED );
|
pin->SetFlags( IS_LINKED );
|
||||||
|
|
||||||
pin->Move( GetScreen()->GetCrossHairPosition( true ) );
|
pin->Move( GetCrossHairPosition( true ) );
|
||||||
pin->SetLength( LastPinLength );
|
pin->SetLength( LastPinLength );
|
||||||
pin->SetOrientation( LastPinOrient );
|
pin->SetOrientation( LastPinOrient );
|
||||||
pin->SetType( LastPinType );
|
pin->SetType( LastPinType );
|
||||||
|
@ -555,10 +555,10 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
|
||||||
if( SynchronizePins() )
|
if( SynchronizePins() )
|
||||||
Pin->SetFlags( IS_LINKED );
|
Pin->SetFlags( IS_LINKED );
|
||||||
|
|
||||||
wxPoint savepos = GetScreen()->GetCrossHairPosition();
|
wxPoint savepos = GetCrossHairPosition();
|
||||||
m_canvas->CrossHairOff( DC );
|
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
|
// Add this new pin in list, and creates pins for others parts if needed
|
||||||
m_drawItem = Pin;
|
m_drawItem = Pin;
|
||||||
|
@ -566,7 +566,7 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
|
||||||
PlacePin();
|
PlacePin();
|
||||||
m_lastDrawItem = Pin;
|
m_lastDrawItem = Pin;
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition( savepos );
|
SetCrossHairPosition( savepos );
|
||||||
m_canvas->CrossHairOn( DC );
|
m_canvas->CrossHairOn( DC );
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
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() );
|
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() );
|
wxASSERT( GetScreen() );
|
||||||
GetScreen()->SetOriginAxisPosition( aPosition );
|
GetScreen()->SetAuxOrigin( aPosition );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,8 +113,8 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
||||||
EDA_DRAW_FRAME::UpdateStatusBar();
|
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||||
|
|
||||||
// Display absolute coordinates:
|
// Display absolute coordinates:
|
||||||
double dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x );
|
double dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x );
|
||||||
double dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y );
|
double dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y );
|
||||||
|
|
||||||
if ( g_UserUnit == MILLIMETRES )
|
if ( g_UserUnit == MILLIMETRES )
|
||||||
{
|
{
|
||||||
|
@ -147,8 +147,9 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
||||||
SetStatusText( line, 2 );
|
SetStatusText( line, 2 );
|
||||||
|
|
||||||
// Display relative coordinates:
|
// Display relative coordinates:
|
||||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||||
|
|
||||||
dXpos = To_User_Unit( g_UserUnit, dx );
|
dXpos = To_User_Unit( g_UserUnit, dx );
|
||||||
dYpos = To_User_Unit( g_UserUnit, dy );
|
dYpos = To_User_Unit( g_UserUnit, dy );
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
case ID_HIERARCHY:
|
case ID_HIERARCHY:
|
||||||
InstallHierarchyFrame( &dc, pos );
|
InstallHierarchyFrame( &dc, pos );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_CUT:
|
case wxID_CUT:
|
||||||
|
@ -127,12 +127,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
HandleBlockEndByPopUp( BLOCK_DELETE, &dc );
|
HandleBlockEndByPopUp( BLOCK_DELETE, &dc );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxID_PASTE:
|
case wxID_PASTE:
|
||||||
HandleBlockBegin( &dc, BLOCK_PASTE, screen->GetCrossHairPosition() );
|
HandleBlockBegin( &dc, BLOCK_PASTE, GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_SCH_ENTRY_SELECT_SLASH:
|
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:
|
case ID_POPUP_SCH_BEGIN_WIRE:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
OnLeftClick( &dc, screen->GetCrossHairPosition() );
|
OnLeftClick( &dc, GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_SCH_BEGIN_BUS:
|
case ID_POPUP_SCH_BEGIN_BUS:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
OnLeftClick( &dc, screen->GetCrossHairPosition() );
|
OnLeftClick( &dc, GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_SCH_SET_SHAPE_TEXT:
|
case ID_POPUP_SCH_SET_SHAPE_TEXT:
|
||||||
|
@ -182,7 +182,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION );
|
DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION );
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
screen->TestDanglingEnds( m_canvas, &dc );
|
screen->TestDanglingEnds( m_canvas, &dc );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
@ -194,7 +194,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
oldWires.SetOwnership( false ); // Prevent DLIST for deleting items in destructor.
|
oldWires.SetOwnership( false ); // Prevent DLIST for deleting items in destructor.
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
screen->ExtractWires( oldWires, true );
|
screen->ExtractWires( oldWires, true );
|
||||||
screen->BreakSegment( screen->GetCrossHairPosition() );
|
screen->BreakSegment( GetCrossHairPosition() );
|
||||||
|
|
||||||
if( oldWires.GetCount() != 0 )
|
if( oldWires.GetCount() != 0 )
|
||||||
{
|
{
|
||||||
|
@ -222,7 +222,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
DeleteItem( item );
|
DeleteItem( item );
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
screen->TestDanglingEnds( m_canvas, &dc );
|
screen->TestDanglingEnds( m_canvas, &dc );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
@ -344,7 +344,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
case ID_POPUP_SCH_ADD_JUNCTION:
|
case ID_POPUP_SCH_ADD_JUNCTION:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
screen->SetCurItem( AddJunction( &dc, screen->GetCrossHairPosition(), true ) );
|
screen->SetCurItem( AddJunction( &dc, GetCrossHairPosition(), true ) );
|
||||||
screen->TestDanglingEnds( m_canvas, &dc );
|
screen->TestDanglingEnds( m_canvas, &dc );
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
break;
|
break;
|
||||||
|
@ -375,7 +375,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
// End switch ( id ) (Command execution)
|
// End switch ( id ) (Command execution)
|
||||||
|
|
||||||
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
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 )
|
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ void SCH_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simulate left click event if we got here from a hot key.
|
// 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;
|
PICKED_ITEMS_LIST pickList;
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
wxPoint pos = screen->GetCrossHairPosition();
|
wxPoint pos = GetCrossHairPosition();
|
||||||
|
|
||||||
if( screen->GetConnection( pos, pickList, aFullConnection ) != 0 )
|
if( screen->GetConnection( pos, pickList, aFullConnection ) != 0 )
|
||||||
{
|
{
|
||||||
|
@ -603,7 +603,7 @@ bool SCH_EDIT_FRAME::DeleteItemAtCrossHair( wxDC* DC )
|
||||||
SCH_ITEM* item;
|
SCH_ITEM* item;
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
|
|
||||||
item = LocateItem( screen->GetCrossHairPosition(), SCH_COLLECTOR::ParentItems );
|
item = LocateItem( GetCrossHairPosition(), SCH_COLLECTOR::ParentItems );
|
||||||
|
|
||||||
if( item )
|
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 );
|
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
item->SetPosition( screen->GetCrossHairPosition() );
|
item->SetPosition( aPanel->GetParent()->GetCrossHairPosition() );
|
||||||
|
|
||||||
// Draw the item item at it's new position.
|
// Draw the item item at it's new position.
|
||||||
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
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" ) );
|
wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) );
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
SetRepeatItem( NULL );
|
||||||
|
|
||||||
if( !aItem->IsNew() )
|
if( !aItem->IsNew() )
|
||||||
{
|
{
|
||||||
|
@ -713,7 +713,7 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC )
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
|
|
||||||
if( aItem->Type() != SCH_SHEET_PIN_T )
|
if( aItem->Type() != SCH_SHEET_PIN_T )
|
||||||
GetScreen()->SetCrossHairPosition( aItem->GetPosition() );
|
SetCrossHairPosition( aItem->GetPosition() );
|
||||||
|
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
|
||||||
|
@ -959,7 +959,7 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent )
|
||||||
// is to simulate a block drag command
|
// is to simulate a block drag command
|
||||||
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
||||||
{
|
{
|
||||||
if( !HandleBlockBegin( &dc, BLOCK_DRAG, screen->GetCrossHairPosition() ) )
|
if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetCrossHairPosition() ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Give a non null size to the search block:
|
// 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,
|
const wxPoint& aPosition, const wxSize& aSize,
|
||||||
long aStyle ) :
|
long aStyle ) :
|
||||||
SCH_BASE_FRAME( aParent, SCHEMATIC_FRAME_TYPE, aTitle, aPosition, aSize,
|
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_FrameName = SCH_EDIT_FRAME_NAME;
|
||||||
m_showAxis = false; // true to show axis
|
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 ) );
|
icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) );
|
||||||
SetIcon( icon );
|
SetIcon( icon );
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
|
||||||
|
|
||||||
/* Get config */
|
/* Get config */
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
|
@ -268,8 +267,10 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle,
|
||||||
|
|
||||||
SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
||||||
{
|
{
|
||||||
|
delete m_item_to_repeat; // we own the cloned object, see this->SetRepeatItem()
|
||||||
|
|
||||||
SetScreen( NULL );
|
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 m_undoItem;
|
||||||
delete g_RootSheet;
|
delete g_RootSheet;
|
||||||
delete m_findReplaceData;
|
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()
|
void SCH_EDIT_FRAME::SetSheetNumberAndCount()
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
|
@ -501,7 +528,7 @@ double SCH_EDIT_FRAME::BestZoom()
|
||||||
|
|
||||||
double bestzoom = std::max( zx, zy );
|
double bestzoom = std::max( zx, zy );
|
||||||
|
|
||||||
GetScreen()->SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) );
|
SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) );
|
||||||
|
|
||||||
return bestzoom;
|
return bestzoom;
|
||||||
}
|
}
|
||||||
|
@ -869,7 +896,7 @@ bool SCH_EDIT_FRAME::isAutoSaveRequired() const
|
||||||
void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC )
|
void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
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." ) );
|
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 )
|
if( aSheet == NULL )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Get the new texts */
|
// Get the new texts
|
||||||
DIALOG_SCH_SHEET_PROPS dlg( this );
|
DIALOG_SCH_SHEET_PROPS dlg( this );
|
||||||
|
|
||||||
wxString units = GetUnitsLabel( g_UserUnit );
|
wxString units = GetUnitsLabel( g_UserUnit );
|
||||||
|
@ -244,8 +244,8 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
||||||
|
|
||||||
if( sheet->IsResized() )
|
if( sheet->IsResized() )
|
||||||
{
|
{
|
||||||
int width = screen->GetCrossHairPosition().x - sheet->GetPosition().x;
|
int width = aPanel->GetParent()->GetCrossHairPosition().x - sheet->GetPosition().x;
|
||||||
int height = screen->GetCrossHairPosition().y - sheet->GetPosition().y;
|
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.
|
// 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;
|
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;
|
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 ) );
|
sheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );
|
||||||
}
|
}
|
||||||
else if( sheet->IsMoving() )
|
else if( sheet->IsMoving() )
|
||||||
{
|
{
|
||||||
moveVector = screen->GetCrossHairPosition() - pos;
|
moveVector = aPanel->GetParent()->GetCrossHairPosition() - pos;
|
||||||
sheet->Move( moveVector );
|
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 )
|
static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
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();
|
SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent();
|
||||||
|
|
||||||
if( (item == NULL) || (item->Type() != SCH_SHEET_T) || (parent == NULL) )
|
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 )
|
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->SetFlags( IS_NEW | IS_RESIZED );
|
||||||
sheet->SetTimeStamp( GetNewTimeStamp() );
|
sheet->SetTimeStamp( GetNewTimeStamp() );
|
||||||
|
@ -338,7 +340,9 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
|
||||||
m_canvas->SetMouseCapture( MoveOrResizeSheet, ExitSheet );
|
m_canvas->SetMouseCapture( MoveOrResizeSheet, ExitSheet );
|
||||||
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
|
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( sheet->GetResizePosition() );
|
|
||||||
|
SetCrossHairPosition( sheet->GetResizePosition() );
|
||||||
|
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
|
@ -356,7 +360,7 @@ void SCH_EDIT_FRAME::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
||||||
GetChars( aSheet->GetClass() ) ) );
|
GetChars( aSheet->GetClass() ) ) );
|
||||||
|
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( aSheet->GetResizePosition() );
|
SetCrossHairPosition( aSheet->GetResizePosition() );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
|
@ -377,7 +381,7 @@ void SCH_EDIT_FRAME::StartMoveSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( aSheet->GetPosition() );
|
SetCrossHairPosition( aSheet->GetPosition() );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
|
||||||
if( !aSheet->IsNew() )
|
if( !aSheet->IsNew() )
|
||||||
|
|
|
@ -136,7 +136,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool newItem = item->IsNew();
|
bool newItem = item->IsNew();
|
||||||
item->EndEdit( parent->GetScreen()->GetCrossHairPosition( true ), true );
|
item->EndEdit( parent->GetCrossHairPosition( true ), true );
|
||||||
|
|
||||||
if( newItem )
|
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 )
|
LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC )
|
||||||
{
|
{
|
||||||
m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn );
|
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
|
// no temp copy -> the current version of component will be used for Undo
|
||||||
// This is normal when adding new items to the current component
|
// 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 )
|
if( m_drawItem == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxPoint pos = GetScreen()->GetCrossHairPosition( true );
|
wxPoint pos = GetCrossHairPosition( true );
|
||||||
|
|
||||||
if( m_drawItem->ContinueEdit( pos ) )
|
if( m_drawItem->ContinueEdit( pos ) )
|
||||||
{
|
{
|
||||||
|
@ -264,21 +264,20 @@ static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BASE_SCREEN* Screen = aPanel->GetScreen();
|
|
||||||
|
|
||||||
item->SetEraseLastDrawItem( aErase );
|
item->SetEraseLastDrawItem( aErase );
|
||||||
|
|
||||||
// if item is the reference field, we must add the current unit id
|
// if item is the reference field, we must add the current unit id
|
||||||
if( item->Type() == LIB_FIELD_T )
|
if( item->Type() == LIB_FIELD_T )
|
||||||
{
|
{
|
||||||
int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit();
|
int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit();
|
||||||
wxString text = ((LIB_FIELD*)item)->GetFullText( unit );
|
wxString text = ((LIB_FIELD*)item)->GetFullText( unit );
|
||||||
item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ),
|
|
||||||
|
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
|
||||||
UNSPECIFIED_COLOR, g_XorMode, &text,
|
UNSPECIFIED_COLOR, g_XorMode, &text,
|
||||||
DefaultTransform );
|
DefaultTransform );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ),
|
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
|
||||||
UNSPECIFIED_COLOR, g_XorMode, NULL,
|
UNSPECIFIED_COLOR, g_XorMode, NULL,
|
||||||
DefaultTransform );
|
DefaultTransform );
|
||||||
}
|
}
|
||||||
|
@ -298,7 +297,7 @@ void LIB_EDIT_FRAME::StartMoveDrawSymbol( wxDC* DC )
|
||||||
if( m_drawItem->Type() == LIB_FIELD_T )
|
if( m_drawItem->Type() == LIB_FIELD_T )
|
||||||
m_drawItem->BeginEdit( IS_MOVED, m_drawItem->GetPosition() );
|
m_drawItem->BeginEdit( IS_MOVED, m_drawItem->GetPosition() );
|
||||||
else
|
else
|
||||||
m_drawItem->BeginEdit( IS_MOVED, GetScreen()->GetCrossHairPosition( true ) );
|
m_drawItem->BeginEdit( IS_MOVED, GetCrossHairPosition( true ) );
|
||||||
|
|
||||||
m_canvas->SetMouseCapture( RedrawWhileMovingCursor, AbortSymbolTraceOn );
|
m_canvas->SetMouseCapture( RedrawWhileMovingCursor, AbortSymbolTraceOn );
|
||||||
m_canvas->CallMouseCapture( DC, wxDefaultPosition, true );
|
m_canvas->CallMouseCapture( DC, wxDefaultPosition, true );
|
||||||
|
@ -312,7 +311,7 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TempCopyComponent();
|
TempCopyComponent();
|
||||||
m_drawItem->BeginEdit( IS_RESIZED, GetScreen()->GetCrossHairPosition( true ) );
|
m_drawItem->BeginEdit( IS_RESIZED, GetCrossHairPosition( true ) );
|
||||||
m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn );
|
m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn );
|
||||||
m_canvas->CallMouseCapture( DC, wxDefaultPosition, true );
|
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,
|
static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||||
bool aErase )
|
bool aErase )
|
||||||
{
|
{
|
||||||
BASE_SCREEN* Screen = aPanel->GetScreen();
|
|
||||||
LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
|
LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
|
||||||
|
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
item->SetEraseLastDrawItem( aErase );
|
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 );
|
DefaultTransform );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,7 +355,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
||||||
if( m_drawItem->IsNew() )
|
if( m_drawItem->IsNew() )
|
||||||
m_component->AddDrawItem( m_drawItem );
|
m_component->AddDrawItem( m_drawItem );
|
||||||
|
|
||||||
m_drawItem->EndEdit( GetScreen()->GetCrossHairPosition( true ) );
|
m_drawItem->EndEdit( GetCrossHairPosition( true ) );
|
||||||
|
|
||||||
m_drawItem = NULL;
|
m_drawItem = NULL;
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol()
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) );
|
SetCrossHairPosition( wxPoint( 0, 0 ) );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->SetIgnoreMouseEvents( false );
|
m_canvas->SetIgnoreMouseEvents( false );
|
||||||
|
|
||||||
|
@ -238,7 +238,9 @@ void LIB_EDIT_FRAME::PlaceAnchor()
|
||||||
if( m_component == NULL )
|
if( m_component == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxPoint offset( -GetScreen()->GetCrossHairPosition().x, GetScreen()->GetCrossHairPosition().y );
|
const wxPoint& cross_hair = GetCrossHairPosition();
|
||||||
|
|
||||||
|
wxPoint offset( -cross_hair.x, cross_hair.y );
|
||||||
|
|
||||||
OnModify( );
|
OnModify( );
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ void LIB_VIEW_FRAME::OnSize( wxSizeEvent& SizeEv )
|
||||||
|
|
||||||
void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event )
|
void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||||
UpdateStatusBar();
|
UpdateStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,18 +348,16 @@ double LIB_VIEW_FRAME::BestZoom()
|
||||||
* search for line static const int VIEWPORT_EXTENT = 1000;
|
* search for line static const int VIEWPORT_EXTENT = 1000;
|
||||||
* and replace by static const int VIEWPORT_EXTENT = 10000;
|
* and replace by static const int VIEWPORT_EXTENT = 10000;
|
||||||
*/
|
*/
|
||||||
LIB_COMPONENT* component = NULL;
|
LIB_COMPONENT* component = NULL;
|
||||||
CMP_LIBRARY* lib;
|
double bestzoom = 16.0; // default value for bestzoom
|
||||||
double bestzoom = 16.0; // default value for bestzoom
|
CMP_LIBRARY* lib = CMP_LIBRARY::FindLibrary( m_libraryName );
|
||||||
|
|
||||||
lib = CMP_LIBRARY::FindLibrary( m_libraryName );
|
|
||||||
|
|
||||||
if( lib )
|
if( lib )
|
||||||
component = lib->FindComponent( m_entryName );
|
component = lib->FindComponent( m_entryName );
|
||||||
|
|
||||||
if( component == NULL )
|
if( component == NULL )
|
||||||
{
|
{
|
||||||
GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
SetScrollCenterPosition( wxPoint( 0, 0 ) );
|
||||||
return bestzoom;
|
return bestzoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +380,7 @@ double LIB_VIEW_FRAME::BestZoom()
|
||||||
if( bestzoom < GetScreen()->m_ZoomList[0] )
|
if( bestzoom < GetScreen()->m_ZoomList[0] )
|
||||||
bestzoom = GetScreen()->m_ZoomList[0];
|
bestzoom = GetScreen()->m_ZoomList[0];
|
||||||
|
|
||||||
GetScreen()->SetScrollCenterPosition( BoundaryBox.Centre() );
|
SetScrollCenterPosition( BoundaryBox.Centre() );
|
||||||
|
|
||||||
return bestzoom;
|
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 )
|
if( screen->m_BlockLocate.GetState() != STATE_BLOCK_STOP )
|
||||||
{
|
{
|
||||||
screen->m_BlockLocate.SetMoveVector( wxPoint( screen->GetCrossHairPosition().x -
|
const wxPoint& cross_hair = aPanel->GetParent()->GetCrossHairPosition();
|
||||||
screen->m_BlockLocate.GetRight(),
|
|
||||||
screen->GetCrossHairPosition().y -
|
screen->m_BlockLocate.SetMoveVector(
|
||||||
screen->m_BlockLocate.GetBottom() ) );
|
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 );
|
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 delta;
|
||||||
wxPoint oldpos;
|
wxPoint oldpos;
|
||||||
|
|
||||||
oldpos = GetScreen()->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
m_canvas->SetMouseCaptureCallback( NULL );
|
m_canvas->SetMouseCaptureCallback( NULL );
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition( oldpos );
|
SetCrossHairPosition( oldpos );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
GetScreen()->SetModify();
|
GetScreen()->SetModify();
|
||||||
GetScreen()->m_BlockLocate.Normalize();
|
GetScreen()->m_BlockLocate.Normalize();
|
||||||
|
|
|
@ -38,12 +38,12 @@ public:
|
||||||
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
||||||
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
||||||
|
|
||||||
const wxPoint& GetOriginAxisPosition() const
|
const wxPoint& GetAuxOrigin() const
|
||||||
{
|
{
|
||||||
return m_originAxisPosition;
|
return m_originAxisPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetOriginAxisPosition( const wxPoint& aPosition )
|
void SetAuxOrigin( const wxPoint& aPosition )
|
||||||
{
|
{
|
||||||
m_originAxisPosition = aPosition;
|
m_originAxisPosition = aPosition;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,9 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
wxPoint oldpos;
|
wxPoint oldpos;
|
||||||
wxPoint pos = aPosition;
|
wxPoint pos = aPosition;
|
||||||
|
|
||||||
pos = GetScreen()->GetNearestGridPosition( pos );
|
pos = GetNearestGridPosition( pos );
|
||||||
|
|
||||||
oldpos = GetScreen()->GetCrossHairPosition();
|
oldpos = GetCrossHairPosition();
|
||||||
gridSize = GetScreen()->GetGridSize();
|
gridSize = GetScreen()->GetGridSize();
|
||||||
|
|
||||||
switch( aHotKey )
|
switch( aHotKey )
|
||||||
|
@ -73,14 +73,14 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetScreen()->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
|
|
||||||
if( oldpos != GetScreen()->GetCrossHairPosition() )
|
if( oldpos != GetCrossHairPosition() )
|
||||||
{
|
{
|
||||||
pos = GetScreen()->GetCrossHairPosition();
|
pos = GetCrossHairPosition();
|
||||||
GetScreen()->SetCrossHairPosition( oldpos );
|
SetCrossHairPosition( oldpos );
|
||||||
m_canvas->CrossHairOff( aDC );
|
m_canvas->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( pos );
|
SetCrossHairPosition( pos );
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( m_canvas->IsMouseCaptured() )
|
if( m_canvas->IsMouseCaptured() )
|
||||||
|
|
|
@ -196,7 +196,7 @@ double GERBVIEW_FRAME::BestZoom()
|
||||||
|
|
||||||
double x = (double) bbox.GetWidth() / (double) size.x;
|
double x = (double) bbox.GetWidth() / (double) size.x;
|
||||||
double y = (double) bbox.GetHeight() / (double) size.y;
|
double y = (double) bbox.GetHeight() / (double) size.y;
|
||||||
GetScreen()->SetScrollCenterPosition( bbox.Centre() );
|
SetScrollCenterPosition( bbox.Centre() );
|
||||||
|
|
||||||
double best_zoom = std::max( x, y );
|
double best_zoom = std::max( x, y );
|
||||||
return best_zoom;
|
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 );
|
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 );
|
wxASSERT( m_gerberLayout );
|
||||||
m_gerberLayout->SetOriginAxisPosition( aPosition );
|
m_gerberLayout->SetAuxOrigin( aPosition );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -800,8 +800,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
||||||
{
|
{
|
||||||
double theta, ro;
|
double theta, ro;
|
||||||
|
|
||||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||||
|
|
||||||
// atan2 in the 0,0 case returns 0
|
// atan2 in the 0,0 case returns 0
|
||||||
theta = RAD2DEG( atan2( -dy, dx ) );
|
theta = RAD2DEG( atan2( -dy, dx ) );
|
||||||
|
@ -829,9 +829,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display absolute coordinates:
|
// Display absolute coordinates:
|
||||||
dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x );
|
dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x );
|
||||||
dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y );
|
dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y );
|
||||||
|
|
||||||
|
|
||||||
wxString absformatter;
|
wxString absformatter;
|
||||||
|
|
||||||
|
@ -859,8 +858,8 @@ void GERBVIEW_FRAME::UpdateStatusBar()
|
||||||
if( !m_DisplayOptions.m_DisplayPolarCood ) // display relative cartesian coordinates
|
if( !m_DisplayOptions.m_DisplayPolarCood ) // display relative cartesian coordinates
|
||||||
{
|
{
|
||||||
// Display relative coordinates:
|
// Display relative coordinates:
|
||||||
dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
dx = GetCrossHairPosition().x - screen->m_O_Curseur.x;
|
||||||
dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
dy = GetCrossHairPosition().y - screen->m_O_Curseur.y;
|
||||||
dXpos = To_User_Unit( g_UserUnit, dx );
|
dXpos = To_User_Unit( g_UserUnit, dx );
|
||||||
dYpos = To_User_Unit( g_UserUnit, dy );
|
dYpos = To_User_Unit( g_UserUnit, dy );
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,9 @@ public:
|
||||||
|
|
||||||
class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME
|
class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME
|
||||||
{
|
{
|
||||||
GBR_LAYOUT* m_gerberLayout;
|
GBR_LAYOUT* m_gerberLayout;
|
||||||
|
wxPoint m_grid_origin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GBR_DISPLAY_OPTIONS m_DisplayOptions;
|
GBR_DISPLAY_OPTIONS m_DisplayOptions;
|
||||||
|
|
||||||
|
@ -126,8 +128,14 @@ public:
|
||||||
const PAGE_INFO& GetPageSettings() const; // overload
|
const PAGE_INFO& GetPageSettings() const; // overload
|
||||||
const wxSize GetPageSizeIU() const; // overload
|
const wxSize GetPageSizeIU() const; // overload
|
||||||
|
|
||||||
const wxPoint& GetOriginAxisPosition() const; // overload
|
const wxPoint& GetAuxOrigin() const; // overload
|
||||||
void SetOriginAxisPosition( const wxPoint& aPosition ); // 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
|
const TITLE_BLOCK& GetTitleBlock() const; // overload
|
||||||
void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload
|
void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload
|
||||||
|
|
|
@ -31,30 +31,28 @@
|
||||||
* and see this list for some ascii keys (space ...)
|
* and see this list for some ascii keys (space ...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* local variables */
|
// local variables
|
||||||
/* Hotkey list: */
|
// Hotkey list:
|
||||||
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
|
static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||||
HK_RESET_LOCAL_COORD, ' ' );
|
static EDA_HOTKEY HkSetGridOrigin( wxT("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S' );
|
||||||
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" ),
|
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
|
||||||
HK_SWITCH_LAYER_TO_NEXT, '+' );
|
static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 );
|
||||||
static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ),
|
static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 );
|
||||||
HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
|
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
|
// List of common hotkey descriptors
|
||||||
EDA_HOTKEY* s_Gerbview_Hotkey_List[] = {
|
EDA_HOTKEY* s_Gerbview_Hotkey_List[] = {
|
||||||
&HkHelp,
|
&HkHelp,
|
||||||
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
||||||
&HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord,
|
&HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin,
|
||||||
&HkTrackDisplayMode,
|
&HkTrackDisplayMode,
|
||||||
&HkSwitch2NextCopperLayer,
|
&HkSwitch2NextCopperLayer,
|
||||||
&HkSwitch2PreviousCopperLayer,
|
&HkSwitch2PreviousCopperLayer,
|
||||||
|
@ -130,8 +128,12 @@ void GERBVIEW_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
||||||
GetEventHandler()->ProcessEvent( cmd );
|
GetEventHandler()->ProcessEvent( cmd );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_RESET_LOCAL_COORD: /*Reset the relative coord */
|
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||||
GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition();
|
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HK_SET_GRID_ORIGIN:
|
||||||
|
SetGridOrigin( GetCrossHairPosition() );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HK_SWITCH_UNITS:
|
case HK_SWITCH_UNITS:
|
||||||
|
|
|
@ -44,7 +44,7 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
if( aTypeloc == CURSEUR_ON_GRILLE )
|
if( aTypeloc == CURSEUR_ON_GRILLE )
|
||||||
ref = GetScreen()->GetNearestGridPosition( ref );
|
ref = GetNearestGridPosition( ref );
|
||||||
|
|
||||||
LAYER_NUM layer = getActiveLayer();
|
LAYER_NUM layer = getActiveLayer();
|
||||||
|
|
||||||
|
|
|
@ -75,53 +75,134 @@ typedef std::vector< GRID_TYPE > GRIDS;
|
||||||
class BASE_SCREEN : public EDA_ITEM
|
class BASE_SCREEN : public EDA_ITEM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
GRIDS m_grids; ///< List of valid grid sizes.
|
GRIDS m_grids; ///< List of valid grid sizes.
|
||||||
bool m_FlagModified; ///< Indicates current drawing has been modified.
|
bool m_FlagModified; ///< Indicates current drawing has been modified.
|
||||||
bool m_FlagSave; ///< Indicates automatic file save.
|
bool m_FlagSave; ///< Indicates automatic file save.
|
||||||
EDA_ITEM* m_CurrentItem; ///< Currently selected object
|
EDA_ITEM* m_CurrentItem; ///< Currently selected object
|
||||||
GRID_TYPE m_Grid; ///< Current grid selection.
|
GRID_TYPE m_Grid; ///< Current grid selection.
|
||||||
wxPoint m_scrollCenter; ///< Current scroll center point in logical units.
|
wxPoint m_scrollCenter; ///< Current scroll center point in logical units.
|
||||||
wxPoint m_MousePosition; ///< Mouse cursor coordinate 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
|
* 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
|
* position. It is an addition indicator typically drawn on grid to indicate to the
|
||||||
* user where the current action will be performed.
|
* 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:
|
public:
|
||||||
static wxString m_PageLayoutDescrFileName; ///< the name of the page layout descr file,
|
static wxString m_PageLayoutDescrFileName; ///< the name of the page layout descr file,
|
||||||
///< or emty to used the default pagelayout
|
///< 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)
|
wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen
|
||||||
///< in user units. (coordinates from last reset position)
|
|
||||||
|
wxPoint m_O_Curseur; ///< Relative Screen cursor coordinate (on grid)
|
||||||
|
///< in user units. (coordinates from last reset position)
|
||||||
|
|
||||||
// Scrollbars management:
|
// Scrollbars management:
|
||||||
int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction.
|
int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction.
|
||||||
int m_ScrollPixelsPerUnitY; ///< Pixels per scroll unit in the vertical 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 =
|
* m_ScrollbarNumber * m_ScrollPixelsPerUnit =
|
||||||
* virtual draw area size in pixels */
|
* 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
|
wxPoint m_StartVisu; /**< Coordinates in drawing units of the current
|
||||||
* view position (upper left corner of device)
|
* view position (upper left corner of device)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool m_Center; /* Center on screen. If true (0.0) is centered
|
bool m_Center; /**< Center on screen. If true (0.0) is centered
|
||||||
* on screen coordinates can be < 0 and
|
* on screen coordinates can be < 0 and
|
||||||
* > 0 except for schematics.
|
* > 0 except for schematics.
|
||||||
* false: when coordinates can only be >= 0
|
* false: when coordinates can only be >= 0
|
||||||
* Schematic */
|
* Schematic */
|
||||||
bool m_FirstRedraw;
|
bool m_FirstRedraw;
|
||||||
|
|
||||||
// Undo/redo list of commands
|
// Undo/redo list of commands
|
||||||
UNDO_REDO_CONTAINER m_UndoList; ///< Objects list for the undo command (old data)
|
UNDO_REDO_CONTAINER m_UndoList; ///< Objects list for the undo command (old data)
|
||||||
|
@ -134,8 +215,6 @@ public:
|
||||||
int m_ScreenNumber;
|
int m_ScreenNumber;
|
||||||
int m_NumberOfScreens;
|
int m_NumberOfScreens;
|
||||||
|
|
||||||
wxPoint m_GridOrigin;
|
|
||||||
|
|
||||||
std::vector<double> m_ZoomList; ///< standard zoom (i.e. scale) coefficients.
|
std::vector<double> m_ZoomList; ///< standard zoom (i.e. scale) coefficients.
|
||||||
bool m_IsPrinting;
|
bool m_IsPrinting;
|
||||||
|
|
||||||
|
@ -164,30 +243,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual int MilsToIuScalar() { return 1; }
|
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 */
|
/* general Undo/Redo command control */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -247,19 +302,17 @@ public:
|
||||||
return m_UndoList.m_CommandsList.size();
|
return m_UndoList.m_CommandsList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetRedoCommandCount() const
|
int GetRedoCommandCount() const
|
||||||
{
|
{
|
||||||
return m_RedoList.m_CommandsList.size();
|
return m_RedoList.m_CommandsList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetModify() { m_FlagModified = true; }
|
||||||
void SetModify() { m_FlagModified = true; }
|
void ClrModify() { m_FlagModified = false; }
|
||||||
void ClrModify() { m_FlagModified = false;; }
|
void SetSave() { m_FlagSave = true; }
|
||||||
void SetSave() { m_FlagSave = true; }
|
void ClrSave() { m_FlagSave = false; }
|
||||||
void ClrSave() { m_FlagSave = false; }
|
bool IsModify() const { return m_FlagModified; }
|
||||||
bool IsModify() const { return m_FlagModified; }
|
bool IsSave() const { return m_FlagSave; }
|
||||||
bool IsSave() const { return m_FlagSave; }
|
|
||||||
|
|
||||||
|
|
||||||
//----<zoom stuff>---------------------------------------------------------
|
//----<zoom stuff>---------------------------------------------------------
|
||||||
|
@ -349,8 +402,6 @@ public:
|
||||||
*/
|
*/
|
||||||
const GRID_TYPE& GetGrid() const { return m_Grid; }
|
const GRID_TYPE& GetGrid() const { return m_Grid; }
|
||||||
|
|
||||||
const wxPoint& GetGridOrigin() const { return m_GridOrigin; }
|
|
||||||
|
|
||||||
void SetGrid( const wxRealPoint& size );
|
void SetGrid( const wxRealPoint& size );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -388,51 +439,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void GetGrids( GRIDS& aList );
|
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
|
* Function GetClass
|
||||||
* returns the class name.
|
* returns the class name.
|
||||||
|
@ -447,12 +453,6 @@ public:
|
||||||
|
|
||||||
void ClearBlockCommand() { m_BlockLocate.Clear(); }
|
void ClearBlockCommand() { m_BlockLocate.Clear(); }
|
||||||
|
|
||||||
const wxPoint& GetScrollCenterPosition() const { return m_scrollCenter; }
|
|
||||||
void SetScrollCenterPosition( const wxPoint& aCenterPosition )
|
|
||||||
{
|
|
||||||
m_scrollCenter = aCenterPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
void Show( int nestLevel, std::ostream& os ) const; // overload
|
void Show( int nestLevel, std::ostream& os ) const; // overload
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,7 +18,7 @@ class BOARD_DESIGN_SETTINGS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool m_MicroViasAllowed; ///< true to allow micro vias
|
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
|
/// if true, when creating a new track starting on an existing track, use this track width
|
||||||
bool m_UseConnectedTrackWidth;
|
bool m_UseConnectedTrackWidth;
|
||||||
|
@ -45,6 +45,8 @@ public:
|
||||||
wxSize m_ModuleTextSize; ///< Default footprint texts size
|
wxSize m_ModuleTextSize; ///< Default footprint texts size
|
||||||
int m_ModuleTextWidth;
|
int m_ModuleTextWidth;
|
||||||
int m_ModuleSegmentWidth;
|
int m_ModuleSegmentWidth;
|
||||||
|
wxPoint m_AuxOrigin; ///< origin for plot exports
|
||||||
|
wxPoint m_GridOrigin; ///< origin for grid offsets
|
||||||
|
|
||||||
D_PAD m_Pad_Master;
|
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
|
class EDA_DRAW_PANEL : public wxScrolledWindow
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int m_currentCursor; ///< Current mouse cursor shape id.
|
int m_currentCursor; ///< Current mouse cursor shape id.
|
||||||
int m_defaultCursor; ///< The default mouse cursor shape id.
|
int m_defaultCursor; ///< The default mouse cursor shape id.
|
||||||
bool m_showCrossHair; ///< Indicate if cross hair is to be shown.
|
bool m_showCrossHair; ///< Indicate if cross hair is to be shown.
|
||||||
int m_cursorLevel; ///< Index for cursor redraw in XOR mode.
|
int m_cursorLevel; ///< Index for cursor redraw in XOR mode.
|
||||||
int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit.
|
int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit.
|
||||||
int m_scrollIncrementY; ///< Y 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_CursorStartPos; ///< Used for testing the cursor movement.
|
||||||
wxPoint m_PanStartEventPosition; ///< Initial position of mouse event when pan started
|
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
|
/// The drawing area used to redraw the screen which is usually the visible area
|
||||||
/// of the drawing in internal units.
|
/// 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_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center
|
||||||
bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning.
|
bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning.
|
||||||
bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true
|
bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true
|
||||||
///< true to limit panning to scrollbar current limits
|
///< true to limit panning to scrollbar current limits
|
||||||
///< false to used unlimited pan
|
///< 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; ///< true to request an auto pan. Valid only when m_enableAutoPan = true.
|
||||||
bool m_requestAutoPan;
|
|
||||||
|
|
||||||
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
|
/* 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
|
* (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
|
* to inhibit a mouse left release command when switching between hierarchical sheets
|
||||||
* on a double click.
|
* 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
|
* Count the drag events. Used to filter mouse moves before starting a
|
||||||
* MinDragEventCount > MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND
|
* block command. A block command can be started only if
|
||||||
* in order to avoid spurious block commands. */
|
* 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
|
/// True when drawing in mirror mode. Used by the draw arc function, because arcs
|
||||||
/// are oriented, and in mirror mode, orientations are reversed.
|
/// are oriented, and in mirror mode, orientations are reversed.
|
||||||
bool m_PrintIsMirrored;
|
bool m_PrintIsMirrored;
|
||||||
|
|
||||||
/// Mouse capture move callback function.
|
/// Mouse capture move callback function.
|
||||||
MOUSE_CAPTURE_CALLBACK m_mouseCaptureCallback;
|
MOUSE_CAPTURE_CALLBACK m_mouseCaptureCallback;
|
||||||
|
@ -108,9 +111,10 @@ private:
|
||||||
/// Abort mouse capture callback function.
|
/// Abort mouse capture callback function.
|
||||||
END_MOUSE_CAPTURE_CALLBACK m_endMouseCaptureCallback;
|
END_MOUSE_CAPTURE_CALLBACK m_endMouseCaptureCallback;
|
||||||
|
|
||||||
// useful to avoid false start block in certain cases
|
/// useful to avoid false start block in certain cases
|
||||||
// (like switch from a sheet to an other sheet
|
/// (like switch from a sheet to an other sheet
|
||||||
int m_canStartBlock; // >= 0 (or >= n) if a block can start
|
/// >= 0 (or >= n) if a block can start
|
||||||
|
int m_canStartBlock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -119,7 +123,7 @@ public:
|
||||||
|
|
||||||
BASE_SCREEN* GetScreen();
|
BASE_SCREEN* GetScreen();
|
||||||
|
|
||||||
virtual EDA_DRAW_FRAME* GetParent();
|
EDA_DRAW_FRAME* GetParent();
|
||||||
|
|
||||||
void OnPaint( wxPaintEvent& event );
|
void OnPaint( wxPaintEvent& event );
|
||||||
|
|
||||||
|
@ -155,9 +159,8 @@ public:
|
||||||
|
|
||||||
void SetEnableBlockCommands( bool aEnable ) { m_enableBlockCommands = aEnable; }
|
void SetEnableBlockCommands( bool aEnable ) { m_enableBlockCommands = aEnable; }
|
||||||
|
|
||||||
bool GetPrintMirrored() const { return m_PrintIsMirrored; }
|
bool GetPrintMirrored() const { return m_PrintIsMirrored; }
|
||||||
|
void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; }
|
||||||
void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; }
|
|
||||||
|
|
||||||
void SetCanStartBlock( int aStartBlock ) { m_canStartBlock = aStartBlock; }
|
void SetCanStartBlock( int aStartBlock ) { m_canStartBlock = aStartBlock; }
|
||||||
|
|
||||||
|
@ -196,8 +199,9 @@ public:
|
||||||
* the grid origin is set by user, and is not (0,0)
|
* the grid origin is set by user, and is not (0,0)
|
||||||
* @param aDC = current Device Context
|
* @param aDC = current Device Context
|
||||||
* @param aDrawMode = draw mode (GR_COPY, GR_OR ..)
|
* @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 ) { }
|
void OnEraseBackground( wxEraseEvent& event ) { }
|
||||||
|
|
||||||
|
@ -324,7 +328,7 @@ public:
|
||||||
* warps the cursor to the current cross hair position.
|
* warps the cursor to the current cross hair position.
|
||||||
*/
|
*/
|
||||||
void MoveCursorToCrossHair();
|
void MoveCursorToCrossHair();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ToDeviceXY
|
* Function ToDeviceXY
|
||||||
* transforms logical to device coordinates
|
* transforms logical to device coordinates
|
||||||
|
|
|
@ -73,8 +73,8 @@ private:
|
||||||
|
|
||||||
TITLE_BLOCK m_titles;
|
TITLE_BLOCK m_titles;
|
||||||
|
|
||||||
/// Position of the origin axis, which is used in exports mostly, but not yet in EESCHEMA
|
/// Origin of the auxilliary axis, which is used in exports mostly, but not yet in EESCHEMA
|
||||||
wxPoint m_originAxisPosition;
|
wxPoint m_aux_origin;
|
||||||
|
|
||||||
DLIST< SCH_ITEM > m_drawList; ///< Object list for the screen.
|
DLIST< SCH_ITEM > m_drawList; ///< Object list for the screen.
|
||||||
/// @todo use DLIST<SCH_ITEM> or superior container
|
/// @todo use DLIST<SCH_ITEM> or superior container
|
||||||
|
@ -108,12 +108,12 @@ public:
|
||||||
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
const PAGE_INFO& GetPageSettings() const { return m_paper; }
|
||||||
void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; }
|
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; }
|
const wxPoint& GetAuxOrigin() const { return m_aux_origin; }
|
||||||
void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; }
|
void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; }
|
||||||
|
|
||||||
const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
|
const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
|
||||||
//TITLE_BLOCK& GetTitleBlock() const { return (TITLE_BLOCK&) 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_ITALIC (1<<1) // has meaning for texts
|
||||||
#define USE_ALT_COLOR (1<<2)
|
#define USE_ALT_COLOR (1<<2)
|
||||||
#define SELECTED_STATE (1<<3) // When set, use the hight light color to draw item
|
#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
|
// 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
|
// 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
|
// on page 1: NONE = item on all pages
|
||||||
#define PAGE1OPTION_NONE (0<<6) // NONE = item on all pages
|
#define PAGE1OPTION_NONE (0<<7) // NONE = item on all pages
|
||||||
#define PAGE1OPTION_PAGE1ONLY (1<<6) // = item only on page 1
|
#define PAGE1OPTION_PAGE1ONLY (1<<7) // = item only on page 1
|
||||||
#define PAGE1OPTION_NOTONPAGE1 (2<<6) // = item on all pages but page 1
|
#define PAGE1OPTION_NOTONPAGE1 (2<<7) // = item on all pages but page 1
|
||||||
|
|
||||||
// A coordinate is relative to a page corner.
|
// A coordinate is relative to a page corner.
|
||||||
// Any of the 4 corners can be a reference.
|
// Any of the 4 corners can be a reference.
|
||||||
|
@ -418,6 +420,14 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetConstrainedTextSize();
|
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
|
* @return true is a bold font should be selected
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,11 +31,10 @@
|
||||||
#ifndef _CONVERT_FROM_IU_
|
#ifndef _CONVERT_FROM_IU_
|
||||||
#define _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.
|
/// Convert from internal units to user units.
|
||||||
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
#if defined(GERBVIEW)
|
#if defined(GERBVIEW)
|
||||||
#define MM_PER_IU 1.0 / 1e5 // Gerbview uses 10 micrometer.
|
#define MM_PER_IU 1.0 / 1e5 // Gerbview uses 10 micrometer.
|
||||||
#else
|
#else
|
||||||
|
@ -43,32 +42,19 @@
|
||||||
#endif
|
#endif
|
||||||
#define MILS_PER_IU ( MM_PER_IU * 0.0254 )
|
#define MILS_PER_IU ( MM_PER_IU * 0.0254 )
|
||||||
#define DECIMILS_PER_IU (MM_PER_IU * 0.00254 )
|
#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.
|
/// Convert PCBNEW internal units (iu) to mils.
|
||||||
inline int Iu2Mils( int iu )
|
inline int Iu2Mils( int iu )
|
||||||
{
|
{
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
double x = iu * MILS_PER_IU;
|
double x = iu * MILS_PER_IU;
|
||||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
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.
|
/// Convert PCBNEW internal units (iu) to deci-mils.
|
||||||
inline int Iu2DMils( int iu )
|
inline int Iu2DMils( int iu )
|
||||||
{
|
{
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
double x = iu * DECIMILS_PER_IU;
|
double x = iu * DECIMILS_PER_IU;
|
||||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||||
#else
|
|
||||||
return iu;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // Eeschema and anything else.
|
#else // Eeschema and anything else.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef CONVERT_TO_BIU_H_
|
#ifndef CONVERT_TO_BIU_H_
|
||||||
#define 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
|
* @file convert_to_biu.h
|
||||||
|
@ -18,41 +18,26 @@
|
||||||
|
|
||||||
/// Scaling factor to convert mils to internal units.
|
/// Scaling factor to convert mils to internal units.
|
||||||
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
#if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW)
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
#if defined(GERBVIEW)
|
||||||
#if defined(GERBVIEW)
|
#define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers.
|
||||||
#define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers.
|
#else
|
||||||
#else
|
#define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer.
|
||||||
#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)
|
|
||||||
#endif
|
#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).
|
/// Convert mils to PCBNEW internal units (iu).
|
||||||
inline int Mils2iu( int mils )
|
inline int Mils2iu( int mils )
|
||||||
{
|
{
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
double x = mils * IU_PER_MILS;
|
double x = mils * IU_PER_MILS;
|
||||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
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).
|
/// Convert deci-mils to PCBNEW internal units (iu).
|
||||||
inline int DMils2iu( int dmils )
|
inline int DMils2iu( int dmils )
|
||||||
{
|
{
|
||||||
#if defined( USE_PCBNEW_NANOMETRES )
|
|
||||||
double x = dmils * IU_PER_DECIMILS;
|
double x = dmils * IU_PER_DECIMILS;
|
||||||
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
return int( x < 0 ? x - 0.5 : x + 0.5 );
|
||||||
#else
|
|
||||||
return dmils;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (PL_EDITOR)
|
#elif defined (PL_EDITOR)
|
||||||
|
|
|
@ -182,7 +182,7 @@ private:
|
||||||
*/
|
*/
|
||||||
VECTOR2D computeTextSize( const std::string& aText ) const;
|
VECTOR2D computeTextSize( const std::string& aText ) const;
|
||||||
|
|
||||||
static const double LINE_HEIGHT_RATIO = 1.6;
|
static const double LINE_HEIGHT_RATIO;
|
||||||
};
|
};
|
||||||
} // namespace KiGfx
|
} // namespace KiGfx
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,8 @@ void ParseHotkeyConfig( const wxString& data, struct EDA_HOTKEY_CONFIG* aDescLis
|
||||||
enum common_hotkey_id_commnand {
|
enum common_hotkey_id_commnand {
|
||||||
HK_NOT_FOUND = 0,
|
HK_NOT_FOUND = 0,
|
||||||
HK_RESET_LOCAL_COORD,
|
HK_RESET_LOCAL_COORD,
|
||||||
|
HK_SET_GRID_ORIGIN,
|
||||||
|
HK_RESET_GRID_ORIGIN,
|
||||||
HK_HELP,
|
HK_HELP,
|
||||||
HK_ZOOM_IN,
|
HK_ZOOM_IN,
|
||||||
HK_ZOOM_OUT,
|
HK_ZOOM_OUT,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue