Skip to content

Commit

Permalink
doc: add calendar widget doc
Browse files Browse the repository at this point in the history
Change-Id: I16a6400978fb961f2fa28faa064ed5f99a26ede7
Signed-off-by: Neo Xu <[email protected]>
  • Loading branch information
XuNeo committed Jan 6, 2023
1 parent f38c323 commit 10d95cc
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions src/lugl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ end
function lugl.Object(parent, property)
end

--- Create Calendar widget on parent
--- @param parent? Object | nil
--- @param property? StyleProp
--- @return Calendar
function lugl.Calendar(parent, property)
end


---
--- Create Label on parent
--- @param parent? Object | nil
Expand Down Expand Up @@ -429,6 +437,13 @@ obj = {}
function obj:Object(property)
end

---
--- Create calendar on object
--- @param property? CalendarStyle
--- @return Calendar
function obj:Calendar(property)
end

---
--- Create checkbox on object
--- @param property? CheckboxStyle
Expand Down Expand Up @@ -749,6 +764,48 @@ end
function obj:anims(p)
end

---
--- Calendar widget
---@class Calendar:Object
---
local calendar = {}

--- set method for calendar widget
--- @param p CalendarStyle
--- @return nil
function calendar:set(p)
end

--- get today para setting from calendar widget
--- @return CalendarDatePara
function calendar:get_today(p)
end

--- get the currently showed date
--- @return CalendarDatePara
function calendar:get_showed(p)
end

--- get the currently pressed day
--- @return CalendarDatePara
function calendar:get_pressed(p)
end

--- get the button matrix object of the calendar.
--- @return Object
function calendar:get_btnm(p)
end

--- create a calendar header with drop-drowns to select the year and month.
--- @return Object
function calendar:Arrow(p)
end

--- create a calendar header with drop-drowns to select the year and month
--- @return Object
function calendar:Dropdown(p)
end

---
--- Checkbox widget
---@class Checkbox:Object
Expand Down Expand Up @@ -1238,6 +1295,12 @@ end
--- @class LabelStyle :StyleProp
--- @field text string


--- Checkbox style
--- @class CalendarStyle :StyleProp
--- @field today CalendarDatePara
--- @field showed CalendarDatePara

--- Checkbox style
--- @class CheckboxStyle :StyleProp
--- @field text string
Expand Down Expand Up @@ -1316,4 +1379,14 @@ end
--- @field justify_content flexAlignOptions
--- @field align_items flexAlignOptions
--- @field align_content flexAlignOptions


---
--- CalendarToday para
--- @class CalendarDatePara
--- @field year integer
--- @field month integer
--- @field day integer
---

return lugl

0 comments on commit 10d95cc

Please sign in to comment.