39 |
;; external libraries call it. We save a kb or two of purespace by |
;; external libraries call it. We save a kb or two of purespace by |
40 |
;; dummying-out such definitions generally. |
;; dummying-out such definitions generally. |
41 |
(defmacro define-widget-keywords (&rest keys) |
(defmacro define-widget-keywords (&rest keys) |
42 |
;;; ;; Don't use backquote, since that makes trouble trying to |
;; ;; Don't use backquote, since that makes trouble trying to |
43 |
;;; ;; re-bootstrap from just the .el files. |
;; ;; re-bootstrap from just the .el files. |
44 |
;;; (list 'eval-and-compile |
;; (list 'eval-and-compile |
45 |
;;; (list 'let (list (list 'keywords (list 'quote keys))) |
;; (list 'let (list (list 'keywords (list 'quote keys))) |
46 |
;;; (list 'while 'keywords |
;; (list 'while 'keywords |
47 |
;;; (list 'or (list 'boundp (list 'car 'keywords)) |
;; (list 'or (list 'boundp (list 'car 'keywords)) |
48 |
;;; (list 'set (list 'car 'keywords) (list 'car 'keywords))) |
;; (list 'set (list 'car 'keywords) (list 'car 'keywords))) |
49 |
;;; (list 'setq 'keywords (list 'cdr 'keywords))))) |
;; (list 'setq 'keywords (list 'cdr 'keywords))))) |
50 |
) |
) |
51 |
|
|
52 |
;;;(define-widget-keywords :documentation-indent |
;;(define-widget-keywords :documentation-indent |
53 |
;;; :complete-function :complete :button-overlay |
;; :complete-function :complete :button-overlay |
54 |
;;; :field-overlay |
;; :field-overlay |
55 |
;;; :documentation-shown :button-prefix |
;; :documentation-shown :button-prefix |
56 |
;;; :button-suffix :mouse-down-action :glyph-up :glyph-down :glyph-inactive |
;; :button-suffix :mouse-down-action :glyph-up :glyph-down :glyph-inactive |
57 |
;;; :prompt-internal :prompt-history :prompt-match |
;; :prompt-internal :prompt-history :prompt-match |
58 |
;;; :prompt-value :deactivate :active |
;; :prompt-value :deactivate :active |
59 |
;;; :inactive :activate :sibling-args :delete-button-args |
;; :inactive :activate :sibling-args :delete-button-args |
60 |
;;; :insert-button-args :append-button-args :button-args |
;; :insert-button-args :append-button-args :button-args |
61 |
;;; :tag-glyph :off-glyph :on-glyph :valid-regexp |
;; :tag-glyph :off-glyph :on-glyph :valid-regexp |
62 |
;;; :secret :sample-face :sample-face-get :case-fold |
;; :secret :sample-face :sample-face-get :case-fold |
63 |
;;; :create :convert-widget :format :value-create :offset :extra-offset |
;; :create :convert-widget :format :value-create :offset :extra-offset |
64 |
;;; :tag :doc :from :to :args :value :action |
;; :tag :doc :from :to :args :value :action |
65 |
;;; :value-set :value-delete :match :parent :delete :menu-tag-get |
;; :value-set :value-delete :match :parent :delete :menu-tag-get |
66 |
;;; :value-get :choice :void :menu-tag :on :off :on-type :off-type |
;; :value-get :choice :void :menu-tag :on :off :on-type :off-type |
67 |
;;; :notify :entry-format :button :children :buttons :insert-before |
;; :notify :entry-format :button :children :buttons :insert-before |
68 |
;;; :delete-at :format-handler :widget :value-pos :value-to-internal |
;; :delete-at :format-handler :widget :value-pos :value-to-internal |
69 |
;;; :indent :size :value-to-external :validate :error :directory |
;; :indent :size :value-to-external :validate :error :directory |
70 |
;;; :must-match :type-error :value-inline :inline :match-inline :greedy |
;; :must-match :type-error :value-inline :inline :match-inline :greedy |
71 |
;;; :button-face-get :button-face :value-face :keymap :entry-from |
;; :button-face-get :button-face :value-face :keymap :entry-from |
72 |
;;; :entry-to :help-echo :documentation-property :tab-order) |
;; :entry-to :help-echo :documentation-property :tab-order) |
73 |
|
|
74 |
(defun define-widget (name class doc &rest args) |
(defun define-widget (name class doc &rest args) |
75 |
"Define a new widget type named NAME from CLASS. |
"Define a new widget type named NAME from CLASS. |
85 |
* (apply 'widget-create CLASS ARGS) |
* (apply 'widget-create CLASS ARGS) |
86 |
|
|
87 |
The third argument DOC is a documentation string for the widget." |
The third argument DOC is a documentation string for the widget." |
88 |
|
(declare (doc-string 3)) |
89 |
(put name 'widget-type (cons class args)) |
(put name 'widget-type (cons class args)) |
90 |
(put name 'widget-documentation doc) |
(put name 'widget-documentation doc) |
91 |
name) |
name) |
97 |
|
|
98 |
(provide 'widget) |
(provide 'widget) |
99 |
|
|
100 |
;;; arch-tag: 932c71a3-9aeb-4827-a293-8b88b26d5c58 |
;; arch-tag: 932c71a3-9aeb-4827-a293-8b88b26d5c58 |
101 |
;;; widget.el ends here |
;;; widget.el ends here |