Commit Graph

9 Commits

Author SHA1 Message Date
Qingping Hou
525c2f17c0 use rendertext in TextWidget for text background support 2012-05-01 17:35:33 +08:00
Qingping Hou
c70146bf7e use paintRoundedRect in FrameContainer 2012-04-30 15:40:43 +08:00
Qingping Hou
b47d5b76eb add demo menu widget in new ui framework 2012-04-29 23:53:48 +08:00
Qingping Hou
3ef820681b add radius property to FrameContainer 2012-04-28 14:41:05 +08:00
Qingping Hou
81d733d269 fix bug in TextBoxWidget
shrink box width if text is shorter than one line.
2012-04-28 11:49:38 +08:00
Qingping Hou
1036db89b6 add TextBoxWidget that handles line wrapping 2012-04-25 12:39:02 +08:00
Qingping Hou
198a3fc4de add dummy span widgets & make clock count on seconds 2012-04-24 23:41:37 +08:00
HW
08278d6beb new UI code 2012-04-22 21:29:48 +02:00
HW
b6d75b84ec Added widget abstraction framework
An example for using it:

--snip
require "widget"
require "font"

fb = einkfb.open("/dev/fb0")
G_width, G_height = fb:getSize()

dialog = CenterContainer:new({
        dimen = { w = G_width, h = G_height },
        VerticalGroup:new({
                align = "center",
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 400, h = 200 },
                                TextWidget:new({
                                        text = "Hi there! jgVJV",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                }),
                ImageWidget:new({
                        file = "test.png"
                }),
                FrameContainer:new({
                        CenterContainer:new({
                                dimen = { w = 300, h = 200 },
                                TextWidget:new({
                                        text = "another box",
                                        face = Font:getFace("cfont", 30)
                                })
                        })
                })
        })
})

dialog:paintTo(fb.bb, 0, 0)

fb:refresh(0)

input.waitForEvent()
--snip
2012-04-15 01:59:49 +02:00