[dev] horde blocks

Mike Cochrane mike at graftonhall.co.nz
Sat May 3 14:15:53 PDT 2003


> ----- Message from marko at oblo.com ---------
>
> since portal and giapeto share a lot of the horde_block functionality i was
> thinking how to standardise a bit.
Make's sense :-)

> some of the block code from portal i'd like to put into a separate
> Horde_Blocks
> class to deal with blocks as a collection, and then Horde_Block (or maybe
> Horde_BlockObject?) to deal with individual blocks? so both portal and
> giapeto
> could access the same code?

A Horde_BlockLayout class would make sense to me, having funtions to:
render() the blocks to screen in normal and edit modes
serialize() and unserialize() to give a storable form of the block layout for
loading and saving in prefs or what ever.
addAt(block, x, y), removeAt(x, y) to add & remove blocks
moveLeft(x, y), right, up, down to move blocks around
expandLeft(x, y), right, up, down to resize blocks

Well that was my long term plan but i haven't had time to code any of it.

- Mike :-)



More information about the dev mailing list