Changes between Initial Version and Version 1 of IntroWidgetComponents

Show
Ignore:
Timestamp:
07/25/06 04:24:17 (8 years ago)
Author:
tstuij
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IntroWidgetComponents

    v1 v1  
     1[wiki:IntroYaclmlTags Yaclml tags <- back] | [wiki:UcwIntro toc] | [wiki:IntroNestedComponents forward -> Nested Components (:|,) containers and tabbed panes] 
     2 
     3{{{ 
     4#!html 
     5 
     6    <h2>Widget components</h2> 
     7    <p>A widget component is a normal class which wraps the contents of a render method in a div or a span. Widget components sound more weighty then they are. They don't inherit from a standard component, but are it's brothers. Components which inherit from them inherit the slots css-class, css-style and css-id, which are used in the :wrapping method of a render method. For the interested: arnesi, on which ucw depends, utilizes define-method-combination for some extra method combo's. According to the source in /path/to/arnesi_dev/src/mop.lisp it allows a method to have the</p> 
     8    <pre> 
     9"Same semantics as standard method combination but allows 
     10"wrapping" methods. Ordering of methods: 
     11    </pre> 
     12    <pre> 
     13(wrap-around 
     14  (around 
     15    (before) 
     16    (wrapping 
     17      (primary)) 
     18    (after))) 
     19    </pre> 
     20    <pre> 
     21:warp-around, :around, :wrapping and :primary methods call the 
     22next least/most specific method via call-next-method (as in 
     23standard method combination). 
     24    </pre> 
     25    <p>There's not so much to them widget components. Defining them like this wraps it's content in a div with the attributes class, id and style:</p> 
     26    <pre> 
     27(defclass widget-test (widget-component) 
     28  () 
     29  (:default-initargs  :css-class '("bla" "blop") :css-id "widget-test" :css-style "font-size: 30pt; color: fuchsia")) 
     30    </pre> 
     31    <pre> 
     32(defmethod render ((comp widget-test)) 
     33  (&lt;:ah "bla")) 
     34    </pre> 
     35    <p>Let widget-test inherit from inline-widget-component instead to wrap your content in a span.</p> 
     36 
     37}}} 
     38 
     39[wiki:IntroYaclmlTags Yaclml tags <- back] | [wiki:UcwIntro toc] | [wiki:IntroNestedComponents forward -> Nested Components (:|,) containers and tabbed panes]