The caveman2-widgets-bootstrap Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The caveman2-widgets-bootstrap Reference Manual

This is the caveman2-widgets-bootstrap Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:21:03 2022 GMT+0.

Table of Contents


1 Introduction

* Caveman2-Widgets-Bootstrap 
This is an extension to [[https://github.com/ritschmaster/caveman2-widgets][caveman2-widgets]]. It supplies widgets which are using
[[https://getbootstrap.com/][Bootstrap]]. Before you start using it you may have a look at the [[https://github.com/ritschmaster/caveman2-widgets#usage][basic usage
documentation]] to understand how to use those (extra) widgets.

** Installation
You can load it through Quicklisp or you can use the git repository. To use the
git repository clone it into "~/quicklisp/local-projects" or (if you are using
[[https://github.com/roswell/roswell][Roswell]]) "~/.roswell/local-projects".

To QUICKLOAD it, use:
#+BEGIN_SRC lisp
(ql:quickload :caveman2-widgets-bootstrap)
#+END_SRC

** Contributions
You are very welcomed to contribute to this project! You can contribute by:
- Using it and spreading the word!
- Finding flaws and submitting [[https://github.com/ritschmaster/caveman2-widgets/issues][Issues]].
- Finding flaws and removing them (as [[https://github.com/ritschmaster/caveman2-widgets/pulls][Pull-requests]]).
- Adding new features (as [[https://github.com/ritschmaster/caveman2-widgets/pulls][Pull-requests]]). Before shooting in the dark
  create either an [[https://github.com/ritschmaster/caveman2-widgets/issues][Issues]] or mail me. Maybe your feature is on my
  agenda too.
- Showing your appreciation through a donation (please mail me for my
  data).

If you add new features, please document them. Otherwise other
developers will have a hard time using this framework.
** Usage
*** A new header widget
A new header widget is added which uses specific CDN links for getting
Bootstrap. Please notice, that the global variables, where you can
specify the locations, are not simple string variables! They are
 objects.
- *BOOTSTRAP-JS* :: Must be a  object.
- *BOOTSTRAP-CSS* :: Must be a  object.

*** Navigation widget
The navigation widget is fully redesigned for the use with
Bootstrap. The  has some special
slots:
- BRAND-TEXT :: A HTML code which will be displayed in the upper left
                corner.
- NAVBAR-FIXED :: A non-nil value will fix the navbar on the upper
                  edge.

You can use it fairly easy by just using
 as KIND for the DEFNAV macro:
#+BEGIN_SRC lisp
(defvar *first-widget*
  (make-widget :global '
               :text "

Hello world from first

")) (defvar *second-widget* (make-widget :global ' :text "

Hello world from second

")) (defclass () () (:documentation "This class enables session based widgets for a navigation.")) (defmethod render-widget ((this )) (set-widget-for-session :string-widget (make-widget :session ' :text "hello world")) (render-widget (get-widget-for-session :string-widget))) (defnav "/" ((make-instance ' :title "Navigation test") (list (list "First widget" "first" *first-widget*) (list "Second widget" "second" *second-widget*) (list "Third widget" "third" (make-widget :global '))) :kind ')) #+END_SRC If you need extra header objects, you can create them via the RENDER-WIDGET-HEADER method. This means you only have to overwrite it for your own navigation class. #+BEGIN_SRC lisp (defvar *first-widget* (make-widget :global ' :text "

Hello world from first

")) (defvar *second-widget* (make-widget :global ' :text "

Hello world from second

")) (defclass () () (:default-initargs :brand-text "
" :navbar-fixed t)) (defmethod caveman2-widgets-bootstrap.navigation::render-widget-header ((this ) (args (eql :right))) (with-output-to-string (ret-val) (format ret-val "" (let ((link (make-widget :global ' :label "GitHub" :callback #'(lambda () "http://github.com/ritschmaster") :target-foreign-p t))) (uri-path link))))) (defnav "/" ((make-instance ' :title "Navigation test") (list (list "First widget" "first" *first-widget*) (list "Second widget" "second" *second-widget*)) :kind ')) #+END_SRC ** Author + Richard Paul Bäck (richard.baeck@free-your-pc.com) ** Copyright Copyright (c) 2016 Richard Paul Bäck (richard.baeck@free-your-pc.com) ** License Licensed under the LLGPL License.

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 caveman2-widgets-bootstrap

An extension to caveman2-widgets which enables the simple usage of Twitter Bootstrap.

Author

Richard Paul Bäck

License

LLGPL

Version

0.2

Dependencies
  • caveman2 (system).
  • caveman2-widgets (system).
Source

caveman2-widgets-bootstrap.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 caveman2-widgets-bootstrap/src

Source

caveman2-widgets-bootstrap.asd.

Parent Component

caveman2-widgets-bootstrap (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


4.1.1 caveman2-widgets-bootstrap/caveman2-widgets-bootstrap.asd

Source

caveman2-widgets-bootstrap.asd.

Parent Component

caveman2-widgets-bootstrap (system).

ASDF Systems

caveman2-widgets-bootstrap.


4.1.2 caveman2-widgets-bootstrap/src/widget.lisp

Source

caveman2-widgets-bootstrap.asd.

Parent Component

src (module).

Packages

caveman2-widgets-bootstrap.widget.

Public Interface

4.1.3 caveman2-widgets-bootstrap/src/callback-widgets.lisp

Source

caveman2-widgets-bootstrap.asd.

Parent Component

src (module).

Packages

caveman2-widgets-bootstrap.callback-widgets.

Public Interface
Internals

*default-button-class* (special variable).


4.1.4 caveman2-widgets-bootstrap/src/document.lisp

Source

caveman2-widgets-bootstrap.asd.

Parent Component

src (module).

Packages

caveman2-widgets-bootstrap.document.

Public Interface

4.1.5 caveman2-widgets-bootstrap/src/navigation.lisp

Source

caveman2-widgets-bootstrap.asd.

Parent Component

src (module).

Packages

caveman2-widgets-bootstrap.navigation.

Public Interface

4.1.6 caveman2-widgets-bootstrap/src/caveman2-widgets-bootstrap.lisp

Source

caveman2-widgets-bootstrap.asd.

Parent Component

src (module).

Packages

caveman2-widgets-bootstrap.


5 Packages

Packages are listed by definition order.


5.1 caveman2-widgets-bootstrap.document

Source

document.lisp.

Use List
Used By List

caveman2-widgets-bootstrap.

Public Interface

5.2 caveman2-widgets-bootstrap.navigation

Source

navigation.lisp.

Use List
  • caveman2.
  • caveman2-widgets.
  • caveman2-widgets.util.
  • common-lisp.
Used By List

caveman2-widgets-bootstrap.

Public Interface

5.4 caveman2-widgets-bootstrap.widget

Source

widget.lisp.

Use List

common-lisp.

Used By List
Public Interface

5.5 caveman2-widgets-bootstrap.callback-widgets

Source

callback-widgets.lisp.

Use List
Used By List

caveman2-widgets-bootstrap.

Public Interface
Internals

*default-button-class* (special variable).


6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Public Interface


6.1.1 Special variables

Special Variable: *application-root*
Package

caveman2-widgets-bootstrap.widget.

Source

widget.lisp.

Special Variable: *bootstrap-css*
Package

caveman2-widgets-bootstrap.document.

Source

document.lisp.

Special Variable: *bootstrap-js*
Package

caveman2-widgets-bootstrap.document.

Source

document.lisp.

Special Variable: *js-directory*
Package

caveman2-widgets-bootstrap.widget.

Source

widget.lisp.

Special Variable: *static-directory*
Package

caveman2-widgets-bootstrap.widget.

Source

widget.lisp.

Special Variable: *widgets-js-filename*

The filename of the JavaScript file which manages all bootstrap widget functionality.

Package

caveman2-widgets-bootstrap.widget.

Source

widget.lisp.


6.1.2 Generic functions

Generic Reader: brand-text (object)
Generic Writer: (setf brand-text) (object)
Package

caveman2-widgets-bootstrap.navigation.

Methods
Reader Method: brand-text ((<bootstrap-menu-navigation-widget> <bootstrap-menu-navigation-widget>))
Writer Method: (setf brand-text) ((<bootstrap-menu-navigation-widget> <bootstrap-menu-navigation-widget>))

This can be HTML too.

Source

navigation.lisp.

Target Slot

brand-text.

Generic Reader: kind (object)
Package

caveman2-widgets-bootstrap.callback-widgets.

Methods
Reader Method: kind ((<bootstrap-button-widget> <bootstrap-button-widget>))

The button kind. Available keywords: - :default
- :primary
- :success
- :info
- :warning
- :danger

Source

callback-widgets.lisp.

Target Slot

kind.

Generic Writer: (setf kind) (object)
Package

caveman2-widgets-bootstrap.callback-widgets.

Methods
Writer Method: (setf kind) ((this <bootstrap-button-widget>))
Source

callback-widgets.lisp.

Target Slot

kind.

Generic Reader: navbar-fixed (object)
Package

caveman2-widgets-bootstrap.navigation.

Methods
Reader Method: navbar-fixed ((<bootstrap-menu-navigation-widget> <bootstrap-menu-navigation-widget>))

automatically generated reader method

Source

navigation.lisp.

Target Slot

navbar-fixed.

Generic Writer: (setf navbar-fixed) (object)
Package

caveman2-widgets-bootstrap.navigation.

Methods
Writer Method: (setf navbar-fixed) ((<bootstrap-menu-navigation-widget> <bootstrap-menu-navigation-widget>))

automatically generated writer method

Source

navigation.lisp.

Target Slot

navbar-fixed.

Generic Function: render-widget-header (this args)
Package

caveman2-widgets-bootstrap.navigation.

Source

navigation.lisp.

Methods
Method: render-widget-header ((this <bootstrap-menu-navigation-widget>) (args (eql :right)))
Method: render-widget-header ((this <bootstrap-menu-navigation-widget>) (args (eql :middle)))
Method: render-widget-header ((this <bootstrap-menu-navigation-widget>) (args (eql :left)))

6.1.3 Standalone methods

Method: initialize-instance :after ((this <bootstrap-header-widget>) &key)
Source

document.lisp.

Method: initialize-instance :after ((this <bootstrap-button-widget>) &key)
Source

callback-widgets.lisp.

Method: render-widget ((this <bootstrap-menu-navigation-widget>))
Package

caveman2-widgets.widget.

Source

navigation.lisp.


6.1.4 Classes

Class: <bootstrap-button-widget>
Package

caveman2-widgets-bootstrap.callback-widgets.

Source

callback-widgets.lisp.

Direct superclasses

<button-widget>.

Direct methods
Direct slots
Slot: kind

The button kind. Available keywords: - :default
- :primary
- :success
- :info
- :warning
- :danger

Initform

:default

Initargs

:kind

Readers

kind.

Writers

(setf kind).

Class: <bootstrap-header-widget>
Package

caveman2-widgets-bootstrap.document.

Source

document.lisp.

Direct superclasses

<header-widget>.

Direct methods

initialize-instance.

Direct Default Initargs
InitargValue
:other-header-content(list <meta name="viewport" content="width=device-width, initial-scale=1">)
Class: <bootstrap-menu-navigation-widget>
Package

caveman2-widgets-bootstrap.navigation.

Source

navigation.lisp.

Direct superclasses

<menu-navigation-widget>.

Direct methods
Direct slots
Slot: brand-text

This can be HTML too.

Initform

""

Initargs

:brand-text

Readers

brand-text.

Writers

(setf brand-text).

Slot: navbar-fixed
Initargs

:navbar-fixed

Readers

navbar-fixed.

Writers

(setf navbar-fixed).


6.2 Internals


Previous: , Up: Internals   [Contents][Index]

6.2.1 Special variables

Special Variable: *default-button-class*
Package

caveman2-widgets-bootstrap.callback-widgets.

Source

callback-widgets.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
B   G   I   K   M   N   R  
Index Entry  Section

(
(setf brand-text): Public generic functions
(setf brand-text): Public generic functions
(setf kind): Public generic functions
(setf kind): Public generic functions
(setf navbar-fixed): Public generic functions
(setf navbar-fixed): Public generic functions

B
brand-text: Public generic functions
brand-text: Public generic functions

G
Generic Function, (setf brand-text): Public generic functions
Generic Function, (setf kind): Public generic functions
Generic Function, (setf navbar-fixed): Public generic functions
Generic Function, brand-text: Public generic functions
Generic Function, kind: Public generic functions
Generic Function, navbar-fixed: Public generic functions
Generic Function, render-widget-header: Public generic functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

K
kind: Public generic functions
kind: Public generic functions

M
Method, (setf brand-text): Public generic functions
Method, (setf kind): Public generic functions
Method, (setf navbar-fixed): Public generic functions
Method, brand-text: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, kind: Public generic functions
Method, navbar-fixed: Public generic functions
Method, render-widget: Public standalone methods
Method, render-widget-header: Public generic functions
Method, render-widget-header: Public generic functions
Method, render-widget-header: Public generic functions

N
navbar-fixed: Public generic functions
navbar-fixed: Public generic functions

R
render-widget: Public standalone methods
render-widget-header: Public generic functions
render-widget-header: Public generic functions
render-widget-header: Public generic functions
render-widget-header: Public generic functions

Jump to:   (  
B   G   I   K   M   N   R  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   <  
C   D   F   M   N   P   S   W  
Index Entry  Section

<
<bootstrap-button-widget>: Public classes
<bootstrap-header-widget>: Public classes
<bootstrap-menu-navigation-widget>: Public classes

C
callback-widgets.lisp: The caveman2-widgets-bootstrap/src/callback-widgets․lisp file
caveman2-widgets-bootstrap: The caveman2-widgets-bootstrap system
caveman2-widgets-bootstrap: The caveman2-widgets-bootstrap package
caveman2-widgets-bootstrap.asd: The caveman2-widgets-bootstrap/caveman2-widgets-bootstrap․asd file
caveman2-widgets-bootstrap.callback-widgets: The caveman2-widgets-bootstrap․callback-widgets package
caveman2-widgets-bootstrap.document: The caveman2-widgets-bootstrap․document package
caveman2-widgets-bootstrap.lisp: The caveman2-widgets-bootstrap/src/caveman2-widgets-bootstrap․lisp file
caveman2-widgets-bootstrap.navigation: The caveman2-widgets-bootstrap․navigation package
caveman2-widgets-bootstrap.widget: The caveman2-widgets-bootstrap․widget package
Class, <bootstrap-button-widget>: Public classes
Class, <bootstrap-header-widget>: Public classes
Class, <bootstrap-menu-navigation-widget>: Public classes

D
document.lisp: The caveman2-widgets-bootstrap/src/document․lisp file

F
File, callback-widgets.lisp: The caveman2-widgets-bootstrap/src/callback-widgets․lisp file
File, caveman2-widgets-bootstrap.asd: The caveman2-widgets-bootstrap/caveman2-widgets-bootstrap․asd file
File, caveman2-widgets-bootstrap.lisp: The caveman2-widgets-bootstrap/src/caveman2-widgets-bootstrap․lisp file
File, document.lisp: The caveman2-widgets-bootstrap/src/document․lisp file
File, navigation.lisp: The caveman2-widgets-bootstrap/src/navigation․lisp file
File, widget.lisp: The caveman2-widgets-bootstrap/src/widget․lisp file

M
Module, src: The caveman2-widgets-bootstrap/src module

N
navigation.lisp: The caveman2-widgets-bootstrap/src/navigation․lisp file

P
Package, caveman2-widgets-bootstrap: The caveman2-widgets-bootstrap package
Package, caveman2-widgets-bootstrap.callback-widgets: The caveman2-widgets-bootstrap․callback-widgets package
Package, caveman2-widgets-bootstrap.document: The caveman2-widgets-bootstrap․document package
Package, caveman2-widgets-bootstrap.navigation: The caveman2-widgets-bootstrap․navigation package
Package, caveman2-widgets-bootstrap.widget: The caveman2-widgets-bootstrap․widget package

S
src: The caveman2-widgets-bootstrap/src module
System, caveman2-widgets-bootstrap: The caveman2-widgets-bootstrap system

W
widget.lisp: The caveman2-widgets-bootstrap/src/widget․lisp file

Jump to:   <  
C   D   F   M   N   P   S   W