X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/497cb543c0f96c4b18732729bf14c65fa97afa68..4a40cd9bae5e4e76fadb6188b399905028a02bc7:/src/univ/themes/mono.cpp diff --git a/src/univ/themes/mono.cpp b/src/univ/themes/mono.cpp index 221a7162ff..13c5107e96 100644 --- a/src/univ/themes/mono.cpp +++ b/src/univ/themes/mono.cpp @@ -29,6 +29,7 @@ #if wxUSE_THEME_MONO #ifndef WX_PRECOMP + #include "wx/window.h" #include "wx/dc.h" #endif // WX_PRECOMP @@ -53,6 +54,13 @@ class wxMonoRenderer : public wxStdRenderer public: wxMonoRenderer(const wxColourScheme *scheme); + virtual void DrawLabel(wxDC& dc, + const wxString& label, + const wxRect& rect, + int flags = 0, + int alignment = wxALIGN_LEFT | wxALIGN_TOP, + int indexAccel = -1, + wxRect *rectBounds = NULL); virtual void DrawButtonLabel(wxDC& dc, const wxString& label, const wxBitmap& image, @@ -62,7 +70,7 @@ public: int indexAccel = -1, wxRect *rectBounds = NULL); - virtual void DrawFocusRect(wxDC& dc, const wxRect& rect, int flags = 0); + virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0); virtual void DrawButtonBorder(wxDC& dc, const wxRect& rect, @@ -600,11 +608,12 @@ wxColour wxMonoColourScheme::Get(wxMonoColourScheme::StdColour col) const case TITLEBAR_ACTIVE: case HIGHLIGHT_TEXT: case DESKTOP: + case FRAME: return GetBg(); case MAX: default: - wxFAIL_MSG(_T("invalid standard colour")); + wxFAIL_MSG(wxT("invalid standard colour")); // fall through case SHADOW_DARK: @@ -649,15 +658,16 @@ wxRect wxMonoRenderer::GetBorderDimensions(wxBorder border) const case wxBORDER_STATIC: case wxBORDER_RAISED: case wxBORDER_SUNKEN: + case wxBORDER_THEME: width = 1; break; - + /* case wxBORDER_DOUBLE: width = 2; break; - + */ default: - wxFAIL_MSG(_T("unknown border type")); + wxFAIL_MSG(wxT("unknown border type")); // fall through case wxBORDER_DEFAULT: @@ -701,7 +711,7 @@ wxMonoRenderer::DrawVerticalLine(wxDC& dc, wxCoord x, wxCoord y1, wxCoord y2) dc.DrawLine(x, y1, x, y2 + 1); } -void wxMonoRenderer::DrawFocusRect(wxDC& dc, const wxRect& rect, int flags) +void wxMonoRenderer::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRect& rect, int flags) { // no need to draw the focus rect for selected items, it would be invisible // anyhow @@ -717,6 +727,17 @@ void wxMonoRenderer::DrawFocusRect(wxDC& dc, const wxRect& rect, int flags) // label // ---------------------------------------------------------------------------- +void wxMonoRenderer::DrawLabel(wxDC& dc, + const wxString& label, + const wxRect& rect, + int WXUNUSED(flags), + int alignment, + int indexAccel, + wxRect *rectBounds) +{ + dc.DrawLabel(label, wxNullBitmap, rect, alignment, indexAccel, rectBounds); +} + void wxMonoRenderer::DrawButtonLabel(wxDC& dc, const wxString& label, const wxBitmap& image, @@ -726,7 +747,6 @@ void wxMonoRenderer::DrawButtonLabel(wxDC& dc, int indexAccel, wxRect *rectBounds) { - dc.SetTextForeground(m_penFg.GetColour()); dc.DrawLabel(label, image, rect, alignment, indexAccel, rectBounds); if ( flags & wxCONTROL_DISABLED ) @@ -809,19 +829,19 @@ void wxMonoRenderer::DrawToolBarButton(wxDC& WXUNUSED(dc), long WXUNUSED(style), int WXUNUSED(tbarStyle)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } wxSize wxMonoRenderer::GetToolBarButtonSize(wxCoord *WXUNUSED(separator)) const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } wxSize wxMonoRenderer::GetToolBarMargin() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } @@ -842,19 +862,19 @@ void wxMonoRenderer::DrawTab(wxDC& WXUNUSED(dc), int WXUNUSED(flags), int WXUNUSED(indexAccel)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } wxSize wxMonoRenderer::GetTabIndent() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } wxSize wxMonoRenderer::GetTabPadding() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } @@ -872,7 +892,7 @@ void wxMonoRenderer::GetComboBitmaps(wxBitmap *WXUNUSED(bmpNormal), wxBitmap *WXUNUSED(bmpPressed), wxBitmap *WXUNUSED(bmpDisabled)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } #endif // wxUSE_COMBOBOX @@ -889,7 +909,7 @@ void wxMonoRenderer::DrawMenuBarItem(wxDC& WXUNUSED(dc), int WXUNUSED(flags), int WXUNUSED(indexAccel)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } void wxMonoRenderer::DrawMenuItem(wxDC& WXUNUSED(dc), @@ -901,19 +921,19 @@ void wxMonoRenderer::DrawMenuItem(wxDC& WXUNUSED(dc), int WXUNUSED(flags), int WXUNUSED(indexAccel)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } void wxMonoRenderer::DrawMenuSeparator(wxDC& WXUNUSED(dc), wxCoord WXUNUSED(y), const wxMenuGeometryInfo& WXUNUSED(geomInfo)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } wxSize wxMonoRenderer::GetMenuBarItemSize(const wxSize& WXUNUSED(sizeText)) const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } @@ -921,7 +941,7 @@ wxSize wxMonoRenderer::GetMenuBarItemSize(const wxSize& WXUNUSED(sizeText)) cons wxMenuGeometryInfo *wxMonoRenderer::GetMenuGeometry(wxWindow *WXUNUSED(win), const wxMenu& WXUNUSED(menu)) const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return NULL; } @@ -942,7 +962,7 @@ void wxMonoRenderer::DrawSliderShaft(wxDC& WXUNUSED(dc), long WXUNUSED(style), wxRect *WXUNUSED(rectShaft)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } @@ -952,7 +972,7 @@ void wxMonoRenderer::DrawSliderThumb(wxDC& WXUNUSED(dc), int WXUNUSED(flags), long WXUNUSED(style)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } void wxMonoRenderer::DrawSliderTicks(wxDC& WXUNUSED(dc), @@ -965,19 +985,19 @@ void wxMonoRenderer::DrawSliderTicks(wxDC& WXUNUSED(dc), int WXUNUSED(flags), long WXUNUSED(style)) { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); } wxCoord wxMonoRenderer::GetSliderDim() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return 0; } wxCoord wxMonoRenderer::GetSliderTickLen() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return 0; } @@ -988,7 +1008,7 @@ wxRect wxMonoRenderer::GetSliderShaftRect(const wxRect& WXUNUSED(rect), wxOrientation WXUNUSED(orient), long WXUNUSED(style)) const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxRect(); } @@ -997,7 +1017,7 @@ wxSize wxMonoRenderer::GetSliderThumbSize(const wxRect& WXUNUSED(rect), int WXUNUSED(lenThumb), wxOrientation WXUNUSED(orient)) const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } @@ -1006,7 +1026,7 @@ wxSize wxMonoRenderer::GetSliderThumbSize(const wxRect& WXUNUSED(rect), wxSize wxMonoRenderer::GetProgressBarStep() const { - wxFAIL_MSG(_T("TODO")); + wxFAIL_MSG(wxT("TODO")); return wxSize(); } @@ -1022,7 +1042,7 @@ void wxMonoRenderer::DrawArrow(wxDC& dc, int WXUNUSED(flags)) { ArrowDirection arrowDir = GetArrowDirection(dir); - wxCHECK_RET( arrowDir != Arrow_Max, _T("invalid arrow direction") ); + wxCHECK_RET( arrowDir != Arrow_Max, wxT("invalid arrow direction") ); wxBitmap& bmp = m_bmpArrows[arrowDir]; if ( !bmp.Ok() )