2010-01-24 13:54 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbxbp/xbpdialog.prg
    + Implemented :maxSize and :minSize instance variables.
This commit is contained in:
Pritpal Bedi
2010-01-24 21:55:56 +00:00
parent b7dc6e31e3
commit ca5db97c84
2 changed files with 34 additions and 0 deletions

View File

@@ -17,6 +17,10 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-24 13:54 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbpdialog.prg
+ Implemented :maxSize and :minSize instance variables.
2010-01-24 13:32 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbpdataref.prg
% Changed the way class is recognized to facilitate sub-classing.

View File

@@ -105,6 +105,12 @@ CLASS XbpDialog FROM XbpWindow
METHOD calcClientRect() INLINE { 0, 0, ::oWidget:width(), ::oWidget:height() }
METHOD calcFrameRect() INLINE { ::oWidget:x(), ::oWidget:y(), ;
::oWidget:x()+::oWidget:width(), ::oWidget:y()+::oWidget:height() }
DATA aMaxSize
METHOD maxSize( aSize ) SETGET
DATA aMinSize
METHOD minSize( aSize ) SETGET
ENDCLASS
/*----------------------------------------------------------------------*/
@@ -260,6 +266,30 @@ METHOD XbpDialog:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD XbpDialog:maxSize( aSize )
IF hb_isArray( aSize ) .AND. len( aSize ) == 2 .AND. hb_isNumeric( aSize[ 1 ] ) .AND. hb_isNumeric( aSize[ 2 ] )
::aMaxSize := aSize
::oWidget:setMaximumWidth( aSize[ 1 ] )
::oWidget:setMaximumHeight( aSize[ 2 ] )
ENDIF
RETURN ::aMaxSize
/*----------------------------------------------------------------------*/
METHOD XbpDialog:minSize( aSize )
IF hb_isArray( aSize ) .AND. len( aSize ) == 2 .AND. hb_isNumeric( aSize[ 1 ] ) .AND. hb_isNumeric( aSize[ 2 ] )
::aMinSize := aSize
::oWidget:setMinimumWidth( aSize[ 1 ] )
::oWidget:setMinimumHeight( aSize[ 2 ] )
ENDIF
RETURN ::aMinSize
/*----------------------------------------------------------------------*/
METHOD XbpDialog:showModal()
::hide()