Skip to content

View cleanups part 2

Guido Günther requested to merge guidog/phoc:view-private2 into main

With !425 (merged) I've split out the view related bits of !427 (merged) (hence not undrafting that one yet) to ease review. This is orthogonal to !432 (merged). This one focuses on removing boilerplate in favor of using virtual functions making the implementations more obvious. With this !427 (merged) becomes more to the point.

  • view: Fix typo

  • view: Reindent resize

  • view: Remove unused variable

  • view: Resize is not optional

  • view: Use self in view_resize ()

  • view: Make view_resize static and prefix

    It's only used in PhocView

  • view: Move resize is not optional so no need to have fallback code

  • view: Reindent view_resize

  • view: Prefix view_resize

  • view: Document optional virtual methods

    Mark those as optional that have a fallback and where at least one of the derived classes doesn't provide an implementation.

  • view: Remove checks for set_maximized

    It's implementation is mandatory

  • view: Add default implementation for for_each_surface

    Instead of checking if there is an implementation and falling back provide a default implementation.

  • view: Add default implementation for get_geometry

    Instead of checking if there is an implementation and falling back provide a default implementation.

  • view: Make tile direction private

    Just a matter of using the already present getter

Merge request reports