You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
4.1 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2013-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright (C) 2008-2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  6. * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
  7. * Copyright (C) 2004-2021 KiCad Developers, see change_log.txt for contributors.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, you may find one here:
  21. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  22. * or you may search the http://www.gnu.org website for the version 2 license,
  23. * or you may write to the Free Software Foundation, Inc.,
  24. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  25. */
  26. #ifndef EDA_ITEM_FLAGS_H
  27. #define EDA_ITEM_FLAGS_H
  28. #include <cstdint>
  29. // These define are used for the .m_flags and .m_UndoRedoStatus member of the
  30. // class EDA_ITEM
  31. //
  32. // NB: DO NOT ADD FLAGS ANYWHERE BUT AT THE END: THE FLAG-SET IS STORED AS AN INTEGER IN FILES.
  33. //
  34. #define IS_CHANGED (1 << 0) ///< Item was edited, and modified
  35. #define IS_LINKED (1 << 1) ///< Used in calculation to mark linked items (temporary use)
  36. #define IN_EDIT (1 << 2) ///< Item currently edited
  37. #define IS_MOVING (1 << 3) ///< Item being moved
  38. #define IS_NEW (1 << 4) ///< New item, just created
  39. #define IS_RESIZING (1 << 5) ///< Item being resized
  40. #define IS_DRAGGING (1 << 6) ///< Item being dragged
  41. #define IS_DELETED (1 << 7)
  42. #define IS_WIRE_IMAGE (1 << 8) ///< Item to be drawn as wireframe while editing
  43. #define STARTPOINT (1 << 9) ///< When a line is selected, these flags indicate which
  44. #define ENDPOINT (1 << 10) ///< ends. (Used to support dragging.)
  45. #define SELECTED (1 << 11) ///< Item was manually selected by the user
  46. #define SELECTED_BY_DRAG (1 << 12) ///< Item was algorithmically selected as a dragged item
  47. #define STRUCT_DELETED (1 << 13) ///< flag indication structures to be erased
  48. #define CANDIDATE (1 << 14) ///< flag indicating that the structure is connected
  49. #define SKIP_STRUCT (1 << 15) ///< flag indicating that the structure should be ignored
  50. #define DO_NOT_DRAW (1 << 16) ///< Used to disable draw function
  51. #define IS_PASTED (1 << 17) ///< Modifier on IS_NEW which indicates it came from clipboard
  52. #define UNUSED_1 (1 << 18)
  53. #define UNUSED_2 (1 << 19)
  54. #define MALFORMED_F_COURTYARD (1 << 20)
  55. #define MALFORMED_B_COURTYARD (1 << 21)
  56. #define MALFORMED_COURTYARDS ( MALFORMED_F_COURTYARD | MALFORMED_B_COURTYARD )
  57. #define BEGIN_ONPAD (1 << 22) ///< Pcbnew: flag set for track segment starting on a pad
  58. #define END_ONPAD (1 << 23) ///< Pcbnew: flag set for track segment ending on a pad
  59. #define HOLE_PROXY (1 << 24) ///< Indicates the BOARD_ITEM is a proxy for its hole
  60. #define IS_ROLLOVER (1 << 25) ///< Rollover active. Used for hyperlink highlighting.
  61. #define BRIGHTENED (1 << 26) ///< item is drawn with a bright contour
  62. #define DP_COUPLED (1 << 27) ///< item is coupled with another item making a differential pair
  63. ///< (applies to segments only)
  64. #define UR_TRANSIENT (1 << 28) ///< indicates the item is owned by the undo/redo stack
  65. #define IS_DANGLING (1 << 29) ///< indicates a pin is dangling
  66. #define ENTERED (1 << 30) ///< indicates a group has been entered
  67. // WARNING: if you add flags, you'll probably need to adjust the masks in GetEditFlags() and
  68. // ClearTempFlags().
  69. #define EDA_ITEM_ALL_FLAGS UINT32_MAX
  70. typedef std::uint32_t EDA_ITEM_FLAGS;
  71. #endif