Commit Graph

10 Commits (33538c4f66d74d5482f267a553afbc372637106b)

Author SHA1 Message Date
Qingping Hou c9114dabcc revert getSize() method of FrameContainer
my previous modification is wrong.
12 years ago
Qingping Hou 525c2f17c0 use rendertext in TextWidget for text background support 12 years ago
Qingping Hou c70146bf7e use paintRoundedRect in FrameContainer 12 years ago
Qingping Hou b47d5b76eb add demo menu widget in new ui framework 12 years ago
Qingping Hou 3ef820681b add radius property to FrameContainer 12 years ago
Qingping Hou 81d733d269 fix bug in TextBoxWidget
shrink box width if text is shorter than one line.
12 years ago
Qingping Hou 1036db89b6 add TextBoxWidget that handles line wrapping 12 years ago
Qingping Hou 198a3fc4de add dummy span widgets & make clock count on seconds 12 years ago
HW 08278d6beb new UI code 12 years ago
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
12 years ago