MCPcopy Create free account
hub / github.com/KDAB/codebrowser / onMouseEnterPPCond

Function onMouseEnterPPCond

data/codebrowser.js:866–901  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

864
865 // #if/#else/... tooltip
866 var onMouseEnterPPCond = function(e) {
867 if (skipHighlightTimerId) return false;
868 if (highlighted_items) {
869 highlighted_items.removeClass("highlight");
870 }
871 var elem = $(this);
872 var ppcond = elem.attr("data-ppcond");
873 highlighted_items = $("[data-ppcond='"+escape_selector(ppcond)+"']");
874 highlighted_items.addClass("highlight")
875 var ppcondItems = highlighted_items;
876 var currentLine = elem.parents("tr").find("th").text();
877 function computePPCondTooltipContent() {
878 var tt = tooltip.tooltip;
879 tt.empty();
880
881 var contents = $("<ul class='ppcond'/>");
882 ppcondItems.each(function() {
883 var p = $(this).parent();
884 var l = p.parents("tr").find("th").text();
885 var t = p.text();
886 while (t[t.length - 1] === '\\') {
887 p = p.parent().parent().next().find("u");
888 if (p.length !== 1)
889 break;
890 t = t.slice(0, t.length-1) + "\n" + p.text();
891 }
892 if (currentLine === l) {
893 contents.append($("<li/>").text(t));
894 } else {
895 contents.append($("<li/>").append($("<a href='#" + l + "' />").text(t)));
896 }
897 });
898 tt.append(contents);
899 }
900 tooltip.showAfterDelay(elem, computePPCondTooltipContent);
901 }
902
903 var onMouseEnterArg = function(e) {
904 $(this).attr("title", "Argument passed by reference");

Callers

nothing calls this directly

Calls 1

escape_selectorFunction · 0.85

Tested by

no test coverage detected