From rjs at fdy2.demon.co.uk Sun Oct 4 20:24:40 2009 From: rjs at fdy2.demon.co.uk (Robert Swindells) Date: Sun, 4 Oct 2009 21:24:40 +0100 (BST) Subject: [mcclim-devel] Title panes Message-ID: <20091004202440.F293629F@fdy2.demon.co.uk> There doesn't seem to be a display-title method for the title-pane class, is this deliberate ? The examples in the Franz CLIM User Guide imply to me that you should be able to use this pane type without needing to supply a display-function for it. Robert Swindells From strandh at labri.fr Mon Oct 5 05:00:37 2009 From: strandh at labri.fr (Robert Strandh) Date: Mon, 5 Oct 2009 07:00:37 +0200 Subject: [mcclim-devel] Title panes In-Reply-To: <20091004202440.F293629F@fdy2.demon.co.uk> References: <20091004202440.F293629F@fdy2.demon.co.uk> Message-ID: <19145.32117.326724.44347@serveur5.labri.fr> Hello, Robert Swindells writes: > > There doesn't seem to be a display-title method for the title-pane > class, is this deliberate ? I can only guess. The spec says very little about the title pane. It doesn't even mention any :initarg or a slot that can be used to give a title. It does mention the name of the display function, but doesn't say anything else about it. That's probably the reason nobody implemented it. > The examples in the Franz CLIM User Guide imply to me that you should > be able to use this pane type without needing to supply a > display-function for it. It should not be very hard to do this. If you can give me some examples of how to use it and what is supposed to happen when the title pane is displayed, or better yet, some code, I'll be happy to put it in. Regards, -- Robert Strandh --------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. --------------------------------------------------------------------- From joswig at lisp.de Mon Oct 5 08:36:44 2009 From: joswig at lisp.de (Rainer Joswig) Date: Mon, 5 Oct 2009 10:36:44 +0200 Subject: [mcclim-devel] Title panes In-Reply-To: <19145.32117.326724.44347@serveur5.labri.fr> References: <20091004202440.F293629F@fdy2.demon.co.uk> <19145.32117.326724.44347@serveur5.labri.fr> Message-ID: Am 05.10.2009 um 07:00 schrieb Robert Strandh: > Hello, > > Robert Swindells writes: >> >> There doesn't seem to be a display-title method for the title-pane >> class, is this deliberate ? > > I can only guess. The spec says very little about the title pane. It > doesn't even mention any :initarg or a slot that can be used to give a > title. It does mention the name of the display function, but doesn't > say anything else about it. That's probably the reason nobody > implemented it. > >> The examples in the Franz CLIM User Guide imply to me that you should >> be able to use this pane type without needing to supply a >> display-function for it. > > It should not be very hard to do this. If you can give me some > examples of how to use it and what is supposed to happen when the > title pane is displayed, or better yet, some code, I'll be happy to > put it in. > > Regards, > -- > Robert Strandh CLIM:DEFINE-APPLICATION-FRAME allows to specify a :title pane. By default it displays the frame's pretty name. A pane option is :display- string string, which defines the string to display. So :display-string would be an :initarg to the title-pane class. Generally it is a pane with the title displayed in a large font. No scroll bars, grows horizontally, height is computed, no display after command. That's all. It is a relict from older window systems (like the one on the Lisp Machine), which usually have no title bar - where the application window then has a separate pane for the title. If your application's window has a title bar (usually), there is usually no need to display the title pane in an application window. Regards, Rainer Joswig From rjs at fdy2.demon.co.uk Mon Oct 5 11:55:29 2009 From: rjs at fdy2.demon.co.uk (Robert Swindells) Date: Mon, 5 Oct 2009 12:55:29 +0100 (BST) Subject: [mcclim-devel] Title panes In-Reply-To: (message from Rainer Joswig on Mon, 5 Oct 2009 10:36:44 +0200) References: <20091004202440.F293629F@fdy2.demon.co.uk> <19145.32117.326724.44347@serveur5.labri.fr> Message-ID: <20091005115529.82B0029F@fdy2.demon.co.uk> Rainer Joswig wrote: >Am 05.10.2009 um 07:00 schrieb Robert Strandh: > > Hello, > > Robert Swindells writes: >> >> There doesn't seem to be a display-title method for the title-pane >> class, is this deliberate ? > > I can only guess. The spec says very little about the title pane. It > doesn't even mention any :initarg or a slot that can be used to give a > title. It does mention the name of the display function, but doesn't > say anything else about it. That's probably the reason nobody > implemented it. > >> The examples in the Franz CLIM User Guide imply to me that you should >> be able to use this pane type without needing to supply a >> display-function for it. > > It should not be very hard to do this. If you can give me some > examples of how to use it and what is supposed to happen when the > title pane is displayed, or better yet, some code, I'll be happy to > put it in. > > Regards, > -- > Robert Strandh >CLIM:DEFINE-APPLICATION-FRAME allows to specify a :title pane. By >default it displays the frame's pretty name. A pane option is :display- >string string, which defines the string to display. So :display-string >would be an :initarg to the title-pane class. There is an example on p193 of the CLIM User Guide that uses this pane option. >Generally it is a pane with the title displayed in a large font. No >scroll bars, grows horizontally, height is computed, no display after >command. That's all. It is a relict from older window systems (like >the one on the Lisp Machine), which usually have no title bar - where >the application window then has a separate pane for the title. If your >application's window has a title bar (usually), there is usually no >need to display the title pane in an application window. I'm trying to get an existing application to work, it has a couple of large panes inside the application-frame each of which has a title frame at the top. For some reason display after command is set for the title panes. Robert Swindells From rjs at fdy2.demon.co.uk Tue Oct 6 23:27:42 2009 From: rjs at fdy2.demon.co.uk (Robert Swindells) Date: Wed, 7 Oct 2009 00:27:42 +0100 (BST) Subject: [mcclim-devel] Title panes In-Reply-To: <19145.32117.326724.44347@serveur5.labri.fr> (message from Robert Strandh on Mon, 5 Oct 2009 07:00:37 +0200) References: <20091004202440.F293629F@fdy2.demon.co.uk> <19145.32117.326724.44347@serveur5.labri.fr> Message-ID: <20091006232743.054462A0@fdy2.demon.co.uk> Robert Strandh wrote: >Robert Swindells writes: > > > > There doesn't seem to be a display-title method for the title-pane > > class, is this deliberate ? > >I can only guess. The spec says very little about the title pane. It >doesn't even mention any :initarg or a slot that can be used to give a >title. It does mention the name of the display function, but doesn't >say anything else about it. That's probably the reason nobody >implemented it. > > > The examples in the Franz CLIM User Guide imply to me that you should > > be able to use this pane type without needing to supply a > > display-function for it. > >It should not be very hard to do this. If you can give me some >examples of how to use it and what is supposed to happen when the >title pane is displayed, or better yet, some code, I'll be happy to >put it in. The following patch works well enough for me to see something: It might need a bounding box and the Franz example looks as if the text may need to be larger than the default size. Index: panes.lisp =================================================================== RCS file: /project/mcclim/cvsroot/mcclim/panes.lisp,v retrieving revision 1.197 diff -u -r1.197 panes.lisp --- panes.lisp 1 Aug 2009 22:11:06 -0000 1.197 +++ panes.lisp 6 Oct 2009 23:21:01 -0000 @@ -2741,11 +2741,22 @@ ;;; 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+) From kilian.sprotte at gmail.com Mon Oct 12 18:17:30 2009 From: kilian.sprotte at gmail.com (Kilian Sprotte) Date: Mon, 12 Oct 2009 20:17:30 +0200 Subject: [mcclim-devel] [PATCH] In display-exit-boxes present Cancel button as an abort-button. Message-ID: <87d44spjd1.fsf@gmail.com> Hello! I am attaching a small fix for the Cancel button in accepting-values dialogs. Currently, it behaves like the Ok button (instead of aborting a command, it will let it run). WITH-OUTPUT-AS-PRESENTATION was wrapped twice around the Cancel button, so that's what I cleaned up. Cheers, Kilian Sprotte -------------- next part -------------- A non-text attachment was scrubbed... Name: In-display-exit-boxes-present-Cancel-button-as-an-ab.patch Type: application/octet-stream Size: 775 bytes Desc: patch URL: From strandh at labri.fr Fri Oct 16 04:57:36 2009 From: strandh at labri.fr (Robert Strandh) Date: Fri, 16 Oct 2009 06:57:36 +0200 Subject: [mcclim-devel] [PATCH] In display-exit-boxes present Cancel button as an abort-button. In-Reply-To: <87d44spjd1.fsf@gmail.com> References: <87d44spjd1.fsf@gmail.com> Message-ID: <19159.64832.4317.511774@serveur5.labri.fr> Hello, Kilian Sprotte writes: > > I am attaching a small fix for the Cancel button in accepting-values > dialogs. Currently, it behaves like the Ok button (instead of aborting a > command, it will let it run). Patch applied! Thanks! -- Robert Strandh --------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. ---------------------------------------------------------------------