CH_STYLE(MenuBar, Style, StyleDefault) { topitem[0] = Null; topitem[1] = topitem[2] = item = SColorHighlight(); topitemtext[0] = menutext = SColorMenuText(); topitemtext[1] = topitemtext[2] = itemtext = SColorHighlightText(); topbar = SColorFace(); maxiconsize = Size(16, 16); arealook = Null; look = SColorFace(); separator = breaksep = SeparatorCtrl::StyleDefault(); ImageBuffer ib(7, 7); Fill(ib, SColorShadow(), 7 * 7); for(int i = 0; i < 5; i++) Fill(ib[i + 1] + 1, SColorMenu(), 5); ib.SetHotSpot(Point(3, 3)); ib.Set2ndSpot(Point(3, 3)); popupframe = Image(ib); popupbody = SColorMenu(); popupiconbar = Null; leftgap = DPI(16) + Zx(4); textgap = Zx(3); lsepm = rsepm = Zx(2); pullshift.x = 0; pullshift.y = -1; }
// frame painting void XMLDragFrame::FramePaint(Draw& w, const Rect& r) { w.DrawRect(r, SColorFace()); int x1 = r.left + 1; int x2 = r.right - 1; int y1 = r.top + 1; int y2 = r.bottom -1; w.DrawLine(x1, y1, x2, y1, 1, SColorLight()); w.DrawLine(x2, y1, x2, y2, 1, SColorShadow()); w.DrawLine(x2, y2, x1, y2, 1, SColorShadow()); w.DrawLine(x1, y2, x1, y1, 1, SColorLight()); if(align == ToolBar::BAR_LEFT || align == ToolBar::BAR_RIGHT) { x1 = r.left + 5; x2 = r.right - 5; y1 = r.top + 4; y2 = r.top + 9; w.DrawLine(x1, y1, x2, y1, 2, SColorShadow()); w.DrawLine(x1, y2, x2, y2, 2, SColorShadow()); } else { x1 = r.left + 4; x2 = r.left + 9; y1 = r.top + 5; y2 = r.bottom - 5; w.DrawLine(x1, y1, x1, y2, 2, SColorShadow()); w.DrawLine(x2, y1, x2, y2, 2, SColorShadow()); } }
CH_STYLE(SeparatorCtrl, Style, StyleDefault) { l1 = SColorShadow(); l2 = Null; }