void DrawMnemonicText(Draw& w, int x, int y, const String& s, Font font, Color color, int mnemonic, bool menumark) { int apos = HIWORD(mnemonic); int q; if(apos && apos < s.GetLength()) q = apos - 1; else { q = s.Find(ToUpper(mnemonic)); if(q < 0) q = s.Find(ToLower(mnemonic)); } w.DrawText(x, y, s, font, color); if(q < 0) return; FontInfo f = font.Info(); w.DrawRect(x + GetTextSize(~s, font, q).cx, y + f.GetAscent() + 1, f[s[q]], 1, menumark ? SColorMenuMark() : SColorMark()); }
PaintInfo::PaintInfo() { sell = selh = 0; tablesel = 0; top = PageY(0, 0); bottom = PageY(INT_MAX, INT_MAX); hyperlink = SColorMark(); usecache = false; sizetracking = false; showcodes = Null; spellingchecker = NULL; highlightpara = -1; highlight = Yellow(); indexentry = LtGreen(); coloroverride = false; context = NULL; showlabels = false; shrink_oversized_objects = false; }