Skip to content

Provide wrapped functions with all the options exposed #61

Open
@dpwiz

Description

@dpwiz

A follow-up to #52, but can be done concurrently.

The current functions can remain intact and a new set of functions can be added as a cheap wrapper for raw procedures.

-- current
withWindowOpen :: MonadUnliftIO m => String -> m () -> m ()

-- proposed
withWindowOpen' :: (MonadUnliftIO m, StateVar Bool isOpen) => ImGuiWindowFlags -> isOpen -> String -> m () -> m ()

Fancy wrappers (labels, lenses, etc.) can be provided as alternatives in their own packages.

Cons: this will double the amount of functions published. The previous implementation, however, can be rebased upon those new expanded.

Alternative 1: Add all the arguments to existing functions. A breaking change, a bit noisier to write but lighter on maintenance.

Alternative 2: Rename current shortcuts to underscored, add expanded versions like in A1. Also a breaking change and may require breakage again when "expandable defaults" are to be implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededinternalsImplementation details

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions