2008-09-13 18:59:57 +00:00
|
|
|
/*****************************************************************/
|
|
|
|
/* Headers for library definition and lib component definitions */
|
|
|
|
/*****************************************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef LIBCMP_H
|
|
|
|
#define LIBCMP_H
|
|
|
|
|
|
|
|
#ifndef eda_global
|
|
|
|
#define eda_global extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "priorque.h"
|
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
#define LIB_VERSION_MAJOR 2
|
|
|
|
#define LIB_VERSION_MINOR 3
|
|
|
|
#define LIBFILE_IDENT "EESchema-LIBRARY Version" /* Must be the first line of lib files. */
|
|
|
|
#define DOCFILE_IDENT "EESchema-DOCLIB Version 2.0" /* Must be the first line of doc files. */
|
|
|
|
#define DOC_EXT wxT( ".dcm" ) /* Ext. of documentation files */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
//Offsets used in editing library component, for handle aliad dats
|
2007-08-24 15:10:46 +00:00
|
|
|
#define ALIAS_NAME 0
|
|
|
|
#define ALIAS_DOC 1
|
|
|
|
#define ALIAS_KEYWORD 2
|
2007-06-05 12:10:51 +00:00
|
|
|
#define ALIAS_DOC_FILENAME 3
|
2007-08-24 15:10:46 +00:00
|
|
|
#define ALIAS_NEXT 4
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2008-09-09 16:55:52 +00:00
|
|
|
enum LocateDrawStructType {
|
2008-09-13 18:59:57 +00:00
|
|
|
LOCATE_COMPONENT_ARC_DRAW_TYPE = 1,
|
2007-08-24 15:10:46 +00:00
|
|
|
LOCATE_COMPONENT_CIRCLE_DRAW_TYPE = 2,
|
|
|
|
LOCATE_COMPONENT_GRAPHIC_TEXT_DRAW_TYPE = 4,
|
|
|
|
LOCATE_COMPONENT_RECT_DRAW_TYPE = 8,
|
|
|
|
LOCATE_LINE_DRAW_TYPE = 0x10,
|
|
|
|
LOCATE_COMPONENT_POLYLINE_DRAW_TYPE = 0x20,
|
|
|
|
LOCATE_COMPONENT_LINE_DRAW_TYPE = 0x40
|
2008-09-09 16:55:52 +00:00
|
|
|
};
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#define LOCATE_ALL_DRAW_ITEM 0xFFFFFFFF
|
|
|
|
|
|
|
|
/* flags utilises dans FindLibPart() : */
|
2008-09-13 18:59:57 +00:00
|
|
|
#define FIND_ROOT 0 /* Used to search for a root component by its name
|
|
|
|
* if the name is an alias name, FindLibPart() returns the root component */
|
|
|
|
#define FIND_ALIAS 1 /* Used to search for a component by its name
|
|
|
|
* FindLibPart() returns the component (root or alias ) */
|
2007-09-13 11:28:58 +00:00
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
#include "class_library.h"
|
2007-09-13 11:28:58 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
/* Variables */
|
2008-09-13 18:59:57 +00:00
|
|
|
extern LibraryStruct* LibraryList; /* All part libs are saved here. */
|
2007-09-13 11:28:58 +00:00
|
|
|
|
|
|
|
/* Variables used by LibEdit */
|
2008-09-13 18:59:57 +00:00
|
|
|
eda_global LibEDA_BaseStruct* LibItemToRepeat; /* pointer on a graphic item than can be duplicated by the Ins key
|
|
|
|
* (usually the last created item */
|
2007-09-13 11:28:58 +00:00
|
|
|
eda_global LibraryStruct* CurrentLib; /* Current opened library */
|
|
|
|
eda_global EDA_LibComponentStruct* CurrentLibEntry; /* Current component */
|
|
|
|
eda_global LibEDA_BaseStruct* CurrentDrawItem; /* current edited item */
|
|
|
|
|
|
|
|
eda_global wxString CurrentAliasName; // Current selected alias (for components which have aliases)
|
|
|
|
eda_global bool g_AsDeMorgan; // True if the current component has a "De Morgan" representation
|
|
|
|
eda_global int CurrentUnit // Current selected part
|
2007-06-05 12:10:51 +00:00
|
|
|
#ifdef MAIN
|
2007-08-24 15:10:46 +00:00
|
|
|
= 1
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
|
|
|
;
|
2007-09-13 11:28:58 +00:00
|
|
|
eda_global int CurrentConvert /* Convert = 1 .. 255 */
|
2007-06-05 12:10:51 +00:00
|
|
|
#ifdef MAIN
|
2007-08-24 15:10:46 +00:00
|
|
|
= 1
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
|
|
|
;
|
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
eda_global wxString FindLibName; /* Library (name) containing the last component find by FindLibPart() */
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#endif // LIBCMP_H
|