VCLCommon.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //---------------------------------------------------------------------------
  2. #ifndef VCLCommonH
  3. #define VCLCommonH
  4. //---------------------------------------------------------------------------
  5. #include "Common.h"
  6. #include "Configuration.h"
  7. #include "Exceptions.h"
  8. #include <ComCtrls.hpp>
  9. //---------------------------------------------------------------------------
  10. const TColor LinkColor = clBlue;
  11. //---------------------------------------------------------------------------
  12. void __fastcall FixListColumnWidth(TListView * TListView, int Index);
  13. void __fastcall AutoSizeListColumnsWidth(TListView * ListView, int ColumnToShrinkIndex = -1);
  14. void __fastcall EnableControl(TControl* Control, bool Enable);
  15. void __fastcall ReadOnlyControl(TControl * Control, bool ReadOnly = true);
  16. void __fastcall InitializeSystemSettings();
  17. void __fastcall FinalizeSystemSettings();
  18. void __fastcall LocalSystemSettings(TCustomForm * Control);
  19. void __fastcall UseSystemSettingsPre(TCustomForm * Control);
  20. void __fastcall UseSystemSettingsPost(TCustomForm * Control);
  21. void __fastcall UseSystemSettings(TCustomForm * Control);
  22. void __fastcall ResetSystemSettings(TCustomForm * Control);
  23. void __fastcall LinkLabel(TStaticText * StaticText, UnicodeString Url = L"",
  24. TNotifyEvent OnEnter = NULL);
  25. void __fastcall LinkAppLabel(TStaticText * StaticText);
  26. void __fastcall HintLabel(TStaticText * StaticText, UnicodeString Hint = L"");
  27. void __fastcall HotTrackLabel(TLabel * Label);
  28. void __fastcall FixComboBoxResizeBug(TCustomComboBox * ComboBox);
  29. void __fastcall ShowAsModal(TForm * Form, void *& Storage);
  30. void __fastcall HideAsModal(TForm * Form, void *& Storage);
  31. void __fastcall ReleaseAsModal(TForm * Form, void *& Storage);
  32. TImageList * __fastcall SharedSystemImageList(bool Large);
  33. bool __fastcall SelectDirectory(UnicodeString & Path, const UnicodeString Prompt,
  34. bool PreserveFileName);
  35. enum TListViewCheckAll { caCheck, caUncheck, caToggle };
  36. bool __fastcall ListViewAnyChecked(TListView * ListView, bool Checked = true);
  37. void __fastcall ListViewCheckAll(TListView * ListView,
  38. TListViewCheckAll CheckAll);
  39. void __fastcall ComboAutoSwitchInitialize(TComboBox * ComboBox);
  40. void __fastcall ComboAutoSwitchLoad(TComboBox * ComboBox, TAutoSwitch Value);
  41. TAutoSwitch __fastcall ComboAutoSwitchSave(TComboBox * ComboBox);
  42. void __fastcall CheckBoxAutoSwitchLoad(TCheckBox * CheckBox, TAutoSwitch Value);
  43. TAutoSwitch __fastcall CheckBoxAutoSwitchSave(TCheckBox * CheckBox);
  44. void __fastcall InstallPathWordBreakProc(TWinControl * Control);
  45. void __fastcall SetVerticalControlsOrder(TControl ** ControlsOrder, int Count);
  46. void __fastcall SetHorizontalControlsOrder(TControl ** ControlsOrder, int Count);
  47. void __fastcall MakeNextInTabOrder(TWinControl * Control, TWinControl * After);
  48. void __fastcall CutFormToDesktop(TForm * Form);
  49. void __fastcall UpdateFormPosition(TCustomForm * Form, TPosition Position);
  50. void __fastcall ResizeForm(TCustomForm * Form, int Width, int Height);
  51. TComponent * __fastcall GetFormOwner();
  52. TForm * __fastcall GetMainForm();
  53. void __fastcall SetCorrectFormParent(TForm * Form);
  54. void __fastcall InvokeHelp(TWinControl * Control);
  55. void __fastcall FixFormIcons(TForm * Form);
  56. Forms::TMonitor * __fastcall FormMonitor(TCustomForm * Form);
  57. int __fastcall GetLastMonitor();
  58. void __fastcall SetLastMonitor(int MonitorNum);
  59. TForm * __fastcall _SafeFormCreate(TMetaClass * FormClass, TComponent * Owner);
  60. template<class FormType>
  61. FormType * __fastcall SafeFormCreate(TComponent * Owner = NULL)
  62. {
  63. return dynamic_cast<FormType *>(_SafeFormCreate(__classid(FormType), Owner));
  64. }
  65. bool __fastcall SupportsSplitButton();
  66. TModalResult __fastcall DefaultResult(TCustomForm * Form, TButton * DefaultButton = NULL);
  67. void __fastcall DefaultButton(TButton * Button, bool Default);
  68. void __fastcall MemoKeyDown(TObject * Sender, WORD & Key, TShiftState Shift);
  69. void __fastcall UseDesktopFont(TControl * Control);
  70. UnicodeString __fastcall FormatFormCaption(TCustomForm * Form, const UnicodeString & Caption);
  71. UnicodeString __fastcall FormatMainFormCaption(const UnicodeString & Caption);
  72. TShiftState __fastcall AllKeyShiftStates();
  73. void __fastcall RealignControl(TControl * Control);
  74. void __fastcall HookFormActivation(TCustomForm * Form);
  75. void __fastcall UnhookFormActivation(TCustomForm * Form);
  76. TPanel * __fastcall CreateBlankPanel(TComponent * Owner);
  77. //---------------------------------------------------------------------------
  78. #endif // VCLCommonH