VariableHorizontalPanel.st
author Claus Gittinger <cg@exept.de>
Thu, 18 Jan 1996 01:09:26 +0100
changeset 294 667773990289
parent 205 6814c0bf8df8
child 496 f22ac16a5093
permissions -rw-r--r--
merged all variablePanel code into a common class. Can now flip dynamically

"
 COPYRIGHT (c) 1992 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

VariablePanel subclass:#VariableHorizontalPanel
	 instanceVariableNames:''
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Views-Layout'
!

!VariableHorizontalPanel class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1992 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    This class is only here for backward compatibility;
    all functionality is now in VariablePanel. Its orientation can now
    be changed dynamically.

    A View to separate its subviews horizontally by a movable bar
    to adjust the size-ratios.
    The bar-handle is either an exposed knob (knobStyle == #motif)
    or the forms defined in Scroller (knobStyle ~~ #motif)
    or nothing.

    The subvies dimensions MUST be given as relative sizes;
    typically creation is done as:

	p := VariableHorizontalPanel in:superView.
	v1 := <someViewClass> origin:0.0 @ 0.0
			      corner:0.5 @ 1.0
				  in:p.
	v2 := <someViewClass> origin:0.5 @ 0.0
			      corner:0.8 @ 1.0
				  in:p.
	v3 := <someViewClass> origin:0.8 @ 0.0
			      corner:1.0 @ 1.0
				  in:p.
"
!

examples
"
   example:
	|top p v1 v2 v3|

	top := StandardSystemView new.
	top extent:300@200.

	p := VariableHorizontalPanel 
		 origin:0.0 @ 0.0
		 corner:1.0 @ 1.0
		 in:top.
	v1 := SelectionInListView 
		 origin:0.0 @ 0.0
		 corner:0.5 @ 1.0
		 in:p.
	v2 := EditTextView 
		 origin:0.5 @ 0.0
		 corner:0.8 @ 1.0
		 in:p.
	v3 := ScrollableView 
		 for:TextView 
		 in:p.
	v3 origin:0.8 @ 0.0 
	   corner:1.0 @ 1.0.
	top open
"
! !

!VariableHorizontalPanel methodsFor:'initializing'!

initialize
    super initialize.
    orientation := #horizontal
! !

!VariableHorizontalPanel class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libwidg/VariableHorizontalPanel.st,v 1.18 1996-01-18 00:09:20 cg Exp $'
! !