============================================================================= Backlight>Set XPM Backlighting: NEDIT_require_macro_file("element.nm") NEDIT_require_macro_file("extensions.nm") set_backlight_string() new_bls = "" bls = "" pos = 0 end = 0 got_one = 0 # process a line at a time while (pos >= 0) { end = search("\n", pos, "case") if (end == -1) break # get the line l = get_range(pos, end) pos = end + 1 # does it match a color specification? if (search_string(l, "^\"(.).*[ \t]c[ \t]([^ \t\"]+)\",[ \t]*$", 0, "regex") != -1) { v = replace_in_string(l, "^\"(.).*[ \t]c[ \t]([^ \t\"]+)\",[ \t]*$", "\\1\t\\2", "regex") s = element_i(v, 0, "\t") c = element_i(v, 1, "\t") got_one = 1 # we're in the color specification part if (tolower(c) == "none") # special case: no color continue new_bls = new_bls ";" toascii(s) ":" c } else if (got_one) # not a color line: color specification part finished break } set_backlight_string() bls = $backlight_string # pick up old highlighting if (bls != "") new_bls = bls new_bls else new_bls = substring(new_bls, 1) set_backlight_string(new_bls) set_language_mode("XPM pixmap") ============================================================================= Backlight>Set Default Backlighting set_backlight_string() ============================================================================= Backlight>Remove Backlighting set_backlight_string("") ============================================================================= Backlight>Show Backlighting Groups NEDIT_require_macro_file("backlight.nm") backlight_display_backlights() ============================================================================= Backlight>Change Backlighting Groups NEDIT_require_macro_file("backlight.nm") backlight_manip_backlights() ============================================================================= Backlight>Forget Backlighting Groups NEDIT_require_macro_file("backlight.nm") for (g in $backlights) delete $backlights[g] =============================================================================