diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index a9fef2425e..09078a2cc8 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -180,6 +180,8 @@ set( KICOMMON_SRCS grid_tricks.cpp widgets/aui_json_serializer.cpp widgets/bitmap_button.cpp + widgets/grid_icon_text_helpers.cpp + widgets/grid_text_button_helpers.cpp widgets/grid_text_helpers.cpp widgets/html_window.cpp widgets/indicator_icon.cpp @@ -217,8 +219,11 @@ set( KICOMMON_SRCS dpi_scaling.cpp dpi_scaling_common.cpp dsnlexer.cpp + eda_doc.cpp eda_pattern_match.cpp eda_units.cpp + embedded_files.cpp + env_paths.cpp env_vars.cpp exceptions.cpp gestfich.cpp @@ -538,8 +543,6 @@ set( COMMON_WIDGET_SRCS widgets/grid_checkbox.cpp widgets/grid_color_swatch_helpers.cpp widgets/grid_combobox.cpp - widgets/grid_icon_text_helpers.cpp - widgets/grid_text_button_helpers.cpp widgets/wx_infobar.cpp widgets/layer_box_selector.cpp widgets/layer_presentation.cpp @@ -686,14 +689,11 @@ set( COMMON_SRCS gr_text.cpp eda_base_frame.cpp eda_dde.cpp - eda_doc.cpp eda_draw_frame.cpp eda_group.cpp eda_item.cpp eda_shape.cpp eda_text.cpp - embedded_files.cpp - env_paths.cpp executable_names.cpp filename_resolver.cpp file_history.cpp diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp index fdb241a002..50008d2f9e 100644 --- a/common/eda_doc.cpp +++ b/common/eda_doc.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/include/eda_doc.h b/include/eda_doc.h index 431a567d0d..5e0dee08b3 100644 --- a/include/eda_doc.h +++ b/include/eda_doc.h @@ -31,6 +31,8 @@ #ifndef __INCLUDE__EDA_DOC_H__ #define __INCLUDE__EDA_DOC_H__ 1 +#include + class EMBEDDED_FILES; /** @@ -44,7 +46,7 @@ class EMBEDDED_FILES; * @param aDocName filename of file to open (Full filename or short filename). * @param aPaths Additional paths to search for local disk datasheet files */ -bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT* aProject, +bool KICOMMON_API GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT* aProject, SEARCH_STACK* aPaths = nullptr, std::vector aFilesStack = {} ); diff --git a/include/embedded_files.h b/include/embedded_files.h index 1c7e08d8ca..56d1f46959 100644 --- a/include/embedded_files.h +++ b/include/embedded_files.h @@ -29,6 +29,7 @@ #include #include #include +#include class OUTPUTFORMATTER; @@ -37,7 +38,7 @@ namespace KIFONT class OUTLINE_FONT; } -class EMBEDDED_FILES +class KICOMMON_API EMBEDDED_FILES { public: struct EMBEDDED_FILE diff --git a/include/embedded_files_parser.h b/include/embedded_files_parser.h index 7e4718c32d..a34df60b81 100644 --- a/include/embedded_files_parser.h +++ b/include/embedded_files_parser.h @@ -21,8 +21,9 @@ #include #include +#include -class EMBEDDED_FILES_PARSER : public EMBEDDED_FILES_LEXER +class KICOMMON_API EMBEDDED_FILES_PARSER : public EMBEDDED_FILES_LEXER { public: EMBEDDED_FILES_PARSER( LINE_READER* aReader ) : diff --git a/include/env_paths.h b/include/env_paths.h index 6879c9241e..5741b83c6e 100644 --- a/include/env_paths.h +++ b/include/env_paths.h @@ -31,6 +31,7 @@ #include #include +#include class wxFileName; class PROJECT; @@ -44,7 +45,7 @@ class PROJECT; * @return Normalized full file path (path and file name) if succeeded or the input path if * the path could not be normalized. */ -wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, +wxString KICOMMON_API NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, const PROJECT* aProject ); /** @@ -56,7 +57,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars * @return Normalized full file path (path and file name) if succeeded or the input path if * the path could not be normalized. */ -wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, +wxString KICOMMON_API NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars, const wxString& aProjectPath ); /** @@ -68,7 +69,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars * @return Full path (path and file name) if the file was found in one of the paths, otherwise * an empty string. */ -wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars, +wxString KICOMMON_API ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars, const PROJECT* aProject ); #endif /* ENV_PATHS_H */ diff --git a/include/widgets/grid_icon_text_helpers.h b/include/widgets/grid_icon_text_helpers.h index 5459158a1b..f537e70e89 100644 --- a/include/widgets/grid_icon_text_helpers.h +++ b/include/widgets/grid_icon_text_helpers.h @@ -29,6 +29,7 @@ #include #include #include +#include class wxGrid; enum class BITMAPS : unsigned int; @@ -36,7 +37,7 @@ enum class BITMAPS : unsigned int; //---- Grid helpers: custom wxGridCellRenderer that renders icon and a label ------------ -class GRID_CELL_ICON_TEXT_RENDERER : public wxGridCellStringRenderer +class KICOMMON_API GRID_CELL_ICON_TEXT_RENDERER : public wxGridCellStringRenderer { public: /** @@ -71,7 +72,7 @@ private: // // Note: use with read only cells -class GRID_CELL_ICON_RENDERER : public wxGridCellRenderer +class KICOMMON_API GRID_CELL_ICON_RENDERER : public wxGridCellRenderer { public: GRID_CELL_ICON_RENDERER( const wxBitmap& icon ); @@ -90,7 +91,7 @@ private: // // Note: use with read only cells -class GRID_CELL_STATUS_ICON_RENDERER : public wxGridCellRenderer +class KICOMMON_API GRID_CELL_STATUS_ICON_RENDERER : public wxGridCellRenderer { public: GRID_CELL_STATUS_ICON_RENDERER( int aStatus ); @@ -112,7 +113,7 @@ private: // // Note: this implementation is an adaptation of wxGridCellChoiceEditor -class GRID_CELL_ICON_TEXT_POPUP : public wxGridCellEditor +class KICOMMON_API GRID_CELL_ICON_TEXT_POPUP : public wxGridCellEditor { public: GRID_CELL_ICON_TEXT_POPUP( const std::vector& icons, const wxArrayString& names ); diff --git a/include/widgets/grid_text_button_helpers.h b/include/widgets/grid_text_button_helpers.h index 4d40667c75..9872717acd 100644 --- a/include/widgets/grid_text_button_helpers.h +++ b/include/widgets/grid_text_button_helpers.h @@ -34,6 +34,7 @@ #include #include #include +#include class wxGrid; @@ -64,7 +65,7 @@ protected: }; -class GRID_CELL_FPID_EDITOR : public GRID_CELL_TEXT_BUTTON +class KICOMMON_API GRID_CELL_FPID_EDITOR : public GRID_CELL_TEXT_BUTTON { public: GRID_CELL_FPID_EDITOR( DIALOG_SHIM* aParent, const wxString& aSymbolNetlist, @@ -88,7 +89,7 @@ protected: }; -class GRID_CELL_URL_EDITOR : public GRID_CELL_TEXT_BUTTON +class KICOMMON_API GRID_CELL_URL_EDITOR : public GRID_CELL_TEXT_BUTTON { public: GRID_CELL_URL_EDITOR( DIALOG_SHIM* aParent, SEARCH_STACK* aSearchStack = nullptr, @@ -115,7 +116,7 @@ protected: /** * Editor for wxGrid cells that adds a file/folder browser to the grid input field */ -class GRID_CELL_PATH_EDITOR : public GRID_CELL_TEXT_BUTTON +class KICOMMON_API GRID_CELL_PATH_EDITOR : public GRID_CELL_TEXT_BUTTON { public: /** @@ -200,7 +201,7 @@ protected: * The function has the signature (int, int) -> void. The passed parameters are the (row, col) of the * clicked grid cell */ -class GRID_CELL_RUN_FUNCTION_EDITOR : public GRID_CELL_TEXT_BUTTON, public GRID_CELL_NULLABLE_INTERFACE +class KICOMMON_API GRID_CELL_RUN_FUNCTION_EDITOR : public GRID_CELL_TEXT_BUTTON, public GRID_CELL_NULLABLE_INTERFACE { public: GRID_CELL_RUN_FUNCTION_EDITOR( DIALOG_SHIM* aParent, const std::function aFunction,