Upd: ListerPlugin Syntax Viewer/Editor: hpg_ed 0.5

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

hpg
Junior Member
Junior Member
Posts: 79
Joined: 2003-03-16, 12:20 UTC

Upd: ListerPlugin Syntax Viewer/Editor: hpg_ed 0.5

Post by *hpg »

8) A programmers viewer and editor.
New version 0.5:
Fixes:
- PASCAL syntax highlighter was not shown in configuration dialog.
- The states (enabled/disabled) of the toolbar buttons did not correctly
display the states of the current loaded file in editmode.
- Corrected the version information, in 0.4 the files' version info was set
to 0.1.4 instead of 0.4(!).
Changes:
- Added default font chose dialog.
- Implemented a simple print function (does NOT use the Listers default
font nor character set, instead the default listers font will be used.
- Added more options to configuration dialog, tab stops, smart tabs etc.
- The internal configurations dialog's style is set to StayOnTop because
it was not possible to let it stay in the font of the lister window.

Download: http://liveordead.de/free/hpg_ed.zip

Regards, have fun!
_________________
hpg666@hotmail.com (hpg :-)
hpg
Junior Member
Junior Member
Posts: 79
Joined: 2003-03-16, 12:20 UTC

Post by *hpg »

Update 0.5.1 (still beta):

Fixes:
- Ini-Syntax Highlighter parser error.
It crashed if a line exeeds 1025 characters.

Version 0.5.1 download: www.liveordead.de/free/hpg_ed_051.zip

Regards,
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

Could you add support dot XML and PHP files?
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
hpg
Junior Member
Junior Member
Posts: 79
Joined: 2003-03-16, 12:20 UTC

Post by *hpg »

fabiochelly wrote:Could you add support dot XML and PHP files?
for XML you can use HTML (is almost compatible)

PHP - probably later, the editor is not enhanceable, no public interfaces ;-)

Regards,
hpg
Junior Member
Junior Member
Posts: 79
Joined: 2003-03-16, 12:20 UTC

Post by *hpg »

Next Beta Version 0.5.3
available at: http://liveordead.de/free/hpg_ed_053.zip

Changes:
V 0.5.3:
Changes:
- chg: using TCMD's suggested directory to store its own ini file in (hpg_eg.ini)
- fix: client region was not always correctly calculated
- fix: configuration dialog's StayOnTop attribut forced the select font dialog
to be displayed behind the config dialog.
- add: using 2 different fonts one for ASCII and another for ANSI display.
Note: you'll need to set up this in hpg_ed's own configuration dialog because
there is currently no API call implemented in TCMD's lister to get its information!
directly.
- chg: the configuration dialog is now plugged in the main lister form and
replaces the editor. This is a workaround of strange behaviors with topmost
dialogs etc.
- chg: changed the configuration dialog and split up the properties into
different sections for easier configuration.
- add: added sample to fonts section to test the two fonts immediately without
the need first to change back to the editor.

V 0.5.2:
Changes:
- Added line/column display of current selection.
- Added % display of current position.
- Added support for jump to % via Listers percent menu item.
- Added 'jump to line' function. Click on the line/columns display opens
the jump to line dialog.
- Avoid the flicker when showing hpg_ed's form a little bit (moved alignment
of controls before showing form).
- When pressing 'n' or 'p' in full lister view (F3) the next and previous.
selected (if any) files will not be loaded if not using the lister's menu.
Now you can press 'n' or 'p' two times (only in non-edit mode!).
The first keypress sets the focus on the lister's main window the second one
is processed by the lister itself instead of the hpg_ed's one.

Known Restrictions:
- In Syntax highlighting mode the editor can only display up to 100000 lines
of source code. If changed to text or ini highlighting mode the file may
be larger.
- If the file is very large the performance of the editor is decreased a lot.
User avatar
SCHMaster
Member
Member
Posts: 199
Joined: 2003-02-08, 00:39 UTC
Location: Ukraine
Contact:

Post by *SCHMaster »

2hpg
Configuration dialog - The excellent decision!
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

hpg wrote:- add: using 2 different fonts one for ASCII and another for ANSI display.
Note: you'll need to set up this in hpg_ed's own configuration dialog because
there is currently no API call implemented in TCMD's lister to get its information!
directly.
You can read wincmd.ini file yourself and take these settings from there.
hpg
Junior Member
Junior Member
Posts: 79
Joined: 2003-03-16, 12:20 UTC

Post by *hpg »

Valentino wrote:
hpg wrote:- add: using 2 different fonts one for ASCII and another for ANSI display.
Note: you'll need to set up this in hpg_ed's own configuration dialog because
there is currently no API call implemented in TCMD's lister to get its information!
directly.
You can read wincmd.ini file yourself and take these settings from there.
:) Yes I could, but what if Christian wants to change its font's location?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3868
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

hpg wrote:... if Christian wants to change its font's location
Until now INI settings have never been changed ... only enhanced.

Nevertheless : the plugin has to follow its master :)
#5767 Personal license
konmeo
New Member
New Member
Posts: 1
Joined: 2003-03-25, 07:47 UTC

Post by *konmeo »

I like the latest version very much. But can you fix the bug that allows scrolling pass the end of file indefinitely using Down Arrow or Page Down even though "Cursor beyond EOF" has already been turned off?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48203
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2hpg
Regarding fonts, you can indeed get it from wincmd.ini. To get the location of wincmd.ini, implement the function ListSetDefaultParams . In parameter DefaultIniName, replace the file name given by TC by wincmd.ini to get the full path+file name of the ini location. If no font name is stored, TC uses GetStockObject to get default fonts.

I also recommend that you make the font user-configurable, but do NOT modify wincmd.ini - store it in your own ini. Reason: The user may want a different font for your plugin than for lister itself.
Author of Total Commander
https://www.ghisler.com
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

ghisler(Author) wrote:2hpg
To get the location of wincmd.ini, implement the function ListSetDefaultParams . In parameter DefaultIniName, replace the file name given by TC by wincmd.ini to get the full path+file name of the ini location.
This won't work in my case because I changed name of wincmd.ini. On PC with several users there can be the same situation (bob.ini, ivan.ini, mefody.ini). IMHO, registry should be also read, but I don't know what should be used first - registry or ListSetDefaultParams (User may pass path to INI via TC command line).
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2hpg
Hi!
1) Options dialog is now placed in Lister window. My Lister window is maximized but only its small portion is used by Options dialog and this portion is much less than dialog, so vertical scroll bar appears and I need to scroll to see "Show line numbers" option, for example.
2) After I changed font I had to close and open Lister to see the changes. Even Reload didn't help.
3) Please add F2 hotkey for reload (as in Lister) in addition to (or instead of) Ctrl+R.
4) In context menu you show "Ctrl-S" for Save but "Shift-Control-S" for Save As. The same for bookmarks.
5) In context menu in highlighter sub-menu (Ctrl+H) I see one empty line at the end (after INI).
6) In the Go To Line dialog german "Abbrechen" is used for "Cancel".
7) I have file with 515 lines and 515 is shown as max line number at the top bar but in Go To Line dialog max line number shown is 468 (although I can type any there).
8 ) Last character in italic line is cut off.
9) Plugin tries to diplay not only registered for it extensions but others too. DLL for example - shows 3 first characters.
10) I don't like imposed color scheme... :)
AXL
Junior Member
Junior Member
Posts: 6
Joined: 2003-02-13, 22:18 UTC
Location: Estonia

Post by *AXL »

  1. Options / Wrap text - doesn't really work
  2. Vertical scroll bar scrolls only up to column 256 even if line is longer
  3. It is possible to move cursor to infinity both vertically and horizontally.
    Must stop at last line and move from last character on the line to first position on the next line.
  4. Option to position cursor at the end of line when clicking behind the end
thanks
bidule
Junior Member
Junior Member
Posts: 2
Joined: 2003-02-21, 14:40 UTC

Post by *bidule »

When Ctrl-End on a quite long line (360 k single-line file), I've got this :

"Fehler bei Bereichsprüfung."

Wrap lines does not work in these conditions, but it didn't in Lister either.

Otherwise, it's really beautiful :)
Post Reply