[Commits] (davids) colheader - updated wxDC usage to (hopefully) Best Practices

commits at osafoundation.org commits at osafoundation.org
Tue Apr 19 15:22:23 PDT 2005


Commit by: davids
Modified files:
internal/wxPython-2.5/include/wx/generic/colheader.h 1.37 1.38
internal/wxPython-2.5/src/generic/colheader.cpp 1.73 1.74

Log message:

colheader - updated wxDC usage to (hopefully) Best Practices
r=TBD



ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/include/wx/generic/colheader.h.diff?r1=text&tr1=1.37&r2=text&tr2=1.38
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/src/generic/colheader.cpp.diff?r1=text&tr1=1.73&r2=text&tr2=1.74

Index: internal/wxPython-2.5/include/wx/generic/colheader.h
diff -u internal/wxPython-2.5/include/wx/generic/colheader.h:1.37 internal/wxPython-2.5/include/wx/generic/colheader.h:1.38
--- internal/wxPython-2.5/include/wx/generic/colheader.h:1.37	Tue Apr 19 13:21:12 2005
+++ internal/wxPython-2.5/include/wx/generic/colheader.h	Tue Apr 19 15:22:21 2005
@@ -93,7 +93,7 @@
 
 	long GenericDrawItem(
 		wxWindow		*parentW,
-		wxClientDC		*dc,
+		wxDC			*dc,
 		const wxRect		*boundsR,
 		bool				bUseUnicode,
 		bool				bVisibleSelection );
@@ -101,7 +101,7 @@
 #if defined(__WXMAC__)
 	long MacDrawItem(
 		wxWindow		*parentW,
-		wxClientDC		*dc,
+		wxDC			*dc,
 		const wxRect		*boundsR,
 		bool				bUseUnicode,
 		bool				bVisibleSelection );
@@ -113,19 +113,19 @@
 		long				maxWidth,
 		long				&charCount );
 	long CalculateTextExtent(
-		wxClientDC		*dc,
+		wxDC			*dc,
 		bool				bForceRecalc );
 	void InvalidateTextExtent( void );
 
 public:
 	static void GenericDrawSelection(
-		wxClientDC		*dc,
+		wxDC			*dc,
 		const wxRect		*boundsR,
 		const wxColour		*targetColour,
 		long				drawStyle );
 
 	static void GenericDrawSortArrow(
-		wxClientDC		*dc,
+		wxDC			*dc,
 		const wxRect		*boundsR,
 		bool				bSortAscending );
 	static void GenericGetSortArrowBounds(
@@ -316,7 +316,7 @@
 		long				itemIndex );
 
 	wxSize GetLabelTextExtent(
-		wxClientDC			*dc,
+		wxDC				*dc,
 		const wxString			&targetStr );
 
 	void DisposeItemList( void );

Index: internal/wxPython-2.5/src/generic/colheader.cpp
diff -u internal/wxPython-2.5/src/generic/colheader.cpp:1.73 internal/wxPython-2.5/src/generic/colheader.cpp:1.74
--- internal/wxPython-2.5/src/generic/colheader.cpp:1.73	Tue Apr 19 13:21:13 2005
+++ internal/wxPython-2.5/src/generic/colheader.cpp	Tue Apr 19 15:22:21 2005
@@ -1343,7 +1343,7 @@
 
 	if (m_BUseGenericRenderer)
 	{
-	wxClientDC	dc( this );
+	wxPaintDC	dc( this );
 	long			i;
 
 		dc.SetFont( m_Font );
@@ -1372,7 +1372,7 @@
 		if (m_BVisibleSelection && (m_ItemSelected >= 0))
 			if (GetItemBounds( m_ItemSelected, &boundsR ))
 			{
-			wxClientDC		dc( this );
+			wxPaintDC		dc( this );
 
 				wxColumnHeaderItem::GenericDrawSelection( &dc, &boundsR, &m_SelectionColour, m_SelectionDrawStyle );
 			}
@@ -1381,7 +1381,7 @@
 #elif defined(__WXMAC__)
 	if (! m_BUseGenericRenderer)
 	{
-	wxClientDC	dc( this );
+	wxPaintDC	dc( this );
 	long			i;
 
 		dc.SetFont( m_Font );
@@ -1433,7 +1433,7 @@
 }
 
 wxSize wxColumnHeader::GetLabelTextExtent(
-	wxClientDC			*dc,
+	wxDC				*dc,
 	const wxString			&targetStr )
 {
 wxSize		resultV;
@@ -1945,7 +1945,7 @@
 #if defined(__WXMAC__)
 long wxColumnHeaderItem::MacDrawItem(
 	wxWindow		*parentW,
-	wxClientDC		*dc,
+	wxDC			*dc,
 	const wxRect		*boundsR,
 	bool				bUseUnicode,
 	bool				bVisibleSelection )
@@ -2068,7 +2068,7 @@
 
 long wxColumnHeaderItem::GenericDrawItem(
 	wxWindow		*parentW,
-	wxClientDC		*dc,
+	wxDC			*dc,
 	const wxRect		*boundsR,
 	bool				bUseUnicode,
 	bool				bVisibleSelection )
@@ -2247,7 +2247,7 @@
 }
 
 long wxColumnHeaderItem::CalculateTextExtent(
-	wxClientDC		*dc,
+	wxDC			*dc,
 	bool				bForceRecalc )
 {
 wxCoord		targetWidth, targetHeight;
@@ -2323,7 +2323,7 @@
 
 // static
 void wxColumnHeaderItem::GenericDrawSelection(
-	wxClientDC			*dc,
+	wxDC				*dc,
 	const wxRect			*boundsR,
 	const wxColour			*targetColour,
 	long					drawStyle )
@@ -2426,7 +2426,7 @@
 
 // static
 void wxColumnHeaderItem::GenericDrawSortArrow(
-	wxClientDC			*dc,
+	wxDC				*dc,
 	const wxRect			*boundsR,
 	bool					bSortAscending )
 {



More information about the Commits mailing list