public override EditHitInfo CalcHitInfo(Point pt)
        {
            CustomTokenEditHitInfo hi = CreateHitInfo(pt) as CustomTokenEditHitInfo;

            if (!Bounds.Contains(pt))
            {
                return(hi);
            }
            foreach (CustomTokenEditTokenInfo tokenInfo in VisibleItems)
            {
                if (tokenInfo.Bounds.Contains(pt))
                {
                    hi.ResetHitObject(tokenInfo);
                    hi.ResetHitTest(TokenEditHitTest.Link);
                    hi.InCheckBox(false);

                    if (tokenInfo.CheckBoxGlyphBounds.Contains(pt))
                    {
                        hi.InCheckBox(true);
                    }
                    if (tokenInfo.GlyphBounds.Contains(pt))
                    {
                        hi.ResetHitTest(TokenEditHitTest.Glyph);
                    }
                    return(hi);
                }
            }
            if (ContentRect.Contains(pt))
            {
                hi.ResetHitTest(TokenEditHitTest.EditorRect);
            }

            return(hi);
        }
        private void ChangeCheckedIfRequired(TokenEditHitInfo hitInfo)
        {
            CustomTokenEditHitInfo hInfo = hitInfo as CustomTokenEditHitInfo;

            if (hInfo.IsInCheckBox)
            {
                (hitInfo.HitObject as CustomTokenEditTokenInfo).ChangeChecked();
            }
        }