Lines Matching defs:anchor

990 	XawTextAnchor *anchor;
992 /* find anchor and index */
995 if ((anchor = XawTextSourceFindAnchor(w, left))) {
1000 if (src->textSrc.anchors[i] == anchor)
1002 if (anchor->cache && anchor->position + anchor->cache->offset +
1003 anchor->cache->length <= left)
1004 eprev = entity = anchor->cache;
1006 eprev = entity = anchor->entities;
1008 offset = anchor->position + entity->offset;
1032 anchor->cache = NULL;
1034 if (entity == anchor->entities) {
1035 if ((anchor->entities = enext) == NULL) {
1037 anchor = XawTextSourceRemoveAnchor(w, anchor);
1038 entity = anchor ? anchor->entities : NULL;
1052 while (anchor) {
1054 offset = anchor->position + entity->offset + entity->length;
1065 anchor->cache = NULL;
1066 if (entity == anchor->entities) {
1068 if ((anchor->entities = enext) == NULL) {
1076 XtFree((XtPointer)anchor);
1079 anchor = NULL;
1083 anchor = src->textSrc.anchors[i];
1084 entity = anchor->entities;
1091 anchor = src->textSrc.anchors[++i];
1092 entity = anchor->entities;
1096 anchor = NULL;
1103 if (anchor) {
1106 if (anchor->position >= XawMax(right, left + block->length))
1107 anchor->position += diff;
1108 else if (anchor->position > left &&
1109 (aprev = XawTextSourcePrevAnchor(w, anchor))) {
1110 XawTextPosition tmp = anchor->position - aprev->position;
1118 entity = anchor->entities;
1124 aprev->entities = anchor->entities;
1128 entity->next = anchor->entities;
1130 anchor->entities = NULL;
1131 (void)XawTextSourceRemoveAnchor(w, anchor);
1143 /* The first anchor is never removed, and should
1146 * anchor, what can be caused when removing a chunk
1150 anchor = src->textSrc.anchors[0];
1151 eprev = entity = anchor->entities;
1161 anchor->cache = NULL;
1162 if ((anchor->entities = entity) != NULL) {
1614 XawTextAnchor *anchor, *panchor;
1642 anchor = XtNew(XawTextAnchor);
1646 anchor->entities = entity;
1657 anchor = XtNew(XawTextAnchor);
1658 anchor->entities = NULL;
1662 anchor = XtNew(XawTextAnchor);
1663 anchor->entities = NULL;
1666 anchor->position = position;
1667 anchor->cache = NULL;
1673 src->textSrc.anchors[src->textSrc.num_anchors++] = anchor;
1678 return (anchor);
1692 XawTextAnchor *anchor = anchors[i];
1694 if (anchor->position == position)
1695 return (anchor);
1696 else if (position < anchor->position)
1713 XawTextAnchor *anchor = XawTextSourceFindAnchor(w, position);
1717 if (anchor->cache && anchor->position + anchor->cache->offset +
1718 anchor->cache->length <= position)
1719 pentity = entity = anchor->cache;
1721 pentity = entity = anchor->entities;
1723 XawTextPosition offset = anchor->position + entity->offset;
1739 *anchor_return = anchor = XawTextSourceNextAnchor(w, anchor);
1740 *entity_return = anchor ? anchor->entities : NULL;
1743 *anchor_return = anchor;
1754 XawTextSourceNextAnchor(Widget w, XawTextAnchor *anchor)
1760 if (src->textSrc.anchors[i] == anchor)
1767 XawTextSourcePrevAnchor(Widget w, XawTextAnchor *anchor)
1773 if (src->textSrc.anchors[i] == anchor)
1780 XawTextSourceRemoveAnchor(Widget w, XawTextAnchor *anchor)
1786 if (src->textSrc.anchors[i] == anchor)
1793 XtFree((XtPointer)anchor);
1812 XawTextAnchor *next, *anchor = _XawTextSourceFindAnchor(w, position);
1819 if (anchor->cache && anchor->position + anchor->cache->offset +
1820 anchor->cache->length <= position)
1821 eprev = entity = anchor->cache;
1823 eprev = entity = anchor->entities;
1825 while (entity && anchor->position + entity->offset + entity->length <=
1830 if (entity && anchor->position + entity->offset < position + length) {
1836 if (next && next != anchor) {
1852 entity = anchor->entities;
1859 anchor->entities = next->entities;
1872 anchor->position + eprev->offset + eprev->length == position &&
1883 entity->offset = position - anchor->position;
1888 anchor->entities = entity;
1890 anchor->cache = NULL;
1893 anchor->cache = NULL;
1894 anchor->entities = entity;
1898 anchor->cache = eprev;
1909 XawTextAnchor *anchor = XawTextSourceFindAnchor(w, left);
1913 while (anchor && anchor->entities == NULL)
1914 anchor = XawTextSourceRemoveAnchor(w, anchor);
1916 if (anchor == NULL || left >= right)
1919 if (anchor->cache && anchor->position + anchor->cache->offset +
1920 anchor->cache->length < left)
1921 eprev = entity = anchor->cache;
1923 eprev = entity = anchor->entities;
1926 while (anchor->position + entity->offset + entity->length < left) {
1929 if ((anchor = XawTextSourceNextAnchor(w, anchor)) == NULL)
1931 if ((eprev = entity = anchor->entities) == NULL) {
1932 fprintf(stderr, "Bad anchor found!\n");
1938 offset = anchor->position + entity->offset;
1946 anchor->cache = NULL;
1947 if (entity == anchor->entities) {
1949 if ((anchor->entities = enext) == NULL) {
1950 if ((anchor = XawTextSourceRemoveAnchor(w, anchor)) == NULL)
1952 entity = anchor->entities;
1968 while (anchor) {
1970 offset = anchor->position + entity->offset + entity->length;
1973 anchor->cache = NULL;
1974 entity->offset = XawMax(entity->offset, right - anchor->position);
1983 if (entity == anchor->entities) {
1984 eprev = anchor->cache = NULL;
1985 if ((anchor->entities = enext) == NULL) {
1986 if ((anchor = XawTextSourceRemoveAnchor(w, anchor)) == NULL)
1988 entity = anchor->entities;
1994 if (anchor)
1995 anchor->cache = NULL;
1996 if ((anchor = XawTextSourceNextAnchor(w, anchor)) != NULL)
1997 entity = anchor->entities;
2002 /* checks the anchors up to position, and create an appropriate anchor
2008 XawTextAnchor *anchor;
2010 anchor = XawTextSourceFindAnchor(w, position);
2014 if (position - anchor->position >= ANCHORS_DIST)
2017 return (anchor);