VCLCommon.h 3.5 KB

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