diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1d7e7b69a8..52cb062b39 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,23 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-04 16:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbxbp/hbxbp.hbx + ! Auto-generated. + * contrib/hbxbp/xbpgeneric.prg + ! Changed: AppDesktop() returning instance of HbXbpAppDesktop() + instead of QDesktopWindow() directly. + * contrib/hbxbp/xbpwindow.prg + + Implemented: CLASS HbXbpAppDesktop(). + - :width( nScreen = -1 ) + - :height( nScreen ) + Returns the width/height of the monitor represented by nScreen. + By default nScreen == PrimaryScreen == -1. + - :virtualWidth()/virtualHeight() + Returns the total width/height of the virtual desktop. + + - Pointed and requested by Shum. + 2011-01-04 14:20 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbxbp/xbpbrowse.prg ! Changed: :addColumn( oCol ) -> RETURN SELF => RETURN oCol diff --git a/harbour/contrib/hbxbp/hbxbp.hbx b/harbour/contrib/hbxbp/hbxbp.hbx index ff728162dd..2dd41fd2ee 100644 --- a/harbour/contrib/hbxbp/hbxbp.hbx +++ b/harbour/contrib/hbxbp/hbxbp.hbx @@ -70,6 +70,7 @@ DYNAMIC GRASPLINE DYNAMIC GRASTRINGAT DYNAMIC GRATRANSLATE DYNAMIC HBPPROCESS +DYNAMIC HBXBPAPPDESKTOP DYNAMIC HBXBP_CLEAREVENTBUFFER DYNAMIC HBXBP_CONVERTAFACTFROMXBP DYNAMIC HBXBP_GETNEXTID diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index 247f9767ce..ef7d92612e 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -292,7 +292,7 @@ FUNCTION AppDesktop() IF s_oDeskTop == NIL s_oDeskTop := XbpWindow():new() - s_oDeskTop:oWidget := QDesktopWidget() + s_oDeskTop:oWidget := HbXbpAppDesktop():new():create() ENDIF RETURN s_oDeskTop diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index f31e21093c..c945dc5ce5 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -1839,3 +1839,67 @@ FUNCTION Xbp_SetPresParam( aPP, nParam, xValue ) RETURN oldValue /*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +CLASS HbXbpAppDesktop INHERIT XbpWindow + + METHOD new() + METHOD create() + METHOD width( nScreen ) + METHOD virtualWidth() + METHOD height( nScreen ) + METHOD virtualHeight() + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:new() + + ::xbpWindow:init() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:create() + + ::oWidget := QDesktopWidget() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:width( nScreen ) + + DEFAULT nScreen TO -1 + + RETURN iif( nScreen == -1, ::oWidget:screenGeometry( ::oWidget:primaryScreen() ):right(), ; + ::oWidget:screenGeometry( nScreen ):right() ) + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:height( nScreen ) + + DEFAULT nScreen TO -1 + + RETURN iif( nScreen == -1, ::oWidget:screenGeometry( ::oWidget:primaryScreen() ):bottom(), ; + ::oWidget:screenGeometry( nScreen ):bottom() ) + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:virtualWidth() + + RETURN ::oWidget:width() + +/*----------------------------------------------------------------------*/ + +METHOD HbXbpAppDesktop:virtualHeight() + + RETURN ::oWidget:height() + +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +