Here are some alternatives for a bbdb-display-layout-alist
customization widgets.  I prefer the last one myself.

I stopped fiddling with it before implementing the availability
restriction of properties depending on layout type.  :)

Alex.

(defcustom bbdb-display-layout-alist 
  '((one-line   (order     . (phones mail-alias net notes))
                (name-end  . 24)
                (toggle    . t))
    (multi-line (indention . 14)
                (toggle    . t))
    (pop-up-multi-line (indention . 14)))
  "*An alist describing each display layout.
The format of an element is (LAYOUT-NAME . (OPTION-ALIST)).

Currently htere are three different layout types, which are `one-line',
`multi-line' and `full-multi-line'.   OPTION-ALIST specifies the options
for the layout.  Valid options are:

                           ------- Availability --------
    Format                  one-line        multi-line  
--------------------------------------------------------
 (toggle . BOOL)                 +               +      
 (order . FIELD-LIST)            +               +      
 (omit . FIELD-LIST)             +               +      
 (name-end . INTEGER)            +               -      
 (indention . INTEGER)           -               +

- toggle: controls if this layout is included when toggeling the display
  layout
- order: defines a user specific order for the fields, while t is a place
  holder for all remaining fields
- omit: is a list of fields which should not be displayed or t to exclude all
  fields except those listed in the order option
- name-end: sets the column where the name should end in one-line layout
- indention: sets the level of indetion for multi-line display.

Additionally there are two layouts derived from multi-line, which are
full-multi-line and pop-up-multi-line and supporting the same layout
options."
  :group 'bbdb
  :type '(repeat
          (cons :tag "Layout Definition"
                (choice :tag "Layout type"
                        (const one-line)
                        (const multi-line)
                        (const full-multi-line)
                        (symbol))
                (repeat :tag "Properties"
                        (choice :tag "Option"
                                (cons :tag "Order"
                                      (const :tag "List of fields to order by" order)
                                      (repeat (symbol :tag "Field")))
                                (choice :tag "Omit"
                                        (cons :tag "List of fields to omit"
                                              (const :tag "Fields not to display" omit)
                                              (repeat (symbol :tag "Field")))
                                        (const :tag "Exclude all fields except those 
listed in the order property"))
                                (cons :tag "Indentation" :value (indention . 14)
                                      (const :tag "Level of indentation for multi-line 
layout" indention)
                                      (number :tag "Column"))
                                (cons :tag "End of name field" :value (name-end . 24)
                                      (const :tag "The column where the name should 
end in a one-line layout" name-end)
                                      (number :tag "Column"))
                                (cons :tag "Toggle"
                                      (const :tag "The layout is included when 
toggling display layout" toggle)
                                      boolean))))))

(defcustom bbdb-display-layout-alist 
  '((one-line   (order     . (phones mail-alias net notes))
                (name-end  . 24)
                (toggle    . t))
    (multi-line (indention . 14)
                (toggle    . t))
    (pop-up-multi-line (indention . 14)))
  "*An alist describing each display layout.
The format of an element is (LAYOUT-NAME . (OPTION-ALIST)).

Currently htere are three different layout types, which are `one-line',
`multi-line' and `full-multi-line'.   OPTION-ALIST specifies the options
for the layout.  Valid options are:

                           ------- Availability --------
    Format                  one-line        multi-line  
--------------------------------------------------------
 (toggle . BOOL)                 +               +      
 (order . FIELD-LIST)            +               +      
 (omit . FIELD-LIST)             +               +      
 (name-end . INTEGER)            +               -      
 (indention . INTEGER)           -               +

- toggle: controls if this layout is included when toggeling the display
  layout
- order: defines a user specific order for the fields, while t is a place
  holder for all remaining fields
- omit: is a list of fields which should not be displayed or t to exclude all
  fields except those listed in the order option
- name-end: sets the column where the name should end in one-line layout
- indention: sets the level of indetion for multi-line display.

Additionally there are two layouts derived from multi-line, which are
full-multi-line and pop-up-multi-line and supporting the same layout
options."
  :group 'bbdb
  :type '(repeat
          (cons :tag "Layout Definition"
                (choice :tag "Layout type"
                        (const one-line)
                        (const multi-line)
                        (const full-multi-line)
                        (symbol))
                (set :tag "Properties" 
                     (cons :tag "Order" 
                           (const :tag "List of fields to order by" order)
                           (repeat (symbol :tag "Field"))) 
                     (choice :tag "Omit" 
                             (cons :tag "List of fields to omit" 
                                   (const :tag "Fields not to display" omit) 
                                   (repeat (symbol :tag "Field")))
                             (const :tag "Exclude all fields except those listed in 
the order property" t))
                     (cons :tag "Indentation" 
                           :value (indention . 14) 
                           (const :tag "Level of indentation for multi-line layout"
                                  indention)
                           (number :tag "Column"))
                     (cons :tag "End of name field" 
                           :value (name-end . 24) 
                           (const :tag "The column where the name should end in a 
one-line layout"
                                  name-end) 
                           (number :tag "Column"))
                     (cons :tag "Toggle" 
                           (const :tag "The layout is included when toggling display 
layout" toggle) 
                           boolean)))))

(defcustom bbdb-display-layout-alist 
  '((one-line   (order     . (phone mail-alias net notes))
                (name-end  . 24)
                (toggle    . t))
    (multi-line (indention . 14)
                (toggle    . t))
    (pop-up-multi-line (indention . 14)))
  "*An alist describing each display layout.
The format of an element is (LAYOUT-NAME . (OPTION-ALIST)).

Currently htere are three different layout types, which are `one-line',
`multi-line' and `full-multi-line'.   OPTION-ALIST specifies the options
for the layout.  Valid options are:

                           ------- Availability --------
    Format                  one-line        multi-line  
--------------------------------------------------------
 (toggle . BOOL)                 +               +      
 (order . FIELD-LIST)            +               +      
 (omit . FIELD-LIST)             +               +      
 (name-end . INTEGER)            +               -      
 (indention . INTEGER)           -               +

- toggle: controls if this layout is included when toggeling the display
  layout
- order: defines a user specific order for the fields, while t is a place
  holder for all remaining fields
- omit: is a list of fields which should not be displayed or t to exclude all
  fields except those listed in the order option
- name-end: sets the column where the name should end in one-line layout
- indention: sets the level of indetion for multi-line display.

Additionally there are two layouts derived from multi-line, which are
full-multi-line and pop-up-multi-line and supporting the same layout
options."
  :group 'bbdb
  :type `(repeat
          (cons :tag "Layout Definition"
                (choice :tag "Layout type"
                        (const one-line)
                        (const multi-line)
                        (const full-multi-line)
                        (symbol))
                (set :tag "Properties" 
                     (cons :tag "Order" 
                           (const :tag "List of fields to order by" order)
                           (repeat (choice (const phone)
                                           (const address)
                                           (const net)
                                           (const AKA)
                                           (const notes)
                                           (symbol :tag "other")
                                           (const :tag "Remaining fields" t))))
                     (choice :tag "Omit" 
                             :value (omit . nil)
                             (cons :tag "List of fields to omit"
                                   (const :tag "Fields not to display" omit) 
                                   (repeat (choice (const phone)
                                                   (const address)
                                                   (const net)
                                                   (const AKA)
                                                   (const notes)
                                                   (symbol :tag "other"))))
                             (const :tag "Exclude all fields except those listed in 
the order property" t))
                     (cons :tag "Indentation" 
                           :value (indention . 14) 
                           (const :tag "Level of indentation for multi-line layout"
                                  indention)
                           (number :tag "Column"))
                     (cons :tag "End of name field" 
                           :value (name-end . 24) 
                           (const :tag "The column where the name should end in a 
one-line layout"
                                  name-end) 
                           (number :tag "Column"))
                     (cons :tag "Toggle" 
                           (const :tag "The layout is included when toggling display 
layout" toggle) 
                           boolean)))))

-- 
http://www.emacswiki.org/

_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to