1996-04-14 15:21:20 +02:00
|
|
|
This file gives some information about the code in edit.c. If you want to
|
|
|
|
change, add, or fix code, please read this text. If you're not interested
|
|
|
|
in doing actual work on edit.c only C & D will be of interest to you.
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
A) basic policy
|
|
|
|
B) special functions
|
|
|
|
C) not implemented
|
|
|
|
D) known bugs
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
A) Basic Policy
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
The code has been made in such a way, that functions try to call other
|
|
|
|
(documented) functions if that is sufficient. This might sometimes not be
|
|
|
|
the most efficient way, but it keeps the code clear. This way I tried to keep
|
|
|
|
the number of functions that rely on the internal EDITSTATE structure as
|
|
|
|
low as possible. For instance EDIT_WM_Cut() simply calls EDIT_WM_Copy() and
|
|
|
|
EDIT_WM_Clear(). The latter two are well documented message handlers, so
|
|
|
|
as long as they are right EDIT_WM_Cut() will never have to change again.
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
Example:
|
|
|
|
The best thing to do, when you want to know the offset of line 3, is calling
|
|
|
|
EDIT_EM_LineIndex(). Again this is a well documented message handler. Don't
|
|
|
|
look at es->LineDefs[2].offset. It would just be another reference to the
|
|
|
|
internal structure, and that would make it more difficult to change things.
|
|
|
|
Refer to EDIT_WM_???? and EDIT_EM_????? functions as much as possible.
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
The WND * pointer is used internally whenever possible. Although it is not
|
|
|
|
the real HWND, it improves performance enough to use it.
|
1995-03-02 18:44:29 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
All displaying is done by invalidating regions / rects. Only
|
|
|
|
EDIT_EM_LineScroll() uses direct painting. This way things become much
|
|
|
|
faster. Although sometimes the response time might appear to be slow, it
|
|
|
|
would be much slower even, when everything would be painted instantly. This
|
|
|
|
is especially true for scrollbar tracking and selection changes..
|
1995-03-02 18:44:29 +01:00
|
|
|
|
Release 960309
Fri Mar 8 19:07:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in]
Quote '[' and ']' in the test program for the strength-reduce
bug. This should work much better...
* [files/file.c]
Augmented DOS_FILE structure. Most internal functions now return a
DOS_FILE* instead of a Unix handle.
Added a local file array to replace the PDB list upon startup, to
allow using file I/O functions before the first task is created.
Added FILE_SetDateTime() and FILE_Sync() functions.
* [loader/module.c]
Use the DOS file I/O functions in MODULE_LoadExeHeader().
* [objects/bitblt.c]
Use visible region instead of GC clip region to clip source
area. This fixes the card drawing bug in freecell.
* [objects/region.c]
Fixed CombineRgn() to allow src and dest regions to be the same.
Fri Mar 8 16:32:23 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/EDIT.TODO]
Updated so it reflects the current status.
* [controls/edit.c]
Implemented internal EDIT_WordBreakProc().
Implemented ES_READONLY.
Implemented WM_LBUTTONDBLCLK to select whole words.
Fixed a lot of types in the function definitions.
Wed Mar 6 19:55:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [debugger/info.c]
Added "walk window" command to walk window list.
* [windows/mdi.c]
Added proper(?) WM_MDISETMENU message handling.
Wed Mar 6 09:27:12 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/callback.c][if1632/relay32.c]
RELAY32_CallWindowProcConvStruct: new function.
* [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c]
struct32.c: new file. Moved all structure conversions into that file
PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16:
renamed to STRUCT32_POINT32to16, ...
WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to
POINT32, ...
New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS,
CREATESTRUCT.
* [include/windows.h][misc/exec.c]
WINHELP, MULTIKEYHELP, HELPWININFO: new structures
WinHelp: Reimplemented. Thanks to Peter Balch
(100710.2566@compuserve.com) for his valuable research.
* [win32/winprocs.c]
WIN32_CallWindowProcTo16: new function, call in
USER32_DefWindowProcA,...
Mon Mar 4 23:22:40 1996 Jim Peterson <jspeter@birch.ee.vt.edu>
* [include/wintypes.h]
Added "#define __export".
* [objects/bitblt.c]
Put in a few hacks to make bitblt-ing work when upside-down and/or
mirrored. BITBLT_StretchImage should really be checked over
thoroughly.
* [programs/progman/main.c]
Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR.
* [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c]
Eliminated shift/reduce conflict in style definition.
Added crude error message support: "stdin:%d: parse error before '%s'".
Implemented string table support to the best of my ability (it works
with LoadString() calls).
* [windows/nonclient.c]
Fixed bug in NC_DoSizeMove() that made system menu pop up when title
bar of non-iconized window was clicked (checked for iconization).
Mon Mar 04 20:55:19 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/lzexpand.spec] [if1632/relay.c]
[include/lzexpand.h][misc/lzexpand.c]
LZEXPAND.DLL added.
Sun Mar 03 18:10:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/win.c]
Prevent usage of invalid HWNDs in WIN_EnumChildWin(),
this prevents too early termination of EnumChildWindows().
1996-03-09 17:12:43 +01:00
|
|
|
|
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
B) Special functions
|
Release 960309
Fri Mar 8 19:07:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in]
Quote '[' and ']' in the test program for the strength-reduce
bug. This should work much better...
* [files/file.c]
Augmented DOS_FILE structure. Most internal functions now return a
DOS_FILE* instead of a Unix handle.
Added a local file array to replace the PDB list upon startup, to
allow using file I/O functions before the first task is created.
Added FILE_SetDateTime() and FILE_Sync() functions.
* [loader/module.c]
Use the DOS file I/O functions in MODULE_LoadExeHeader().
* [objects/bitblt.c]
Use visible region instead of GC clip region to clip source
area. This fixes the card drawing bug in freecell.
* [objects/region.c]
Fixed CombineRgn() to allow src and dest regions to be the same.
Fri Mar 8 16:32:23 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/EDIT.TODO]
Updated so it reflects the current status.
* [controls/edit.c]
Implemented internal EDIT_WordBreakProc().
Implemented ES_READONLY.
Implemented WM_LBUTTONDBLCLK to select whole words.
Fixed a lot of types in the function definitions.
Wed Mar 6 19:55:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [debugger/info.c]
Added "walk window" command to walk window list.
* [windows/mdi.c]
Added proper(?) WM_MDISETMENU message handling.
Wed Mar 6 09:27:12 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/callback.c][if1632/relay32.c]
RELAY32_CallWindowProcConvStruct: new function.
* [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c]
struct32.c: new file. Moved all structure conversions into that file
PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16:
renamed to STRUCT32_POINT32to16, ...
WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to
POINT32, ...
New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS,
CREATESTRUCT.
* [include/windows.h][misc/exec.c]
WINHELP, MULTIKEYHELP, HELPWININFO: new structures
WinHelp: Reimplemented. Thanks to Peter Balch
(100710.2566@compuserve.com) for his valuable research.
* [win32/winprocs.c]
WIN32_CallWindowProcTo16: new function, call in
USER32_DefWindowProcA,...
Mon Mar 4 23:22:40 1996 Jim Peterson <jspeter@birch.ee.vt.edu>
* [include/wintypes.h]
Added "#define __export".
* [objects/bitblt.c]
Put in a few hacks to make bitblt-ing work when upside-down and/or
mirrored. BITBLT_StretchImage should really be checked over
thoroughly.
* [programs/progman/main.c]
Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR.
* [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c]
Eliminated shift/reduce conflict in style definition.
Added crude error message support: "stdin:%d: parse error before '%s'".
Implemented string table support to the best of my ability (it works
with LoadString() calls).
* [windows/nonclient.c]
Fixed bug in NC_DoSizeMove() that made system menu pop up when title
bar of non-iconized window was clicked (checked for iconization).
Mon Mar 04 20:55:19 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/lzexpand.spec] [if1632/relay.c]
[include/lzexpand.h][misc/lzexpand.c]
LZEXPAND.DLL added.
Sun Mar 03 18:10:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/win.c]
Prevent usage of invalid HWNDs in WIN_EnumChildWin(),
this prevents too early termination of EnumChildWindows().
1996-03-09 17:12:43 +01:00
|
|
|
|
1996-04-14 15:21:20 +02:00
|
|
|
The edit control needs to use local heap memory because applications may
|
|
|
|
rely on EM_GETHANDLE. This is bad, but it can't be helped, we have to live
|
|
|
|
with that. For this reason there is a nice EDIT_GetPointer() function,
|
|
|
|
which locks the heap buffer *only once*, no matter how often it is called.
|
|
|
|
Only at the end of the message handler EDIT_ReleasePointer() is called. You
|
|
|
|
don't have to worry about unlocking the heap. Calling EDIT_GetPointer() is
|
|
|
|
very fast if the buffer is already locked.
|
|
|
|
This way, the buffer gets locked / unlock only once every message, although
|
|
|
|
EDIT_GetPointer() may actually have been called a hundred times.
|
|
|
|
Only when the actual HLOCAL is needed (for example to ReAlloc), a call to
|
|
|
|
EDIT_ReleasePointer() is needed. Look for instance in EDIT_MakeFit().
|
|
|
|
|
|
|
|
This brings us to EDIT_MakeFit(). It automatically re-allocates the buffer
|
|
|
|
if the size parameter > buffersize. If everything is successful TRUE is
|
|
|
|
returned, otherwise FALSE. Only when the buffer contents may grow you need
|
|
|
|
to call EDIT_MakeFit(). Currently this is only in EDIT_ReplaceSel() and
|
|
|
|
EDIT_WM_SetText().
|
|
|
|
|
|
|
|
EDIT_BuildLineDefs() is the most important function in edit.c. It builds
|
|
|
|
the internal EDITSTATE structure. As soon as text *might* have changed, or
|
|
|
|
when the appearance of the text on the screen *might* have changed, call
|
|
|
|
this function ! This includes changes of screen size, change of the font,
|
|
|
|
clipboard actions, etc. etc. Most other functions that rely on EDITSTATE,
|
|
|
|
rely on the stuff this function builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C) Not Implemented
|
|
|
|
|
|
|
|
- ES_PASSWORD
|
|
|
|
- ES_CENTER
|
|
|
|
- ES_RIGHT
|
|
|
|
- EM_SETRECT
|
|
|
|
- EM_SETRECTNP
|
|
|
|
- EM_FMTLINES
|
|
|
|
- ES_AUTOVSCROLL (every multi line *is* auto vscroll)
|
|
|
|
- ES_AUTOHSCROLL (multi line can be yes or no, but single line only yes)
|
|
|
|
- WM_UNDO (=EM_UNDO)
|
|
|
|
- EM_CANUNDO
|
|
|
|
- EM_SCROLL (scrolling works, but this appears to be an undocumented message)
|
|
|
|
- ES_LOWERCASE
|
|
|
|
- ES_UPPERCASE
|
|
|
|
- ES_OEMCONVERT
|
|
|
|
- ES_WANTRETURN
|
|
|
|
- probably much, MUCH more
|
|
|
|
|
|
|
|
I encountered several undocumented messages, or message parameters.
|
|
|
|
EditWndProc() reports any unknown message with an id > WM_USER.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
D) Known bugs.
|
|
|
|
|
|
|
|
- Scrolling is weird, sometimes. The current code makes the scrollbar
|
|
|
|
of Notepad work, but the scrollbar code itself is broken. Currently
|
|
|
|
the scroll code of edit.c is *not* according to specs. Instead, it
|
|
|
|
is according to the broken scrollbar code. If that gets fixed, this
|
|
|
|
should be fixed, too.
|
|
|
|
- The clipboard is broken. Whenever things go wrong with
|
|
|
|
cut/copy/paste, it is probably the clipboard that messes up things,
|
|
|
|
not edit.c.
|
1996-05-06 18:06:24 +02:00
|
|
|
- Turning on WordWrap with Notepad leaves part of the horizontal
|
|
|
|
scrollbar visible (problem with WM_ERASEBKGND ???).
|
1996-04-14 15:21:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
I am still very actively changing things. Especially I am working
|
|
|
|
on Undo capabilities. If you want to do things, other than bug fixes,
|
|
|
|
please mail me so we can synchronize.
|
Release 960309
Fri Mar 8 19:07:18 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in]
Quote '[' and ']' in the test program for the strength-reduce
bug. This should work much better...
* [files/file.c]
Augmented DOS_FILE structure. Most internal functions now return a
DOS_FILE* instead of a Unix handle.
Added a local file array to replace the PDB list upon startup, to
allow using file I/O functions before the first task is created.
Added FILE_SetDateTime() and FILE_Sync() functions.
* [loader/module.c]
Use the DOS file I/O functions in MODULE_LoadExeHeader().
* [objects/bitblt.c]
Use visible region instead of GC clip region to clip source
area. This fixes the card drawing bug in freecell.
* [objects/region.c]
Fixed CombineRgn() to allow src and dest regions to be the same.
Fri Mar 8 16:32:23 1996 Frans van Dorsselaer <dorssel@rulhm1.leidenuniv.nl>
* [controls/EDIT.TODO]
Updated so it reflects the current status.
* [controls/edit.c]
Implemented internal EDIT_WordBreakProc().
Implemented ES_READONLY.
Implemented WM_LBUTTONDBLCLK to select whole words.
Fixed a lot of types in the function definitions.
Wed Mar 6 19:55:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [debugger/info.c]
Added "walk window" command to walk window list.
* [windows/mdi.c]
Added proper(?) WM_MDISETMENU message handling.
Wed Mar 6 09:27:12 1996 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/callback.c][if1632/relay32.c]
RELAY32_CallWindowProcConvStruct: new function.
* [win32/struct32.c][win32/Makefile.in][win32/param.c][win32/user32.c]
struct32.c: new file. Moved all structure conversions into that file
PARAM32_POINT32to16,MSG16to32,USER32_RECT32to16:
renamed to STRUCT32_POINT32to16, ...
WIN32_POINT,WIN32_MSG,WIN32_RECT,WIN32_PAINTSTRUCT: renamed to
POINT32, ...
New conversion functions for NCCALCSIZE_PARAMS, WINDOWPOS,
CREATESTRUCT.
* [include/windows.h][misc/exec.c]
WINHELP, MULTIKEYHELP, HELPWININFO: new structures
WinHelp: Reimplemented. Thanks to Peter Balch
(100710.2566@compuserve.com) for his valuable research.
* [win32/winprocs.c]
WIN32_CallWindowProcTo16: new function, call in
USER32_DefWindowProcA,...
Mon Mar 4 23:22:40 1996 Jim Peterson <jspeter@birch.ee.vt.edu>
* [include/wintypes.h]
Added "#define __export".
* [objects/bitblt.c]
Put in a few hacks to make bitblt-ing work when upside-down and/or
mirrored. BITBLT_StretchImage should really be checked over
thoroughly.
* [programs/progman/main.c]
Added "#include <resource.h>" for definition of HAVE_WINE_CONSTRUCTOR.
* [rc/parser.h] [rc/parser.l] [rc/parser.y] [rc/winerc.c]
Eliminated shift/reduce conflict in style definition.
Added crude error message support: "stdin:%d: parse error before '%s'".
Implemented string table support to the best of my ability (it works
with LoadString() calls).
* [windows/nonclient.c]
Fixed bug in NC_DoSizeMove() that made system menu pop up when title
bar of non-iconized window was clicked (checked for iconization).
Mon Mar 04 20:55:19 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/lzexpand.spec] [if1632/relay.c]
[include/lzexpand.h][misc/lzexpand.c]
LZEXPAND.DLL added.
Sun Mar 03 18:10:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/win.c]
Prevent usage of invalid HWNDs in WIN_EnumChildWin(),
this prevents too early termination of EnumChildWindows().
1996-03-09 17:12:43 +01:00
|
|
|
|
|
|
|
Frans van Dorsselaer
|
|
|
|
dorssel@rulhm1.LeidenUniv.nl
|