PurplePen.DefaultMode.GetToolTip C# (CSharp) Method

GetToolTip() public method

public GetToolTip ( Pane pane, PointF location, float pixelSize, string &tipText, string &titleText ) : bool
pane Pane
location System.Drawing.PointF
pixelSize float
tipText string
titleText string
return bool
        public override bool GetToolTip(Pane pane, PointF location, float pixelSize, out string tipText, out string titleText)
        {
            CourseLayout activeCourse;
            CourseView courseView = selectionMgr.ActiveCourseView;

            if (pane == Pane.Map) {
                activeCourse = controller.GetCourseLayout();
            }
            else {
                activeCourse = controller.GetTopologyLayout();
            }

            CourseObj touchedObject = activeCourse.HitTest(location, pixelSize, CourseLayer.MainCourse, null);

            if (touchedObject == null)
                touchedObject = activeCourse.HitTest(location, pixelSize, CourseLayer.Descriptions, null);

            if (touchedObject != null) {
                TextPart[] textParts = SelectionDescriber.DescribeCourseObject(symbolDB, eventDB, touchedObject, courseView.ScaleRatio);
                ConvertTextPartsToToolTip(textParts, out tipText, out titleText);
                return true;
            }
            else {
                tipText = titleText = "";
                return false;
            }
        }