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.

75 lines
2.8 KiB

17 years ago
17 years ago
  1. /*****************************************************************/
  2. /* Headers for library definition and lib component definitions */
  3. /*****************************************************************/
  4. #ifndef LIBCMP_H
  5. #define LIBCMP_H
  6. #ifndef eda_global
  7. #define eda_global extern
  8. #endif
  9. #include "priorque.h"
  10. #define LIB_VERSION_MAJOR 2
  11. #define LIB_VERSION_MINOR 3
  12. #define LIBFILE_IDENT "EESchema-LIBRARY Version" /* Must be the first line of lib files. */
  13. #define DOCFILE_IDENT "EESchema-DOCLIB Version 2.0" /* Must be the first line of doc files. */
  14. #define DOC_EXT wxT( ".dcm" ) /* Ext. of documentation files */
  15. //Offsets used in editing library component, for handle aliad dats
  16. #define ALIAS_NAME 0
  17. #define ALIAS_DOC 1
  18. #define ALIAS_KEYWORD 2
  19. #define ALIAS_DOC_FILENAME 3
  20. #define ALIAS_NEXT 4
  21. enum LocateDrawStructType {
  22. LOCATE_COMPONENT_ARC_DRAW_TYPE = 1,
  23. LOCATE_COMPONENT_CIRCLE_DRAW_TYPE = 2,
  24. LOCATE_COMPONENT_GRAPHIC_TEXT_DRAW_TYPE = 4,
  25. LOCATE_COMPONENT_RECT_DRAW_TYPE = 8,
  26. LOCATE_LINE_DRAW_TYPE = 0x10,
  27. LOCATE_COMPONENT_POLYLINE_DRAW_TYPE = 0x20,
  28. LOCATE_COMPONENT_LINE_DRAW_TYPE = 0x40
  29. };
  30. #define LOCATE_ALL_DRAW_ITEM 0xFFFFFFFF
  31. /* flags utilises dans FindLibPart() : */
  32. #define FIND_ROOT 0 /* Used to search for a root component by its name
  33. * if the name is an alias name, FindLibPart() returns the root component */
  34. #define FIND_ALIAS 1 /* Used to search for a component by its name
  35. * FindLibPart() returns the component (root or alias ) */
  36. #include "class_library.h"
  37. /* Variables */
  38. extern LibraryStruct* LibraryList; /* All part libs are saved here. */
  39. /* Variables used by LibEdit */
  40. eda_global LibEDA_BaseStruct* LibItemToRepeat; /* pointer on a graphic item than can be duplicated by the Ins key
  41. * (usually the last created item */
  42. eda_global LibraryStruct* CurrentLib; /* Current opened library */
  43. eda_global EDA_LibComponentStruct* CurrentLibEntry; /* Current component */
  44. eda_global LibEDA_BaseStruct* CurrentDrawItem; /* current edited item */
  45. eda_global wxString CurrentAliasName; // Current selected alias (for components which have aliases)
  46. eda_global bool g_AsDeMorgan; // True if the current component has a "De Morgan" representation
  47. eda_global int CurrentUnit // Current selected part
  48. #ifdef MAIN
  49. = 1
  50. #endif
  51. ;
  52. eda_global int CurrentConvert /* Convert = 1 .. 255 */
  53. #ifdef MAIN
  54. = 1
  55. #endif
  56. ;
  57. eda_global wxString FindLibName; /* Library (name) containing the last component find by FindLibPart() */
  58. #endif // LIBCMP_H