From pdenno at common-lisp.net Fri Mar 4 16:01:51 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:01:51 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: Directory change: public_html Message-ID: <20050304160151.9D79B88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv16454/public_html Log Message: Directory /project/cells-gtk/cvsroot/public_html added to the repository Date: Fri Mar 4 17:01:50 2005 Author: pdenno New directory public_html added From pdenno at common-lisp.net Fri Mar 4 16:06:14 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:06:14 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: CVSROOT/cvswrappers Message-ID: <20050304160614.5A6DA88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/CVSROOT In directory common-lisp.net:/tmp/cvs-serv16512/CVSROOT Modified Files: cvswrappers Log Message: Protect many more file types from cvs modification Date: Fri Mar 4 17:06:13 2005 Author: pdenno Index: CVSROOT/cvswrappers diff -u CVSROOT/cvswrappers:1.1 CVSROOT/cvswrappers:1.2 --- CVSROOT/cvswrappers:1.1 Thu Nov 18 17:35:36 2004 +++ CVSROOT/cvswrappers Fri Mar 4 17:06:13 2005 @@ -21,3 +21,34 @@ # and value is a single-quote delimited value. # For example: #*.gif -k 'b' +*.gif -k 'b' +*.pdf -k 'b' +*.ps -k 'b' +*.dvi -k 'b' +*.gif -k 'b' +*.png -k 'b' +*.jpg -k 'b' +*.tif -k 'b' +*.tiff -k 'b' +*.jpeg -k 'b' +*.tar -k 'b' +*.zip -k 'b' +*.zargo -k 'b' +*.gz -k 'b' +*.z -k 'b' +*.Z -k 'b' +*.bz2 -k 'b' +*.doc -k 'b' +*.ppt -k 'b' +*.xls -k 'b' +*.idd -k 'b' +*.exe -k 'b' +*.class -k 'b' +*.fasl -k 'b' +*.bin -k 'b' +*.mdl -k 'b' +*.vsd -k 'b' +*.dxl -k 'b' +*.ai0 -k 'b' +*.AI0 -k 'b' +*.fm -k 'b' From pdenno at common-lisp.net Fri Mar 4 16:10:12 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:10:12 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/cells-gtk10.jpg public_html/cells-gtk11.jpg public_html/cells-gtk12.jpg public_html/cells-gtk13.jpg public_html/cells-gtk14.jpg public_html/cells-gtk15.jpg public_html/cells-gtk17.jpg public_html/cells-gtk18.jpg public_html/cells-gtk20.jpg public_html/cells-gtk21.jpg public_html/cells-gtk22.jpg public_html/cells-gtk23.jpg public_html/cells-gtk25.jpg public_html/cells-gtk26.jpg public_html/dialogs.png public_html/display.png public_html/faq.html public_html/index.html public_html/ion.png public_html/menu.png public_html/project-name public_html/screenshots.html public_html/style.css public_html/treebox.png Message-ID: <20050304161012.96B4F88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv16548/public_html Added Files: cells-gtk10.jpg cells-gtk11.jpg cells-gtk12.jpg cells-gtk13.jpg cells-gtk14.jpg cells-gtk15.jpg cells-gtk17.jpg cells-gtk18.jpg cells-gtk20.jpg cells-gtk21.jpg cells-gtk22.jpg cells-gtk23.jpg cells-gtk25.jpg cells-gtk26.jpg dialogs.png display.png faq.html index.html ion.png menu.png project-name screenshots.html style.css treebox.png Log Message: Newly under CVS management Date: Fri Mar 4 17:09:51 2005 Author: pdenno From pdenno at common-lisp.net Fri Mar 4 16:47:15 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:47:15 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/style.css Message-ID: <20050304164715.E77D688678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv19199/public_html Modified Files: style.css Log Message: New definition bodyTextNoSideBox Date: Fri Mar 4 17:47:15 2005 Author: pdenno Index: public_html/style.css diff -u public_html/style.css:1.1 public_html/style.css:1.2 --- public_html/style.css:1.1 Fri Mar 4 17:09:51 2005 +++ public_html/style.css Fri Mar 4 17:47:15 2005 @@ -76,6 +76,12 @@ padding: 0 1em 1ex 1em; } +#bodyTextWideNoSideBox { + line-height: 1.5em; + margin: 10mm 2em 0 2em; + padding: 0 1em 1ex 1em; +} + #bodyText p { padding-bottom: 1ex; } From pdenno at common-lisp.net Fri Mar 4 16:48:13 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:48:13 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/screenshots.html Message-ID: <20050304164813.CDC5F88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv19226/public_html Modified Files: screenshots.html Log Message: Use of bodyTextWideNoSideBox Date: Fri Mar 4 17:48:12 2005 Author: pdenno Index: public_html/screenshots.html diff -u public_html/screenshots.html:1.1 public_html/screenshots.html:1.2 --- public_html/screenshots.html:1.1 Fri Mar 4 17:09:51 2005 +++ public_html/screenshots.html Fri Mar 4 17:48:12 2005 @@ -20,7 +20,7 @@ -
+
From pdenno at common-lisp.net Fri Mar 4 16:48:44 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:48:44 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/faq.html Message-ID: <20050304164844.2211E88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv19246/public_html Modified Files: faq.html Log Message: Use of bodyTextWideNoSideBox Date: Fri Mar 4 17:48:43 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.1 public_html/faq.html:1.2 --- public_html/faq.html:1.1 Fri Mar 4 17:09:51 2005 +++ public_html/faq.html Fri Mar 4 17:48:43 2005 @@ -21,7 +21,7 @@
-
+
@@ -192,7 +192,7 @@
Peter Denno
-Last modified: Fri Mar 4 11:00:44 EST 2005 +Last modified: Fri Mar 4 11:44:32 EST 2005
From pdenno at common-lisp.net Fri Mar 4 16:50:12 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Fri, 4 Mar 2005 17:50:12 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/index.html Message-ID: <20050304165012.4F85F88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv19271/public_html Modified Files: index.html Log Message: Use of bodyTextWide (since page doesn't have a right sidebox). Date: Fri Mar 4 17:50:12 2005 Author: pdenno Index: public_html/index.html diff -u public_html/index.html:1.1 public_html/index.html:1.2 --- public_html/index.html:1.1 Fri Mar 4 17:09:51 2005 +++ public_html/index.html Fri Mar 4 17:50:11 2005 @@ -31,7 +31,7 @@ Mailing List
-
+
@@ -121,7 +121,7 @@
Peter Denno
-Last modified: Fri Mar 4 11:08:41 EST 2005 +Last modified: Fri Mar 4 11:41:06 EST 2005 Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv19300/public_html Modified Files: faq.html Log Message: typo Date: Fri Mar 4 17:54:09 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.2 public_html/faq.html:1.3 --- public_html/faq.html:1.2 Fri Mar 4 17:48:43 2005 +++ public_html/faq.html Fri Mar 4 17:54:09 2005 @@ -39,7 +39,7 @@
  • Why do I need :owner here? It looks like c? would bind self to the mk-whatever enclosing the c?
  • How do I do xyz?
  • -
  • What is the cells error saying "[blah, blah] unless initialzed by inputp" about? +
  • What is the cells error saying "[blah, blah] unless initialized by inputp" about? There is no "inputp" in cells.
  • @@ -184,7 +184,7 @@ mail list. The GTK documentation is also very helpful... And if it comes to it, adding the foreign function binding from the GTK API isn't hard either.

    -Q: What is the cells error saying "[blah, blah] unless initialzed by inputp" about? +Q: What is the cells error saying "[blah, blah] unless initialized by inputp" about? There is no "inputp" in cells.

    A: kenny ? @@ -192,7 +192,7 @@

    Peter Denno
    -Last modified: Fri Mar 4 11:44:32 EST 2005 +Last modified: Fri Mar 4 11:53:24 EST 2005
    From pdenno at common-lisp.net Sat Mar 5 01:08:16 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sat, 5 Mar 2005 02:08:16 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/faq.html Message-ID: <20050305010816.D000788678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv15959/public_html Modified Files: faq.html Log Message: Reference cells-gtk primer. fixed typos Date: Sat Mar 5 02:08:15 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.3 public_html/faq.html:1.4 --- public_html/faq.html:1.3 Fri Mar 4 17:54:09 2005 +++ public_html/faq.html Sat Mar 5 02:08:15 2005 @@ -131,9 +131,13 @@ structure to get the vbox, so we wrote a 3 line c program to get it. (And other 3 line programs to do similar things).

    - You don't need libCellsGtk.so to run the demo, but you will to add an entry - text widget to a dialog, or add menu items using populate-popup (see GTK textview). - (As of this writing, those are the only situations). To use libCellsGtk.so you need + You don't need libcellsgtk.so to run the demo, but you will to: +

    + (As of this writing, those are the only situations). To use libcellsgtk.so you need to compile it. And that requires having access to the C header files corresponding the libgtk.so you are using. @@ -159,8 +163,7 @@

    A: :popup isn't :kids. So you need another way to get into the kids hierarchy of the parent. (upper self menu) gets us to the menu and (owner (upper self menu)) jumps into the kids -hierarchy, since c? is always binds self to the containing mk-whatever object. (So the -outer c? does that here. +hierarchy, since c? always binds self to the containing mk-whatever object. (the outer c? does that here).

    @@ -181,18 +184,20 @@
     Q: How do I do xyz?

    A: If xyz concerns Cells-GTK or the use of Cells in Cells-GTK, ask your question on the project - mail list. The GTK documentation is also very helpful... And if it + mailing list. The GTK documentation is also very helpful... And if it comes to it, adding the foreign function binding from the GTK API isn't hard either.

    -Q: What is the cells error saying "[blah, blah] unless initialized by inputp" about? - There is no "inputp" in cells.

    - A: kenny ? +Q: What is this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf + unless initialized as inputp."

    + A: This error is signalled because you tried to setf an invariant slot. + Read the cells-gtk primer for more + information.


    Peter Denno
    -Last modified: Fri Mar 4 11:53:24 EST 2005 +Last modified: Fri Mar 4 18:51:51 EST 2005
    From pdenno at common-lisp.net Sat Mar 5 01:09:12 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sat, 5 Mar 2005 02:09:12 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/index.html Message-ID: <20050305010912.B405C88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv15983/public_html Modified Files: index.html Log Message: Reference cells-gtk primer in sidebox Date: Sat Mar 5 02:09:11 2005 Author: pdenno Index: public_html/index.html diff -u public_html/index.html:1.2 public_html/index.html:1.3 --- public_html/index.html:1.2 Fri Mar 4 17:50:11 2005 +++ public_html/index.html Sat Mar 5 02:09:11 2005 @@ -28,6 +28,7 @@ Screenshots Download / CVS FAQ + cells-gtk Primer Mailing List @@ -121,7 +122,7 @@
    Peter Denno
    -Last modified: Fri Mar 4 11:41:06 EST 2005 +Last modified: Fri Mar 4 20:00:10 EST 2005 Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv16010/public_html Added Files: cgtk-primer.html Log Message: New file, start of documentation. Date: Sat Mar 5 02:10:05 2005 Author: pdenno From pdenno at common-lisp.net Sat Mar 5 01:17:02 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sat, 5 Mar 2005 02:17:02 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/faq.html Message-ID: <20050305011702.B9B2B88678@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv16819/public_html Modified Files: faq.html Log Message: corrected q11 Date: Sat Mar 5 02:17:01 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.4 public_html/faq.html:1.5 --- public_html/faq.html:1.4 Sat Mar 5 02:08:15 2005 +++ public_html/faq.html Sat Mar 5 02:17:01 2005 @@ -39,8 +39,8 @@
  • Why do I need :owner here? It looks like c? would bind self to the mk-whatever enclosing the c?
  • How do I do xyz?
  • -
  • What is the cells error saying "[blah, blah] unless initialized by inputp" about? - There is no "inputp" in cells.
  • +
  • Q: What does this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf + unless initialized as inputp.
  • @@ -187,7 +187,7 @@ mailing list. The GTK documentation is also very helpful... And if it comes to it, adding the foreign function binding from the GTK API isn't hard either.

    -Q: What is this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf +Q: What does this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf unless initialized as inputp."

    A: This error is signalled because you tried to setf an invariant slot. Read the cells-gtk primer for more @@ -197,7 +197,7 @@

    Peter Denno
    -Last modified: Fri Mar 4 18:51:51 EST 2005 +Last modified: Fri Mar 4 20:15:41 EST 2005 From pdenno at common-lisp.net Sun Mar 6 16:47:57 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:47:57 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/cgtk-primer.html Message-ID: <20050306164757.5DE938866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv21801/public_html Modified Files: cgtk-primer.html Log Message: new paragraph Date: Sun Mar 6 17:47:52 2005 Author: pdenno Index: public_html/cgtk-primer.html diff -u public_html/cgtk-primer.html:1.1 public_html/cgtk-primer.html:1.2 --- public_html/cgtk-primer.html:1.1 Sat Mar 5 02:10:05 2005 +++ public_html/cgtk-primer.html Sun Mar 6 17:47:50 2005 @@ -25,9 +25,10 @@

    Introduction

    -Here we will discuss the most important parts of the cell-gtk GTK binding, and the -the cells code. As of this writing, we have begun the discussion of cells. -This minimal introduction might be sufficient to get you started. We'll see. +Here we will discuss the most important parts of the cell-gtk GTK binding, and how +cells can be used in defining cells-gtk GUIs. As of this writing, we have begun +the discussion of cells. This minimal introduction might be sufficient to get you +started. We'll see.

    Cells slots

    @@ -159,7 +160,7 @@
    Peter Denno
    -Last modified: Fri Mar 4 20:04:40 EST 2005 +Last modified: Fri Mar 4 20:21:21 EST 2005 From pdenno at common-lisp.net Sun Mar 6 16:48:42 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:48:42 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/faq.html Message-ID: <20050306164842.3EA438866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv21942/public_html Modified Files: faq.html Log Message: question 12 added Date: Sun Mar 6 17:48:28 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.5 public_html/faq.html:1.6 --- public_html/faq.html:1.5 Sat Mar 5 02:17:01 2005 +++ public_html/faq.html Sun Mar 6 17:48:27 2005 @@ -41,6 +41,7 @@
  • How do I do xyz?
  • Q: What does this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf unless initialized as inputp.
  • +
  • Q: Changing a cell value causes dependencies to fire, but what is considered a change?"
  • @@ -190,14 +191,21 @@ Q: What does this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf unless initialized as inputp."

    A: This error is signalled because you tried to setf an invariant slot. + 'inputp' refers to c-in which should have been used to initialize the slot. Read the cells-gtk primer for more information. +

    +Q: Changing a cell value causes dependencies to fire, but what is considered a change?"

    + A: As you are suggesting, setting a slot to an "equivalent" object should not cause its + dependencies to fire again (in order to save substantial useless recalculations). So how is + "equivalence" defined? EQL is used unless overridden by providing a function of two arguments + to :unchanged-if in the slot definition of the defmodel.


    Peter Denno
    -Last modified: Fri Mar 4 20:15:41 EST 2005 +Last modified: Sat Mar 5 13:11:28 EST 2005 From pdenno at common-lisp.net Sun Mar 6 16:50:05 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:50:05 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/FAQ.txt Message-ID: <20050306165005.5D1578866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root In directory common-lisp.net:/tmp/cvs-serv22110/root Removed Files: FAQ.txt Log Message: Remove FAQ. Bad idea. I'll only keep the faq.html up-to-date Date: Sun Mar 6 17:50:04 2005 Author: pdenno From pdenno at common-lisp.net Sun Mar 6 16:53:21 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:53:21 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/INSTALL.TXT Message-ID: <20050306165321.9F5AA8866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root In directory common-lisp.net:/tmp/cvs-serv22133/root Modified Files: INSTALL.TXT Log Message: Note about not needing this if you are loading the tarball Date: Sun Mar 6 17:53:20 2005 Author: pdenno Index: root/INSTALL.TXT diff -u root/INSTALL.TXT:1.2 root/INSTALL.TXT:1.3 --- root/INSTALL.TXT:1.2 Thu Dec 16 17:36:25 2004 +++ root/INSTALL.TXT Sun Mar 6 17:53:19 2005 @@ -1,3 +1,8 @@ + + +You don't need to read this file if you are installing from a snapshot tarball. +This only concerns the situation where you get the pieces cells, hello-c, cells-gtk etc, individually. + ############################################################################################################# The notes below apply to the UFFI port of Cells-gtk done by Ken Tilton. (Actually I have forked UFFI and call it Hello-C, but the idea is the same: portable FFI.) From pdenno at common-lisp.net Sun Mar 6 16:54:07 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:54:07 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/config.lisp Message-ID: <20050306165407.B1DFE8866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root In directory common-lisp.net:/tmp/cvs-serv22156/root Modified Files: config.lisp Log Message: Note about not needing this is you are loading the tarbal Date: Sun Mar 6 17:54:04 2005 Author: pdenno Index: root/config.lisp diff -u root/config.lisp:1.3 root/config.lisp:1.4 --- root/config.lisp:1.3 Sun Feb 27 04:23:19 2005 +++ root/config.lisp Sun Mar 6 17:54:00 2005 @@ -6,8 +6,10 @@ #| + + ----> THIS ISN'T USED IF YOU ARE LOADING A SNAPSHOT TARBALL. <----- + Tell ASDF where to find everything. - This isn't used if you are loading a snapshot tarball. |# From pdenno at common-lisp.net Sun Mar 6 16:54:49 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:54:49 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/load.lisp Message-ID: <20050306165449.4C0C98866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root In directory common-lisp.net:/tmp/cvs-serv22177/root Modified Files: load.lisp Log Message: note about not needing this if you are loading the tarball. Date: Sun Mar 6 17:54:48 2005 Author: pdenno Index: root/load.lisp diff -u root/load.lisp:1.6 root/load.lisp:1.7 --- root/load.lisp:1.6 Sat Feb 26 23:46:40 2005 +++ root/load.lisp Sun Mar 6 17:54:47 2005 @@ -2,6 +2,8 @@ #| Step 1: Get ASDF into the game. + ---> This file isn't used if you are loading the snapshot tarball. <---- + Obviously not necessary if you always have that loaded. Note that you will have to adjust the pathname to point to where you have ASDF.lisp. From pdenno at common-lisp.net Sun Mar 6 16:58:52 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 17:58:52 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/cells-gtk/textview.lisp Message-ID: <20050306165852.A589C8866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root/cells-gtk In directory common-lisp.net:/tmp/cvs-serv22226/root/cells-gtk Modified Files: textview.lisp Log Message: New stuff for gtk-text-buffer tags and marks. Requires libcellsgtk.so Date: Sun Mar 6 17:58:51 2005 Author: pdenno Index: root/cells-gtk/textview.lisp diff -u root/cells-gtk/textview.lisp:1.3 root/cells-gtk/textview.lisp:1.4 --- root/cells-gtk/textview.lisp:1.3 Sat Feb 26 23:29:23 2005 +++ root/cells-gtk/textview.lisp Sun Mar 6 17:58:51 2005 @@ -19,15 +19,21 @@ (in-package :cgtk) (def-object text-buffer () - ((text :accessor text :initarg :text :initform nil)) - () + ((text :accessor text :initarg :text :initform nil) + (tag-table :accessor tag-table :initarg :tag-table :initform (c-in nil)) + (markup :cell nil :accessor markup :initform nil)) () + (modified-changed) :new-args (c? (list c-null))) (def-c-output text ((self text-buffer)) - (gtk-text-buffer-set-text (id self) - (or new-value "") - -1)) + (let ((buf (id self))) + (gtk-text-buffer-set-text buf (or new-value "") -1) + ;; Typically if you are interested in watching for modifications, + ;; you don't want to see ones such as this, where it is done programmatically. + ;; Thus we clear the modified flag. Your on-modified method can check for this. + ;; It can even reset it, if you don't like this arrangement. + (gtk-text-buffer-set-modified buf nil))) (def-widget text-view () ((buffer :accessor buffer :initarg :buffer :initform (mk-text-buffer)) @@ -95,8 +101,49 @@ (setf (old-popups text-view) accum) (mapc #'(lambda (i) (to-be i) (gtk-menu-shell-prepend popup-menu (id i))) tops)))))) +(defmacro with-text-iters (vars &body body) + `(let (,@(loop for var in vars collect `(,var (gtk-adds-text-iter-new)))) + (unwind-protect + (progn , at body) + ,@(loop for var in vars collect `(gtk-text-iter-free ,var))))) + +(defun text-buffer-get-text (buffer &optional (start 0) stop) + "Get text directly from buffer. Unlike the cell accessor, this sees edits." + (let* ((buf (id buffer)) + (end (or stop (gtk-text-buffer-get-char-count buf)))) + (with-text-iters (s-iter e-iter) + (gtk-text-buffer-get-iter-at-offset buf s-iter start) + (gtk-text-buffer-get-iter-at-offset buf e-iter end) + (gtk-text-buffer-get-text buf s-iter e-iter nil)))) + +(defun text-buffer-insert-text (buffer start text) + (let ((buf (id buffer))) + (with-text-iters (s-iter) + (gtk-text-buffer-get-iter-at-offset buf s-iter start) + (gtk-text-buffer-insert buf s-iter text (length text)) + (gtk-text-buffer-set-modified buf t)))) + +(defun text-buffer-delete-text (buffer start end) + (let ((buf (id buffer))) + (with-text-iters (s-iter e-iter) + (gtk-text-buffer-get-iter-at-offset buf s-iter start) + (gtk-text-buffer-get-iter-at-offset buf e-iter end) + (gtk-text-buffer-delete buf s-iter e-iter)))) + +;;; The next two can be used to check and clear the the modified flag. +;;; The event is registered when you use :on-modified-changed on a text-buffer. +;;; The def-c-output text ((text-buffer)) clears the flag so as to distinguish +;;; programmatic updates to the text from ones done by typing. +(defmethod text-buffer-modified-p ((buffer text-buffer)) + (gtk-text-buffer-get-modified (id buffer))) + +(defmethod (setf text-buffer-modified-p) (val (buffer text-buffer)) + (gtk-text-buffer-set-modified (id buffer) val)) + + (eval-when (:compile-toplevel :load-toplevel :execute) - (export '(def-populate-adds populate-adds))) + (export '(def-populate-adds populate-adds with-text-iters text-buffer-get-text + text-buffer-delete-text text-buffer-insert-text text-buffer-modified-p))) From pdenno at common-lisp.net Sun Mar 6 17:01:14 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 18:01:14 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/cells-gtk/widgets.lisp Message-ID: <20050306170114.CCD2D8866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root/cells-gtk In directory common-lisp.net:/tmp/cvs-serv22653/root/cells-gtk Modified Files: widgets.lisp Log Message: Andras Simon's patch to remove #- on a ff definition. Also handle signal modified-changed. text-buffer can now specify :on-modified-changed callback. Date: Sun Mar 6 18:01:09 2005 Author: pdenno Index: root/cells-gtk/widgets.lisp diff -u root/cells-gtk/widgets.lisp:1.11 root/cells-gtk/widgets.lisp:1.12 --- root/cells-gtk/widgets.lisp:1.11 Sat Feb 26 23:31:41 2005 +++ root/cells-gtk/widgets.lisp Sun Mar 6 18:01:09 2005 @@ -128,6 +128,7 @@ (def-gtk-event-handler selection-changed) (def-gtk-event-handler toggled) (def-gtk-event-handler delete-event) +(def-gtk-event-handler modified-changed) (defparameter *widget-callbacks* (list (cons 'clicked (ff-register-callable 'clicked-handler)) @@ -137,7 +138,8 @@ (cons 'day-selected (ff-register-callable 'day-selected-handler)) (cons 'selection-changed (ff-register-callable 'selection-changed-handler)) (cons 'toggled (ff-register-callable 'toggled-handler)) - (cons 'delete-event (ff-register-callable 'delete-event-handler)))) + (cons 'delete-event (ff-register-callable 'delete-event-handler)) + (cons 'modified-changed (ff-register-callable 'modified-changed-handler)))) (eval-when (:compile-toplevel :load-toplevel :execute) @@ -232,7 +234,6 @@ , at body 1)))) -#-cmu (ff-defun-callable :cdecl :int timeout-handler-callback ((data (* :int))) ;;(print (list :timeout-handler-callback data)) From pdenno at common-lisp.net Sun Mar 6 17:02:48 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 18:02:48 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/cells-gtk/test-gtk/test-textview.lisp Message-ID: <20050306170248.8ACD78866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root/cells-gtk/test-gtk In directory common-lisp.net:/tmp/cvs-serv22930/root/cells-gtk/test-gtk Modified Files: test-textview.lisp Log Message: Demonstrate text-buffer tags and markup (requires libcellsgtk.so) Date: Sun Mar 6 18:02:44 2005 Author: pdenno Index: root/cells-gtk/test-gtk/test-textview.lisp diff -u root/cells-gtk/test-gtk/test-textview.lisp:1.2 root/cells-gtk/test-gtk/test-textview.lisp:1.3 --- root/cells-gtk/test-gtk/test-textview.lisp:1.2 Sat Feb 26 23:20:19 2005 +++ root/cells-gtk/test-gtk/test-textview.lisp Sun Mar 6 18:02:44 2005 @@ -1,23 +1,82 @@ (in-package :test-gtk) +;;; The details of the tag-table and markup slots are, for the time being, +;;; not defined by cells-gtk. The demo give an idea how they might be used. + (defmodel test-textview (vbox) ((buffer :accessor buffer :initarg :buffer :initform (mk-text-buffer - :text (format nil "~{~a~%~}" (loop for i below 100 collect (format nil "Text view Line ~a" i)))))) + :text (format nil "~{~a~%~}" + (loop for i below 100 collect (format nil "Text view Line ~a" i))) + :on-modified-changed + (callback (w e d) + (show-message "Text buffer modified")) + :tag-table (c? (xtv-create-tag-table self))))) (:default-initargs :kids (list (mk-scrolled-window :kids (list (mk-text-view :buffer (c? (buffer (upper self test-textview))) - #+libcellsgtk :populate-popup - #+libcellsgtk - (c? - (def-populate-adds - (:menu-item :label "My menu item" - :owner self - :on-activate - (callback (w e d) - (show-message (format nil "My menu item says = ~A" - (owner self))))))))))))) + #+libcellsgtk :populate-popup + #+libcellsgtk + (c? + (def-populate-adds + (:menu-item :label "Mark something yellow" + :owner self + :on-activate + (callback (w e d) + (let ((buf (buffer (owner self)))) + (setf (markup buf) ; implementation idea... ;^) + (list + (make-instance 'color-tag :start 10 :end 20 + :name :yellow-background))) + (apply-markup (first (markup buf)) buf)))))))))))) + +(defmethod xtv-create-tag-table ((self text-buffer)) + (let ((ht (make-hash-table))) + (flet ((create-tag (name) + (setf (gethash name ht) + (gtk-text-buffer-create-tag + (cgtk::id self) + (string-downcase (symbol-name (gensym))) + (string-downcase (subseq (string name) (1+ (position #\- (string name))))) + (string-downcase (subseq (string name) 0 (position #\- (string name)))) + c-null)))) + (loop for name in '(:red-foreground :red-background :yellow-foreground :yellow-background) + do (create-tag name))) + ht)) + +;;; In a real application you might use an xml parser on marked up text +;;; by creating 'mark objects' like these. In the demo we just do it in a +;;; menu item cb. + +;;; We won't even use this one here, but marks are useful ;^) +(defclass mark () + ((type :initarg :type) + (pos :initarg :pos) + (len :initarg :len) + (c-ptr :accessor c-ptr :initform nil))) + +(defclass color-tag () + ((name :initarg :name) + (start :initarg :start) + (end :initarg :end))) + +(defmethod apply-markup ((tag color-tag) buffer) + (with-slots (start end name) tag + (assert (gethash name (tag-table buffer))) + (let ((buf (cgtk::id buffer))) + (with-text-iters (start-iter end-iter) + (gtk-text-buffer-get-iter-at-offset buf start-iter start) + (gtk-text-buffer-get-iter-at-offset buf end-iter end) + (gtk-text-buffer-apply-tag buf (gethash name (tag-table buffer)) start-iter end-iter))))) + +(defmethod apply-markup ((mark mark) buffer) + (with-slots (pos c-ptr) mark + (let ((buf (cgtk::id buffer))) + (with-text-iters (iter) + (gtk-text-buffer-get-iter-at-offset buf iter pos) + (setf c-ptr (gtk-text-buffer-create-mark buf (symbol-name (gensym)) iter t)))))) + From pdenno at common-lisp.net Sun Mar 6 17:04:09 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 18:04:09 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/gtk-ffi/gtk-adds.c Message-ID: <20050306170409.B92CA8866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root/gtk-ffi In directory common-lisp.net:/tmp/cvs-serv23123/root/gtk-ffi Modified Files: gtk-adds.c Log Message: routine to get text iters Date: Sun Mar 6 18:04:04 2005 Author: pdenno Index: root/gtk-ffi/gtk-adds.c diff -u root/gtk-ffi/gtk-adds.c:1.1 root/gtk-ffi/gtk-adds.c:1.2 --- root/gtk-ffi/gtk-adds.c:1.1 Sat Feb 26 23:18:24 2005 +++ root/gtk-ffi/gtk-adds.c Sun Mar 6 18:04:02 2005 @@ -21,3 +21,12 @@ return GTK_TEXT_VIEW(text_view)->popup_menu; } +/* C programmers allocate iters on the stack. We use this. + Free it with gtk-text-iter-free */ +GtkTextIter * +gtk_adds_text_iter_new () +{ + GtkTextIter example; + return gtk_text_iter_copy(&example); +} + From pdenno at common-lisp.net Sun Mar 6 17:05:48 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Sun, 6 Mar 2005 18:05:48 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: root/gtk-ffi/gtk-other.lisp Message-ID: <20050306170548.7AFC58866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/root/gtk-ffi In directory common-lisp.net:/tmp/cvs-serv23232/root/gtk-ffi Modified Files: gtk-other.lisp Log Message: Many new ff declarations for text-buffer and text-view. Date: Sun Mar 6 18:05:46 2005 Author: pdenno Index: root/gtk-ffi/gtk-other.lisp diff -u root/gtk-ffi/gtk-other.lisp:1.4 root/gtk-ffi/gtk-other.lisp:1.5 --- root/gtk-ffi/gtk-other.lisp:1.4 Sat Feb 26 23:42:29 2005 +++ root/gtk-ffi/gtk-other.lisp Sun Mar 6 18:05:44 2005 @@ -564,9 +564,68 @@ ;;text-buffer (gtk-text-buffer-new ((table c-pointer)) c-pointer) + (gtk-text-buffer-get-text ((buffer c-pointer) + (start c-pointer) + (end c-pointer) + (include-hidden-chars boolean)) + c-string) + (gtk-text-buffer-insert ((buffer c-pointer) + (iter c-pointer) + (text c-string) + (len int))) + (gtk-text-buffer-delete ((buffer c-pointer) + (start c-pointer) + (end c-pointer))) (gtk-text-buffer-set-text ((buffer c-pointer) (text c-string) (len int))) + (gtk-text-buffer-get-char-count ((buffer c-pointer)) + int) + (gtk-text-buffer-insert-at-cursor ((buffer c-pointer) + (text c-pointer) + (len int))) + (gtk-text-buffer-create-tag ((buffer c-pointer) + (tag-name c-string) + (first-property-name c-string) + (second-property-name c-string) ; POD how can I do more? + (eof c-pointer)) + c-pointer) + (gtk-text-buffer-remove-all-tags ((buffer c-pointer) + (start c-pointer) + (end c-pointer))) + (gtk-text-buffer-get-iter-at-offset ((buffer c-pointer) + (iter c-pointer) + (char-offset int))) + (gtk-text-buffer-apply-tag ((buffer c-pointer) + (tag c-pointer) + (start c-pointer) + (end c-pointer))) + (gtk-text-buffer-get-char-count ((buffer c-pointer)) + int) + (gtk-text-buffer-create-mark ((buffer c-pointer) + (mark-name c-string) + (where c-pointer) + (left-gravity boolean)) + c-pointer) + (gtk-text-buffer-get-iter-at-mark ((buffer c-pointer) + (iter c-pointer) + (mark c-pointer))) + (gtk-text-buffer-get-insert ((buffer c-pointer)) + c-pointer) + (gtk-text-buffer-delete-mark ((buffer c-pointer) + (mark c-pointer))) + (gtk-text-buffer-get-mark ((buffer c-pointer) + (name c-string)) + c-pointer) + (gtk-text-buffer-get-modified ((buffer c-pointer)) + boolean) + (gtk-text-buffer-set-modified ((buffer c-pointer) + (setting boolean))) + + ;;text-iter + (gtk-text-iter-free ((iter c-pointer))) + (gtk-text-iter-get-offset ((iter c-pointer)) + int) ;;text-tag-table (gtk-text-tag-table-new () @@ -630,8 +689,11 @@ c-pointer) (gtk-adds-text-view-popup-menu ((treeview c-pointer)) - c-pointer)) + c-pointer) + (gtk-adds-text-iter-new () + c-pointer)) +#-libcellsgtk (defmacro you-need-libcellsgtk (&body names) `(progn ,@(loop for name in names @@ -640,9 +702,11 @@ (error "You need libcellsgtk.so to use function ~A." ',name))))) #-libcellsgtk -(you-need-libcellsgtk - gtk-adds-dialog-box - gtk-adds-text-view-popup-menu) +(eval-when (:compile-toplevel :load-toplevel :execute) + (you-need-libcellsgtk + gtk-adds-dialog-box + gtk-adds-text-view-popup-menu + gtk-adds-text-iter-new)) From pdenno at common-lisp.net Sun Mar 6 23:37:39 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Mon, 7 Mar 2005 00:37:39 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/cgtk-primer.html Message-ID: <20050306233739.C0B938866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv13248/public_html Modified Files: cgtk-primer.html Log Message: typo Date: Mon Mar 7 00:37:36 2005 Author: pdenno Index: public_html/cgtk-primer.html diff -u public_html/cgtk-primer.html:1.2 public_html/cgtk-primer.html:1.3 --- public_html/cgtk-primer.html:1.2 Sun Mar 6 17:47:50 2005 +++ public_html/cgtk-primer.html Mon Mar 7 00:37:35 2005 @@ -147,7 +147,7 @@ propagation to formula-valued cell dependencies has to happen before any output SETF (and why Cells has a mechanism to defer SETFs of inputs). -

    Family: Referencing slots throughout the defmodel heirarchy.

    +

    Family: Referencing slots throughout the defmodel hierarchy.

    The defmodel macro defines a part-subpart relationship among components of the interface. The relationship is made by the @@ -160,7 +160,7 @@
    Peter Denno
    -Last modified: Fri Mar 4 20:21:21 EST 2005 +Last modified: Sun Mar 6 18:36:16 EST 2005 From pdenno at common-lisp.net Sun Mar 6 23:38:31 2005 From: pdenno at common-lisp.net (Peter Denno) Date: Mon, 7 Mar 2005 00:38:31 +0100 (CET) Subject: [cells-gtk-cvs] CVS update: public_html/faq.html Message-ID: <20050306233831.2F6378866E@common-lisp.net> Update of /project/cells-gtk/cvsroot/public_html In directory common-lisp.net:/tmp/cvs-serv13278/public_html Modified Files: faq.html Log Message: typo Date: Mon Mar 7 00:38:29 2005 Author: pdenno Index: public_html/faq.html diff -u public_html/faq.html:1.6 public_html/faq.html:1.7 --- public_html/faq.html:1.6 Sun Mar 6 17:48:27 2005 +++ public_html/faq.html Mon Mar 7 00:38:22 2005 @@ -41,7 +41,7 @@
  • How do I do xyz?
  • Q: What does this error mean? : "cellular slot FOO of #<BAR 21B555A4> cannot be setf unless initialized as inputp.
  • -
  • Q: Changing a cell value causes dependencies to fire, but what is considered a change?"
  • +
  • Q: Changing a cell value causes dependencies to fire, but what is considered a change?
  • @@ -195,7 +195,7 @@ Read the cells-gtk primer for more information.

    -Q: Changing a cell value causes dependencies to fire, but what is considered a change?"

    +Q: Changing a cell value causes dependencies to fire, but what is considered a change?

    A: As you are suggesting, setting a slot to an "equivalent" object should not cause its dependencies to fire again (in order to save substantial useless recalculations). So how is "equivalence" defined? EQL is used unless overridden by providing a function of two arguments @@ -205,7 +205,7 @@

    Peter Denno
    -Last modified: Sat Mar 5 13:11:28 EST 2005 +Last modified: Sun Mar 6 18:32:15 EST 2005