April 2016
==========
* New function Toast( cFirstLine, cSecondLine, cThirdLine, cImageFileName ) --> nil
to show standard Windows 10 toasts notifications! Please review samples\toastb.prg
* Enhancement: MsgSplash() and MsgLogo() now do not require
freeimage.dll for non bmp images.
MsgLogo() now displays the image only transparently.
* XBrowse:
---------
(1) Fix: Bitmaps for GroupHeader are not being shown. Fixed
(2) Enhancement: Now group header can be aligned left or right by
specifying the 5th parameter of SetGroupHeader() as AL_LEFT
or AL_RIGHT. Default continues to be center alignment.
(3) Enhancement: Improved painting of dividers in Header,Footer
and recordselector.
(4) New: Data and bitmaps on Record Selector:
It is now possbile to display any data on the record selector.
While this is mostly useful for display of Serial Number, Record
Number, etc like Excel, it can be any data. As can be expected,
user can not move cursor over the data or edit the data. The
following new DATAs are to be used for this purpose:
bRecSelData, bRecSelHeader, bRecSelFooter, nRecSelHeadBmpNo,
oRecSelFont, bRecSelClick and nRecSelWidth.
Example usage:
WITH OBJECT oBrw
RecSelFont := oFont // Defaults to oBrw:oFont
:bRecSelData := { |brw| brw:KeyNo }
:bRecSelHeader := { |brw| "SlNo" } // or simply "SlNo"
:bRecSelFooter := { |brw| brw:nLen } // or Simpy any value
:nRecSelWidth := 61
END
It is important to specify suitable size of oBrw:nRecSelWidth.
You can save time by specifying maximum text required to be displayed.
Eg: oBrw:nRecSelWidth := "99,999". XBrowse, in its Adjust() method
calculates the pixels required to display this data and assigns the
required width to :nRecSelWidth.
Instead of showing text in the header, it is also possible to display
an icon/bitmap/any image, using oBrw:nRecSelHeadBmpNo same way as we
use oCol:nHeadBmpNo. However to simplify programming, it is also
possible to specify the image name
Eg: oBrw:nRecSelHeadBmpNo := "c:\fwh\icons\hires\ie.ico"
and Adjust() method takes care of loading the image and setting the right
value to :nRecSelHeadBmpNo.
bRecSelClick: This codeblock is evaluaged with oBrw as parameter when the
user clicks on the header of the recordselector. The codeblock may perform
an action and/or return a popup menu object. If return value is a popup menu,
the popup is displayed under the recordselctor header.
New Method SetRecSelBmp( uNew ) // Changing or omitting bitmap
If uNew is 0, no bitmap is displayed on record selector
If uNew is NIL, standard FWRArrow() bitmap is displayed
If uNew is imagefile or resource,etc this image is displayed on record
selector in the place of the standard right arrow. Advised to specify bitmap
with size 16x16 or less.
nRecSelColor: Now it is possible to change RecSel Color during runtime.
Eg: oBrw:nRecSelColor := nNewColor, oBrw:Refresh()
Samples: fwh\samples\xhrecsel.prg
(5) Implementation of 20xx styles.
Additional clause to XBROWSE command:
STYLE FLAT,STANDARD,2007,2010,2013,2015
Eg: @ r,c XBROWSE oBrw <clauses> STYLE 2015 [<moreClauses>]
Gradients used for 2010,2013,2015 styles are the same as used for
ButtonBar.
New Class Data lInheritStyle INIT .f.
if this class data is set to .t., every xbrowse will inherit the
style of its own window's menu/buttonbar or wndmain()'s menu/buttonbar.
Backward compatibility:
If class data lInheritStyle is retained as .f.,
Default style continues to be 2007.
oBrw:l2007 := .f. continues to set Standard style
oBrw:lFlatStyle := .t. continues to set flat style.
Programmer can continue to set his own style by assigning values to
bClrGrad, bClrHeader, bClrFooter, nRecSelColor.
(6) New: Gets in Header.
Some users have been asking for provision of Gets in the
Header area, to enable users to enter parameters for filtering.
Optional space is provided for Gets under each column header
in a band just below the header. This can be toggled during
runtime. Programmer has to specify which columns require the
Gets and it is for the programmer to use the data entered in
the Gets either to set filters or for any other purposes.
oBrw:lBarGet := .t. or .f. (default .f. ) and oBrw:Refresh()
to show or hide the bar containing the Gets.
Specifying the columns for Gets:
Set oCol:uBarGetVal := <initialvalue> ( default nil) and
optionally set values for
oCol:cBarGetPic and oCol:bBarGetValid.
XBrowse creates Get objects to be displayed in the Get Bar.
Programmer needs to take action on the basis of the values
entered by the user, which are contained in oCol:uBarGetVal
Note: In this version, user can enter and exit the Get only
by mouse-click in the Get or outside the Get. Enter or Tab
does not exit the Get.
Samples: fwh\samples\xbgetbar.prg
(7) New Data lRowDividerComplete: When lFullGrid is true or
nMarqueeStyle is MARQSTYLE_HIGHLROWRC or higher the row divider
extended beyond the last column for the entire browse width.
Now if lRowDividerComplete set to .t., this is done in all cases.
(8) New Data lGradientComplete: If set to .t., the gradient is painted
beyond the last column for the full width of the browse.
Default is to fill this space with header back color.
(9) Right Freeze Column:
It is now possible to freeze a column on the right.
This works independent of freezing columns on the left.
Usage: oBrw:oRightCol := oCol
Can be cleared by oBrw:oRightCol := nil or changed
by oBrw:RightCol := oAnotherCol.
All other columns scroll horizontally between left
and right freeze columns.
It is also possible to set this col to display full height
by setting oCol:lFullHeight.
In this case the value for the column for the current row
is displayed in full height. This is mostly useful for
memos, documents and images. (Still under development to
provide better functionality)
Sample: \fwh\samples\xbrtfrez.prg
(10)Improvement: Now bFooter and nFooterType AGGR_XXX can work
together. For example bFooter := { |o| o:nTotal + nOpgBal }
Modified method RecalcTotals()
(11)New: In the codeblocks bClrStd, bClrSel, bClrSelFocus, etc.
if nil is specified for back color (2nd elem of color array )
null brush is used. Useful for displaying some cells
transparently.
(12)Improved: When painting large bitmaps along with text, alignment
of bitmap and text is improved.
(13)New: DATA lHoverSelect default .f.
When set to .t., mouse hover selects the row and column.
(14)New: DATA lFitGridHeight ( default .f. )
If set to .t., any gap between last row and footer is adjusted
to header and footer heights to fit the datarows to full height
(15)New: Different ways to assign column widths:
Column widths can be assigned by number or characters. Eg:
oCol:nWidthChr := 25
XBrowse will calculate the width in pixels to accommodate 25 chars
transformed with the picture clause using the column's font and
adding bitmap widths and other extra padding required.
oCol:nWidthChr := 10.2
xbrowse calculates width to accommodate "9999999.99" formatted.
oCol:nWidthChr := "My long Sentence"
XBrowse calculate width to accommodate the given string formatted
It is also possible to assign the widths in COLSIZES clause
while creating xbrowse like this:
COLSIZES "LONGEST VALUE", -24, 80, -12.3, etc.
Negative numbers indicate width in chars and character values
indicate the longest strings to accommodate.
(16)Enhancement: MouseWheel:
Shift+MouseWheel : Scrolls Left and Right
Ctrl+MouseWheel : Increases/Reduces Font Size
(17)Enhancement: SetColumns Menu:
Columns under different Groups are displayed in submenu
under each group. This avoids confusion where same header
is used under different groups. Columns with blank header
are displayed as "Col-nn", where nn is the number of the
column.
It is also possible to Hide/Show an entire Group.
(18)Custom painting of Header/Footer:
New datas oBrw:bPaintHeader, oBrw:PaintFooter,
oCol:bPaintHeader and oCol:bPaintFooter enable a
programmer to implement custom painting of headers/footers.
(19)New DATA nHeadDividerStyle ( init value NIL )
Initially a simple implementation in this version.
The style applies to both Header and Footer and affects
FLAT style browses only ( :lFlatStyle == .t. )
Permitted values are NIL (default behavior) or
LINESTYLE_NONE only.
When set to LINESTYLE_NONE
(a) if nColDividerStyle also is set to 0,
Column Divider is not painted in Header and Footer.
(b) if nRowDividerStyle also is set to 0,
horizontal dividers are not painted in Header/Footer.
* XBROWSER:
-The clauses SHOW RECNUM or SHOW SLNO, now the data
is displayed on the record selector, instead of a column
- XBROWSER <imagefilename> displays image in its own
dialog. A quick way to view any image.
* New function DateTimeFromFileTime( nTicks ) --> tDateTime
\fwh\source\function\valtostr.prg
viewtopic.php?f=3&p=188984#p188984
* Bitmaps directly from URLs. It is now possible to create bitmaps and
buttons directly from images on the web.
Example:
DEFINE BUTTON OF oWnd:oBar PROMPT "Aries" ;
FILE "http://weknowyourdreamz.com/images/zodiac-01-aries-ram-icon.png"
* Fix: Class TGraph Method MouseMove() was failing under some circunstances.
Now it is ok:
viewtopic.php?p=188472
* Fix: FWH 64 drag & drop files is working fine. Please review
samples\testdrop.prg
* New: WinRT API support implemented in source\function\winrt.prg
* Enhancement: Class TGet now uses Harbour Upper() instead of CharUpper():
viewtopic.php?p=189613#p189613
many thanks to Hakan!
* New: CLASS TImage METHOD RotateImage( nAngle ):
viewtopic.php?f=6&t=32330#p189634
Please review samples\testirot.prg. Many thanks to Luis Duque!
* function FW_ValToSQL() now handles enclosed "" by escaping it.
* NEW CLASS TRichEdit5
--------------------
@ nRow, nCol RICHEDIT5 oRTF ......
New: ( Same methods RichEdit ) and
Now use "Msftedit.dll" and "RichEdit50W"
1) METHOD ReplaceAll
2) METHOD MayMin() // Convert UpperCase -> LowerCase
3) METHOD MinMay() // Convert LowerCase -> UpperCase
4) METHOD InvMinMay() // Invert Lower -> Upper and Upper -> Lower
5) METHOD InsertTable()
Insert table and dialog configuration table
6) METHOD IsRTF() // if any file is RTF or not
7) METHOD SetSubInd( lOnOff )
METHOD SetSuperInd( lOnOff )
9) METHOD GetParaFormat( lInfo )
10) METHOD SetParaFormat( , nAlignment, nNumbering, nNumberingStyle, nNumberingStart, ndOffset, ndLineSpacing, ndStartIndent )
11) METHOD InsertObject( uFile )
Enhancement: set / get subscript and superscript font
Enhancement: set / get hyperlink and detect format in text selected
New sample Testrtf5.prg and testrtf5.rc
* Fix: function nExtMem() is returning now the same value in both
32 and 64 bits. It keeps returning zero for xHb.com
* Fix: function GetCpuSpeed() now reads from the registry and returns
the same value in 32 and 64 bits.
* BtnBmp:
- Fix: Placement of popupmenu in case of buttonbar created inside
another buttonbar.
- Painting of buttons without bitmaps on buttonbar with 3D style improved.
* Printer.prg:
- Enhancement: Methods SayText() and PrintImage() now accept cUnits as
last parameter and the return value is in the same units.
- Print output can be saved to an emf file by specifying emf file name
in FILE clause while creating Printer object. (Only first one page
is saved)
- Command syntax is provided for SayText() and PrintImage() to make
these methods easy to use. (print.ch)
#xcommand @ <nRow>, <nCol> PRINT TO <prn> TEXT <cText> ;
[SIZE <nWidth> [,<nHeight>] ] ;
[<unit: PIXEL,MM,CM,INCHES>] ;
[FONT <fnt>] ;
[ALIGN <aln>] ;
[COLOR <nTxt> [,<nBck> ] ] ;
[LASTROW <lrow>] ;
=> ;
[<lrow> := ] <prn>:SayText( <nRow>, <nCol>, <cText>, [<nWidth>], [<nHeight>], ;
[<fnt>], [<aln>], [<nTxt>], [<nBck>], [<(unit)>] )
#xcommand @ <nRow>, <nCol> PRINT TO <prn> IMAGE <img> ;
[SIZE <nWidth> [,<nHeight>] ] ;
[<unit: PIXEL,MM,CM,INCHES>] ;
[<lStr: STRETCH>] ;
[ ALPHALEVEL <nAlpha>] ;
[<lNoTrn: NOTRANSPARENT>] ;
[<lGray: GRAY> ] ;
[LASTROW <lrow>] ;
=> ;
[<lrow> := ] <prn>:PrintImage( <nRow>, <nCol>, <img>, [<nWidth>], [<nHeight>], ;
[<.lStr.>], [<nAlpha>], [!<.lNoTrn.>], [<.lGray.>], [<(unit)>] )
See \fwh\samples\testprn7.prg
* XImage.prg
----------
- If ximage object is created without specifying oWnd/oDlg, then the
object is created in its own dialog.
- New function XImage( uImage ):
Quick function to view any image source.
* Unicode:
- New functions lisDirW(), lMkDirW(), FileW(), lChDirW(), lRmDirW()
are Unicode versions of lsDir, lMkDir, File, lChDir, lRmDir.
Note: These functions can be used for Ansi file names also.
* New: FillRectEx( hDC, aRect, uBack )
uBack can be hBrush, nColorRef, ARGB (nAlphaColor), GDi+Brush object
or aGradientColors
* Enhancement: If last element of a Color Gradient is a logical value,
this value is used to determine veritcal or horizontal gradient.
(.t. for vertical and .f. for horizontal)
* Enhancement: Class TGraph has been enhanced by Rolando Salazar:
viewtopic.php?p=190059#p190059
many thanks!
* NIL values can be used as series datas
Ejm:
oGraph:aYVals = { "Jan", "Feb", "Mar", "Apr", "May" }
oGraph:aData = { { 14280, 20420 },;
{ 8350, 10315, NIL, NIL, 12340 },;
{ 12345, -8945, 10560, 15600, 17610 } }
* Added a new DATA
DATA lViewSRLegend INIT .F. // Allows to see aditional legends to the right of the latest serie value
* In SERIES, there are these new attributes:
- lViewVal: NIL or .T. .and. oGraph:lViewVal=.T., serie values will be seen
- lDrawPoint: NIL or .T. and graph type GRAPH_TYPE_LINES, a small circle will be drawn at the lines unions
- lDrawLine: NIL or .T. and graph type GRAPH_TYPE_POINTS, a line will be paint between the points
- cSRLegend: Not nil and oGraph:lViewSRLegend=.T. this string will be shown at the rightof the latest serie value
Ejm:
oGraph:aSeries = { { "Serie 1", CLR_CYAN , , },;//BAR y 3D por defecto
{ "Serie 2", CLR_HBLUE, GRAPH_TYPE_LINE, GRAPH_3D_SI },;
{ "Serie 3", CLR_HRED, GRAPH_TYPE_POINT, GRAPH_3D_NO,.T.,.T.,.T.,"Rojo" } }
* To use the tooltips, with the graph types GRAPH_TYPE_BAR, GRAPH_TYPE_LINES y GRAPH_TYPE_POINTS these new datas have been added:
DATA aBarCoors // Array with painted points coordinates {nY, nX, nProfundidad, nAncho, nSerie, nPos, nVal}
DATA aPoints // Array with painted points coordinates {nY, nX, nSerie, nPos, nVal}
How to use it:
- Define the tooltip as a codeblock (oGraph:cToolTip)
- When it gets evaluated it receives these parameters:
. Self: oGraph
. nSerie: bar serie number
. nPos: ::aData index
. nVal: the value
Use example
oGraph:cToolTip = {|oGph,nSerie,nPos,nVal| oGph:aSeries[nSerie][1] +CRLF+ oGraph:aYVals[nPos] + ": " + cValToChar(nVal)}