HaikuArchives / Paladin

Paladin is an open source integrated development environment (IDE) for Haiku OS
MIT License
64 stars 20 forks source link

Window Layout library and support #91

Open adamfowleruk opened 5 years ago

adamfowleruk commented 5 years ago

E.g. click Windows -> Layout -> Adam's favourite layout

Perhaps with the option of saving custom layouts and naming them.

Like Perspectives in Eclipse, but better.

adamfowleruk commented 5 years ago

Consider a Window Layout library. Pass it a set of Windows and a layout descriptor, and it will layout the windows. Also allow capturing of current layouts, and specification of layouts in a preferences file. Include UI elements.

Have the concept of a Layout Context that can point to the App's layout management handler. E.g. in Paladin a ProjectWindow would manage a Layout, whereas in other apps it could be an entire app, whereas in Haiku OS it could be across multiple apps. This context can have a method to give the list of windows to be laid out to the calling Layout Manager, which will then lay them out.

Build it as a separate library, but ensure it works well for Paladin. May choose to have this as a separate liblayout.so library so other apps can make use of it with minimum coding. E.g. a gimp-like drawing app could find it useful.

Use the lowest possible class in the hierarchy. E.g. definitely supports Windows and Dialogs. Also define standard BMessage types for relaying out windows for new and running app instances.

adamfowleruk commented 5 years ago

Support positioning of windows, stacking, tiling.