mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Move components to extended. Make stubs for ready to make it requirable
This commit is contained in:
parent
04c39f1ce2
commit
23e2846a60
@ -188,4 +188,13 @@ function M.get_border(node)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Show message to require extended component
|
||||||
|
function M.extended_component(component_name)
|
||||||
|
print(string.format("[Druid]: The component %s is extended component. You have to register it via druid.register to use it", component_name))
|
||||||
|
print("[Druid]: Use next code:")
|
||||||
|
print(string.format('local %s = require("druid.extended.%s")', component_name, component_name))
|
||||||
|
print(string.format('druid.register("%s", %s)', component_name, component_name))
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -19,28 +19,29 @@
|
|||||||
-- @see druid.drag
|
-- @see druid.drag
|
||||||
|
|
||||||
local const = require("druid.const")
|
local const = require("druid.const")
|
||||||
|
local helper = require("druid.helper")
|
||||||
local druid_input = require("druid.helper.druid_input")
|
local druid_input = require("druid.helper.druid_input")
|
||||||
local settings = require("druid.system.settings")
|
local settings = require("druid.system.settings")
|
||||||
local class = require("druid.system.middleclass")
|
local class = require("druid.system.middleclass")
|
||||||
|
|
||||||
local button = require("druid.base.button")
|
|
||||||
local blocker = require("druid.base.blocker")
|
|
||||||
local back_handler = require("druid.base.back_handler")
|
local back_handler = require("druid.base.back_handler")
|
||||||
local hover = require("druid.base.hover")
|
local blocker = require("druid.base.blocker")
|
||||||
local text = require("druid.base.text")
|
local button = require("druid.base.button")
|
||||||
local lang_text = require("druid.base.lang_text")
|
|
||||||
local timer = require("druid.base.timer")
|
|
||||||
local progress = require("druid.base.progress")
|
|
||||||
local grid = require("druid.base.grid")
|
|
||||||
local scroll = require("druid.base.scroll")
|
|
||||||
local slider = require("druid.base.slider")
|
|
||||||
local checkbox = require("druid.base.checkbox")
|
|
||||||
local checkbox_group = require("druid.base.checkbox_group")
|
|
||||||
local radio_group = require("druid.base.radio_group")
|
|
||||||
local input = require("druid.base.input")
|
|
||||||
local swipe = require("druid.base.swipe")
|
|
||||||
local drag = require("druid.base.drag")
|
local drag = require("druid.base.drag")
|
||||||
-- local infinity_scroll = require("druid.base.infinity_scroll")
|
local grid = require("druid.base.grid")
|
||||||
|
local hover = require("druid.base.hover")
|
||||||
|
local lang_text = require("druid.base.lang_text")
|
||||||
|
local scroll = require("druid.base.scroll")
|
||||||
|
local swipe = require("druid.base.swipe")
|
||||||
|
local text = require("druid.base.text")
|
||||||
|
|
||||||
|
local checkbox = require("druid.extended.checkbox")
|
||||||
|
local checkbox_group = require("druid.extended.checkbox_group")
|
||||||
|
local input = require("druid.extended.input")
|
||||||
|
local progress = require("druid.extended.progress")
|
||||||
|
local radio_group = require("druid.extended.radio_group")
|
||||||
|
local slider = require("druid.extended.slider")
|
||||||
|
local timer = require("druid.extended.timer")
|
||||||
|
|
||||||
-- @classmod Druid
|
-- @classmod Druid
|
||||||
local Druid = class("druid.druid_instance")
|
local Druid = class("druid.druid_instance")
|
||||||
@ -384,24 +385,6 @@ function Druid.new_lang_text(self, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create timer basic component
|
|
||||||
-- @function druid:new_timer
|
|
||||||
-- @tparam args ... timer init args
|
|
||||||
-- @treturn Component timer component
|
|
||||||
function Druid.new_timer(self, ...)
|
|
||||||
return Druid.create(self, timer, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create progress basic component
|
|
||||||
-- @function druid:new_progress
|
|
||||||
-- @tparam args ... progress init args
|
|
||||||
-- @treturn Component progress component
|
|
||||||
function Druid.new_progress(self, ...)
|
|
||||||
return Druid.create(self, progress, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create grid basic component
|
--- Create grid basic component
|
||||||
-- @function druid:new_grid
|
-- @function druid:new_grid
|
||||||
-- @tparam args ... grid init args
|
-- @tparam args ... grid init args
|
||||||
@ -420,51 +403,6 @@ function Druid.new_scroll(self, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Create slider basic component
|
|
||||||
-- @function druid:new_slider
|
|
||||||
-- @tparam args ... slider init args
|
|
||||||
-- @treturn Component slider component
|
|
||||||
function Druid.new_slider(self, ...)
|
|
||||||
return Druid.create(self, slider, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create checkbox basic component
|
|
||||||
-- @function druid:new_checkbox
|
|
||||||
-- @tparam args ... checkbox init args
|
|
||||||
-- @treturn Component checkbox component
|
|
||||||
function Druid.new_checkbox(self, ...)
|
|
||||||
return Druid.create(self, checkbox, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create input basic component
|
|
||||||
-- @function druid:new_input
|
|
||||||
-- @tparam args ... input init args
|
|
||||||
-- @treturn Component input component
|
|
||||||
function Druid.new_input(self, ...)
|
|
||||||
return Druid.create(self, input, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create checkbox_group basic component
|
|
||||||
-- @function druid:new_checkbox_group
|
|
||||||
-- @tparam args ... checkbox_group init args
|
|
||||||
-- @treturn Component checkbox_group component
|
|
||||||
function Druid.new_checkbox_group(self, ...)
|
|
||||||
return Druid.create(self, checkbox_group, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create radio_group basic component
|
|
||||||
-- @function druid:new_radio_group
|
|
||||||
-- @tparam args ... radio_group init args
|
|
||||||
-- @treturn Component radio_group component
|
|
||||||
function Druid.new_radio_group(self, ...)
|
|
||||||
return Druid.create(self, radio_group, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Create swipe basic component
|
--- Create swipe basic component
|
||||||
-- @function druid:new_swipe
|
-- @function druid:new_swipe
|
||||||
-- @tparam args ... swipe init args
|
-- @tparam args ... swipe init args
|
||||||
@ -483,4 +421,74 @@ function Druid.new_drag(self, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create slider basic component
|
||||||
|
-- @function druid:new_slider
|
||||||
|
-- @tparam args ... slider init args
|
||||||
|
-- @treturn Component slider component
|
||||||
|
function Druid.new_slider(self, ...)
|
||||||
|
-- return helper.extended_component("slider")
|
||||||
|
return Druid.create(self, slider, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create checkbox basic component
|
||||||
|
-- @function druid:new_checkbox
|
||||||
|
-- @tparam args ... checkbox init args
|
||||||
|
-- @treturn Component checkbox component
|
||||||
|
function Druid.new_checkbox(self, ...)
|
||||||
|
-- return helper.extended_component("checkbox")
|
||||||
|
return Druid.create(self, checkbox, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create input basic component
|
||||||
|
-- @function druid:new_input
|
||||||
|
-- @tparam args ... input init args
|
||||||
|
-- @treturn Component input component
|
||||||
|
function Druid.new_input(self, ...)
|
||||||
|
-- return helper.extended_component("input")
|
||||||
|
return Druid.create(self, input, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create checkbox_group basic component
|
||||||
|
-- @function druid:new_checkbox_group
|
||||||
|
-- @tparam args ... checkbox_group init args
|
||||||
|
-- @treturn Component checkbox_group component
|
||||||
|
function Druid.new_checkbox_group(self, ...)
|
||||||
|
-- return helper.extended_component("checkbox_group")
|
||||||
|
return Druid.create(self, checkbox_group, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create radio_group basic component
|
||||||
|
-- @function druid:new_radio_group
|
||||||
|
-- @tparam args ... radio_group init args
|
||||||
|
-- @treturn Component radio_group component
|
||||||
|
function Druid.new_radio_group(self, ...)
|
||||||
|
-- return helper.extended_component("radio_group")
|
||||||
|
return Druid.create(self, radio_group, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create timer basic component
|
||||||
|
-- @function druid:new_timer
|
||||||
|
-- @tparam args ... timer init args
|
||||||
|
-- @treturn Component timer component
|
||||||
|
function Druid.new_timer(self, ...)
|
||||||
|
-- return helper.extended_component("timer")
|
||||||
|
return Druid.create(self, timer, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Create progress basic component
|
||||||
|
-- @function druid:new_progress
|
||||||
|
-- @tparam args ... progress init args
|
||||||
|
-- @treturn Component progress component
|
||||||
|
function Druid.new_progress(self, ...)
|
||||||
|
-- return helper.extended_component("progress")
|
||||||
|
return Druid.create(self, progress, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return Druid
|
return Druid
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
use_latest_bob=true
|
use_latest_bob=false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user