Commit Graph

8 Commits (00fb7773c7af447ce1d7b2f13d99abd0dff5d6b0)

Author SHA1 Message Date
Qingping Hou 3306346dba use debug to print debug info 13 years ago
traycold 6031d2066b some fixes about coding style (#62) and removed debug code 13 years ago
traycold 429f572827 modification to take into account new version of mupdf 13 years ago
HW 4714057f5b added infomessage dialog implementation 13 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
13 years ago
HW ec2eda0c05 switched font handling to only work with external fonts
now you can use a environment variable, FONTDIR, to point
to a font dir. Otherwise, "./fonts" is used by default.
Subdirectories are indexed.
13 years ago
traycold bfcad367bb using font module for getting fonts (commit f95231d789)
renamed function names using camelCase (issue #62)
13 years ago
Qingping Hou f95231d789 add: status bar in reading menu & font.lua
* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
13 years ago