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
10 #include <Mstn/Mdlapi/filelist.h>
13 #include <Bentley/WString.h>
15 #include <DgnPlatform\DgnFile.h>
16 #include <ECObjects\ECInstance.h>
17 #include <vector>
26 typedef RefCountedPtr<MstnPlatform::DgnDocumentList> DgnDocumentListPtr;
28 typedef RefCountedPtr<MstnPlatform::MSFolderList> MSFolderListPtr;
30 typedef bvector<DgnFilePtr> T_DgnFilePtrVector;
31 typedef bvector<DgnFilePtr> const* T_DgnFilePtrVectorCP;
32 typedef bvector<DgnFilePtr> const& T_DgnFilePtrVectorCR;
33 typedef bvector<DgnFilePtr>& T_DgnFilePtrVectorR;
39 struct ISessionMgr;
42 /*=================================================================================**/
47 {
48 private:
49  FileOpenParams m_params;
51 public:
52  MSCORE_EXPORT MSDocumentOpenDialogParams();
54  void SetRscFileHandle (RscFileHandle h) {m_params.dialogRscH = h;}
55  void SetDialogId (RscId dialogid) {m_params.dialogId = dialogid;}
56  void SetOpenCreate (int openCreate) {m_params.openCreate = openCreate;}
57  void SetSuggestedFileName (WCharCP name) {m_params.suggestedFileNameP = name;}
58  void SetDefaultFilter (WCharCP filter) {m_params.defaultFilterP = filter;}
59  void SetFilterInfoString (WCharCP info) {m_params.filterInfoStrP = info;}
60  void SetDefaultDir (WCharCP dir) {m_params.defaultDirP = dir;}
61  void SetDirCfgVar (WCharCP var) {m_params.dirCfgVarP = var;}
62  void SetDialogTitle (WCharCP title) {m_params.titleP = title;}
63  void SetDefFileId (int id) {m_params.defFileId = id;}
65  void SetDialogOwnerMD (MdlDesc* owner) {m_params.dialogOwnerMD = owner;}
66  void SetDefSeedFileName (WCharP name) {m_params.defSeedFileNameP = name;}
67  void SetDefSeedDir (WCharP dir) {m_params.defSeedDirP = dir;}
68  void SetDefSeedFilter (WCharP filter) {m_params.defSeedFilterP = filter;}
69  void SetDefSeedFileId (int fileId) {m_params.defSeedFileId = fileId;}
70  void SetRequiredRights (UInt32 rights) {m_params.requiredRights = rights;}
71  void SetFilterStringListId (int id) {m_params.filterStringListId = id;}
75  void SetWorkSetName (WCharCP workSetName) {m_params.workSetNameP = workSetName;}
76  void SetWorkSpaceName (WCharCP workSpaceName) {m_params.workSpaceNameP = workSpaceName; }
78  FileOpenParams const& GetFileOpenParams() const {return m_params;}
79  FileOpenParams& GetFileOpenParamsR() {return m_params;}
81  RscFileHandle GetRscFileHandle() const {return m_params.dialogRscH;}
82  RscId GetDialogId() const {return m_params.dialogId;}
83  int GetOpenCreate() const {return m_params.openCreate;}
84  WCharCP GetSuggestedFileName() const {return m_params.suggestedFileNameP;}
85  WCharCP GetDefaultFilter() const {return m_params.defaultFilterP;}
86  WCharCP GetFilterInfoString() const {return m_params.filterInfoStrP;}
87  WCharCP GetDefaultDir() const {return m_params.defaultDirP;}
88  WCharCP GetDirCfgVar() const {return m_params.dirCfgVarP;}
89  WCharCP GetDialogTitle() const {return m_params.titleP;}
90  RscId GetDefFileId() const {return m_params.defFileId;}
91  RscFileHandle GetDefRscFileHandle() const {return m_params.defFileRscH;}
92  MdlDesc* GetDialogOwnerMD() const {return m_params.dialogOwnerMD;}
93  WCharCP GetDefSeedFileName() const {return m_params.defSeedFileNameP;}
94  WCharCP GetDefSeedDir() const {return m_params.defSeedDirP;}
95  WCharCP GetDefSeedFilter() const {return m_params.defSeedFilterP;}
96  int GetDefSeedFileId() const {return m_params.defSeedFileId;}
97  UInt32 GetRequiredRights() const {return m_params.requiredRights;}
98  RscId GetFilterStringListId() const {return m_params.filterStringListId;}
102  WCharCP GetWorkSetName () const {return m_params.workSetNameP;}
103  WCharCP GetWorkSpaceName () const {return m_params.workSpaceNameP; }
104 };
106 /*=================================================================================**/
110  {
111 private:
112  virtual void MakeClassAbstract() = 0;
113 public:
114 public:
118  WString m_fullCommandLine;
120  WString m_extraCommandLine;
122  };
133 /*=================================================================================**/
141  {
142 private:
143  virtual void MakeClassAbstract() = 0;
144 public:
145 public:
159  MSCORE_EXPORT DgnDocumentPtr OpenDocumentDialog(DgnPlatform::DgnFileStatus& status, MSDocumentOpenDialogParams& params, int attributes, DgnPlatform::DgnDocument::FetchMode openMode);
169  MSCORE_EXPORT DgnDocumentPtr CreateNewDocumentDialog(DgnPlatform::DgnFileStatus& status, MSDocumentOpenDialogParams& params, DgnPlatform::DgnDocument::OverwriteMode overwriteMode);
172  MSCORE_EXPORT DgnDocumentMonikerListPtr CreateMonikerList ();
173  MSCORE_EXPORT DgnFolderMonikerListPtr CreateFolderMonikerList ();
174  MSCORE_EXPORT DgnBaseMonikerListPtr CreateDgnBaseMonikerList ();
181  MSCORE_EXPORT DgnDocumentListPtr OpenDocumentListEditDialog(StatusInt&, MSDocumentOpenDialogParams&, FileListInfo*, int attributes, WCharCP listLabel, WCharCP basePath, DgnPlatform::DgnDocument::FetchMode);
187  MSCORE_EXPORT DgnFolderMonikerPtr OpenFolderDialog(StatusInt &, MSDocumentOpenDialogParams &, int attributes, WCharCP basePath, DgnPlatform::DgnDocument::FetchMode);
198  MSCORE_EXPORT StatusInt CompareDocumentWorkspaces(bool & profilesEqual, DgnDocumentMonikerCR document1, DgnDocumentMonikerCR document2, WCharCP generatorArgs);
209  MSCORE_EXPORT StatusInt GetDocumentWorkspace(bool* workspaceAssigned, MSWorkspaceInfo* workspaceInfo, DgnDocumentMonikerCR documentMoniker, WCharCP generatorArgs);
215  MSCORE_EXPORT static MSDocumentManagerR GetManager();
216  };
219 typedef bvector<DgnDocumentPtr> T_DocumentPtrVec;
221 /*=================================================================================**/
224 struct DgnDocumentList : RefCountedBase, T_DocumentPtrVec
225  {
226 private:
227  virtual void MakeClassAbstract() = 0;
228 public:
229  };
Definition: DgnPlatformErrors.r.h:66
WString m_workspaceRoot
Definition: DocumentManager.h:115
RscId defSeedFileId
see defSeedFileNameP
Definition: filelist.h:319
struct DgnPlatform::DgnDocumentMoniker const & DgnDocumentMonikerCR
Definition: DgnPlatform.h:197
struct MstnPlatform::DgnDocumentList const & DgnDocumentListCR
Definition: DgnPlatform.h:160
WCharCP GetWorkSetName() const
Definition: DocumentManager.h:102
void SetPreIncludeCADFileOpenFilters(bool on)
Definition: DocumentManager.h:73
UInt32 preIncludeCADFileOpenFilters
Definition: filelist.h:347
WCharCP GetDefaultDir() const
Definition: DocumentManager.h:87
Definition: DgnPlatform.h:30
wchar_t * WCharP
Definition: Bentley.h:225
UInt32 RscFileHandle
Definition: DgnPlatform/LineStyle.h:12
void SetDefSeedFilter(WCharP filter)
Definition: DocumentManager.h:68
void SetDefSeedDir(WCharP dir)
Definition: DocumentManager.h:67
void SetPostIncludeCADFileOpenFilters(bool on)
Definition: DocumentManager.h:74
void SetDefFileId(int id)
Definition: DocumentManager.h:63
void SetDefaultFilter(WCharCP filter)
Definition: DocumentManager.h:58
int GetDefSeedFileId() const
Definition: DocumentManager.h:96
Definition: DocumentManager.h:224
void SetDialogId(RscId dialogid)
Definition: DocumentManager.h:55
bool GetPreIncludeCADFileOpenFilters() const
Definition: DocumentManager.h:100
void SetFilterStringListId(int id)
Definition: DocumentManager.h:71
void SetDirCfgVar(WCharCP var)
Definition: DocumentManager.h:61
WCharCP GetDefaultFilter() const
Definition: DocumentManager.h:85
Definition: DgnPlatform.h:29
void SetRscFileHandle(RscFileHandle h)
Definition: DocumentManager.h:54
RscFileHandle GetDefRscFileHandle() const
Definition: DocumentManager.h:91
Definition: DgnDocumentManager.h:455
bvector< DgnFilePtr > const & T_DgnFilePtrVectorCR
Definition: DocumentManager.h:32
struct FileOpenParams::@221 filterFlags
unused; should be set to zero
void SetSuggestedFileName(WCharCP name)
Definition: DocumentManager.h:57
wchar_t const * WCharCP
Definition: Bentley.h:224
FileOpenParams const & GetFileOpenParams() const
Definition: DocumentManager.h:78
void SetRequiredRights(UInt32 rights)
Definition: DocumentManager.h:70
WCharCP workSetNameP
WorkSet for which file and Directory history should be shown.
Definition: filelist.h:358
WCharP defSeedFileNameP
defSeedFileNameP, defSeedDirP, defSeedFilterP and defSeedFileId are identical to suggestedFileNameP, defaultDirP, defaultFilterP and defFileId except that these are used for the seed file Dialog Box.
Definition: filelist.h:310
WCharCP defaultDirP
The directory where the selection process starts.
Definition: filelist.h:276
uint32_t UInt32
Definition: Bentley.r.h:128
WCharCP suggestedFileNameP
File name that will be suggested to the user when the Dialog Box is first opened. ...
Definition: filelist.h:257
#define NULL
Definition: Bentley.h:157
RscFileHandle defFileRscH
User preference resource file opened by the calling application.
Definition: filelist.h:299
Definition: Bentley.r.h:24
void SetDefSeedFileId(int fileId)
Definition: DocumentManager.h:69
UInt32 postIncludeCADFileOpenFilters
Definition: filelist.h:348
WString m_projectCfgPath
User configuration filename. It will be empty if managed workspace is assigned.
Definition: DocumentManager.h:117
RscId filterStringListId
Id of String list containing file filters and descriptions.
Definition: filelist.h:341
bvector< DgnFilePtr > const * T_DgnFilePtrVectorCP
Definition: DocumentManager.h:31
WCharCP defaultFilterP
The filter to use for determining which files to include in the file list.
Definition: filelist.h:263
This struct specifies all of the options for presenting the "Open File" dialog to the user...
Definition: DocumentManager.h:46
WCharCP GetDefSeedFilter() const
Definition: DocumentManager.h:95
WString m_userCfgFilePath
Workspace root directory. It will be empty if managed workspace is assigned.
Definition: DocumentManager.h:116
WCharCP GetDefSeedDir() const
Definition: DocumentManager.h:94
MSDocumentManager provides services to create, find, open, and save files, either to/from the local f...
Definition: DocumentManager.h:140
void SetDialogTitle(WCharCP title)
Definition: DocumentManager.h:62
Definition: DgnDocumentManager.h:439
void SetOpenCreate(int openCreate)
Definition: DocumentManager.h:56
void SetFilterInfoString(WCharCP info)
Definition: DocumentManager.h:59
IManager * GetManager()
Return a pointer to the one and only relationship manager.
void SetWorkSetName(WCharCP workSetName)
Definition: DocumentManager.h:75
bvector< DgnFilePtr > & T_DgnFilePtrVectorR
Definition: DocumentManager.h:33
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
void SetFilterRscFileHandle(RscFileHandle h)
Definition: DocumentManager.h:72
WCharCP GetWorkSpaceName() const
Definition: DocumentManager.h:103
RscId defFileId
Identifies a resource in the user preference file specified by defFileRscH.
Definition: filelist.h:293
Definition: DgnPlatform.h:87
WCharCP GetFilterInfoString() const
Definition: DocumentManager.h:86
MdlDesc * GetDialogOwnerMD() const
Definition: DocumentManager.h:92
WCharCP GetDirCfgVar() const
Definition: DocumentManager.h:88
Structure used by mdlDialog_fileOpenExt.
Definition: filelist.h:230
int GetOpenCreate() const
Definition: DocumentManager.h:83
UInt32 requiredRights
Specifies the rights that the user must have to allow the application to process the file...
Definition: filelist.h:332
RscId GetFilterStringListId() const
Definition: DocumentManager.h:98
RscFileHandle GetFilterRscFileHandle() const
Definition: DocumentManager.h:99
WCharCP filterInfoStrP
String which describes defaultFilterP, specify NULL for the default description.
Definition: filelist.h:269
WCharCP GetSuggestedFileName() const
Definition: DocumentManager.h:84
int StatusInt
Definition: Bentley.h:222
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
WCharCP titleP
The title of the Dialog Box.
Definition: filelist.h:283
RscId dialogId
ID of a Dialog Box in the resource file specified by dialogRscH.
Definition: filelist.h:239
FileOpenParams & GetFileOpenParamsR()
Definition: DocumentManager.h:79
RscFileHandle dialogRscH
Resource file from which to load a user-specified Dialog Box.
Definition: filelist.h:234
RscId GetDialogId() const
Definition: DocumentManager.h:82
Definition: Bentley.r.h:25
WCharCP dirCfgVarP
The name of a MicroStation configuration variable which is used to populate the contents of the "Dire...
Definition: filelist.h:280
bvector< DgnFilePtr > T_DgnFilePtrVector
Definition: DocumentManager.h:30
RscId GetDefFileId() const
Definition: DocumentManager.h:90
void SetWorkSpaceName(WCharCP workSpaceName)
Definition: DocumentManager.h:76
void SetDialogOwnerMD(MdlDesc *owner)
Definition: DocumentManager.h:65
WCharCP workSpaceNameP
WorkSpace for which file and Directory history should be shown.
Definition: filelist.h:361
RscFileHandle filterStringHandle
Definition: filelist.h:342
WCharCP defSeedFilterP
see defSeedFileNameP
Definition: filelist.h:316
void SetDefaultDir(WCharCP dir)
Definition: DocumentManager.h:60
int openCreate
Controls the attributes of the Dialog Box.
Definition: filelist.h:252
struct mdlDesc MdlDesc
Definition: DgnTool.h:18
int32_t RscId
Definition: ecimagekey.h:16
Definition: filelist.h:204
void SetDefSeedFileName(WCharP name)
Definition: DocumentManager.h:66
void SetDefRscFileHandle(RscFileHandle h)
Definition: DocumentManager.h:64
UInt32 GetRequiredRights() const
Definition: DocumentManager.h:97
bool GetPostIncludeCADFileOpenFilters() const
Definition: DocumentManager.h:101
Specifies what to do when creating a document if the document already exists.
Definition: DgnDocumentManager.h:388
MdlDesc * dialogOwnerMD
Unused, pass NULL.
Definition: filelist.h:302
WCharCP GetDialogTitle() const
Definition: DocumentManager.h:89
Definition: DgnDocumentManager.h:462
WCharCP defSeedDirP
see defSeedFileNameP
Definition: filelist.h:313
RscFileHandle GetRscFileHandle() const
Definition: DocumentManager.h:81
WCharCP GetDefSeedFileName() const
Definition: DocumentManager.h:93
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
Definition: DocumentManager.h:109
DgnDocumentManager provides services to create, find, open, and save files, either to/from the local ...
Definition: DgnDocumentManager.h:860

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