Fix broken Doxygen comment specifiers.
Please note, ///> is not a valid Doxygen comment specifier. ///< is the correct specifier to use for single line or short Doxygen comments.
This commit is contained in:
parent
9f18fee124
commit
6ab1144ea3
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2016 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
static TOOL_ACTION toggleComments;
|
||||
static TOOL_ACTION toggleECO;
|
||||
|
||||
///> @copydoc COMMON_ACTIONS::TranslateLegacyId()
|
||||
///< @copydoc COMMON_ACTIONS::TranslateLegacyId()
|
||||
virtual OPT<TOOL_EVENT> TranslateLegacyId( int aId ) override { return OPT<TOOL_EVENT>(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Ian McInerney <ian.s.mcinerney at ieee.org>
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -72,19 +72,19 @@ public:
|
|||
SELECTION_CONDITION GridSize( GRID3D_TYPE aGridSize );
|
||||
|
||||
private:
|
||||
///> Helper function used by MaterialMode()
|
||||
///< Helper function used by MaterialMode()
|
||||
static bool materialModeFunction( const SELECTION& aSelection, BOARD_ADAPTER* aAdapter,
|
||||
MATERIAL_MODE aMaterial );
|
||||
|
||||
///> Helper function used by Flag()
|
||||
///< Helper function used by Flag()
|
||||
static bool flagFunction( const SELECTION& aSelection, BOARD_ADAPTER* aAdapter,
|
||||
DISPLAY3D_FLG aFlag );
|
||||
|
||||
///> Helper function used by GridDize()
|
||||
///< Helper function used by GridDize()
|
||||
static bool gridSizeFunction( const SELECTION& aSelection, BOARD_ADAPTER* aAdapter,
|
||||
GRID3D_TYPE aGridSize );
|
||||
|
||||
///> The board adapter to read the 3D viewer state from
|
||||
///< The board adapter to read the 3D viewer state from
|
||||
BOARD_ADAPTER* m_adapter;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
int ToggleVisibility( const TOOL_EVENT& aEvent );
|
||||
|
||||
private:
|
||||
///> Sets up handlers for various events.
|
||||
///< Sets up handlers for various events.
|
||||
void setTransitions() override;
|
||||
|
||||
int doZoomInOut( bool aDirection, bool aCenterOnCursor );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -100,7 +100,7 @@ private:
|
|||
void OnExportToFile( wxCommandEvent& event ) override;
|
||||
void OnExportToClipboard( wxCommandEvent& event ) override;
|
||||
|
||||
///> @return the EDA_UNITS from the m_PixelUnit choice
|
||||
///< @return the EDA_UNITS from the m_PixelUnit choice
|
||||
EDA_UNITS getUnitFromSelection();
|
||||
|
||||
// return a string giving the output size, according to the selected unit
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
||||
* Copyright (C) 2014-2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
void SetAppIcon( const wxIcon& aIcon ) { m_appIcon = aIcon; }
|
||||
wxIcon& GetAppIcon() { return m_appIcon; }
|
||||
|
||||
///> Wrapper to manage memory allocation for bitmaps
|
||||
///< Wrapper to manage memory allocation for bitmaps
|
||||
wxBitmap* CreateKiBitmap( BITMAP_DEF aBitmap )
|
||||
{
|
||||
m_bitmaps.emplace_back( KiBitmapNew( aBitmap ) );
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
|
||||
wxIcon m_appIcon;
|
||||
|
||||
///> Bitmaps to be freed when the dialog is closed
|
||||
///< Bitmaps to be freed when the dialog is closed
|
||||
std::vector<std::unique_ptr<wxBitmap>> m_bitmaps;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -27,9 +27,7 @@
|
|||
#include <eda_units.h>
|
||||
|
||||
/**
|
||||
* WX_HTML_REPORT_BOX
|
||||
*
|
||||
* A slimmed down version of WX_HTML_REPORT_PANEL
|
||||
* A slimmed down version of #WX_HTML_REPORT_PANEL
|
||||
*/
|
||||
class WX_HTML_REPORT_BOX : public wxHtmlWindow, public REPORTER
|
||||
{
|
||||
|
@ -60,7 +58,7 @@ private:
|
|||
// reports, but can be very slow for larger reports.
|
||||
bool m_immediateMode;
|
||||
|
||||
///> copy of the report, stored for filtering
|
||||
///< copy of the report, stored for filtering
|
||||
std::vector<wxString> m_messages;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 CERN
|
||||
* Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2015-2021 KiCad Developers, see change_log.txt for contributors.
|
||||
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
|
@ -30,8 +30,6 @@
|
|||
|
||||
|
||||
/**
|
||||
* WX_HTML_REPORT_PANEL
|
||||
*
|
||||
* A widget for browsing a rich text error/status report. Used in numerous
|
||||
* dialogs in eeschema and pcbnew. Provides error filtering functionality
|
||||
* and saving report files.
|
||||
|
@ -46,10 +44,10 @@ public:
|
|||
const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
|
||||
~WX_HTML_REPORT_PANEL();
|
||||
|
||||
///> Set the min size of the area which displays html messages:
|
||||
///< Set the min size of the area which displays html messages:
|
||||
void MsgPanelSetMinSize( const wxSize& aMinSize );
|
||||
|
||||
///> returns the reporter object that reports to this panel
|
||||
///< returns the reporter object that reports to this panel
|
||||
REPORTER& Reporter();
|
||||
|
||||
/**
|
||||
|
@ -61,43 +59,43 @@ public:
|
|||
void Report( const wxString& aText, SEVERITY aSeverity,
|
||||
REPORTER::LOCATION aLocation = REPORTER::LOC_BODY );
|
||||
|
||||
///> clears the report panel
|
||||
///< clears the report panel
|
||||
void Clear();
|
||||
|
||||
///> return the number of messages matching the given severity mask.
|
||||
///< return the number of messages matching the given severity mask.
|
||||
int Count( int severityMask );
|
||||
|
||||
///> sets the frame label
|
||||
///< sets the frame label
|
||||
void SetLabel( const wxString& aLabel ) override;
|
||||
|
||||
///> Sets the lasy update. If this mode is on, messages are stored but the display
|
||||
///> is not updated (Updating display can be very time consumming if there are many messages)
|
||||
///> A call to Flush() will be needed after build the report
|
||||
///< Sets the lasy update. If this mode is on, messages are stored but the display
|
||||
///< is not updated (Updating display can be very time consumming if there are many messages)
|
||||
///< A call to Flush() will be needed after build the report
|
||||
void SetLazyUpdate( bool aLazyUpdate );
|
||||
|
||||
///> Forces updating the HTML page, after the report is built in lazy mode
|
||||
///> If aSort = true, the body messages will be ordered by severity
|
||||
///< Forces updating the HTML page, after the report is built in lazy mode
|
||||
///< If aSort = true, the body messages will be ordered by severity
|
||||
void Flush( bool aSort = false );
|
||||
|
||||
///> Set the visible severity filter.
|
||||
///> if aSeverities < 0 the m_showAll option is set
|
||||
///< Set the visible severity filter.
|
||||
///< if aSeverities < 0 the m_showAll option is set
|
||||
void SetVisibleSeverities( int aSeverities );
|
||||
|
||||
///> @return the visible severity filter.
|
||||
///> If the m_showAll option is set, the mask is < 0
|
||||
///< @return the visible severity filter.
|
||||
///< If the m_showAll option is set, the mask is < 0
|
||||
int GetVisibleSeverities() const;
|
||||
|
||||
///> If true prints Info: at the beginning of each Info severity line (Default)
|
||||
///< If true prints Info: at the beginning of each Info severity line (Default)
|
||||
void SetPrintInfo( bool aPrintInfo );
|
||||
|
||||
///> @return the visible severity filter.
|
||||
///> If the m_showAll option is set, the mask is < 0
|
||||
///< @return the visible severity filter.
|
||||
///< If the m_showAll option is set, the mask is < 0
|
||||
void SetShowSeverity( SEVERITY aSeverity, bool aValue );
|
||||
|
||||
///> Set the report full file name to the string
|
||||
///< Set the report full file name to the string
|
||||
void SetFileName( const wxString& aReportFileName );
|
||||
|
||||
///> @return reference to the current report fill file name string.
|
||||
///< @return reference to the current report fill file name string.
|
||||
wxString& GetFileName( void );
|
||||
|
||||
|
||||
|
@ -128,27 +126,27 @@ private:
|
|||
|
||||
void onBtnSaveToFile( wxCommandEvent& event ) override;
|
||||
|
||||
///> copy of the report, stored for filtering
|
||||
///< copy of the report, stored for filtering
|
||||
REPORT_LINES m_report;
|
||||
|
||||
///> Lines to print at the very end of the report, regardless of sorting
|
||||
///< Lines to print at the very end of the report, regardless of sorting
|
||||
REPORT_LINES m_reportTail;
|
||||
|
||||
///> Lines to print at the very beginning of the report, regardless of sorting
|
||||
///< Lines to print at the very beginning of the report, regardless of sorting
|
||||
REPORT_LINES m_reportHead;
|
||||
|
||||
///> the reporter
|
||||
///< the reporter
|
||||
WX_HTML_PANEL_REPORTER m_reporter;
|
||||
|
||||
///> message severities to display (mask)
|
||||
///< message severities to display (mask)
|
||||
int m_severities;
|
||||
|
||||
bool m_lazyUpdate;
|
||||
|
||||
///> Print "Info:" at the front of Info messages (default)
|
||||
///< Print "Info:" at the front of Info messages (default)
|
||||
bool m_printInfo;
|
||||
|
||||
///> Use this as the filename instead of /bin/report.txt (default)
|
||||
///< Use this as the filename instead of /bin/report.txt (default)
|
||||
wxString m_reportFileName;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2012-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017 CERN
|
||||
* @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ typedef std::map<wxString, FOOTPRINT*> FOOTPRINT_MAP;
|
|||
typedef std::map<wxString, EINSTANCE*> EINSTANCE_MAP;
|
||||
typedef std::map<wxString, std::unique_ptr<EPART>> EPART_MAP;
|
||||
|
||||
///> Translates Eagle special characters to their counterparts in KiCad.
|
||||
///< Translates Eagle special characters to their counterparts in KiCad.
|
||||
wxString escapeName( const wxString& aNetName );
|
||||
|
||||
static inline wxXmlNode* getChildrenNodes( NODE_MAP& aMap, const wxString& aName )
|
||||
|
@ -63,8 +63,7 @@ static inline wxXmlNode* getChildrenNodes( NODE_MAP& aMap, const wxString& aName
|
|||
|
||||
|
||||
/**
|
||||
* XML_PARSER_ERROR
|
||||
* implements a simple wrapper around runtime_error to isolate the errors thrown by the
|
||||
* Implement a simple wrapper around runtime_error to isolate the errors thrown by the
|
||||
* Eagle XML parser.
|
||||
*/
|
||||
struct XML_PARSER_ERROR : std::runtime_error
|
||||
|
@ -97,8 +96,8 @@ struct TRIPLET
|
|||
|
||||
|
||||
/**
|
||||
* XPATH
|
||||
* keeps track of what we are working on within a PTREE.
|
||||
* Keep track of what we are working on within a PTREE.
|
||||
*
|
||||
* Then if an exception is thrown, the place within the tree that gave us
|
||||
* grief can be reported almost accurately. To minimally impact
|
||||
* speed, merely assign const char* pointers during the tree walking
|
||||
|
@ -165,8 +164,8 @@ public:
|
|||
|
||||
|
||||
/**
|
||||
* Function Convert
|
||||
* converts a wxString to a generic type T.
|
||||
* Convert a wxString to a generic type T.
|
||||
*
|
||||
* @param aValue is a wxString containing the value that will be converted to type T.
|
||||
* @throw XML_PARSER_ERROR - an exception is thrown if the parsing fails or if the conversion to
|
||||
* type T is unknown.
|
||||
|
@ -181,8 +180,8 @@ template <>
|
|||
wxString Convert<wxString>( const wxString& aValue );
|
||||
|
||||
/**
|
||||
* OPTIONAL_XML_ATTRIBUTE
|
||||
* models an optional XML attribute.
|
||||
* Model an optional XML attribute.
|
||||
*
|
||||
* This was implemented as an alternative to OPT. This class should be replaced with a
|
||||
* simple typedef per type using std::optional when C++17 is published.
|
||||
*/
|
||||
|
@ -198,8 +197,7 @@ private:
|
|||
|
||||
public:
|
||||
/**
|
||||
* Constructor OPTIONAL_XML_ATTRIBUTE
|
||||
* construct a default OPTIONAL_XML_ATTRIBUTE, whose data is not available.
|
||||
* Construct a default OPTIONAL_XML_ATTRIBUTE, whose data is not available.
|
||||
*/
|
||||
OPTIONAL_XML_ATTRIBUTE() :
|
||||
m_isAvailable( false ),
|
||||
|
@ -207,7 +205,6 @@ public:
|
|||
{}
|
||||
|
||||
/**
|
||||
* Constructor OPTIONAL_XML_ATTRIBUTE
|
||||
* @param aData is a wxString containing the value that should be converted to type T. If
|
||||
* aData is empty, the attribute is understood as unavailable; otherwise, the
|
||||
* conversion to T is tried.
|
||||
|
@ -222,7 +219,6 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructor OPTIONAL_XML_ATTRIBUTE
|
||||
* @param aData is the value of the XML attribute. If this constructor is called, the
|
||||
* attribute is available.
|
||||
*/
|
||||
|
@ -233,8 +229,7 @@ public:
|
|||
{}
|
||||
|
||||
/**
|
||||
* Operator bool
|
||||
* @return bool - the availability of the attribute.
|
||||
* @return bool the availability of the attribute.
|
||||
*/
|
||||
operator bool() const
|
||||
{
|
||||
|
@ -242,8 +237,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Assignment operator
|
||||
* to a string (optionally) containing the data.
|
||||
* Assign to a string (optionally) containing the data.
|
||||
*
|
||||
* @param aData is a wxString that should be converted to T. If the string is empty, the
|
||||
* attribute is set to unavailable.
|
||||
*/
|
||||
|
@ -258,8 +253,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Assignment operator
|
||||
* to an object of the base type containing the data.
|
||||
* Assign to an object of the base type containing the data.
|
||||
*
|
||||
* @param aData is the actual value of the attribute. Calling this assignment, the attribute
|
||||
* is automatically made available.
|
||||
*/
|
||||
|
@ -272,8 +267,6 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Equal operator
|
||||
* to an object of the base type.
|
||||
* @param aOther is the object of the base type that should be compared with this one.
|
||||
*/
|
||||
bool operator ==( const T& aOther ) const
|
||||
|
@ -282,8 +275,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function Set
|
||||
* tries to convert a string to the base type.
|
||||
* Attempt to convert a string to the base type.
|
||||
*
|
||||
* @param aString is the string that will be converted to the base type.
|
||||
*/
|
||||
void Set( const wxString& aString )
|
||||
|
@ -293,8 +286,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function Get
|
||||
* returns a reference to the value of the attribute assuming it is available.
|
||||
* Return a reference to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return T& - the value of the attribute.
|
||||
*/
|
||||
T& Get()
|
||||
|
@ -304,8 +297,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function CGet
|
||||
* returns a constant reference to the value of the attribute assuming it is available.
|
||||
* Return a constant reference to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return const T& - the value of the attribute.
|
||||
*/
|
||||
const T& CGet() const
|
||||
|
@ -315,8 +308,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Operator *
|
||||
* returns a reference to the value of the attribute assuming it is available.
|
||||
* Return a reference to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return T& - the value of the attribute.
|
||||
*/
|
||||
T& operator*()
|
||||
|
@ -325,8 +318,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Operator *
|
||||
* returns a constant reference to the value of the attribute assuming it is available.
|
||||
* Return a constant reference to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return const T& - the value of the attribute.
|
||||
*/
|
||||
const T& operator*() const
|
||||
|
@ -335,8 +328,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Operator ->
|
||||
* returns a pointer to the value of the attribute assuming it is available.
|
||||
* Return a pointer to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return T* - the value of the attribute.
|
||||
*/
|
||||
T* operator->()
|
||||
|
@ -345,8 +338,8 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Operator ->
|
||||
* returns a constant pointer to the value of the attribute assuming it is available.
|
||||
* Return a constant pointer to the value of the attribute assuming it is available.
|
||||
*
|
||||
* @return const T* - the value of the attribute.
|
||||
*/
|
||||
const T* operator->() const
|
||||
|
@ -357,15 +350,15 @@ public:
|
|||
|
||||
|
||||
/**
|
||||
* Function MapChildren
|
||||
* provides an easy access to the children of an XML node via their names.
|
||||
* Provide an easy access to the children of an XML node via their names.
|
||||
*
|
||||
* @param currentNode is a pointer to a wxXmlNode, whose children will be mapped.
|
||||
* @return NODE_MAP - a map linking the name of each children to the children itself (via a
|
||||
* @return NODE_MAP is a map linking the name of each children to the children itself (via a
|
||||
* wxXmlNode*)
|
||||
*/
|
||||
NODE_MAP MapChildren( wxXmlNode* aCurrentNode );
|
||||
|
||||
///> Convert an Eagle curve end to a KiCad center for S_ARC
|
||||
///< Convert an Eagle curve end to a KiCad center for S_ARC
|
||||
wxPoint ConvertArcCenter( const wxPoint& aStart, const wxPoint& aEnd, double aAngle );
|
||||
|
||||
// Pre-declare for typedefs
|
||||
|
@ -396,10 +389,10 @@ struct ECOORD
|
|||
EU_MIL, ///< mils/thous
|
||||
};
|
||||
|
||||
///> Value expressed in nanometers
|
||||
///< Value expressed in nanometers
|
||||
long long int value;
|
||||
|
||||
///> Unit used for the value field
|
||||
///< Unit used for the value field
|
||||
static constexpr EAGLE_UNIT ECOORD_UNIT = EU_NM;
|
||||
|
||||
ECOORD()
|
||||
|
@ -452,7 +445,7 @@ struct ECOORD
|
|||
return value == aOther.value;
|
||||
}
|
||||
|
||||
///> Converts a size expressed in a certain unit to nanometers.
|
||||
///< Converts a size expressed in a certain unit to nanometers.
|
||||
static long long int ConvertToNm( int aValue, enum EAGLE_UNIT aUnit );
|
||||
};
|
||||
|
||||
|
@ -594,10 +587,10 @@ struct ERECT
|
|||
|
||||
|
||||
/**
|
||||
* EATTR
|
||||
* parses an Eagle "attribute" XML element. Note that an attribute element
|
||||
* is different than an XML element attribute. The attribute element is a
|
||||
* full XML node in and of itself, and has attributes of its own. Blame Eagle.
|
||||
* Parse an Eagle "attribute" XML element.
|
||||
*
|
||||
* @note An attribute element is different than an XML element attribute. The attribute element
|
||||
* is a full XML node in and of itself, and has attributes of its own. Blame Eagle.
|
||||
*/
|
||||
struct EATTR
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -28,7 +28,7 @@
|
|||
using namespace KIGFX::PREVIEW;
|
||||
|
||||
|
||||
///> Snap an angle to the nearest 45 degrees
|
||||
///< Snap an angle to the nearest 45 degrees
|
||||
static double snapAngle( double aAngle )
|
||||
{
|
||||
return KiROUND( aAngle / M_PI_4 ) * M_PI_4;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Kicad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2017-2021 Kicad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -90,9 +90,9 @@ static double getTickLineWidth( const TEXT_DIMS& textDims, bool aDrawingDropShad
|
|||
*/
|
||||
struct TICK_FORMAT
|
||||
{
|
||||
double divisionBase; ///> multiple from the last scale
|
||||
int majorStep; ///> ticks between major ticks
|
||||
int midStep; ///> ticks between medium ticks (0 if no medium ticks)
|
||||
double divisionBase; ///< multiple from the last scale
|
||||
int majorStep; ///< ticks between major ticks
|
||||
int midStep; ///< ticks between medium ticks (0 if no medium ticks)
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2013-2020 KiCad Developers, see CHANGELOG.txt for contributors.
|
||||
* Copyright (C) 2013-2021 KiCad Developers, see CHANGELOG.txt for contributors.
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -43,7 +43,7 @@
|
|||
#include <wx/stc/stc.h>
|
||||
#include <kiplatform/app.h>
|
||||
|
||||
///> Stores information about a mouse button state
|
||||
///< Stores information about a mouse button state
|
||||
struct TOOL_DISPATCHER::BUTTON_STATE
|
||||
{
|
||||
BUTTON_STATE( TOOL_MOUSE_BUTTONS aButton, const wxEventType& aDownEvent,
|
||||
|
@ -57,45 +57,45 @@ struct TOOL_DISPATCHER::BUTTON_STATE
|
|||
dblClickEvent( aDblClickEvent )
|
||||
{};
|
||||
|
||||
///> Flag indicating that dragging is active for the given button.
|
||||
///< Flag indicating that dragging is active for the given button.
|
||||
bool dragging;
|
||||
|
||||
///> Flag indicating that the given button is pressed.
|
||||
///< Flag indicating that the given button is pressed.
|
||||
bool pressed;
|
||||
|
||||
///> Point where dragging has started (in world coordinates).
|
||||
///< Point where dragging has started (in world coordinates).
|
||||
VECTOR2D dragOrigin;
|
||||
|
||||
///> Point where click event has occurred.
|
||||
///< Point where click event has occurred.
|
||||
VECTOR2D downPosition;
|
||||
|
||||
///> Difference between drag origin point and current mouse position (expressed as distance in
|
||||
///> pixels).
|
||||
///< Difference between drag origin point and current mouse position (expressed as distance in
|
||||
///< pixels).
|
||||
double dragMaxDelta;
|
||||
|
||||
///> Determines the mouse button for which information are stored.
|
||||
///< Determines the mouse button for which information are stored.
|
||||
TOOL_MOUSE_BUTTONS button;
|
||||
|
||||
///> The type of wxEvent that determines mouse button press.
|
||||
///< The type of wxEvent that determines mouse button press.
|
||||
wxEventType downEvent;
|
||||
|
||||
///> The type of wxEvent that determines mouse button release.
|
||||
///< The type of wxEvent that determines mouse button release.
|
||||
wxEventType upEvent;
|
||||
|
||||
///> The type of wxEvent that determines mouse button double click.
|
||||
///< The type of wxEvent that determines mouse button double click.
|
||||
wxEventType dblClickEvent;
|
||||
|
||||
///> Time stamp for the last mouse button press event.
|
||||
///< Time stamp for the last mouse button press event.
|
||||
wxLongLong downTimestamp;
|
||||
|
||||
///> Restores initial state.
|
||||
///< Restores initial state.
|
||||
void Reset()
|
||||
{
|
||||
dragging = false;
|
||||
pressed = false;
|
||||
}
|
||||
|
||||
///> Checks the current state of the button.
|
||||
///< Checks the current state of the button.
|
||||
bool GetState() const
|
||||
{
|
||||
wxMouseState mouseState = wxGetMouseState();
|
||||
|
@ -251,6 +251,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Helper function to know if a special key ( see key list ) should be captured
|
||||
// or if the event can be skipped
|
||||
// on Linux, the event must be passed to the GUI if they are not used by KiCad,
|
||||
|
@ -279,6 +280,7 @@ bool isKeySpecialCode( int aKeyCode )
|
|||
return isInList;
|
||||
}
|
||||
|
||||
|
||||
// Helper function to know if a key should be managed by DispatchWxEvent()
|
||||
// or if the event can be ignored and skipped because the key is only a modifier
|
||||
// that is not used alone in kicad
|
||||
|
@ -430,7 +432,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
wxWindow* focus = wxWindow::FindFocus();
|
||||
|
||||
// Required in win32 to ensure wxTimer events get scheduled in between other events
|
||||
// Or else we may stall them out entirely and never get them during actions like rapid mouse moves
|
||||
// Or else we may stall them out entirely and never get them during actions like rapid
|
||||
// mouse moves.
|
||||
KIPLATFORM::APP::ForceTimerMessagesToBeCreatedIfNecessary();
|
||||
|
||||
wxEventType type = aEvent.GetEventType();
|
||||
|
@ -607,7 +610,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
// Not handled wxEVT_CHAR must be Skipped (sent to GUI).
|
||||
// Otherwise accelerators and shortcuts in main menu or toolbars are not seen.
|
||||
// Escape key presses are never skipped by the handler since they correspond to tool cancel
|
||||
// events, and if they aren't skipped then they are propagated to other frames (which we don't want).
|
||||
// events, and if they aren't skipped then they are propagated to other frames (which we
|
||||
// don't want).
|
||||
if( (type == wxEVT_CHAR || type == wxEVT_CHAR_HOOK)
|
||||
&& !keyIsSpecial
|
||||
&& !handled
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2018 CERN
|
||||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -144,8 +144,7 @@ struct TOOL_MANAGER::TOOL_STATE
|
|||
}
|
||||
|
||||
/**
|
||||
* Function Push()
|
||||
* Stores the current state of the tool on stack. Stacks are stored internally and are not
|
||||
* Store the current state of the tool on stack. Stacks are stored internally and are not
|
||||
* shared between different TOOL_STATE objects.
|
||||
*/
|
||||
void Push()
|
||||
|
@ -156,9 +155,9 @@ struct TOOL_MANAGER::TOOL_STATE
|
|||
}
|
||||
|
||||
/**
|
||||
* Function Pop()
|
||||
* Restores state of the tool from stack. Stacks are stored internally and are not
|
||||
* Restore state of the tool from stack. Stacks are stored internally and are not
|
||||
* shared between different TOOL_STATE objects.
|
||||
*
|
||||
* @return True if state was restored, false if the stack was empty.
|
||||
*/
|
||||
bool Pop()
|
||||
|
@ -179,10 +178,10 @@ struct TOOL_MANAGER::TOOL_STATE
|
|||
}
|
||||
|
||||
private:
|
||||
///> Stack preserving previous states of a TOOL.
|
||||
///< Stack preserving previous states of a TOOL.
|
||||
std::stack<std::unique_ptr<TOOL_STATE>> stateStack;
|
||||
|
||||
///> Restores the initial state.
|
||||
///< Restores the initial state.
|
||||
void clear()
|
||||
{
|
||||
idle = true;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2017 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -70,8 +72,7 @@ private:
|
|||
friend class VIEW;
|
||||
|
||||
/**
|
||||
* Function getLayers()
|
||||
* Returns layer numbers used by the item.
|
||||
* Return layer numbers used by the item.
|
||||
*
|
||||
* @param aLayers[]: output layer index array
|
||||
* @param aCount: number of layer indices in aLayers[]
|
||||
|
@ -91,17 +92,16 @@ private:
|
|||
int m_requiredUpdate; ///< Flag required for updating
|
||||
int m_drawPriority; ///< Order to draw this item in a layer, lowest first
|
||||
|
||||
///> Helper for storing cached items group ids
|
||||
///< Helper for storing cached items group ids
|
||||
typedef std::pair<int, int> GroupPair;
|
||||
|
||||
///> Indexes of cached GAL display lists corresponding to the item (for every layer it occupies).
|
||||
///> (in the std::pair "first" stores layer number, "second" stores group id).
|
||||
///< Indexes of cached GAL display lists corresponding to the item (for every layer it.
|
||||
///< occupies)(in the std::pair "first" stores layer number, "second" stores group id).
|
||||
GroupPair* m_groups;
|
||||
int m_groupsSize;
|
||||
|
||||
/**
|
||||
* Function getGroup()
|
||||
* Returns number of the group id for the given layer, or -1 in case it was not cached before.
|
||||
* Return number of the group id for the given layer, or -1 in case it was not cached before.
|
||||
*
|
||||
* @param aLayer is the layer number for which group id is queried.
|
||||
* @return group id or -1 in case there is no group id (ie. item is not cached).
|
||||
|
@ -118,8 +118,7 @@ private:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function setGroup()
|
||||
* Sets a group id for the item and the layer combination.
|
||||
* Set a group id for the item and the layer combination.
|
||||
*
|
||||
* @param aLayer is the layer numbe.
|
||||
* @param aGroup is the group id.
|
||||
|
@ -151,8 +150,7 @@ private:
|
|||
|
||||
|
||||
/**
|
||||
* Function deleteGroups()
|
||||
* Removes all of the stored group ids. Forces recaching of the item.
|
||||
* Remove all of the stored group ids. Forces recaching of the item.
|
||||
*/
|
||||
void deleteGroups()
|
||||
{
|
||||
|
@ -163,8 +161,7 @@ private:
|
|||
|
||||
|
||||
/**
|
||||
* Function storesGroups()
|
||||
* Returns information if the item uses at least one group id (ie. if it is cached at all).
|
||||
* Return information if the item uses at least one group id (ie. if it is cached at all).
|
||||
*
|
||||
* @returns true in case it is cached at least for one layer.
|
||||
*/
|
||||
|
@ -175,7 +172,8 @@ private:
|
|||
|
||||
|
||||
/**
|
||||
* Reorders the stored groups (to facilitate reordering of layers)
|
||||
* Reorder the stored groups (to facilitate reordering of layers).
|
||||
*
|
||||
* @see VIEW::ReorderLayerData
|
||||
*
|
||||
* @param aReorderMap is the mapping of old to new layer ids
|
||||
|
@ -202,8 +200,7 @@ private:
|
|||
std::vector<int> m_layers;
|
||||
|
||||
/**
|
||||
* Function saveLayers()
|
||||
* Saves layers used by the item.
|
||||
* Save layers used by the item.
|
||||
*
|
||||
* @param aLayers is an array containing layer numbers to be saved.
|
||||
* @param aCount is the size of the array.
|
||||
|
@ -222,8 +219,7 @@ private:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function viewRequiredUpdate()
|
||||
* Returns current update flag for an item.
|
||||
* Return current update flag for an item.
|
||||
*/
|
||||
int requiredUpdate() const
|
||||
{
|
||||
|
@ -231,8 +227,7 @@ private:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function clearUpdateFlags()
|
||||
* Marks an item as already updated, so it is not going to be redrawn.
|
||||
* Mark an item as already updated, so it is not going to be redrawn.
|
||||
*/
|
||||
void clearUpdateFlags()
|
||||
{
|
||||
|
@ -240,8 +235,7 @@ private:
|
|||
}
|
||||
|
||||
/**
|
||||
* Function isRenderable()
|
||||
* Returns if the item should be drawn or not.
|
||||
* Return if the item should be drawn or not.
|
||||
*/
|
||||
bool isRenderable() const
|
||||
{
|
||||
|
@ -1198,7 +1192,8 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags )
|
|||
}
|
||||
else
|
||||
{
|
||||
// updateLayers updates geometry too, so we do not have to update both of them at the same time
|
||||
// updateLayers updates geometry too, so we do not have to update both of them at the
|
||||
// same time
|
||||
if( aUpdateFlags & LAYERS )
|
||||
{
|
||||
updateLayers( aItem );
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018 CERN
|
||||
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -90,34 +90,34 @@ public:
|
|||
*
|
||||
* @param aLayerName a text which can be printed as layer name.
|
||||
* @param aPageNum the number of the current page (only used to print this value).
|
||||
* @param aPageCount the number of pages to ptint (only used to print this value).
|
||||
* @param aPageCount the number of pages to print (only used to print this value).
|
||||
*/
|
||||
virtual void DrawPage( const wxString& aLayerName = wxEmptyString,
|
||||
int aPageNum = 1, int aPageCount = 1 );
|
||||
|
||||
protected:
|
||||
///> Convert mils to internal units
|
||||
///< Convert mils to internal units
|
||||
virtual int milsToIU( double aMils ) const = 0;
|
||||
|
||||
///> Enables layers visibility for a printout
|
||||
///< Enables layers visibility for a printout
|
||||
virtual void setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet );
|
||||
|
||||
///> Configures PAINTER object for a printout
|
||||
///< Configures PAINTER object for a printout
|
||||
virtual void setupPainter( KIGFX::PAINTER& aPainter );
|
||||
|
||||
///> Configures GAL object for a printout
|
||||
///< Configures GAL object for a printout
|
||||
virtual void setupGal( KIGFX::GAL* aGal );
|
||||
|
||||
///> Returns bounding box of the printed objects (excluding worksheet frame)
|
||||
///< Returns bounding box of the printed objects (excluding worksheet frame)
|
||||
virtual EDA_RECT getBoundingBox() = 0;
|
||||
|
||||
///> Returns a PAINTER instance used to draw the items.
|
||||
///< Returns a PAINTER instance used to draw the items.
|
||||
virtual std::unique_ptr<KIGFX::PAINTER> getPainter( KIGFX::GAL* aGal ) = 0;
|
||||
|
||||
///> Source VIEW object (note that actual printing only refers to this object)
|
||||
///< Source VIEW object (note that actual printing only refers to this object)
|
||||
const KIGFX::VIEW* m_view;
|
||||
|
||||
///> Printout parameters
|
||||
///< Printout parameters
|
||||
BOARD_PRINTOUT_SETTINGS m_settings;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2016-2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -34,15 +35,15 @@
|
|||
|
||||
class EDA_ITEM;
|
||||
|
||||
///> Types of changes
|
||||
///< Types of changes
|
||||
enum CHANGE_TYPE {
|
||||
CHT_ADD = 1,
|
||||
CHT_REMOVE = 2,
|
||||
CHT_MODIFY = 4,
|
||||
CHT_TYPE = CHT_ADD | CHT_REMOVE | CHT_MODIFY,
|
||||
|
||||
///> Flag to indicate the change is already applied,
|
||||
///> just notify observers (not compatible with CHT_MODIFY)
|
||||
///< Flag to indicate the change is already applied,
|
||||
///< just notify observers (not compatible with CHT_MODIFY)
|
||||
CHT_DONE = 8,
|
||||
CHT_FLAGS = CHT_DONE
|
||||
};
|
||||
|
@ -73,39 +74,39 @@ public:
|
|||
COMMIT();
|
||||
virtual ~COMMIT();
|
||||
|
||||
///> Adds a new item to the model
|
||||
///< Add a new item to the model
|
||||
COMMIT& Add( EDA_ITEM* aItem )
|
||||
{
|
||||
return Stage( aItem, CHT_ADD );
|
||||
}
|
||||
|
||||
///> Notifies observers that aItem has been added
|
||||
///< Notify observers that aItem has been added
|
||||
COMMIT& Added( EDA_ITEM* aItem )
|
||||
{
|
||||
return Stage( aItem, CHT_ADD | CHT_DONE );
|
||||
}
|
||||
|
||||
///> Removes a new item from the model
|
||||
///< Remove a new item from the model
|
||||
COMMIT& Remove( EDA_ITEM* aItem )
|
||||
{
|
||||
return Stage( aItem, CHT_REMOVE );
|
||||
}
|
||||
|
||||
///> Notifies observers that aItem has been removed
|
||||
///< Notify observers that aItem has been removed
|
||||
COMMIT& Removed( EDA_ITEM* aItem )
|
||||
{
|
||||
return Stage( aItem, CHT_REMOVE | CHT_DONE );
|
||||
}
|
||||
|
||||
///> Modifies a given item in the model.
|
||||
///> Must be called before modification is performed.
|
||||
///< Modify a given item in the model.
|
||||
///< Must be called before modification is performed.
|
||||
COMMIT& Modify( EDA_ITEM* aItem )
|
||||
{
|
||||
return Stage( aItem, CHT_MODIFY );
|
||||
}
|
||||
|
||||
///> Creates an undo entry for an item that has been already modified. Requires a copy done
|
||||
///> before the modification.
|
||||
///< Create an undo entry for an item that has been already modified. Requires a copy done
|
||||
///< before the modification.
|
||||
COMMIT& Modified( EDA_ITEM* aItem, EDA_ITEM* aCopy )
|
||||
{
|
||||
return createModified( aItem, aCopy );
|
||||
|
@ -121,7 +122,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
///> Adds a change of the item aItem of type aChangeType to the change list.
|
||||
///< Add a change of the item aItem of type aChangeType to the change list.
|
||||
virtual COMMIT& Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType );
|
||||
|
||||
virtual COMMIT& Stage( std::vector<EDA_ITEM*>& container, CHANGE_TYPE aChangeType );
|
||||
|
@ -129,11 +130,11 @@ public:
|
|||
virtual COMMIT& Stage( const PICKED_ITEMS_LIST& aItems,
|
||||
UNDO_REDO aModFlag = UNDO_REDO::UNSPECIFIED );
|
||||
|
||||
///> Executes the changes.
|
||||
///< Execute the changes.
|
||||
virtual void Push( const wxString& aMessage = wxT( "A commit" ),
|
||||
bool aCreateUndoEntry = true, bool aSetDirtyBit = true ) = 0;
|
||||
|
||||
///> Revert the commit by restoring the modified items state.
|
||||
///< Revert the commit by restoring the modified items state.
|
||||
virtual void Revert() = 0;
|
||||
|
||||
bool Empty() const
|
||||
|
@ -141,15 +142,15 @@ public:
|
|||
return m_changes.empty();
|
||||
}
|
||||
|
||||
///> Returns status of an item.
|
||||
///< Returns status of an item.
|
||||
int GetStatus( EDA_ITEM* aItem );
|
||||
|
||||
protected:
|
||||
struct COMMIT_LINE
|
||||
{
|
||||
EDA_ITEM* m_item; ///> Main item that is added/deleted/modified
|
||||
EDA_ITEM* m_copy; ///> Optional copy of the item
|
||||
CHANGE_TYPE m_type; ///> Modification type
|
||||
EDA_ITEM* m_item; ///< Main item that is added/deleted/modified
|
||||
EDA_ITEM* m_copy; ///< Optional copy of the item
|
||||
CHANGE_TYPE m_type; ///< Modification type
|
||||
};
|
||||
|
||||
// Should be called in Push() & Revert() methods
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2014-2020 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2007-2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -148,7 +148,7 @@ wxString GetOSXKicadDataDir();
|
|||
// this function, so add it if missing
|
||||
#if !wxCHECK_VERSION( 3, 1, 0 )
|
||||
#define USE_KICAD_WXSTRING_HASH // for common.cpp
|
||||
///> Template specialization to enable wxStrings for certain containers (e.g. unordered_map)
|
||||
///< Template specialization to enable wxStrings for certain containers (e.g. unordered_map)
|
||||
namespace std
|
||||
{
|
||||
template<> struct hash<wxString>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -23,7 +23,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* This file is part of the common library
|
||||
* This file is part of the common library.
|
||||
*
|
||||
* @file confirm.h
|
||||
* @see common.h
|
||||
*/
|
||||
|
@ -44,7 +45,7 @@ class wxStaticBitmap;
|
|||
class KIDIALOG : public wxRichMessageDialog
|
||||
{
|
||||
public:
|
||||
///> Dialog type. Selects appropriate icon and default dialog title
|
||||
///< Dialog type. Selects appropriate icon and default dialog title
|
||||
enum KD_TYPE { KD_NONE, KD_INFO, KD_QUESTION, KD_WARNING, KD_ERROR };
|
||||
|
||||
KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
|
||||
|
@ -58,10 +59,10 @@ public:
|
|||
return wxRichMessageDialog::SetOKCancelLabels( ok, cancel );
|
||||
}
|
||||
|
||||
///> Shows the 'do not show again' checkbox
|
||||
///< Shows the 'do not show again' checkbox
|
||||
void DoNotShowCheckbox( wxString file, int line );
|
||||
|
||||
///> Checks the 'do not show again' setting for the dialog
|
||||
///< Checks the 'do not show again' setting for the dialog
|
||||
bool DoNotShowAgain() const;
|
||||
void ForceShowAgain();
|
||||
|
||||
|
@ -154,7 +155,7 @@ void DisplayInfoMessage( wxWindow* parent, const wxString& aMessage,
|
|||
bool IsOK( wxWindow* aParent, const wxString& aMessage );
|
||||
|
||||
/**
|
||||
* Displays a warning dialog with \a aMessage and returns the user response.
|
||||
* Display a warning dialog with \a aMessage and returns the user response.
|
||||
*
|
||||
* @param aParent is the parent window. NULL can be used if the parent is the top level window.
|
||||
* @param aWarning is the warning to display in the top part of the dialog box using a bold font.
|
||||
|
@ -174,7 +175,7 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin
|
|||
|
||||
|
||||
/**
|
||||
* Displays a dialog with radioboxes asking the user to select an option.
|
||||
* Display a dialog with radioboxes asking the user to select an option.
|
||||
*
|
||||
* @param aParent is the parent window.
|
||||
* @param aTitle is the dialog title.
|
||||
|
@ -183,6 +184,6 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin
|
|||
* @return Index of the selected option or -1 when the dialog has been canceled.
|
||||
*/
|
||||
int SelectSingleOption( wxWindow* aParent, const wxString& aTitle, const wxString& aMessage,
|
||||
const wxArrayString& aOptions );
|
||||
const wxArrayString& aOptions );
|
||||
|
||||
#endif /* __INCLUDE__CONFIRM_H__ */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2019-2021 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -76,21 +76,21 @@ public:
|
|||
*/
|
||||
struct CURSOR_DEF
|
||||
{
|
||||
///> The ID key used to uniquely identify a cursor in a given store
|
||||
///< The ID key used to uniquely identify a cursor in a given store
|
||||
KICURSOR m_id_key;
|
||||
|
||||
///> The image data bitmap
|
||||
///< The image data bitmap
|
||||
const unsigned char* m_image_data;
|
||||
|
||||
///> The mask data bitmap
|
||||
///< The mask data bitmap
|
||||
const unsigned char* m_mask_data;
|
||||
|
||||
const char** m_xpm;
|
||||
|
||||
///> The image size in pixels
|
||||
///< The image size in pixels
|
||||
wxSize m_size;
|
||||
|
||||
///> The "hotspot" where the cursor "is" in the image
|
||||
///< The "hotspot" where the cursor "is" in the image
|
||||
wxPoint m_hotspot;
|
||||
};
|
||||
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
static const wxStockCursor GetStockCursor( KICURSOR aCursorType );
|
||||
|
||||
private:
|
||||
///> Internal store of cursors by ID
|
||||
///< Internal store of cursors by ID
|
||||
std::map<KICURSOR, wxCursor> m_store;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
@ -84,9 +84,10 @@ public:
|
|||
* Dialog constructor
|
||||
* @param aParent is the caller
|
||||
* @param aCurrentColor is the current color, used to show it in dialog
|
||||
* @param aAllowOpacityControl = true to allow opacity (alpha channel) setting
|
||||
* @param aAllowOpacityControl true to allow opacity (alpha channel) setting
|
||||
* false to not show this setting (opacity = 1.0 always)
|
||||
* @param aUserColors: if not null is a list of defined colors replacing the dialog predefined colors
|
||||
* @param aUserColors if not null is a list of defined colors replacing the dialog
|
||||
* predefined colors
|
||||
*/
|
||||
DIALOG_COLOR_PICKER( wxWindow* aParent, const KIGFX::COLOR4D& aCurrentColor,
|
||||
bool aAllowOpacityControl, CUSTOM_COLORS_LIST* aUserColors = nullptr,
|
||||
|
@ -105,7 +106,7 @@ private:
|
|||
bool m_allowMouseEvents;
|
||||
bool m_allowOpacityCtrl; ///< true to show the widget,
|
||||
///< false to keep alpha channel = 1.0
|
||||
KIGFX::COLOR4D m_previousColor4D; ///< the inital color4d
|
||||
KIGFX::COLOR4D m_previousColor4D; ///< the initial color4d
|
||||
KIGFX::COLOR4D m_newColor4D; ///< the current color4d
|
||||
KIGFX::COLOR4D m_defaultColor; ///< The default color4d
|
||||
|
||||
|
@ -117,7 +118,7 @@ private:
|
|||
wxPoint m_cursorBitmapGreen; ///< the green cursor on the RGB bitmap palette.
|
||||
wxPoint m_cursorBitmapBlue; ///< the blue cursor on the RGB bitmap palette.
|
||||
wxPoint m_cursorBitmapHSV; ///< the cursor on the HSV bitmap palette.
|
||||
wxPoint* m_selectedCursor; ///< the ref cursor to the selected curor, if any, or null.
|
||||
wxPoint* m_selectedCursor; ///< the ref cursor to the selected cursor, if any, or null.
|
||||
|
||||
double m_hue; ///< the current hue, in degrees (0 ... 360)
|
||||
double m_sat; ///< the current saturation (0 ... 1.0)
|
||||
|
@ -136,7 +137,7 @@ private:
|
|||
void createRGBBitmap(); ///< generate the bitmap that shows the RVB color space
|
||||
void drawRGBPalette(); ///< draws the RVB color space
|
||||
|
||||
///> repaint a static bitmap with the aColor4D color
|
||||
///< repaint a static bitmap with the aColor4D color
|
||||
void updatePreview( wxStaticBitmap* aStaticBitmap, KIGFX::COLOR4D& aColor4D );
|
||||
|
||||
///< Event handler from wxSlider: brightness (value) control
|
||||
|
@ -152,7 +153,7 @@ private:
|
|||
void OnChangeEditHue( wxSpinEvent& event ) override;
|
||||
void OnChangeEditSat( wxSpinEvent& event ) override;
|
||||
|
||||
///> mouse handlers, when clicking on a palette bitmap
|
||||
///< mouse handlers, when clicking on a palette bitmap
|
||||
void onRGBMouseClick( wxMouseEvent& event ) override;
|
||||
void onRGBMouseDrag( wxMouseEvent& event ) override;
|
||||
void onHSVMouseClick( wxMouseEvent& event ) override;
|
||||
|
@ -163,8 +164,9 @@ private:
|
|||
///< Event handler for the reset button press
|
||||
void OnResetButton( wxCommandEvent& aEvent ) override;
|
||||
|
||||
/** manage the Hue and Saturation settings when the mouse cursor
|
||||
* is at aMouseCursor.
|
||||
/**
|
||||
* Manage the Hue and Saturation settings when the mouse cursor is at aMouseCursor.
|
||||
*
|
||||
* @param aMouseCursor is the mouse cursor position on the HSV bitmap
|
||||
* @return true if the Hue and Saturation can be set from aMouseCursor,
|
||||
* if Saturation value computed from aMouseCursor is <= 1.0,
|
||||
|
@ -172,14 +174,16 @@ private:
|
|||
*/
|
||||
bool setHSvaluesFromCursor( wxPoint aMouseCursor );
|
||||
|
||||
///> Event handler for defined color buttons
|
||||
///< Event handler for defined color buttons
|
||||
void buttColorClick( wxMouseEvent& event );
|
||||
|
||||
///> called when creating the dialog
|
||||
///< called when creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
/** creates the bitmap buttons for each defined colors
|
||||
* if aPredefinedColors is nullptr, a internal predefined list will be used
|
||||
/**
|
||||
* Create the bitmap buttons for each defined colors.
|
||||
*
|
||||
* If aPredefinedColors is nullptr, a internal predefined list will be used.
|
||||
*/
|
||||
void initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColors );
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017 CERN
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
|
@ -20,7 +21,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///> Helper functions to substitute paths with environmental variables.
|
||||
///< Helper functions to substitute paths with environmental variables.
|
||||
|
||||
#ifndef ENV_PATHS_H
|
||||
#define ENV_PATHS_H
|
||||
|
@ -28,45 +29,46 @@
|
|||
#include <pgm_base.h>
|
||||
|
||||
/**
|
||||
* Normalizes a file path to an environmental variable, if possible.
|
||||
* Normalize a file path to an environmental variable, if possible.
|
||||
*
|
||||
* @param aFilePath is the full file path (path and file name) to be normalized.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substition with.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substitution with.
|
||||
* @param aProject is an optional project, to normalize the file path to the project path.
|
||||
* @return Normalized full file path (path and file name) if succeeded or empty string if the
|
||||
* path could not be normalized.
|
||||
* path could not be normalized.
|
||||
*/
|
||||
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
|
||||
const PROJECT* aProject );
|
||||
|
||||
/**
|
||||
* Normalizes a file path to an environmental variable, if possible.
|
||||
* Normalize a file path to an environmental variable, if possible.
|
||||
*
|
||||
* @param aFilePath is the full file path (path and file name) to be normalized.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substition with.
|
||||
* @param aEnvVars is an optional map of environmental variables to try substitution with.
|
||||
* @param aProjectPath is an optional string to normalize the file path to the project path.
|
||||
* @return Normalized full file path (path and file name) if succeeded or empty string if the
|
||||
* path could not be normalized.
|
||||
* path could not be normalized.
|
||||
*/
|
||||
wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars,
|
||||
const wxString& aProjectPath );
|
||||
|
||||
/**
|
||||
* Searches the default paths trying to find one with the requested file.
|
||||
* Search the default paths trying to find one with the requested file.
|
||||
*
|
||||
* @param aFileName is the name of the searched file. It might be a relative path.
|
||||
* @param aEnvVars is an optional map of environmental variables that can contain paths.
|
||||
* @param aProject is an optional project, to check the project path.
|
||||
* @return Full path (apth and file name) if the file was found in one of the paths, otherwise
|
||||
* an empty string.
|
||||
* an empty string.
|
||||
*/
|
||||
wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars,
|
||||
const PROJECT* aProject );
|
||||
|
||||
/**
|
||||
* Checks if a given filename is within a given project directory (not whether it exists!)
|
||||
* Check if a given filename is within a given project directory (not whether it exists!)
|
||||
*
|
||||
* @param aFileName is the absolute path to check
|
||||
* @param aProject is the project to test agains
|
||||
* @param aProject is the project to test against
|
||||
* @param aSubPath will be filled with the relative path to the file inside the project (if any)
|
||||
* @return true if aFileName's path is inside aProject's path
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2012-2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017-2018 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -40,7 +40,7 @@
|
|||
#include <memory>
|
||||
|
||||
/**
|
||||
* Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
|
||||
* The Cairo implementation of the graphics abstraction layer.
|
||||
*
|
||||
* Quote from Wikipedia:
|
||||
* " Cairo is a software library used to provide a vector graphics-based, device-independent
|
||||
|
@ -213,7 +213,7 @@ public:
|
|||
|
||||
void EnableDepthTest( bool aEnabled = false ) override;
|
||||
|
||||
///> @copydoc GAL::DrawGrid()
|
||||
///< @copydoc GAL::DrawGrid()
|
||||
void DrawGrid() override;
|
||||
|
||||
|
||||
|
@ -264,17 +264,17 @@ protected:
|
|||
void storePath(); ///< Store the actual path
|
||||
|
||||
/**
|
||||
* Blits cursor into the current screen.
|
||||
* Blit cursor into the current screen.
|
||||
*/
|
||||
void blitCursor( wxMemoryDC& clientDC );
|
||||
|
||||
/// Drawing polygons & polylines is the same in cairo, so here is the common code
|
||||
/// Drawing polygons & polylines is the same in Cairo, so here is the common code
|
||||
void drawPoly( const std::deque<VECTOR2D>& aPointList );
|
||||
void drawPoly( const VECTOR2D aPointList[], int aListSize );
|
||||
void drawPoly( const SHAPE_LINE_CHAIN& aLineChain );
|
||||
|
||||
/**
|
||||
* Returns a valid key that can be used as a new group number.
|
||||
* Return a valid key that can be used as a new group number.
|
||||
*
|
||||
* @return An unique group number that is not used by any other group.
|
||||
*/
|
||||
|
@ -369,7 +369,7 @@ public:
|
|||
|
||||
~CAIRO_GAL();
|
||||
|
||||
///> @copydoc GAL::IsVisible()
|
||||
///< @copydoc GAL::IsVisible()
|
||||
bool IsVisible() const override
|
||||
{
|
||||
return IsShownOnScreen() && !GetClientRect().IsEmpty();
|
||||
|
@ -443,7 +443,7 @@ public:
|
|||
*/
|
||||
void skipMouseEvent( wxMouseEvent& aEvent );
|
||||
|
||||
///> Cairo-specific update handlers
|
||||
///< Cairo-specific update handlers
|
||||
bool updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) override;
|
||||
|
||||
protected:
|
||||
|
@ -462,7 +462,7 @@ protected:
|
|||
unsigned char* wxOutput; ///< wxImage compatible buffer
|
||||
|
||||
// Variables related to Cairo <-> wxWidgets
|
||||
unsigned char* bitmapBuffer; ///< Storage of the cairo image
|
||||
unsigned char* bitmapBuffer; ///< Storage of the Cairo image
|
||||
int stride; ///< Stride value for Cairo
|
||||
int wxBufferWidth;
|
||||
bool isInitialized; ///< Are Cairo image & surface ready to use
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2018 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* Author: Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
cairo_surface_t* m_surface;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
///> DC handle on Windows
|
||||
///< DC handle on Windows
|
||||
void* m_hdc; // the real type is HDC, but do not pull in extra headers
|
||||
#endif /* __WXMSW__ */
|
||||
|
||||
|
@ -110,17 +110,17 @@ public:
|
|||
void SetSheetSize( const VECTOR2D& aSize ) override;
|
||||
|
||||
private:
|
||||
///> Returns true if page orientation is landscape
|
||||
///< Returns true if page orientation is landscape
|
||||
bool isLandscape() const
|
||||
{
|
||||
return m_nativePaperSize.x > m_nativePaperSize.y;
|
||||
}
|
||||
|
||||
///> Printout size
|
||||
///< Printout size
|
||||
VECTOR2D m_nativePaperSize;
|
||||
|
||||
///> Flag indicating whether the platform rotates page automatically or
|
||||
///> GAL needs to handle it in the transformation matrix
|
||||
///< Flag indicating whether the platform rotates page automatically or
|
||||
///< GAL needs to handle it in the transformation matrix
|
||||
bool m_hasNativeLandscapeRotation;
|
||||
|
||||
std::unique_ptr<CAIRO_PRINT_CTX> m_printCtx;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Kicad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -86,7 +86,7 @@ namespace KIGFX
|
|||
GAL_DISPLAY_OPTIONS();
|
||||
|
||||
/**
|
||||
* Read GAL config options from applicaton-level config
|
||||
* Read GAL config options from application-level config
|
||||
* @param aCfg the window settings to load from
|
||||
*/
|
||||
void ReadWindowSettings( WINDOW_SETTINGS& aCfg );
|
||||
|
@ -120,28 +120,28 @@ namespace KIGFX
|
|||
|
||||
DPI_SCALING m_dpi;
|
||||
|
||||
///> The grid style to draw the grid in
|
||||
///< The grid style to draw the grid in
|
||||
KIGFX::GRID_STYLE m_gridStyle;
|
||||
|
||||
///> Snapping options for the grid
|
||||
///< Snapping options for the grid
|
||||
GRID_SNAPPING m_gridSnapping;
|
||||
|
||||
///> Thickness to render grid lines/dots
|
||||
///< Thickness to render grid lines/dots
|
||||
double m_gridLineWidth;
|
||||
|
||||
///> Minimum pixel distance between displayed grid lines
|
||||
///< Minimum pixel distance between displayed grid lines
|
||||
double m_gridMinSpacing;
|
||||
|
||||
///> Whether or not to draw the coordinate system axes
|
||||
///< Whether or not to draw the coordinate system axes
|
||||
bool m_axesEnabled;
|
||||
|
||||
///> Fullscreen crosshair or small cross
|
||||
///< Fullscreen crosshair or small cross
|
||||
bool m_fullscreenCursor;
|
||||
|
||||
///> Force cursor display
|
||||
///< Force cursor display
|
||||
bool m_forceDisplayCursor;
|
||||
|
||||
///> The pixel scale factor (>1 for hi-DPI scaled displays)
|
||||
///< The pixel scale factor (>1 for hi-DPI scaled displays)
|
||||
double m_scaleFactor;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2016-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* Graphics Abstraction Layer (GAL) - base class
|
||||
*
|
||||
|
@ -47,10 +47,10 @@ namespace KIGFX
|
|||
{
|
||||
|
||||
/**
|
||||
* Class GAL is the abstract interface for drawing on a 2D-surface.
|
||||
* Abstract interface for drawing on a 2D-surface.
|
||||
*
|
||||
* The functions are optimized for drawing shapes of an EDA-program such as KiCad. Most methods
|
||||
* are abstract and need to be implemented by a lower layer, for example by a cairo or OpenGL
|
||||
* are abstract and need to be implemented by a lower layer, for example by a Cairo or OpenGL
|
||||
* implementation. Almost all methods use world coordinates as arguments. The board design is
|
||||
* defined in world space units for drawing purposes these are transformed to screen units with
|
||||
* this layer. So zooming is handled here as well.
|
||||
|
@ -69,16 +69,16 @@ public:
|
|||
GAL( GAL_DISPLAY_OPTIONS& aOptions );
|
||||
virtual ~GAL();
|
||||
|
||||
/// Returns the initialization status for the canvas.
|
||||
/// Return the initialization status for the canvas.
|
||||
virtual bool IsInitialized() const { return true; }
|
||||
|
||||
/// Returns true if the GAL canvas is visible on the screen.
|
||||
/// Return true if the GAL canvas is visible on the screen.
|
||||
virtual bool IsVisible() const { return true; }
|
||||
|
||||
/// Returns true if the GAL engine is a cairo based type.
|
||||
/// Return true if the GAL engine is a Cairo based type.
|
||||
virtual bool IsCairoEngine() { return false; }
|
||||
|
||||
/// Returns true if the GAL engine is a OpenGL based type.
|
||||
/// Return true if the GAL engine is a OpenGL based type.
|
||||
virtual bool IsOpenGlEngine() { return false; }
|
||||
|
||||
// ---------------
|
||||
|
@ -198,13 +198,13 @@ public:
|
|||
// Screen methods
|
||||
// --------------
|
||||
|
||||
/// Resizes the canvas.
|
||||
/// Resize the canvas.
|
||||
virtual void ResizeScreen( int aWidth, int aHeight ) {};
|
||||
|
||||
/// Shows/hides the GAL canvas
|
||||
/// Show/hide the GAL canvas
|
||||
virtual bool Show( bool aShow ) { return true; };
|
||||
|
||||
/// Returns GAL canvas size in pixels
|
||||
/// Return GAL canvas size in pixels
|
||||
const VECTOR2I& GetScreenPixelSize() const
|
||||
{
|
||||
return screenSize;
|
||||
|
@ -337,7 +337,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Draws a vector type text using preloaded Newstroke font.
|
||||
* Draw a vector type text using preloaded Newstroke font.
|
||||
*
|
||||
* @param aText is the text to be drawn.
|
||||
* @param aPosition is the text position in world coordinates.
|
||||
|
@ -350,7 +350,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Draws a text using a bitmap font. It should be faster than StrokeText(),
|
||||
* Draw a text using a bitmap font. It should be faster than StrokeText(),
|
||||
* but can be used only for non-Gerber elements.
|
||||
*
|
||||
* @param aText is the text to be drawn.
|
||||
|
@ -373,8 +373,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Compute the X and Y size of a given text. The text is expected to be
|
||||
* a only one line text.
|
||||
* Compute the X and Y size of a given text. The text is expected to be a only one line text.
|
||||
*
|
||||
* @param aText is the text string (one line).
|
||||
* @return is the text size.
|
||||
|
@ -389,7 +388,7 @@ public:
|
|||
virtual void SetTextAttributes( const EDA_TEXT* aText );
|
||||
|
||||
/**
|
||||
* Reset text attributes to default styling
|
||||
* Reset text attributes to default styling.
|
||||
*
|
||||
* Normally, custom attributes will be set individually after this,
|
||||
* otherwise you can use SetTextAttributes()
|
||||
|
@ -442,7 +441,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns current text horizontal justification setting.
|
||||
* Return current text horizontal justification setting.
|
||||
*/
|
||||
inline EDA_TEXT_HJUSTIFY_T GetHorizontalJustify() const
|
||||
{
|
||||
|
@ -531,7 +530,7 @@ public:
|
|||
virtual void DrawGroup( int aGroupNumber ) {};
|
||||
|
||||
/**
|
||||
* Changes the color used to draw the group.
|
||||
* Change the color used to draw the group.
|
||||
*
|
||||
* @param aGroupNumber is the group number.
|
||||
* @param aNewColor is the new color.
|
||||
|
@ -539,7 +538,7 @@ public:
|
|||
virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) {};
|
||||
|
||||
/**
|
||||
* Changes the depth (Z-axis position) of the group.
|
||||
* Change the depth (Z-axis position) of the group.
|
||||
*
|
||||
* @param aGroupNumber is the group number.
|
||||
* @param aDepth is the new depth.
|
||||
|
@ -703,7 +702,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the minimum depth in the currently used range (the top).
|
||||
* Return the minimum depth in the currently used range (the top).
|
||||
*/
|
||||
inline double GetMinDepth() const
|
||||
{
|
||||
|
@ -711,7 +710,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum depth in the currently used range (the bottom).
|
||||
* Return the maximum depth in the currently used range (the bottom).
|
||||
*/
|
||||
inline double GetMaxDepth() const
|
||||
{
|
||||
|
@ -761,28 +760,28 @@ public:
|
|||
// ---------------------------
|
||||
|
||||
/**
|
||||
* Sets the target for rendering.
|
||||
* Set the target for rendering.
|
||||
*
|
||||
* @param aTarget is the new target for rendering.
|
||||
*/
|
||||
virtual void SetTarget( RENDER_TARGET aTarget ) {};
|
||||
|
||||
/**
|
||||
* Gets the currently used target for rendering.
|
||||
* Get the currently used target for rendering.
|
||||
*
|
||||
* @return The current rendering target.
|
||||
*/
|
||||
virtual RENDER_TARGET GetTarget() const { return TARGET_CACHED; };
|
||||
|
||||
/**
|
||||
* Clears the target for rendering.
|
||||
* Clear the target for rendering.
|
||||
*
|
||||
* @param aTarget is the target to be cleared.
|
||||
*/
|
||||
virtual void ClearTarget( RENDER_TARGET aTarget ) {};
|
||||
|
||||
/**
|
||||
* Returns true if the target exists.
|
||||
* Return true if the target exists.
|
||||
*
|
||||
* @param aTarget is the target to be checked.
|
||||
*/
|
||||
|
@ -792,7 +791,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Sets negative draw mode in the renderer
|
||||
* Set negative draw mode in the renderer.
|
||||
*
|
||||
* When negative mode is enabled, drawn items will subtract from
|
||||
* previously drawn items. This is mainly needed for Gerber
|
||||
|
@ -809,7 +808,7 @@ public:
|
|||
// -------------
|
||||
|
||||
/**
|
||||
* Sets the visibility setting of the grid.
|
||||
* Set the visibility setting of the grid.
|
||||
*
|
||||
* @param aVisibility is the new visibility setting of the grid.
|
||||
*/
|
||||
|
@ -861,7 +860,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the grid size.
|
||||
* Return the grid size.
|
||||
*
|
||||
* @return A vector containing the grid size in x and y direction.
|
||||
*/
|
||||
|
@ -891,7 +890,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Enables drawing the axes.
|
||||
* Enable drawing the axes.
|
||||
*/
|
||||
inline void SetAxesEnabled( bool aAxesEnabled )
|
||||
{
|
||||
|
@ -918,7 +917,7 @@ public:
|
|||
return gridLineWidth;
|
||||
}
|
||||
|
||||
///> Draw the grid
|
||||
///< Draw the grid
|
||||
virtual void DrawGrid() {};
|
||||
|
||||
/**
|
||||
|
@ -962,7 +961,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns information about cursor visibility.
|
||||
* Return information about cursor visibility.
|
||||
*
|
||||
* @return True if cursor is visible.
|
||||
*/
|
||||
|
@ -989,7 +988,7 @@ public:
|
|||
virtual void DrawCursor( const VECTOR2D& aCursorPosition ) {};
|
||||
|
||||
/**
|
||||
* Changes the current depth to deeper, so it is possible to draw objects right beneath
|
||||
* Change the current depth to deeper, so it is possible to draw objects right beneath
|
||||
* other.
|
||||
*/
|
||||
inline void AdvanceDepth()
|
||||
|
@ -998,7 +997,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Stores current drawing depth on the depth stack.
|
||||
* Store current drawing depth on the depth stack.
|
||||
*/
|
||||
inline void PushDepth()
|
||||
{
|
||||
|
@ -1006,7 +1005,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Restores previously stored drawing depth for the depth stack.
|
||||
* Restore previously stored drawing depth for the depth stack.
|
||||
*/
|
||||
inline void PopDepth()
|
||||
{
|
||||
|
@ -1026,16 +1025,16 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
/// Private: use GAL_CONTEXT_LOCKER RAII object
|
||||
/// Use GAL_CONTEXT_LOCKER RAII object
|
||||
virtual void lockContext( int aClientCookie ) {}
|
||||
|
||||
virtual void unlockContext( int aClientCookie ) {}
|
||||
|
||||
/// Enables item update mode.
|
||||
/// Enable item update mode.
|
||||
/// Private: use GAL_UPDATE_CONTEXT RAII object
|
||||
virtual void beginUpdate() {}
|
||||
|
||||
/// Disables item update mode.
|
||||
/// Disable item update mode.
|
||||
virtual void endUpdate() {}
|
||||
|
||||
/// Begin the drawing, needs to be called for every new frame.
|
||||
|
@ -1067,7 +1066,7 @@ protected:
|
|||
static const int GRID_DEPTH;
|
||||
|
||||
/**
|
||||
* Gets the actual cursor color to draw
|
||||
* Get the actual cursor color to draw
|
||||
*/
|
||||
COLOR4D getCursorColor() const;
|
||||
|
||||
|
@ -1075,7 +1074,7 @@ protected:
|
|||
// Settings observer interface
|
||||
// ---------------
|
||||
/**
|
||||
* Handler for observer settings changes
|
||||
* Handler for observer settings changes.
|
||||
*/
|
||||
void OnGalDisplayOptionsChanged( const GAL_DISPLAY_OPTIONS& aOptions ) override;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2013-2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -54,19 +54,19 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::SetItem()
|
||||
///< @copydoc VERTEX_CONTAINER::SetItem()
|
||||
virtual void SetItem( VERTEX_ITEM* aItem ) override;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::FinishItem()
|
||||
///< @copydoc VERTEX_CONTAINER::FinishItem()
|
||||
virtual void FinishItem() override;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Allocate()
|
||||
///< @copydoc VERTEX_CONTAINER::Allocate()
|
||||
virtual VERTEX* Allocate( unsigned int aSize ) override;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Delete()
|
||||
///< @copydoc VERTEX_CONTAINER::Delete()
|
||||
virtual void Delete( VERTEX_ITEM* aItem ) override;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Clear()
|
||||
///< @copydoc VERTEX_CONTAINER::Clear()
|
||||
virtual void Clear() override;
|
||||
|
||||
/**
|
||||
|
@ -79,14 +79,14 @@ public:
|
|||
*/
|
||||
virtual bool IsMapped() const = 0;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Map()
|
||||
///< @copydoc VERTEX_CONTAINER::Map()
|
||||
virtual void Map() override = 0;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Unmap()
|
||||
///< @copydoc VERTEX_CONTAINER::Unmap()
|
||||
virtual void Unmap() override = 0;
|
||||
|
||||
protected:
|
||||
///> Maps size of free memory chunks to their offsets
|
||||
///< Maps size of free memory chunks to their offsets
|
||||
typedef std::pair<unsigned int, unsigned int> CHUNK;
|
||||
typedef std::multimap<unsigned int, unsigned int> FREE_CHUNK_MAP;
|
||||
|
||||
|
@ -153,20 +153,20 @@ protected:
|
|||
*/
|
||||
void addFreeChunk( unsigned int aOffset, unsigned int aSize );
|
||||
|
||||
///> Store size & offset of free chunks.
|
||||
///< Store size & offset of free chunks.
|
||||
FREE_CHUNK_MAP m_freeChunks;
|
||||
|
||||
///> Stored VERTEX_ITEMs
|
||||
///< Stored VERTEX_ITEMs
|
||||
ITEMS m_items;
|
||||
|
||||
///> Currently modified item
|
||||
///< Currently modified item
|
||||
VERTEX_ITEM* m_item;
|
||||
|
||||
///> Properties of currently modified chunk & item
|
||||
///< Properties of currently modified chunk & item
|
||||
unsigned int m_chunkSize;
|
||||
unsigned int m_chunkOffset;
|
||||
|
||||
///> Maximal vertex index number stored in the container
|
||||
///< Maximal vertex index number stored in the container
|
||||
unsigned int m_maxIndex;
|
||||
|
||||
private:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2013-2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -35,7 +35,6 @@ namespace KIGFX
|
|||
/**
|
||||
* Specialization of CACHED_CONTAINER that stores data in video memory via memory mapping.
|
||||
*/
|
||||
|
||||
class CACHED_CONTAINER_GPU : public CACHED_CONTAINER
|
||||
{
|
||||
public:
|
||||
|
@ -52,10 +51,10 @@ public:
|
|||
return m_isMapped;
|
||||
}
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Map()
|
||||
///< @copydoc VERTEX_CONTAINER::Map()
|
||||
void Map() override;
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Unmap()
|
||||
///< @copydoc VERTEX_CONTAINER::Unmap()
|
||||
void Unmap() override;
|
||||
|
||||
protected:
|
||||
|
@ -71,13 +70,13 @@ protected:
|
|||
bool defragmentResize( unsigned int aNewSize ) override;
|
||||
bool defragmentResizeMemcpy( unsigned int aNewSize );
|
||||
|
||||
///> Flag saying if vertex buffer is currently mapped
|
||||
///< Flag saying if vertex buffer is currently mapped
|
||||
bool m_isMapped;
|
||||
|
||||
///> Vertex buffer handle
|
||||
///< Vertex buffer handle
|
||||
unsigned int m_glBufferHandle;
|
||||
|
||||
///> Flag saying whether it is safe to use glCopyBufferSubData
|
||||
///< Flag saying whether it is safe to use glCopyBufferSubData
|
||||
bool m_useCopyBuffer;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2013-2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -48,10 +48,10 @@ public:
|
|||
CACHED_CONTAINER_RAM( unsigned int aSize = DEFAULT_SIZE );
|
||||
~CACHED_CONTAINER_RAM();
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Unmap()
|
||||
///< @copydoc VERTEX_CONTAINER::Unmap()
|
||||
void Map() override {}
|
||||
|
||||
///> @copydoc VERTEX_CONTAINER::Unmap()
|
||||
///< @copydoc VERTEX_CONTAINER::Unmap()
|
||||
void Unmap() override;
|
||||
|
||||
bool IsMapped() const override
|
||||
|
@ -78,7 +78,7 @@ protected:
|
|||
*/
|
||||
bool defragmentResize( unsigned int aNewSize ) override;
|
||||
|
||||
///> Handle to vertices buffer
|
||||
///< Handle to vertices buffer
|
||||
GLuint m_verticesBuffer;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
virtual void DrawAll() = 0;
|
||||
|
||||
/**
|
||||
* Clears the container after drawing routines.
|
||||
* Clear the container after drawing routines.
|
||||
*/
|
||||
virtual void EndDrawing() = 0;
|
||||
|
||||
|
@ -85,19 +85,19 @@ public:
|
|||
protected:
|
||||
GPU_MANAGER( VERTEX_CONTAINER* aContainer );
|
||||
|
||||
///> Drawing status flag.
|
||||
///< Drawing status flag.
|
||||
bool m_isDrawing;
|
||||
|
||||
///> Container that stores vertices data.
|
||||
///< Container that stores vertices data.
|
||||
VERTEX_CONTAINER* m_container;
|
||||
|
||||
///> Shader handling
|
||||
///< Shader handling
|
||||
SHADER* m_shader;
|
||||
|
||||
///> Location of shader attributes (for glVertexAttribPointer)
|
||||
///< Location of shader attributes (for glVertexAttribPointer)
|
||||
int m_shaderAttrib;
|
||||
|
||||
///> true: enable Z test when drawing
|
||||
///< true: enable Z test when drawing
|
||||
bool m_enableDepthTest;
|
||||
};
|
||||
|
||||
|
@ -108,44 +108,44 @@ public:
|
|||
GPU_CACHED_MANAGER( VERTEX_CONTAINER* aContainer );
|
||||
~GPU_CACHED_MANAGER();
|
||||
|
||||
///> @copydoc GPU_MANAGER::BeginDrawing()
|
||||
///< @copydoc GPU_MANAGER::BeginDrawing()
|
||||
virtual void BeginDrawing() override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::DrawIndices()
|
||||
///< @copydoc GPU_MANAGER::DrawIndices()
|
||||
virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ) override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::DrawAll()
|
||||
///< @copydoc GPU_MANAGER::DrawAll()
|
||||
virtual void DrawAll() override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::EndDrawing()
|
||||
///< @copydoc GPU_MANAGER::EndDrawing()
|
||||
virtual void EndDrawing() override;
|
||||
|
||||
///> Maps vertex buffer stored in GPU memory.
|
||||
///< Map vertex buffer stored in GPU memory.
|
||||
void Map();
|
||||
|
||||
///> Unmaps vertex buffer.
|
||||
///< Unmap vertex buffer.
|
||||
void Unmap();
|
||||
|
||||
protected:
|
||||
///> Resizes the indices buffer to aNewSize if necessary
|
||||
///< Resizes the indices buffer to aNewSize if necessary
|
||||
void resizeIndices( unsigned int aNewSize );
|
||||
|
||||
///> Buffers initialization flag
|
||||
///< Buffers initialization flag
|
||||
bool m_buffersInitialized;
|
||||
|
||||
///> Pointer to the current indices buffer
|
||||
///< Pointer to the current indices buffer
|
||||
boost::scoped_array<GLuint> m_indices;
|
||||
|
||||
///> Pointer to the first free cell in the indices buffer
|
||||
///< Pointer to the first free cell in the indices buffer
|
||||
GLuint* m_indicesPtr;
|
||||
|
||||
///> Handle to indices buffer
|
||||
///< Handle to indices buffer
|
||||
GLuint m_indicesBuffer;
|
||||
|
||||
///> Number of indices stored in the indices buffer
|
||||
///< Number of indices stored in the indices buffer
|
||||
unsigned int m_indicesSize;
|
||||
|
||||
///> Current indices buffer size
|
||||
///< Current indices buffer size
|
||||
unsigned int m_indicesCapacity;
|
||||
};
|
||||
|
||||
|
@ -155,16 +155,16 @@ class GPU_NONCACHED_MANAGER : public GPU_MANAGER
|
|||
public:
|
||||
GPU_NONCACHED_MANAGER( VERTEX_CONTAINER* aContainer );
|
||||
|
||||
///> @copydoc GPU_MANAGER::BeginDrawing()
|
||||
///< @copydoc GPU_MANAGER::BeginDrawing()
|
||||
virtual void BeginDrawing() override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::DrawIndices()
|
||||
///< @copydoc GPU_MANAGER::DrawIndices()
|
||||
virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ) override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::DrawAll()
|
||||
///< @copydoc GPU_MANAGER::DrawAll()
|
||||
virtual void DrawAll() override;
|
||||
|
||||
///> @copydoc GPU_MANAGER::EndDrawing()
|
||||
///< @copydoc GPU_MANAGER::EndDrawing()
|
||||
virtual void EndDrawing() override;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2013-2017 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -56,7 +56,7 @@ class SHADER;
|
|||
class GL_BITMAP_CACHE;
|
||||
|
||||
/**
|
||||
* @brief Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer.
|
||||
* OpenGL implementation of the Graphics Abstraction Layer.
|
||||
*
|
||||
* This is a direct OpenGL-implementation and uses low-level graphics primitives like triangles
|
||||
* and quads. The purpose is to provide a fast graphics interface, that takes advantage of modern
|
||||
|
@ -66,8 +66,6 @@ class OPENGL_GAL : public GAL, public HIDPI_GL_CANVAS
|
|||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor OPENGL_GAL
|
||||
*
|
||||
* @param aParent is the wxWidgets immediate wxWindow parent of this object.
|
||||
*
|
||||
* @param aMouseListener is the wxEvtHandler that should receive the mouse events,
|
||||
|
@ -87,7 +85,8 @@ public:
|
|||
~OPENGL_GAL();
|
||||
|
||||
/**
|
||||
* @brief Checks OpenGL features
|
||||
* Checks OpenGL features.
|
||||
*
|
||||
* @param aOptions
|
||||
* @return wxEmptyString if OpenGL 2.1 or greater is available, otherwise returns error message
|
||||
*/
|
||||
|
@ -102,7 +101,7 @@ public:
|
|||
return IsShownOnScreen() && !GetClientRect().IsEmpty();
|
||||
}
|
||||
|
||||
///> @copydoc GAL::IsVisible()
|
||||
///< @copydoc GAL::IsVisible()
|
||||
bool IsVisible() const override
|
||||
{
|
||||
return IsShownOnScreen() && !GetClientRect().IsEmpty();
|
||||
|
@ -302,30 +301,32 @@ private:
|
|||
|
||||
// Vertex buffer objects related fields
|
||||
typedef std::unordered_map< unsigned int, std::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
|
||||
GROUPS_MAP groups; ///< Stores informations about VBO objects (groups)
|
||||
unsigned int groupCounter; ///< Counter used for generating keys for groups
|
||||
VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs)
|
||||
VERTEX_MANAGER* cachedManager; ///< Container for storing cached VERTEX_ITEMs
|
||||
VERTEX_MANAGER* nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs
|
||||
VERTEX_MANAGER* overlayManager; ///< Container for storing overlaid VERTEX_ITEMs
|
||||
GROUPS_MAP groups; ///< Stores information about VBO objects (groups)
|
||||
unsigned int groupCounter; ///< Counter used for generating keys for groups
|
||||
VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing
|
||||
///< VERTEX_ITEMs).
|
||||
VERTEX_MANAGER* cachedManager; ///< Container for storing cached VERTEX_ITEMs
|
||||
VERTEX_MANAGER* nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs
|
||||
VERTEX_MANAGER* overlayManager; ///< Container for storing overlaid VERTEX_ITEMs
|
||||
|
||||
// Framebuffer & compositing
|
||||
OPENGL_COMPOSITOR* compositor; ///< Handles multiple rendering targets
|
||||
unsigned int mainBuffer; ///< Main rendering target
|
||||
unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.)
|
||||
RENDER_TARGET currentTarget; ///< Current rendering target
|
||||
OPENGL_COMPOSITOR* compositor; ///< Handles multiple rendering targets
|
||||
unsigned int mainBuffer; ///< Main rendering target
|
||||
unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.)
|
||||
RENDER_TARGET currentTarget; ///< Current rendering target
|
||||
|
||||
// Shader
|
||||
SHADER* shader; ///< There is only one shader used for different objects
|
||||
SHADER* shader; ///< There is only one shader used for different
|
||||
///< objects.
|
||||
|
||||
// Internal flags
|
||||
bool isFramebufferInitialized; ///< Are the framebuffers initialized?
|
||||
static bool isBitmapFontLoaded; ///< Is the bitmap font texture loaded?
|
||||
bool isBitmapFontInitialized; ///< Is the shader set to use bitmap fonts?
|
||||
bool isInitialized; ///< Basic initialization flag, has to be done
|
||||
///< when the window is visible
|
||||
bool isGrouping; ///< Was a group started?
|
||||
bool m_isContextLocked; ///< Used for assertion checking
|
||||
bool isInitialized; ///< Basic initialization flag, has to be done
|
||||
///< when the window is visible
|
||||
bool isGrouping; ///< Was a group started?
|
||||
bool m_isContextLocked; ///< Used for assertion checking
|
||||
int lockClientCookie;
|
||||
GLint ufm_worldPixelSize;
|
||||
GLint ufm_screenPixelSize;
|
||||
|
@ -367,8 +368,10 @@ private:
|
|||
void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint );
|
||||
|
||||
/**
|
||||
* @brief Draw a semicircle. Depending on settings (isStrokeEnabled & isFilledEnabled) it runs
|
||||
* the proper function (drawStrokedSemiCircle or drawFilledSemiCircle).
|
||||
* Draw a semicircle.
|
||||
*
|
||||
* Depending on settings (isStrokeEnabled & isFilledEnabled) it runs the proper function
|
||||
* (drawStrokedSemiCircle or drawFilledSemiCircle).
|
||||
*
|
||||
* @param aCenterPoint is the center point.
|
||||
* @param aRadius is the radius of the semicircle.
|
||||
|
@ -378,7 +381,7 @@ private:
|
|||
void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
|
||||
|
||||
/**
|
||||
* @brief Draw a filled semicircle.
|
||||
*Draw a filled semicircle.
|
||||
*
|
||||
* @param aCenterPoint is the center point.
|
||||
* @param aRadius is the radius of the semicircle.
|
||||
|
@ -388,7 +391,7 @@ private:
|
|||
void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
|
||||
|
||||
/**
|
||||
* @brief Draw a stroked semicircle.
|
||||
* Draw a stroked semicircle.
|
||||
*
|
||||
* @param aCenterPoint is the center point.
|
||||
* @param aRadius is the radius of the semicircle.
|
||||
|
@ -398,28 +401,31 @@ private:
|
|||
void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
|
||||
|
||||
/**
|
||||
* @brief Generic way of drawing a polyline stored in different containers.
|
||||
* Generic way of drawing a polyline stored in different containers.
|
||||
*
|
||||
* @param aPointGetter is a function to obtain coordinates of n-th vertex.
|
||||
* @param aPointCount is the number of points to be drawn.
|
||||
*/
|
||||
void drawPolyline( const std::function<VECTOR2D (int)>& aPointGetter, int aPointCount );
|
||||
|
||||
/**
|
||||
* @brief Draws a filled polygon. It does not need the last point to have the same coordinates
|
||||
* Draw a filled polygon. It does not need the last point to have the same coordinates
|
||||
* as the first one.
|
||||
*
|
||||
* @param aPoints is the vertices data (3 coordinates: x, y, z).
|
||||
* @param aPointCount is the number of points.
|
||||
*/
|
||||
void drawPolygon( GLdouble* aPoints, int aPointCount );
|
||||
|
||||
/**
|
||||
* @brief Draws a set of polygons with a cached triangulation. Way faster than drawPolygon.
|
||||
* Draw a set of polygons with a cached triangulation. Way faster than drawPolygon.
|
||||
*/
|
||||
void drawTriangulatedPolyset( const SHAPE_POLY_SET& aPoly );
|
||||
|
||||
|
||||
/**
|
||||
* @brief Draws a single character using bitmap font.
|
||||
* Draw a single character using bitmap font.
|
||||
*
|
||||
* Its main purpose is to be used in BitmapText() function.
|
||||
*
|
||||
* @param aChar is the character to be drawn.
|
||||
|
@ -428,7 +434,8 @@ private:
|
|||
int drawBitmapChar( unsigned long aChar );
|
||||
|
||||
/**
|
||||
* @brief Draws an overbar over the currently drawn text.
|
||||
* Draw an overbar over the currently drawn text.
|
||||
*
|
||||
* Its main purpose is to be used in BitmapText() function.
|
||||
* This method requires appropriate scaling to be applied (as is done in BitmapText() function).
|
||||
* The current X coordinate will be the overbar ending.
|
||||
|
@ -439,7 +446,7 @@ private:
|
|||
void drawBitmapOverbar( double aLength, double aHeight );
|
||||
|
||||
/**
|
||||
* @brief Computes a size of text drawn using bitmap font with current text setting applied.
|
||||
* Compute a size of text drawn using bitmap font with current text setting applied.
|
||||
*
|
||||
* @param aText is the text to be drawn.
|
||||
* @return Pair containing text bounding box and common Y axis offset. The values are expressed
|
||||
|
@ -449,33 +456,33 @@ private:
|
|||
|
||||
// Event handling
|
||||
/**
|
||||
* @brief This is the OnPaint event handler.
|
||||
* This is the OnPaint event handler.
|
||||
*
|
||||
* @param aEvent is the OnPaint event.
|
||||
*/
|
||||
void onPaint( wxPaintEvent& aEvent );
|
||||
|
||||
/**
|
||||
* @brief Skip the mouse event to the parent.
|
||||
* Skip the mouse event to the parent.
|
||||
*
|
||||
* @param aEvent is the mouse event.
|
||||
*/
|
||||
void skipMouseEvent( wxMouseEvent& aEvent );
|
||||
|
||||
/**
|
||||
* @brief Blits cursor into the current screen.
|
||||
* Blit cursor into the current screen.
|
||||
*/
|
||||
void blitCursor();
|
||||
|
||||
/**
|
||||
* @brief Returns a valid key that can be used as a new group number.
|
||||
* Return a valid key that can be used as a new group number.
|
||||
*
|
||||
* @return An unique group number that is not used by any other group.
|
||||
*/
|
||||
unsigned int getNewGroupNumber();
|
||||
|
||||
/**
|
||||
* @brief Compute the angle step when drawing arcs/circles approximated with lines.
|
||||
* Compute the angle step when drawing arcs/circles approximated with lines.
|
||||
*/
|
||||
double calcAngleStep( double aRadius ) const
|
||||
{
|
||||
|
@ -488,7 +495,8 @@ private:
|
|||
VECTOR2D getScreenPixelSize() const;
|
||||
|
||||
/**
|
||||
* @brief Basic OpenGL initialization and feature checks
|
||||
* Basic OpenGL initialization and feature checks.
|
||||
*
|
||||
* @throw std::runtime_error if any of the OpenGL feature checks failed
|
||||
*/
|
||||
void init();
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -38,7 +40,8 @@
|
|||
|
||||
namespace KIGFX
|
||||
{
|
||||
///> Possible types of shaders (keep consistent with the actual shader source in gl_builtin_shaders.cpp)
|
||||
///< Possible types of shaders (keep consistent with the actual shader source in
|
||||
///< gl_builtin_shaders.cpp).
|
||||
enum SHADER_MODE
|
||||
{
|
||||
SHADER_NONE = 0,
|
||||
|
@ -53,7 +56,7 @@ enum SHADER_MODE
|
|||
SHADER_LINE_F = 10
|
||||
};
|
||||
|
||||
///> Data structure for vertices {X,Y,Z,R,G,B,A,shader¶m}
|
||||
///< Data structure for vertices {X,Y,Z,R,G,B,A,shader¶m}
|
||||
struct VERTEX
|
||||
{
|
||||
GLfloat x, y, z; // Coordinates
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2013-2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
|
@ -167,16 +167,16 @@ protected:
|
|||
return m_currentSize - m_freeSpace;
|
||||
}
|
||||
|
||||
///> Free space left in the container, expressed in vertices
|
||||
///< Free space left in the container, expressed in vertices
|
||||
unsigned int m_freeSpace;
|
||||
|
||||
///> Current container size, expressed in vertices
|
||||
///< Current container size, expressed in vertices
|
||||
unsigned int m_currentSize;
|
||||
|
||||
///> Store the initial size, so it can be resized to this on Clear()
|
||||
///< Store the initial size, so it can be resized to this on Clear()
|
||||
unsigned int m_initialSize;
|
||||
|
||||
///> Actual storage memory
|
||||
///< Actual storage memory
|
||||
VERTEX* m_vertices;
|
||||
|
||||
// Status flags
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2013 CERN
|
||||
* Copyright (C) 2016-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* Copyright (C) 2016-2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* Stroke font class
|
||||
*
|
||||
|
@ -46,7 +47,7 @@ typedef std::vector<std::vector<VECTOR2D>*> GLYPH;
|
|||
typedef std::vector<GLYPH*> GLYPH_LIST;
|
||||
|
||||
/**
|
||||
* Class STROKE_FONT implements stroke font drawing.
|
||||
* Implement a stroke font drawing.
|
||||
*
|
||||
* A stroke font is composed of lines.
|
||||
*/
|
||||
|
@ -142,7 +143,7 @@ private:
|
|||
BOX2D computeBoundingBox( const GLYPH* aGlyph, double aGlyphWidth ) const;
|
||||
|
||||
/**
|
||||
* Draws a single line of text. Multiline texts should be split before using the
|
||||
* Draw a single line of text. Multiline texts should be split before using the
|
||||
* function.
|
||||
*
|
||||
* @param aText is the text to be drawn.
|
||||
|
@ -168,21 +169,21 @@ private:
|
|||
const GLYPH_LIST* m_glyphs; ///< Glyph list
|
||||
const std::vector<BOX2D>* m_glyphBoundingBoxes; ///< Bounding boxes of the glyphs
|
||||
|
||||
///> Factor that determines relative vertical position of the overbar.
|
||||
///< Factor that determines relative vertical position of the overbar.
|
||||
static const double OVERBAR_POSITION_FACTOR;
|
||||
static const double UNDERLINE_POSITION_FACTOR;
|
||||
|
||||
///> Factor that determines relative line width for bold text.
|
||||
///< Factor that determines relative line width for bold text.
|
||||
static const double BOLD_FACTOR;
|
||||
|
||||
///> Scale factor for a glyph
|
||||
///< Scale factor for a glyph
|
||||
static const double STROKE_FONT_SCALE;
|
||||
|
||||
///> Tilt factor for italic style (the is is the scaling factor
|
||||
///> on dY relative coordinates to give a tilst shape
|
||||
///< Tilt factor for italic style (the is is the scaling factor
|
||||
///< on dY relative coordinates to give a tilt shape
|
||||
static const double ITALIC_TILT;
|
||||
|
||||
///> Factor that determines the pitch between 2 lines.
|
||||
///< Factor that determines the pitch between 2 lines.
|
||||
static const double INTERLINE_PITCH_RATIO;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -85,13 +86,13 @@ public:
|
|||
void UnlockCtx( wxGLContext* aContext );
|
||||
|
||||
private:
|
||||
///> Map of GL contexts & their parent canvases.
|
||||
///< Map of GL contexts & their parent canvases.
|
||||
std::map<wxGLContext*, wxGLCanvas*> m_glContexts;
|
||||
|
||||
///> Currently bound GL context.
|
||||
///< Currently bound GL context.
|
||||
wxGLContext* m_glCtx;
|
||||
|
||||
///> Lock to prevent unexpected GL context switching.
|
||||
///< Lock to prevent unexpected GL context switching.
|
||||
std::mutex m_glCtxMutex;
|
||||
|
||||
// Singleton
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -25,6 +26,7 @@
|
|||
|
||||
#ifndef HASH_EDA_H_
|
||||
#define HASH_EDA_H_
|
||||
|
||||
/**
|
||||
* @brief Hashing functions for EDA_ITEMs.
|
||||
*/
|
||||
|
@ -34,13 +36,13 @@
|
|||
|
||||
class EDA_ITEM;
|
||||
|
||||
///> Enables/disables properties that will be used for calculating the hash.
|
||||
///> The properties might be combined using the bitwise 'or' operator.
|
||||
///< Enables/disables properties that will be used for calculating the hash.
|
||||
///< The properties might be combined using the bitwise 'or' operator.
|
||||
enum HASH_FLAGS
|
||||
{
|
||||
HASH_POS = 0x01,
|
||||
|
||||
///> use coordinates relative to the parent object
|
||||
///< use coordinates relative to the parent object
|
||||
REL_COORD = 0x02,
|
||||
HASH_ROT = 0x04,
|
||||
HASH_LAYER = 0x08,
|
||||
|
@ -51,7 +53,8 @@ enum HASH_FLAGS
|
|||
};
|
||||
|
||||
/**
|
||||
* Calculates hash of an EDA_ITEM.
|
||||
* Calculate hash of an EDA_ITEM.
|
||||
*
|
||||
* @param aItem is the item for which the hash will be computed.
|
||||
* @return Hash value.
|
||||
*/
|
||||
|
@ -64,7 +67,8 @@ std::size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags = HASH_FLAGS::HASH_A
|
|||
static inline void hash_combine( std::size_t &seed ) {}
|
||||
|
||||
/**
|
||||
* @brief Combine multiple hashes utilizing previous hash result
|
||||
* Combine multiple hashes utilizing previous hash result.
|
||||
*
|
||||
* @tparam T A hashable type
|
||||
* @param seed A seed value input and output for the result.
|
||||
* @param val A hashable object of type T
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 CERN
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -25,7 +27,7 @@
|
|||
#ifndef INTRUSIVE_LIST_H
|
||||
#define INTRUSIVE_LIST_H
|
||||
|
||||
///> A lightweight intrusive list container
|
||||
///< A lightweight intrusive list container
|
||||
template <class T>
|
||||
class INTRUSIVE_LIST
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright 2017 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
* @author Bernhard Stegmaier <stegmaier@sw-systems.de>
|
||||
|
@ -106,7 +106,6 @@ public:
|
|||
|
||||
protected:
|
||||
/**
|
||||
* Constructor.
|
||||
* @param aItems is the container to wrap.
|
||||
* @param aIt is the iterator to initialize this iterator (usually some begin() or end()
|
||||
* iterator).
|
||||
|
@ -121,7 +120,7 @@ public:
|
|||
m_filter = ( aType != UNDEFINED_TYPE );
|
||||
}
|
||||
|
||||
///> Assures the iterator is in a valid state.
|
||||
///< Assures the iterator is in a valid state.
|
||||
void validate()
|
||||
{
|
||||
// for all-items iterators (unfiltered): check if this is the end of the
|
||||
|
@ -145,25 +144,25 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
///> Wrapped container
|
||||
///< Wrapped container
|
||||
ITEM_CONTAINER* m_parent;
|
||||
|
||||
///> Iterator for one of the ptr_vector containers stored in the array
|
||||
///< Iterator for one of the ptr_vector containers stored in the array
|
||||
ITEM_CONTAINER_IT m_it;
|
||||
|
||||
///> Flag indicating whether type filtering is enabled
|
||||
///< Flag indicating whether type filtering is enabled
|
||||
bool m_filter;
|
||||
|
||||
///> Type of the currently iterated items
|
||||
///< Type of the currently iterated items
|
||||
int m_curType;
|
||||
|
||||
friend class MULTIVECTOR;
|
||||
};
|
||||
|
||||
///> The non-const iterator
|
||||
///< The non-const iterator
|
||||
typedef ITERATOR_BASE<T, MULTIVECTOR<T, FIRST_TYPE_VAL, LAST_TYPE_VAL>,
|
||||
typename ITEM_PTR_VECTOR::iterator> ITERATOR;
|
||||
///> The const iterator
|
||||
///< The const iterator
|
||||
typedef ITERATOR_BASE<const T, const MULTIVECTOR<T, FIRST_TYPE_VAL, LAST_TYPE_VAL>,
|
||||
typename ITEM_PTR_VECTOR::const_iterator> CONST_ITERATOR;
|
||||
|
||||
|
@ -295,7 +294,7 @@ public:
|
|||
static constexpr int TYPES_COUNT = LAST_TYPE - FIRST_TYPE + 1;
|
||||
|
||||
private:
|
||||
///> Get first non-empty type or first type if all are empty.
|
||||
///< Get first non-empty type or first type if all are empty.
|
||||
int first() const
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -306,7 +305,7 @@ private:
|
|||
return ( i == TYPES_COUNT ) ? FIRST_TYPE : FIRST_TYPE + i;
|
||||
}
|
||||
|
||||
///> Get last non-empty type or first type if all are empty.
|
||||
///< Get last non-empty type or first type if all are empty.
|
||||
int last() const
|
||||
{
|
||||
int i = TYPES_COUNT - 1;
|
||||
|
@ -317,7 +316,7 @@ private:
|
|||
return ( i < 0 ) ? FIRST_TYPE : FIRST_TYPE + i;
|
||||
}
|
||||
|
||||
///> Contained items by type
|
||||
///< Contained items by type
|
||||
ITEM_PTR_VECTOR m_data[TYPES_COUNT];
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2013-2016 CERN
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -41,7 +42,7 @@ namespace KIGFX {
|
|||
class ORIGIN_VIEWITEM : public EDA_ITEM
|
||||
{
|
||||
public:
|
||||
///> Marker symbol styles
|
||||
///< Marker symbol styles
|
||||
enum MARKER_STYLE
|
||||
{
|
||||
NO_GRAPHIC, CROSS, X, DOT, CIRCLE_CROSS, CIRCLE_X, CIRCLE_DOT, DASH_LINE
|
||||
|
@ -150,22 +151,22 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
///> Marker coordinates.
|
||||
///< Marker coordinates.
|
||||
VECTOR2D m_position;
|
||||
|
||||
///> Marker end position for markers that stretch between points
|
||||
///< Marker end position for markers that stretch between points
|
||||
VECTOR2D m_end;
|
||||
|
||||
///> Marker size (in pixels).
|
||||
///< Marker size (in pixels).
|
||||
int m_size;
|
||||
|
||||
///> Marker color.
|
||||
///< Marker color.
|
||||
COLOR4D m_color;
|
||||
|
||||
///> Marker symbol.
|
||||
///< Marker symbol.
|
||||
MARKER_STYLE m_style;
|
||||
|
||||
///> If set, the marker will be drawn even if its position is 0,0
|
||||
///< If set, the marker will be drawn even if its position is 0,0
|
||||
bool m_drawAtZero;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Joshua Redstone redstone at gmail.com
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -40,7 +40,7 @@ class VIEW;
|
|||
}
|
||||
|
||||
/**
|
||||
* PCB_GROUP is a set of BOARD_ITEMs (i.e., without duplicates)
|
||||
* A set of BOARD_ITEMs (i.e., without duplicates).
|
||||
*
|
||||
* The group parent is always board, not logical parent group. The group is transparent
|
||||
* container - e.g., its position is derived from the position of its members. A selection
|
||||
|
@ -76,14 +76,14 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds item to group. Does not take ownership of item.
|
||||
* Add item to group. Does not take ownership of item.
|
||||
*
|
||||
* @return true if item was added (false if item belongs to a different group).
|
||||
*/
|
||||
bool AddItem( BOARD_ITEM* aItem );
|
||||
|
||||
/**
|
||||
* Removes item from group.
|
||||
* Remove item from group.
|
||||
*
|
||||
* @return true if item was removed (false if item was not in the group).
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
void RemoveAll();
|
||||
|
||||
/*
|
||||
* Searches for highest level group containing item.
|
||||
* Search for highest level group containing item.
|
||||
*
|
||||
* @param aScope restricts the search to groups within the group scope.
|
||||
* @param aFootprintEditor true if we should stop promoting at the footprint level
|
||||
|
@ -109,22 +109,22 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
///> @copydoc EDA_ITEM::GetPosition
|
||||
///< @copydoc EDA_ITEM::GetPosition
|
||||
wxPoint GetPosition() const override;
|
||||
|
||||
///> @copydoc EDA_ITEM::SetPosition
|
||||
///< @copydoc EDA_ITEM::SetPosition
|
||||
void SetPosition( const wxPoint& aNewpos ) override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::GetLayerSet
|
||||
///< @copydoc BOARD_ITEM::GetLayerSet
|
||||
LSET GetLayerSet() const override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::SetLayer
|
||||
///< @copydoc BOARD_ITEM::SetLayer
|
||||
void SetLayer( PCB_LAYER_ID aLayer ) override
|
||||
{
|
||||
wxFAIL_MSG( "groups don't support layer SetLayer" );
|
||||
}
|
||||
|
||||
///> @copydoc EDA_ITEM::Clone
|
||||
///< @copydoc EDA_ITEM::Clone
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
/*
|
||||
|
@ -137,51 +137,51 @@ public:
|
|||
*/
|
||||
PCB_GROUP* DeepDuplicate() const;
|
||||
|
||||
///> @copydoc BOARD_ITEM::SwapData
|
||||
///< @copydoc BOARD_ITEM::SwapData
|
||||
void SwapData( BOARD_ITEM* aImage ) override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::IsOnLayer
|
||||
///< @copydoc BOARD_ITEM::IsOnLayer
|
||||
bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
|
||||
|
||||
///> @copydoc EDA_ITEM::HitTest
|
||||
///< @copydoc EDA_ITEM::HitTest
|
||||
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
|
||||
|
||||
///> @copydoc EDA_ITEM::HitTest
|
||||
///< @copydoc EDA_ITEM::HitTest
|
||||
bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
|
||||
|
||||
///> @copydoc EDA_ITEM::GetBoundingBox
|
||||
///< @copydoc EDA_ITEM::GetBoundingBox
|
||||
const EDA_RECT GetBoundingBox() const override;
|
||||
|
||||
///> @copydoc EDA_ITEM::Visit
|
||||
///< @copydoc EDA_ITEM::Visit
|
||||
SEARCH_RESULT Visit( INSPECTOR aInspector, void* aTestData,
|
||||
const KICAD_T aScanTypes[] ) override;
|
||||
|
||||
///> @copydoc VIEW_ITEM::ViewGetLayers
|
||||
///< @copydoc VIEW_ITEM::ViewGetLayers
|
||||
void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||
|
||||
///> @copydoc VIEW_ITEM::ViewGetLOD
|
||||
///< @copydoc VIEW_ITEM::ViewGetLOD
|
||||
double ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::Move
|
||||
///< @copydoc BOARD_ITEM::Move
|
||||
void Move( const wxPoint& aMoveVector ) override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::Rotate
|
||||
///< @copydoc BOARD_ITEM::Rotate
|
||||
void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
|
||||
|
||||
///> @copydoc BOARD_ITEM::Flip
|
||||
///< @copydoc BOARD_ITEM::Flip
|
||||
void Flip( const wxPoint |