This commit is contained in:
dickelbeck 2008-03-05 22:44:38 +00:00
parent 2a0fd4efd6
commit 2caad6b121
1 changed files with 90 additions and 86 deletions

View File

@ -1,4 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: copy_to_clipboard.cpp
// Author: jean-pierre Charras
// Created: 18 aug 2006
@ -33,6 +34,7 @@ static bool DrawPage(WinEDA_DrawPanel * panel);
/************************************************************/
void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
/************************************************************/
/* calls the function to copy the current page or the current bock to the clipboard
*/
{
@ -41,23 +43,27 @@ void WinEDA_DrawFrame::CopyToClipboard(wxCommandEvent& event)
if( event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD )
{
if( GetScreen()->BlockLocate.m_Command != BLOCK_IDLE )
DrawPanel->SetCursor(wxCursor(DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor) );
DrawPanel->SetCursor( wxCursor( DrawPanel->m_PanelCursor =
DrawPanel->m_PanelDefaultCursor ) );
if( DrawPanel->ManageCurseur && DrawPanel->ForceCloseManageCurseur )
{
wxClientDC dc( DrawPanel );
DrawPanel->PrepareGraphicContext( &dc );
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
}
}
/*****************************************************************/
bool DrawPage( WinEDA_DrawPanel* panel )
/*****************************************************************/
/* copy the current page or block to the clipboard ,
to export drawings to other applications (word processing ...)
Thi is not suitable for copy command within eeschema or pcbnew
* to export drawings to other applications (word processing ...)
* Thi is not suitable for copy command within eeschema or pcbnew
*/
{
bool success = TRUE;
@ -99,7 +105,6 @@ wxMetafileDC dc/*(wxT(""), DrawArea.GetWidth(), DrawArea.GetHeight())*/;
DisplayError( NULL, wxT( "CopyToClipboard: DrawPage error: wxMetafileDC not OK" ) );
success = FALSE;
}
else
{
EDA_Rect tmp = panel->m_ClipBox;
@ -138,4 +143,3 @@ wxMetafileDC dc/*(wxT(""), DrawArea.GetWidth(), DrawArea.GetHeight())*/;
return success;
}