News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

QE version 30t.

Started by hutch--, November 05, 2006, 11:53:04 PM

Previous topic - Next topic

hutch--

Sorry to wear anyone out but I have actually had the time to do some work on QE. Apart from using the high contrast red interface, version 30t adds two changes.

1.  An extra menu item has been added to make the use of multiple instances much closer to that of an MDI interface but without the constraints and clutter of MDI. It is placed just before the "Help" menu which is reasonably authodox for a window menu of this type. It uses an enumerate windows technique so that it is always up to date with which QE files are open and the names of the files. The editor already has the support to save and close all from the "File" menu.

2. The selection of words by double clicking on the word has fixed a messup that Microsoft made from win2000 upwards where double clicking on the word selected not only the word but all of the spaces/tabs up to the next word wich made selection of the exact word a lot slower. To suit programming issues of selection, the algo will select words that have underscores and periods contained in them.

I have found so far that both mods make coding faster.


  WS_EX_ACCEPTFILES
  wc.lpfnWndProc


Fixed version posted below.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

While I'm not a huge fan of the red, the Window menu is very nice and will definitely help see when the same file is open more than once :wink . Would it be possible to get all the files in the same order for each window? Rather than the current window at the top? I tend to memorise menu positions rather than read the text every time.

As for the word selection algorithm, I LOVE IT! That's the most annoying thing about rich edit boxes (though normal edits are worse - trying doing this stuff in Notepad  :dazzled: ). Not sure on periods yet, since I feel the two items (on either side) should be selected separately, but underscores are great! Would it be too much work to implement that for Control+Arrow/Control+Shift+Arrow combinations as well?

I think you're on route to having the ideal edit box. Maybe you should release it as a custom control :bg

Cheers,

Zooba :U

hutch--

I found something that did not work correctly, if the menu was refreshed from the menu edit DLL it removed the "Window" menu. That attached version fixes that. To compliment the "Window" menu I have added a menu option on the "File" menu to open a file in a new window, easy enough to do and did not blow the file size out.

The way I load the Window menu is by enumerating the windows running in the system and adding those that have the correct class name to the menu. The window that selects the Window menu always is found first and the rest occur in the order that they are read from the OS.

I will have to think about the word selection algo, its controlled by a normal character table so its easy enough to change but I thought structure member selection was one of the convenient options along with words constructed with underscores.

[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

EddieB

Hey Hutch, Loving QE :)

What dll's does qedit require for the additional menus like in the masm folder?

Cheers

hutch--

Eddie,

If you have a look at the qeditor.hlp file under the topic "How it works" it explains what the DLLs do and how they are detected by the editor. All of the DLLs are load on call, used then unloaded when finished as it reduces the memory footprint of the editor by doing so.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

Quote from: hutch-- on November 06, 2006, 07:14:36 AM
I will have to think about the word selection algo, its controlled by a normal character table so its easy enough to change but I thought structure member selection was one of the convenient options along with words constructed with underscores.

I've had more of a play now. Words with underscores are spot on, since they are used to join parts (where spaces would otherwise break them). IMHO the dot is a separator. So if I double click on pView in [esi].FILEMAP.pView, I would expect pView to be selected, rather than .FILEMAP.pView. This is what I would call structure member selection, since it only selects the member rather than the structure itself.

Also, double-clicking the comment lines which come in scripts with QE won't select them. Maybe triple click for the entire line... you've inspired me now, I'm off to write a 'super-double-click' plugin for QE :bg

EddieB

Ah, Ive got it now, Many thanks :)

hutch--

Something I have got used to is the selection bar on the left side of a rich edit control, selecting a single line or multiple lines is very fast using that technique.

This is the table I am using and its easy enough to modify, I did the safe stuff first, characters in either case, numbers and the underscore and period. I think probably if the normal punctuation was left out and things like normal brackets and braces as well as spaces and tabs, anything under ascii 33, much of the rest could be included and it may even work OK with square brackets but it would make a mess of complex addressing [eax+edx*8+64] so I don't know if there is a good way to handle this situation.


    ' -----------------------------------------
    ' upper and lower case, numbers and "_" "."
    ' -----------------------------------------
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
      ! db 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
      ! db 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
      ! db 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1
      ! db 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
      ! db 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
      ! db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0


I have been paddling away at QE 4 and the new stuff in QE30 has come from the later version but there is a lot of work to get it all up and going. I have a far faster and more powerful scripting engine which can probably be added directly into qe40 but I would have to write all of the editor specific stuff that is not currently in the script engine. What I am mainly after is the richedit 3.0 functionality as it can do more and is faster on large files. The new version has better internal architecture and should probably be more extendable but there is a lot of work to get it all up and going.

There is enough code in the scripting engine to be useful in an editor, it has a very flexible and reasonably fast hash table data structure which is used in the script engine to replace all of the target labels with their appropriate offsets in one pass so its probably not a bad idea to do it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

Sounds great :thumbu

More extensibility would be good, I've been playing with plugins for the current version for an hour or two now and have discovered my plans were in vain, since plugins only exist for the length of QePlugIn (triggered by the menu).

I would be very happy to help with version 4, if that is possible or helpful. If not directly with the code, perhaps to implement some less essential functionality as plugins. Just yell :bg

Cheers,

Zooba :U

P.S. Yes the table is easy to modify... if you've got the source code :P  :bdg

hutch--

Give this a blast. I added a remote table so that if chtbl.ini exists, it will read it in and use it instead of the default table for the character selection.

The table is normall produced in this form, 256 0s or 1s with optional comma delimitation. I have set the test table without the period and included all of the high ANSI characters.



  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
  0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1
  0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1


[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

Very nice   :cheekygreen: :green2

I have noticed that double-clicking just before a period (in fact, any 'disallowed' character) will select the word after it even if there is one before it, ie. double clicking FILEMAPVIEW.pRealStart between W and . will select pRealStart. I assume your algo is searching forward for a selectable character - can it start one character earlier? This way it will catch this case. (Same deal with ]. sequences ([edi].FILEMAP), double clicking between i and ] will move the cursor to between the ] and the period)

I love it  :bg

Cheers,

Zooba :U

hutch--

I think I have the slightly odd selection problem solved, put the increment first in the loop, tested for one character back and removed the corrections and it seems to work OK.

I rewrote the code to load the table from file and it now supports assembler style comments and can use any character except the ";" comment as a delimiter between table members. It tests the length to make sure the table is valid and as an added bonus, its a lot faster even though it hardly matters in this case. I have added an example table with the binary that is nominally pointed at assembler programming which includes [ and ]. I will see if it drives me nuts but its simple enough to change.

[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

Just a thought. Can non-binary (ie. > 1) values be put in the table and then double-clicking does a sort of flood-fill? Say if you double click on a 1, all adjacent 1's will be selected. That way it would be possible to set up double-clicking on white-space, punctuation, etc. Or maybe a bitmask? So if the initial character AND the candidate character is non-zero, select it?

I changed the [, ] and . back. Faced with a choice between .if and similar working and FILEMAP.hMap working I chose the latter. Also, [eax+4] selecting [eax doesn't make much sense.

Another thought, which cancels out the first though. Can the table file actually contain the ANSI characters to select or not select? Initialise the table to 0s and change the specified characters to 1s? It would make it more intuitive to edit.

Ghirai

Hutch, could you please post links somewhere to the versions of QE that are final (possibly on the masm dl site), because atm there are a couple of dozen version around the board?
I'd like to add them to my mirror list.
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

hutch--

Ghirai,

At the moment I have the time to do some work on QE so I am trying to get as much done as possible. I will let you know when I get the version stable but at the moment I need to get as much done as possible as I have not had much time to work on it for a while.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php