no changes, just removed TABs/trailing spaces

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-07 22:56:34 +00:00
parent e4f9c52180
commit f4322df68b
38 changed files with 247 additions and 261 deletions

View File

@@ -1,14 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: main.cpp
// Purpose: Entry point
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// We don't put main() in the library any more. RR.

View File

@@ -45,10 +45,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
if (style & wxYES_NO) if (style & wxYES_NO)
{ {
if (style & wxCANCEL) if (style & wxCANCEL)
buttons = GTK_BUTTONS_NONE; buttons = GTK_BUTTONS_NONE;
else else
buttons = GTK_BUTTONS_YES_NO; buttons = GTK_BUTTONS_YES_NO;
} }
if (style & wxOK) if (style & wxOK)
@@ -84,14 +84,14 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
if (style & wxYES_NO) if (style & wxYES_NO)
{ {
if (style & wxCANCEL) if (style & wxCANCEL)
{ {
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO, gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO,
GTK_RESPONSE_NO); GTK_RESPONSE_NO);
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL, gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL); GTK_RESPONSE_CANCEL);
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES, gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES,
GTK_RESPONSE_YES); GTK_RESPONSE_YES);
} }
if (style & wxNO_DEFAULT) if (style & wxNO_DEFAULT)
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO); gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
else else

View File

@@ -549,9 +549,9 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
void wxGLCanvas::SetCurrent(const wxGLContext& RC) const void wxGLCanvas::SetCurrent(const wxGLContext& RC) const
{ {
// although on MSW it works even if the window is still hidden, it doesn't // although on MSW it works even if the window is still hidden, it doesn't
// under wxGTK and documentation mentions that SetCurrent() can only be // under wxGTK and documentation mentions that SetCurrent() can only be
// called for a shown window, so check it // called for a shown window, so check it
wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") ); wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") );
RC.SetCurrent(*this); RC.SetCurrent(*this);
} }

View File

@@ -42,7 +42,7 @@ int GetScrollPosWX (HWND hWnd, int iSBar)
} }
BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount, BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount,
CONST RECT* lpRect, CONST RECT* lpClipRect) CONST RECT* lpRect, CONST RECT* lpClipRect)
{ {
/* TODO */ /* TODO */
return FALSE; return FALSE;
@@ -243,34 +243,34 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi); GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi);
/* FIXME many items are guessed for the time being*/ /* FIXME many items are guessed for the time being*/
logFont->lfHeight = fi.height; logFont->lfHeight = fi.height;
/* reversed for kaffe port /* reversed for kaffe port
logFont->tmAscent = fi.height - fi.baseline; logFont->tmAscent = fi.height - fi.baseline;
logFont->tmDescent= fi.baseline; logFont->tmDescent= fi.baseline;
*/ */
logFont->lfWidth = fi.widths['x']; logFont->lfWidth = fi.widths['x'];
logFont->lfWeight = FW_NORMAL; logFont->lfWeight = FW_NORMAL;
logFont->lfEscapement = 0; logFont->lfEscapement = 0;
logFont->lfOrientation = 0; logFont->lfOrientation = 0;
logFont->lfOutPrecision = OUT_OUTLINE_PRECIS; logFont->lfOutPrecision = OUT_OUTLINE_PRECIS;
logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
logFont->lfQuality = DEFAULT_QUALITY; logFont->lfQuality = DEFAULT_QUALITY;
logFont->lfItalic = 0; logFont->lfItalic = 0;
logFont->lfUnderline = 0; logFont->lfUnderline = 0;
logFont->lfStrikeOut = 0; logFont->lfStrikeOut = 0;
/* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/ /* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/
logFont->lfPitchAndFamily = fi.fixed? logFont->lfPitchAndFamily = fi.fixed?
FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH); FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH);
logFont->lfCharSet = OEM_CHARSET; logFont->lfCharSet = OEM_CHARSET;
/* TODO I don't know how to get the font name. May /* TODO I don't know how to get the font name. May
* test for different font classes. * test for different font classes.
*/ */
logFont->lfFaceName[0] = 0; logFont->lfFaceName[0] = 0;
#if 0 #if 0
strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName)); strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName));
#endif #endif
return sz; return sz;
} }
@@ -285,36 +285,36 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
HBITMAP WINAPI HBITMAP WINAPI
CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight) CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
{ {
MWBITMAPOBJ * hbitmap; MWBITMAPOBJ *hbitmap;
int size; int size;
int linelen; int linelen;
if(!hdc) if(!hdc)
return NULL; return NULL;
nWidth = MWMAX(nWidth, 1); nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1); nHeight = MWMAX(nHeight, 1);
/* calc memory allocation size and linelen from width and height*/ /* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen)) if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
return NULL; return NULL;
/* allocate gdi object*/ /* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap) if(!hbitmap)
return NULL; return NULL;
hbitmap->hdr.type = OBJ_BITMAP; hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE; hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth; hbitmap->width = nWidth;
hbitmap->height = nHeight; hbitmap->height = nHeight;
/* create compatible with hdc*/ /* create compatible with hdc*/
hbitmap->planes = hdc->psd->planes; hbitmap->planes = hdc->psd->planes;
hbitmap->bpp = hdc->psd->bpp; hbitmap->bpp = hdc->psd->bpp;
hbitmap->linelen = linelen; hbitmap->linelen = linelen;
hbitmap->size = size; hbitmap->size = size;
return (HBRUSH)hbitmap; return (HBRUSH)hbitmap;
} }
#endif #endif
@@ -325,41 +325,41 @@ CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
HBITMAP WINAPI HBITMAP WINAPI
CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData) CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData)
{ {
MWBITMAPOBJ * hbitmap; MWBITMAPOBJ *hbitmap;
int size; int size;
int linelen; int linelen;
HDC hScreenDC; HDC hScreenDC;
hScreenDC = GetDC(NULL); hScreenDC = GetDC(NULL);
nWidth = MWMAX(nWidth, 1); nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1); nHeight = MWMAX(nHeight, 1);
/* calc memory allocation size and linelen from width and height*/ /* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen)) if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen))
{ {
ReleaseDC(NULL, hScreenDC);
return NULL;
}
ReleaseDC(NULL, hScreenDC); ReleaseDC(NULL, hScreenDC);
return NULL;
}
ReleaseDC(NULL, hScreenDC);
/* allocate gdi object*/ /* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size); hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap) if(!hbitmap)
return NULL; return NULL;
hbitmap->hdr.type = OBJ_BITMAP; hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE; hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth; hbitmap->width = nWidth;
hbitmap->height = nHeight; hbitmap->height = nHeight;
/* create with specified parameters */ /* create with specified parameters */
hbitmap->planes = nPlanes; hbitmap->planes = nPlanes;
hbitmap->bpp = bPP; hbitmap->bpp = bPP;
hbitmap->linelen = linelen; hbitmap->linelen = linelen;
hbitmap->size = size; hbitmap->size = size;
/* TODO: copy data */ /* TODO: copy data */
return (HBRUSH)hbitmap; return (HBRUSH)hbitmap;
} }

View File

@@ -42,7 +42,7 @@
#endif #endif
#include "wx/msw/printwin.h" #include "wx/msw/printwin.h"
#include "wx/msw/printdlg.h" // RJL used Windows dialog?s #include "wx/msw/printdlg.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include <stdlib.h> #include <stdlib.h>
@@ -368,7 +368,7 @@ void wxWindowsPrintPreview::DetermineScaling()
int logPPIPrinterX; int logPPIPrinterX;
int logPPIPrinterY; int logPPIPrinterY;
wxRect paperRect; wxRect paperRect;
if ( printerDC.Ok() ) if ( printerDC.Ok() )
{ {
@@ -380,7 +380,7 @@ void wxWindowsPrintPreview::DetermineScaling()
logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX); logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX);
logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY); logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY);
paperRect = printerDC.GetPaperRect(); paperRect = printerDC.GetPaperRect();
if ( logPPIPrinterX == 0 || if ( logPPIPrinterX == 0 ||
logPPIPrinterY == 0 || logPPIPrinterY == 0 ||
@@ -400,7 +400,7 @@ void wxWindowsPrintPreview::DetermineScaling()
logPPIPrinterX = 600; logPPIPrinterX = 600;
logPPIPrinterY = 600; logPPIPrinterY = 600;
paperRect = wxRect(0, 0, printerXRes, printerYRes); paperRect = wxRect(0, 0, printerXRes, printerYRes);
m_isOk = false; m_isOk = false;
} }
m_pageWidth = printerXRes; m_pageWidth = printerXRes;