[haiku-development] Re: AddGlue() as a metaphor behaves opposite what is expected

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 26 Feb 2017 12:35:50 +0100

Am 26/02/2017 um 09:46 schrieb Brian Hill:


On Feb 26, 2017, at 2:31 AM, Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> wrote:

A nice thing about the BLayoutBuilder classes (where this is used) is
that they are template classes and almost completely inlined in the
places where they are used. So, we can change them without breaking the
ABI.
I don’t completely understand that but I’ll trust you do :-)

However, AddGlue has the advantage that it is short and easy to type.
Maybe a simple AddSpace or AddPadding would do?

I think some other UI toolkits call this a "filler", when it consist
mostly of empty space. Go figure :)

OK, so far the candidates are:

AddSpace() -Already downvoted by Stephan
AddPadding()
AddFiller()
AddSpring()
AddSpacer()
AddRubber()
AddElastic()
AddEmptySpace()
AddWhiteSpace()
AddNegativeSpace()

Any other ideas?

Besides keeping AddGlue(), other options could be:
AddFoam()
AddFlex()
AddLooser()

But honestly, if we don't go the metaphor way, I think AddFiller() would be the most appropriate and simplest choice.

Add{Empty|White|Negative|}Space(), AddSpacer(), and AddPadding() are all misleading, too, IMO.

Bye,
   Axel.


Other related posts: