VCLCommon.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //---------------------------------------------------------------------------
  2. #ifndef VCLCommonH
  3. #define VCLCommonH
  4. //---------------------------------------------------------------------------
  5. #include <ComCtrls.hpp>
  6. //---------------------------------------------------------------------------
  7. void __fastcall AdjustListColumnsWidth(TListView* ListView, int RowCount = -1,
  8. int RightPad = 0);
  9. void __fastcall EnableControl(TControl* Control, bool Enable);
  10. void __fastcall ReadOnlyControl(TControl * Control, bool ReadOnly = true);
  11. void __fastcall InitSystemSettings(TComponent * Control);
  12. void __fastcall UseSystemSettingsPre(TCustomForm * Control, void ** Settings = NULL);
  13. void __fastcall UseSystemSettingsPost(TCustomForm * Control, void * Settings = NULL);
  14. void __fastcall UseSystemSettings(TCustomForm * Control, void ** Settings = NULL);
  15. void __fastcall ResetSystemSettings(TCustomForm * Control);
  16. void __fastcall RevokeSystemSettings(TCustomForm * Control, void * Settings);
  17. void __fastcall DeleteSystemSettings(TCustomForm * Control, void * Settings);
  18. void __fastcall LinkLabel(TStaticText * StaticText, AnsiString Url = "",
  19. TNotifyEvent OnEnter = NULL);
  20. void __fastcall HintLabel(TStaticText * StaticText, AnsiString Hint = "");
  21. void __fastcall HintLabelRestore(TStaticText * StaticText);
  22. void __fastcall ShowAsModal(TForm * Form, void *& Storage);
  23. void __fastcall HideAsModal(TForm * Form, void *& Storage);
  24. void __fastcall ReleaseAsModal(TForm * Form, void *& Storage);
  25. bool __fastcall SelectDirectory(AnsiString & Path, const AnsiString Prompt,
  26. bool PreserveFileName);
  27. enum TListViewCheckAll { caCheck, caUncheck, caToggle };
  28. bool __fastcall ListViewAnyChecked(TListView * ListView, bool Checked = true);
  29. void __fastcall ListViewCheckAll(TListView * ListView,
  30. TListViewCheckAll CheckAll);
  31. void __fastcall InstallPathWordBreakProc(TWinControl * Control);
  32. void __fastcall RepaintStatusBar(TCustomStatusBar * StatusBar);
  33. void __fastcall SetVerticalControlsOrder(TControl ** ControlsOrder, int Count);
  34. void __fastcall SetHorizontalControlsOrder(TControl ** ControlsOrder, int Count);
  35. TPoint __fastcall GetAveCharSize(TCanvas * Canvas);
  36. void __fastcall MakeNextInTabOrder(TWinControl * Control, TWinControl * After);
  37. void __fastcall CutFormToDesktop(TForm * Form);
  38. void __fastcall UpdateFormPosition(TForm * Form, TPosition Position);
  39. void __fastcall ResizeForm(TForm * Form, int Width, int Height);
  40. void __fastcall SetCorrectFormParent(TForm * Form);
  41. void __fastcall InvokeHelp(TWinControl * Control);
  42. TMonitor * __fastcall FormMonitor(TForm * Form);
  43. int __fastcall GetLastMonitor();
  44. void __fastcall SetLastMonitor(int MonitorNum);
  45. TForm * __fastcall _SafeFormCreate(TMetaClass * FormClass, TComponent * Owner);
  46. template<class FormType>
  47. FormType * __fastcall SafeFormCreate(TComponent * Owner = Application)
  48. {
  49. return dynamic_cast<FormType *>(_SafeFormCreate(__classid(FormType), Owner));
  50. }
  51. //---------------------------------------------------------------------------
  52. #endif // VCLCommonH