Skip to content

Commit

Permalink
[docs] document conditional context panes (#1035)
Browse files Browse the repository at this point in the history
Since #866 it's possible to hide custom context panes using a callback
function. I only found out about this useful feature by reading the
code. This PR documents it.
  • Loading branch information
Ordoviz committed Dec 30, 2023
1 parent 951872b commit 5cc4ef2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/api.md
Expand Up @@ -101,11 +101,12 @@ near the bottom of the context. The order can be modified in the `GEF` context c
### Context Pane API

The API demonstrated above requires very specific argument types:
`register_external_context_pane(pane_name, display_pane_function, pane_title_function)`
`register_external_context_pane(pane_name, display_pane_function, pane_title_function, condition=None)`

* `pane_name`: a string that will be used as the panes setting name
* `display_pane_function`: a function that uses `gef_print()` to print content in the pane
* `pane_title_function`: a function that returns the title string or None to hide the title
* `condition` (optional): a function that returns whether this context pane should be shown

## API

Expand Down

0 comments on commit 5cc4ef2

Please sign in to comment.