2023-02-05 14:07:13 +01:00
|
|
|
(in-package :icons)
|
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +icon-dir+ "/data/icons/" :test #'string=)
|
2023-02-05 14:07:13 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +search+ "fmw_search" :test #'string=)
|
2023-02-05 14:07:13 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +back+ "fmw_back" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +go+ "fmw_go" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +open-tour+ "fmw_open_tour" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +refresh+ "fmw_refresh" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +up+ "fmw_uparrow" :test #'string=)
|
2023-02-18 13:02:56 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(a:define-constant +document-delete+ "fmw_document-delete" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-25 16:16:39 +01:00
|
|
|
(a:define-constant +document-add+ "fmw_document-add" :test #'string=)
|
|
|
|
|
2023-04-02 17:05:14 +02:00
|
|
|
(a:define-constant +document-accept+ "fmw_document-accept" :test #'string=)
|
|
|
|
|
2023-04-10 11:21:48 +02:00
|
|
|
(a:define-constant +document-edit+ "fmw_document-edit" :test #'string=)
|
2023-04-09 14:25:47 +02:00
|
|
|
|
2023-03-25 16:16:39 +01:00
|
|
|
(a:define-constant +folder+ "fmw_folder" :test #'string=)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-04-09 10:05:59 +02:00
|
|
|
(a:define-constant +star-yellow+ "fmw_star-yellow.png" :test #'string=)
|
|
|
|
|
|
|
|
(a:define-constant +star-blue+ "fmw_star-blue.png" :test #'string=)
|
|
|
|
|
2023-04-10 14:12:00 +02:00
|
|
|
(a:define-constant +arrow-up+ "fmw_arrow-up" :test #'string=)
|
|
|
|
|
|
|
|
(a:define-constant +arrow-down+ "fmw_arrow-down" :test #'string=)
|
|
|
|
|
2023-04-10 18:37:27 +02:00
|
|
|
(a:define-constant +cross+ "fmw_cross" :test #'string=)
|
|
|
|
|
2023-04-13 15:03:57 +02:00
|
|
|
(a:define-constant +bus-go+ "fmw_bus-go" :test #'string=)
|
|
|
|
|
2023-04-14 15:09:38 +02:00
|
|
|
(a:define-constant +dice+ "fmw_dice" :test #'string=)
|
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(defparameter *search* nil)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(defparameter *back* nil)
|
2023-02-05 14:57:31 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(defparameter *open-iri* nil)
|
2023-02-05 14:07:13 +01:00
|
|
|
|
2023-03-24 10:46:54 +01:00
|
|
|
(defparameter *open-tour* nil)
|
|
|
|
|
|
|
|
(defparameter *refresh* nil)
|
|
|
|
|
|
|
|
(defparameter *up* nil)
|
|
|
|
|
|
|
|
(defparameter *document-delete* nil)
|
|
|
|
|
|
|
|
(defparameter *document-add* nil)
|
2023-02-18 13:02:56 +01:00
|
|
|
|
2023-04-02 17:05:14 +02:00
|
|
|
(defparameter *document-accept* nil)
|
|
|
|
|
2023-04-09 14:25:47 +02:00
|
|
|
(defparameter *document-edit* nil)
|
|
|
|
|
2023-03-25 16:16:39 +01:00
|
|
|
(defparameter *folder* nil)
|
|
|
|
|
2023-04-09 10:05:59 +02:00
|
|
|
(defparameter *star-yellow* nil)
|
|
|
|
|
|
|
|
(defparameter *star-blue* nil)
|
|
|
|
|
2023-04-10 14:12:00 +02:00
|
|
|
(defparameter *arrow-up* nil)
|
|
|
|
|
|
|
|
(defparameter *arrow-down* nil)
|
|
|
|
|
2023-04-10 18:37:27 +02:00
|
|
|
(defparameter *cross* nil)
|
|
|
|
|
2023-04-13 15:03:57 +02:00
|
|
|
(defparameter *bus-go* nil)
|
|
|
|
|
2023-04-14 15:09:38 +02:00
|
|
|
(defparameter *dice* nil)
|
|
|
|
|
2023-02-05 14:07:13 +01:00
|
|
|
(defun load-icon (filename)
|
|
|
|
(let ((path (if (not (re:scan "(?i)png$" filename))
|
2023-02-08 13:02:26 +01:00
|
|
|
(res:get-data-file (fs:cat-parent-dir +icon-dir+
|
2023-02-05 14:41:03 +01:00
|
|
|
(strcat filename ".png")))
|
2023-02-08 13:02:26 +01:00
|
|
|
(res:get-data-file (fs:cat-parent-dir +icon-dir+ filename)))))
|
2023-02-05 14:07:13 +01:00
|
|
|
(with-open-file (stream path :element-type '(unsigned-byte 8))
|
|
|
|
(let ((data (gui-utils:read-into-array stream (file-length stream))))
|
|
|
|
(gui:make-image data)))))
|
|
|
|
|
|
|
|
(defun load-icons ()
|
2023-03-24 10:46:54 +01:00
|
|
|
(setf *search* (load-icon +search+))
|
|
|
|
(setf *back* (load-icon +back+))
|
|
|
|
(setf *open-iri* (load-icon +go+))
|
|
|
|
(setf *open-tour* (load-icon +open-tour+))
|
|
|
|
(setf *refresh* (load-icon +refresh+))
|
|
|
|
(setf *up* (load-icon +up+))
|
|
|
|
(setf *document-delete* (load-icon +document-delete+))
|
2023-03-25 16:16:39 +01:00
|
|
|
(setf *document-add* (load-icon +document-add+))
|
2023-04-02 17:05:14 +02:00
|
|
|
(setf *document-accept* (load-icon +document-accept+))
|
2023-04-09 14:25:47 +02:00
|
|
|
(setf *document-edit* (load-icon +document-edit+))
|
2023-04-09 10:05:59 +02:00
|
|
|
(setf *folder* (load-icon +folder+))
|
|
|
|
(setf *star-yellow* (load-icon +star-yellow+))
|
2023-04-10 14:12:00 +02:00
|
|
|
(setf *star-blue* (load-icon +star-blue+))
|
|
|
|
(setf *arrow-up* (load-icon +arrow-up+))
|
2023-04-10 18:37:27 +02:00
|
|
|
(setf *arrow-down* (load-icon +arrow-down+))
|
2023-04-13 15:03:57 +02:00
|
|
|
(setf *cross* (load-icon +cross+))
|
2023-04-14 15:09:38 +02:00
|
|
|
(setf *bus-go* (load-icon +bus-go+))
|
|
|
|
(setf *dice* (load-icon +dice+)))
|