00001
00216 #ifndef INC_MGUI_DLGGETOBJECTDLG_H
00217 #define INC_MGUI_DLGGETOBJECTDLG_H
00218
00219 #ifndef INC_MGUI_DLGGETOBJECT_H
00220 #include <mgui/dlggetobject.h>
00221 #endif
00222
00223 #ifndef INC_MGUI_DLGSHELL_H
00224 #include <mgui/dlgshell.h>
00225 #endif
00226
00227 #ifndef INC_MGUI_EDIT_H
00228 #include <mgui/edit.h>
00229 #endif
00230
00231 #ifndef INC_MGUI_FORMLIST_H
00232 #include <mgui/formlist.h>
00233 #endif
00234
00235 #ifndef INC_MGUI_TOOLBAR_H
00236 #include <mgui/toolbar.h>
00237 #endif
00238
00239 #ifndef INC_MGUI_COMBOBOX_H
00240 #include <mgui/combobox.h>
00241 #endif
00242
00243 #ifndef INC_MGUI_STATUSBAR_H
00244 #include <mgui/statusbar.h>
00245 #endif
00246
00247 #ifndef INC_MGUI_SASH_H
00248 #include <mgui/sash.h>
00249 #endif
00250
00251 #ifndef INC_MGUI_FORMRADIOBUTTONS_H
00252 #include <mgui/formradiobuttons.h>
00253 #endif
00254
00255 #ifndef INC_MGUI_FORMTABBED_H
00256 #include <mgui/formtabbed.h>
00257 #endif
00258
00259 #ifndef INC_RVC_OBJITEMLIST_H
00260 #include <rvc/objitemlist.h>
00261 #endif
00262
00263 #ifndef INC_MI32_MISTRINGLIST_H
00264 #include <mi32/mistringlist.h>
00265 #endif
00266
00267 #ifndef INC_MI32_BITSET_H
00268 #include <mi32/bitset.h>
00269 #endif
00270
00271 #ifndef INC_MI32_XML_H
00272 #include <mi32/xml.h>
00273 #endif
00274
00275 #ifndef INC_SOA_UISERVERLIST_H
00276 #include <soa/uiserverlist.h>
00277 #endif
00278
00279 #ifndef INC_SPATMOD_IMAGETILESET_H
00280 #include <spatmod/imagetileset.h>
00281 #endif
00282
00283 #include <set>
00284
00285 #ifndef GENERATING_DOXYGEN_OUTPUT
00286 class MINETRES;
00287 class MISTATUSCONTEXT;
00288 namespace SOA {
00289 namespace WMS {
00290 class UI_FORM_CONNECTION;
00291 }
00292 namespace ARCIMS {
00293 class UI_FORM_CONNECTION;
00294 }
00295 }
00296 namespace GRE{
00297 class GROUP;
00298 namespace UI{
00299 class FORM_VIEW;
00300 }
00301 }
00302 namespace MGUI {
00303 class FORM_GEOCATALOG;
00304 class DLG_MYMAPS;
00305 class DLG_TEXTVIEW;
00306 class FORM_GOOGLESEARCH;
00307 }
00308 #endif
00309
00310
00311 namespace MGUI {
00312
00313
00314
00316 class DLG_GETOBJECT : public MGUI::DLGSHELL {
00317 public:
00318
00320 virtual ~DLG_GETOBJECT ();
00321
00323 CHAR_ENCODING GetTextEncoding (
00324 ) const { return (m_TextEncoding); }
00325
00327 void SetDelegateCreateCustomControlsBottom (
00328 DELEGATE_CREATECUSTOMCONTROLS delegate
00329 ) { m_DelegateCreateCustomControlsBottom = delegate; }
00330
00332 void SetDelegateCreateCustomControlsTop (
00333 DELEGATE_CREATECUSTOMCONTROLS delegate
00334 ) { m_DelegateCreateCustomControlsTop = delegate; }
00335
00338 void SetLabelNewFileName (
00339 MISTRING label
00340 ) { m_LabelNewFileName = label; }
00341
00343 void SetOverwriteMessage (
00344 const MISTRING& message
00345 ) { m_OverwriteMessage = message; }
00346
00348 void SetTextEncoding (
00349 CHAR_ENCODING encoding
00350 ) { m_TextEncoding = encoding; }
00351
00352 class ITEM;
00353 typedef MILIST<ITEM> ITEMLIST;
00354
00355 protected:
00356 #ifndef GENERATING_DOXYGEN_OUTPUT
00357 enum BOTTOMEXTRA {
00358 BOTTOMEXTRA_None,
00359 BOTTOMEXTRA_BrowseType,
00360 BOTTOMEXTRA_NewItemType,
00361 BOTTOMEXTRA_TextEncoding,
00362 BOTTOMEXTRA_Custom,
00363 };
00364
00366 DLG_GETOBJECT (
00367 const MISTRING& title,
00368 const DLG_GETOBJECT_FILTER& filter,
00369 DLG_GETOBJECT_STYLE dlgstyle,
00370 const char *IniGroupSettings,
00371 const char *IniGroupDftPath,
00372 const MISTRING *pPromptStr = 0,
00373 bool ShowNewObject = true
00374 );
00375
00376 int AcceptItem (
00377 ITEM& item,
00378 bool showmsg
00379 );
00380
00381 bool AcceptNewItem ();
00382
00383 bool AcceptNewItem (const MISTRING& name, const MISTRING& description);
00384
00385 int AcceptObjItem (
00386 const RVC::OBJITEM& objitem,
00387 bool isfile,
00388 bool showmsg
00389 );
00390
00391 void AddToolbarItemNavigateMode (CTRL_TOOLBAR& toolbar);
00392 void AddToolbarItemRefresh (CTRL_TOOLBAR& toolbar);
00393 void AddToolbarItemUpOneLevel (CTRL_TOOLBAR& toolbar);
00394 void AddToolbarItemViewMode (CTRL_TOOLBAR& toolbar);
00395
00396 void BuildBrowseList (bool ResetNewItem);
00397
00398 ERRVALUE BuildFileList (
00399 const FILEPATH& FolderPath,
00400 ITEMLIST& ItemList
00401 ) const;
00402
00403 bool CanAddToFavorites() const;
00404 bool CanDelete () const;
00405 bool CanEditACL () const;
00406 bool CanRename () const;
00407 bool CanSaveAs() const;
00408 bool CanSelectFileAsObject (
00409 const FILEPATH& filepath,
00410 RVC::OBJITEM &ObjItemRet,
00411 bool ResolveAutoLink = true
00412 ) const;
00413 bool CanShowMetadata () const;
00414 bool CanShowProperties () const;
00415 bool CanViewInGoogleMaps() const;
00416
00417 void CheckEnableOK ();
00418
00420 void ClearMessage (
00421 ) { m_StatusBar.ClearText(); }
00422
00424 void CreateBottomControls (
00425 BOTTOMEXTRA BottomExtra,
00426 bool AllowNew
00427 );
00428
00430 ERRVALUE CreateBrowseControls (
00431 LAYOUT_PANE_BASE& PaneParent
00432 );
00433
00435 void CreateBrowseList (
00436 LAYOUT_PANE_BASE& PaneParent
00437 );
00438
00440 void CreateBrowseTypeControls (
00441 LAYOUT_PANE_BASE& PaneParent
00442 );
00443
00445 void CreateControlsSpaceAvailable (
00446 LAYOUT_PANE_BASE& PaneParent,
00447 bool ShowTemporary = true
00448 );
00449
00451 void CreateCustomControlsBottom ();
00452
00454 void CreateCustomControlsTop ();
00455
00457 void CreateLabelPrompt (
00458 );
00459
00461 void CreateNavigateControls (
00462 LAYOUT_PANE_BASE& PaneParent,
00463 bool IncludeToolbar = true
00464 );
00465
00467 void CreateNewItemEditButton (
00468 );
00469
00471 void CreateNewItemEditControls (
00472 );
00473
00475 void CreateNewItemTypeControls (
00476 bool UseButtonPane = false
00477 );
00478
00479
00480 void CreateStatusBar ();
00481
00483 void CreateTextEncodingControls (
00484 bool UseButtonPane = false
00485 );
00486
00487 void DeselectAllItems ();
00488
00489 void DoCmdAddToFavorites ();
00490 void DoCmdDeleteSelectedItems ();
00491 ERRVALUE DoCmdEditACL ();
00492 void DoCmdNewFolder ();
00493 void DoCmdRename ();
00494 void DoCmdSaveAs ();
00495 void DoCmdShowMetadata ();
00496 void DoCmdShowProperties ();
00497 void DoCmdViewInGoogleMaps ();
00498
00499 ITEM& GetBrowseListItem (int itemnum) const
00500 { return (*reinterpret_cast<ITEM*>(m_FormBrowseList.GetItemID(itemnum))); }
00501
00502 ITEM * GetBrowseListItemSelected () const;
00503 const RVC::OBJITEM* GetBrowseListObjItemSelected () const;
00504
00506 DLG_GETOBJECT_STYLE GetDlgStyle (
00507 ) const { return (m_dlgstyle); }
00508
00509 const FORM_LIST& GetFormBrowseList (
00510 ) const { return (m_FormBrowseList); }
00511
00512 FORM_GEOCATALOG& GetFormCatalog (
00513 ) const { return (*m_pFormCatalog); }
00514
00515 SOA::ARCIMS::UI_FORM_CONNECTION& GetFormArcIMS (
00516 ) const { return (*m_pFormArcIMS); }
00517
00518 SOA::WMS::UI_FORM_CONNECTION& GetFormWMS (
00519 ) const { return (*m_pFormWMS); }
00520
00521 RVC::OBJTYPE GetObjTypeShow (
00522 ) const { return (m_ObjTypeShow); }
00523
00524 INT64 GetSpaceFreeInFile (
00525 ) const { return (m_SpaceFreeInFile); }
00526
00528 const RVC::OBJECT& GetObjParent (
00529 ) const { return (*m_pObjParent); }
00530
00531 const DLG_GETOBJECT_FILTER& GetFilter (
00532 ) const { return (*m_pFilter); }
00533
00534 const char * GetIniGroupSettings (
00535 ) const { return (m_IniGroupSettings); }
00536
00537 const ITEM& GetItemBrowseLocation (
00538 ) const { return (*m_pItemBrowseLocation); }
00539
00540 const ITEMLIST& GetItemListBrowse (
00541 ) const { return (*m_pItemListBrowse); }
00542
00543 void GetItemToolTip (CTRL_TOOLTIP& ToolTip, ITEM& item, CTRL* MenuParent) const;
00544
00545 const MISTRING& GetNewFileTypeExtn (
00546 ) const;
00547
00548 RVC::OBJTYPE GetObjTypeNew (
00549 ) const { return (m_ObjTypeNew); }
00550
00552 int GetSelectedItemType () const;
00553
00554 bool GetShowErrorsRVC (
00555 ) const { return (m_ShowErrorsRVC); }
00556
00558 bool GetUseNewItem (
00559 ) const;
00560
00561 bool HasCustomControlsBottom (
00562 ) const { return (!!m_DelegateCreateCustomControlsBottom); }
00563
00564 bool HasBrowseItemAvailable () const;
00565 bool HasBrowseItemSelected () const;
00566
00567 void InitFilePatternLists ();
00568
00569 bool IsBrowseListShown () const;
00570 bool IsCatalogResultShown () const;
00571
00573 int IsNewChildShortNameUnique (
00574 const RVC::OBJECTNAME& name
00575 ) const;
00576
00577 bool IsNewItemTypeRVC (
00578 ) const { return (m_ObjTypeNew != RVC::OBJTYPE_LAST); }
00579
00581 bool IsValidGeomashup (
00582 const FILEPATH& path
00583 ) const;
00584
00586 bool HasUsedObjItem (
00587 const RVC::OBJITEM& objitem
00588 ) const { return (v_HasUsedObjItem(objitem)); }
00589
00590
00591 void NotifyChangeBrowseListItem (
00592 int itemnum
00593 );
00594
00595 void OnEditNewItemActivate ();
00596
00597 int PromptRecurseLevels (MISTRING& pattern) const;
00598
00599 void RedrawBrowseList ()
00600 { m_FormBrowseList.Redraw(); }
00601
00602 void ResetEditNewItem ();
00603
00604 void SaveBrowseLocation ();
00605
00607 void SetBrowseLocation (
00608 const FILEPATH& FilePath,
00609 bool UpdateNavigateBar = true
00610 );
00611
00613 void SetBrowseLocation (
00614 const RVC::OBJITEM& ObjItemLocation,
00615 bool UpdateNavigateBar = true
00616 );
00617
00619 void SetBrowseLocation (
00620 const ITEM& Item,
00621 bool UpdateNavigateBar = true
00622 );
00623
00624 void SetMessage (
00625 const MISTRING& message,
00626 bool UpdateNow = false
00627 );
00628
00629 void SetMessageError (
00630 ERRVALUE err
00631 );
00632
00633 void SetObjTypeTestUnique (
00634 RVC::OBJTYPE ObjType
00635 ) { m_ObjTypeTestUnique = ObjType; }
00636
00637 void SetShowErrorsRVC (
00638 bool ShowErrorsRVC = true
00639 ) { m_ShowErrorsRVC = ShowErrorsRVC; }
00640
00641 void SetShowMaxPropDetails (
00642 bool ShowMaxPropDetails = true
00643 ) { m_ShowMaxPropDetails = ShowMaxPropDetails; }
00644
00645 void UpdateSpaceFree ();
00646
00647 virtual void v_InitBrowseLocation ();
00648 virtual void v_OnClose ();
00649 virtual void v_OnOK ();
00650
00651 #endif // GENERATING_DOXYGEN_OUTPUT
00652 private:
00653 #ifndef GENERATING_DOXYGEN_OUTPUT
00654 typedef DLGSHELL BASECLASS;
00655 typedef DLG_GETOBJECT THISCLASS;
00656 class NAVIGATEBAR;
00657
00658 enum EXTVALUES {
00659 EXTVALUE_None = 0,
00660 EXTVALUE_Description = 0x0001,
00661 EXTVALUE_TimeCreated = 0x0002,
00662 EXTVALUE_TimeModified = 0x0004,
00663 EXTVALUE_Dimensions = 0x0008,
00664 EXTVALUE_CRS = 0x0010,
00665 EXTVALUE_ResolutionInCRS = 0x0020,
00666 EXTVALUE_ExtentInCRS = 0x0040,
00667 EXTVALUE_SubType = 0x0080,
00668 EXTVALUE_SizeInBytes = 0x0100,
00669 };
00670
00671 MISTRING m_promptstr;
00672 MISTRING m_LabelNewFileName;
00673 MISTRING m_OverwriteMessage;
00674 const DLG_GETOBJECT_FILTER *m_pFilter;
00675 DLG_GETOBJECT_STYLE m_dlgstyle;
00676 DELEGATE_CREATECUSTOMCONTROLS m_DelegateCreateCustomControlsBottom;
00677 DELEGATE_CREATECUSTOMCONTROLS m_DelegateCreateCustomControlsTop;
00678 CTRL_LABEL m_LabelPrompt;
00679 NAVIGATEBAR *m_pNavigateBar;
00680 CTRL_TOOLBAR m_ToolbarNavigate;
00681 CTRL_TOOLBAR m_ToolbarPath;
00682 FORM_TABBED m_TabFormBrowse;
00683 FORM_TABBED m_TabFormCatalog;
00684 FORM_TABBED m_TabFormSearchWeb;
00685 FORM_LIST m_FormBrowseList;
00686 FORM_GEOCATALOG *m_pFormCatalog;
00687 DLG_MYMAPS *m_pDlgMyMaps;
00688 SOA::ARCIMS::UI_FORM_CONNECTION *m_pFormArcIMS;
00689 SOA::WMS::UI_FORM_CONNECTION *m_pFormWMS;
00690 FORM_GOOGLESEARCH *m_pFormGoogleSearch;
00691 CTRL_PUSHBUTTON m_BtnNewFolder;
00692 CTRL_LABEL m_LabelSpaceFree;
00693 CTRL_LABEL m_LabelTempSpace;
00694 FORM_EDIT_STRING m_EditNewItemName;
00695 FORM_EDIT_STRING m_EditNewItemDesc;
00696 CTRL_PUSHBUTTON m_BtnCreateFile;
00697 FORM_COMBOBOX m_CbxObjTypeShow;
00698 CTRL_LABEL m_LblFileType;
00699 FORM_RADIOBUTTONS m_RbnFileType;
00700 CTRL_COMBOBOX m_CbxFileTypeShow;
00701 CTRL_EDIT_STRING m_EditFileTypeShow;
00702 FORM_COMBOBOX m_CbxNewItemType;
00703 FORM_COMBOBOX m_CbxTextEncoding;
00704 CTRL_PUSHBUTTON m_BtnSkip;
00705 CTRL_STATUSBAR m_StatusBar;
00706 int m_PageBrowse;
00707 int m_PageCatalog;
00708 int m_PageCatalogSearch;
00709 int m_PageCatalogResults;
00710 int m_PageCatalogList;
00711 int m_PageWebSearch;
00712 int m_PageArcIMS;
00713 int m_PageWMS;
00714 int m_PageGoogleSearch;
00715 int m_BrowseFieldName;
00716 int m_BrowseFieldDateModified;
00717 int m_BrowseFieldDateCreated;
00718 int m_BrowseFieldSize;
00719 int m_BrowseFieldType;
00720 int m_BrowseFieldDescription;
00721 int m_BrowseFieldDimensions;
00722 FORM_LIST::VIEWMODE m_BrowseListViewMode;
00723 int m_BrowseListActiveItemNum;
00724 int m_BrowseListLastPressItemNum;
00725 ITEM *m_pItemBrowseLocation;
00726 ITEMLIST *m_pItemListBrowse;
00727 const FILETYPE *m_pFileTypeNew;
00728 RVC::OBJTYPE m_ObjTypeShow;
00729 RVC::OBJTYPE m_ObjTypeNew;
00730 RVC::OBJTYPE m_ObjTypeTestUnique;
00731 RVC::OBJECT *m_pObjParent;
00732 const char *m_IniGroupSettings;
00733 char *m_IniGroupDftPath;
00734 char m_IniNameDftPath[60];
00735 bool m_AllowShowObjTypesRVC;
00736 bool m_AllowShowLinkTypesRVC;
00737 bool m_ShowErrorsRVC;
00738 bool m_ShowMaxPropDetails;
00739 CHAR_ENCODING m_TextEncoding;
00740 MISTRINGLIST m_FilePatternListMenu;
00741 MISTRINGLIST m_FilePatternListUsed;
00742 mutable std::set<MISTRING> m_ExtnSetAutoLinkRVC;
00743 MISTRING m_LastUsedFilePattern;
00744 MISTRINGLIST m_LastUsedFilePatternList;
00745 bool m_UseNewItem;
00746 bool m_ShowNewObject;
00747 DLG_TEXTVIEW *m_pDlgProperties;
00748 INT64 m_SpaceFreeInFile;
00749 SPATMOD::IMAGE::TILESET::LIST m_tilesetlist;
00750 ERRVALUE m_ErrDownloading;
00751
00752 void AddRbnFilePattern (MISTRINGLIST::CONST_ITERATOR& itFilePattern, MISTRINGLIST& RbnFilePatternList);
00753
00754 ERRVALUE BuildBrowseListComputer ();
00755 ERRVALUE BuildBrowseListFolder ();
00756 ERRVALUE BuildBrowseListGeomashup ();
00757 ERRVALUE BuildBrowseListNetwork ();
00758 ERRVALUE BuildBrowseListWebLayers ();
00759 ERRVALUE BuildBrowseListRVC ();
00760
00761 EXTVALUES CalcExtValuesNeed (int fieldnum) const;
00762
00763 void ComputeExtentsForItem (ITEM& item) const;
00764
00765 ERRVALUE DeleteFolder (const FILEPATH& folderpath, bool DoReadOnly);
00766
00767 bool GetDftShowOnlyRVCFiles () const;
00768
00769 bool GetNewObjItem (
00770 RVC::OBJITEM& objitem
00771 ) { return (v_GetNewObjItem(objitem)); }
00772
00773 bool IsNodeBrowsable (
00774 XMLNODE* rootnode
00775 );
00776
00777 ERRVALUE DownloadMashup(XMLNODE* rootnode);
00778 ERRVALUE DownloadServerList(XMLNODE* rootnode);
00779
00780 void LoadLastUsedFileTypes ();
00781 ERRVALUE LoadWebLayers (ITEM& item);
00782 ERRVALUE LoadWebLayers (ITEM& item, bool bForceRefresh);
00783
00784 void OnBrowseListChangeSelection (INT32 itemnum);
00785 bool OnBrowseListDrawItem (FORM_LIST::CUSTOMDRAW& customdraw) const;
00786
00787
00788 int OnBrowseListFieldCompare (int itemnum1, int itemnum2, int fieldnum) const;
00789 void OnBrowseListGetDispInfo (int itemnum, int fieldnum, FORM_LIST::DISPINFO& dispinfo) const;
00790 bool OnBrowseListDoubleClick (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
00791 bool OnBrowseListPointerButtonDown (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
00792 bool OnBrowseListPointerButtonUp (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
00793 bool OnBrowseListToolTip (int itemnum, int fieldnum, CTRL_TOOLTIP &ToolTip, const POINT& Point) const;
00794 void OnCatalogClickItem (const RVC::OBJITEM& objitem);
00795 void OnCatalogDoubleClickItem (const RVC::OBJITEM& objitem);
00796 void OnCatalogCmdSearch ();
00797 void OnCbxFileTypeShow ();
00798 void OnCbxNewItemType ();
00799 void OnCbxObjTypeShow ();
00800 void OnCbxTextEncoding ();
00801 void OnCmdNavigateMode (MGUI::ID cmdid, bool ToggleOn);
00802 void OnCmdNewFolder (MGUI::ID cmdid, bool ToggleOn);
00803 void OnCmdRefresh (MGUI::ID cmdid, bool ToggleOn);
00804 void OnCmdSkip ();
00805 void OnCmdUpOneLevel (MGUI::ID cmdid, bool ToggleOn);
00806 void OnEditFileTypeShowApply ();
00807 void OnEditNewItemUserEditName ();
00808 void OnGetMyMaps (XMLNODE* node);
00809 void OnMenuBrowseListViewMode (MGUI::ID id, bool ToggleOn);
00810 void OnNavigateChangeLocation ();
00811 void OnNavigateEditEnd ();
00812 bool OnNavigateSelectItem(const ITEM& item);
00813 bool OnNavigateTestLocation (const RVC::OBJITEM& location) const;
00814 void OnPageActivate ();
00815 void OnRbnFileType ();
00816 void OnArcIMSDoubleClickItem (SOA::SERVERLIST::ITEM& item);
00817 void OnWMSDoubleClickItem (SOA::SERVERLIST::ITEM& item);
00818 void OnKMLDoubleClickItem (const MISTRING& name, const MISTRING& url);
00819
00820 void SaveLastUsedFileTypes ();
00821 void SetFilePattern (const MISTRING *pFilePattern, bool OnlySelectable = true);
00822 int TestShortNameUnique (const RVC::OBJECTNAME& name);
00823 void UpdateDlgProperties ();
00824
00825
00826 virtual int v_AcceptObjItem (const RVC::OBJITEM& objitem, bool isfile) = 0;
00827 virtual int v_AcceptItem (ITEM& item, bool showmsg);
00828 virtual int v_AddToFavorites (ITEM& item);
00829 virtual bool v_CanAddToFavorites () const;
00830 virtual bool v_CheckEnableOK ();
00831 virtual void v_EnableNewFolder (bool);
00832 virtual bool v_GetNewObjItem (RVC::OBJITEM& objitem);
00833 virtual bool v_HasUsedObjItem (const RVC::OBJITEM& objitem) const;
00834 virtual void v_OnDeleteDone ();
00835 virtual void v_OnUpdateUI ();
00836
00837 virtual void v_OnOpen ();
00838
00839 #endif
00840 };
00841
00842
00843
00844
00846 class DLG_GETOBJECT_SINGLE : public DLG_GETOBJECT {
00847 public:
00848
00850 DLG_GETOBJECT_SINGLE (
00851 const MISTRING& title,
00852 const DLG_GETOBJECT_FILTER& filter,
00853 const RVC::OBJITEM& ObjItemSelected,
00854 DLG_GETOBJECT_STYLE dlgstyle,
00855 const char *IniGroupDftPath = 0,
00856 const MISTRING *pPromptStr = 0
00857 );
00858
00860 DLG_GETOBJECT_SINGLE (
00861 const MISTRING& title,
00862 const DLG_GETOBJECT_FILTER& filter,
00863 const FILEPATH& FilePathSelected,
00864 DLG_GETOBJECT_STYLE dlgstyle,
00865 const char *IniGroupDftPath = 0,
00866 const MISTRING *pPromptStr = 0
00867 );
00868
00870 virtual ~DLG_GETOBJECT_SINGLE ();
00871
00873 const RVC::OBJITEM& GetSelectedItem (
00874 ) const { return (m_ObjItemSelected); }
00875
00876 protected:
00877
00878 #ifndef GENERATING_DOXYGEN_OUTPUT
00879
00880 DLG_GETOBJECT_SINGLE (
00881 const MISTRING& title,
00882 const RVC::OBJITEM& ObjItemChild,
00883 const DLG_GETOBJECT_FILTER& filter,
00884 DLG_GETOBJECT_STYLE dlgstyle,
00885 const char *IniGroupSettings,
00886 const MISTRING *pPromptStr = 0
00887 );
00888
00889 virtual void v_InitBrowseLocation ();
00890 #endif
00891
00892 private:
00893 #ifndef GENERATING_DOXYGEN_OUTPUT
00894 typedef DLG_GETOBJECT BASECLASS;
00895 typedef DLG_GETOBJECT_SINGLE THISCLASS;
00896
00897 RVC::OBJITEM m_ObjItemSelected;
00898
00899 void AcceptSelected ();
00900
00901 virtual ERRVALUE v_CreateContent ();
00902 virtual void v_OnOK ();
00903 virtual int v_AcceptObjItem (const RVC::OBJITEM& objitem, bool isfile);
00904 virtual bool v_CheckEnableOK ();
00905 virtual bool v_GetNewObjItem (RVC::OBJITEM& objitem);
00906 #endif
00907 };
00908
00909
00910
00912 class DLG_GETOBJECT_CHILD : public DLG_GETOBJECT_SINGLE {
00913 public:
00914
00916 DLG_GETOBJECT_CHILD (
00917 const MISTRING& title,
00918 const RVC::OBJITEM& ObjItemParent,
00919 const DLG_GETOBJECT_FILTER& filter,
00920 const RVC::OBJITEM& ObjItemChild,
00921 DLG_GETOBJECT_STYLE dlgstyle,
00922 const MISTRING *pPromptStr = 0
00923 );
00924
00926 virtual ~DLG_GETOBJECT_CHILD ();
00927
00928 private:
00929 #ifndef GENERATING_DOXYGEN_OUTPUT
00930 typedef DLG_GETOBJECT_SINGLE BASECLASS;
00931 #endif
00932 };
00933
00934
00935
00937 class DLG_GETOBJECT_MULTI : public DLG_GETOBJECT {
00938 public:
00939
00941 virtual ~DLG_GETOBJECT_MULTI ();
00942
00944 void GetSelectedItems (
00945 RVC::OBJITEMLIST& ObjItemList
00946 ) const;
00947
00949 void GetSelectedItems (
00950 ITEMLIST& ItemList
00951 ) const;
00952
00954 ERRVALUE SetSelectedItems (
00955 const RVC::OBJITEMLIST& ObjItemList
00956 );
00957
00958 protected:
00959 #ifndef GENERATING_DOXYGEN_OUTPUT
00960
00961 ITEMLIST m_ItemListUsed;
00962 ITEMLIST m_ItemListFavorites;
00963 ITEMLIST m_ItemListRecent;
00964
00966 DLG_GETOBJECT_MULTI (
00967 const MISTRING& title,
00968 const DLG_GETOBJECT_FILTER& filter,
00969 DLG_GETOBJECT_STYLE dlgstyle,
00970 const char *IniGroupSettings,
00971 const char *IniGroupDftPath = 0,
00972 const MISTRING *pPromptStr = 0,
00973 bool ShowNewObject = true
00974 );
00975
00976 void CreateSash (
00977 LAYOUT_PANE_BASE& PaneParent
00978 );
00979
00980 virtual void v_InitBrowseLocation ();
00981 #endif
00982
00983 private:
00984 #ifndef GENERATING_DOXYGEN_OUTPUT
00985 typedef DLG_GETOBJECT BASECLASS;
00986 typedef DLG_GETOBJECT_MULTI THISCLASS;
00987
00988 CTRL_SASH m_Sash;
00989
00990 virtual bool v_HasUsedObjItem (const RVC::OBJITEM& objitem) const;
00991 virtual ERRVALUE v_SetSelectedItemsBegin (const RVC::OBJITEMLIST& ObjItemList);
00992 virtual void v_SetSelectedItemsEnd () = 0;
00993 #endif
00994 };
00995
00996
00997
00999 class DLG_GETOBJECT_LIST : public DLG_GETOBJECT_MULTI {
01000 public:
01001
01003 DLG_GETOBJECT_LIST (
01004 const MISTRING& title,
01005 const DLG_GETOBJECT_FILTER& filter,
01006 DLG_GETOBJECT_STYLE dlgstyle,
01007 int minobjs = 1,
01008 int maxobjs = 0,
01009 const char *IniGroupDftPath = 0,
01010 const MISTRING *pPromptStr = 0
01011 );
01012
01014 virtual ~DLG_GETOBJECT_LIST ();
01015
01016 private:
01017 #ifndef GENERATING_DOXYGEN_OUTPUT
01018 typedef DLG_GETOBJECT_MULTI BASECLASS;
01019 typedef DLG_GETOBJECT_LIST THISCLASS;
01020
01021 enum CMDID {
01022 CMDID_Add = 1,
01023 CMDID_AddAll,
01024 CMDID_AddAllSub,
01025 CMDID_Remove,
01026 CMDID_RemoveAll,
01027 CMDID_AddToFavorites,
01028 CMDID_Rename
01029 };
01030
01031 int m_minobjs;
01032 int m_maxobjs;
01033 int m_UsedFieldName;
01034 int m_UsedFieldLocation;
01035 int m_FavoritesFieldName;
01036 int m_FavoritesFieldLocation;
01037 int m_RecentFieldName;
01038 int m_RecentFieldLocation;
01039 int m_PageSelected;
01040 int m_PageFavorites;
01041 int m_PageRecent;
01042 int m_PagePreview;
01043 GRE::GROUP* m_PreviewGroup;
01044 GRE::UI::FORM_VIEW* m_PreviewView;
01045 CTRL_TOOLBAR m_ToolbarUsedList;
01046 CTRL_TOOLBAR m_ToolbarFavoritesList;
01047 CTRL_TOOLBAR m_ToolbarRecentList;
01048 FORM_LIST m_FormUsedList;
01049 FORM_LIST m_FormFavoritesList;
01050 FORM_LIST m_FormRecentList;
01051 FORM_TABBED m_TabForm;
01052 FORM_LIST::VIEWMODE m_UsedListViewMode;
01053 FORM_LIST::VIEWMODE m_FavoritesListViewMode;
01054 FORM_LIST::VIEWMODE m_RecentListViewMode;
01055
01056 ERRVALUE AddAll (
01057 );
01058
01059 ERRVALUE AddAllFavorites (
01060 );
01061
01062 ERRVALUE AddAllRecent (
01063 );
01064
01065 ERRVALUE AddAll (
01066 const RVC::OBJECT& ObjParent,
01067 bool recursefolders,
01068 const MISTRING& pattern
01069 );
01070
01071 ERRVALUE AddAll (
01072 const RVC::OBJECT& ObjParent,
01073 bool recursefolders
01074 );
01075
01076 ERRVALUE AddAllChildObjects (
01077 const RVC::OBJECT& ObjParent,
01078 const MISTRING& pattern
01079 );
01080
01081 ERRVALUE AddAllRecursive (
01082 const FILEPATH& FolderPath,
01083 MISTATUSCONTEXT& StatusContext,
01084 int RecurseLevels,
01085 const MISTRING& pattern
01086 );
01087
01088 int AddSelected ();
01089
01090 int AddSelectedFavorites ();
01091
01092 int AddSelectedRecent ();
01093
01094 void AppendToUsedList (const ITEM *pItem);
01095 void AppendToFavoritesList (const ITEM *pItem);
01096 void AppendToRecentList (const ITEM *pItem);
01097 void CreatePreview();
01098 void OnCmdUsedList (MGUI::ID cmdid, bool ToggleOn);
01099 void OnCmdFavoritesList (MGUI::ID cmdid, bool ToggleOn);
01100 void OnCmdRecentList (MGUI::ID cmdid, bool ToggleOn);
01101 void OnMenuUsedListViewMode (MGUI::ID id, bool ToggleOn);
01102 void OnMenuFavoritesListViewMode (MGUI::ID id, bool ToggleOn);
01103 void OnMenuRecentListViewMode (MGUI::ID id, bool ToggleOn);
01104 void OnPreviewActive ();
01105 void OnUsedListChangeSelection (INT32 itemnum);
01106 void OnFavoritesListChangeSelection (INT32 itemnum);
01107 void OnRecentListChangeSelection (INT32 itemnum);
01108 bool OnFavoritesListDoubleClick (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01109 bool OnRecentListDoubleClick (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01110 bool OnUsedListPointerButtonDown (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01111 bool OnFavoritesListPointerButtonDown (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01112 bool OnRecentListPointerButtonDown (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01113 bool OnFavoritesListPointerButtonUp (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01114 bool OnRecentListPointerButtonUp (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01115 bool OnUsedListToolTip (int itemnum, int fieldnum, CTRL_TOOLTIP &ToolTip, const POINT& Point) const;
01116 bool OnFavoritesListToolTip (int itemnum, int fieldnum, CTRL_TOOLTIP &ToolTip, const POINT& Point) const;
01117 bool OnRecentListToolTip (int itemnum, int fieldnum, CTRL_TOOLTIP &ToolTip, const POINT& Point) const;
01118 void PopulateFavorites();
01119 void PopulateRecent();
01120 void SaveFavoriteItems();
01121 void SaveRecentItems();
01122
01123 virtual ERRVALUE v_CreateContent ();
01124 virtual void v_OnClose ();
01125 virtual void v_OnOK ();
01126 virtual int v_AcceptObjItem (const RVC::OBJITEM& objitem, bool isfile);
01127 virtual int v_AddToFavorites (ITEM& item);
01128 virtual bool v_CanAddToFavorites () const;
01129 virtual bool v_CheckEnableOK ();
01130 virtual void v_OnDeleteDone ();
01131 virtual void v_OnUpdateUI ();
01132 virtual void v_SetSelectedItemsEnd ();
01133 #endif
01134 };
01135
01136
01137
01139 class DLG_GETOBJECT_SET : public DLG_GETOBJECT_MULTI {
01140 public:
01141
01143 DLG_GETOBJECT_SET (
01144 const MISTRING& title,
01145 const MISTRING& LabelHeading,
01146 const DLG_GETOBJECT_FILTER& filter,
01147 DLG_GETOBJECT_STYLE dlgstyle,
01148 const RVC::OBJITEMLIST& objitems,
01149 const char *IniGroupDftPath = 0,
01150 const MISTRING *pPromptStr = 0
01151 );
01152
01154 DLG_GETOBJECT_SET (
01155 const MISTRING& title,
01156 const MISTRING& LabelHeading,
01157 const DLG_GETOBJECT_FILTER& filter,
01158 DLG_GETOBJECT_STYLE dlgstyle,
01159 int numitems,
01160 TEXTID LabelPrefix = TEXTID__None,
01161 const char *IniGroupDftPath = 0,
01162 const MISTRING *pPromptStr = 0
01163 );
01164
01166 virtual ~DLG_GETOBJECT_SET ();
01167
01169 void SetLabel (
01170 int itemidx,
01171 const MISTRING& label
01172 );
01173
01174 private:
01175 #ifndef GENERATING_DOXYGEN_OUTPUT
01176 typedef DLG_GETOBJECT_MULTI BASECLASS;
01177 typedef DLG_GETOBJECT_SET THISCLASS;
01178
01179 MISTRING m_LabelHeading;
01180 MISTRING *m_Labels;
01181 BITSET m_UsedSet;
01182 CTRL_GROUPBOX m_GbxUsedList;
01183 FORM_LIST m_FormUsedList;
01184 int m_UsedFieldLabel;
01185 int m_UsedFieldName;
01186 int m_UsedFieldDescription;
01187 int m_UsedFieldLocation;
01188 CTRL_PUSHBUTTON m_BtnAutoName;
01189 RVC::OBJITEM m_PrevObjItem;
01190
01191 ERRVALUE DoCmdAutoNameFiles ();
01192 ERRVALUE DoCmdAutoNameObjects ();
01193 bool OnEditBegin(int itemnum, int fieldnum, MISTRING& string);
01194 bool OnEditCancel(int itemnum, int fieldnum);
01195 bool OnEditEnd(int itemnum, int fieldnum, MISTRING& string);
01196 void OnCmdAutoName ();
01197 void OnUsedListChangeSelection (INT32);
01198 bool OnUsedListPointerButtonUp (int itemnum, int fieldnum, const MGUI::POINT& pt, POINTERBUTTON button, KEYSTATE keystate);
01199 void ResetUsedListItem (int itemnum);
01200 void SkipUsedListItem (int itemnum);
01201 void UpdateUsedListItem (int itemnum);
01202
01203 virtual ERRVALUE v_CreateContent ();
01204 virtual void v_OnClose ();
01205 virtual void v_OnOK ();
01206 virtual int v_AcceptObjItem (const RVC::OBJITEM& objitem, bool isfile);
01207 virtual bool v_CheckEnableOK ();
01208 virtual bool v_GetNewObjItem (RVC::OBJITEM& objitem);
01209 virtual void v_OnDeleteDone ();
01210 virtual ERRVALUE v_SetSelectedItemsBegin (const RVC::OBJITEMLIST& ObjItemList);
01211 virtual void v_SetSelectedItemsEnd ();
01212 #endif
01213 };
01214
01215
01216
01217 }
01218
01219 #endif // INC_MGUI_DLGGETOBJECTDLG_H