CFx SDK Documentation  2020SP3
FxCommand.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 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 <Ed/EdCommandStack.h>
24 
25 
26 class CFxCommandContext;
27 class CFxString;
28 class CFxDocument;
29 class CFxUserIO;
30 class CFxView;
31 class CFxSelectionSet;
32 
39 {
40 public:
41 
45  enum
46  {
47  kNoSelectionSetModifications = 0x04000000,
48  kViewOperation = 0x08000000,
49  kHidden = 0x10000000,
50  kDisabledInRefedit = 0x20000000,
51  kApplicationContext = 0x40000000,
52  kExecuteStartup = 0x80000000,
53  kHiddenHistory = 0x00040000,
54  kDisabledInActionRecording = 0x00001000,
55  kDimMoveEnabled = 0x00002000,
56  kHiddenInAutoComplete = 0x00004000,
57  kReadOnlyMode = 0x00008000,
58  kNoCommandOutput = 0x00000100,
59  kUseHoverSelection = 0x00000200
60  };
61 
62  /* {secret} */
64 
68  const OdString groupName() const override;
69 
73  virtual int Execute( CFxCommandContext* pFxCmdCtx) = 0;
74 
81  void execute( OdEdCommandContext* pCmdCtx ) override;
82 
86  void undefine( bool undefIt ) override;
87 
91  OdInt32 flags() const override;
92 
96  bool HasFlag( OdInt32 flag ) const;
104  static CFxString GetLISPGroupName( const CFxDocument* pDocument );
108  virtual void Help() const;
112  static void OpenHelp();
113 
117  virtual unsigned int GetHelpId() const;
118 
122  virtual const OdString displayName() const;
123 
124 protected:
126 
130  void AddFlags( OdInt32 flags );
131 
135  void RemoveFlags( OdInt32 flags );
136 
140  void SetFlags( OdInt32 flags );
141 
145  bool HasFlag( OdInt32 flag );
146 
148 };
149 
156 
157 #include "FxPragmaPop.h"
FxPragmaPop.h
OdString
Definition: OdString.h:95
CFxCommand::Execute
virtual int Execute(CFxCommandContext *pFxCmdCtx)=0
EdCommandStack.h
CFxCommand::GetHelpId
virtual unsigned int GetHelpId() const
CFxCommand::Help
virtual void Help() const
CFxCommand::~CFxCommand
~CFxCommand()
CFxCommand::HasFlag
bool HasFlag(OdInt32 flag) const
CFxUserIO
Definition: FxUserIO.h:138
CFxSelectionSet
Definition: FxSelectionSet.h:49
CreateSelectionSet
DDKERNEL_API CFxSelectionSet * CreateSelectionSet(OdEdCommandContext *pCmdCtx)
CFxCommand::HasFlag
bool HasFlag(OdInt32 flag)
DDKERNEL.h
OdEdCommand
Definition: EdCommandStack.h:75
CFxCommand::groupName
const OdString groupName() const override
CFxString
Definition: FxString.h:48
CFxCommand::GetLISPGroupName
static CFxString GetLISPGroupName(const CFxDocument *pDocument)
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdEdCommandContext
Definition: EdCommandContext.h:42
CFxCommand::GetBuiltInGroupName
static CFxString GetBuiltInGroupName()
CFxCommand::displayName
virtual const OdString displayName() const
CFxDocument
Definition: FxDocument.h:47
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
CFxCommand::OpenHelp
static void OpenHelp()
CFxView
Definition: FxView.h:265
CFxCommand::flags
OdInt32 flags() const override
CFxCommand::RemoveFlags
void RemoveFlags(OdInt32 flags)
CFxCommand::m_Flags
OdInt32 m_Flags
Definition: FxCommand.h:147
CFxCommand::execute
void execute(OdEdCommandContext *pCmdCtx) override
CFxCommandContext
Definition: FxCommandContext.h:39
FxPragmaPush.h
CFxCommand::AddFlags
void AddFlags(OdInt32 flags)
CFxCommand::SetFlags
void SetFlags(OdInt32 flags)
CFxCommand::undefine
void undefine(bool undefIt) override
CFxCommand
Definition: FxCommand.h:39
CFxCommand::CFxCommand
CFxCommand()