mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0027844: Foundation Classes - remove method OSD_File::Print()
This commit is contained in:
parent
d2edda76a9
commit
70ca46fecc
@ -33,7 +33,6 @@ if (WIN32)
|
|||||||
set (CSF_gdi32 "gdi32.lib")
|
set (CSF_gdi32 "gdi32.lib")
|
||||||
set (CSF_user32 "user32.lib")
|
set (CSF_user32 "user32.lib")
|
||||||
set (CSF_wsock32 "wsock32.lib")
|
set (CSF_wsock32 "wsock32.lib")
|
||||||
set (CSF_winspool "Winspool.lib")
|
|
||||||
set (CSF_psapi "Psapi.lib")
|
set (CSF_psapi "Psapi.lib")
|
||||||
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
set (CSF_AviLibs "ws2_32.lib vfw32.lib")
|
||||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" OR USE_GLES2)
|
||||||
|
@ -1109,7 +1109,6 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap } {
|
|||||||
if { "$::HAVE_GLES2" == "true" } {
|
if { "$::HAVE_GLES2" == "true" } {
|
||||||
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
set aLibsMap(CSF_OpenGlLibs) "libEGL libGLESv2"
|
||||||
}
|
}
|
||||||
set aLibsMap(CSF_winspool) "Winspool"
|
|
||||||
set aLibsMap(CSF_psapi) "Psapi"
|
set aLibsMap(CSF_psapi) "Psapi"
|
||||||
set aLibsMap(CSF_d3d9) "d3d9"
|
set aLibsMap(CSF_d3d9) "d3d9"
|
||||||
|
|
||||||
|
@ -62,8 +62,6 @@ OSD_Path.hxx
|
|||||||
OSD_PerfMeter.cxx
|
OSD_PerfMeter.cxx
|
||||||
OSD_PerfMeter.h
|
OSD_PerfMeter.h
|
||||||
OSD_PerfMeter.hxx
|
OSD_PerfMeter.hxx
|
||||||
OSD_Printer.cxx
|
|
||||||
OSD_Printer.hxx
|
|
||||||
OSD_Process.cxx
|
OSD_Process.cxx
|
||||||
OSD_Process.hxx
|
OSD_Process.hxx
|
||||||
OSD_Protection.cxx
|
OSD_Protection.cxx
|
||||||
|
@ -34,7 +34,6 @@ class OSD_FileIterator;
|
|||||||
class OSD_Directory;
|
class OSD_Directory;
|
||||||
class OSD_DirectoryIterator;
|
class OSD_DirectoryIterator;
|
||||||
class OSD_Timer;
|
class OSD_Timer;
|
||||||
class OSD_Printer;
|
|
||||||
class OSD_Host;
|
class OSD_Host;
|
||||||
class OSD_Environment;
|
class OSD_Environment;
|
||||||
class OSD_EnvironmentIterator;
|
class OSD_EnvironmentIterator;
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <OSD_FromWhere.hxx>
|
#include <OSD_FromWhere.hxx>
|
||||||
#include <OSD_OSDError.hxx>
|
#include <OSD_OSDError.hxx>
|
||||||
#include <OSD_Path.hxx>
|
#include <OSD_Path.hxx>
|
||||||
#include <OSD_Printer.hxx>
|
|
||||||
#include <OSD_Protection.hxx>
|
#include <OSD_Protection.hxx>
|
||||||
#include <OSD_WhoAmI.hxx>
|
#include <OSD_WhoAmI.hxx>
|
||||||
#include <Standard_PCharacter.hxx>
|
#include <Standard_PCharacter.hxx>
|
||||||
@ -725,33 +724,6 @@ Standard_Size OSD_File::Size(){
|
|||||||
return (Standard_Size)buffer.st_size;
|
return (Standard_Size)buffer.st_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
// Print contains of a file
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void OSD_File::Print (const OSD_Printer &WhichPrinter ){
|
|
||||||
char buffer[255];
|
|
||||||
TCollection_AsciiString PrinterName;
|
|
||||||
|
|
||||||
if (myPath.Name().Length()==0)
|
|
||||||
Standard_ProgramError::Raise("OSD_File::Print : empty file name");
|
|
||||||
|
|
||||||
WhichPrinter.Name(PrinterName);
|
|
||||||
|
|
||||||
TCollection_AsciiString aBuffer;
|
|
||||||
myPath.SystemName ( aBuffer );
|
|
||||||
|
|
||||||
if (PrinterName.Length()==0)
|
|
||||||
sprintf(buffer,"lp %s",aBuffer.ToCString());
|
|
||||||
else
|
|
||||||
sprintf(buffer,"lpr -P%s %s",PrinterName.ToCString(),aBuffer.ToCString());
|
|
||||||
|
|
||||||
if (system(buffer) != 0)
|
|
||||||
Standard_ProgramError::Raise("OSD_File::Print : No output device was available, or an error occurred");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Test if a file is open
|
// Test if a file is open
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@ -825,7 +797,6 @@ void OSD_File::Rewind() {
|
|||||||
|
|
||||||
#include <OSD_File.hxx>
|
#include <OSD_File.hxx>
|
||||||
#include <OSD_Protection.hxx>
|
#include <OSD_Protection.hxx>
|
||||||
#include <OSD_Printer.hxx>
|
|
||||||
#include <Standard_ProgramError.hxx>
|
#include <Standard_ProgramError.hxx>
|
||||||
|
|
||||||
#include <OSD_WNT_1.hxx>
|
#include <OSD_WNT_1.hxx>
|
||||||
@ -835,21 +806,12 @@ void OSD_File::Rewind() {
|
|||||||
#include <Standard_PCharacter.hxx>
|
#include <Standard_PCharacter.hxx>
|
||||||
#include <TCollection_ExtendedString.hxx>
|
#include <TCollection_ExtendedString.hxx>
|
||||||
|
|
||||||
#ifndef _INC_TCHAR
|
|
||||||
# include <tchar.h>
|
|
||||||
#endif // _INC_TCHAR
|
|
||||||
|
|
||||||
#include <Strsafe.h>
|
#include <Strsafe.h>
|
||||||
|
|
||||||
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
||||||
#define VAC
|
#define VAC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#pragma comment( lib, "WSOCK32.LIB" )
|
|
||||||
#pragma comment( lib, "WINSPOOL.LIB" )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ACE_HEADER_SIZE ( sizeof ( ACCESS_ALLOWED_ACE ) - sizeof ( DWORD ) )
|
#define ACE_HEADER_SIZE ( sizeof ( ACCESS_ALLOWED_ACE ) - sizeof ( DWORD ) )
|
||||||
|
|
||||||
#define RAISE( arg ) Standard_ProgramError :: Raise ( ( arg ) )
|
#define RAISE( arg ) Standard_ProgramError :: Raise ( ( arg ) )
|
||||||
@ -865,7 +827,6 @@ PSECURITY_DESCRIPTOR __fastcall _osd_wnt_protection_to_sd ( const OSD_Protection
|
|||||||
BOOL __fastcall _osd_wnt_sd_to_protection (
|
BOOL __fastcall _osd_wnt_sd_to_protection (
|
||||||
PSECURITY_DESCRIPTOR, OSD_Protection&, BOOL
|
PSECURITY_DESCRIPTOR, OSD_Protection&, BOOL
|
||||||
);
|
);
|
||||||
BOOL __fastcall _osd_print (const Standard_PCharacter, const wchar_t* );
|
|
||||||
static int __fastcall _get_buffer(HANDLE, Standard_PCharacter&, DWORD, BOOL, BOOL);
|
static int __fastcall _get_buffer(HANDLE, Standard_PCharacter&, DWORD, BOOL, BOOL);
|
||||||
#endif
|
#endif
|
||||||
static void __fastcall _test_raise ( HANDLE, Standard_CString );
|
static void __fastcall _test_raise ( HANDLE, Standard_CString );
|
||||||
@ -1674,29 +1635,6 @@ Standard_Size OSD_File::Size()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
// Print contains of a file
|
|
||||||
// --------------------------------------------------------------------------
|
|
||||||
void OSD_File :: Print ( const OSD_Printer& WhichPrinter) {
|
|
||||||
#ifndef OCCT_UWP
|
|
||||||
if (myFileHandle != INVALID_HANDLE_VALUE)
|
|
||||||
|
|
||||||
RAISE( "OSD_File :: Print (): incorrect call - file opened" );
|
|
||||||
|
|
||||||
TCollection_AsciiString pName, fName;
|
|
||||||
|
|
||||||
WhichPrinter.Name ( pName );
|
|
||||||
myPath.SystemName ( fName );
|
|
||||||
TCollection_ExtendedString fNameW(fName);
|
|
||||||
|
|
||||||
if ( !_osd_print ( (Standard_PCharacter)pName.ToCString (),
|
|
||||||
(const wchar_t*)fNameW.ToExtString () ) )
|
|
||||||
|
|
||||||
_osd_wnt_set_error ( myError, OSD_WFile );
|
|
||||||
#else
|
|
||||||
(void)WhichPrinter;
|
|
||||||
#endif
|
|
||||||
} // end OSD_File :: Print
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Test if a file is open
|
// Test if a file is open
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@ -2771,99 +2709,6 @@ static OSD_SingleProtection __fastcall _get_protection_dir ( DWORD mask ) {
|
|||||||
} // end _get_protection_dir
|
} // end _get_protection_dir
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
|
||||||
#define __try
|
|
||||||
#define __finally
|
|
||||||
#define __leave return fOK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OCCT_UWP
|
|
||||||
BOOL __fastcall _osd_print (const Standard_PCharacter pName, const wchar_t* fName ) {
|
|
||||||
|
|
||||||
BOOL fOK, fJob;
|
|
||||||
HANDLE hPrinter = NULL;
|
|
||||||
BYTE jobInfo[ MAX_PATH + sizeof ( DWORD ) ];
|
|
||||||
DWORD dwNeeded, dwCode = 0;
|
|
||||||
|
|
||||||
fOK = fJob = FALSE;
|
|
||||||
|
|
||||||
__try {
|
|
||||||
|
|
||||||
if ( !OpenPrinter ( Standard_PCharacter(pName), &hPrinter, NULL ) ) {
|
|
||||||
|
|
||||||
hPrinter = NULL;
|
|
||||||
__leave;
|
|
||||||
|
|
||||||
} // end if
|
|
||||||
|
|
||||||
if ( !AddJobW (
|
|
||||||
hPrinter, 1, jobInfo, MAX_PATH + sizeof ( DWORD ), &dwNeeded
|
|
||||||
)
|
|
||||||
) __leave;
|
|
||||||
|
|
||||||
fJob = TRUE;
|
|
||||||
|
|
||||||
if ( !CopyFileW (
|
|
||||||
fName, (LPWSTR) ( ( ADDJOB_INFO_1* )jobInfo ) -> Path, FALSE
|
|
||||||
)
|
|
||||||
) __leave;
|
|
||||||
|
|
||||||
if ( !ScheduleJob (
|
|
||||||
hPrinter, ( ( ADDJOB_INFO_1* )jobInfo ) -> JobId
|
|
||||||
)
|
|
||||||
) __leave;
|
|
||||||
|
|
||||||
fOK = TRUE;
|
|
||||||
|
|
||||||
} // end __try
|
|
||||||
|
|
||||||
__finally {
|
|
||||||
|
|
||||||
if ( !fOK ) {
|
|
||||||
|
|
||||||
BYTE info[ 1024 ];
|
|
||||||
DWORD dwBytesNeeded;
|
|
||||||
|
|
||||||
dwCode = GetLastError ();
|
|
||||||
|
|
||||||
if ( fJob && hPrinter != NULL ) {
|
|
||||||
|
|
||||||
GetJob (
|
|
||||||
hPrinter, ( ( ADDJOB_INFO_1* )jobInfo ) -> JobId, 1,
|
|
||||||
info, 1024, &dwBytesNeeded
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( fJob ) SetJob (
|
|
||||||
hPrinter,
|
|
||||||
( ( ADDJOB_INFO_1* )jobInfo ) -> JobId,
|
|
||||||
1, info, JOB_CONTROL_CANCEL
|
|
||||||
);
|
|
||||||
|
|
||||||
} // end if
|
|
||||||
|
|
||||||
} // end if
|
|
||||||
|
|
||||||
if ( hPrinter != NULL ) ClosePrinter ( hPrinter );
|
|
||||||
|
|
||||||
} // end __finally
|
|
||||||
|
|
||||||
#ifdef VAC
|
|
||||||
leave: ; // added for VisualAge
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( !fOK ) SetLastError ( dwCode );
|
|
||||||
|
|
||||||
return fOK;
|
|
||||||
|
|
||||||
} // end _osd_print
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__CYGWIN32__) || defined(__MINGW32__)
|
|
||||||
#undef __try
|
|
||||||
#undef __finally
|
|
||||||
#undef __leave
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Standard_Boolean OSD_File::IsReadable()
|
Standard_Boolean OSD_File::IsReadable()
|
||||||
{
|
{
|
||||||
TCollection_AsciiString FileName ;
|
TCollection_AsciiString FileName ;
|
||||||
|
@ -34,7 +34,6 @@ class Standard_ProgramError;
|
|||||||
class OSD_Path;
|
class OSD_Path;
|
||||||
class OSD_Protection;
|
class OSD_Protection;
|
||||||
class TCollection_AsciiString;
|
class TCollection_AsciiString;
|
||||||
class OSD_Printer;
|
|
||||||
|
|
||||||
|
|
||||||
//! Basic tools to manage files
|
//! Basic tools to manage files
|
||||||
@ -158,10 +157,7 @@ public:
|
|||||||
|
|
||||||
//! Returns actual number of bytes of <me>.
|
//! Returns actual number of bytes of <me>.
|
||||||
Standard_EXPORT Standard_Size Size();
|
Standard_EXPORT Standard_Size Size();
|
||||||
|
|
||||||
//! Prints a file on selected printer.
|
|
||||||
Standard_EXPORT void Print (const OSD_Printer& WhichPrinter);
|
|
||||||
|
|
||||||
//! Returns TRUE if <me> is open.
|
//! Returns TRUE if <me> is open.
|
||||||
Standard_EXPORT Standard_Boolean IsOpen() const;
|
Standard_EXPORT Standard_Boolean IsOpen() const;
|
||||||
|
|
||||||
|
@ -1,131 +0,0 @@
|
|||||||
// Copyright (c) 1998-1999 Matra Datavision
|
|
||||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
||||||
//
|
|
||||||
// This file is part of Open CASCADE Technology software library.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or modify it under
|
|
||||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
||||||
// by the Free Software Foundation, with special exception defined in the file
|
|
||||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
||||||
// distribution for complete text of the license and disclaimer of any warranty.
|
|
||||||
//
|
|
||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
||||||
// commercial license or contractual agreement.
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
|
|
||||||
|
|
||||||
#include <OSD_OSDError.hxx>
|
|
||||||
#include <OSD_Printer.hxx>
|
|
||||||
#include <OSD_WhoAmI.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
|
||||||
#include <Standard_NullObject.hxx>
|
|
||||||
#include <TCollection_AsciiString.hxx>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
//const OSD_WhoAmI Iam = OSD_WPrinter;
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
OSD_Printer::OSD_Printer (const TCollection_AsciiString& Name){
|
|
||||||
SetName(Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
void OSD_Printer::SetName (const TCollection_AsciiString& Name){
|
|
||||||
|
|
||||||
if (!Name.IsAscii())
|
|
||||||
Standard_ConstructionError::Raise("OSD_Printer::SetName");
|
|
||||||
|
|
||||||
myName = Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
void OSD_Printer::Name (TCollection_AsciiString &Name)const{
|
|
||||||
Name = myName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
void OSD_Printer::Reset(){
|
|
||||||
myError.Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
Standard_Boolean OSD_Printer::Failed()const{
|
|
||||||
return( myError.Failed());
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
void OSD_Printer::Perror() {
|
|
||||||
myError.Perror();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
Standard_Integer OSD_Printer::Error()const{
|
|
||||||
return( myError.Error());
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
|
||||||
//------------------- Windows NT sources for OSD_Printer ----------------
|
|
||||||
//------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#include <OSD_OSDError.hxx>
|
|
||||||
#include <OSD_Printer.hxx>
|
|
||||||
#include <Standard_ConstructionError.hxx>
|
|
||||||
#include <Standard_NullObject.hxx>
|
|
||||||
#include <TCollection_AsciiString.hxx>
|
|
||||||
|
|
||||||
OSD_Printer :: OSD_Printer ( const TCollection_AsciiString& Name ) {
|
|
||||||
|
|
||||||
SetName ( Name );
|
|
||||||
|
|
||||||
} // end constructor
|
|
||||||
|
|
||||||
void OSD_Printer :: SetName ( const TCollection_AsciiString& Name ) {
|
|
||||||
|
|
||||||
myName = Name;
|
|
||||||
|
|
||||||
} // end OSD_Printer :: SetName
|
|
||||||
|
|
||||||
void OSD_Printer :: Name ( TCollection_AsciiString& Name ) const {
|
|
||||||
|
|
||||||
Name = myName;
|
|
||||||
|
|
||||||
} // end OSD_Printer :: Name
|
|
||||||
|
|
||||||
Standard_Boolean OSD_Printer :: Failed () const {
|
|
||||||
|
|
||||||
return myError.Failed ();
|
|
||||||
|
|
||||||
} // end OSD_Printer :: Failed
|
|
||||||
|
|
||||||
void OSD_Printer :: Reset () {
|
|
||||||
|
|
||||||
myError.Reset ();
|
|
||||||
|
|
||||||
} // end OSD_Printer :: Reset
|
|
||||||
|
|
||||||
void OSD_Printer :: Perror () {
|
|
||||||
|
|
||||||
myError.Perror ();
|
|
||||||
|
|
||||||
} // end OSD_Printer :: Perror
|
|
||||||
|
|
||||||
Standard_Integer OSD_Printer :: Error () const {
|
|
||||||
|
|
||||||
return myError.Error ();
|
|
||||||
|
|
||||||
} // end OSD_Printer :: Error
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,92 +0,0 @@
|
|||||||
// Created on: 2018-03-15
|
|
||||||
// Created by: Stephan GARNAUD (ARM)
|
|
||||||
// Copyright (c) 1998-1999 Matra Datavision
|
|
||||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
||||||
//
|
|
||||||
// This file is part of Open CASCADE Technology software library.
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or modify it under
|
|
||||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
||||||
// by the Free Software Foundation, with special exception defined in the file
|
|
||||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
||||||
// distribution for complete text of the license and disclaimer of any warranty.
|
|
||||||
//
|
|
||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
||||||
// commercial license or contractual agreement.
|
|
||||||
|
|
||||||
#ifndef _OSD_Printer_HeaderFile
|
|
||||||
#define _OSD_Printer_HeaderFile
|
|
||||||
|
|
||||||
#include <Standard.hxx>
|
|
||||||
#include <Standard_DefineAlloc.hxx>
|
|
||||||
#include <Standard_Handle.hxx>
|
|
||||||
|
|
||||||
#include <TCollection_AsciiString.hxx>
|
|
||||||
#include <OSD_Error.hxx>
|
|
||||||
#include <Standard_Boolean.hxx>
|
|
||||||
#include <Standard_Integer.hxx>
|
|
||||||
class Standard_ConstructionError;
|
|
||||||
class Standard_NullObject;
|
|
||||||
class OSD_OSDError;
|
|
||||||
class TCollection_AsciiString;
|
|
||||||
|
|
||||||
|
|
||||||
//! Selects a printer (used by File).
|
|
||||||
class OSD_Printer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
DEFINE_STANDARD_ALLOC
|
|
||||||
|
|
||||||
|
|
||||||
//! Initializes printer to use with its name.
|
|
||||||
//! The string must contain only ASCII characters
|
|
||||||
//! between ' ' and '~'; this means no control character
|
|
||||||
//! and no extended ASCII code. If it is not the case the
|
|
||||||
//! exception ConstructionError is raised.
|
|
||||||
Standard_EXPORT OSD_Printer(const TCollection_AsciiString& Name);
|
|
||||||
|
|
||||||
//! Changes name of printer to use.
|
|
||||||
Standard_EXPORT void SetName (const TCollection_AsciiString& Name);
|
|
||||||
|
|
||||||
//! Returns name of current printer
|
|
||||||
Standard_EXPORT void Name (TCollection_AsciiString& Name) const;
|
|
||||||
|
|
||||||
//! Returns TRUE if an error occurs
|
|
||||||
Standard_EXPORT Standard_Boolean Failed() const;
|
|
||||||
|
|
||||||
//! Resets error counter to zero
|
|
||||||
Standard_EXPORT void Reset();
|
|
||||||
|
|
||||||
//! Raises OSD_Error
|
|
||||||
Standard_EXPORT void Perror();
|
|
||||||
|
|
||||||
//! Returns error number if 'Failed' is TRUE.
|
|
||||||
Standard_EXPORT Standard_Integer Error() const;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TCollection_AsciiString myName;
|
|
||||||
OSD_Error myError;
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _OSD_Printer_HeaderFile
|
|
@ -33,7 +33,6 @@ OSD_WDisk,
|
|||||||
OSD_WChronometer,
|
OSD_WChronometer,
|
||||||
OSD_WTimer,
|
OSD_WTimer,
|
||||||
OSD_WPackage,
|
OSD_WPackage,
|
||||||
OSD_WPrinter,
|
|
||||||
OSD_WEnvironmentIterator
|
OSD_WEnvironmentIterator
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,5 +5,4 @@ CSF_user32
|
|||||||
CSF_TBB
|
CSF_TBB
|
||||||
CSF_dl
|
CSF_dl
|
||||||
CSF_wsock32
|
CSF_wsock32
|
||||||
CSF_winspool
|
|
||||||
CSF_psapi
|
CSF_psapi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user