"High dpi" means, that the monitor of the computer a program is running displays more…
1) Improved component WPImagelist which holds the icons for the TWPToolbar, SVG support.
If you add the unit WPIcons to your project (i.e. in one uses clause) all TWPToolbars will automatically use the new, nicer icons. The color icons can now display the current color.
You can use the WPImageList with the TWPToolButtons to create a modern GUI easily.
The WPImageList can also populate a standard TImageList.
The TWPImageList now includes an embedded SVG rendering engine to render toolbar and ruler symbols at the correct resolution at the time they are required. This reduces the size of the application and at the same time offers support for any high resolution. Since rendering can be adapted it is possible to use the same SVG source for light and dark themes. Requires Delphi XE2 and later.
The SVG rendering engine is also used by the new components TWPSvgImage and TWPSvgGDIRenderComponent which can be used to display SVG graphics.
To display an inspector like grid, you can use the new API AppendPropertyGrid and AppendPropertyRow.
h3) Inplace Editors, Checkbox controls
The check boxes can be automatically created within property grids. But they can also be added in code to any cell or text object. Internally they are based on a “InplaceEditor” architecture which will be subsequently extended and improved.
Now it is possible to have round and square check boxes, also with radio button functionality. It is also possible to use an event to paint the appearance, i.e. by using gylphs from the TWPImageList. The extended properties used by the inplace editors can be saved in WPT format.
4) Dynamic Tables (TableProducer component – included in WPTools “Bundle”)
Do you need to present the user the result of a database query and also print it? With WPTools’ dynamic tables the user can not only browse the result of the query, but also change the appearance of the table and the data cells and print it in WYSIWYG manner.
In contrast to “data-grid” solutions, it is also possible to copy part of the created tables and paste them directly into a word processor program, such as MS Word or, of course, TWPRichText.
It is now much easier to create the templates for the tables in code:
template := WPTableProducerDB1.Blocks.Add('MASTER') as TWPBlockTemplateDB;
for I := 0 to fields_master.Count-1 do
template.AddColumn( fields_master[i], nil );
We also created an extensive demo which uses the PropertyGrids and TableProducer.
Our word processor demo also shows the TableProducer – you can open a SQLLight file and select the rows which should be included in the grid using the WPTools check- and radiobuttons top the left.
5) Improved, more intuitive API
5.1) Compact coding
Many low level TParagraph methods return a reference of the used paragraph. This makes compact and easy to understand coding possible. You can simply append assignments and insertions separated with ‘.’
Example – create a page numbering footer:
5.2) Improvement to function TableAdd to force a row break after a certain column.
5.3) There is now a simplified variant of TableAdd() which works with an anonymous procedure as callback
procedure(RowNr, ColNr: Integer; par: TParagraph)
5.4) Function GotoBody to move the cursor which is in a text box in the body text at the closest position
5.6) Now a colspan parameter can be specified in TParagraph.AppendNewCell
5.6) The layer TWPRTFDataBlock now includes LoadFromString and LoadFromStream with FormatString parameter
5.7) Many new functions to make programmers live more easier, i.e GetSelStartEnd, InputTextbox, etc
6) New options for the WYSIWYG header and footer support:
In property ViewOptionsEx2 this flags are supported:
In property EditOptionsEx2 this flags are supported:
wpDontEnterHeaderOnClick – do not enter the header on mouse click.
On Cursor movement the body is selected instead!
wpDontEnterFooterOnClick – do not enter the footer on mouse click.
On Cursor movement the body is selected instead!
7) New possibility to automatically direct all character attribute changes to the attributes of the paragraph
>wpAttrChangeOperateOnParAttr in EditOptionsEx2
If this flag is set, a change of the font of a paragraph will not change the current writing mode or the selected text but the paragraph(!) attributes directly. The effect is, that the complete paragraph will change. Also the character attributes will automatically cleared. We uses this feature in our TableProducer demo. Here the user can change the attributes of the lines with the field names and later this attribute will be used to update the table. So the user can directly change the background color or use a bold or italic font style.
8) Support for the Windows Emoji Font.
Symbol objects can now be rendered using Direct2D (on a temporary bitmap, for compatibility). This enables the colors in certain fonts, such as the Segoe UI Emoji font. The emoticons are saved and loaded in standard RTF, HTML and DocX format.
The special rendering can be enabled using ViewOptionsEx2 and is also activated in the Insert-Symbol dialog for the font with the name in the variable WPDrawD2DTextForFont and can also be selected per object.
9) Support for Windows Emoji Dialog
Supported are also family symbols, skin tone and gender modifier included.
10) Several important improvements in GUI, HTML loading, RTF loading, DocX support.
+ use the global variable WPDrawRectWithBitmap_bitmap to show a themed “desktop”.
– the ruler can use the current theme and draw enlarged symbols (Delphi XE2+)
Simply load an image from the provided resource WPShadePNG.RES.
+ Improvements in RTF reading and writing
+ Improvements in HTML reading and writing
* improved touch support
* improved UNDO support
* support for embedded SVG images (in WPT format)
Many improvements to editor for better usability and stability.