diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui_basegrid.pas | 2 | ||||
-rw-r--r-- | src/gui/gui_button.pas | 18 | ||||
-rw-r--r-- | src/gui/gui_listview.pas | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/src/gui/gui_basegrid.pas b/src/gui/gui_basegrid.pas index b375fd74..19d0a032 100644 --- a/src/gui/gui_basegrid.pas +++ b/src/gui/gui_basegrid.pas @@ -22,7 +22,7 @@ unit gui_basegrid; { TODO: * Selecting the last fully visible row, scrolls the grid. Selection - is corruct, but because of the scroll it is confusing. + is correct, but because of the scroll it is confusing. } {.$Define DEBUG} diff --git a/src/gui/gui_button.pas b/src/gui/gui_button.pas index 52f608ed..ee7e835d 100644 --- a/src/gui/gui_button.pas +++ b/src/gui/gui_button.pas @@ -26,12 +26,14 @@ uses SysUtils, gfxbase, fpgfx, - gfx_widget; + gfx_widget, + gfx_command_intf; type - TfpgButton = class(TfpgWidget) + TfpgButton = class(TfpgWidget, ICommandHolder) private + FCommand: ICommand; FImageName: string; FClicked: Boolean; FShowImage: Boolean; @@ -75,6 +77,8 @@ type procedure DoPush; procedure DoRelease; procedure Click; + function GetCommand: ICommand; // ICommandHolder interface + procedure SetCommand(ACommand: ICommand); // ICommandHolder interface property Down: Boolean read FDown write SetDown; property Font: TfpgFont read FFont; property AllowDown: Boolean read GetAllowDown write SetAllowDown; @@ -441,6 +445,16 @@ begin OnClick(self); end; +function TfpgButton.GetCommand: ICommand; +begin + Result := FCommand; +end; + +procedure TfpgButton.SetCommand(ACommand: ICommand); +begin + FCommand := ACommand; +end; + procedure TfpgButton.SetImageMargin(const Value: integer); begin FImageMargin := Value; diff --git a/src/gui/gui_listview.pas b/src/gui/gui_listview.pas index 183ac8bf..a3eaba43 100644 --- a/src/gui/gui_listview.pas +++ b/src/gui/gui_listview.pas @@ -183,7 +183,7 @@ type FSelected: TList; FOldSelected: TList; FUpdateCount: Integer; - FVScrollBar, + FVScrollBar: TfpgScrollBar; FHScrollBar: TfpgScrollBar; FColumns: TfpgLVColumns; FItems: TfpgLVItems; @@ -1199,7 +1199,7 @@ begin UpdateScrollBarPositions; - fpgStyle.DrawControlFrame(Canvas, 0,0,Width,Height); + fpgStyle.DrawControlFrame(Canvas, 0, 0, Width, Height); ClipRect.Top := 2; ClipRect.Left := 2; |