auiitem.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 
10 #pragma once
11 
13 #include "ecpresentationtypedefs.h"
14 #include <ECObjects\ECInstance.h>
15 
17 
18 /*=================================================================================**/
20 
22 struct IAUIItem : public RefCountedBase // Content Service Element
23  {
24 
25  public:
27  ECOBJECTS_EXPORT IAUIDataContextCP GetDataInstance() const;
28 
30  ECOBJECTS_EXPORT IAUIItemInfoCR GetUIItemInfo () const;
31 
33  ECOBJECTS_EXPORT IAUIItemCP GetParent () const;
34  };
35 
36 /*=================================================================================**/
38 
40 struct IAUIItemInfo
41  {
43  enum ItemType
44  {
54  };
55 
56  public:
58  virtual ~IAUIItemInfo ()
59  {}
60 
62  ECOBJECTS_EXPORT bool IsAggregatable() const;
65 
66  };
67 
68 /*=================================================================================**/
71 
73 struct IAUIDataContext
74  {
77  {
78  Custom = 0,
82  //TODO Move this enum to a string for repository dependant values
88  };
89 
91  virtual ContextType _GetContextType() const = 0;
92 
96  virtual void* GetCustomData() const {return NULL;}
98  virtual ECInstanceIterableCP GetInstanceIterable () const {return NULL;}
100  virtual WString GetMoniker () const {return NULL;}
104  virtual ~IAUIDataContext () {}
105  };
106 
108 
Definition: auiitem.h:86
Definition: auiitem.h:46
Definition: auiitem.h:79
Definition: auiitem.h:78
virtual ContextType _GetContextType() const =0
Get context type which can be used to call the appropriate Get function.
virtual ~IAUIItemInfo()
Constructor that initializes an item from a primitive type.
Definition: auiitem.h:58
Definition: auiitem.h:53
bool IsAggregatable() const
NEEDSWORK: Add comment here.
virtual WString GetMoniker() const
NEEDSWORK: Add comment here.
Definition: auiitem.h:100
virtual IECInstanceInterfaceCP GetInstanceInterface() const
Get the data instance that this datacontext stores.
Definition: auiitem.h:94
virtual void * GetCustomData() const
NEEDSWORK: Add comment here.
Definition: auiitem.h:96
Definition: auiitem.h:47
IECInstanceInterface const * IECInstanceInterfaceCP
Definition: ECObjects.h:68
#define NULL
Definition: Bentley.h:157
Definition: auiitem.h:87
#define ECOBJECTS_EXPORT
Definition: ECObjects.h:20
Definition: auiitem.h:48
ContextType
Describes the different type of context available to the user.
Definition: auiitem.h:76
Definition: auiitem.h:51
ItemType
Describes the primitive UI type an item info represents.
Definition: auiitem.h:43
IAUIItemCP GetParent() const
Get the parent instance associated with this instance.
IAUIItemInfoCR GetUIItemInfo() const
Get the command associated with this ui instance if any.
IAUIDataContextCP GetDataInstance() const
Get the data instance bind with this ui instance.
#define END_BENTLEY_ECOBJECT_NAMESPACE
Definition: DgnPlatform.h:41
virtual ECInstanceIterableCP GetInstanceIterable() const
NEEDSWORK: Add comment here.
Definition: auiitem.h:98
ECInstanceIterable const * ECInstanceIterableCP
Definition: ECObjects.h:92
Definition: auiitem.h:80
Definition: auiitem.h:84
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
! A AUIItem is an instance of a control facing a user.
Definition: auiitem.h:22
ItemType GetItemType() const
NEEDSWORK: Add comment here.
Definition: auiitem.h:45
Definition: auiitem.h:50
Definition: auiitem.h:49
! A AUIItemInfo describes the type of a control in a platform independent fashion.
Definition: auiitem.h:40
Definition: auiitem.h:52
virtual ~IAUIDataContext()
Virtual destructor.
Definition: auiitem.h:104
ContextType GetContextType() const
NEEDSWORK: Add comment here.
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
#define BEGIN_BENTLEY_ECOBJECT_NAMESPACE
Definition: DgnPlatform.h:40

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