New FTDN July/Julio 2009 (9.07)
Posted: Thu Jul 30, 2009 9:14 am
July 2009
=========
* New: FWH own Class TRibbonBar: Create Office 2007 style RibbonBars without having to use any
external DLL, OCX or libraries! Also this new Classes are available too: Class TRBGroup, TRBtn,
and TRPanel.
You can also use these new controls, as standalone controls. Please review samples\Ribbon.prg
for a working example. If you click on "Paste" button in this example, you will see how these
new powerfull controls can be used as a standalone controls too.
* New: Class TTitle. A great looking Title Class for your applications. Please review
samples\TestTitl.prg
* Enhancement: Class TActiveX Method OnEvent() now receives an extra pParams with the original
pParams ( DISPPARAMS * pParams ) so you can directly manage the original VARIANTs parameters
array that is supplied to the ActiveX event.
* XBROWSE
a) Inherited classes from XBrowse:
It may be necessary to have a modified behaviour of xbrowse for a specific browse or an application.
In such cases it is desirable to create one or mroe child classes derived from TXBrowse and use them.
It is now very easy to implement this globally or for specific browses.
[bPrev := ] SetXBrowse( { || ChildBrowse() } ). After this all xbrowse commands create and use this
child class.
command equivalent is :
SET XBRROWSE TO ChildBrowse() [ SAVE PREVIOUS TO bPrevXbr ]
To use child class for a speicific browse :
@ r, c, XBROWSE oBrw CLASS ChildBrowse() OF ownd .... can be used.
It is possible to use different child classes or standard FWH txbrowse for different browses displayed at
the same time.
If browse is created in Oops syntax, TXBrows():New(oWnd) may be used instead of TXBrowse():New( oWnd ).
Sample:
xbrchild.prg demonstrates use of child browses and switching between child and parent classes as well as
provides a template for creation of child xbrowse class.
b) DateTime Type:
(i) Due to incosistant behaviour of hb_isDateTime() function of xHarbour between different versions,
appropriate modifications are made to retain the same functionality irrespective of the version of xHarbour
(ii) Recent versions of Harbour provide DateTime data type ( ValType -> 'T' ). The version of Harbour
provided with this build does not provide this. XBrowse and ValBlank.prg are modified to use the datetime
variables depending on the version of Harbour used in the application.
(iii) New datatypes 'T' and '@' ( for datetime and timestamp ) provided in DBFCDX are now properly
recoginised and handled depending on the version of harbour or xharbour used.
(iv) Similar modifications are made for ADT tables
(v) Time only values of datetime variables are properly recoginized and timepart only is shown.
c) MethodsToExcel and ToCalc: Additional paramter aCols is provided. If an array of column objects is
provided, the export will be of that columns only and in that order.
d) PostEdit cursor movement in Fast Edit mode ( default ):
(i) The intended behavior is that after editing a cell, the cursor should move to the next editble cell
in the same row and if the edited cell is the last cell of the row, the cursor goes to the first
editabel cell of the next row.
Editable cell means where the columns's nEditType is nonzero and bEditWhen is evaluated to true.
In earlier versions the movement was not honoring the bEditWhen. Now the cursor is moved to the next
cell where bEditWhen also evaluates to true. This change provides the truely intended behavior.
(ii) In the same manner, after the last editable cell of last row is edited, if bPastEof is assigned,
this codeblock is evaluated and the cursor moves to the first editable cell of the newly created row.
If bPastEof specifically positions the cursor to any specific column, the cursor stays on that column
only if the cell is editable. Otherwise cursor moves to the next right editable column.
e) While painting the column's data, binary data is automatically recognized and if the data is valid image
data, image is paainted in the cell,
f) Method SetCheck( aBmps, lEdit/bPostEditBlock, aPrompts )
If the first paramters is ommitted, XBrowse provides internally created bitmaps. These bitmaps are
alpha blended and appear bright on dark backgrounds and black on bright backgrounds automatically.
Examples can be seen in Testxbr3.prg.
g) New Data: oBrw:lContastClr INIT .t.
In case of gradient and image backgrounds with varying brighness in different cells, text in each cell
is painted in the programmer specified color, if that color provides adequate cotrast with background
of that cell and otherwise painted in white on dark backgrounds and in black on bright backgrounds.
The logic is still in development and gives reasonable results in many cases.
This behavior can be suppressed by setting the data oBrw:lContrastClr to .f.
h) Method SetBackGround( uBack, uMode ) now supports Gradient colors also.
(i) Improved: Support for specifying array of Gradient colors as uBack. In this case, uMode can be logical
paramter ( .t. for vertical or .f. for horizontal orientation ) default being vertical or earlier setting.
Gradient colors be set with this function at any time during definition of xbrowse or at runtime
dynamically. It is not necessary to specify gradient colors on init clause of dialog.
Similarly orientation can be changed dynamically at any time.
As in the case of Image backgrounds, grandient also respects window resizing.
(ii) Fixed: Background image was not properly painted in case of dialogs created from resource, in stretch
and fill modes. Now fixed.
(iii) Parameters:
uBack : cImageFile / cResource / hBmpHandle / oBrush / aGradient colors
In case of brushes and bitmap handles, the objects are to be destroyed by the calling program at the end.
uMode : In case of gradient colors logical value and in other cases numeric value BCK_TILED (0),
BCK_STRETCH (1), BCK_FILL (2) ( Default BCK_TILED or previous mode )
oBrw:SetBackGround() without parameters clears any background
oBrw:SetBackGround( nil, uMode ) switches the mode for the existing background
Backgrounds can be easily specified while creating xbrowse ( windows / dialogs from source or resources )
with the new clauses provided in the COMMAND SYNTAX:
Examples:
@ r, c, XBROWSE ( or REDEFINE XBROWSE ) ....... ;
BACKGROUND cImageFile/cResource/hBmphandle/oBrush [TILED/STRETCH/FILL]
For Gradient colors
@ r, c, XBROWSE ( or REDEFINE XBROWSE ) ....... ;
BACKGROUND aClrGradientArray [VERTICAL/HORIZONTAL]
Sample: xbrgrad.prg demonstrates
(a) ease of specifying gradient colors while creating xbrowse
(b) switching the orientation at runtime ( horizontal / vertical )
(c) changing the colors of the gradient during runtime by selecting and substituting any of the three
colors of the gradient,
(d) changing the size of different colors during runtime
(e) view the code of gradient array
(f) Inline editing of the gradient array code to dynamically change the gradient
(g) copy the gradient array code to clipboard that can be pasted and used in other applications
(h) display of text dynamically in contast colors to ensure better visibility
(i) display of FW builtin checkboxes that appear in contrast colors on backgrounds of different bightness.
This small sample program, with its intutive user interface, can also be used as a simple three color
gradient designer for use with xbrowses or other controls.
i) New Data: TXBrwColumn:bGetChange. If assigned, this codeblock is used as bChange codeblock of bEditGet
while editing the cells where nEditType is EDIT_GET.
During editing the bEditGet, this codeblock is evaluated with frist three parameters nKey, nFlats,
oGet in the same manner as the bChange block of Get and in additon receives the column object as the
fourth parameter. The column object can be used to derive other information about oBrw, oBrw:ownd, etc.
* REPORT:
Enhancement: Now images can be printed inside the columns of the report object. It is also possible to
print text over images.
#xcommand COLUMN [ <oRptCol> ] ;
[ TITLE <bTitle, ...> ] ;
[ AT <nCol> ] ;
[ DATA <bData, ...> ] ;
[ SIZE <nSize> ] ;
[ <pict: PICT, PICTURE> <cPicture, ...> ] ;
[ FONT <uFont> ] ;
[ <total: TOTAL> [ FOR <bTotalExpr> ] ] ;
[ <ColFmt:LEFT,CENTER,CENTERED,RIGHT> ] ;
[ <lShadow:SHADOW> ] ;
[ <lGrid:GRID> [ <nPen> ] ] ;
[ <memo: MEMO, MULTILINE> ] ;
[<img:IMAGE> [ IMGDATA <bimg> ] [HEIGHT <h> [<imgpix:PIXEL>] ] [ ALPHALEVEL <nAlpha>] ] ;
If clause IMAGE is specified without the clause IMGDATA, the column data is treated as binary image data.
If clauses IMAGE IMGDATA <bdata> are specified, imgdata is printed in the background and any text data
in the column data is printed over the background
Height can be specified in equivalent number of data lines or in pixels as well as alpha level.
This functionality is still under development is not tested on different kinds of printers. Feedback
if any is highly appreciated to improve the functionality.
* Enhancement: Bitmaps: Some bitmaps containing alpha channel in the bitmaps\32x32 folder are not premultiplied.
They are now converted and provided in the AlphaBmp folder for use.
=========
* New: FWH own Class TRibbonBar: Create Office 2007 style RibbonBars without having to use any
external DLL, OCX or libraries! Also this new Classes are available too: Class TRBGroup, TRBtn,
and TRPanel.
You can also use these new controls, as standalone controls. Please review samples\Ribbon.prg
for a working example. If you click on "Paste" button in this example, you will see how these
new powerfull controls can be used as a standalone controls too.
* New: Class TTitle. A great looking Title Class for your applications. Please review
samples\TestTitl.prg
* Enhancement: Class TActiveX Method OnEvent() now receives an extra pParams with the original
pParams ( DISPPARAMS * pParams ) so you can directly manage the original VARIANTs parameters
array that is supplied to the ActiveX event.
* XBROWSE
a) Inherited classes from XBrowse:
It may be necessary to have a modified behaviour of xbrowse for a specific browse or an application.
In such cases it is desirable to create one or mroe child classes derived from TXBrowse and use them.
It is now very easy to implement this globally or for specific browses.
[bPrev := ] SetXBrowse( { || ChildBrowse() } ). After this all xbrowse commands create and use this
child class.
command equivalent is :
SET XBRROWSE TO ChildBrowse() [ SAVE PREVIOUS TO bPrevXbr ]
To use child class for a speicific browse :
@ r, c, XBROWSE oBrw CLASS ChildBrowse() OF ownd .... can be used.
It is possible to use different child classes or standard FWH txbrowse for different browses displayed at
the same time.
If browse is created in Oops syntax, TXBrows():New(oWnd) may be used instead of TXBrowse():New( oWnd ).
Sample:
xbrchild.prg demonstrates use of child browses and switching between child and parent classes as well as
provides a template for creation of child xbrowse class.
b) DateTime Type:
(i) Due to incosistant behaviour of hb_isDateTime() function of xHarbour between different versions,
appropriate modifications are made to retain the same functionality irrespective of the version of xHarbour
(ii) Recent versions of Harbour provide DateTime data type ( ValType -> 'T' ). The version of Harbour
provided with this build does not provide this. XBrowse and ValBlank.prg are modified to use the datetime
variables depending on the version of Harbour used in the application.
(iii) New datatypes 'T' and '@' ( for datetime and timestamp ) provided in DBFCDX are now properly
recoginised and handled depending on the version of harbour or xharbour used.
(iv) Similar modifications are made for ADT tables
(v) Time only values of datetime variables are properly recoginized and timepart only is shown.
c) MethodsToExcel and ToCalc: Additional paramter aCols is provided. If an array of column objects is
provided, the export will be of that columns only and in that order.
d) PostEdit cursor movement in Fast Edit mode ( default ):
(i) The intended behavior is that after editing a cell, the cursor should move to the next editble cell
in the same row and if the edited cell is the last cell of the row, the cursor goes to the first
editabel cell of the next row.
Editable cell means where the columns's nEditType is nonzero and bEditWhen is evaluated to true.
In earlier versions the movement was not honoring the bEditWhen. Now the cursor is moved to the next
cell where bEditWhen also evaluates to true. This change provides the truely intended behavior.
(ii) In the same manner, after the last editable cell of last row is edited, if bPastEof is assigned,
this codeblock is evaluated and the cursor moves to the first editable cell of the newly created row.
If bPastEof specifically positions the cursor to any specific column, the cursor stays on that column
only if the cell is editable. Otherwise cursor moves to the next right editable column.
e) While painting the column's data, binary data is automatically recognized and if the data is valid image
data, image is paainted in the cell,
f) Method SetCheck( aBmps, lEdit/bPostEditBlock, aPrompts )
If the first paramters is ommitted, XBrowse provides internally created bitmaps. These bitmaps are
alpha blended and appear bright on dark backgrounds and black on bright backgrounds automatically.
Examples can be seen in Testxbr3.prg.
g) New Data: oBrw:lContastClr INIT .t.
In case of gradient and image backgrounds with varying brighness in different cells, text in each cell
is painted in the programmer specified color, if that color provides adequate cotrast with background
of that cell and otherwise painted in white on dark backgrounds and in black on bright backgrounds.
The logic is still in development and gives reasonable results in many cases.
This behavior can be suppressed by setting the data oBrw:lContrastClr to .f.
h) Method SetBackGround( uBack, uMode ) now supports Gradient colors also.
(i) Improved: Support for specifying array of Gradient colors as uBack. In this case, uMode can be logical
paramter ( .t. for vertical or .f. for horizontal orientation ) default being vertical or earlier setting.
Gradient colors be set with this function at any time during definition of xbrowse or at runtime
dynamically. It is not necessary to specify gradient colors on init clause of dialog.
Similarly orientation can be changed dynamically at any time.
As in the case of Image backgrounds, grandient also respects window resizing.
(ii) Fixed: Background image was not properly painted in case of dialogs created from resource, in stretch
and fill modes. Now fixed.
(iii) Parameters:
uBack : cImageFile / cResource / hBmpHandle / oBrush / aGradient colors
In case of brushes and bitmap handles, the objects are to be destroyed by the calling program at the end.
uMode : In case of gradient colors logical value and in other cases numeric value BCK_TILED (0),
BCK_STRETCH (1), BCK_FILL (2) ( Default BCK_TILED or previous mode )
oBrw:SetBackGround() without parameters clears any background
oBrw:SetBackGround( nil, uMode ) switches the mode for the existing background
Backgrounds can be easily specified while creating xbrowse ( windows / dialogs from source or resources )
with the new clauses provided in the COMMAND SYNTAX:
Examples:
@ r, c, XBROWSE ( or REDEFINE XBROWSE ) ....... ;
BACKGROUND cImageFile/cResource/hBmphandle/oBrush [TILED/STRETCH/FILL]
For Gradient colors
@ r, c, XBROWSE ( or REDEFINE XBROWSE ) ....... ;
BACKGROUND aClrGradientArray [VERTICAL/HORIZONTAL]
Sample: xbrgrad.prg demonstrates
(a) ease of specifying gradient colors while creating xbrowse
(b) switching the orientation at runtime ( horizontal / vertical )
(c) changing the colors of the gradient during runtime by selecting and substituting any of the three
colors of the gradient,
(d) changing the size of different colors during runtime
(e) view the code of gradient array
(f) Inline editing of the gradient array code to dynamically change the gradient
(g) copy the gradient array code to clipboard that can be pasted and used in other applications
(h) display of text dynamically in contast colors to ensure better visibility
(i) display of FW builtin checkboxes that appear in contrast colors on backgrounds of different bightness.
This small sample program, with its intutive user interface, can also be used as a simple three color
gradient designer for use with xbrowses or other controls.
i) New Data: TXBrwColumn:bGetChange. If assigned, this codeblock is used as bChange codeblock of bEditGet
while editing the cells where nEditType is EDIT_GET.
During editing the bEditGet, this codeblock is evaluated with frist three parameters nKey, nFlats,
oGet in the same manner as the bChange block of Get and in additon receives the column object as the
fourth parameter. The column object can be used to derive other information about oBrw, oBrw:ownd, etc.
* REPORT:
Enhancement: Now images can be printed inside the columns of the report object. It is also possible to
print text over images.
#xcommand COLUMN [ <oRptCol> ] ;
[ TITLE <bTitle, ...> ] ;
[ AT <nCol> ] ;
[ DATA <bData, ...> ] ;
[ SIZE <nSize> ] ;
[ <pict: PICT, PICTURE> <cPicture, ...> ] ;
[ FONT <uFont> ] ;
[ <total: TOTAL> [ FOR <bTotalExpr> ] ] ;
[ <ColFmt:LEFT,CENTER,CENTERED,RIGHT> ] ;
[ <lShadow:SHADOW> ] ;
[ <lGrid:GRID> [ <nPen> ] ] ;
[ <memo: MEMO, MULTILINE> ] ;
[<img:IMAGE> [ IMGDATA <bimg> ] [HEIGHT <h> [<imgpix:PIXEL>] ] [ ALPHALEVEL <nAlpha>] ] ;
If clause IMAGE is specified without the clause IMGDATA, the column data is treated as binary image data.
If clauses IMAGE IMGDATA <bdata> are specified, imgdata is printed in the background and any text data
in the column data is printed over the background
Height can be specified in equivalent number of data lines or in pixels as well as alpha level.
This functionality is still under development is not tested on different kinds of printers. Feedback
if any is highly appreciated to improve the functionality.
* Enhancement: Bitmaps: Some bitmaps containing alpha channel in the bitmaps\32x32 folder are not premultiplied.
They are now converted and provided in the AlphaBmp folder for use.