CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxSystemServices.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2023 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
27class CFxMainFrame;
30class CFxLicenseInfo;
31class QGLWidget;
33class CFxIO;
34class CFxApplications;
35class CFxVSTA;
36class CFxUI;
38class CFxFileData;
39class CFxObjectManager;
40class CFxBagFiler;
41class CFxInferencePointManager;
42class QMimeData;
43class CFxGeomUtils;
44class CFxEvalModeHandler;
45class CFxViewDrawInfo;
46class CXeRemoteFileManager;
47class CFxSelectionSetFilterHolder;
48class CFxTrackerData;
49class CXeStorageServices;
50class CXeHostServices;
51class CFxAPI;
52class CFxOutputDevice;
53
54struct IDispatch;
55
58
59class OdGiRasterImage;
61
64
65class CFxDatabase;
67
68class CFxRasterImage;
70
72
73class CFxActionMacroManager;
74
81{
82public:
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
168 virtual CFxHostAppServices* GetHostAppServices() noexcept = 0;
169
172 virtual OdDbSystemServices* GetSystemServices() noexcept = 0;
173
176 virtual CFxEvalModeHandler* GetFxEvalModeHandler() noexcept = 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
290
295
299 virtual CFxIO* GetFxIO() = 0;
300
304 virtual CFxApplications* GetFxApplications() noexcept = 0;
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,
336 CFxUserIO::FileNameType eType,
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,
343 CFxUserIO::FileNameFlags flags = CFxUserIO::eFileNameNoFlags,
344 OdCodePageId** codepage = 0) = 0;
345
364 virtual int FileDialog(
365 CFxUserIO::FileNameRetVal* pResultMode,
366 CFxStringArray* pResultStrs,
367 FxWId parent,
368 CFxUserIO::FileNameType eType,
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,
375 CFxUserIO::FileNameFlags flags = CFxUserIO::eFileNameNoFlags,
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
409 virtual CFxNetworkAccessManager * GetFxNetworkAccessManager( ) = 0;
410
413// virtual CFxExtentsAccumulator* CreateExtentsAccumulator() = 0;
414
417 virtual CFxGeometryClipperPtr CreateGeometryClipper() = 0;
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
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
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
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
666 virtual OdResBufPtr ExecuteStringOnPause( CFxDocument* pDoc, const CFxString& strCommand, const CFxExpressionParserData* pData = 0 ) = 0;
667};
668
671
672#include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
int FxWId
std::vector< CFxString > CFxStringArray
Definition: FxString.h:35
OdSmartPtr< OdGiRasterImage > OdGiRasterImagePtr
OdSmartPtr< CFxDatabase > CFxDatabasePtr
OdSmartPtr< CFxRasterImage > CFxRasterImagePtr
OdArray< const OdGiDrawable * > OdGiDrawableArray
DDKERNEL_API CFxSystemServices * GetFxSystemServices() noexcept
OdSmartPtr< CFxGeometryClipper > CFxGeometryClipperPtr
OdSmartPtr< CFxVectorizeDevice > CFxVectorizeDevicePtr
ModelerType
Definition: IfcCore.h:55
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
enum CFxSystemServices::_ModelerType ModelerType
virtual void QueueExpr(const CFxExpressionParserData *pData, int rtype,...)=0
virtual OdResBufPtr SendStringToExecute(CFxDocument *pDoc, const CFxExpressionParserData *pData, OdResBufPtr pResbuf)=0
virtual const CFxActionMacroManager * GetFxActionMacroManager() const =0
virtual bool GetPassword(const CFxString &dwgName, bool isXref, OdPassword &password) const =0
virtual CFxInferencePointManager * GetInferencePointManager()=0
virtual void AuditPrintReport(OdDbAuditInfo *pAuditInfo, const CFxString &str) const =0
virtual void SetRibbonTheme(const CFxUIStyle::UIStyle value)=0
virtual CFxGeomUtils * GetGeomUtils() const =0
virtual CFxString GetVersion() const =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 bool AddOleDataToClipboard(QMimeData *pClipboardData, CFxDatabasePtr pData, int iFrameWidth, int iFrameHeight) const =0
virtual OdArray< CFxString > GetAvailableFonts(FontType eType) const =0
virtual void QueueExpr(const CFxExpressionParserData *pData, const OdResBufPtr &pExpr)=0
enum CFxSystemServices::_FontType FontType
virtual CFxProfileManager * GetFxProfileManager()=0
virtual void DisableUI(bool disable, bool includeCommandWindow=true, bool includeDocumentWindows=true, bool includeStatusBar=true)=0
virtual ~CFxSystemServices()
virtual CFxAPI * GetFxAPI(CFxDocument *pDocument)=0
virtual CFxUIStyle::UIStyle GetRibbonTheme() const =0
virtual CFxMainFrame * GetMainFrame() const =0
virtual OdCodePageId GetSystemCodepage() const =0
virtual OdResBufPtr SendStringToExecute(const CFxExpressionParserData *pData, int rtype,...)=0
virtual CFxVectorizeDevicePtr GetFxGDIDevice()=0
virtual OdResBufPtr ExecuteStringOnPause(CFxDocument *pDoc, const CFxString &strCommand, const CFxExpressionParserData *pData=0)=0
virtual OdResBufPtr SendStringToExecute(const CFxString &strCommand, const CFxExpressionParserData *pData=0)=0
virtual CFxObjectManager * GetObjectManager()=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 OdGiRasterImagePtr CreateRasterImage() const =0
virtual ModelerType GetModelerManufacture() const =0
virtual CFxDocumentManager * GetFxDocumentManager() noexcept=0
virtual bool DoVerb(const OdDbObjectId &idOleObject) const =0
virtual CFxActionMacroManager * GetFxActionMacroManager()=0
virtual void SetUserBreak(bool bUserBreak=true)=0
virtual bool GetVersion(int *major, int *minor, int *product, int *build) const =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 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 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 CFxIO * GetFxIO()=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 CFxApplications * GetFxApplications() noexcept=0
virtual OdSmartPtr< CFxBagFiler > CreateBagFiler(OdDbDatabase *db, OdDb::DwgVersion version=OdDb::kDHL_CURRENT, fdt_resbufW *resBuf=0, bool bIncludesDefaultValues=false)=0
Definition: FxUI.h:90
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
DwgVersion
Definition: OdaDefs.h:47
@ kDHL_CURRENT
Definition: OdaDefs.h:102