Some Motif fixes; makefile fixes; added wxTransferStreamToFile/FileToStream for wxWin

streams; fixed wxSP_... ids that clashed with wxTextCtrl; added generic GetPixel implementation for GTK/Motif


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-02-24 15:04:24 +00:00
parent 07eb77a690
commit dc1efb1d9f
35 changed files with 643 additions and 53 deletions

View File

@@ -473,6 +473,11 @@ int wxDebugContext::debugLevel = 1;
bool wxDebugContext::debugOn = TRUE;
wxMemStruct *wxDebugContext::checkPoint = NULL;
// For faster alignment calculation
static wxMarkerType markerCalc[2];
int wxDebugContext::m_balign = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]);
int wxDebugContext::m_balignmask = (int)((char *)&markerCalc[1] - (char*)&markerCalc[0]) - 1;
wxDebugContext::wxDebugContext(void)
{
// m_streamBuf = new wxDebugStreamBuf;
@@ -596,6 +601,9 @@ char * wxDebugContext::StartPos (const char * caller)
I don't know how portable this stuff is, but it seems to work for me at
the moment. It would be real nice if I knew more about this!
// Note: this function is now obsolete (along with CalcAlignment)
// because the calculations are done statically, for greater speed.
*/
size_t wxDebugContext::GetPadding (const size_t size)
{
@@ -603,11 +611,22 @@ size_t wxDebugContext::GetPadding (const size_t size)
return (pad) ? sizeof(wxMarkerType) - pad : 0;
}
size_t wxDebugContext::PaddedSize (const size_t size)
{
// Added by Terry Farnham <TJRT@pacbell.net> to replace
// slow GetPadding call.
int padb;
padb = size & m_balignmask;
if(padb)
return(size + m_balign - padb);
else
return(size);
// Old (slow) code
#if 0
return size + GetPadding (size);
#endif
}
/*