projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed incorrect param from docs
[wxWidgets.git]
/
src
/
os2
/
ownerdrw.cpp
diff --git
a/src/os2/ownerdrw.cpp
b/src/os2/ownerdrw.cpp
index 458c02a3b213de5e44c0782731fc18ae48851a5c..86d4b6724f79bfed6e19e7a475166e3c6fd06aa2 100644
(file)
--- 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
// 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
///////////////////////////////////////////////////////////////////////////////
// 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"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-32,7
+36,7
@@
// ctor
// ----
// ctor
// ----
-wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
+wxOwnerDrawn::wxOwnerDrawn(const wxString& str,
bool bCheckable, bool bMenuItem)
: m_strName(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;
// set the colors
// --------------
DWORD colBack, colText;
+// TODO:
+/*
if ( st & wxODSelected ) {
colBack = GetSysColor(COLOR_HIGHLIGHT);
colText = GetSysColor(COLOR_HIGHLIGHTTEXT);
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);
}
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
// ---------------------------------
// 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());
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
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);
*/
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 {
}
}
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.
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 ) {
&dcMem, 0, 0, wxCOPY,true);
if ( st & wxODSelected ) {
-// TODO:
-/*
#ifdef O_DRAW_NATIVE_API
#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);
rc.GetTop() + m_nHeight };
SetBkColor(hdc, colBack);
DrawEdge(hdc, &rectBmp, EDGE_RAISED, BF_SOFT | BF_RECT);
-*/
}
}
+*/
}
}
/*
}
}
/*