From 856eaadedab9badcca413a9c286981e202d6208b Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 21 Jun 2000 15:12:04 +0000 Subject: Ajout de la structure TagSearch n�cessaire au nouveau code de recherche des items/tags. Mise � jour des signatures des fonctions li�es aux recherches tag/item. --- generic/tkZinc.h | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'generic/tkZinc.h') diff --git a/generic/tkZinc.h b/generic/tkZinc.h index 5bc84e1..cd052be 100644 --- a/generic/tkZinc.h +++ b/generic/tkZinc.h @@ -35,6 +35,31 @@ #include "List.h" #include "MapInfo.h" +typedef struct _TagSearch { + WidgetInfo *wi; + Item current; /* Pointer to last item returned. */ + Item previous; /* The item right before the current + * is tracked so if the current is + * deleted we don't have to start from the + * beginning. */ + ZnBool over; /* Non-zero means NextItem should always + * return NULL. */ + int type; /* search type */ + int id; /* item id for searches by id */ + + char *tag; /* tag expression string */ + int tag_index; /* current position in string scan */ + int tag_len; /* length of tag expression string */ + + char *rewrite_buf; /* tag string (after removing escapes) */ + unsigned int rewrite_buf_alloc; /* available space for rewrites */ + + struct _TagSearchExpr *expr; /* compiled tag expression */ + GroupItem group; + ZnBool recursive; + ZnList item_stack; +} TagSearch; + #ifdef PTK Tcl_Obj *NewLongObj(long val); Tcl_Obj *NewBooleanObj(ZnBool val); @@ -50,8 +75,9 @@ void SetStringObj(Tcl_Obj *o, char *val); char *Tcl_GetString(Tcl_Obj *obj); #endif -int ZnItemsWithTagOrId(WidgetInfo *wi, Tcl_Obj *tag_or_id, Item *item, - Item **item_list); +int ZnItemWithTagOrId(WidgetInfo *wi, Tcl_Obj *tag_or_id, Item group, + ZnBool recursive, Item *item, TagSearch **search_var); +void ZnTagSearchDestroy(TagSearch *search); int ParseCoordList(WidgetInfo *wi, Tcl_Obj *arg, ZnPoint **pts, int *num_pts); void DoItem(Tcl_Interp *interp, Item item, int part, Tk_Uid tag_uid); -- cgit v1.1