diff --git a/lcl/forms.pp b/lcl/forms.pp index 55939f4a5a..a389a9819f 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -1582,6 +1582,8 @@ function ShiftStateToKeys(ShiftState: TShiftState): PtrUInt; function WindowStateToStr(const State: TWindowState): string; function StrToWindowState(const Name: string): TWindowState; +function dbgs(const State: TWindowState): string; overload; +function dbgs(const Action: TCloseAction): string; overload; type TFocusState = Pointer; @@ -1754,6 +1756,16 @@ begin ord(wsNormal))); end; +function dbgs(const State: TWindowState): string; overload; +begin + Result:=GetEnumName(TypeInfo(TWindowState),ord(State)); +end; + +function dbgs(const Action: TCloseAction): string; overload; +begin + Result:=GetEnumName(TypeInfo(TCloseAction),ord(Action)); +end; + //------------------------------------------------------------------------------ function GetParentForm(Control: TControl): TCustomForm; begin