New FTDN November/Noviembre 2015 (FWH 15.11)

New FTDN November/Noviembre 2015 (FWH 15.11)

Postby Antonio Linares » Sat Dec 26, 2015 9:26 am

November 2015
=============

TOUCH and TABLET support:
=========================

With Windows 10 it is possible to run the same Win32 application om Desktop,
Tablet and phone. Time has come to take advantage of the new features. While it
may be very difficult to think of a large data intensive application to run on
tablet and phone, we may find it appropriate to provide some applications to run
on different systems. We may also need to keep in mind that a desktop may suddenly
become a tablet, eg. convertible laptops. These recent changes provide us with
great opportunties as well as pose some challenges, not difficult to overcome.

In the legacy desktop applications, the environment at the start of the program
continues for the life of the application execution. Now the application should
recognize changes and respond to them by adjusting the GUI promptly, providing
the most comfortable user experience on every device. FWH has commenced its efforts
to support the endeavours of our programmers in this direction.

Environment that can be static / dynamic:

1) Nontouch screen with mouse support
2) Touch screen with phyisical mouse support
3) Touch screen without phyical mouse
4) Desktop mode vs Tablet mode (switching by the user)
5) Change in screen resolution, Portrait / Langscape
6) Physical size of screen ( desktop vs. small tablet / phone)


New functions Provided:
-----------------------

FW_IsTouchScreen()

FW_IsMousePresent()

FW_IsTabletMode() // This can be switched on any device. In tablet mode
the UI needs to be similar to Universal Apps.
Switch also changes main window size.

GetAutoRotationState()
AutoRotationPref()

IsEventByTouch() // to decide if a click,etc is by mouse or tap

ScreenWidthMM() // We need to know physical size of screen also
ScreenHeightMM() // in addition to the resolution

Modified:
METHOD LButtonDown( nRow, nCol, nFlags, lTouch ): 4th parameter lTouch
is new and indicates if it is physical mouse action or tap by finger

Eval( ::bLClicked, nRow, nCol, Self, lTouch ) is now provided with additional
parameter lTouch.


New Events provided by Event Handler
-------------------------------------

1) OnDisplayChange( nBitsPerPixel, nWidth, nHeight )

This event executes bOnDisplayChange codeblock if specified with the
same parameters.
This event occurs most frequently when Protrait/Landscape is changed or any
change in the display monitor.

By default the OS re-orients any maximized windows (including MDI) to fit the
new dimensions. In addition the programmer needs to adjust the display
of dialogs, sizes, rearrange controls, etc.

2) OnSettingChange( nWParam, nLParam )

This event executes bOnSettingChange codeblock if specified with the
same parameters.
While this event occurs on any change in the settings, the most common change
we need to consider is switch between TabletMode and Desktop mode either by
user choice or by docking/undocking a convertible.

3) HandleGesure( nGesture, nLParam )

This event executes bHandleGesture if specified, with the same parameters.
This event is triggered by a touch gesture like zoom, pan, rotation, etc.
Due to the way the existing code works for mouse-events at times not all
the gestures may be captured by this handler. Nonetheless, this is
very useful for enhancing the touch responsiveness of an application.
For example usage, please refer to the override methods in xbrowse.prg and
scrlpanel.prg.


Touch friendly Scrolling
------------------------

It is a bit uncomfortable to the user to scroll controls like browses on tablet
or touchscreen with finger on the scrollbars. It is far more comfortable to scroll
by panning with finger anywhere over the client area of the control.

Now the following controls support touch scrolling:

TMultiGet (by OS by default )
TEdit multiline mode (by OS by default )
XBrowse (by FWH 15.11)
ScrollPanel (by FWH 15.11)
Recommended that using controls on ScrollPanel is a good way of handling
input screens on screens of different sizes
TXImage (by FWH since beginning)
Note: This control provides zoom/unzoom by zoom/pinch touch gestures

Optional Touch friendly features:
---------------------------------

* New setting: FW_TouchFriendly( lOnOff ) --> lPrevSetting

FWH proposes to offer a set of touch friendly features if this
setting is ON.

We know by experience that when we run a win32 program on a Tablet, it
is tortuously difficult to select an item from combobox/ listbox/ menu
with tap of a finger. In this version when some controls are invoked by
the user by touch, the items are displayed separated by adequate space
for comfortable selection by the user. This space is calculated for each
device separately depending on the physical dimensions ( 6 millimetres ).
When the same control is invoked by physical mouse click or by keyboard
action, the items are diaplayed with standard spacing.

1) Combobox
2) ListBox (not xbrowse EDIT_LISTBOX yet)
3) Dropdown menu items (some more fine tuning needed)

Samples:

1) fwh\samples\w10mode.prg: Simple and to the point example of
the kind of events neeed to responded to during runtime.

2) fwh\samples\testscrlp.prg: Demonstrates convenience of
using scroll panel for input of large data. Based on TDataRow
class modified to suit device portability. The ease of scrolling
the controls and gets with touch, adaptation to rotation of
the device, repositioning of gets when touch keyboard pops up
are to be noticed. New program code in datarow.prg for device
portability is recommended for study.

3) fwh\samples\testxbr3.prg: This program was originally designed
as an MDI desktop application. Running such an application on
a tablet would be very uncofortable. Now, using the support of
new FWH libs and with a few modifications, this program is made
to work seamlessly on desktop and tablet with full user comfort.
Features to be noticed are touch friendliness in scrolling browses,
menu spacing, handling rotation, dataentry screens, adjustment
of focused Gets when touch keyboard popsup, etc. Changes in the
program are recommended for study. This program is meant to
demonstrate migration of existing software for working on both
desktops and tablets.

4) A simple one line program 'XBROWSER "CUSTOMER.DBF" FASTEDIT' may
be tried both on desktop and a tablet to test the inbuilt
capabilities of the present FWH version.

Note: All tests are conducted on Windows 10 tablets and touch sceen
PCs and use Windows 10 features.

Future Directions
-----------------

It is the endeavor of FWH to provide as much support as possible to help our
programmers to deliver suitable applications that work seamlessly on Desktops,
tablets, convertibles and phones with as smooth user experience as possible.
FWH welcomes comments on the features so far provided and propose more features
to be implemented in future to achieve this objective.


CONTROLS with Windows 10 look
------------------------------

1) TSwitch new style OVALSTYLE
2) TSlider new style SLIMSTYLE


APPLICATION FOCUS
-------------------

- New CLASS DATA of TWindow class: bAppFocus

While bGotFocus and bLostFocus apply to individual windows, bAppFocus
applies to the entire application. If assigned, this codeblock is evaluated
whenever the appliation loses focus and gains focus to/from other applications.
Usage:
TWindow():bAppFocus := { |lGotFocus, oWnd| OnAppFocus( lGotFocus, oWnd ) }
This assignment may be made at the very beginning of the Main() function.
lGotFocus : True when the application gets focus and False when loses focus.
oWnd: Window/control of the application having focus before the application
lost focus and the window/control which received focus when got focus.
It is advised that no screen I/O may be performed while executing the codeblock.


XBROWSE:

1) It is now possible to paint a row across some or all columns
using new DATA oBrw:bPaintRow
Usage:
oBrw:bPaintRow := { |oBrw, nRow, nCol, nHeight, lHilite, lSelected, nScreenRow | ;
MyPaintRow( oBrw, nRow, nCol, nHeight, lHilite, lSelected, nScreenRow )

This codeblock is called before painting each row. Programmer can choose to
paint the entire row or part of the row and return .f. to inform xbrowse not
to paint the row and otherwise just return .t. to indicate xbrowse to paint all
columns of the row in normal manner.
Sample will be posted in the forums.

2) Enabled vertical scrolling with pan gesture ( keep finger anywhere on the browse
and pan up and down ) on touch screens. This is far more convevinent way than
using scrollbar with touch.

3) Fix: Method SetBackGround(). When used in the command creating the xbrowse,
the header calculations are being skipped resulting in incorrect painting. Fixed

4) Fix: XBrowse: Though oCol:cEditPicture can be a codeblock, some old code
in some methods was treating this data as character value resulting in
runtime errors. Fixed.

5) ToExcel(). This method depends on ExcelTranslate( cFormula ) in olefuncs.prg
to translate the formulas exported suitable to different language installations
of Excel. While this function is handling ListSepartors properly in non-English
installations, ignoring change of delimiters in English installations. This
is resulting in run-time error in some cases. Fixed.


TCBROWSE:

- Enabled Unicode support.

GET with XBrowse Support:

- New: function PopupBrowse( aValuesOrRecordset, oGet, bInit ). Use it this way:

REDEFINE GET oGet VAR ... ;
ID ... OF oDlg ACTION PopupBrowse( aValues, oGet, bInit )

Its similar to a combobox but with all the xbrowse possibilities!!!

MENU:

- Fix to A longstaning bug in Menu system:
Dropdown menus are being painted right aligned on Windows Server 2012. Fixed

SCINTILLA / FIVEDIT:

- Implemented Cursor Width
- Implemented Caret type: block, normal, invisible
- Changes Menus Popup Contextual Editor and margins
- Bug Fixed List Functions HB_FUNC
- Search selected text ( menu contextual )
- Bug Fixed delete item project
- Improvement, change back colors
- Improvement, build project
- Initial implementation add/del/sort libs of FW, Harbour and compiler C
- Create file.BAK old file to save file
- Syntax colors and folding for files .C
- Implementation return to previous position

GENERAL:

* Fix: bar.prg: When buttonbar on a dialog is created from resources and
some buttons have group attribute, the spacing between buttons was being
computed wrongly. Now fixed.

* Enhancement: Function RoundBox() now accepts 10th optional parameter brush
color. (wndboxes.c)

* Improvement: oWnd:SayPalBmp() now accepts alignment parameter as
7th param or 6th element of aRect array


November 2015 (FWH 15.10 released 5 Dec 2015)
=============================================

* Enhancement: TMenuitem, allows use of bmps, pngs, jpgs
Thanks to Manuel Alvarez ( mastintin )

* Enhancement: function ABPaint() now accepts a sixth and seventh parameters to
directly resize the painted image. Thanks to Enrico!

* Enhancement: TXImage: Can now be created from resource.
New data lUseGDI default .t. If set to .f., uses FI

* New function FW_UTF8PADR( cText, nBytes )

* Fix: Errsysw.prg: Function SetErrorFileName(cFile) was not setting the new file
name. Fixed. Thanks Mr Enrico viewtopic.php?f=3&t=31583

* sqlcmd.ch:
Enhancement: SQL INSERT command. Now column names are optional.
New: SQL INSERT INTO <table> [( <colnames> )] ARRAY aData
for Bulk Inserts

* Enhancement: Cuebanners of TGet and TEdit now support Unicode also.

* New functions: StrToWide() and WideToStr(). Appropriately use Ansi/Unicode functionality

* Enhancements Edit control: Additional clauses RIGHT,CENTER,UPPERCASE,NUMBER,UPDATE

* New: TClipBoard new method SetWideText( cTextW )

* Enhancement: Added unicode support for XBrowse ToExcel() method when lExcelCellWise is
set to .T.

* Fix: Excess Release Font in TMsgItem, fixed

* Enhancement: Clausule HEIGHT for MENU - Define Height of Items
Use: MENU oMenu HEIGHT 2 ( default 1.66 )

* New: Function SourceEdit, control editor Scintila in MemoEdit.Prg
Example in Fivedit.prg

* Enhancement: Class TScintilla, added numerous news methods and datas for full
support new FivEdit Editor
Added Unicode characters and files support

* New: Fivedit.prg full code Editor
viewtopic.php?f=6&t=24025&start=450#p184231
See pre- and post messages

* Change Old Fivedit.prg to Fivedit0.prg, now support new Class TScintilla

* Fix: XBrowse.prg: When block of data is copied from Excel sheet and pasted
into xbrowse, run-time error occurs with xHarbour. Fixed in static
function ClipTextAsArray( cText )

* Fix: ComboMetro class: Fixed wrong detection of sort status of the
combobox items.

* RDDADS related workarounds in xbrowse.prg and database.prg:
It is noticed that when OrdSetFocus() is empty, OrdKeyGoTo() errors out
in Harbour version of RDDADS. While the function does not error out
in xHarbour version, the function does not work when OrdSetFocus() is
empty. Suitable workarounds are attempted in xbrowse.prg and database.prg.

* Enhancement: XBrowse: Vertical fonts in cells are now painted as expected.

* Enhancement: oWnd:SayText(...) can now paint multi-line text also with
vertical fonts.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN November/Noviembre 2015 (FWH 15.11)

Postby TimStone » Sun Dec 27, 2015 12:15 am

Antonio,

After the 1st of the year, I will be working with these features and more. My test machines include:

1) Tower with ultra-wide monitor
2) All In One desktop with 23" touch monitor
3) Microsoft Surface Book
4) HP 8" Tablet
5) Microsoft Lumia Icon with Windows 10 mobile.

Thus, I will be able to test across all modalities.

Question: I understand these features with Harbour / Visual Studio 2013 should be no problem. Will you also be able to use them on the latest version of xHarbour ( .com version with xBuilder ) ?

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: New FTDN November/Noviembre 2015 (FWH 15.11)

Postby nageswaragunupudi » Sun Dec 27, 2015 6:52 am

Correction to samples\w10mode.prg

Please include
Code: Select all  Expand view  RUN
#define WM_DEVICECHANGE                 0x0219
 

immediately after
Code: Select all  Expand view  RUN
#include "fivewin.ch"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FTDN November/Noviembre 2015 (FWH 15.11)

Postby nageswaragunupudi » Sun Dec 27, 2015 7:10 am

Mr Tim

We tested all the features on bcc7 xHarour and Harbour and VS 2013 32 and 64-bits.

We did not test with xharbour.com but expect the features to be compatible. In case you experience any issues, we shall promptly attend to them.

We tested the features on touch-screen desktop and windows 10 tablet 7". It will be of a great help if you can test on all devices and provide us your valuable feedback.

We are looking forward to suggestions and proposals for additional features and support expected from FWH to enable production of software that can work seamlessly across all devices.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FTDN November/Noviembre 2015 (FWH 15.11)

Postby TimStone » Sun Dec 27, 2015 6:13 pm

Good Morning,

The only reason I have not dropped xHarbour.com is because I have some clients on older ( 7 & 8 ) versions of ADS, and I never was able to get the proper library built that would be backwards compatible using Harbour. I do have one with xHarbour.com that works across all ADS versions. Antonio and I tried but were never successful in getting the proper libraries. Therefore I now build everything with two versions ... xHarbour.com and Harbour/MSVC 2013.

After the new year begins, I can test across all devices. Right now I'm finishing a major upgrade project that has taken my time all year. It now provides me the structure to better enhance all of the "internals".

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: New FTDN November/Noviembre 2015 (FWH 15.11)

Postby Antonio Linares » Sun Dec 27, 2015 10:30 pm

Tim,

Maybe we should try to build the library again
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 9 guests