Adaptation of FiveWin class TsBrowse to HMG
Moderator: Rathinagiri
Adaptation of FiveWin class TsBrowse to HMG
Hello,
I want to present an adaptation of FiveWin class TsBrowse (original author is Manuel Mercado) to HMG
It is a dirty and fast adaptation of the current minigui ext. code.
The archive contains the all needed changes in the HMG sources and make batch for compiling tbrowse library for HMG folder structure.
Remark. There is a major limitation for TBrowse font handling in this conversion because HMG don't have a Font control yet
Warning. This distribution is provided AS IS, without any warranty.
I want to present an adaptation of FiveWin class TsBrowse (original author is Manuel Mercado) to HMG
It is a dirty and fast adaptation of the current minigui ext. code.
The archive contains the all needed changes in the HMG sources and make batch for compiling tbrowse library for HMG folder structure.
Remark. There is a major limitation for TBrowse font handling in this conversion because HMG don't have a Font control yet
Warning. This distribution is provided AS IS, without any warranty.
- Attachments
-
- Demo screenshot
- demo.jpg (349.83 KiB) Viewed 11602 times
-
- hmg-tbrowse.zip
- TBrowse changes in HMG folder
- (585.71 KiB) Downloaded 1073 times
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Adaptation of FiveWin class TsBrowse to HMG
F(u)(a)ntastic Grigory! Really a milestone.
Congrats and thanks.
Congrats and thanks.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Adaptation of FiveWin class TsBrowse to HMG
Thank Ffilatov!
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Adaptation of FiveWin class TsBrowse to HMG
Many Many Thanks Grigory!gfilatov wrote:Hello,
I want to present an adaptation of FiveWin class TsBrowse (original author is Manuel Mercado) to HMG
It is a dirty and fast adaptation of the current minigui ext. code.
The archive contains the all needed changes in the HMG sources and make batch for compiling tbrowse library for HMG folder structure.
Remark. There is a major limitation for TBrowse font handling in this conversion because HMG don't have a Font control yet
I'm a little busy right now, but I'll test it tonight and I'll let know you about my experience.
Regarding font object, IMHO, it is out of HMG coding style.
The user must be able to assign a font name and style directly to a control (or control components) without caring about the creation a separate font object.
So, HMG must not have an 'user-exposed' font object, but if you need to add one for TSBROWSE use, there is no problem for my part, but it should be handled as in the rest of HMG controls (the required font object is automatically created and hidden to the user).
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Adaptation of FiveWin class TsBrowse to HMG
Anyway, since TSBROWSE, will be an optional component (not part of HMG core) there is no need to be so strict regarding control design rules in HMG, so, if you want to port font control to be used with TSBROWSE, there is no problem from my part.Roberto Lopez wrote: So, HMG must not have an 'user-exposed' font object, but if you need to add one for TSBROWSE use, there is no problem for my part, but it should be handled as in the rest of HMG controls (the required font object is automatically created and hidden to the user).
Please remember that if you decide to do it, font control must be conditionally compiled in the same way as the rest of TSBROWSE code.
Thanks in advance.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Adaptation of FiveWin class TsBrowse to HMG
Roberto,Roberto Lopez wrote:...
if you want to port font control to be used with TSBROWSE, there is no problem from my part.
Please remember that if you decide to do it, font control must be conditionally compiled in the same way as the rest of TSBROWSE code.
Thanks in advance.
It is possible. But it will be require adding the 7th parameter Angle for support vertical fonts to the following core function:
Code: Select all
HFONT PrepareFont( char *Fontname, int FontSize, int Weight, int Italic, int Underline, int StrikeOut, int Angle )
{
HDC hDC;
int cyp;
memset( &cyp, 0, sizeof(cyp) );
memset( &hDC, 0, sizeof(hDC) );
hDC = GetDC( HWND_DESKTOP );
cyp = GetDeviceCaps( hDC, LOGPIXELSY );
ReleaseDC( HWND_DESKTOP, hDC );
FontSize = ( FontSize * cyp ) / 72;
return CreateFont
(
0 - FontSize,
0,
Angle,
0,
Weight,
Italic,
Underline,
StrikeOut,
DEFAULT_CHARSET,
OUT_TT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
FF_DONTCARE,
Fontname
);
}
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: Adaptation of FiveWin class TsBrowse to HMG
Hi Grigory,
Your contribution is truly great. On the otherhand the TsBrowse completes the Clipper function Tbrowse for HMG. It is indeed great! Thank you very much for your unselfish contribution.
To Roberto,
Thank you also for HMG and HMG Objects.
More power!
Regards,
Danny
Your contribution is truly great. On the otherhand the TsBrowse completes the Clipper function Tbrowse for HMG. It is indeed great! Thank you very much for your unselfish contribution.
To Roberto,
Thank you also for HMG and HMG Objects.
More power!
Regards,
Danny
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Adaptation of FiveWin class TsBrowse to HMG
If the modification does not affect the current functionality, I have no problem about that.gfilatov wrote: It is possible. But it will be require adding the 7th parameter Angle for support vertical fonts to the following core function:
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Adaptation of FiveWin class TsBrowse to HMG
Grigory,
And, for your next code post, please include conditional compilation directives (if required) for h_init.prg.
Thanks in advance.
And, for your next code post, please include conditional compilation directives (if required) for h_init.prg.
Thanks in advance.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Adaptation of FiveWin class TsBrowse to HMG
Yes, of course.Roberto Lopez wrote:Grigory,
And, for your next code post, please include conditional compilation directives (if required) for h_init.prg.
Thanks in advance.
Thanks for your attention!
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein