Get rid of the class naming conflict with the base header for Print and supress some warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2004-10-21 17:38:06 +00:00
parent b5f10b014c
commit 7804d121cb
4 changed files with 31 additions and 25 deletions

View File

@@ -24,29 +24,29 @@
#include "wx/os2/print.h" #include "wx/os2/print.h"
#include "wx/generic/prntdlgg.h" #include "wx/generic/prntdlgg.h"
IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase) IMPLEMENT_DYNAMIC_CLASS(wxOS2Printer, wxPrinterBase)
IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase) IMPLEMENT_CLASS(wxOS2PrintPreview, wxPrintPreviewBase)
/* /*
* Printer * Printer
*/ */
wxPrinter::wxPrinter(wxPrintData *data): wxOS2Printer::wxOS2Printer(wxPrintData *data):
wxPrinterBase((wxPrintDialogData*)data) wxPrinterBase((wxPrintDialogData*)data)
{ {
} }
wxPrinter::~wxPrinter() wxOS2Printer::~wxOS2Printer()
{ {
} }
bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) bool wxOS2Printer::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
{ {
// TODO. See wxPostScriptPrinter::Print for hints. // TODO. See wxPostScriptPrinter::Print for hints.
return FALSE; return FALSE;
} }
wxDC* wxPrinter::PrintDialog(wxWindow *parent) wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
{ {
// TODO: // TODO:
/* /*
@@ -56,7 +56,7 @@ wxDC* wxPrinter::PrintDialog(wxWindow *parent)
return NULL; return NULL;
} }
bool wxPrinter::Setup(wxWindow *parent) bool wxOS2Printer::Setup(wxWindow *parent)
{ {
// TODO: // TODO:
/* /*
@@ -71,17 +71,17 @@ bool wxPrinter::Setup(wxWindow *parent)
* Print preview * Print preview
*/ */
wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data): wxOS2PrintPreview::wxOS2PrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data):
wxPrintPreviewBase(printout, printoutForPrinting, data) wxPrintPreviewBase(printout, printoutForPrinting, data)
{ {
DetermineScaling(); DetermineScaling();
} }
wxPrintPreview::~wxPrintPreview() wxOS2PrintPreview::~wxOS2PrintPreview()
{ {
} }
bool wxPrintPreview::Print(bool interactive) bool wxOS2PrintPreview::Print(bool interactive)
{ {
if (!m_printPrintout) if (!m_printPrintout)
return FALSE; return FALSE;
@@ -90,7 +90,7 @@ bool wxPrintPreview::Print(bool interactive)
return FALSE; return FALSE;
} }
void wxPrintPreview::DetermineScaling() void wxOS2PrintPreview::DetermineScaling()
{ {
// TODO // TODO
} }

View File

@@ -107,11 +107,12 @@ void wxRadioBox::AdjustButtons(
int nStartY; int nStartY;
int nMaxWidth; int nMaxWidth;
int nMaxHeight; int nMaxHeight;
wxFont vFont = GetFont();
wxGetCharSize( m_hWnd wxGetCharSize( m_hWnd
,&nCx1 ,&nCx1
,&nCy1 ,&nCy1
,&GetFont() ,&vFont
); );
vMaxSize = GetMaxButtonSize(); vMaxSize = GetMaxButtonSize();
nMaxWidth = vMaxSize.x; nMaxWidth = vMaxSize.x;
@@ -463,6 +464,7 @@ void wxRadioBox::DoSetSize(
int nTotHeight; int nTotHeight;
int nStartX; int nStartX;
int nStartY; int nStartY;
wxFont vFont = GetFont();
m_nSizeFlags = nSizeFlags; m_nSizeFlags = nSizeFlags;
GetPosition( &nCurrentX GetPosition( &nCurrentX
@@ -484,7 +486,7 @@ void wxRadioBox::DoSetSize(
wxGetCharSize( m_hWnd wxGetCharSize( m_hWnd
,&nCx1 ,&nCx1
,&nCy1 ,&nCy1
,&GetFont() ,&vFont
); );
// //
@@ -903,11 +905,12 @@ wxSize wxRadioBox::GetTotalButtonSize(
int nHeight; int nHeight;
int nWidth; int nWidth;
int nWidthLabel; int nWidthLabel;
wxFont vFont = GetFont();
wxGetCharSize( m_hWnd wxGetCharSize( m_hWnd
,&nCx1 ,&nCx1
,&nCy1 ,&nCy1
,(wxFont*)&GetFont() ,&vFont
); );
nExtraHeight = nCy1; nExtraHeight = nCy1;

View File

@@ -66,11 +66,12 @@ void wxSlider::AdjustSubControls(
int nCy; int nCy;
int nCyf; int nCyf;
char zBuf[300]; char zBuf[300];
wxFont vFont = this->GetFont();
wxGetCharSize( GetHWND() wxGetCharSize( GetHWND()
,&nCx ,&nCx
,&nCy ,&nCy
,&this->GetFont() ,&vFont
); );
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL) if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
@@ -81,10 +82,10 @@ void wxSlider::AdjustSubControls(
int nMaxLen = 0; int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue) if (m_hStaticValue)
{ {
@@ -132,10 +133,10 @@ void wxSlider::AdjustSubControls(
int nMaxLen = 0; int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue) if (m_hStaticValue)
{ {
@@ -485,6 +486,7 @@ void wxSlider::DoSetSize(
int nCurrentX; int nCurrentX;
int nCurrentY; int nCurrentY;
char zBuf[300]; char zBuf[300];
wxFont vFont = this->GetFont();
// //
// Adjust for OS/2's reverse coordinate system // Adjust for OS/2's reverse coordinate system
@@ -530,7 +532,7 @@ void wxSlider::DoSetSize(
wxGetCharSize( GetHWND() wxGetCharSize( GetHWND()
,&nCx ,&nCx
,&nCy ,&nCy
,&this->GetFont() ,&vFont
); );
if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL) if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
@@ -541,9 +543,9 @@ void wxSlider::DoSetSize(
int nMaxLen = 0; int nMaxLen = 0;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue) if (m_hStaticValue)
{ {
@@ -648,9 +650,9 @@ void wxSlider::DoSetSize(
int nMaxLen; int nMaxLen;
::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMin, 300, zBuf);
GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMinLen, &nCyf, NULL, NULL, &vFont);
::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf); ::WinQueryWindowText((HWND)m_hStaticMax, 300, zBuf);
GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &this->GetFont()); GetTextExtent(zBuf, &nMaxLen, &nCyf, NULL, NULL, &vFont);
if (m_hStaticValue) if (m_hStaticValue)
{ {
int nNewWidth = wxMax(nMinLen, nMaxLen); int nNewWidth = wxMax(nMinLen, nMaxLen);

View File

@@ -96,11 +96,12 @@ wxSize wxStaticBox::DoGetBestSize() const
int nCx; int nCx;
int nCy; int nCy;
int wBox; int wBox;
wxFont vFont = GetFont();
wxGetCharSize( GetHWND() wxGetCharSize( GetHWND()
,&nCx ,&nCx
,&nCy ,&nCy
,(wxFont*)&GetFont() ,&vFont
); );
GetTextExtent( wxGetWindowText(m_hWnd) GetTextExtent( wxGetWindowText(m_hWnd)
,&wBox ,&wBox