<commit_before>(in-package :clim-demo)

(defparameter *icons-directory* (asdf::system-relative-pathname :mcclim #p"Extensions/icons/"))

(define-application-frame extended-push-button-test ()
  ()
  (:panes
   (accept-button :push-button
                  :icon (make-pattern-from-bitmap-file
                         (merge-pathnames *icons-directory* #p"dialog-apply.xpm")
                         :format :xpm :port nil)
                  :icon-position :left
                  :label "Accept"
                  :x-spacing 5
                  :y-spacing 5)
   (cancel-button :push-button
                  :icon (make-pattern-from-bitmap-file
                         (merge-pathnames *icons-directory* #p"dialog-cancel-3.xpm")
                         :format :xpm :port nil)
                  :icon-position :right
                  :label "Cancel"
                  :x-spacing 5
                  :y-spacing 5))
  (:layouts
   (default
       (vertically ()
         accept-button
         cancel-button))))

(defun run-extended-push-button-test ()
  (run-frame-top-level
   (make-application-frame 'extended-push-button-test)))                   <commit_msg>mcclim: Accept and cancel button making functions<commit_after>(in-package :clim-demo)

(defparameter *icons-directory* (asdf::system-relative-pathname :mcclim #p"Extensions/icons/"))

(defun make-accept-button (&rest args)
  (with-look-and-feel-realization ((frame-manager *application-frame*) *application-frame*)
    (apply #'make-pane 'push-button
           (concatenate 'cons args
                        (list :icon (make-pattern-from-bitmap-file
                                     (merge-pathnames *icons-directory* #p"dialog-apply.xpm")
                                     :format :xpm :port nil))))))

(defun make-cancel-button (&rest args)
  (with-look-and-feel-realization ((frame-manager *application-frame*) *application-frame*)
    (apply #'make-pane 'push-button
           (concatenate 'cons args
                        (list :icon (make-pattern-from-bitmap-file
                                     (merge-pathnames *icons-directory* #p"dialog-cancel-3.xpm")
                                     :format :xpm :port nil))))))


(define-application-frame extended-push-button-test ()
  ()
  (:panes
   (accept-button (make-accept-button
                   :icon-position :left
                   :label "Accept"
                   :x-spacing 5
                   :y-spacing 5))
   (cancel-button (make-cancel-button
                   :label "Cancel"
                   :x-spacing 5
                   :y-spacing 5)))
  (:layouts
   (default
       (vertically ()
         accept-button
         cancel-button))))

(defun run-extended-push-button-test ()
  (run-frame-top-level
   (make-application-frame 'extended-push-button-test)))                   
{'fraction_non_alphanumeric': 0.12755461592670894, 'fraction_numerical': 0.0035236081747709656, 'mean_word_length': 1.6632270168855534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4725130', 'n_tokens_mistral': 836, 'n_tokens_neox': 783, 'n_words': 150}