[Commits] (davids) colheader - various tweaks to selection drawing

commits at osafoundation.org commits at osafoundation.org
Sun Apr 10 14:21:25 PDT 2005


Commit by: davids
Modified files:
internal/wxPython-2.5/include/wx/colheader.h 1.7 1.8
internal/wxPython-2.5/include/wx/generic/colheader.h 1.26 1.27
internal/wxPython-2.5/src/generic/colheader.cpp 1.59 1.60
internal/wxPython-2.5/wxPython/src/_colheader_rename.i 1.5 1.6
internal/wxPython-2.5/wxPython/src/colheader.i 1.14 1.15

Log message:

colheader - various tweaks to selection drawing
r=TBD



ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/include/wx/colheader.h.diff?r1=text&tr1=1.7&r2=text&tr2=1.8
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/include/wx/generic/colheader.h.diff?r1=text&tr1=1.26&r2=text&tr2=1.27
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/src/generic/colheader.cpp.diff?r1=text&tr1=1.59&r2=text&tr2=1.60
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/wxPython/src/_colheader_rename.i.diff?r1=text&tr1=1.5&r2=text&tr2=1.6
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/wxPython/src/colheader.i.diff?r1=text&tr1=1.14&r2=text&tr2=1.15

Index: internal/wxPython-2.5/include/wx/colheader.h
diff -u internal/wxPython-2.5/include/wx/colheader.h:1.7 internal/wxPython-2.5/include/wx/colheader.h:1.8
--- internal/wxPython-2.5/include/wx/colheader.h:1.7	Sun Apr 10 01:01:39 2005
+++ internal/wxPython-2.5/include/wx/colheader.h	Sun Apr 10 14:21:21 2005
@@ -56,6 +56,7 @@
 {
 	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_None,
 	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Native,
+	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_BoldLabel,
 	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Grey,
 	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_InvertBevel,
 	wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Underline,

Index: internal/wxPython-2.5/src/generic/colheader.cpp
diff -u internal/wxPython-2.5/src/generic/colheader.cpp:1.59 internal/wxPython-2.5/src/generic/colheader.cpp:1.60
--- internal/wxPython-2.5/src/generic/colheader.cpp:1.59	Sun Apr 10 01:01:40 2005
+++ internal/wxPython-2.5/src/generic/colheader.cpp	Sun Apr 10 14:21:22 2005
@@ -167,6 +167,12 @@
 
 	m_SelectionColour.Set( 0x66, 0x66, 0x66 );
 
+#if defined(__WXMSW__) || defined(__WXMAC__)
+	m_BFixedHeight = true;
+#else
+	m_BFixedHeight = false;
+#endif
+
 #if defined(__WXMAC__)
 	// NB: or kThemeSystemFontTag, kThemeViewsFontTag
 	m_Font.MacCreateThemeFont( kThemeSmallSystemFont );
@@ -199,9 +205,14 @@
 bool			bResultV;
 
 	localName = name;
-	actualSize = CalculateDefaultSize();
-	if (size.x > 0)
-		actualSize.x = size.x;
+
+	actualSize = size;
+	if (m_BFixedHeight)
+	{
+		actualSize = CalculateDefaultSize();
+		if (size.x > 0)
+			actualSize.x = size.x;
+	}
 
 	// NB: the CreateControl call crashes on MacOS
 #if defined(__WXMSW__)
@@ -228,11 +239,11 @@
 			style, wxDefaultValidator, localName );
 #endif
 
+#if 0
 	if (bResultV)
 	{
 		// NB: is any of this necessary??
 
-#if 0
 		// needed to get the arrow keys normally used for dialog navigation
 		SetWindowStyle( style );
 
@@ -240,8 +251,8 @@
 		// the same as the one specified in pos if we have the controls above it
 		SetBestSize( actualSize );
 		SetPosition( pos );
-#endif
 	}
+#endif
 
 	// NB: is this advisable?
 	wxControl::DoGetPosition( &(m_NativeBoundsR.x), &(m_NativeBoundsR.y) );
@@ -2194,6 +2205,7 @@
 	{
 	case wxCOLUMNHEADER_SELECTIONDRAWSTYLE_None:
 	case wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Native:
+	case wxCOLUMNHEADER_SELECTIONDRAWSTYLE_BoldLabel:
 		// performed elsewheres or not at all
 		break;
 

Index: internal/wxPython-2.5/include/wx/generic/colheader.h
diff -u internal/wxPython-2.5/include/wx/generic/colheader.h:1.26 internal/wxPython-2.5/include/wx/generic/colheader.h:1.27
--- internal/wxPython-2.5/include/wx/generic/colheader.h:1.26	Sun Apr 10 01:01:40 2005
+++ internal/wxPython-2.5/include/wx/generic/colheader.h	Sun Apr 10 14:21:22 2005
@@ -359,6 +359,7 @@
 	long					m_ItemCount;
 	long					m_ItemSelected;
 	long					m_SelectionDrawStyle;
+	bool					m_BFixedHeight;
 	bool					m_BProportionalResizing;
 	bool					m_BVisibleSelection;
 	bool					m_BUseUnicode;

Index: internal/wxPython-2.5/wxPython/src/colheader.i
diff -u internal/wxPython-2.5/wxPython/src/colheader.i:1.14 internal/wxPython-2.5/wxPython/src/colheader.i:1.15
--- internal/wxPython-2.5/wxPython/src/colheader.i:1.14	Sun Apr 10 01:01:41 2005
+++ internal/wxPython-2.5/wxPython/src/colheader.i	Sun Apr 10 14:21:23 2005
@@ -58,6 +58,7 @@
 {
     wxCOLUMNHEADER_SELECTIONDRAWSTYLE_None,
     wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Native,
+    wxCOLUMNHEADER_SELECTIONDRAWSTYLE_BoldLabel,
     wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Grey,
     wxCOLUMNHEADER_SELECTIONDRAWSTYLE_InvertBevel,
     wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Underline,

Index: internal/wxPython-2.5/wxPython/src/_colheader_rename.i
diff -u internal/wxPython-2.5/wxPython/src/_colheader_rename.i:1.5 internal/wxPython-2.5/wxPython/src/_colheader_rename.i:1.6
--- internal/wxPython-2.5/wxPython/src/_colheader_rename.i:1.5	Sun Apr 10 01:01:41 2005
+++ internal/wxPython-2.5/wxPython/src/_colheader_rename.i	Sun Apr 10 14:21:23 2005
@@ -15,6 +15,7 @@
 %rename(COLUMNHEADER_JUST_Right)            wxCOLUMNHEADER_JUST_Right;
 %rename(COLUMNHEADER_SELECTIONDRAWSTYLE_None)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_None;
 %rename(COLUMNHEADER_SELECTIONDRAWSTYLE_Native)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Native;
+%rename(COLUMNHEADER_SELECTIONDRAWSTYLE_BoldLabel)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_BoldLabel;
 %rename(COLUMNHEADER_SELECTIONDRAWSTYLE_Grey)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Grey;
 %rename(COLUMNHEADER_SELECTIONDRAWSTYLE_InvertBevel)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_InvertBevel;
 %rename(COLUMNHEADER_SELECTIONDRAWSTYLE_Underline)  wxCOLUMNHEADER_SELECTIONDRAWSTYLE_Underline;



More information about the Commits mailing list