X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/634157786d854ad3802ebd934d51c4cd9726ef8f..4a64bee465c0dbf3d97fbf290cb2fef4ad41ca34:/src/os2/ownerdrw.cpp diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index 458c02a3b2..86d4b6724f 100644 --- a/src/os2/ownerdrw.cpp +++ b/src/os2/ownerdrw.cpp @@ -2,13 +2,17 @@ // Name: msw/ownerdrw.cpp // Purpose: implementation of wxOwnerDrawn class // Author: David Webster -// Modified by: +// Modified by: // Created: 10/12/99 // RCS-ID: $Id$ // Copyright: (c) David Webster // Licence: wxWindows license /////////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -32,7 +36,7 @@ // ctor // ---- -wxOwnerDrawn::wxOwnerDrawn(const wxString& str, +wxOwnerDrawn::wxOwnerDrawn(const wxString& str, bool bCheckable, bool bMenuItem) : m_strName(str) { @@ -100,6 +104,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt // set the colors // -------------- DWORD colBack, colText; +// TODO: +/* if ( st & wxODSelected ) { colBack = GetSysColor(COLOR_HIGHLIGHT); colText = GetSysColor(COLOR_HIGHLIGHTTEXT); @@ -109,14 +115,14 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt colBack = m_colBack.Ok() ? ToRGB(m_colBack) : GetSysColor(COLOR_WINDOW); colText = m_colText.Ok() ? ToRGB(m_colText) : GetSysColor(COLOR_WINDOWTEXT); } - - dc.SetTextForeground(wxColor(UnRGB(colText))); - dc.SetTextBackground(wxColor(UnRGB(colBack))); +*/ +// dc.SetTextForeground(wxColor(UnRGB(colText))); +// dc.SetTextBackground(wxColor(UnRGB(colBack))); // select the font and draw the text // --------------------------------- - // determine where to draw and leave space for a check-mark. + // determine where to draw and leave space for a check-mark. int x = rc.x + GetMarginWidth(); dc.SetFont(GetFont()); @@ -136,14 +142,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt RECT rect = { 0, 0, GetMarginWidth(), m_nHeight }; // finally copy it to screen DC and clean up - BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight, + BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight, hdcMem, 0, 0, SRCCOPY); DeleteDC(hdcMem); */ -#else - // #### to do: perhaps using Marlett font (create equiv. font under X) -// wxFAIL("not implemented"); -#endif //O_DRAW_NATIVE_API } } else { @@ -161,22 +163,22 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt wxASSERT((nBmpWidth <= rc.GetWidth()) && (nBmpHeight <= rc.GetHeight())); //MT: blit with mask enabled. - dc.Blit(rc.x + (GetMarginWidth() - nBmpWidth) / 2, - rc.y + (m_nHeight - nBmpHeight) /2, - nBmpWidth, nBmpHeight, +// TODO: +/* + dc.Blit(rc.x + (GetMarginWidth() - nBmpWidth) / 2, + rc.y + (m_nHeight - nBmpHeight) /2, + nBmpWidth, nBmpHeight, &dcMem, 0, 0, wxCOPY,true); if ( st & wxODSelected ) { -// TODO: -/* #ifdef O_DRAW_NATIVE_API - RECT rectBmp = { rc.GetLeft(), rc.GetTop(), - rc.GetLeft() + GetMarginWidth(), + RECT rectBmp = { rc.GetLeft(), rc.GetTop(), + rc.GetLeft() + GetMarginWidth(), rc.GetTop() + m_nHeight }; SetBkColor(hdc, colBack); DrawEdge(hdc, &rectBmp, EDGE_RAISED, BF_SOFT | BF_RECT); -*/ } +*/ } } /*