VCLCommon.h 4.4 KB

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