mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Merge pull request #1830 from koreader/houqp-master
add documentation for wbuilder
This commit is contained in:
23
doc/Hacking.md
Normal file
23
doc/Hacking.md
Normal file
@@ -0,0 +1,23 @@
|
||||
Hacking
|
||||
=======
|
||||
|
||||
Developing UI Widgets
|
||||
---------------------
|
||||
|
||||
If you need to create new UI widgets, `utils/wbuilder.lua` is your friend. It
|
||||
sets up a minimal environment to bootstrap KOReader's UI framework to avoid
|
||||
starting the whole reader. This gives you quick feedback loop while iterating
|
||||
through your widget changes.
|
||||
|
||||
To get a taste of how it works, try running this command at the root of
|
||||
KOReader's source tree:
|
||||
|
||||
```
|
||||
./kodev wbuilder
|
||||
```
|
||||
|
||||
It will spawn up an emulator window with a grid and simple timer widget for
|
||||
demonstration.
|
||||
|
||||
You can add your own `UIManager:show` show call at the end of
|
||||
`utils/wbuilder.lua` to test your new widget.
|
||||
@@ -5,7 +5,7 @@ title = 'KOReader Documentation'
|
||||
dir = 'html'
|
||||
style = '!fixed'
|
||||
use_markdown_titles = true
|
||||
readme = '../README.md'
|
||||
topics = {'../README.md', './Hacking.md'}
|
||||
package = ''
|
||||
format = 'markdown'
|
||||
sort_modules = true
|
||||
|
||||
@@ -385,7 +385,6 @@ UIManager:show(Clock:new())
|
||||
--UIManager:show(keyboard)
|
||||
--UIManager:show(TestInputText)
|
||||
--TestInputText:onShowKeyboard()
|
||||
|
||||
UIManager:show(kvp)
|
||||
--UIManager:show(kvp)
|
||||
|
||||
UIManager:run()
|
||||
|
||||
Reference in New Issue
Block a user