TopView.st
changeset 6647 9a10288a9bea
parent 6589 348a13487224
child 6791 3ac9db8d679f
--- a/TopView.st	Wed Dec 03 15:40:46 2014 +0100
+++ b/TopView.st	Wed Dec 03 15:42:02 2014 +0100
@@ -18,7 +18,8 @@
 		TypeMaster TypeSlave TypePartner TypeDialog TypePopUp
 		TypeUndecorated TypeToolWindow TypeToolDialog MDIClientMask
 		MDIClient TypeScreenDialog CurrentWindowMoveStart
-		CurrentWindowMoveState CurrentWindowBeingMoved'
+		CurrentWindowMoveState CurrentWindowBeingMoved
+		TypeUndecoratedResizable TypePopUpNonModal'
 	poolDictionaries:''
 	category:'Views-Basic'
 !
@@ -209,6 +210,8 @@
      TypeToolWindow  := 16r40.
      TypeToolDialog  := 16r50.
      TypeScreenDialog:= 16r60.
+     TypeUndecoratedResizable := 16r70.
+     TypePopUpNonModal        := 16r80.
 
     MDIClientMask   := 16r100.
      MDIClient       := 16r100.
@@ -406,14 +409,15 @@
 !
 
 bePopUpViewNotModal
+    "experimental/unfinished - do not use"
+
     "/ the nonInteger handling code is for backward compatibility only.
-"/    type isInteger ifTrue:[
-"/        type := (type bitClear:WindowTypeMask) bitOr:TypePopUp.
-"/        ^ self.
-"/    ].
+
+    type isInteger ifTrue:[
+        type := (type bitClear:WindowTypeMask) bitOr:TypePopUpNonModal.
+        ^ self.
+    ].
     type := #popUpNotModal
-
-    "Created: / 03-03-2011 / 19:04:40 / cg"
 !
 
 beScreenDialog
@@ -461,38 +465,60 @@
 !
 
 beToolDialog
+    "make me a tool dialog Window with a smaller title area.
+     Warning: not all window systems support that. Will be normal decorated on some systems (macosx)"
+
     "/ the nonInteger handling code is for backward compatibility only.
     type isInteger ifTrue:[
-	type := (type bitClear:WindowTypeMask) bitOr:TypeToolDialog.
-	^ self.
+        type := (type bitClear:WindowTypeMask) bitOr:TypeToolDialog.
+        ^ self.
     ].
     type := #dialog
 !
 
 beToolWindow
+    "make me a tool Window with a smaller title area.
+     Warning: not all window systems support that. Will be normal decorated on some systems (macosx)"
+
     "/ the nonInteger handling code is for backward compatibility only.
     type isInteger ifTrue:[
-	type := (type bitClear:WindowTypeMask) bitOr:TypeToolWindow.
-	^ self.
+        type := (type bitClear:WindowTypeMask) bitOr:TypeToolWindow.
+        ^ self.
     ].
     type := nil
 !
 
 beUndecorated
-    "make me an undecorated Window"
+    "make me an undecorated Window.
+     Warning: not all window systems support that. Will be decorated on some systems (macosx)"
 
     "/ the nonInteger handling code is for backward compatibility only.
     type isInteger ifTrue:[
-	type := (type bitClear:WindowTypeMask) bitOr:TypeUndecorated.
-	^ self.
+        type := (type bitClear:WindowTypeMask) bitOr:TypeUndecorated.
+        ^ self.
     ].
     type := nil
+
+    "
+     TopView new open
+     TopView new windowType:#dialog2; open
+     TopView new windowType:#notitle; open
+     TopView new beDialogView; open
+     TopView new bePopUpView; open
+     TopView new beToolDialog; open
+     TopView new beUndecorated; open
+    "
 !
 
 beUndecoratedResizable
-    "make me an undecorated Window"
-    "experimental - do not use"
-"/    type := #popUpWithFrame
+    "make me an undecorated but resizable Window"
+    "experimental/unfinished - do not use
+     Warning: not all window systems support that. Will be decorated on some systems (macosx)"
+
+    type isInteger ifTrue:[
+        type := (type bitClear:WindowTypeMask) bitOr:TypeUndecoratedResizable.
+        ^ self.
+    ].
     type := #undecoratedResizable
 
     "Created: / 03-03-2011 / 20:22:14 / cg"
@@ -1051,13 +1077,15 @@
     |t|
 
     type isInteger ifTrue:[
-	t := type bitAnd:WindowTypeMask.
-	t == TypeUndecorated ifTrue:[^ #undecorated].
-	t == TypeDialog ifTrue:[^ #dialog].
-	t == TypePopUp ifTrue:[^ #popUp].
-	t == TypeToolWindow ifTrue:[^ #toolWindow].
-	t == TypeToolDialog ifTrue:[^ #toolDialog].
-	^ #normal
+        t := type bitAnd:WindowTypeMask.
+        t == TypeUndecorated ifTrue:[^ #undecorated].
+        t == TypeDialog ifTrue:[^ #dialog].
+        t == TypePopUp ifTrue:[^ #popUp].
+        t == TypeToolWindow ifTrue:[^ #toolWindow].
+        t == TypeToolDialog ifTrue:[^ #toolDialog].
+        t == TypeUndecoratedResizable ifTrue:[^ #dialog].
+        t == TypePopUpNonModal ifTrue:[^ #undecorated ].
+        ^ #normal
     ].
     "/ the nonInteger handling code is for backward compatibility only.
     ^ super windowStyle
@@ -1450,11 +1478,11 @@
 !TopView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.151 2014-11-13 23:49:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.152 2014-12-03 14:42:02 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.151 2014-11-13 23:49:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.152 2014-12-03 14:42:02 cg Exp $'
 ! !