Dynamic sizing.

David Sankel <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
Hello Everyone,

  It seems that right now the easiest and best way to
deal with dynamic sizing of widgets is as follows:

-- CGA/CommonAttributes.hs
class HasSize w where
  size :: Attr w SizeType

data SizeType = Fixed (Int,Int) | Standard

  Where fixed is obviously the pixel size and Standard
is some implementation dependant size.  For example, a
button would likely have a fixed height and a length
based on the label size on a macintosh.  What does
everyone thing about this?  It is pretty elegant and
simple this way so it makes me think that more "stuff"
needs to be added.

David J. Sankel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.