Commit 23392ce8 authored by Maciej Suminski's avatar Maciej Suminski

Upstream merge.

parents 1828edba 4eec9fd0
......@@ -45,16 +45,11 @@
#include <info3d_visu.h>
#include <trackball.h>
// Exported function:
void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits );
void S3D_MASTER::Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices )
void S3D_MASTER::ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices )
{
unsigned ii;
/* adjust object scale, rotation and offset position */
for( ii = 0; ii < aVertices.size(); ii++ )
for( unsigned ii = 0; ii < aVertices.size(); ii++ )
{
aVertices[ii].x *= m_MatScale.x;
aVertices[ii].y *= m_MatScale.y;
......@@ -79,7 +74,7 @@ void S3D_MASTER::Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices )
}
void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits )
void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits )
{
unsigned ii;
GLfloat ax, ay, az, bx, by, bz, nx, ny, nz, r;
......@@ -138,44 +133,6 @@ void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits
glEnd();
}
GLuint EDA_3D_CANVAS::DisplayCubeforTest()
{
GLuint gllist = glGenLists( 1 );
glNewList( gllist, GL_COMPILE_AND_EXECUTE );
/* draw six faces of a cube */
glBegin( GL_QUADS );
glNormal3f( 0.0F, 0.0F, 1.0F );
glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( -0.5F, 0.5F, 0.5F );
glVertex3f( -0.5F, -0.5F, 0.5F ); glVertex3f( 0.5F, -0.5F, 0.5F );
glNormal3f( 0.0F, 0.0F, -1.0F );
glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( -0.5F, 0.5F, -0.5F );
glVertex3f( 0.5F, 0.5F, -0.5F ); glVertex3f( 0.5F, -0.5F, -0.5F );
glNormal3f( 0.0F, 1.0F, 0.0F );
glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( 0.5F, 0.5F, -0.5F );
glVertex3f( -0.5F, 0.5F, -0.5F ); glVertex3f( -0.5F, 0.5F, 0.5F );
glNormal3f( 0.0F, -1.0F, 0.0F );
glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( 0.5F, -0.5F, -0.5F );
glVertex3f( 0.5F, -0.5F, 0.5F ); glVertex3f( -0.5F, -0.5F, 0.5F );
glNormal3f( 1.0F, 0.0F, 0.0F );
glVertex3f( 0.5F, 0.5F, 0.5F ); glVertex3f( 0.5F, -0.5F, 0.5F );
glVertex3f( 0.5F, -0.5F, -0.5F ); glVertex3f( 0.5F, 0.5F, -0.5F );
glNormal3f( -1.0F, 0.0F, 0.0F );
glVertex3f( -0.5F, -0.5F, -0.5F ); glVertex3f( -0.5F, -0.5F, 0.5F );
glVertex3f( -0.5F, 0.5F, 0.5F ); glVertex3f( -0.5F, 0.5F, -0.5F );
glEnd();
glEndList();
return gllist;
}
VERTEX_VALUE_CTRL::VERTEX_VALUE_CTRL( wxWindow* aParent, wxBoxSizer* aBoxSizer )
{
wxString text;
......
......@@ -78,7 +78,11 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
wxFULL_REPAINT_ON_RESIZE )
{
m_init = false;
m_gllist = 0;
// Clear all gl list identifiers:
for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
m_glLists[ii] = 0;
// Explicitly create a new rendering context instance for this canvas.
m_glRC = new wxGLContext( this );
......@@ -94,12 +98,25 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS()
}
void EDA_3D_CANVAS::ClearLists()
void EDA_3D_CANVAS::ClearLists( GLuint aGlList )
{
if( m_gllist > 0 )
glDeleteLists( m_gllist, 1 );
if( aGlList )
{
if( m_glLists[aGlList] > 0 )
glDeleteLists( m_glLists[aGlList], 1 );
m_glLists[aGlList] = 0;
return;
}
m_gllist = 0;
for( int ii = GL_ID_BEGIN; ii < GL_ID_END; ii++ )
{
if( m_glLists[ii] > 0 )
glDeleteLists( m_glLists[ii], 1 );
m_glLists[ii] = 0;
}
}
......
......@@ -50,14 +50,29 @@ class S3D_VERTEX;
class SEGVIA;
class D_PAD;
// We are using GL lists to store layers and other items
// to draw or not
// GL_LIST_ID are the GL lists indexes in m_glLists
enum GL_LIST_ID
{
GL_ID_BEGIN = 0,
GL_ID_AXIS = GL_ID_BEGIN, // list id for 3D axis
GL_ID_GRID, // list id for 3D grid
GL_ID_BOARD, // List id for copper layers
GL_ID_TECH_LAYERS, // List id for non copper layers (masks...)
GL_ID_AUX_LAYERS, // List id for user layers (draw, eco, comment)
GL_ID_3DSHAPES_SOLID, // List id for 3D shapes, non transparent entities
GL_ID_3DSHAPES_TRANSP, // List id for 3D shapes, transparent entities
GL_ID_END
};
class EDA_3D_CANVAS : public wxGLCanvas
{
private:
bool m_init;
GLuint m_gllist;
GLuint m_glLists[GL_ID_END]; // GL lists
wxGLContext* m_glRC;
wxRealPoint m_draw3dOffset; // offset to draw the 3 mesh.
wxRealPoint m_draw3dOffset; // offset to draw the 3D mesh.
double m_ZBottom; // position of the back layer
double m_ZTop; // position of the front layer
......@@ -67,7 +82,15 @@ public:
EDA_3D_FRAME* Parent() { return (EDA_3D_FRAME*)GetParent(); }
void ClearLists();
BOARD* GetBoard() { return Parent()->GetBoard(); }
/**
* Function ClearLists
* Clear the display list.
* @param aGlList = the list to clear.
* if 0 (default) all lists are cleared
*/
void ClearLists( GLuint aGlList = 0 );
// Event functions:
void OnPaint( wxPaintEvent& event );
......@@ -81,7 +104,6 @@ public:
void OnEnterWindow( wxMouseEvent& event );
// Display functions
GLuint DisplayCubeforTest(); // Just a test function
void SetView3D( int keycode );
void DisplayStatus();
void Redraw();
......@@ -92,7 +114,7 @@ public:
* Prepares the parameters of the OpenGL draw list
* creates the OpenGL draw list items (board, grid ...
*/
GLuint CreateDrawGL_List();
void CreateDrawGL_List();
void InitGL();
void SetLights();
void SetOffset(double aPosX, double aPosY)
......@@ -104,11 +126,40 @@ public:
/**
* Function BuildBoard3DView
* Called by CreateDrawGL_List()
* Fills the OpenGL draw list with board items draw list.
* Populates the OpenGL GL_ID_BOARD draw list with board items only on copper layers.
* 3D footprint shapes, tech layers and aux layers are not on this list
*/
void BuildBoard3DView();
void DrawGrid( double aGriSizeMM );
/**
* Function BuildTechLayers3DView
* Called by CreateDrawGL_List()
* Populates the OpenGL GL_ID_BOARD draw list with items on tech layers
*/
void BuildTechLayers3DView();
/**
* Function BuildFootprintShape3DList
* Called by CreateDrawGL_List()
* Fills the OpenGL GL_ID_3DSHAPES_SOLID and GL_ID_3DSHAPES_TRANSP
* draw lists with 3D footprint shapes
* @param aOpaqueList is the gl list for non transparent items
* @param aTransparentList is the gl list for non transparent items,
* which need to be drawn after all other items
*/
void BuildFootprintShape3DList( GLuint aOpaqueList,
GLuint aTransparentList);
/**
* Function BuildBoard3DAuxLayers
* Called by CreateDrawGL_List()
* Fills the OpenGL GL_ID_AUX_LAYERS draw list
* with items on aux layers only
*/
void BuildBoard3DAuxLayers();
void Draw3DGrid( double aGriSizeMM );
void Draw3DAxis();
void Draw3DViaHole( SEGVIA * aVia );
void Draw3DPadHole( D_PAD * aPad );
......
......@@ -41,9 +41,14 @@ S3D_MATERIAL::S3D_MATERIAL( S3D_MASTER* father, const wxString& name ) :
m_Name = name;
}
void S3D_MATERIAL::SetMaterial()
{
S3D_MASTER * s3dParent = (S3D_MASTER *) GetParent();
s3dParent->SetLastTransparency( m_Transparency );
if( ! s3dParent->IsOpenGlAllowed() )
return;
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
glColor4f( m_DiffuseColor.x * m_AmbientIntensity,
m_DiffuseColor.y * m_AmbientIntensity,
......@@ -56,6 +61,20 @@ void S3D_MATERIAL::SetMaterial()
#endif
}
bool S3D_MASTER::IsOpenGlAllowed()
{
if( m_loadNonTransparentObjects ) // return true for non transparent objects only
{
if( m_lastTransparency == 0.0 )
return true;
}
if( m_loadTransparentObjects ) // return true for transparent objects only
if( m_lastTransparency != 0.0 )
return true;
return false;
}
void S3D_MASTER::Insert( S3D_MATERIAL* aMaterial )
{
......@@ -79,6 +98,7 @@ S3D_MASTER::S3D_MASTER( EDA_ITEM* aParent ) :
EDA_ITEM( aParent, NOT_USED )
{
m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0;
m_lastTransparency = 0.0;
m_3D_Drawings = NULL;
m_Materials = NULL;
m_ShapeType = FILE3D_NONE;
......
This diff is collapsed.
......@@ -35,7 +35,7 @@
#include <3d_draw_basic_functions.h>
// Imported function:
extern void Set_Object_Data( std::vector<S3D_VERTEX>& aVertices, double aBiuTo3DUnits );
extern void TransfertToGLlist( std::vector<S3D_VERTEX>& aVertices, double aBiuTo3DUnits );
extern void CheckGLError();
// Number of segments to approximate a circle by segments
......@@ -116,7 +116,7 @@ static void Draw3D_VerticalPolygonalCylinder( const CPOLYGONS_LIST& aPolysList,
coords[3].y = coords[2].y; // only z change
// Creates the GL_QUAD
Set_Object_Data( coords, aBiuTo3DUnits );
TransfertToGLlist( coords, aBiuTo3DUnits );
}
}
......
This diff is collapsed.
......@@ -31,7 +31,7 @@
#include <common.h>
#include <macros.h>
#include <kicad_string.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <3d_viewer.h>
#include <info3d_visu.h>
......
......@@ -109,6 +109,10 @@ public:
private:
wxString m_Shape3DName; /* 3D shape name in 3D library */
FILE3D_TYPE m_ShapeType;
double m_lastTransparency; // last transparency value from
// last material in use
bool m_loadTransparentObjects;
bool m_loadNonTransparentObjects;
public:
S3D_MASTER( EDA_ITEM* aParent );
......@@ -117,11 +121,41 @@ public:
S3D_MASTER* Next() const { return (S3D_MASTER*) Pnext; }
S3D_MASTER* Back() const { return (S3D_MASTER*) Pback; }
// Accessors
void SetLastTransparency( double aValue ) { m_lastTransparency = aValue; }
void SetLoadTransparentObjects( bool aLoad )
{ m_loadTransparentObjects = aLoad; }
void SetLoadNonTransparentObjects( bool aLoad )
{ m_loadNonTransparentObjects = aLoad; }
void Insert( S3D_MATERIAL* aMaterial );
/**
* Function IsOpenGlAllowed
* @return true if opengl current list accepts a gl data
* used to filter transparent objects, which are drawn after
* non transparent objects
*/
bool IsOpenGlAllowed();
void Copy( S3D_MASTER* pattern );
/**
* Function ReadData
* Select the parser to read the 3D data file (vrml, x3d ...)
* and build the description objects list
*/
int ReadData();
void Set_Object_Coords( std::vector< S3D_VERTEX >& aVertices );
/**
* Function ObjectCoordsTo3DUnits
* @param aVertices = a list of 3D coordinates in shape units
* to convert to 3D canvas units, according to the
* footprint 3Dshape rotation, offset and scale parameters
*/
void ObjectCoordsTo3DUnits( std::vector< S3D_VERTEX >& aVertices );
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
......@@ -147,6 +181,13 @@ public:
*/
const wxString GetShape3DFullFilename();
/**
* Function SetShape3DName
* @param aShapeName = file name of the data file relative to the 3D shape
*
* Set the filename of the 3D shape, and depending on the file extention
* (vrl, x3d, idf ) the type of file.
*/
void SetShape3DName( const wxString& aShapeName );
};
......
......@@ -166,13 +166,22 @@ void EDA_3D_FRAME::CreateMenuBar()
wxMenu * gridlistMenu = new wxMenu;
AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
_( "3D Grid" ), KiBitmap( grid_xpm ) );
gridlistMenu->Append( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString, true );
gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
gridlistMenu->Append( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString, true );
gridlistMenu->Append( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString, true );
// If the grid is on, check the corresponding menuitem showing the grid size
if( g_Parm_3D_Visu.GetFlag( FL_GRID ) )
{
gridlistMenu->Check( ID_MENU3D_GRID_10_MM, g_Parm_3D_Visu.m_3D_Grid == 10.0 );
gridlistMenu->Check( ID_MENU3D_GRID_5_MM, g_Parm_3D_Visu.m_3D_Grid == 5.0 );
gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, g_Parm_3D_Visu.m_3D_Grid == 2.5 );
gridlistMenu->Check( ID_MENU3D_GRID_1_MM, g_Parm_3D_Visu.m_3D_Grid == 1.0 );
}
else
gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
prefsMenu->AppendSeparator();
......
......@@ -30,7 +30,7 @@
#ifndef __3D_VIEWER_H__
#define __3D_VIEWER_H__
#include <wxstruct.h> // for EDA_BASE_FRAME.
#include <draw_frame.h>
#if !wxUSE_GLCANVAS
#error Please build wxWidgets with Opengl support (./configure --with-opengl)
......@@ -53,24 +53,29 @@
#include <3d_struct.h>
#define KISYS3DMOD "KISYS3DMOD"
class EDA_3D_CANVAS;
class PCB_BASE_FRAME;
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
#define LIB3D_PATH wxT( "packages3d" )
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS)
#define LIB3D_PATH wxT( "packages3d" )
class EDA_3D_FRAME : public EDA_BASE_FRAME
class EDA_3D_FRAME : public KIWAY_PLAYER
{
private:
EDA_3D_CANVAS* m_canvas;
bool m_reloadRequest;
wxString m_defaultFileName; /// Filename to propose for screenshot
/// Tracks whether to use Orthographic or Perspective projection
bool m_ortho;
public:
EDA_3D_FRAME( PCB_BASE_FRAME* parent, const wxString& title,
EDA_3D_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle,
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
~EDA_3D_FRAME()
{
m_auimgr.UnInit();
......@@ -78,6 +83,8 @@ public:
PCB_BASE_FRAME* Parent() { return (PCB_BASE_FRAME*)GetParent(); }
BOARD* GetBoard();
/**
* Function ReloadRequest
* must be called when reloading data from Pcbnew is needed
......@@ -93,8 +100,10 @@ public:
* Function NewDisplay
* Rebuild the display list.
* must be called when 3D opengl data is modified
* @param aGlList = the list to rebuild.
* if 0 (default) all lists are rebuilt
*/
void NewDisplay();
void NewDisplay( GLuint aGlList = 0 );
void SetDefaultFileName(const wxString &aFn) { m_defaultFileName = aFn; }
const wxString &GetDefaultFileName() const { return m_defaultFileName; }
......@@ -121,8 +130,9 @@ private:
// to the current display options
void ReCreateMainToolbar();
void SetToolbars();
void GetSettings();
void SaveSettings();
void LoadSettings( wxConfigBase* aCfg ); // overload virtual
void SaveSettings( wxConfigBase* aCfg ); // overload virtual
// Other functions
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
......
......@@ -74,7 +74,6 @@ enum DISPLAY3D_FLG {
FL_LAST
};
class INFO3D_VISU
{
public:
......
......@@ -37,7 +37,7 @@
class S3D_MASTER;
class S3D_VERTEX;
extern void Set_Object_Data( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits );
extern void TransfertToGLlist( std::vector< S3D_VERTEX >& aVertices, double aBiuTo3DUnits );
class S3D_MODEL_PARSER;
class X3D_MODEL_PARSER;
......
......@@ -519,8 +519,12 @@ int VRML_MODEL_PARSER::readGeometry( FILE* file, int* LineNum )
vertices.push_back( vertex );
}
GetMaster()->Set_Object_Coords( vertices );
Set_Object_Data( vertices, vrmlunits_to_3Dunits );
if( GetMaster()->IsOpenGlAllowed() )
{
GetMaster()->ObjectCoordsTo3DUnits( vertices );
TransfertToGLlist( vertices, vrmlunits_to_3Dunits );
}
vertices.clear();
coordIndex.clear();
}
......
......@@ -479,8 +479,11 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode,
vertices.push_back( triplets.at( *id ) );
}
GetMaster()->Set_Object_Coords( vertices );
Set_Object_Data( vertices, vrmlunits_to_3Dunits );
if( GetMaster()->IsOpenGlAllowed() )
{
GetMaster()->ObjectCoordsTo3DUnits( vertices );
TransfertToGLlist( vertices, vrmlunits_to_3Dunits );
}
vertices.clear();
coordIndex.clear();
......
......@@ -23,8 +23,9 @@ set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
# reports.
#
option( USE_KIWAY_DLLS
"Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." OFF )
#option( USE_KIWAY_DLLS "Build the major modules as KIFACE DLLs or DSOs, will soon be the norm." ON )
set( USE_KIWAY_DLLS true ) # this is now mandatory, the code is the same anyways, the old code is gone.
# The desire is to migrate designs *away from* case independence, and to create designs which use
# literally (case specific) interpreted component names. But for backwards compatibility,
......@@ -81,7 +82,7 @@ mark_as_advanced( KICAD_SKIP_BOOST ) # Normal builders should build Boost.
# when not defined by user, the default is python.exe under Windows and python2 for others
# python binary file should be is exec path.
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF )
option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
# This can be set to a custom name to brag about a particular branch in the "About" dialog:
set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." )
......@@ -115,6 +116,12 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
OUTPUT_VARIABLE GCC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( TO_LINKER -XLinker )
else()
set( TO_LINKER -Wl )
endif()
# Establish -Wall early, so specialized relaxations of this may come
# subsequently on the command line, such as in pcbnew/github/CMakeLists.txt
set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" )
......@@ -150,10 +157,17 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif()
find_package( OpenMP QUIET )
if( OPENMP_FOUND )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
add_definitions( -DUSE_OPENMP )
# MinGW does not include the OpenMP link library and FindOpenMP.cmake does not
# set it either. Not sure this is the most elegant solution but it works.
if( MINGW )
set( OPENMP_LIBRARIES gomp )
endif()
endif()
if( MINGW )
......@@ -189,19 +203,14 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PIC_FLAG}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PIC_FLAG}" )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( TO_LINKER -XLinker )
else()
set( TO_LINKER -Wl )
endif()
# Thou shalt not link vaporware and tell us it's a valid DSO (apple ld doesn't support it)
if( NOT APPLE )
set( CMAKE_SHARED_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${TO_LINKER},--no-undefined" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
endif()
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
endif()
# quiet GCC while in boost
......@@ -215,16 +224,16 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" )
# Allows .dylib relocation in the future
# Allows .dylib relocation in the future - needed by fixbundle
set( CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -headerpad_max_install_names")
if( NOT CMAKE_CXX_COMPILER )
EXEC_PROGRAM( wx-config ARGS --cc OUTPUT_VARIABLE CMAKE_C_COMPILER )
endif( NOT CMAKE_CXX_COMPILER )
endif()
if( NOT CMAKE_CXX_COMPILER )
EXEC_PROGRAM( wx-config ARGS --cxx OUTPUT_VARIABLE CMAKE_CXX_COMPILER )
endif( NOT CMAKE_CXX_COMPILER )
endif()
endif()
......@@ -340,7 +349,7 @@ include( ExternalProject )
include( CheckFindPackageResult )
# Turn on wxWidgets compatibility mode for some classes
add_definitions(-DWX_COMPATIBILITY)
add_definitions( -DWX_COMPATIBILITY )
#######################
# Find OpenGL library #
......@@ -348,6 +357,12 @@ add_definitions(-DWX_COMPATIBILITY)
find_package( OpenGL QUIET )
check_find_package_result( OPENGL_FOUND "OpenGL" )
# Dick 5-Feb-2014:
# Marco: We cannot use both ExternalProject_Add() add and find_package()
# in the same CMake tree and have them both reference the same package:
# http://stackoverflow.com/questions/6351609/cmake-linking-to-library-downloaded-from-externalproject-add
# https://www.mail-archive.com/cmake@cmake.org/msg47501.html
# Handle target used to specify if a target needs wx-widgets or other libraries
# Always defined, empty if no libraries are to be build
add_custom_target( lib-dependencies )
......@@ -380,8 +395,8 @@ if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC )
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES )
message(STATUS "Scripting ENABLED")
message(STATUS "Scripting ENABLED")
include( download_wxpython )
set( SWIG_EXECUTABLE ${SWIG_ROOT}/bin/swig )
......@@ -439,14 +454,18 @@ endif( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC)
#####################
# Find GLEW library #
#####################
find_package(GLEW)
check_find_package_result(GLEW_FOUND "GLEW")
if( NOT GLEW_FOUND )
find_package( GLEW )
check_find_package_result( GLEW_FOUND "GLEW" )
endif()
######################
# Find Cairo library #
######################
find_package(Cairo 1.8.1 QUIET)
check_find_package_result(CAIRO_FOUND "Cairo")
if( NOT CAIRO_FOUND )
find_package( Cairo 1.8.1 QUIET )
check_find_package_result( CAIRO_FOUND "Cairo" )
endif()
# Download boost and possibly build parts of it
#################################################
......@@ -458,6 +477,8 @@ if( KICAD_SKIP_BOOST )
message( FATAL_ERROR "Boost 1.54+ libraries are required." )
endif()
add_custom_target( boost ) # it is required to meet some further dependencies
message( WARNING "
WARNING: You decided to skip building boost library.
KiCad developers strongly advise you to build the bundled boost library, as it is known to work with KiCad.
......@@ -482,8 +503,8 @@ else()
endif()
if( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) )
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
endif( NOT (KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC) )
check_find_package_result( wxWidgets_FOUND "wxWidgets" )
endif()
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
......@@ -531,15 +552,15 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
set( PythonInterp_FIND_VERSION 2.6 )
set( PythonLibs_FIND_VERSION 2.6 )
endif()
# force a python version < 3.0
set( PythonInterp_FIND_VERSION 2.6)
set( PythonLibs_FIND_VERSION 2.6 )
find_package( PythonInterp )
check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
if( NOT PYTHON_VERSION_MAJOR EQUAL 2 )
message( FATAL_ERROR "Python 2.x is required." )
endif()
......
......@@ -59,7 +59,9 @@ set( BOOST_LIBS_BUILT
)
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
......@@ -99,7 +101,7 @@ else()
endif()
if( MINGW )
if( MINGW AND NOT CMAKE_HOST_UNIX ) # building for MINGW on windows not UNIX
if( MSYS )
# The Boost system does not build properly on MSYS using bootstrap.sh. Running
# bootstrap.bat with cmd.exe does. It's ugly but it works. At least for Boost
......@@ -113,14 +115,16 @@ if( MINGW )
set( b2_libs ${b2_libs} --with-${lib} )
endforeach()
unset( BOOST_CFLAGS )
else()
string( REGEX REPLACE "\\;" "," libs_csv "${boost_libs_list}" )
#message( STATUS "libs_csv:${libs_csv}" )
set( bootstrap ./bootstrap.sh --with-libraries=${libs_csv} )
# pass to *both* C and C++ compilers
set( BOOST_CFLAGS "cflags=${PIC_FLAG}" )
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
set( BOOST_CFLAGS "cflags=${PIC_FLAG}" )
set( BOOST_CXXFLAGS "cxxflags=${PIC_FLAG}" )
set( BOOST_INCLUDE "${BOOST_ROOT}/include" )
unset( b2_libs )
endif()
......
......@@ -33,7 +33,9 @@ set( CAIRO_ROOT "${PROJECT_SOURCE_DIR}/cairo_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/cairo )
......@@ -42,7 +44,7 @@ if ( KICAD_BUILD_STATIC )
endif( KICAD_BUILD_STATIC )
if (APPLE)
if (APPLE)
set( CAIRO_CFLAGS "CFLAGS=" )
set( CAIRO_LDFLAGS "LDFLAGS=-framework CoreServices -framework Cocoa" )
......@@ -94,8 +96,14 @@ ExternalProject_Add( cairo
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${CAIRO_ROOT}"
INSTALL_COMMAND $(MAKE) install
)
# match these with whatever FindCairo.cmake sets
# Dick i'vent set it because /lib and /lib64 issue in non multiarch binaries OSs
#set( CAIRO_FOUND true )
set( CAIRO_INCLUDE_DIR ${CAIRO_ROOT}/include )
set( CAIRO_LIBRARIES ${CAIRO_ROOT}/lib )
......@@ -33,11 +33,13 @@ set( GLEW_ROOT "${PROJECT_SOURCE_DIR}/glew_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/glew )
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set( GLEW_CFLAGS "CFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( GLEW_LDFLAGS "LDFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
......
......@@ -33,13 +33,15 @@ set( PIXMAN_ROOT "${PROJECT_SOURCE_DIR}/pixman_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/pixman )
set(PIXMAN_CPPFLAGS "CFLAGS=")
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5")
else()
......
......@@ -33,7 +33,9 @@ set( PKGCONFIG_ROOT "${PROJECT_SOURCE_DIR}/pkgconfig_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/pkgconfig )
......
......@@ -46,6 +46,10 @@ if (APPLE)
STRING(REGEX REPLACE " -arch " "," LIBWXPYTHON_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
SET( LIBWXPYTHON_OPTS ${LIBWXPYTHON_OPTS} --mac_arch=${LIBWXPYTHON_ARCHITECTURES})
endif( CMAKE_OSX_ARCHITECTURES )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
SET( LIBWXPYTHON_PRECMD export CFLAGS=-Qunused-arguments && )
endif()
endif(APPLE)
if ( KICAD_BUILD_STATIC )
......@@ -74,7 +78,7 @@ ExternalProject_Add( libwxpython
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBWXPYTHON_ROOT}"
COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --clean
CONFIGURE_COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS}
CONFIGURE_COMMAND ${LIBWXPYTHON_PRECMD} ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS}
#BINARY_DIR "${PREFIX}"
......
......@@ -33,11 +33,13 @@ set( LIBWX_ROOT "${PROJECT_SOURCE_DIR}/libwx_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/libwx )
if (APPLE)
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
STRING(REGEX REPLACE " -arch " "," LIBWX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
SET( LIBWX_ARCHITECTURES --enable-universal_binary=${LIBWX_ARCHITECTURES})
......@@ -80,7 +82,7 @@ ExternalProject_Add( libwx
#SET directories
set(wxWidgets_BIN_DIR ${LIBWX_ROOT}/bin)
set(wxWidgets_CONFIG_EXECUTABLE ${LIBWX_ROOT}/bin/wx-config)
set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include)
set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include)
set(wxWidgets_LIBRARY_DIRS ${LIBWX_ROOT}/lib)
......@@ -110,7 +112,7 @@ ExternalProject_Add_Step( libwx bzr_init_libwx
######
ExternalProject_Add_Step( libwx libwx_recursive_message
COMMAND cmake .
COMMAND cmake .
COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad"
DEPENDEES install
)
......
KIWAY Build Symbols, Definitions and Intentions
COMPILING_DLL:
This is a signal to import_export.h, and when present, toggles the
interpretation of the #defines in that file. Its purpose should not be
extended beyond this.
USE_KIWAY_DLLS:
Comes from CMake as a user configuration variable, settable in the Cmake
user interface. It decides if KiCad will be built with the *.kiface program
modules.
BUILD_KIWAY_DLL:
Comes from CMake, but at the 2nd tier, not the top tier. By 2nd tier,
something like pcbnew/CMakeLists.txt, not /CMakeLists.txt is meant. It is
not a user configuration variable. Instead, the 2nd tier CMakeLists.txt file
looks at the top level USE_KIWAY_DLLS and decides how the object files under
the 2nd tier's control will be built. If it decides it wants to march in
lockstep with USE_KIWAY_DLLS, then this local CMakeLists.txt file may pass a
defined BUILD_KIWAY_DLL (singular) on the compiler command line to the
pertinent set of compilation steps under its control.
......@@ -5,8 +5,7 @@ Last Revised: 28-Feb-2010
Kicad needs wxWidgets, the multi platform G.U.I.
Known problems:
wxMSW:
*DO NOT* use wxMSW.2.8.1
in fact: use wxWidgets >= 2.9.3
use *only* wxWidgets >= 3.0
wxGTK
Use wxWidgets 2.8.10 or later
......@@ -21,15 +20,6 @@ So use a very recent version (>= 2.8.10 (that also solve other bugs)
wxWidgets patch:
wxMSW, version 2.8.x
Some zoom values smaller than 3 to 5 create artifacts on screen, mainly values < 1.
(corresponding to draw scale factor > 1 )
See http://trac.wxwidgets.org/ticket/9554 (and 11669).
This is fixed in version 2.9.3
wxWidgets 2.9.1 (all platforms)
Has a problem when using the built in string to double conversion:
In countries using a comm instead of a point as floating number separator
......@@ -41,7 +31,7 @@ Use a version >= 2.9.3
*************************************************************************************
wxGTK version: All
wxGTK version: All before wxWidgets 3.0
*************************************************************************************
Patch for printing wide traces that were shown with missing rounded end caps.
Without this patch, printing boards and schematics under Linux, and perhaps OSX
......@@ -57,3 +47,10 @@ Add after this line:
PsPrint( "1 setlinecap\n" );
PsPrint("%%EndSetup\n");
Known bug on Windows:
Postscript printers print tracks like tin line.
It happens only for PS drivers, and PDF printer.
Other drivers (PCL for instance) work fine,
so it is unlikely a bug inside Kicad/wxWidgets
......@@ -62,7 +62,11 @@ PCBNew
Dick's Final TODO List:
======================
*) Get licensing cleaned up.
*) DLL-ization of pcbnew & eeschema
http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/
https://blueprints.launchpad.net/kicad/+spec/modular-kicad
*) Get licensing cleaned up.
*) DLL-ization of pcbnew & eeschema
http://www.eevblog.com/forum/open-source-kicad-geda/seriously-irritated-with-the-library-editor!/
https://blueprints.launchpad.net/kicad/+spec/modular-kicad
Issues as a result of minimal testing:
Kicad project manager will crash when requesting help file.
include_directories(BEFORE ${INC_BEFORE})
include_directories( BEFORE ${INC_BEFORE} )
include_directories(
../potrace
../common
${INC_AFTER}
)
set(BITMAP2COMPONENT_SRCS
set( BITMAP2COMPONENT_SRCS
../common/single_top.cpp
bitmap2component.cpp
bitmap2cmp_gui_base
bitmap2cmp_gui
)
if(WIN32)
if(MINGW)
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler(bitmap2component)
else(MINGW)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc)
endif(MINGW)
endif(WIN32)
set_source_files_properties( ../common/single_top.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=0"
)
set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
COMPILE_DEFINITIONS "COMPILING_DLL"
)
add_executable( bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES}
)
if(APPLE)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE bitmap2component.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component)
endif(APPLE)
target_link_libraries( bitmap2component
common
polygon
bitmaps
${wxWidgets_LIBRARIES}
potrace
)
install( TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
add_executable(bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES})
if( false ) # linker map with cross reference
set_target_properties( bitmap2component PROPERTIES
LINK_FLAGS "${TO_LINKER},-cref ${TO_LINKER},-Map=bitmap2component.map"
)
endif()
if(APPLE)
set_target_properties(bitmap2component PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
if( MINGW )
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler( bitmap2component )
else()
set( BITMAP2COMPONENT_RESOURCES bitmap2component.rc )
endif()
target_link_libraries( bitmap2component common polygon bitmaps
${wxWidgets_LIBRARIES}
potrace
)
install(TARGETS bitmap2component
DESTINATION ${KICAD_BIN}
COMPONENT binary)
if( APPLE )
set( BITMAP2COMPONENT_RESOURCES bitmap2component.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/bitmap2component.icns" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE bitmap2component.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.bitmap2component )
set_target_properties( bitmap2component PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
endif()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Nov 5 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class KIWAY_PLAYER;
#include "kiway_player.h"
#include <wx/scrolwin.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
......@@ -22,6 +25,7 @@
#include <wx/icon.h>
#include <wx/notebook.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/button.h>
......@@ -37,7 +41,7 @@
///////////////////////////////////////////////////////////////////////////////
/// Class BM2CMP_FRAME_BASE
///////////////////////////////////////////////////////////////////////////////
class BM2CMP_FRAME_BASE : public wxFrame
class BM2CMP_FRAME_BASE : public KIWAY_PLAYER
{
private:
......@@ -47,15 +51,21 @@ class BM2CMP_FRAME_BASE : public wxFrame
wxScrolledWindow* m_GreyscalePicturePanel;
wxScrolledWindow* m_BNPicturePanel;
wxPanel* m_panelRight;
wxStaticText* m_staticTextSizeX;
wxStaticText* m_staticTextSize;
wxStaticText* m_SizeXValue;
wxStaticText* m_SizeXunits;
wxStaticText* m_staticTextSizeY;
wxStaticText* m_SizeYValue;
wxStaticText* m_SizeYunits;
wxStaticText* m_SizePixUnits;
wxStaticText* m_staticTextSize1;
wxStaticText* m_SizeXValue_mm;
wxStaticText* m_SizeYValue_mm;
wxStaticText* m_Size_mmxUnits;
wxStaticText* m_staticTextBPP;
wxStaticText* m_BPPValue;
wxStaticText* m_BPPunits;
wxStaticText* m_staticTextBPI;
wxTextCtrl* m_DPIValueX;
wxTextCtrl* m_DPIValueY;
wxStaticText* m_DPI_Units;
wxButton* m_buttonLoad;
wxButton* m_buttonExport;
wxRadioBox* m_radioBoxFormat;
......@@ -66,6 +76,9 @@ class BM2CMP_FRAME_BASE : public wxFrame
// Virtual event handlers, overide them in your derived class
virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); }
virtual void UpdatePPITextValueX( wxMouseEvent& event ) { event.Skip(); }
virtual void OnResolutionChange( wxCommandEvent& event ) { event.Skip(); }
virtual void UpdatePPITextValueY( wxMouseEvent& event ) { event.Skip(); }
virtual void OnLoadFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnExport( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOptionsSelection( wxCommandEvent& event ) { event.Skip(); }
......
......@@ -138,12 +138,12 @@ BITMAPCONV_INFO::BITMAPCONV_INFO()
}
int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat )
int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
int aFormat, int aDpi_X, int aDpi_Y )
{
potrace_param_t* param;
potrace_state_t* st;
// set tracing parameters, starting from defaults
param = potrace_param_default();
if( !param )
......@@ -171,8 +171,8 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFo
{
case 4:
info.m_Format = KICAD_LOGO;
info.m_ScaleX = 1e3 * 25.4 / 300; // the conversion scale from PPI to micro
info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom
info.m_ScaleX = 1e3 * 25.4 / aDpi_X; // the conversion scale from PPI to micro
info.m_ScaleY = 1e3 * 25.4 / aDpi_Y; // Y axis is top to bottom
info.CreateOutputFile();
break;
......@@ -186,22 +186,22 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFo
case 2:
info.m_Format = EESCHEMA_FMT;
info.m_ScaleX = 1000.0 / 300; // the conversion scale from PPI to UI
info.m_ScaleY = -info.m_ScaleX; // Y axis is bottom to Top for components in libs
info.m_ScaleX = 1000.0 / aDpi_X; // the conversion scale from PPI to UI
info.m_ScaleY = -1000.0 / aDpi_Y; // Y axis is bottom to Top for components in libs
info.CreateOutputFile();
break;
case 1:
info.m_Format = PCBNEW_KICAD_MOD;
info.m_ScaleX = 1e6 * 25.4 / 300; // the conversion scale from PPI to UI
info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom in modedit
info.m_ScaleX = 1e6 * 25.4 / aDpi_X; // the conversion scale from PPI to UI
info.m_ScaleY = 1e6 * 25.4 / aDpi_Y; // Y axis is top to bottom in modedit
info.CreateOutputFile();
break;
case 0:
info.m_Format = PCBNEW_LEGACY_EMP;
info.m_ScaleX = 10000.0 / 300; // the conversion scale
info.m_ScaleY = info.m_ScaleX; // Y axis is top to bottom in modedit
info.m_ScaleX = 10000.0 / aDpi_X; // the conversion scale
info.m_ScaleY = 10000.0 / aDpi_Y; // Y axis is top to bottom in modedit
info.CreateOutputFile();
break;
......
......@@ -66,6 +66,48 @@ if( WIN32 AND MSYS )
add_definitions( -DGLEW_STATIC )
endif()
# A shared library subsetted from common which restricts what can go into
# a single_top link image. By not linking to common, we control what does
# statically go into single_top link images. My current thinking is that only
# wxWidgets should be a shared link from single top, everything else should be
# statically bound into it. Otherwise you will have DSO loading problems. After it
# sets the LIB PATHS however, we want the *.kiface modules to use shared linking.
add_library( singletop STATIC EXCLUDE_FROM_ALL
confirm.cpp
eda_doc.cpp
kiway.cpp
kiway_holder.cpp
)
# A shared library used by multiple *.kiface files and one or two program
# launchers. Object files can migrate into here over time, but only if they are
# surely needed and certainly used from more than one place without recompilation.
# Functions and data all need to use the #include <import_export.h> and be declared
# as APIEXPORT
set( LIB_KICAD_SRCS
colors.cpp
dlist.cpp
string.cpp
)
if( future )
add_library( lib_kicad SHARED
)
target_link_libraries( lib_kicad
${wxWidgets_LIBRARIES}
)
set_target_properties( lib_kicad PROPERTIES
OUTPUT_NAME ki
)
install( TARGETS lib_kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
endif()
set( COMMON_ABOUT_DLG_SRCS
dialog_about/AboutDialog_main.cpp
dialog_about/dialog_about.cpp
......@@ -93,11 +135,13 @@ set( COMMON_PAGE_LAYOUT_SRCS
)
set( COMMON_SRCS
${LIB_KICAD_SRCS}
${COMMON_ABOUT_DLG_SRCS}
${COMMON_PAGE_LAYOUT_SRCS}
base_struct.cpp
basicframe.cpp
bezier_curves.cpp
bin_mod.cpp
bitmap.cpp
block_commande.cpp
build_version.cpp
......@@ -107,6 +151,7 @@ set( COMMON_SRCS
class_marker_base.cpp
class_plotter.cpp
class_undoredo_container.cpp
colors.cpp
common.cpp
common_plot_functions.cpp
common_plotHPGL_functions.cpp
......@@ -115,13 +160,13 @@ set( COMMON_SRCS
common_plotGERBER_functions.cpp
common_plotDXF_functions.cpp
common_plotSVG_functions.cpp
config_params.cpp
confirm.cpp
copy_to_clipboard.cpp
dialog_shim.cpp
displlst.cpp
dlist.cpp
drawframe.cpp
drawpanel.cpp
draw_frame.cpp
draw_panel.cpp
drawtxt.cpp
dsnlexer.cpp
eda_dde.cpp
......@@ -134,16 +179,19 @@ set( COMMON_SRCS
hotkeys_basic.cpp
hotkey_grid_table.cpp
html_messagebox.cpp
kiface_i.cpp
kiway.cpp
kiway_holder.cpp
msgpanel.cpp
netlist_keywords.cpp
newstroke_font.cpp
projet_config.cpp
project.cpp
ptree.cpp
reporter.cpp
richio.cpp
search_stack.cpp
selcolor.cpp
string.cpp
systemdirsappend.cpp
trigo.cpp
utf8.cpp
wildcards_and_files_ext.cpp
......@@ -153,9 +201,11 @@ set( COMMON_SRCS
zoom.cpp
)
# We will not want edaappl.cpp linked into the KIFACE, only into the KIWAY.
if( TRUE OR NOT USE_KIWAY_DLLS )
list( APPEND COMMON_SRCS edaappl.cpp )
#if( NOT USE_KIWAY_DLLS )
# We DO NOT want pgm_base.cpp linked into the KIFACE, only into the KIWAY.
# Check the map files to verify eda_pgm.o not being linked in.
list( APPEND COMMON_SRCS pgm_base.cpp )
endif()
if( NOT HAVE_STRTOKR )
......@@ -184,11 +234,10 @@ set( COMMON_SRCS
geometry/shape_collisions.cpp
geometry/shape_index.cpp
)
add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common lib-dependencies )
set( PCB_COMMON_SRCS
base_screen.cpp
eda_text.cpp
......
......@@ -197,7 +197,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed )
* otherwise the actual value is rounded when read from dialog and converted
* in internal units, and therefore modified.
*/
wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
wxString StringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol )
{
double value_to_print = To_User_Unit( aUnit, aValue );
......@@ -257,7 +257,7 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymb
void PutValueInLocalUnits( wxTextCtrl& aTextCtr, int aValue )
{
wxString msg = ReturnStringFromValue( g_UserUnit, aValue );
wxString msg = StringFromValue( g_UserUnit, aValue );
aTextCtr.SetValue( msg );
}
......@@ -286,7 +286,7 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue )
}
int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
int ValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
{
double value;
double dtmp = 0;
......@@ -348,21 +348,21 @@ int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue )
}
int ReturnValueFromString( const wxString& aTextValue )
int ValueFromString( const wxString& aTextValue )
{
int value;
value = ReturnValueFromString( g_UserUnit, aTextValue);
value = ValueFromString( g_UserUnit, aTextValue);
return value;
}
int ReturnValueFromTextCtrl( const wxTextCtrl& aTextCtr )
int ValueFromTextCtrl( const wxTextCtrl& aTextCtr )
{
int value;
wxString msg = aTextCtr.GetValue();
value = ReturnValueFromString( g_UserUnit, msg );
value = ValueFromString( g_UserUnit, msg );
return value;
}
......
This diff is collapsed.
#include <wx/config.h>
#include <bin_mod.h>
#include <online_help.h>
BIN_MOD::BIN_MOD( const char* aName ) :
m_name( aName ),
m_config( 0 )
{
}
void BIN_MOD::Init()
{
// do an OS specific wxConfig instantiation, using the bin_mod (EXE/DLL/DSO) name.
m_config = new wxConfig( wxString::FromUTF8( m_name ) );
m_history.Load( *m_config );
// Prepare On Line Help. Use only lower case for help file names, in order to
// avoid problems with upper/lower case file names under windows and unix.
#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML
m_help_file = wxString::FromUTF8( m_name ) + wxT( ".html" );
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
m_help_file = wxString::FromUTF8( m_name ) + wxT( ".pdf" );
#else
#error Help files format not defined
#endif
}
void BIN_MOD::End()
{
if( m_config )
{
m_history.Save( *m_config );
// Deleting a wxConfigBase writes its contents to disk if changed.
// Might be NULL if called twice, in which case nothing happens.
delete m_config;
m_config = 0;
}
}
BIN_MOD::~BIN_MOD()
{
End();
}
......@@ -29,7 +29,7 @@
#include <fctsys.h>
#include <gr_basic.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <common.h>
#include <macros.h>
#include <base_struct.h>
......
#include <colors.h>
/**
* The predefined colors used in KiCad.
* Please: if you change a value, remember these values are carefully chosen
* to have good results in Pcbnew, that uses the ORed value of basic colors
* when displaying superimposed objects
* This list must have exactly NBCOLORS items
*/
const StructColors g_ColorRefs[NBCOLORS] =
{
{ 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY },
{ 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY },
{ 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY },
{ 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE },
{ 255, 255, 255, WHITE, wxT( "White" ), WHITE },
{ 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE },
{ 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE },
{ 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN },
{ 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN },
{ 0, 0, 72, DARKRED, wxT( "Red 1" ), RED },
{ 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA },
{ 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN },
{ 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE },
{ 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN },
{ 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN },
{ 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED },
{ 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA },
{ 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW },
{ 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, },
{ 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN },
{ 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN },
{ 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED },
{ 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA },
{ 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW },
{ 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE },
{ 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE },
{ 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE },
{ 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE },
{ 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE },
{ 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE },
};
EDA_COLOR_T ColorByName( const wxString& aName )
{
// look for a match in the palette itself
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
if( 0 == aName.CmpNoCase( g_ColorRefs[trying].m_Name ) )
return trying;
}
// Not found, no idea...
return UNSPECIFIED_COLOR;
}
bool ColorIsLight( EDA_COLOR_T aColor )
{
const StructColors &c = g_ColorRefs[ColorGetBase( aColor )];
int r = c.m_Red;
int g = c.m_Green;
int b = c.m_Blue;
return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3);
}
EDA_COLOR_T ColorFindNearest( const wxColour &aColor )
{
return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() );
}
EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB )
{
EDA_COLOR_T candidate = BLACK;
/* Find the 'nearest' color in the palette. This is fun. There is
a gazilion of metrics for the color space and no one of the
useful one is in the RGB color space. Who cares, this is a CAD,
not a photosomething...
I hereby declare that the distance is the sum of the square of the
component difference. Think about the RGB color cube. Now get the
euclidean distance, but without the square root... for ordering
purposes it's the same, obviously. Also each component can't be
less of the target one, since I found this currently work better...
*/
int nearest_distance = 255 * 255 * 3 + 1; // Can't beat this
for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) )
{
const StructColors &c = g_ColorRefs[trying];
int distance = (aR - c.m_Red) * (aR - c.m_Red) +
(aG - c.m_Green) * (aG - c.m_Green) +
(aB - c.m_Blue) * (aB - c.m_Blue);
if( distance < nearest_distance && c.m_Red >= aR &&
c.m_Green >= aG && c.m_Blue >= aB )
{
nearest_distance = distance;
candidate = trying;
}
}
return candidate;
}
EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 )
{
/* Memoization storage. This could be potentially called for each
* color merge so a cache is useful (there are few colours anyway) */
static EDA_COLOR_T mix_cache[NBCOLORS][NBCOLORS];
// TODO how is alpha used? it's a mac only thing, I have no idea
aColor1 = ColorGetBase( aColor1 );
aColor2 = ColorGetBase( aColor2 );
// First easy thing: a black gives always the other colour
if( aColor1 == BLACK )
return aColor2;
if( aColor2 == BLACK)
return aColor1;
/* Now we are sure that black can't occur, so the rule is:
* BLACK means not computed yet. If we're lucky we already have
* an answer */
EDA_COLOR_T candidate = mix_cache[aColor1][aColor2];
if( candidate != BLACK )
return candidate;
// Blend the two colors (i.e. OR the RGB values)
const StructColors &c1 = g_ColorRefs[aColor1];
const StructColors &c2 = g_ColorRefs[aColor2];
// Ask the palette for the nearest color to the mix
wxColour mixed( c1.m_Red | c2.m_Red,
c1.m_Green | c2.m_Green,
c1.m_Blue | c2.m_Blue );
candidate = ColorFindNearest( mixed );
/* Here, BLACK is *not* a good answer, since it would recompute the next time.
* Even theorically its not possible (with the current rules), but
* maybe the metric will change in the future */
if( candidate == BLACK)
candidate = DARKDARKGRAY;
// Store the result in the cache. The operation is commutative, too
mix_cache[aColor1][aColor2] = candidate;
mix_cache[aColor2][aColor1] = candidate;
return candidate;
}
......@@ -65,48 +65,6 @@ EDA_UNITS_T g_UserUnit;
EDA_COLOR_T g_GhostColor;
/**
* The predefined colors used in KiCad.
* Please: if you change a value, remember these values are carefully chosen
* to have good results in Pcbnew, that uses the ORed value of basic colors
* when displaying superimposed objects
* This list must have exactly NBCOLORS items
*/
const StructColors g_ColorRefs[NBCOLORS] =
{
{ 0, 0, 0, BLACK, wxT( "Black" ), DARKDARKGRAY },
{ 72, 72, 72, DARKDARKGRAY, wxT( "Gray 1" ), DARKGRAY },
{ 132, 132, 132, DARKGRAY, wxT( "Gray 2" ), LIGHTGRAY },
{ 194, 194, 194, LIGHTGRAY, wxT( "Gray 3" ), WHITE },
{ 255, 255, 255, WHITE, wxT( "White" ), WHITE },
{ 194, 255, 255, LIGHTYELLOW, wxT( "L.Yellow" ), WHITE },
{ 72, 0, 0, DARKBLUE, wxT( "Blue 1" ), BLUE },
{ 0, 72, 0, DARKGREEN, wxT( "Green 1" ), GREEN },
{ 72, 72, 0, DARKCYAN, wxT( "Cyan 1" ), CYAN },
{ 0, 0, 72, DARKRED, wxT( "Red 1" ), RED },
{ 72, 0, 72, DARKMAGENTA, wxT( "Magenta 1" ), MAGENTA },
{ 0, 72, 72, DARKBROWN, wxT( "Brown 1" ), BROWN },
{ 132, 0, 0, BLUE, wxT( "Blue 2" ), LIGHTBLUE },
{ 0, 132, 0, GREEN, wxT( "Green 2" ), LIGHTGREEN },
{ 132, 132, 0, CYAN, wxT( "Cyan 2" ), LIGHTCYAN },
{ 0, 0, 132, RED, wxT( "Red 2" ), LIGHTRED },
{ 132, 0, 132, MAGENTA, wxT( "Magenta 2" ), LIGHTMAGENTA },
{ 0, 132, 132, BROWN, wxT( "Brown 2" ), YELLOW },
{ 194, 0, 0, LIGHTBLUE, wxT( "Blue 3" ), PUREBLUE, },
{ 0, 194, 0, LIGHTGREEN, wxT( "Green 3" ), PUREGREEN },
{ 194, 194, 0, LIGHTCYAN, wxT( "Cyan 3" ), PURECYAN },
{ 0, 0, 194, LIGHTRED, wxT( "Red 3" ), PURERED },
{ 194, 0, 194, LIGHTMAGENTA, wxT( "Magenta 3" ), PUREMAGENTA },
{ 0, 194, 194, YELLOW, wxT( "Yellow 3" ), PUREYELLOW },
{ 255, 0, 0, PUREBLUE, wxT( "Blue 4" ), WHITE },
{ 0, 255, 0, PUREGREEN, wxT( "Green 4" ), WHITE },
{ 255, 255, 0, PURECYAN, wxT( "Cyan 4" ), WHITE },
{ 0, 0, 255, PURERED, wxT( "Red 4" ), WHITE },
{ 255, 0, 255, PUREMAGENTA, wxT( "Magenta 4" ), WHITE },
{ 0, 255, 255, PUREYELLOW, wxT( "Yellow 4" ), WHITE },
};
/**
* Function to use local notation or C standard notation for floating point numbers
* some countries use 1,5 and others (and C) 1.5
......
......@@ -28,7 +28,7 @@
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <trigo.h>
#include <wxstruct.h>
#include <base_struct.h>
......
......@@ -211,34 +211,34 @@ void PSLIKE_PLOTTER::fputsPostscriptString(FILE *fout, const wxString& txt)
putc( '(', fout );
for( unsigned i = 0; i < txt.length(); i++ )
{
// Lazyness made me use stdio buffering yet another time...
wchar_t ch = txt[i];
if( ch < 256 )
{
switch (ch)
{
// The ~ shouldn't reach the outside
case '~':
break;
// These characters must be escaped
case '(':
case ')':
case '\\':
putc( '\\', fout );
// FALLTHRU
default:
putc( ch, fout );
break;
}
}
// Lazyness made me use stdio buffering yet another time...
wchar_t ch = txt[i];
if( ch < 256 )
{
switch (ch)
{
// The ~ shouldn't reach the outside
case '~':
break;
// These characters must be escaped
case '(':
case ')':
case '\\':
putc( '\\', fout );
// FALLTHRU
default:
putc( ch, fout );
break;
}
}
}
putc( ')', fout );
}
/**
* Sister function for the ReturnGraphicTextWidth in drawtxt.cpp
* Sister function for the GraphicTextWidth in drawtxt.cpp
* Does the same processing (i.e. calculates a text string width) but
* using postscript metrics for the Helvetica font (optionally used for
* PS and PDF plotting
......@@ -303,7 +303,7 @@ void PSLIKE_PLOTTER::postscriptOverlinePositions( const wxString& aText, int aXS
}
void PS_PLOTTER::SetViewport( const wxPoint& aOffset, double aIusPerDecimil,
double aScale, bool aMirror )
double aScale, bool aMirror )
{
wxASSERT( !outputFile );
m_plotMirror = aMirror;
......@@ -354,31 +354,31 @@ void PSLIKE_PLOTTER::computeTextParameters( const wxPoint& aPos,
switch( aH_justify )
{
case GR_TEXT_HJUSTIFY_CENTER:
dx = -tw / 2;
break;
dx = -tw / 2;
break;
case GR_TEXT_HJUSTIFY_RIGHT:
dx = -tw;
break;
dx = -tw;
break;
case GR_TEXT_HJUSTIFY_LEFT:
dx = 0;
break;
dx = 0;
break;
}
switch( aV_justify )
{
case GR_TEXT_VJUSTIFY_CENTER:
dy = th / 2;
break;
dy = th / 2;
break;
case GR_TEXT_VJUSTIFY_TOP:
dy = th;
break;
break;
case GR_TEXT_VJUSTIFY_BOTTOM:
dy = 0;
break;
dy = 0;
break;
}
RotatePoint( &dx, &dy, aOrient );
......@@ -620,7 +620,7 @@ void PS_PLOTTER::PenTo( const wxPoint& pos, char plume )
}
if( penState != plume || pos != penLastpos )
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
DPOINT pos_dev = userToDeviceCoordinates( pos );
fprintf( outputFile, "%g %g %sto\n",
pos_dev.x, pos_dev.y,
( plume=='D' ) ? "line" : "move" );
......@@ -650,39 +650,39 @@ bool PS_PLOTTER::StartPlot()
static const char* PSMacro[] =
{
"%%BeginProlog\n"
"/line { newpath moveto lineto stroke } bind def\n",
"/cir0 { newpath 0 360 arc stroke } bind def\n",
"/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/arc0 { newpath arc stroke } bind def\n",
"/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/poly0 { stroke } bind def\n",
"/poly1 { closepath gsave fill grestore stroke } bind def\n",
"/poly2 { closepath gsave fill grestore stroke } bind def\n",
"/rect0 { rectstroke } bind def\n",
"/rect1 { rectfill } bind def\n",
"/rect2 { rectfill } bind def\n",
"/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n",
"/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n",
"/dashedline { [200] 100 setdash } bind def\n",
"/solidline { [] 0 setdash } bind def\n",
// This is for 'hidden' text (search anchors for PDF)
"%%BeginProlog\n"
"/line { newpath moveto lineto stroke } bind def\n",
"/cir0 { newpath 0 360 arc stroke } bind def\n",
"/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def\n",
"/arc0 { newpath arc stroke } bind def\n",
"/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill\n",
" grestore stroke } bind def\n",
"/poly0 { stroke } bind def\n",
"/poly1 { closepath gsave fill grestore stroke } bind def\n",
"/poly2 { closepath gsave fill grestore stroke } bind def\n",
"/rect0 { rectstroke } bind def\n",
"/rect1 { rectfill } bind def\n",
"/rect2 { rectfill } bind def\n",
"/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def\n",
"/linemode1 { 1 setlinecap 1 setlinejoin } bind def\n",
"/dashedline { [200] 100 setdash } bind def\n",
"/solidline { [] 0 setdash } bind def\n",
// This is for 'hidden' text (search anchors for PDF)
"/phantomshow { moveto\n",
" /KicadFont findfont 0.000001 scalefont setfont\n",
" show } bind def\n",
" show } bind def\n",
// This is for regular postscript text
"/textshow { gsave\n",
" findfont exch scalefont setfont concat 1 scale 0 0 moveto show\n",
" } bind def\n",
// Utility for getting Latin1 encoded fonts
"/reencodefont {\n",
// Utility for getting Latin1 encoded fonts
"/reencodefont {\n",
" findfont dup length dict begin\n",
" { 1 index /FID ne\n",
" { def }\n",
......@@ -692,13 +692,13 @@ bool PS_PLOTTER::StartPlot()
" currentdict\n",
" end } bind def\n"
// Remap AdobeStandard fonts to Latin1
"/KicadFont /Helvetica reencodefont definefont pop\n",
"/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n",
"/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n",
"/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n",
"%%EndProlog\n",
NULL
// Remap AdobeStandard fonts to Latin1
"/KicadFont /Helvetica reencodefont definefont pop\n",
"/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop\n",
"/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop\n",
"/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop\n",
"%%EndProlog\n",
NULL
};
time_t time1970 = time( NULL );
......@@ -726,8 +726,8 @@ bool PS_PLOTTER::StartPlot()
psPaperSize.Set( pageInfo.GetHeightMils(), pageInfo.GetWidthMils() );
fprintf( outputFile, "%%%%BoundingBox: 0 0 %d %d\n",
(int) ceil( psPaperSize.x * BIGPTsPERMIL ),
(int) ceil( psPaperSize.y * BIGPTsPERMIL ) );
(int) ceil( psPaperSize.x * BIGPTsPERMIL ),
(int) ceil( psPaperSize.y * BIGPTsPERMIL ) );
// Specify the size of the sheet and the name associated with that size.
// (If the "User size" option has been selected for the sheet size,
......@@ -775,9 +775,9 @@ bool PS_PLOTTER::StartPlot()
// within the Document Structuring Convention.
fputs( "%%Page: 1 1\n"
"%%BeginPageSetup\n"
"gsave\n"
"0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates
"linemode1\n", outputFile );
"gsave\n"
"0.0072 0.0072 scale\n" // Configure postscript for decimils coordinates
"linemode1\n", outputFile );
// Rototranslate the coordinate to achieve the landscape layout
......@@ -803,7 +803,7 @@ bool PS_PLOTTER::EndPlot()
wxASSERT( outputFile );
fputs( "showpage\n"
"grestore\n"
"%%EOF\n", outputFile );
"%%EOF\n", outputFile );
fclose( outputFile );
outputFile = NULL;
......@@ -813,15 +813,15 @@ bool PS_PLOTTER::EndPlot()
void PS_PLOTTER::Text( const wxPoint& aPos,
enum EDA_COLOR_T aColor,
const wxString& aText,
double aOrient,
const wxSize& aSize,
enum EDA_TEXT_HJUSTIFY_T aH_justify,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold )
enum EDA_COLOR_T aColor,
const wxString& aText,
double aOrient,
const wxSize& aSize,
enum EDA_TEXT_HJUSTIFY_T aH_justify,
enum EDA_TEXT_VJUSTIFY_T aV_justify,
int aWidth,
bool aItalic,
bool aBold )
{
SetCurrentLineWidth( aWidth );
SetColor( aColor );
......@@ -874,7 +874,7 @@ void PS_PLOTTER::Text( const wxPoint& aPos,
if( m_textMode == PLOTTEXTMODE_PHANTOM )
{
fputsPostscriptString( outputFile, aText );
DPOINT pos_dev = userToDeviceCoordinates( aPos );
DPOINT pos_dev = userToDeviceCoordinates( aPos );
fprintf( outputFile, " %g %g phantomshow\n",
pos_dev.x, pos_dev.y );
}
......
......@@ -34,7 +34,7 @@
#include <class_drawpanel.h>
#include <class_base_screen.h>
#include <confirm.h>
#include <wxstruct.h>
#include <draw_frame.h>
static bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame );
......
......@@ -21,7 +21,7 @@
#include <bitmaps.h>
#include <wxstruct.h>
#include <common.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <build_version.h>
......@@ -41,7 +41,7 @@ static wxString HtmlNewline( const unsigned int amount = 1 );
static void InitKiCadAboutNew( AboutAppInfo& info )
{
// Set application specific icon
const wxTopLevelWindow * const tlw = wxDynamicCast(::wxGetApp().GetTopWindow(), wxTopLevelWindow);
const wxTopLevelWindow* const tlw = wxDynamicCast( Pgm().App().GetTopWindow(), wxTopLevelWindow);
if( tlw )
info.SetIcon( tlw->GetIcon() );
......@@ -56,10 +56,10 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
}
/* Set title */
info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) );
info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) );
/* Copyright information */
info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) );
info.SetCopyright( wxT( "(C) 1992-2014 KiCad Developers Team" ) );
/* KiCad build version */
wxString version;
......
......@@ -24,12 +24,22 @@
*/
#include <dialog_shim.h>
#include <kiway_player.h>
DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style, const wxString& name ) :
wxDialog( aParent, id, title, pos, size, style, name )
wxDialog( aParent, id, title, pos, size, style, name ),
KIWAY_HOLDER( 0 )
{
// pray that aParent is either a KIWAY_PLAYER or DIALOG_SHIM derivation.
KIWAY_HOLDER* h = dynamic_cast<KIWAY_HOLDER*>( aParent );
wxASSERT_MSG( h,
wxT( "DIALOG_SHIM's parent not derived from KIWAY_PLAYER nor DIALOG_SHIM" ) );
if( h )
SetKiway( this, &h->Kiway() );
#if DLGSHIM_USE_SETFOCUS
Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHIM::onInit ) );
#endif
......
......@@ -5,7 +5,7 @@
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <dialog_get_component.h>
......
......@@ -28,7 +28,7 @@
#include <algorithm>
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <common.h>
#include <dialog_hotkeys_editor.h>
......@@ -202,7 +202,7 @@ void HOTKEYS_EDITOR_DIALOG::OnRightClickOnCell( wxGridEvent& event )
wxString keyname = wxGetSingleChoice( _( "Special keys only. For others keys, use keyboard" ),
_( "Select a key" ), C_COUNT, choices, this );
int key = ReturnKeyCodeFromKeyName( keyname );
int key = KeyCodeFromKeyName( keyname );
if( key == 0 )
return;
......@@ -251,7 +251,7 @@ void HOTKEYS_EDITOR_DIALOG::OnKeyPressed( wxKeyEvent& event )
#endif
// See if this key code is handled in hotkeys names list
bool exists;
ReturnKeyNameFromKeyCode( key, &exists );
KeyNameFromKeyCode( key, &exists );
if( !exists ) // not handled, see hotkeys_basic.cpp
{
......
......@@ -33,7 +33,7 @@
#include <base_struct.h>
#include <class_drawpanel.h>
#include <class_title_block.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <worksheet_shape_builder.h>
#include <class_base_screen.h>
#include <wildcards_and_files_ext.h>
......
......@@ -29,7 +29,7 @@
#include <fctsys.h>
#include <macros.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <kicad_string.h>
#include <dialog_helpers.h>
......
......@@ -28,7 +28,8 @@
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <gr_basic.h>
#include <common.h>
#include <bitmaps.h>
......@@ -38,7 +39,7 @@
#include <class_drawpanel_gal.h>
#include <class_base_screen.h>
#include <msgpanel.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <confirm.h>
#include <kicad_device_context.h>
#include <dialog_helpers.h>
......@@ -89,12 +90,12 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME )
END_EVENT_TABLE()
EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent,
EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent,
ID_DRAWFRAME_TYPE aFrameType,
const wxString& aTitle,
const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString & aFrameName ) :
EDA_BASE_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName )
KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName )
{
m_drawToolBar = NULL;
m_optionsToolBar = NULL;
......@@ -564,7 +565,7 @@ void EDA_DRAW_FRAME::SetPrevGrid()
}
int EDA_DRAW_FRAME::ReturnBlockCommand( int key )
int EDA_DRAW_FRAME::BlockCommand( int key )
{
return 0;
}
......@@ -615,25 +616,21 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
}
void EDA_DRAW_FRAME::LoadSettings()
void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
{
wxASSERT( wxGetApp().GetSettings() != NULL );
EDA_BASE_FRAME::LoadSettings( aCfg );
wxConfig* cfg = wxGetApp().GetSettings();
aCfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 );
EDA_BASE_FRAME::LoadSettings();
cfg->Read( m_FrameName + CursorShapeEntryKeyword, &m_cursorShape, ( long )0 );
bool btmp;
if ( cfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) )
if( aCfg->Read( m_FrameName + ShowGridEntryKeyword, &btmp ) )
SetGridVisibility( btmp );
int itmp;
if( cfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) )
if( aCfg->Read( m_FrameName + GridColorEntryKeyword, &itmp ) )
SetGridColor( ColorFromInt( itmp ) );
cfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
aCfg->Read( m_FrameName + LastGridSizeIdKeyword, &m_LastGridSizeId, 0L );
// m_LastGridSizeId is an offset, expected to be >= 0
if( m_LastGridSizeId < 0 )
......@@ -641,17 +638,14 @@ void EDA_DRAW_FRAME::LoadSettings()
}
void EDA_DRAW_FRAME::SaveSettings()
void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
{
wxASSERT( wxGetApp().GetSettings() != NULL );
wxConfig* cfg = wxGetApp().GetSettings();
EDA_BASE_FRAME::SaveSettings( aCfg );
EDA_BASE_FRAME::SaveSettings();
cfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape );
cfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() );
cfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() );
cfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
aCfg->Write( m_FrameName + CursorShapeEntryKeyword, m_cursorShape );
aCfg->Write( m_FrameName + ShowGridEntryKeyword, IsGridVisible() );
aCfg->Write( m_FrameName + GridColorEntryKeyword, ( long ) GetGridColor() );
aCfg->Write( m_FrameName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
}
......@@ -715,7 +709,7 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, int aKey, const wxPoint& aPosi
if( ( Block->GetCommand() != BLOCK_IDLE ) || ( Block->GetState() != STATE_NO_BLOCK ) )
return false;
Block->SetCommand( (BLOCK_COMMAND_T) ReturnBlockCommand( aKey ) );
Block->SetCommand( (BLOCK_COMMAND_T) BlockCommand( aKey ) );
if( Block->GetCommand() == 0 )
return false;
......
......@@ -28,7 +28,8 @@
*/
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <gr_basic.h>
#include <common.h>
#include <macros.h>
......@@ -36,7 +37,7 @@
#include <class_drawpanel.h>
#include <class_drawpanel_gal.h>
#include <class_base_screen.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <kicad_device_context.h>
......@@ -45,16 +46,17 @@ static const int CURSOR_SIZE = 12; ///< Cursor size in pixels
#define CLIP_BOX_PADDING 2
// keys to store options in config:
#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" )
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )
#define ENBL_ZOOM_NO_CENTER_KEY wxT( "ZoomNoCenter" )
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )
/* Definitions for enabling and disabling debugging features in drawpanel.cpp.
* Please don't forget to turn these off before making any commits to Launchpad.
*/
// Definitions for enabling and disabling debugging features in drawpanel.cpp.
// Please don't forget to turn these off before making any commits to Launchpad.
#define DEBUG_SHOW_CLIP_RECT 0 // Set to 1 to draw clipping rectangle.
/**
* Trace mask used to enable or disable the trace output of coordinates during drawing
* functions. The coordinate dumping can be turned on by setting the WXTRACE environment
......@@ -122,12 +124,14 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
m_mouseCaptureCallback = NULL;
m_endMouseCaptureCallback = NULL;
if( wxGetApp().GetSettings() )
wxConfigBase* cfg = Kiface().KifaceSettings();
if( cfg )
{
wxGetApp().GetSettings()->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false );
wxGetApp().GetSettings()->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false );
wxGetApp().GetSettings()->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false );
wxGetApp().GetSettings()->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true );
cfg->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false );
cfg->Read( ENBL_ZOOM_NO_CENTER_KEY, &m_enableZoomNoCenter, false );
cfg->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false );
cfg->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true );
}
m_requestAutoPan = false;
......@@ -149,10 +153,15 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
{
wxGetApp().GetSettings()->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan );
wxGetApp().GetSettings()->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter );
wxGetApp().GetSettings()->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits );
wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
wxConfigBase* cfg = Kiface().KifaceSettings();
if( cfg )
{
cfg->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan );
cfg->Write( ENBL_ZOOM_NO_CENTER_KEY, m_enableZoomNoCenter );
cfg->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits );
cfg->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
}
}
......
......@@ -161,7 +161,7 @@ static const char* GetHersheyShapeDescription( int AsciiCode )
}
int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth )
int GraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth )
{
int tally = 0;
int char_count = aText.length();
......@@ -315,7 +315,7 @@ void DrawGraphicText( EDA_RECT* aClipBox,
current_char_pos = aPos;
dx = ReturnGraphicTextWidth( aText, size_h, aItalic, aWidth );
dx = GraphicTextWidth( aText, size_h, aItalic, aWidth );
dy = size_v;
/* Do not draw the text if out of draw area! */
......
......@@ -4,7 +4,7 @@
#include <fctsys.h>
#include <eda_dde.h>
#include <wxstruct.h>
#include <draw_frame.h>
#include <id.h>
#include <common.h>
#include <macros.h>
......
This diff is collapsed.
......@@ -94,7 +94,7 @@ EDA_TEXT::~EDA_TEXT()
int EDA_TEXT::LenSize( const wxString& aLine ) const
{
return ReturnGraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold );
return GraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold );
}
/**
......
......@@ -38,7 +38,7 @@
#include <fctsys.h>
#include <common.h>
#include <macros.h>
#include <appl_wxstruct.h>
#include <pgm_base.h>
#include <wildcards_and_files_ext.h>
#include <footprint_info.h>
#include <io_mgr.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment