diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fd746a83d4..e89e075475 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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. diff --git a/harbour/contrib/hbxbp/xbpdialog.prg b/harbour/contrib/hbxbp/xbpdialog.prg index 625a76b25a..34f9e28748 100644 --- a/harbour/contrib/hbxbp/xbpdialog.prg +++ b/harbour/contrib/hbxbp/xbpdialog.prg @@ -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()