VCLCommon.h 4.6 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, void ** Settings = NULL);
  20. void __fastcall UseSystemSettingsPost(TCustomForm * Control, void * Settings = NULL);
  21. void __fastcall UseSystemSettings(TCustomForm * Control, void ** Settings = NULL);
  22. void __fastcall ResetSystemSettings(TCustomForm * Control);
  23. void __fastcall RevokeSystemSettings(TCustomForm * Control, void * Settings);
  24. void __fastcall DeleteSystemSettings(TCustomForm * Control, void * Settings);
  25. void __fastcall LinkLabel(TStaticText * StaticText, UnicodeString Url = L"",
  26. TNotifyEvent OnEnter = NULL);
  27. void __fastcall HintLabel(TStaticText * StaticText, UnicodeString Hint = L"");
  28. void __fastcall HintLabelRestore(TStaticText * StaticText);
  29. void __fastcall HotTrackLabel(TLabel * Label);
  30. void __fastcall FixComboBoxResizeBug(TCustomComboBox * ComboBox);
  31. void __fastcall ShowAsModal(TForm * Form, void *& Storage);
  32. void __fastcall HideAsModal(TForm * Form, void *& Storage);
  33. void __fastcall ReleaseAsModal(TForm * Form, void *& Storage);
  34. TImageList * __fastcall SharedSystemImageList(bool Large);
  35. bool __fastcall SelectDirectory(UnicodeString & Path, const UnicodeString Prompt,
  36. bool PreserveFileName);
  37. enum TListViewCheckAll { caCheck, caUncheck, caToggle };
  38. bool __fastcall ListViewAnyChecked(TListView * ListView, bool Checked = true);
  39. void __fastcall ListViewCheckAll(TListView * ListView,
  40. TListViewCheckAll CheckAll);
  41. void __fastcall ComboAutoSwitchInitialize(TComboBox * ComboBox);
  42. void __fastcall ComboAutoSwitchLoad(TComboBox * ComboBox, TAutoSwitch Value);
  43. TAutoSwitch __fastcall ComboAutoSwitchSave(TComboBox * ComboBox);
  44. void __fastcall CheckBoxAutoSwitchLoad(TCheckBox * CheckBox, TAutoSwitch Value);
  45. TAutoSwitch __fastcall CheckBoxAutoSwitchSave(TCheckBox * CheckBox);
  46. void __fastcall InstallPathWordBreakProc(TWinControl * Control);
  47. void __fastcall SetVerticalControlsOrder(TControl ** ControlsOrder, int Count);
  48. void __fastcall SetHorizontalControlsOrder(TControl ** ControlsOrder, int Count);
  49. void __fastcall MakeNextInTabOrder(TWinControl * Control, TWinControl * After);
  50. void __fastcall CutFormToDesktop(TForm * Form);
  51. void __fastcall UpdateFormPosition(TCustomForm * Form, TPosition Position);
  52. void __fastcall ResizeForm(TCustomForm * Form, int Width, int Height);
  53. TComponent * __fastcall GetFormOwner();
  54. TForm * __fastcall GetMainForm();
  55. void __fastcall SetCorrectFormParent(TForm * Form);
  56. void __fastcall InvokeHelp(TWinControl * Control);
  57. void __fastcall SetFormIcons(TForm * Form, const UnicodeString & BigIconName,
  58. const UnicodeString & SmallIconName);
  59. Forms::TMonitor * __fastcall FormMonitor(TCustomForm * Form);
  60. int __fastcall GetLastMonitor();
  61. void __fastcall SetLastMonitor(int MonitorNum);
  62. TForm * __fastcall _SafeFormCreate(TMetaClass * FormClass, TComponent * Owner);
  63. template<class FormType>
  64. FormType * __fastcall SafeFormCreate(TComponent * Owner = NULL)
  65. {
  66. return dynamic_cast<FormType *>(_SafeFormCreate(__classid(FormType), Owner));
  67. }
  68. bool __fastcall SupportsSplitButton();
  69. TModalResult __fastcall DefaultResult(TCustomForm * Form, TButton * DefaultButton = NULL);
  70. void __fastcall DefaultButton(TButton * Button, bool Default);
  71. void __fastcall MemoKeyDown(TObject * Sender, WORD & Key, TShiftState Shift);
  72. void __fastcall UseDesktopFont(TControl * Control);
  73. void __fastcall LoadResourceImage(TImage * Image, const UnicodeString & ImageName);
  74. UnicodeString __fastcall FormatFormCaption(TCustomForm * Form, const UnicodeString & Caption);
  75. UnicodeString __fastcall FormatMainFormCaption(const UnicodeString & Caption);
  76. void __fastcall RealignControl(TControl * Control);
  77. //---------------------------------------------------------------------------
  78. #endif // VCLCommonH