diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-03-27 18:37:30 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-03-29 10:55:33 +0100 |
commit | 6396d1ce0358dc583d7844797f07431ab5452447 (patch) | |
tree | b98b3fc08b7b8f73151a199c96f9c50ae5e1205f /pkg/gui/types | |
parent | c59e6b6451da5eaa9ce4c7e4d581fb44d17ca53a (diff) |
Extract a function HandleGenericClick
Diffstat (limited to 'pkg/gui/types')
-rw-r--r-- | pkg/gui/types/common.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index e53260b34..694cdcc56 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -35,6 +35,10 @@ type IGuiCommon interface { // case would be overkill, although refresh will internally call 'PostRefreshUpdate' PostRefreshUpdate(Context) error + // a generic click handler that can be used for any view; it handles opening + // URLs in the browser when the user clicks on one + HandleGenericClick(view *gocui.View) error + // renders string to a view without resetting its origin SetViewContent(view *gocui.View, content string) // resets cursor and origin of view. Often used before calling SetViewContent |