egui_node_graph/egui_node_graph_example
Kamil Koczurek 006a5f3608 node finder: support node categories
* Add CategoryTrait that gives a name to a category of nodes. Provide
  implementations for String, &str and ().
* Add NodeTemplateTrait::node_finder_categories to list categories to
  which the template belongs, defaults to an empty vector.
* Node finder now displays at the top a collapsible header for each
  category and corresponding nodes inside of them. Nodes without a
  category are displayed below, so the behavior of programs that don't
  adapt to use categories remains the same. The collapsible headers
  behave as follows:
    - For empty query, all categories are collapsed
    - Otherwise:
      1. Categories that contain no matching nodes are ommited.
      2. Matching categories are now opened by default -- it's assumed
	 that filtered results are more manageable and can now be
         unwrapped.
      3. The user can normally un/collapse each category, but if the
	 query is changed, the default is applied.
* Update the example to use this feature.

This change will break all existing programs and the simplest fix to
that is adding `type CategoryType = ();` in the implementation of
`NodeTemplateTrait`. Default associated types are not supported, so
this can't be avoided with this design.
2023-05-10 12:34:19 +02:00
..
2023-05-10 12:34:19 +02:00
2023-04-22 16:40:17 +03:00