📄 mono.cpp
字号:
dc.DrawLine(rect.GetTopLeft(), rect.GetBottomRight()); dc.DrawLine(rect.GetTopRight(), rect.GetBottomLeft()); }}// ----------------------------------------------------------------------------// bitmaps// ----------------------------------------------------------------------------wxBitmap wxMonoRenderer::GetIndicator(IndicatorType indType, int flags){ IndicatorState indState; IndicatorStatus indStatus; GetIndicatorsFromFlags(flags, indState, indStatus); wxBitmap& bmp = m_bmpIndicators[indType][indState][indStatus]; if ( !bmp.Ok() ) { const char **xpm = ms_xpmIndicators[indType][indState][indStatus]; if ( xpm ) { // create and cache it bmp = wxBitmap(xpm); } } return bmp;}wxBitmap wxMonoRenderer::GetFrameButtonBitmap(FrameButtonType type){ if ( type == FrameButton_Close ) { if ( !m_bmpFrameClose.Ok() ) { static const char *xpmFrameClose[] = { /* columns rows colors chars-per-pixel */ "8 8 2 1", " c white", "X c black", /* pixels */ " ", " XX XX ", " X X ", " XX ", " XX ", " X X ", " XX XX ", " ", }; m_bmpFrameClose = wxBitmap(xpmFrameClose); } return m_bmpFrameClose; } // we don't show any other buttons than close return wxNullBitmap;}// ----------------------------------------------------------------------------// toolbar// ----------------------------------------------------------------------------#if wxUSE_TOOLBARvoid wxMonoRenderer::DrawToolBarButton(wxDC& WXUNUSED(dc), const wxString& WXUNUSED(label), const wxBitmap& WXUNUSED(bitmap), const wxRect& WXUNUSED(rect), int WXUNUSED(flags), long WXUNUSED(style), int WXUNUSED(tbarStyle)){ wxFAIL_MSG(_T("TODO"));}wxSize wxMonoRenderer::GetToolBarButtonSize(wxCoord *WXUNUSED(separator)) const{ wxFAIL_MSG(_T("TODO")); return wxSize();}wxSize wxMonoRenderer::GetToolBarMargin() const{ wxFAIL_MSG(_T("TODO")); return wxSize();}#endif // wxUSE_TOOLBAR// ----------------------------------------------------------------------------// notebook// ----------------------------------------------------------------------------#if wxUSE_NOTEBOOKvoid wxMonoRenderer::DrawTab(wxDC& WXUNUSED(dc), const wxRect& WXUNUSED(rect), wxDirection WXUNUSED(dir), const wxString& WXUNUSED(label), const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(flags), int WXUNUSED(indexAccel)){ wxFAIL_MSG(_T("TODO"));}wxSize wxMonoRenderer::GetTabIndent() const{ wxFAIL_MSG(_T("TODO")); return wxSize();}wxSize wxMonoRenderer::GetTabPadding() const{ wxFAIL_MSG(_T("TODO")); return wxSize();}#endif // wxUSE_NOTEBOOK// ----------------------------------------------------------------------------// combobox// ----------------------------------------------------------------------------#if wxUSE_COMBOBOXvoid wxMonoRenderer::GetComboBitmaps(wxBitmap *WXUNUSED(bmpNormal), wxBitmap *WXUNUSED(bmpFocus), wxBitmap *WXUNUSED(bmpPressed), wxBitmap *WXUNUSED(bmpDisabled)){ wxFAIL_MSG(_T("TODO"));}#endif // wxUSE_COMBOBOX// ----------------------------------------------------------------------------// menus// ----------------------------------------------------------------------------#if wxUSE_MENUSvoid wxMonoRenderer::DrawMenuBarItem(wxDC& WXUNUSED(dc), const wxRect& WXUNUSED(rect), const wxString& WXUNUSED(label), int WXUNUSED(flags), int WXUNUSED(indexAccel)){ wxFAIL_MSG(_T("TODO"));}void wxMonoRenderer::DrawMenuItem(wxDC& WXUNUSED(dc), wxCoord WXUNUSED(y), const wxMenuGeometryInfo& WXUNUSED(geometryInfo), const wxString& WXUNUSED(label), const wxString& WXUNUSED(accel), const wxBitmap& WXUNUSED(bitmap), int WXUNUSED(flags), int WXUNUSED(indexAccel)){ wxFAIL_MSG(_T("TODO"));}void wxMonoRenderer::DrawMenuSeparator(wxDC& WXUNUSED(dc), wxCoord WXUNUSED(y), const wxMenuGeometryInfo& WXUNUSED(geomInfo)){ wxFAIL_MSG(_T("TODO"));}wxSize wxMonoRenderer::GetMenuBarItemSize(const wxSize& WXUNUSED(sizeText)) const{ wxFAIL_MSG(_T("TODO")); return wxSize();}wxMenuGeometryInfo *wxMonoRenderer::GetMenuGeometry(wxWindow *WXUNUSED(win), const wxMenu& WXUNUSED(menu)) const{ wxFAIL_MSG(_T("TODO")); return NULL;}#endif // wxUSE_MENUS// ----------------------------------------------------------------------------// slider// ----------------------------------------------------------------------------#if wxUSE_SLIDERvoid wxMonoRenderer::DrawSliderShaft(wxDC& WXUNUSED(dc), const wxRect& WXUNUSED(rect), int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient), int WXUNUSED(flags), long WXUNUSED(style), wxRect *WXUNUSED(rectShaft)){ wxFAIL_MSG(_T("TODO"));}void wxMonoRenderer::DrawSliderThumb(wxDC& WXUNUSED(dc), const wxRect& WXUNUSED(rect), wxOrientation WXUNUSED(orient), int WXUNUSED(flags), long WXUNUSED(style)){ wxFAIL_MSG(_T("TODO"));}void wxMonoRenderer::DrawSliderTicks(wxDC& WXUNUSED(dc), const wxRect& WXUNUSED(rect), int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient), int WXUNUSED(start), int WXUNUSED(end), int WXUNUSED(step), int WXUNUSED(flags), long WXUNUSED(style)){ wxFAIL_MSG(_T("TODO"));}wxCoord wxMonoRenderer::GetSliderDim() const{ wxFAIL_MSG(_T("TODO")); return 0;}wxCoord wxMonoRenderer::GetSliderTickLen() const{ wxFAIL_MSG(_T("TODO")); return 0;}wxRect wxMonoRenderer::GetSliderShaftRect(const wxRect& WXUNUSED(rect), int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient), long WXUNUSED(style)) const{ wxFAIL_MSG(_T("TODO")); return wxRect();}wxSize wxMonoRenderer::GetSliderThumbSize(const wxRect& WXUNUSED(rect), int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient)) const{ wxFAIL_MSG(_T("TODO")); return wxSize();}#endif // wxUSE_SLIDERwxSize wxMonoRenderer::GetProgressBarStep() const{ wxFAIL_MSG(_T("TODO")); return wxSize();}// ----------------------------------------------------------------------------// scrollbar// ----------------------------------------------------------------------------void wxMonoRenderer::DrawArrow(wxDC& dc, wxDirection dir, const wxRect& rect, int WXUNUSED(flags)){ ArrowDirection arrowDir = GetArrowDirection(dir); wxCHECK_RET( arrowDir != Arrow_Max, _T("invalid arrow direction") ); wxBitmap& bmp = m_bmpArrows[arrowDir]; if ( !bmp.Ok() ) { bmp = wxBitmap(ms_xpmArrows[arrowDir]); } wxRect rectArrow(0, 0, bmp.GetWidth(), bmp.GetHeight()); dc.DrawBitmap(bmp, rectArrow.CentreIn(rect).GetPosition(), true /* use mask */);}void wxMonoRenderer::DrawScrollbarThumb(wxDC& dc, wxOrientation WXUNUSED(orient), const wxRect& rect, int WXUNUSED(flags)){ DrawSolidRect(dc, wxMONO_BG_COL, rect); // manually draw stipple pattern (wxDFB doesn't implement the wxSTIPPLE // brush style): dc.SetPen(m_penFg); for ( wxCoord y = rect.GetTop(); y <= rect.GetBottom(); y++ ) { for ( wxCoord x = rect.GetLeft() + (y % 2); x <= rect.GetRight(); x+=2 ) { dc.DrawPoint(x, y); } }}void wxMonoRenderer::DrawScrollbarShaft(wxDC& dc, wxOrientation WXUNUSED(orient), const wxRect& rect, int WXUNUSED(flags)){ DrawSolidRect(dc, wxMONO_BG_COL, rect);}// ----------------------------------------------------------------------------// status bar// ----------------------------------------------------------------------------#if wxUSE_STATUSBARwxCoord wxMonoRenderer::GetStatusBarBorderBetweenFields() const{ return 1;}wxSize wxMonoRenderer::GetStatusBarFieldMargins() const{ return wxSize(1, 1);}#endif // wxUSE_STATUSBAR// ----------------------------------------------------------------------------// top level windows// ----------------------------------------------------------------------------int wxMonoRenderer::GetFrameBorderWidth(int WXUNUSED(flags)) const{ // all our borders are simple return 1;}// ----------------------------------------------------------------------------// wxMonoArtProvider// ----------------------------------------------------------------------------wxBitmap wxMonoArtProvider::CreateBitmap(const wxArtID& WXUNUSED(id), const wxArtClient& WXUNUSED(client), const wxSize& WXUNUSED(size)){ return wxNullBitmap;}#endif // wxUSE_THEME_MONO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -