[graphic-forms-cvs] r375 - in trunk: . docs/manual src src/uitoolkit/widgets

junrue at common-lisp.net junrue at common-lisp.net
Sat Oct 21 18:46:36 UTC 2006


Author: junrue
Date: Sat Oct 21 14:46:35 2006
New Revision: 375

Modified:
   trunk/NEWS.txt
   trunk/docs/manual/gfw-symbols.xml
   trunk/src/packages.lisp
   trunk/src/uitoolkit/widgets/file-dialog.lisp
   trunk/src/uitoolkit/widgets/font-dialog.lisp
Log:
 

Modified: trunk/NEWS.txt
==============================================================================
--- trunk/NEWS.txt	(original)
+++ trunk/NEWS.txt	Sat Oct 21 14:46:35 2006
@@ -35,6 +35,9 @@
 
 . Implemented stand-alone scrollbar and slider control types.
 
+. Renamed functions that query the standard color, file, and font dialogs
+  to make their naming scheme more consistent.
+
 . Implemented GFW:EVENT-PRE-RESIZE function so that applications can customize
   the behavior of a window's size drag rectangle.
 

Modified: trunk/docs/manual/gfw-symbols.xml
==============================================================================
--- trunk/docs/manual/gfw-symbols.xml	(original)
+++ trunk/docs/manual/gfw-symbols.xml	Sat Oct 21 14:46:35 2006
@@ -2188,7 +2188,7 @@
     </description>
   </function>
 
-  <function name="obtain-file-dialog-paths">
+  <function name="obtain-chosen-files">
     <syntax>
       <arguments>
         <argument name="file-dialog">
@@ -2212,7 +2212,7 @@
     </seealso>
   </function>
 
-  <function name="obtain-font-dialog-results">
+  <function name="obtain-chosen-font">
     <syntax>
       <arguments>
         <argument name="font-dialog">
@@ -2222,7 +2222,7 @@
         </argument>
         <argument name="graphic-context">
           <description>
-            A <reftopic>gfg:graphic-context</reftopic> object.
+            A <reftopic>gfg:graphics-context</reftopic> object.
           </description>
         </argument>
       </arguments>
@@ -2247,6 +2247,33 @@
     </seealso>
   </function>
 
+  <function name="obtain-chosen-color">
+    <syntax>
+      <arguments>
+        <argument name="color-dialog">
+          <description>
+            The <reftopic>gfw:color-dialog</reftopic> to be queried.
+          </description>
+        </argument>
+      </arguments>
+      <return>
+        <reftopic>gfg:color</reftopic>
+        <refclhs>list</refclhs>
+      </return>
+    </syntax>
+    <description>
+      Interrogates the data structure associated with <arg0/> to retrieve
+      the selected color. The secondary value is a <refclhs>list</refclhs>
+      of <reftopic>gfg:color</reftopic> objects corresponding to custom
+      colors displayed by the dialog. If the user cancelled the dialog,
+      NIL is returned for both values. Use this function when manually
+      constructing a color dialog. 
+    </description>
+    <seealso>
+      <reftopic>gfw:with-color-dialog</reftopic>
+    </seealso>
+  </function>
+
   <!-- GENERIC FUNCTIONS -->
 
   <generic-function name="event-activate">

Modified: trunk/src/packages.lisp
==============================================================================
--- trunk/src/packages.lisp	(original)
+++ trunk/src/packages.lisp	Sat Oct 21 14:46:35 2006
@@ -470,10 +470,10 @@
     #:move-below
     #:moveable-p
     #:obtain-chosen-color
+    #:obtain-chosen-files
+    #:obtain-chosen-font
     #:obtain-displays
     #:obtain-event-time
-    #:obtain-file-dialog-paths
-    #:obtain-font-dialog-results
     #:obtain-horizontal-scrollbar
     #:obtain-primary-display
     #:obtain-vertical-scrollbar

Modified: trunk/src/uitoolkit/widgets/file-dialog.lisp
==============================================================================
--- trunk/src/uitoolkit/widgets/file-dialog.lisp	(original)
+++ trunk/src/uitoolkit/widgets/file-dialog.lisp	Sat Oct 21 14:46:35 2006
@@ -37,7 +37,7 @@
 ;;; helper functions
 ;;;
 
-(defun obtain-file-dialog-paths (dlg)
+(defun obtain-chosen-files (dlg)
   (let ((ofn-ptr (gfs:handle dlg)))
     (if (cffi:null-pointer-p ofn-ptr)
       (error 'gfs:disposed-error))
@@ -65,7 +65,7 @@
       (unwind-protect
           (progn
             (show ,dlg t)
-            (setf ,paths (obtain-file-dialog-paths ,dlg))
+            (setf ,paths (obtain-chosen-files ,dlg))
             , at body)
         (gfs:dispose ,dlg)))))
 

Modified: trunk/src/uitoolkit/widgets/font-dialog.lisp
==============================================================================
--- trunk/src/uitoolkit/widgets/font-dialog.lisp	(original)
+++ trunk/src/uitoolkit/widgets/font-dialog.lisp	Sat Oct 21 14:46:35 2006
@@ -39,7 +39,7 @@
 ;;; helper functions
 ;;;
 
-(defun obtain-font-dialog-results (dlg gc)
+(defun obtain-chosen-font (dlg gc)
   (if (or (gfs:disposed-p dlg) (gfs:disposed-p gc))
     (error 'gfs:disposed-error))
   (cffi:with-foreign-slots ((gfs::logfont gfs::color) (gfs:handle dlg) gfs::choosefont)
@@ -66,7 +66,7 @@
                                :style ,style)))
       (unwind-protect
           (unless (zerop (show ,dlg t))
-            (multiple-value-bind (f c) (obtain-font-dialog-results ,dlg ,gc)
+            (multiple-value-bind (f c) (obtain-chosen-font ,dlg ,gc)
               (setf ,font f)
               (setf ,color c))
             , at body)



More information about the Graphic-forms-cvs mailing list