void eWindowStyleSimple::drawFrame(gPainter &painter, const eRect &frame, int what) { gColor c1, c2; switch (what) { case frameButton: c1 = m_border_color_tl; c2 = m_border_color_br; break; case frameListboxEntry: c1 = m_border_color_br; c2 = m_border_color_tl; break; } painter.setForegroundColor(c2); painter.line(frame.topLeft1(), frame.topRight1()); painter.line(frame.topRight1(), frame.bottomRight1()); painter.setForegroundColor(c1); painter.line(frame.bottomRight1(), frame.bottomLeft1()); painter.line(frame.bottomLeft1(), frame.topLeft1()); }
void eWindowStyleSimple::paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) { painter.setForegroundColor(m_title_color_back); painter.fill(eRect(2, 2, wnd->size().width() - 4, m_border_top - 4)); painter.setBackgroundColor(m_title_color_back); painter.setForegroundColor(m_title_color); painter.setFont(m_fnt); painter.renderText(eRect(3, 3, wnd->size().width() - 6, m_border_top - 6), title); eRect frame(ePoint(0, 0), wnd->size()); painter.setForegroundColor(m_background_color); painter.line(frame.topLeft1(), frame.topRight1()); painter.line(frame.topLeft1(), frame.bottomLeft1()); painter.setForegroundColor(m_border_color_tl); painter.line(frame.topLeft1()+eSize(1,1), frame.topRight1()+eSize(0,1)); painter.line(frame.topLeft1()+eSize(1,1), frame.bottomLeft1()+eSize(1,0)); painter.setForegroundColor(m_border_color_br); painter.line(frame.bottomLeft()+eSize(1,-1), frame.bottomRight()+eSize(0,-1)); painter.line(frame.topRight1()+eSize(-1,1), frame.bottomRight1()+eSize(-1, 0)); painter.line(frame.bottomLeft()+eSize(1,-2), frame.bottomRight()+eSize(0,-2)); painter.line(frame.topRight1()+eSize(-0,1), frame.bottomRight1()+eSize(-0, 0)); }