mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
added example usage for reader widget
This commit is contained in:
17
wtest.lua
17
wtest.lua
@@ -1,4 +1,6 @@
|
||||
require "ui"
|
||||
require "readerui"
|
||||
require "document"
|
||||
|
||||
TestGrid = Widget:new{}
|
||||
|
||||
@@ -127,11 +129,26 @@ M = Menu:new{
|
||||
height = 600,
|
||||
}
|
||||
|
||||
|
||||
readerwindow = CenterContainer:new{
|
||||
dimen = Geom:new{ w = G_width, h = G_height },
|
||||
FrameContainer:new{
|
||||
background = 0
|
||||
}
|
||||
}
|
||||
reader = ReaderUI:new{
|
||||
dialog = readerwindow,
|
||||
dimen = Geom:new{ w = G_width - 100, h = G_height - 100 },
|
||||
document = DocumentRegistry:getProvider("test/2col.pdf")
|
||||
}
|
||||
readerwindow[1][1] = reader
|
||||
|
||||
UIManager:show(Background:new())
|
||||
UIManager:show(TestGrid)
|
||||
UIManager:show(Clock:new())
|
||||
UIManager:show(M)
|
||||
UIManager:show(Quiz)
|
||||
UIManager:show(readerwindow)
|
||||
UIManager:run()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user