I’m experimenting with McClim and CLIM.
Right now, I’m trying to insert a title pane into an application frame. I’m using the “Mini-CAD” example in figure 20 of the CommonLisp Interface Manager 2.0 User's Guide - 30 Jul 2004 When I use the :display-string initialization argument for the title pane, I get an error: “Invalid initialization argument :DISPLAY-STRING in call for class #<STANDARD-CLASS CLIM-CLX::CLX-1255-TITLE-PANE>.”
I have found that using the :display-function results in a similar error.
Can anyone help out with this?
Thanks, Oscar Chappel
Oscar Chappel oachappel@yahoo.com wrote:
I’m experimenting with McClim and CLIM.
Right now, I’m trying to insert a title pane into an application frame. I’m using the “Mini-CAD” example in figure 20 of the CommonLisp Interface Manager 2.0 User's Guide - 30 Jul 2004 When I use the :display-string initialization argument for the title pane, I get an error: “Invalid initialization argument :DISPLAY-STRING in call for class #<STANDARD-CLASS CLIM-CLX::CLX-1255-TITLE-PANE>.”
I have found that using the :display-function results in a similar error.
Can anyone help out with this?
I have the following patch in my tree, sent it to this list a long time ago but it didn't get committed:
diff --git a/panes.lisp b/panes.lisp index e26b0dc..7519418 100644 --- a/panes.lisp +++ b/panes.lisp @@ -2741,11 +2741,22 @@ to computed distance to scroll in response to mouse wheel events.")) ;;; TITLE PANE
(defclass title-pane (clim-stream-pane) - () + ((display-string :initarg :display-string + :accessor display-string)) (:default-initargs :display-time t :scroll-bars nil :display-function 'display-title))
+(defmethod display-title (frame (pane title-pane)) + (declare (ignore frame)) + (let ((a (text-style-ascent (pane-text-style pane) pane)) + (tw (text-size pane (display-string pane)))) + (with-bounding-rectangle* (x1 y1 x2 y2) (sheet-region pane) + (multiple-value-bind (tx ty) + (values (- (/ (- x2 x1) 2) (/ tw 2)) + (+ y1 2 a)) + (draw-text* pane (display-string pane) tx ty))))) + ;;; Pointer Documentation Pane
(defparameter *default-pointer-documentation-background* +black+)
Hey,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Saturday, 3 October 2020 15:39, Robert Swindells rjs@fdy2.co.uk wrote:
Oscar Chappeloachappel@yahoo.com wrote:
I’m experimenting with McClim and CLIM. Right now, I’m trying to insert a title pane into an application frame. I’m using the “Mini-CAD” example in figure 20 of the CommonLisp Interface Manager 2.0 User's Guide - 30 Jul 2004 When I use the :display-string initialization argument for the title pane, I get an error: “Invalid initialization argument :DISPLAY-STRING in call for class #<STANDARD-CLASS CLIM-CLX::CLX-1255-TITLE-PANE>.” I have found that using the :display-function results in a similar error. Can anyone help out with this?
I have the following patch in my tree, sent it to this list a long time ago but it didn't get committed:
The display function has been merged, only the initarg is not present (it is currently :title-string in the code). This initarg (and slot) are not mentioned in the CLIM II specification (which is binding to McCLIM project):
http://bauhh.dyndns.org:8000/clim-spec/29-4.html#_1683
Most notably we are not implementing CLIM 2.2.2 as specified by Franz, although we have adopted some extensions proposed in their user guide.
I've added this initarg for convenience, so you should be able to use :display-string as an initarg for the title pane.
Sorry Robert for not merging the patch, I must have forgot about it. Sending patches on mailing list is fine (I'll try to pick them up), but the preferred and more convenient way for us is to send pull requests on github. We try to peer review each pull request and since they are "there" unless explicitly closed, there is no threat that they will be mistakenly forgotten.
Best regards, Daniel
-- Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland TurtleWare - Daniel Kochmański | www.turtleware.eu
"Be the change that you wish to see in the world." - Mahatma Gandhi