[graphic-forms-cvs] r56 - in trunk: . src src/tests/uitoolkit src/uitoolkit/widgets

junrue at common-lisp.net junrue at common-lisp.net
Mon Mar 20 06:03:15 UTC 2006


Author: junrue
Date: Mon Mar 20 01:03:14 2006
New Revision: 56

Added:
   trunk/src/uitoolkit/widgets/label.lisp
      - copied, changed from r46, trunk/src/uitoolkit/widgets/text-label.lisp
Removed:
   trunk/src/uitoolkit/widgets/text-label.lisp
Modified:
   trunk/graphic-forms-uitoolkit.asd
   trunk/src/packages.lisp
   trunk/src/tests/uitoolkit/layout-tester.lisp
   trunk/src/uitoolkit/widgets/widget-classes.lisp
Log:
reverted back to single label class which will distinguish text vs image via style flags

Modified: trunk/graphic-forms-uitoolkit.asd
==============================================================================
--- trunk/graphic-forms-uitoolkit.asd	(original)
+++ trunk/graphic-forms-uitoolkit.asd	Mon Mar 20 01:03:14 2006
@@ -101,7 +101,7 @@
                        (:file "item")
                        (:file "widget")
                        (:file "control")
-                       (:file "text-label")
+                       (:file "label")
                        (:file "button")
                        (:file "widget-with-items")
                        (:file "menu")

Modified: trunk/src/packages.lisp
==============================================================================
--- trunk/src/packages.lisp	(original)
+++ trunk/src/packages.lisp	Mon Mar 20 01:03:14 2006
@@ -394,6 +394,7 @@
     #:items
     #:key-down-p
     #:key-toggled-p
+    #:label
     #:layout
     #:layout-of
     #:layout-p

Modified: trunk/src/tests/uitoolkit/layout-tester.lisp
==============================================================================
--- trunk/src/tests/uitoolkit/layout-tester.lisp	(original)
+++ trunk/src/tests/uitoolkit/layout-tester.lisp	Mon Mar 20 01:03:14 2006
@@ -342,7 +342,7 @@
         (add-btn-disp (make-instance 'add-child-dispatcher))
         (add-panel-disp (make-instance 'add-child-dispatcher :widget-class 'test-panel
                                                              :subtype :panel))
-        (add-text-label-disp (make-instance 'add-child-dispatcher :widget-class 'gfw::text-label
+        (add-text-label-disp (make-instance 'add-child-dispatcher :widget-class 'gfw:label
                                                                   :subtype :text-label))
         (rem-menu-disp (make-instance 'child-menu-dispatcher :sub-disp-class 'remove-child-dispatcher))
         (vis-menu-disp (make-instance 'child-menu-dispatcher :sub-disp-class 'visibility-child-dispatcher

Copied: trunk/src/uitoolkit/widgets/label.lisp (from r46, trunk/src/uitoolkit/widgets/text-label.lisp)
==============================================================================
--- trunk/src/uitoolkit/widgets/text-label.lisp	(original)
+++ trunk/src/uitoolkit/widgets/label.lisp	Mon Mar 20 01:03:14 2006
@@ -1,5 +1,5 @@
 ;;;;
-;;;; text-label.lisp
+;;;; label.lisp
 ;;;;
 ;;;; Copyright (C) 2006, Jack D. Unrue
 ;;;; All rights reserved.
@@ -37,7 +37,7 @@
 ;;; methods
 ;;;
 
-(defmethod compute-style-flags ((label text-label) &rest style)
+(defmethod compute-style-flags ((label label) &rest style)
   (declare (ignore label))
   (let ((std-flags 0)
         (ex-flags 0))
@@ -72,7 +72,7 @@
                   (setf std-flags (logior std-flags gfs::+ss-left+)))))
     (values std-flags ex-flags)))
 
-(defmethod initialize-instance :after ((label text-label) &key parent style &allow-other-keys)
+(defmethod initialize-instance :after ((label label) &key parent style &allow-other-keys)
   (if (not (listp style))
     (setf style (list style)))
   (multiple-value-bind (std-style ex-style)
@@ -88,7 +88,7 @@
   (init-control label))
 
 
-(defmethod preferred-size ((label text-label) width-hint height-hint)
+(defmethod preferred-size ((label label) width-hint height-hint)
   (let* ((hwnd (gfi:handle label))
          (bits (gfs::get-window-long hwnd gfs::+gwl-style+))
          (b-width (border-width label))
@@ -106,8 +106,8 @@
     (incf (gfi:size-height sz) (* b-width 2))
     sz))
 
-(defmethod text ((label text-label))
+(defmethod text ((label label))
   (get-widget-text label))
 
-(defmethod (setf text) (str (label text-label))
+(defmethod (setf text) (str (label label))
   (set-widget-text label str))

Modified: trunk/src/uitoolkit/widgets/widget-classes.lisp
==============================================================================
--- trunk/src/uitoolkit/widgets/widget-classes.lisp	(original)
+++ trunk/src/uitoolkit/widgets/widget-classes.lisp	Mon Mar 20 01:03:14 2006
@@ -65,11 +65,8 @@
 (defclass button (control) ()
   (:documentation "This class represents selectable controls that issue notifications when clicked."))
 
-(defclass image-label (control) ()
-  (:documentation "This class represents non-selectable controls that display an image."))
-
-(defclass text-label (control) ()
-  (:documentation "This class represents non-selectable controls that display a string."))
+(defclass label (control) ()
+  (:documentation "This class represents non-selectable controls that display a string or image."))
 
 (defclass widget-with-items (widget)
   ((items



More information about the Graphic-forms-cvs mailing list