// 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"
#include "wx/utils.h"
#endif
+#if wxUSE_OWNER_DRAWN
+
#include "wx/ownerdrw.h"
#include "wx/menuitem.h"
// ctor
// ----
-wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
+wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
bool bCheckable, bool bMenuItem)
: m_strName(str)
{
// set the colors
// --------------
DWORD colBack, colText;
+// TODO:
+/*
if ( st & wxODSelected ) {
colBack = GetSysColor(COLOR_HIGHLIGHT);
colText = GetSysColor(COLOR_HIGHLIGHTTEXT);
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());
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 {
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);
-*/
}
+*/
}
}
/*
return TRUE;
}
+#endif //wxUSE_OWNER_DRAWN