Skip to content

Second version of UI toolkit for Reblocks – Common Lisp web-framework (Work In Progress)

Notifications You must be signed in to change notification settings

40ants/reblocks-ui2

Repository files navigation

reblocks-ui2 - A pack of UI components for Reblocks web-framework.

REBLOCKS-UI2 ASDF System Details

Installation

You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:

(ql-dist:install-dist "http://dist.ultralisp.org/"
                      :prompt nil)
(ql:quickload :reblocks-ui2)

Usage

TODO: Write a library description. Put some examples here.

API

REBLOCKS-UI2/BUTTONS/BUTTON

package reblocks-ui2/buttons/button

Classes

BUTTON

class reblocks-ui2/buttons/button:button (widget)

Readers

reader reblocks-ui2/buttons/button:button-class (button) (:class)

reader reblocks-ui2/buttons/button:button-content (button) (:content)

reader reblocks-ui2/buttons/button:button-disabled (button) (:disabled = nil)

reader reblocks-ui2/buttons/button:button-on-click (button) (:on-click)

reader reblocks-ui2/buttons/button:button-style (button) (:style)

Functions

function reblocks-ui2/buttons/button:button CONTENT &KEY (WIDGET-CLASS 'BUTTON) ON-CLICK (CLASS "button") DISABLED STYLE

REBLOCKS-UI2/CONTAINERS/POPUP/WIDGET

package reblocks-ui2/containers/popup/widget

Classes

POPUP-WIDGET

class reblocks-ui2/containers/popup/widget:popup-widget (ui-widget)

This widgets shows a popup window.

Inherit from this class and define a method for render-popup-content generic-function. Then you will be able to instantiate your class instance and call show-popup generic function.

Readers

reader reblocks-ui2/containers/popup/widget:visible-p (popup-widget) (= nil)

Accessors

accessor reblocks-ui2/containers/popup/widget:visible-p (popup-widget) (= nil)

Generics

generic-function reblocks-ui2/containers/popup/widget:hide-popup widget

Hides popup window.

generic-function reblocks-ui2/containers/popup/widget:render-popup-content widget

Renders inner HTML for popup window. You need to define a method for this generic function and specialize it for your own class.

generic-function reblocks-ui2/containers/popup/widget:show-popup widget

Shows popup window.

REBLOCKS-UI2/TABLES/CLICKABLE-ROW

package reblocks-ui2/tables/clickable-row

Classes

CLICKABLE-ROW-WIDGET

class reblocks-ui2/tables/clickable-row:clickable-row-widget (table-row)

Functions

function reblocks-ui2/tables/clickable-row:make-clickable-row-widget

REBLOCKS-UI2/TABLES/TABLE

package reblocks-ui2/tables/table

Classes

COLUMN

class reblocks-ui2/tables/table:column (widget)

Readers

reader reblocks-ui2/tables/table:cell-maker (column) (:cell-maker = #'create-widget-from)

reader reblocks-ui2/tables/table:column-align (column) (:align = :left)

reader reblocks-ui2/tables/table:column-classes (column) (:classes = nil)

Additional CSS classes for column cells

reader reblocks-ui2/tables/table:column-idx (column) (= nil)

reader reblocks-ui2/tables/table:column-title (column) (:title)

reader reblocks-ui2/tables/table:data-getter (column) (:GETTER = (LAMBDA (ROW)

(DECLARE (IGNORE ROW)) (ERROR "Real getter should be provided to COLUMN function.")))

TABLE-ROW

class reblocks-ui2/tables/table:table-row (widget)

Readers

reader reblocks-ui2/tables/table:row-cells (table-row) (:cells)

reader reblocks-ui2/tables/table:row-object (table-row) (:object)

Original object, passed as a row to the make-table function.

reader reblocks-ui2/tables/table:row-table (table-row) (:table)

Reference it a table row belong to.

TABLE-WIDGET

class reblocks-ui2/tables/table:table-widget (ui-widget)

Readers

reader reblocks-ui2/tables/table:table-columns (table-widget) (:columns)

reader reblocks-ui2/tables/table:table-row-class (table-widget) (:row-class = 'table-row)

reader reblocks-ui2/tables/table:table-rows (table-widget) (:rows = nil)

Generics

generic-function reblocks-ui2/tables/table:append-data widget data

generic-function reblocks-ui2/tables/table:column-css-classes column theme

generic-function reblocks-ui2/tables/table:header-column-css-classes column theme

Functions

function reblocks-ui2/tables/table:column title &key (getter nil getter-given-p) (cell-maker nil cell-maker-p) (align :center) (classes nil clases-given-p)

function reblocks-ui2/tables/table:current-cell

function reblocks-ui2/tables/table:current-column

function reblocks-ui2/tables/table:current-row

function reblocks-ui2/tables/table:current-table

function reblocks-ui2/tables/table:make-table columns rows &key (table-class 'table-widget) (row-class nil row-class-given-p)

function reblocks-ui2/tables/table:recalculate-cells row &key (update t)

Updates cell widgets using base object, stored in the ROW.

REBLOCKS-UI2/THEMES/API

package reblocks-ui2/themes/api

Functions

function reblocks-ui2/themes/api:current-theme

REBLOCKS-UI2/THEMES/ZURB

package reblocks-ui2/themes/zurb

Classes

ZURB-THEME

class reblocks-ui2/themes/zurb:zurb-theme ()

Functions

function reblocks-ui2/themes/zurb:make-zurb-theme

REBLOCKS-UI2/WIDGET

package reblocks-ui2/widget

Classes

UI-WIDGET

class reblocks-ui2/widget:ui-widget (widget)

Generics

generic-function reblocks-ui2/widget:get-css-classes widget theme

Returns a list of classes for the widget.

Default implementation returns class list and all it's parent names.

generic-function reblocks-ui2/widget:get-dependencies widget theme

Works like reblocks/dependencies:get-dependencies generic-function, but in context of current theme.

generic-function reblocks-ui2/widget:render widget theme

Renders widget in given theme. All reblocks-ui2 widgets should implement this method instead of a method for reblocks/widget:render generic-function.


[generated by 40ANTS-DOC]

About

Second version of UI toolkit for Reblocks – Common Lisp web-framework (Work In Progress)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published