diff options
Diffstat (limited to 'generic/Item.c')
-rw-r--r-- | generic/Item.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/generic/Item.c b/generic/Item.c index 43121eb..2668f1a 100644 --- a/generic/Item.c +++ b/generic/Item.c @@ -1759,6 +1759,36 @@ FreeTags(Item item) /* ********************************************************************************** * + * HasTag -- Method + * + ********************************************************************************** + */ +static ZnBool +HasTag(Item item, + Tk_Uid tag) +{ + int num; + Tk_Uid *tags; + + if (!item->tags || !ZnListSize(item->tags)) { + return False; + } + else { + num = ZnListSize(item->tags); + tags = ZnListArray(item->tags); + for (tags = ZnListArray(item->tags); num > 0; tags++, num--) { + if (*tags == tag) { + return True; + } + } + } + return False; +} + + +/* + ********************************************************************************** + * * ZnCreateItem -- * * InsertItem and ConfigureItem must be called after CreateItem @@ -2685,6 +2715,7 @@ struct _ITEM ITEM = { AddTag, RemoveTag, FreeTags, + HasTag, ResetTransfo, SetTransfo, TranslateItem, |