AcFdUiFieldDialog.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: AcFdUiFieldDialog.h
  12. //
  13. // Description:
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #include "adui.h"
  18. #include "AcFdUi.h"
  19. #include "acui.h"
  20. class AcFdUiSystemInternals;
  21. class CAcFdUiFieldOptionDialog;
  22. class CAcFdUiImpFieldDialog;
  23. // Field dialog context flags
  24. #define ACFDUI_FD_CREATE_FIELD 1
  25. #define ACFDUI_FD_EDIT_FIELD 2
  26. class ACFDUI_PORT CAcFdUiFieldDialog : public CAcUiDialog
  27. {
  28. friend CAcFdUiImpFieldDialog;
  29. DECLARE_DYNAMIC(CAcFdUiFieldDialog)
  30. public:
  31. CAcFdUiFieldDialog(CWnd* pParent = NULL);
  32. virtual ~CAcFdUiFieldDialog();
  33. INT_PTR DoModal (AcDbField*& pField,
  34. BOOL bEdit,
  35. AcDbDatabase* pDb);
  36. AcDbField * GetFieldToEdit (void) const;
  37. BOOL SetFieldCodeReadOnly (BOOL bReadOnly = TRUE);
  38. CString GetFieldCode (void) const;
  39. BOOL SetFieldCode (LPCTSTR pszExpr);
  40. BOOL IsFieldCodeDirty (void);
  41. CEdit * GetFieldCodeEditCtrl (void);
  42. BOOL GetCurrentField (UINT* pFieldId,
  43. UINT* pCatId) const;
  44. BOOL SelectField (UINT uFieldId,
  45. UINT uCatId);
  46. CAcFdUiFieldOptionDialog* GetOptionDialog(void) const;
  47. public:
  48. // Base class overrides
  49. void BeginEditorCommand (void);
  50. void CompleteEditorCommand (BOOL restoreDialogs = TRUE);
  51. void CancelEditorCommand (void);
  52. protected:
  53. virtual void DoDataExchange(CDataExchange* pDX);
  54. DECLARE_MESSAGE_MAP()
  55. protected:
  56. virtual BOOL OnInitDialog (void);
  57. virtual void OnOK (void);
  58. virtual void OnCancel (void);
  59. afx_msg void OnCbnSelChangeCategoryList(void);
  60. afx_msg void OnLbnSelChangeFieldNameList(void);
  61. afx_msg void OnEnChangeFieldCode (void);
  62. afx_msg void OnDialogHelp (void);
  63. afx_msg LRESULT OnFormatChanged (WPARAM wParam,
  64. LPARAM lParam);
  65. afx_msg LRESULT OnBeginFormatExDialog (WPARAM wParam,
  66. LPARAM lParam);
  67. afx_msg LRESULT OnEndFormatExDialog (WPARAM wParam,
  68. LPARAM lParam);
  69. protected:
  70. void * mpImpObj;
  71. private:
  72. friend class AcFdUiSystemInternals;
  73. };