CFx SDK Documentation  2022 SP0
FxSystemServices.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2021 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "DDKERNEL.h"
20 #include "FxUserIO.h"
21 #include "FxUI.h"
22 
23 #include <DbHostAppServices.h>
24 
25 #include "FxPragmaPush.h"
26 
27 class CFxMainFrame;
28 class CFxDocumentManager;
29 class CFxHostAppServices;
30 class CFxLicenseInfo;
31 class QGLWidget;
32 class CFxProfileManager;
33 class CFxIO;
34 class CFxApplications;
35 class CFxVSTA;
36 class CFxUI;
38 class CFxFileData;
39 class CFxObjectManager;
40 class CFxBagFiler;
41 class CFxInferencePointManager;
42 class QMimeData;
43 class CFxGeomUtils;
44 class CFxEvalModeHandler;
45 class CFxViewDrawInfo;
46 class CXeRemoteFileManager;
47 class CFxSelectionSetFilterHolder;
48 class CFxTrackerData;
49 class CXeStorageServices;
50 class CXeHostServices;
51 class CFxAPI;
52 class CFxOutputDevice;
53 
54 struct IDispatch;
55 
56 class CFxVectorizeDevice;
58 
59 class OdGiRasterImage;
61 
62 class CFxGeometryClipper;
64 
65 class CFxDatabase;
67 
68 class CFxRasterImage;
70 
72 
73 class CFxActionMacroManager;
74 
81 {
82 public:
83 
89  {
90  MBButtonOk = 0x00000000L,
91  MBButtonOkCancel = 0x00000001L,
92  MBButtonAbortRetryIgnore = 0x00000002L,
93  MBButtonYesNoCancel = 0x00000003L,
94  MBButtonYesNo = 0x00000004L,
95  MBButtonRetryCancel = 0x00000005L,
96  MBButtonSaveDiscardCancel = 0x00000009L,
97  MBIconStop = 0x00000010L,
98  MBIconQuestion = 0x00000020L,
99  MBIconExclamation = 0x00000030L,
100  MBIconAsterisk = 0x00000040L,
101  MBModalSystem = 0x00001000L,
102  MBModalTask = 0x00002000L
103  };
104 
106 
108 
116  virtual bool GetPassword(const CFxString& dwgName, bool isXref, OdPassword& password) const = 0;
117 
118 
125  virtual void AuditPrintReport(OdDbAuditInfo* pAuditInfo, const CFxString& str) const = 0;
126 
134  virtual CFxString FindFile( const CFxString& sFile, bool bDisplayMessage = false, const OdDbBaseDatabase* pDb = 0, OdDbHostAppServices::FindFileHint hint = OdDbHostAppServices::kDefault) const = 0;
135 
139  virtual bool IsValidFileName( const CFxString& fileName ) const = 0;
140 
144  virtual void Write( const CFxString& str, const CFxDocument* pContext = 0 ) const = 0;
145 
150  virtual void WriteLine( const CFxString& str, const CFxDocument* pContext = 0, bool bShowCommandWindowOutput = false ) const = 0;
151 
155  virtual CFxMainFrame* GetMainFrame() const = 0;
156 
160  virtual int MessageBox( const CFxString& csText, const CFxString& csCaption, unsigned int uType) const = 0;
161 
165 
169 
173 
176  virtual CFxEvalModeHandler* GetFxEvalModeHandler() = 0;
177 
181  {
182  public:
183  /* {secret} */
185  /* {secret} */
187 
191 
195 
199 
203 
207 
211 
215 
219 
223 
226  bool m_bUCS;
227 
231 
235 
239 
241 
243  };
244 
250  virtual OdResBufPtr SendStringToExecute( const CFxString& strCommand, const CFxExpressionParserData* pData = 0 ) = 0;
251 
252  virtual OdResBufPtr SendStringToExecute( const CFxExpressionParserData* pData, int rtype, ... ) = 0;//variable argument list
253 
254  virtual OdResBufPtr SendStringToExecute( const CFxExpressionParserData* pData, int rtype, va_list vaList ) = 0;//variable argument list
255 
257 
259 
260  virtual void QueueExpr( const CFxExpressionParserData* pData, const OdResBufPtr& pExpr ) = 0;
261  virtual void QueueExpr( const CFxExpressionParserData* pData, int rtype, ... ) = 0;
262 
266 
270 
274  typedef enum _FontType
275  {
276  eFontsAll = 0,
277  eFontsSHX = 1,
278  eFontsTTF = 2
279  } FontType;
280 
289  virtual OdArray<CFxString> GetAvailableFonts( FontType eType ) const = 0;
290 
295 
299  virtual CFxIO* GetFxIO() = 0;
300 
307  virtual CFxVSTA* GetVSTA() = 0;
308  virtual void ActivateRibbon( bool enable ) = 0;
309 
312  virtual IDispatch* GetIApplication() = 0;
313 
332  virtual int FileDialog(
333  CFxUserIO::FileNameRetVal* pResultMode,
334  CFxString* pResultStr,
335  FxWId parent,
337  const CFxString& dialogCaption,
338  const CFxString& defaultExtension,
339  const CFxString& filter,
340  const CFxString& initialDir,
341  int* filterIndex = 0, // filterIndex is zero-based
342  CFxString* templateName = 0,
344  OdCodePageId** codepage = 0) = 0;
345 
364  virtual int FileDialog(
365  CFxUserIO::FileNameRetVal* pResultMode,
366  CFxStringArray* pResultStrs,
367  FxWId parent,
369  const CFxString& dialogCaption,
370  const CFxString& defaultExtension,
371  const CFxString& filter,
372  const CFxString& initialDir,
373  int* filterIndex = 0, // filterIndex is zero-based
374  CFxString* templateName = 0,
376  OdCodePageId** codepage = 0) = 0;
377 
381  virtual CFxUI* GetFxUI() = 0;
382 
389  virtual void Help( const CFxString& lpCommandName ) const = 0;
390 
396  virtual void ExitApplication( int nReturnCode = 0 ) = 0;
397 
404  virtual bool IsApplicationExiting( ) const = 0;
405 
410 
413 // virtual CFxExtentsAccumulator* CreateExtentsAccumulator() = 0;
414 
418 
419  typedef enum
420  {
427  kDirSave
428  } InitialDir;
429 
433  virtual void GetInitialDirPath( InitialDir type, CFxString& initialDir, const CFxFileData* info = 0 ) const = 0;
434 
439  virtual void SetInitialDirPath( InitialDir type, const CFxString& fileNamePath ) = 0;
440 
444  virtual CFxObjectManager* GetObjectManager() = 0;
445 
450  OdDbDatabase* db,
452  fdt_resbufW* resBuf = 0,
453  bool bIncludesDefaultValues = false) = 0;
454 
458  virtual bool userBreak() = 0;
459 
463  virtual void SetUserBreak( bool bUserBreak = true ) = 0;
464 
471  virtual CFxInferencePointManager* GetInferencePointManager() = 0;
472 
479  virtual OdCodePageId GetSystemCodepage() const = 0;
480 
487  virtual void SetSystemCodepage( OdCodePageId codepage ) = 0;
488 
497  virtual bool DoVerb( const OdDbObjectId& idOleObject ) const = 0;
498 
510  virtual bool AddOleDataToClipboard( QMimeData* pClipboardData, CFxDatabasePtr pData, int iFrameWidth, int iFrameHeight ) const = 0;
511 
518  virtual CFxGeomUtils* GetGeomUtils() const = 0;
519 
524  typedef enum _ModelerType
525  {
526  kNoModeler = 0,
527  kOdaModeler = 1,
528  kSpatialACIS = 2,
529  kUnknownModeler = 3
531 
538  virtual ModelerType GetModelerManufacture() const = 0;
539 
551  virtual bool GetVersion( int* major, int* minor, int* product, int* build ) const = 0;
552 
559  virtual CFxString GetVersion() const = 0;
560 
567  virtual void SetOEMVersion( const CFxString& sOEMVersion ) = 0;
568 
575  virtual CFxString GetOEMVersion() const = 0;
576 
583  virtual CFxString GetAppDataVersion() const = 0;
584 
588  virtual CFxString GetOpenDefaultExtension() const = 0;
589 
599  virtual void DisableUI(bool disable, bool includeCommandWindow = true, bool includeDocumentWindows = true, bool includeStatusBar = true ) = 0;
600 
607  virtual void AuthoriseOEMModule(bool authorise) = 0;
608 
615  virtual bool IsOEMModuleAuthorised() = 0;
616 
623  virtual CFxActionMacroManager* GetFxActionMacroManager() = 0;
624 
631  virtual const CFxActionMacroManager* GetFxActionMacroManager() const = 0;
632 
638  virtual CFxRasterImagePtr CreateDrawablePreview( OdUInt32 iWidth, OdUInt32 iHeight, OdDbDatabase* pDatabase, const OdGiDrawableArray& drawables, const CFxViewDrawInfo* pInfo ) = 0;
639 
643  virtual CFxAPI* GetFxAPI(CFxDocument * pDocument) = 0;
644 
648  virtual void StopATFBomb() = 0;
649 
650  virtual CFxUIStyle::UIStyle GetRibbonTheme() const = 0;
651  virtual void SetRibbonTheme( const CFxUIStyle::UIStyle value ) = 0;
652 
656  virtual void AddOutputDevice(CFxOutputDevice *device) = 0;
657 
661  virtual void RemoveOutputDevice(CFxOutputDevice *device) = 0;
662 };
663 
666 
667 #include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
int FxWId
std::vector< CFxString > CFxStringArray
Definition: FxString.h:34
OdSmartPtr< OdGiRasterImage > OdGiRasterImagePtr
OdSmartPtr< CFxDatabase > CFxDatabasePtr
OdSmartPtr< CFxRasterImage > CFxRasterImagePtr
OdArray< const OdGiDrawable * > OdGiDrawableArray
OdSmartPtr< CFxGeometryClipper > CFxGeometryClipperPtr
OdSmartPtr< CFxVectorizeDevice > CFxVectorizeDevicePtr
DDKERNEL_API CFxSystemServices * GetFxSystemServices()
ModelerType
Definition: IfcCore.h:57
OdCodePageId
Definition: OdCodePage.h:31
unsigned int OdUInt32
Use this interface to receive messages from the command window.
virtual bool IsValidFileName(const CFxString &fileName) const =0
virtual CFxUI * GetFxUI()=0
enum CFxSystemServices::_ModelerType ModelerType
virtual int FileDialog(CFxUserIO::FileNameRetVal *pResultMode, CFxStringArray *pResultStrs, FxWId parent, CFxUserIO::FileNameType eType, const CFxString &dialogCaption, const CFxString &defaultExtension, const CFxString &filter, const CFxString &initialDir, int *filterIndex=0, CFxString *templateName=0, CFxUserIO::FileNameFlags flags=CFxUserIO::eFileNameNoFlags, OdCodePageId **codepage=0)=0
virtual void QueueExpr(const CFxExpressionParserData *pData, int rtype,...)=0
virtual OdResBufPtr SendStringToExecute(CFxDocument *pDoc, const CFxExpressionParserData *pData, OdResBufPtr pResbuf)=0
virtual bool GetPassword(const CFxString &dwgName, bool isXref, OdPassword &password) const =0
virtual CFxApplications * GetFxApplications()=0
virtual void AuditPrintReport(OdDbAuditInfo *pAuditInfo, const CFxString &str) const =0
virtual void SetRibbonTheme(const CFxUIStyle::UIStyle value)=0
virtual CFxString GetVersion() const =0
virtual CFxActionMacroManager * GetFxActionMacroManager()=0
virtual void SetInitialDirPath(InitialDir type, const CFxString &fileNamePath)=0
virtual CFxString GetOEMVersion() const =0
virtual void SetSystemCodepage(OdCodePageId codepage)=0
virtual CFxString GetOpenDefaultExtension() const =0
virtual CFxAPI * GetFxAPI(CFxDocument *pDocument)=0
virtual const CFxActionMacroManager * GetFxActionMacroManager() const =0
virtual bool AddOleDataToClipboard(QMimeData *pClipboardData, CFxDatabasePtr pData, int iFrameWidth, int iFrameHeight) const =0
virtual CFxIO * GetFxIO()=0
virtual void QueueExpr(const CFxExpressionParserData *pData, const OdResBufPtr &pExpr)=0
enum CFxSystemServices::_FontType FontType
virtual OdSmartPtr< CFxBagFiler > CreateBagFiler(OdDbDatabase *db, OdDb::DwgVersion version=OdDb::kDHL_CURRENT, fdt_resbufW *resBuf=0, bool bIncludesDefaultValues=false)=0
virtual OdArray< CFxString > GetAvailableFonts(FontType eType) const =0
virtual void DisableUI(bool disable, bool includeCommandWindow=true, bool includeDocumentWindows=true, bool includeStatusBar=true)=0
virtual ~CFxSystemServices()
virtual OdDbSystemServices * GetSystemServices()=0
virtual CFxVSTA * GetVSTA()=0
virtual CFxObjectManager * GetObjectManager()=0
virtual CFxUIStyle::UIStyle GetRibbonTheme() const =0
virtual OdCodePageId GetSystemCodepage() const =0
virtual OdResBufPtr SendStringToExecute(const CFxExpressionParserData *pData, int rtype,...)=0
virtual CFxVectorizeDevicePtr GetFxGDIDevice()=0
virtual int FileDialog(CFxUserIO::FileNameRetVal *pResultMode, CFxString *pResultStr, FxWId parent, CFxUserIO::FileNameType eType, const CFxString &dialogCaption, const CFxString &defaultExtension, const CFxString &filter, const CFxString &initialDir, int *filterIndex=0, CFxString *templateName=0, CFxUserIO::FileNameFlags flags=CFxUserIO::eFileNameNoFlags, OdCodePageId **codepage=0)=0
virtual CFxProfileManager * GetFxProfileManager()=0
virtual OdResBufPtr SendStringToExecute(const CFxString &strCommand, const CFxExpressionParserData *pData=0)=0
virtual bool IsApplicationExiting() const =0
virtual CFxGeomUtils * GetGeomUtils() const =0
virtual void ActivateRibbon(bool enable)=0
virtual void GetInitialDirPath(InitialDir type, CFxString &initialDir, const CFxFileData *info=0) const =0
virtual void AddOutputDevice(CFxOutputDevice *device)=0
Add device, if it is not in the list of output devices yet.
virtual CFxDocumentManager * GetFxDocumentManager()=0
virtual OdGiRasterImagePtr CreateRasterImage() const =0
virtual ModelerType GetModelerManufacture() const =0
virtual IDispatch * GetIApplication()=0
virtual bool DoVerb(const OdDbObjectId &idOleObject) const =0
virtual void SetUserBreak(bool bUserBreak=true)=0
virtual CFxInferencePointManager * GetInferencePointManager()=0
virtual bool GetVersion(int *major, int *minor, int *product, int *build) const =0
virtual CFxGeometryClipperPtr CreateGeometryClipper()=0
virtual OdResBufPtr SendStringToExecute(const CFxExpressionParserData *pData, OdResBufPtr pResbuf)=0
virtual OdResBufPtr SendStringToExecute(const CFxExpressionParserData *pData, int rtype, va_list vaList)=0
virtual CFxRasterImagePtr CreateDrawablePreview(OdUInt32 iWidth, OdUInt32 iHeight, OdDbDatabase *pDatabase, const OdGiDrawableArray &drawables, const CFxViewDrawInfo *pInfo)=0
virtual CFxMainFrame * GetMainFrame() const =0
virtual int MessageBox(const CFxString &csText, const CFxString &csCaption, unsigned int uType) const =0
virtual void Write(const CFxString &str, const CFxDocument *pContext=0) const =0
virtual void Help(const CFxString &lpCommandName) const =0
virtual CFxString GetAppDataVersion() const =0
virtual void WriteLine(const CFxString &str, const CFxDocument *pContext=0, bool bShowCommandWindowOutput=false) const =0
virtual void RemoveOutputDevice(CFxOutputDevice *device)=0
Remove device, if it is there.
virtual void StopATFBomb()=0
virtual bool userBreak()=0
virtual void ExitApplication(int nReturnCode=0)=0
virtual CFxEvalModeHandler * GetFxEvalModeHandler()=0
virtual bool IsOEMModuleAuthorised()=0
virtual CFxString FindFile(const CFxString &sFile, bool bDisplayMessage=false, const OdDbBaseDatabase *pDb=0, OdDbHostAppServices::FindFileHint hint=OdDbHostAppServices::kDefault) const =0
virtual void AuthoriseOEMModule(bool authorise)=0
virtual void SetOEMVersion(const CFxString &sOEMVersion)=0
virtual CFxHostAppServices * GetHostAppServices()=0
virtual CFxNetworkAccessManager * GetFxNetworkAccessManager()=0
Definition: FxUI.h:88
enum CFxUserIO::_FileNameType FileNameType
@ eFileNameNoFlags
Definition: FxUserIO.h:561
enum CFxUserIO::_FileNameRetVal FileNameRetVal
enum CFxUserIO::_FileNameFlags FileNameFlags
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
DwgVersion
Definition: OdaDefs.h:46
@ kDHL_CURRENT
Definition: OdaDefs.h:101
@ version
Definition: Tf.h:335