doc: Do not export draw, fit and layout methods

They are used internally, users should never call them.

This will make the API documentation cleaner.
This commit is contained in:
Emmanuel Lepage Vallee 2016-05-23 03:02:11 -04:00
parent be23bf0f15
commit 9d0693ce3a
7 changed files with 14 additions and 14 deletions

View File

@ -13,14 +13,14 @@ local math = math
local constraint = { mt = {} }
--- Layout a constraint layout
-- Layout a constraint layout
function constraint:layout(_, width, height)
if self.widget then
return { base.place_widget_at(self.widget, 0, 0, width, height) }
end
end
--- Fit a constraint layout into the given space
-- Fit a constraint layout into the given space
function constraint:fit(context, width, height)
local w, h
if self.widget then

View File

@ -15,7 +15,7 @@ local matrix = require("gears.matrix")
local mirror = { mt = {} }
--- Layout this layout
-- Layout this layout
function mirror:layout(_, width, height)
if not self.widget then return end
@ -36,7 +36,7 @@ function mirror:layout(_, width, height)
return { base.place_widget_via_matrix(self.widget, m, width, height) }
end
--- Fit this layout into the given area
-- Fit this layout into the given area
function mirror:fit(context, ...)
if not self.widget then
return 0, 0

View File

@ -24,7 +24,7 @@ local function transform(layout, width, height)
return width, height
end
--- Layout this layout
-- Layout this layout
function rotate:layout(_, width, height)
if not self.widget or not self.widget.visible then
return
@ -49,7 +49,7 @@ function rotate:layout(_, width, height)
return { base.place_widget_via_matrix(self.widget, m, transform(self, width, height)) }
end
--- Fit this layout into the given area
-- Fit this layout into the given area
function rotate:fit(context, width, height)
if not self.widget then
return 0, 0

View File

@ -140,7 +140,7 @@ local function calculate_info(self, context, width, height)
return result
end
--- Draw this scrolling layout.
-- Draw this scrolling layout.
-- @param context The context in which we are drawn.
-- @param cr The cairo context to draw to.
-- @param width The available width.
@ -170,7 +170,7 @@ function scroll:draw(context, cr, width, height)
end
end
--- Fit the scroll layout into the given space.
-- Fit the scroll layout into the given space.
-- @param context The context in which we are fit.
-- @param width The available width.
-- @param height The available height.

View File

@ -14,7 +14,7 @@ local base = require("wibox.widget.base")
local align = {}
--- Calculate the layout of an align layout.
-- Calculate the layout of an align layout.
-- @param context The context in which we are drawn.
-- @param width The available width.
-- @param height The available height.
@ -180,7 +180,7 @@ function align:set_children(children)
self:set_third(children[3])
end
--- Fit the align layout into the given space. The align layout will
-- Fit the align layout into the given space. The align layout will
-- ask for the sum of the sizes of its sub-widgets in its direction
-- and the largest sized sub widget in the other direction.
-- @param context The context in which we are fit.

View File

@ -15,7 +15,7 @@ local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility
local imagebox = { mt = {} }
--- Draw an imagebox with the given cairo context in the given geometry.
-- Draw an imagebox with the given cairo context in the given geometry.
function imagebox:draw(_, cr, width, height)
if not self._image then return end
if width == 0 or height == 0 then return end
@ -40,7 +40,7 @@ function imagebox:draw(_, cr, width, height)
cr:paint()
end
--- Fit the imagebox into the given geometry
-- Fit the imagebox into the given geometry
function imagebox:fit(_, width, height)
if not self._image then
return 0, 0

View File

@ -34,7 +34,7 @@ local function setup_layout(box, width, height, dpi)
setup_dpi(box, dpi)
end
--- Draw the given textbox on the given cairo context in the given geometry
-- Draw the given textbox on the given cairo context in the given geometry
function textbox:draw(context, cr, width, height)
setup_layout(self, width, height, context.dpi)
cr:update_layout(self._layout)
@ -57,7 +57,7 @@ local function do_fit_return(self)
return logical.width, logical.height
end
--- Fit the given textbox
-- Fit the given textbox
function textbox:fit(context, width, height)
setup_layout(self, width, height, context.dpi)
return do_fit_return(self)