Hi Viktor,
I've already done something like that but with a changed version of GTWVW
and under xHarbour (I hope that someday Przemek will add RMDBFCDX under
Harbour also). I've changed GTWVW so when a resize its occurs it resize
every win32 control and font size to respect the new window size. Also it
resizes all subwindows. Also when I move the main window the subwindows
moved also. Even if it's a pseudo modal application (To be truth it's the
same clipper with Ctwindow functions application) but recompiled with
xHarbour and GTWVW with very few changes (guarded with Ifdef) its possible
to resize the application from the main window. Also its possible by the end
user to change Columns-Lines of the application and automatically change the
the font size. The best font for something like that it's a custom one
inspired from lucida console and there is no need to be installed to the
system (I'm using win32api addfont resource). I could send to everyone this
font but I'm not sure if its ok for other languages also.

Regards
Mike Evans

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Szakats Viktor
Sent: Friday, June 06, 2008 7:40 PM
To: Harbour Project Main Developer List.
Subject: Re: [Harbour] gtwvt font best setup

> I'd like some functionality which lets the users reshape
> the window, font size, font type. I reckon this will be
> a recurring problem once the app gets to the field.
> I could do that inside the app, but that would be far
> from intuitive in a CUI application
> (think of 'guess -> set -> try -> do it again until okay'
> cycle - I'm not sure which setting is realtime).
> [ I'm not talking about char screen resolution, because
> this would need changing display content on the app
> level. ]
>
>
> Another one is what Massimo mentioned once, is the
> possibility to control window closing, app shutdown.
> In control I mean enable/disable (closing) and catch
> it with a callback block. The xhb solution target this,
> but it seems to be solved in a not very elegant way
> (setkey plus some strange functions).
>
> Also screen scraping is helpful in ordinary DOS window.
>>>>>>>>>
>
> This all has been implemented in GTWVG long back. In a day or two I  
> will
> show the code. And infact I would like to encapsilate those methods  
> in core
> GTWVT.

Hi Pritpal,

To make my "wishes" a bit more clear:

(I'm talking about pure character display in
a graphical window, like GTWVT)

1) In resize, font modify I meant a method which is
    independent from app code, meaning a custom system
    menu, and ability to resize the graphical window
    with the mouse, and change font setup. Optionally
    some callback to catch the settings to enable the
    app to save those. This would also need support
    for a "scale factor" probably.
    So final layout would depend on:
       Screen size (not modifiable by this feature)
       Font name
       Font style (f.e. bold)
       Font size
       Scale factor

2) In "screen scraping" I meant the regular Windows
    command prompt feature to select parts of the window
    and copy the content to the clipboard as text. This
    also fully implemented by the GT, not requiring
    any application code, except maybe some optional
    callbacks.

I cannot find these in GTWVG, at least not in the
demo app. As for 2) it hasn't a meaning in GWTVG,
since it's fully graphical.

3) as for disabling 'close', I've actually found it
    working in GTWVT. It can be enabled by _SET_CANCEL.
    I'm not sure if this is good this way, as it gives
    a different meaning for an existing setting, and
    makes code more difficult to port between Clipper
    and Harbour. In Clipper I want to use my app with
    SET_CANCEL = .F., in Harbour + GTWVT I'd like to
    disable Alt+C still, but I may want to allow window
    closing, given that I can react to it from the app.
    These are two different things.
    So IMO here we should have a HB_GTI_ setting
    instead, plus a way to specify a callback.

Saying all this, what we need IMO is the option
to specify a HB_GTI_NOTIFICATION_BLOCK, which
gets called with specific event code in the above
cases:

- HB_GTE_REQUESTED_CLOSE
- HB_GTE_REQUESTED_SHUTDOWN
- HB_GTE_REQUESTED_SLEEP
- HB_GTE_GOT_SCREENCOPY
- HB_GTE_GOT_DROP
- HB_GTE_GOT_DRAG /* so we can let part of screen dragged to another  
window */
- HB_GTE_CHANGED_LAYOUT
- HB_GTE_CHANGED_OSRESOLUTION /* ~ */
etc...

Brgds,
Viktor

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to