From 9d0693ce3a8a5a75742898283b0a10802ba303ce Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 23 May 2016 03:02:11 -0400 Subject: [PATCH] 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. --- lib/wibox/container/constraint.lua | 4 ++-- lib/wibox/container/mirror.lua | 4 ++-- lib/wibox/container/rotate.lua | 4 ++-- lib/wibox/container/scroll.lua | 4 ++-- lib/wibox/layout/align.lua | 4 ++-- lib/wibox/widget/imagebox.lua | 4 ++-- lib/wibox/widget/textbox.lua | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/wibox/container/constraint.lua b/lib/wibox/container/constraint.lua index 11fc82d1..edc9d108 100644 --- a/lib/wibox/container/constraint.lua +++ b/lib/wibox/container/constraint.lua @@ -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 diff --git a/lib/wibox/container/mirror.lua b/lib/wibox/container/mirror.lua index 7c419c29..d9229050 100644 --- a/lib/wibox/container/mirror.lua +++ b/lib/wibox/container/mirror.lua @@ -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 diff --git a/lib/wibox/container/rotate.lua b/lib/wibox/container/rotate.lua index 94665e96..5b0d9d32 100644 --- a/lib/wibox/container/rotate.lua +++ b/lib/wibox/container/rotate.lua @@ -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 diff --git a/lib/wibox/container/scroll.lua b/lib/wibox/container/scroll.lua index c4a5f959..38320f01 100644 --- a/lib/wibox/container/scroll.lua +++ b/lib/wibox/container/scroll.lua @@ -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. diff --git a/lib/wibox/layout/align.lua b/lib/wibox/layout/align.lua index 258acb89..741d02bf 100644 --- a/lib/wibox/layout/align.lua +++ b/lib/wibox/layout/align.lua @@ -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. diff --git a/lib/wibox/widget/imagebox.lua b/lib/wibox/widget/imagebox.lua index bf63adb1..2137724c 100644 --- a/lib/wibox/widget/imagebox.lua +++ b/lib/wibox/widget/imagebox.lua @@ -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 diff --git a/lib/wibox/widget/textbox.lua b/lib/wibox/widget/textbox.lua index 4c38f61a..32e98f52 100644 --- a/lib/wibox/widget/textbox.lua +++ b/lib/wibox/widget/textbox.lua @@ -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)