DC updates and an associated .Def file update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ac7fb818cc
commit
e1a688e45e
@ -143,16 +143,42 @@ wxDC::wxDC(void)
|
||||
|
||||
m_bOwnsDC = FALSE;
|
||||
m_hDC = 0;
|
||||
m_nDCCount = 0;
|
||||
m_hOldPS = NULL;
|
||||
m_hPS = NULL;
|
||||
m_bIsPaintTime = FALSE; // True at Paint Time
|
||||
m_brush.GetColour().Set("WHITE");
|
||||
}
|
||||
} // end of wxDC::wxDC
|
||||
|
||||
wxDC::~wxDC(void)
|
||||
{
|
||||
}
|
||||
if ( m_hDC != 0 )
|
||||
{
|
||||
SelectOldObjects(m_hDC);
|
||||
|
||||
// if we own the HDC, we delete it, otherwise we just release it
|
||||
|
||||
if (m_bOwnsDC)
|
||||
{
|
||||
if(m_hPS)
|
||||
{
|
||||
::GpiAssociate(m_hPS, NULLHANDLE);
|
||||
::GpiDestroyPS(m_hPS);
|
||||
}
|
||||
m_hPS = NULLHANDLE;
|
||||
::DevCloseDC((HDC)m_hDC);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Just Dissacociate, not destroy if we don't own the DC
|
||||
//
|
||||
if(m_hPS)
|
||||
{
|
||||
::GpiAssociate(m_hPS, NULLHANDLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of wxDC::~wxDC
|
||||
|
||||
// This will select current objects out of the DC,
|
||||
// which is what you have to do before deleting the
|
||||
@ -187,7 +213,7 @@ void wxDC::SelectOldObjects(
|
||||
m_font = wxNullFont;
|
||||
m_backgroundBrush = wxNullBrush;
|
||||
m_vSelectedBitmap = wxNullBitmap;
|
||||
}
|
||||
} // end of wxDC::SelectOldObjects
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// clipping
|
||||
|
@ -96,21 +96,24 @@ wxWindowDC::wxWindowDC(
|
||||
|
||||
m_pCanvas = pTheCanvas;
|
||||
m_hDC = (WXHDC) ::WinOpenWindowDC(GetWinHwnd(pTheCanvas) );
|
||||
m_nDCCount++;
|
||||
|
||||
//
|
||||
// default under PM is that Window and Client DC's are the same
|
||||
// so we offer a separate Presentation Space to use for the
|
||||
// entire window. Otherwise, calling BeginPaint will just create
|
||||
// chached-micro client presentation space
|
||||
//
|
||||
m_hPS = GpiCreatePS( m_hab
|
||||
,m_hDC
|
||||
,&m_PageSize
|
||||
,PU_PELS | GPIF_LONG | GPIA_ASSOC
|
||||
);
|
||||
m_hPS = ::GpiCreatePS( vHabmain
|
||||
,m_hDC
|
||||
,&m_PageSize
|
||||
,PU_PELS | GPIF_LONG | GPIA_ASSOC
|
||||
);
|
||||
::GpiAssociate(m_hPS, NULLHANDLE);
|
||||
::GpiAssociate(m_hPS, m_hDC);
|
||||
|
||||
//
|
||||
// Set the wxWindows color table
|
||||
//
|
||||
if (!::GpiCreateLogColorTable( m_hPS
|
||||
,0L
|
||||
,LCOLF_CONSECRGB
|
||||
@ -130,33 +133,25 @@ wxWindowDC::wxWindowDC(
|
||||
,0L
|
||||
,NULL
|
||||
);
|
||||
SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));
|
||||
::WinQueryWindowRect( GetWinHwnd(m_pCanvas)
|
||||
,&m_vRclPaint
|
||||
);
|
||||
}
|
||||
InitDC();
|
||||
} // end of wxWindowDC::wxWindowDC
|
||||
|
||||
wxWindowDC::~wxWindowDC()
|
||||
void wxWindowDC::InitDC()
|
||||
{
|
||||
if (m_pCanvas && m_hDC)
|
||||
{
|
||||
SelectOldObjects(m_hDC);
|
||||
//
|
||||
// The background mode is only used for text background and is set in
|
||||
// DrawText() to OPAQUE as required, otherwise always TRANSPARENT,
|
||||
//
|
||||
::GpiSetBackMix(GetHPS(), BM_LEAVEALONE);
|
||||
|
||||
//
|
||||
// In PM one does not explicitly close or release an open WindowDC
|
||||
// They automatically close with the window, unless explicitly detached
|
||||
// but we need to destroy our PS
|
||||
//
|
||||
if(m_hPS)
|
||||
{
|
||||
::GpiAssociate(m_hPS, NULLHANDLE);
|
||||
::GpiDestroyPS(m_hPS);
|
||||
}
|
||||
m_hPS = NULLHANDLE;
|
||||
m_hDC = NULLHANDLE;
|
||||
}
|
||||
m_nDCCount--;
|
||||
}
|
||||
//
|
||||
// Default bg colour is pne of the window
|
||||
//
|
||||
SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));
|
||||
} // end of wxWindowDC::InitDC
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxClientDC
|
||||
@ -208,54 +203,18 @@ wxClientDC::wxClientDC(
|
||||
,NULL
|
||||
);
|
||||
//
|
||||
// Default mode is BM_LEAVEALONE so we make no call Set the mix
|
||||
//
|
||||
SetBackground(wxBrush( m_pCanvas->GetBackgroundColour()
|
||||
,wxSOLID
|
||||
)
|
||||
);
|
||||
//
|
||||
// Set the DC/PS rectangle
|
||||
//
|
||||
::WinQueryWindowRect( GetWinHwnd(m_pCanvas)
|
||||
,&m_vRclPaint
|
||||
);
|
||||
InitDC();
|
||||
} // end of wxClientDC::wxClientDC
|
||||
|
||||
wxClientDC::~wxClientDC()
|
||||
{
|
||||
if ( m_pCanvas && GetHdc() )
|
||||
{
|
||||
SelectOldObjects(m_hDC);
|
||||
|
||||
//
|
||||
// We don't explicitly release Device contexts in PM and
|
||||
// the cached micro PS is already gone
|
||||
//
|
||||
m_hDC = 0;
|
||||
}
|
||||
} // end of wxClientDC::~wxClientDC
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPaintDC
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// VZ: initial implementation (by JACS) only remembered the last wxPaintDC
|
||||
// created and tried to reuse - this was supposed to take care of a
|
||||
// situation when a derived class OnPaint() calls base class OnPaint()
|
||||
// because in this case ::BeginPaint() shouldn't be called second time.
|
||||
//
|
||||
// I'm not sure how useful this is, however we must remember the HWND
|
||||
// associated with the last HDC as well - otherwise we may (and will!) try
|
||||
// to reuse the HDC for another HWND which is a nice recipe for disaster.
|
||||
//
|
||||
// So we store a list of windows for which we already have the DC and not
|
||||
// just one single hDC. This seems to work, but I'm really not sure about
|
||||
// the usefullness of the whole idea - IMHO it's much better to not call
|
||||
// base class OnPaint() at all, or, if we really want to allow it, add a
|
||||
// "wxPaintDC *" parameter to wxPaintEvent which should be used if it's
|
||||
// !NULL instead of creating a new DC.
|
||||
|
||||
wxArrayDCInfo wxPaintDC::ms_cache;
|
||||
|
||||
wxPaintDC::wxPaintDC()
|
||||
@ -269,7 +228,6 @@ wxPaintDC::wxPaintDC(
|
||||
)
|
||||
{
|
||||
wxCHECK_RET(pCanvas, wxT("NULL canvas in wxPaintDC ctor"));
|
||||
RECTL vRect;
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
if (g_isPainting <= 0)
|
||||
@ -301,10 +259,6 @@ wxPaintDC::wxPaintDC(
|
||||
);
|
||||
if(hPS)
|
||||
{
|
||||
POINTL vPoint[2];
|
||||
LONG lControl;
|
||||
LONG lColor;
|
||||
|
||||
m_hOldPS = m_hPS;
|
||||
m_hPS = hPS;
|
||||
::GpiCreateLogColorTable( m_hPS
|
||||
@ -332,8 +286,8 @@ wxPaintDC::wxPaintDC(
|
||||
m_hDC = (WXHDC) -1; // to satisfy those anonizmous efforts
|
||||
ms_cache.Add(new wxPaintDCInfo(m_pCanvas, this));
|
||||
}
|
||||
SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));
|
||||
}
|
||||
InitDC();
|
||||
} // end of wxPaintDC::wxPaintDC
|
||||
|
||||
wxPaintDC::~wxPaintDC()
|
||||
{
|
||||
@ -380,3 +334,22 @@ wxPaintDCInfo* wxPaintDC::FindInCache(
|
||||
return pInfo;
|
||||
} // end of wxPaintDC::FindInCache
|
||||
|
||||
// find the entry for this DC in the cache (keyed by the window)
|
||||
WXHDC wxPaintDC::FindDCInCache(
|
||||
wxWindow* pWin
|
||||
)
|
||||
{
|
||||
wxPaintDCInfo* pInfo = NULL;
|
||||
size_t nCache = ms_cache.GetCount();
|
||||
|
||||
for (size_t n = 0; n < nCache; n++)
|
||||
{
|
||||
pInfo = &ms_cache[n];
|
||||
if (pInfo->m_hWnd == pWin->GetHWND())
|
||||
{
|
||||
return pInfo->m_hDC;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // end of wxPaintDC::FindInCache
|
||||
|
||||
|
@ -28,8 +28,37 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
|
||||
|
||||
wxMemoryDC::wxMemoryDC(void)
|
||||
{
|
||||
ERRORID vError;
|
||||
wxString sError;
|
||||
CreateCompatible(NULL);
|
||||
Init();
|
||||
} // end of wxMemoryDC::wxMemoryDC
|
||||
|
||||
wxMemoryDC::wxMemoryDC(
|
||||
wxDC* pOldDC
|
||||
)
|
||||
{
|
||||
pOldDC->BeginDrawing();
|
||||
CreateCompatible(pOldDC);
|
||||
pOldDC->EndDrawing();
|
||||
Init();
|
||||
} // end of wxMemoryDC::wxMemoryDC
|
||||
|
||||
void wxMemoryDC::Init()
|
||||
{
|
||||
if (m_ok)
|
||||
{
|
||||
SetBrush(*wxWHITE_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
|
||||
// the background mode is only used for text background and is set in
|
||||
// DrawText() to OPAQUE as required, otherwise always TRANSPARENT
|
||||
::GpiSetBackMix( GetHPS(), BM_LEAVEALONE );
|
||||
}
|
||||
} // end of wxMemoryDC::Init
|
||||
|
||||
bool wxMemoryDC::CreateCompatible(
|
||||
wxDC* pDC
|
||||
)
|
||||
{
|
||||
HDC hDC;
|
||||
HPS hPS;
|
||||
DEVOPENSTRUC vDOP = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||
@ -48,35 +77,23 @@ wxMemoryDC::wxMemoryDC(void)
|
||||
m_hDC = hDC;
|
||||
m_ok = TRUE;
|
||||
m_bOwnsDC = TRUE;
|
||||
SetBrush(*wxWHITE_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
if (!::GpiCreateLogColorTable( m_hPS
|
||||
,0L
|
||||
,LCOLF_CONSECRGB
|
||||
,0L
|
||||
,(LONG)wxTheColourDatabase->m_nSize
|
||||
,(PLONG)wxTheColourDatabase->m_palTable
|
||||
))
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Unable to set current color table. Error: %s\n", sError);
|
||||
}
|
||||
//
|
||||
// Set the color table to RGB mode
|
||||
// Set the wxWindows color table
|
||||
//
|
||||
if (!::GpiCreateLogColorTable( m_hPS
|
||||
,0L
|
||||
,LCOLF_RGB
|
||||
,0L
|
||||
,0L
|
||||
,NULL
|
||||
))
|
||||
{
|
||||
vError = ::WinGetLastError(vHabmain);
|
||||
sError = wxPMErrorToStr(vError);
|
||||
wxLogError("Unable to set current color table. Error: %s\n", sError);
|
||||
}
|
||||
::GpiCreateLogColorTable( m_hPS
|
||||
,0L
|
||||
,LCOLF_CONSECRGB
|
||||
,0L
|
||||
,(LONG)wxTheColourDatabase->m_nSize
|
||||
,(PLONG)wxTheColourDatabase->m_palTable
|
||||
);
|
||||
::GpiCreateLogColorTable( m_hPS
|
||||
,0L
|
||||
,LCOLF_RGB
|
||||
,0L
|
||||
,0L
|
||||
,NULL
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -93,63 +110,14 @@ wxMemoryDC::wxMemoryDC(void)
|
||||
m_ok = FALSE;
|
||||
m_bOwnsDC = FALSE;
|
||||
}
|
||||
} // end of wxMemoryDC::wxMemoryDC
|
||||
|
||||
wxMemoryDC::wxMemoryDC(
|
||||
wxDC* pOldDC
|
||||
)
|
||||
{
|
||||
HDC hDC;
|
||||
HPS hPS;
|
||||
DEVOPENSTRUC vDOP = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
|
||||
SIZEL vSize = {0, 0};
|
||||
|
||||
pOldDC->BeginDrawing();
|
||||
|
||||
//
|
||||
// Create a memory device context
|
||||
// As we created the DC, we must delete it in the dtor
|
||||
//
|
||||
hDC = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDOP, GetHdcOf(*pOldDC));
|
||||
if (hDC != DEV_ERROR)
|
||||
{
|
||||
hPS = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIT_MICRO | GPIA_ASSOC);
|
||||
if (hPS != GPI_ERROR)
|
||||
{
|
||||
m_hPS = hPS;
|
||||
m_hDC = hDC;
|
||||
m_ok = TRUE;
|
||||
m_bOwnsDC = TRUE;
|
||||
pOldDC->EndDrawing();
|
||||
SetBrush(*wxWHITE_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
pOldDC->EndDrawing();
|
||||
m_hPS = NULLHANDLE;
|
||||
m_hDC = NULLHANDLE;
|
||||
m_ok = FALSE;
|
||||
m_bOwnsDC = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pOldDC->EndDrawing();
|
||||
m_hPS = NULLHANDLE;
|
||||
m_hDC = NULLHANDLE;
|
||||
m_ok = FALSE;
|
||||
m_bOwnsDC = FALSE;
|
||||
}
|
||||
} // end of wxMemoryDC::wxMemoryDC
|
||||
|
||||
wxMemoryDC::~wxMemoryDC()
|
||||
{
|
||||
m_vSelectedBitmap.SetSelectedInto(NULL);
|
||||
if (m_hPS != NULLHANDLE)
|
||||
::GpiDestroyPS(m_hPS);
|
||||
if (m_hDC != NULLHANDLE)
|
||||
::DevCloseDC(m_hDC);
|
||||
} // end of wxMemoryDC::~wxMemoryDC
|
||||
m_bOwnsDC = TRUE;
|
||||
m_ok = m_hDC != 0;
|
||||
return m_ok;
|
||||
} // end of wxMemoryDC::CreateCompatible
|
||||
|
||||
void wxMemoryDC::SelectObject(
|
||||
const wxBitmap& rBitmap
|
||||
@ -211,4 +179,12 @@ void wxMemoryDC::DoGetSize(
|
||||
*pHeight = m_vSelectedBitmap.GetHeight();
|
||||
} // end of wxMemoryDC::DoGetSize
|
||||
|
||||
|
||||
void wxMemoryDC::DoDrawRectangle(
|
||||
wxCoord vX
|
||||
, wxCoord vY
|
||||
, wxCoord vWidth
|
||||
, wxCoord vHeight
|
||||
)
|
||||
{
|
||||
wxDC::DoDrawRectangle(vX, vY, vWidth, vHeight);
|
||||
} // end of wxMemoryDC::DoDrawRectangle
|
||||
|
@ -33,25 +33,30 @@ IMPLEMENT_CLASS(wxPrinterDC, wxDC)
|
||||
|
||||
|
||||
// This form is deprecated
|
||||
wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation)
|
||||
wxPrinterDC::wxPrinterDC(
|
||||
const wxString& rsDriverName
|
||||
, const wxString& rsDeviceName
|
||||
, const wxString& rsFile
|
||||
, bool bInteractive
|
||||
, int nOrientation
|
||||
)
|
||||
{
|
||||
LONG lType = 0;
|
||||
HAB hab = 0;
|
||||
DEVOPENSTRUC devOpen = { (char*)device_name.c_str()
|
||||
,(char*)driver_name.c_str()
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
};
|
||||
DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
|
||||
,(char*)rsDriverName.c_str()
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
,NULL
|
||||
};
|
||||
|
||||
m_isInteractive = interactive;
|
||||
m_isInteractive = bInteractive;
|
||||
|
||||
if (!file.IsNull() && file != wxT(""))
|
||||
m_printData.SetFilename(file);
|
||||
if (!rsFile.IsNull() && rsFile != wxT(""))
|
||||
m_printData.SetFilename(rsFile);
|
||||
|
||||
/*
|
||||
Implement PM's version of this
|
||||
@ -88,24 +93,25 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_nam
|
||||
else
|
||||
#endif
|
||||
*/
|
||||
if ((!driver_name.IsNull() && driver_name != wxT("")) &&
|
||||
(!device_name.IsNull() && device_name != wxT("")) &&
|
||||
(!file.IsNull() && file != wxT("")))
|
||||
if ((!rsDriverName.IsNull() && rsDriverName != wxT("")) &&
|
||||
(!rsDeviceName.IsNull() && rsDeviceName != wxT("")) &&
|
||||
(!rsFile.IsNull() && rsFile != wxT("")))
|
||||
{
|
||||
m_hDC = (WXHDC) ::DevOpenDC( hab
|
||||
m_hDC = (WXHDC) ::DevOpenDC( vHabmain
|
||||
,OD_QUEUED
|
||||
,"*"
|
||||
,5L
|
||||
,(PDEVOPENDATA)&devOpen
|
||||
,(PDEVOPENDATA)&vDevOpen
|
||||
,NULLHANDLE
|
||||
);
|
||||
m_ok = m_hDC ? TRUE: FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxPrintData printData;
|
||||
printData.SetOrientation(orientation);
|
||||
m_hDC = wxGetPrinterDC(printData);
|
||||
wxPrintData vPrintData;
|
||||
|
||||
vPrintData.SetOrientation(nOrientation);
|
||||
m_hDC = wxGetPrinterDC(vPrintData);
|
||||
m_ok = m_hDC ? TRUE: FALSE;
|
||||
}
|
||||
|
||||
@ -117,46 +123,51 @@ wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_nam
|
||||
}
|
||||
SetBrush(*wxBLACK_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
}
|
||||
} // end of wxPrinterDC::wxPrinterDC
|
||||
|
||||
wxPrinterDC::wxPrinterDC(const wxPrintData& printData)
|
||||
wxPrinterDC::wxPrinterDC(
|
||||
const wxPrintData& rPrintData
|
||||
)
|
||||
{
|
||||
m_printData = printData;
|
||||
|
||||
m_printData = rPrintData;
|
||||
m_isInteractive = FALSE;
|
||||
|
||||
m_hDC = wxGetPrinterDC(printData);
|
||||
m_hDC = wxGetPrinterDC(rPrintData);
|
||||
m_ok = (m_hDC != 0);
|
||||
|
||||
if (m_hDC)
|
||||
SetMapMode(wxMM_TEXT);
|
||||
|
||||
SetBrush(*wxBLACK_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
}
|
||||
} // end of wxPrinterDC::wxPrinterDC
|
||||
|
||||
|
||||
wxPrinterDC::wxPrinterDC(WXHDC theDC)
|
||||
wxPrinterDC::wxPrinterDC(
|
||||
WXHDC hTheDC
|
||||
)
|
||||
{
|
||||
m_isInteractive = FALSE;
|
||||
|
||||
m_hDC = theDC;
|
||||
m_hDC = hTheDC;
|
||||
m_ok = TRUE;
|
||||
if (m_hDC)
|
||||
{
|
||||
// int width = GetDeviceCaps(m_hDC, VERTRES);
|
||||
// int height = GetDeviceCaps(m_hDC, HORZRES);
|
||||
SetMapMode(wxMM_TEXT);
|
||||
}
|
||||
SetBrush(*wxBLACK_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
}
|
||||
} // end of wxPrinterDC::wxPrinterDC
|
||||
|
||||
wxPrinterDC::~wxPrinterDC(void)
|
||||
void wxPrinterDC::Init()
|
||||
{
|
||||
}
|
||||
if (m_hDC)
|
||||
{
|
||||
SetMapMode(wxMM_TEXT);
|
||||
|
||||
bool wxPrinterDC::StartDoc(const wxString& message)
|
||||
SetBrush(*wxBLACK_BRUSH);
|
||||
SetPen(*wxBLACK_PEN);
|
||||
}
|
||||
} // end of wxPrinterDC::Init
|
||||
|
||||
bool wxPrinterDC::StartDoc(
|
||||
const wxString& rsMessage
|
||||
)
|
||||
{
|
||||
/* TODO: PM's implementation
|
||||
DOCINFO docinfo;
|
||||
@ -203,29 +214,32 @@ bool wxPrinterDC::StartDoc(const wxString& message)
|
||||
return (ret > 0);
|
||||
*/
|
||||
return(TRUE);
|
||||
}
|
||||
} // end of wxPrinterDC::StartDoc
|
||||
|
||||
void wxPrinterDC::EndDoc(void)
|
||||
void wxPrinterDC::EndDoc()
|
||||
{
|
||||
// if (m_hDC) ::EndDoc((HDC) m_hDC);
|
||||
}
|
||||
} // end of wxPrinterDC::EndDoc
|
||||
|
||||
void wxPrinterDC::StartPage(void)
|
||||
void wxPrinterDC::StartPage()
|
||||
{
|
||||
// if (m_hDC)
|
||||
// ::StartPage((HDC) m_hDC);
|
||||
}
|
||||
} // end of wxPrinterDC::StartPage
|
||||
|
||||
void wxPrinterDC::EndPage(void)
|
||||
void wxPrinterDC::EndPage()
|
||||
{
|
||||
// if (m_hDC)
|
||||
// ::EndPage((HDC) m_hDC);
|
||||
}
|
||||
} // end of wxPrinterDC::EndPage
|
||||
|
||||
// Returns default device and port names
|
||||
static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
|
||||
static bool wxGetDefaultDeviceName(
|
||||
wxString& rsDeviceName
|
||||
, wxString& rsPortName
|
||||
)
|
||||
{
|
||||
deviceName = "";
|
||||
rsDeviceName = "";
|
||||
/*
|
||||
LPDEVNAMES lpDevNames;
|
||||
LPSTR lpszDriverName;
|
||||
@ -279,10 +293,12 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
|
||||
return ( deviceName != wxT("") );
|
||||
*/
|
||||
return(TRUE);
|
||||
}
|
||||
} // end of wxGetDefaultDeviceName
|
||||
|
||||
// Gets an HDC for the specified printer configuration
|
||||
WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
|
||||
WXHDC WXDLLEXPORT wxGetPrinterDC(
|
||||
const wxPrintData& rPrintDataConst
|
||||
)
|
||||
{
|
||||
HDC hDC = NULLHANDLE;
|
||||
/*
|
||||
@ -328,6 +344,42 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
|
||||
GlobalUnlock(hDevMode);
|
||||
*/
|
||||
return (WXHDC) hDC;
|
||||
}
|
||||
} // end of wxGetPrinterDC
|
||||
|
||||
void wxPrinterDC::DoDrawBitmap(
|
||||
const wxBitmap& rBmp
|
||||
, wxCoord vX
|
||||
, wxCoord vY
|
||||
, bool bUseMask
|
||||
)
|
||||
{
|
||||
wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
|
||||
|
||||
int nWidth = rBmp.GetWidth();
|
||||
int nHeight = rBmp.GetHeight();
|
||||
|
||||
// TODO:
|
||||
|
||||
} // end of wxPrinterDC::DoDrawBitmap
|
||||
|
||||
bool wxPrinterDC::DoBlit(
|
||||
wxCoord vXdest
|
||||
, wxCoord vYdest
|
||||
, wxCoord vWidth
|
||||
, wxCoord vHeight
|
||||
, wxDC* pSource
|
||||
, wxCoord vXsrc
|
||||
, wxCoord vYsrc
|
||||
, int nRop
|
||||
, bool bUseMask
|
||||
)
|
||||
{
|
||||
bool bSuccess = TRUE;
|
||||
|
||||
// TODO:
|
||||
|
||||
return bSuccess;
|
||||
} // end of wxPrintDC::DoBlit
|
||||
|
||||
|
||||
#endif //wxUSE_PRINTING_ARCHITECTURE
|
||||
|
@ -35,11 +35,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
|
||||
// Create a DC representing the whole screen
|
||||
wxScreenDC::wxScreenDC()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
m_hDC = ::WinOpenWindowDC(HWND_DESKTOP);
|
||||
m_hPS = ::WinGetScreenPS(HWND_DESKTOP);
|
||||
::GpiSetBackMix(m_hPS, BM_LEAVEALONE);
|
||||
} // end of wxScreenDC::wxScreenDC()
|
||||
|
||||
wxScreenDC::~wxScreenDC()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
@ -201,10 +201,10 @@ EXPORTS
|
||||
__ct__12wxColourDataFRC12wxColourData
|
||||
;wxPrintData::operator=(const wxPrintSetupData&)
|
||||
__as__11wxPrintDataFRC16wxPrintSetupData
|
||||
;wxConstructorForwxPrintDialogData()
|
||||
wxConstructorForwxPrintDialogData__Fv
|
||||
;wxPrintData::~wxPrintData()
|
||||
__dt__11wxPrintDataFv
|
||||
;wxConstructorForwxPrintDialogData()
|
||||
wxConstructorForwxPrintDialogData__Fv
|
||||
;wxPageSetupDialogData::wxPageSetupDialogData()
|
||||
__ct__21wxPageSetupDialogDataFv
|
||||
;wxPrintDialogData::wxPrintDialogData()
|
||||
@ -6804,16 +6804,12 @@ EXPORTS
|
||||
ExtractWildcard__16wxGenericDirCtrlFRC8wxStringiR8wxStringT3
|
||||
;From object file: ..\generic\dragimgg.cpp
|
||||
;PUBDEFs (Symbols available from object file):
|
||||
;wxGenericDragImage::Create(const wxBitmap&,const wxCursor&,const wxPoint&)
|
||||
Create__18wxGenericDragImageFRC8wxBitmapRC8wxCursorRC7wxPoint
|
||||
;wxGenericDragImage::Move(const wxPoint&)
|
||||
Move__18wxGenericDragImageFRC7wxPoint
|
||||
;wxGenericDragImage::BeginDrag(const wxPoint&,wxWindow*,unsigned long,wxRect*)
|
||||
BeginDrag__18wxGenericDragImageFRC7wxPointP8wxWindowUlP6wxRect
|
||||
;wxGenericDragImage::Move(const wxPoint&)
|
||||
Move__18wxGenericDragImageFRC7wxPoint
|
||||
;wxGenericDragImage::~wxGenericDragImage()
|
||||
__dt__18wxGenericDragImageFv
|
||||
;wxGenericDragImage::Create(const wxIcon&,const wxCursor&,const wxPoint&)
|
||||
Create__18wxGenericDragImageFRC6wxIconRC8wxCursorRC7wxPoint
|
||||
;wxGenericDragImage::BeginDrag(const wxPoint&,wxWindow*,wxWindow*)
|
||||
BeginDrag__18wxGenericDragImageFRC7wxPointP8wxWindowT2
|
||||
;wxGenericDragImage::Show()
|
||||
@ -6823,28 +6819,32 @@ EXPORTS
|
||||
;wxGenericDragImage::Create(const wxTreeCtrl&,wxTreeItemId&)
|
||||
Create__18wxGenericDragImageFRC10wxTreeCtrlR12wxTreeItemId
|
||||
__vft18wxGenericDragImage8wxObject
|
||||
;wxGenericDragImage::Create(const wxCursor&)
|
||||
Create__18wxGenericDragImageFRC8wxCursor
|
||||
;wxConstructorForwxGenericDragImage()
|
||||
wxConstructorForwxGenericDragImage__Fv
|
||||
;wxGenericDragImage::RedrawImage(const wxPoint&,const wxPoint&,unsigned long,unsigned long)
|
||||
RedrawImage__18wxGenericDragImageFRC7wxPointT1UlT3
|
||||
;wxGenericDragImage::Create(const wxString&,const wxCursor&,const wxPoint&)
|
||||
Create__18wxGenericDragImageFRC8wxStringRC8wxCursorRC7wxPoint
|
||||
;wxGenericDragImage::GetImageRect(const wxPoint&) const
|
||||
GetImageRect__18wxGenericDragImageCFRC7wxPoint
|
||||
;wxGenericDragImage::Init()
|
||||
Init__18wxGenericDragImageFv
|
||||
;wxGenericDragImage::EndDrag()
|
||||
EndDrag__18wxGenericDragImageFv
|
||||
;wxGenericDragImage::Create(const wxString&,const wxCursor&)
|
||||
Create__18wxGenericDragImageFRC8wxStringRC8wxCursor
|
||||
;wxGenericDragImage::Create(const wxBitmap&,const wxCursor&)
|
||||
Create__18wxGenericDragImageFRC8wxBitmapRC8wxCursor
|
||||
;wxGenericDragImage::UpdateBackingFromWindow(wxDC&,wxMemoryDC&,const wxRect&,const wxRect&) const
|
||||
UpdateBackingFromWindow__18wxGenericDragImageCFR4wxDCR10wxMemoryDCRC6wxRectT3
|
||||
;wxGenericDragImage::Create(const wxCursor&,const wxPoint&)
|
||||
Create__18wxGenericDragImageFRC8wxCursorRC7wxPoint
|
||||
;wxGenericDragImage::DoDrawImage(wxDC&,const wxPoint&) const
|
||||
DoDrawImage__18wxGenericDragImageCFR4wxDCRC7wxPoint
|
||||
;wxGenericDragImage::Create(const wxListCtrl&,long)
|
||||
Create__18wxGenericDragImageFRC10wxListCtrll
|
||||
;wxGenericDragImage::DoDrawImage(wxDC&,const wxPoint&) const
|
||||
DoDrawImage__18wxGenericDragImageCFR4wxDCRC7wxPoint
|
||||
;wxGenericDragImage::sm_classwxGenericDragImage
|
||||
sm_classwxGenericDragImage__18wxGenericDragImage
|
||||
;wxGenericDragImage::Create(const wxIcon&,const wxCursor&)
|
||||
Create__18wxGenericDragImageFRC6wxIconRC8wxCursor
|
||||
;From object file: ..\generic\fontdlgg.cpp
|
||||
;PUBDEFs (Symbols available from object file):
|
||||
;wxGenericFontDialog::OnCloseWindow(wxCloseEvent&)
|
||||
@ -11037,6 +11037,8 @@ EXPORTS
|
||||
;PUBDEFs (Symbols available from object file):
|
||||
;wxConstructorForwxPaintDC()
|
||||
wxConstructorForwxPaintDC__Fv
|
||||
;wxWindowDC::InitDC()
|
||||
InitDC__10wxWindowDCFv
|
||||
;wxArrayDCInfo::DoCopy(const wxArrayDCInfo&)
|
||||
DoCopy__13wxArrayDCInfoFRC13wxArrayDCInfo
|
||||
;wxArrayDCInfo::Add(const wxPaintDCInfo&)
|
||||
@ -11047,7 +11049,8 @@ EXPORTS
|
||||
__as__13wxArrayDCInfoFRC13wxArrayDCInfo
|
||||
;wxClientDC::wxClientDC(wxWindow*)
|
||||
__ct__10wxClientDCFP8wxWindow
|
||||
__vft10wxWindowDC8wxObject
|
||||
;wxPaintDC::FindDCInCache(wxWindow*)
|
||||
FindDCInCache__9wxPaintDCFP8wxWindow
|
||||
;wxArrayDCInfo::Insert(const wxPaintDCInfo&,unsigned int)
|
||||
Insert__13wxArrayDCInfoFRC13wxPaintDCInfoUi
|
||||
;wxConstructorForwxWindowDC()
|
||||
@ -11066,15 +11069,10 @@ EXPORTS
|
||||
FindInCache__9wxPaintDCCFPUi
|
||||
;wxArrayDCInfo::DoEmpty()
|
||||
DoEmpty__13wxArrayDCInfoFv
|
||||
;wxWindowDC::~wxWindowDC()
|
||||
__dt__10wxWindowDCFv
|
||||
;wxClientDC::~wxClientDC()
|
||||
__dt__10wxClientDCFv
|
||||
;wxClientDC::sm_classwxClientDC
|
||||
sm_classwxClientDC__10wxClientDC
|
||||
;wxPaintDC::sm_classwxPaintDC
|
||||
sm_classwxPaintDC__9wxPaintDC
|
||||
__vft10wxClientDC8wxObject
|
||||
__vft9wxPaintDC8wxObject
|
||||
;wxArrayDCInfo::~wxArrayDCInfo()
|
||||
__dt__13wxArrayDCInfoFv
|
||||
@ -11096,24 +11094,30 @@ EXPORTS
|
||||
;wxMemoryDC::SelectObject(const wxBitmap&)
|
||||
SelectObject__10wxMemoryDCFRC8wxBitmap
|
||||
__vft10wxMemoryDC8wxObject
|
||||
;wxMemoryDC::Init()
|
||||
Init__10wxMemoryDCFv
|
||||
;wxMemoryDC::DoGetSize(int*,int*) const
|
||||
DoGetSize__10wxMemoryDCCFPiT1
|
||||
;wxMemoryDC::wxMemoryDC(wxDC*)
|
||||
__ct__10wxMemoryDCFP4wxDC
|
||||
;wxMemoryDC::DoDrawRectangle(int,int,int,int)
|
||||
DoDrawRectangle__10wxMemoryDCFiN31
|
||||
;wxMemoryDC::wxMemoryDC()
|
||||
__ct__10wxMemoryDCFv
|
||||
;wxMemoryDC::sm_classwxMemoryDC
|
||||
sm_classwxMemoryDC__10wxMemoryDC
|
||||
;wxConstructorForwxMemoryDC()
|
||||
wxConstructorForwxMemoryDC__Fv
|
||||
;wxMemoryDC::~wxMemoryDC()
|
||||
__dt__10wxMemoryDCFv
|
||||
;wxMemoryDC::CreateCompatible(wxDC*)
|
||||
CreateCompatible__10wxMemoryDCFP4wxDC
|
||||
;From object file: ..\os2\dcprint.cpp
|
||||
;PUBDEFs (Symbols available from object file):
|
||||
;wxPrinterDC::EndDoc()
|
||||
EndDoc__11wxPrinterDCFv
|
||||
;wxPrinterDC::EndPage()
|
||||
EndPage__11wxPrinterDCFv
|
||||
;wxPrinterDC::DoBlit(int,int,int,int,wxDC*,int,int,int,unsigned long)
|
||||
DoBlit__11wxPrinterDCFiN31P4wxDCN31Ul
|
||||
;wxGetPrinterDC(const wxPrintData&)
|
||||
wxGetPrinterDC__FRC11wxPrintData
|
||||
;wxPrinterDC::sm_classwxPrinterDC
|
||||
@ -11127,17 +11131,16 @@ EXPORTS
|
||||
StartPage__11wxPrinterDCFv
|
||||
;wxPrinterDC::StartDoc(const wxString&)
|
||||
StartDoc__11wxPrinterDCFRC8wxString
|
||||
;wxPrinterDC::DoDrawBitmap(const wxBitmap&,int,int,unsigned long)
|
||||
DoDrawBitmap__11wxPrinterDCFRC8wxBitmapiT2Ul
|
||||
;wxPrinterDC::wxPrinterDC(const wxPrintData&)
|
||||
__ct__11wxPrinterDCFRC11wxPrintData
|
||||
;wxPrinterDC::~wxPrinterDC()
|
||||
__dt__11wxPrinterDCFv
|
||||
;wxPrinterDC::Init()
|
||||
Init__11wxPrinterDCFv
|
||||
;From object file: ..\os2\dcscreen.cpp
|
||||
;PUBDEFs (Symbols available from object file):
|
||||
;wxScreenDC::~wxScreenDC()
|
||||
__dt__10wxScreenDCFv
|
||||
;wxConstructorForwxScreenDC()
|
||||
wxConstructorForwxScreenDC__Fv
|
||||
__vft10wxScreenDC8wxObject
|
||||
;wxScreenDC::sm_classwxScreenDC
|
||||
sm_classwxScreenDC__10wxScreenDC
|
||||
;wxScreenDC::wxScreenDC()
|
||||
|
Loading…
Reference in New Issue
Block a user