diff options
| author | ruki <[email protected]> | 2017-12-17 14:08:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-12-17 14:08:00 +0800 |
| commit | 43ac21b112f81bbf2414a4295afd68123cccf468 (patch) | |
| tree | a88b2627774c0171cce899735f6b08809950e09a | |
| parent | e5ed897840214b66fd746292fff15c56606d3251 (diff) | |
add io.seek
| -rw-r--r-- | xmake/core/sandbox/modules/io.lua | 1 | ||||
| -rw-r--r-- | xmake/core/ui/group.lua | 21 | ||||
| -rw-r--r-- | xmake/core/ui/view.lua | 2 |
3 files changed, 23 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/io.lua b/xmake/core/sandbox/modules/io.lua index 6b47582c5..ec3c3652b 100644 --- a/xmake/core/sandbox/modules/io.lua +++ b/xmake/core/sandbox/modules/io.lua @@ -34,6 +34,7 @@ local sandbox_io = sandbox_io or {} -- inherit some builtin interfaces sandbox_io.flush = io.flush +sandbox_io.seek = io.seek sandbox_io.read = io.read sandbox_io.write = io.write sandbox_io.stdin = io.stdin diff --git a/xmake/core/ui/group.lua b/xmake/core/ui/group.lua index 45baa8e14..b9846c731 100644 --- a/xmake/core/ui/group.lua +++ b/xmake/core/ui/group.lua @@ -291,6 +291,27 @@ function group:draw() end end +-- redraw group +function group:redraw(on_parent) + + -- lock + self:lock() + + -- redraw all child views + for v in self:views() do + if v:state("visible") then + v:redraw(false) + self:_draw_child(v) + end + end + + -- redraw view + view.redraw(self, on_parent) + + -- unlock + self:unlock() +end + -- refresh group in parent window function group:refresh() self:lock() diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua index 58be1774f..fb64ff406 100644 --- a/xmake/core/ui/view.lua +++ b/xmake/core/ui/view.lua @@ -298,7 +298,7 @@ function view:_update_screen() local app = self:application() assert(app, "cannot get application from view(" .. self:name() .. ")") - -- is visible? + -- is visible? disable to update screen before finishing application initialization if not app:state("visible") then return end |
