adui.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. #ifndef _adui_h
  11. #define _adui_h
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. #include "adui_port.h"
  16. class ADUI_PORT CAdUiThemeManager; // INTERNAL USE ONLY
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Initialize the extension DLL, register the classes, etc
  19. // Call this exported function from your Dll or Executable once
  20. // - an ideal location is the InitInstance() member function
  21. void ADUI_PORT InitAdUiDLL();
  22. // This function shows an alert type dialog with three buttons. Caption
  23. // string and text for each button are arguments along with a default button
  24. // 0 based index. Returns 0 based button index or -1 on CANCEL. Button 2
  25. // is always the CANCEL button.
  26. int ADUI_PORT AdUiAlertDialog (
  27. LPCTSTR captionText,
  28. LPCTSTR msg0Text,
  29. LPCTSTR button0Text,
  30. LPCTSTR button1Text,
  31. UINT defButton = 0 // Means first button is default.
  32. );
  33. int ADUI_PORT AdUiDataValidationLevel (); // INTERNAL USE ONLY
  34. // Helper function to expand a help file name into a fully-qualified pathname.
  35. BOOL ADUI_PORT AdUiFindContextHelpFullPath (
  36. LPCTSTR fileName, CString& fullPath
  37. );
  38. void ADUI_PORT AdUiSubstituteShellFont (CWnd& dlg, CFont& font);
  39. CAdUiThemeManager ADUI_PORT * AdUiGetThemeManager(); // INTERNAL USE ONLY
  40. // This function finds a suitable parent window for a dialog when none is
  41. // explicitly supplied. The algorithm obtains the active window
  42. // (using GetActiveWindow) and the walks the parent hierarchy (using GetParent)
  43. // A disabled window or the main window terminates the walk.
  44. HWND ADUI_PORT AdUiGetSafeParentHwnd();
  45. ADUI_PORT CWnd* AdUiGetSafeParentWnd();
  46. // This function allows the client override the AutoCAD's default setting of
  47. // dock bar's min width. It is related to the DID#1017779. In Spago, the default
  48. // value is 40px and we change to 150px in Raptor which caused issues to the third
  49. // party developer. The following API is for them to override AutoCAD default settings.
  50. bool ADUI_PORT AdUiSetDockBarMinWidth(int width);
  51. /////////////////////////////////////////////////////////////////////////////
  52. // Class prototypes
  53. class ADUI_PORT CAdUiBaseDialog;
  54. class ADUI_PORT CAdUiComboBox;
  55. class ADUI_PORT CAdUiDialog;
  56. class ADUI_PORT CAdUiDialogBar;
  57. class ADUI_PORT CAdUiFileDialog;
  58. class ADUI_PORT CAdUiTab;
  59. class ADUI_PORT CAdUiTabChildDialog;
  60. class ADUI_PORT CAdUiTabExtensionManager;
  61. class ADUI_PORT CAdUiTabMainDialog;
  62. class ADUI_PORT CAdUiDialogWorksheet; // INTERNAL USE ONLY
  63. class ADUI_PORT CAdUiDropTarget;
  64. class ADUI_PORT CAdUiTheme; // INTERNAL USE ONLY
  65. class ADUI_PORT CAdUiPalette;
  66. class ADUI_PORT CAdUiPaletteSet;
  67. class ADUI_PORT CAdUiThemeMgrReactor; // INTERNAL USE ONLY
  68. class ADUI_PORT CAduiLabelEdit; // INTERNAL USE ONLY
  69. /////////////////////////////////////////////////////////////////////////////
  70. #define MOVEX 0x00001
  71. #define MOVEY 0x00002
  72. #define MOVEXY 0x00003
  73. #define ELASTICX 0x00010
  74. #define ELASTICY 0x00020
  75. #define ELASTICXY 0x00030
  76. #pragma pack (push, 8)
  77. typedef struct _dlgControlTag {
  78. DWORD id;
  79. DWORD flags;
  80. DWORD pct;
  81. } DLGCTLINFO, *PDLGCTLINFO;
  82. #pragma pack (pop)
  83. // For Internal use
  84. //
  85. namespace AdUi
  86. {
  87. enum AdUiIconMode{
  88. kSmall = 0,
  89. kLarge
  90. };
  91. enum AdUiImage
  92. {
  93. kImageSmall = 1,
  94. kImageLarge = 2,
  95. kImageEnable = 4,
  96. kImageDisable = 8,
  97. };
  98. };
  99. /////////////////////////////////////////////////////////////////////////////
  100. // WINREG.H declares HKEY, needed by aduiRegistryAccess.h
  101. #include <winreg.h>
  102. //// AFXOLE.H declares COleDropTarget needed by aduiDropTarget.h
  103. #include <afxole.h>
  104. #include "aduiRegistryAccess.h"
  105. #include "aduiMessage.h"
  106. #include "aduiDropTarget.h"
  107. #include "aduiTabExtension.h"
  108. #include "aduiTextTip.h"
  109. #include "aduiButton.h"
  110. #include "aduiTabCtrl.h"
  111. #include "aduiRichEditCtrl.h"
  112. #include "aduiBaseDialog.h"
  113. #include "aduiDialog.h"
  114. #include "aduiDialogBar.h"
  115. #include "aduiFileDialog.h"
  116. #include "aduiTabChildDialog.h"
  117. #include "aduiTabMainDialog.h"
  118. #include "aduiEdit.h"
  119. #include "aduiHeaderCtrl.h"
  120. #include "aduiListBox.h"
  121. #include "aduiListCtrl.h"
  122. #include "aduiComboBox.h"
  123. #include "aduiDock.h"
  124. #include "aduiVolumeDescriptor.h"
  125. #include "aduiPathname.h"
  126. #include "aduiPalette.h"
  127. #include "aduiPaletteSet.h"
  128. /////////////////////////////////////////////////////////////////////////////
  129. //{{AFX_INSERT_LOCATION}}
  130. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  131. #endif
  132. //////////////////////////////////////////////////////////////////////////////