CFx SDK Documentation  2023 SP0
FxCommandContext.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2022 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 "FxPragmaPush.h"
20 
21 #include "DDKERNEL.h"
22 
23 #include <RxObject.h>
24 #include <StaticRxObject.h>
25 #include <DbUserIO.h>
26 #include <DbCommandContext.h>
27 
28 class CFxSelectionSet;
29 class CFxDocument;
30 class CFxCommandToken;
31 class CFxString;
32 
39 {
41 public:
43  ~CFxCommandContext() override;
44 
48  virtual CFxDocument* GetFxDocument() = 0;
49 
53  virtual const CFxDocument* GetFxDocument() const = 0;
54 
59 
63  virtual CFxString GetActiveCommandName() const = 0;
64 
68  virtual const CFxString& GetTopGroupName() const = 0;
72  virtual void SetTopGroupName( const CFxString& ) = 0;
76  virtual bool IsQuiescent() const = 0;
80  virtual bool IsSetVarActive() const = 0;
84  virtual bool IsCommandActive() const = 0;
88  virtual bool IsLISPActive() const = 0;
92  virtual bool IsTransparentCommandActive() const = 0;
96  virtual bool IsScriptActive() const = 0;
100  virtual bool IsMultipleActive() const = 0;
104  virtual unsigned int GetCommandStackDepth() const = 0;
105 
109  virtual const CFxCommandToken* GetActiveCommandToken() const = 0;
110 
114  virtual const CFxCommandToken* GetCommandToken( unsigned int iNumber) const = 0;
115 
119  virtual int GetInitdia() const = 0;
120 
125  virtual void SetExpressionToExecute( const OdResBufPtr& rbExpr ) = 0;
126 
127 protected:
131  OdDbDatabase* database() override;
132 
137 
141  OdEdFunctionIO* funcIO() override;
142 
148  void setArbitraryData(const OdString& szPathName, OdRxObject* pDataObj) override;
149 
155  OdRxObjectPtr arbitraryData(const OdString& szPathName) const override;
156 };
157 
160 
161 #include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
OdSmartPtr< CFxCommandContext > CFxCommandContextPtr
DDKERNEL_API CFxCommandContext * GetFxCommandContext(OdEdCommandContext *pCmdCtx)
virtual void SetTopGroupName(const CFxString &)=0
virtual bool IsTransparentCommandActive() const =0
virtual bool IsSetVarActive() const =0
virtual const CFxString & GetTopGroupName() const =0
~CFxCommandContext() override
virtual const CFxCommandToken * GetActiveCommandToken() const =0
virtual unsigned int GetCommandStackDepth() const =0
virtual CFxDocument * GetFxDocument()=0
virtual bool IsLISPActive() const =0
virtual void SetExpressionToExecute(const OdResBufPtr &rbExpr)=0
OdRxObjectPtr arbitraryData(const OdString &szPathName) const override
virtual CFxSelectionSet * GetFxMainSelectionSet()=0
virtual bool IsMultipleActive() const =0
virtual bool IsScriptActive() const =0
OdDbDatabase * database() override
virtual bool IsQuiescent() const =0
virtual OdDbSelectionSet & selectionSet()
void setArbitraryData(const OdString &szPathName, OdRxObject *pDataObj) override
virtual bool IsCommandActive() const =0
virtual const CFxCommandToken * GetCommandToken(unsigned int iNumber) const =0
virtual int GetInitdia() const =0
OdEdFunctionIO * funcIO() override
virtual CFxString GetActiveCommandName() const =0
virtual const CFxDocument * GetFxDocument() const =0
ODRX_DECLARE_MEMBERS(OdDbCommandContext)