IEditAction.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 /*---------------------------------------------------------------------------------**//*-------------+---------------+---------------+---------------+---------------+------*/
32 #include "MdlApi\dlogitem.h"
33 #include "IEvent.h"
36 
38 /*=================================================================================**/
42 {
43 private:
45 
47 
48 public:
50  MSCORE_EXPORT static QueuedAction* CreateAction(DgnPlatform::IEditAction& cmd);
51 
53  MSCORE_EXPORT void AddToInputq();
54 };
55 
56 
57 /*=================================================================================**/
62 {
63 
64 public:
65 
66 /*---------------------------------------------------------------------------------**/
76 MSCORE_EXPORT void AddEntry (DItem_PulldownMenuItem* newMenuItem, DItem_PulldownMenu* parentMenuItem,
77  IEditActionR action, WCharCP labelOveride, ECN::ECImageKeyCP imageOverride);
78 
80 MSCORE_EXPORT void AddDefaultMenuType (DItem_PulldownMenuItem* newMenuItem, DItem_PulldownMenu* parentMenuItem,
81  IEditActionR action, WCharCP labelOveride, ECN::ECImageKeyCP imageOverride);
82 }; // IEditActionMenu
83 
84 
85 
86 /*=================================================================================**/
91 {
92 protected:
93 
94 virtual bool _GetIsEnabled () const { return true; }
95 virtual void _GetCmdNumber (CommandNumber& cmdNumber, WString& unparsed, WCharCP& taskId) { cmdNumber = 0; taskId = NULL; }
96 MSCORE_EXPORT virtual BentleyStatus _ExecuteCmd (ECN::IAUIDataContextCP instance) override;
97 virtual void _AddToMenu (IEditActionMenu* menu) {return menu->AddEntry(NULL, NULL, *this, NULL, NULL);}
99 MSCORE_EXPORT void AddToMenu(IEditActionMenu* menu);
100 }; // EditAction
101 
102 
104 
106 
107 /*=================================================================================**/
113 {
114 public:
115 
116 /*---------------------------------------------------------------------------------**/
123 MSCORE_EXPORT void AddEditAction (IEditActionP action);
124 
125 /*---------------------------------------------------------------------------------**/
132 MSCORE_EXPORT IEditActionP GetEditAction (int index);
133 
134 /*---------------------------------------------------------------------------------**/
141 MSCORE_EXPORT IEditActionP GetAcceleratorAction (int index);
142 
143 }; // DgnPlatform::IEditActionArray
144 
147 
148 
void AddEntry(DItem_PulldownMenuItem *newMenuItem, DItem_PulldownMenu *parentMenuItem, IEditActionR action, WCharCP labelOveride, ECN::ECImageKeyCP imageOverride)
Add a new menu entry for the current popup for a HitPathP.
virtual void _AddToMenu(IEditActionMenu *menu)
Definition: IEditAction.h:97
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
Sorted list of all curently active EditActions.
Definition: IEditAction.h:112
#define bsiInterface
Definition: basedefs.h:31
Default class for an edit action.
Definition: IEditAction.h:90
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
virtual bool _GetIsEnabled() const
Definition: IEditAction.h:94
wchar_t const * WCharCP
Definition: Bentley.h:224
MicroStation implements this interface to allow applications to add entries to the EditAction popup m...
Definition: IEditAction.h:61
virtual void _GetCmdNumber(CommandNumber &cmdNumber, WString &unparsed, WCharCP &taskId)
Definition: IEditAction.h:95
#define NULL
Definition: Bentley.h:157
Applications should implement this interface for the EditActions they supply via an DgnPlatform::IEdi...
Definition: IEditActionSource.h:28
BentleyStatus
Definition: Bentley.h:208
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
UInt64 CommandNumber
Definition: DgnPlatformBaseType.r.h:76
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
Pulldown Menu Item.
Definition: dlogitem.h:2537
Definition: IEditAction.h:41
Definition: dlogitem.h:1263
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.