Virtual Pen Project History résumé
28 February 2003
- Switched the full OPaC web domain to a new host (www.infomaniak.ch)
which happens to be much more flexible and powerful than my previous hosting
27 February 2003
- Started work on a new Curve object, which is simpler to use than the
Bézier curve. This is some kind of home made spline implementation.
22-26 February 2003 - week-end and holidays
21 February 2003
- The .NET PrinterSettings have a bug.
Whatever the copy count specified in the print dialog, the application will
always print a single copy.
- Implemented support for multiple page document printing.
- Modified the way the images are displayed by the image frame
attribute. The images now keep their proportions, which is what Daniel
wanted as the default behaviour.
- Modified the defaults in the vp.startup.ini so that the default outline is
black, the default line thikness 0.2mm and the surface transparent. This is
a better choice for the public use.
20 February 2003
- Fixed VP.FrontEnd.Logic.AttributeEditor.FindSubStyle,
which stopped on the first matching sub-style, which could belong to another
style. If for instance the outline root style was set to X,
the selected object surface was set to X and
the selected object outline was set to Y,
and the caller was asking for the outline sub-style of the selected
object, it would get X as the answer (X
being the outline of the root style; we were expecting Y
- When a figure has no outline (no paint applied to the outline), the
surface attribute can fall back to the SURFACE_MODE_FAST
mode if the SURFACE_BIT_FAST_IF_NO_OUTLINE
is set. This seemingly simple feature required lots of thinking; finally, I
had to implement a moderator spy in the rendering context.
The spy allows the no paint attribute to inspect outline moderators
and check if they will paint anything, before any surface painting is done.
On painting, the following steps are executed :
The surface region is painted before the outline attribute gets executed,
which is the reason why the extra processing had to be done on moderator
The figure styles get executed :
- The surface moderator gets executed, which pushes the moderator on the
- The outline moderator gets executed, which pushes the moderator on the
- The line width attributes get executed. This sets up the pen for
The figure path gets defined.
The figure path gets painted :
- The pushed surface moderator gets parsed again; this time, its
internal attributes get executed, which means that the surface region
gets defined and then paint is applied.
- The pushed outline moderator gets parsed again; this time, its
internal attributes get executed, which means that the outline region
gets defined and then paint is applied.
19 February 2003
- Fixed bug in CoreEvent (when notifications
were disabled and re-enabled, a notification was sent event if no events
- Values representing enumerations or bitsets are now properly handled by
the core and by the FrontEnd.
The value is stored using 16 bits, and an additional subtype is attached to
each value (which can be in the 0..511 range).
- Added VP::Render::Context::IncludeWithFigureRegion,
which can be used to merge an outline with a surface to grow the figure
region. This is needed by the new surface mode.
- Implemented AccessValue for the surface
editor; added a new surface mode which merges the outline with the surface.
- Added two more flags to the rendering context : FLAG_DISABLE_SURFACE
and FLAG_DISABLE_OUTLINE, which are
recognised by the moderator. If the moderator's contents matches the
specified flag, the full moderator block is simply skipped on execution.
This is used by the image frame to make sure that the outline paint is
applied after the surface and after the image.
- The no paint attribute now paints a hairline where the path should
be, which makes manipulation of invisible objects easier.
- Improved the image frame attribute. The geometry of the path is
used, instead of the geometry of the visible surface. Furthermore, the
outline is applied only after the surface and the bitmap are painted.
18 February 2003
- Working on multi-page support.
- Improved the base VP.Forms.Control in
order to support auto-repeat on the Press
event. The repeat rate can vary automatically (this is defined by the speed
- The VP.FrontEnd.GUI.PageBar displays its
pages and interacts with the user. The interaction with the core is not yet
- First draft implementation of the page manager.
- EPSITEC meeting.
17 February 2003
- Working on multi-page support. I am trying to draw a widget over two other
widgets, but obviously, this will not work within Windows. I hate this
narrow minded windowing system !
I tried to make WM_PRINT work in order to
get the bitmap of the widgets below the one I want to create, but (1) this
won't work on systems older than XP and (2) this crashes if the form getting
the WM_PRINT message contains a Label.
Nobody seems to have a solution on the web, so I will have to give up my GUI
design idea [sigh].
16 February 2003
- Implemented the no paint attribute, which can be used to define an
invisible paint. There are A-NoPaint.cpp/h
files for the core implementation, A-NoPaint.cs
and AttributePanelNoPaint.cs for the GUI
plug-in, and modifications in the initialisation script...
- The attribute analyser in VP.FrontEnd.Logic
now uses a dynamic UCID to StyleType
mapping, which allows attribute plug-ins to define their own style type,
without having to rebuild VP.FrontEnd.
- Class VP.FrontEnd.GUI.PaletteTabFigure
provides a new DefinePaintEdit
method which is used to register plug-ins which provide a paint edition
15 February 2003 - Saturday
14 February 2003
- Working on multi-page support (mainly design).
13 February 2003
- Finally found yesterday's bug... DocObjView.cpp
had wrong type casts which turned the object indexes into 8-bit quantities.
This worked as long as there was only a single page. Adding more pages would
create objects with indexes above the 255 barrier.
- When painting outlines, Virtual Pen has to use a 100 x larger pen
than what is needed and use a scaling to trick in order to get GDI+ to draw
thin lines (with a width below 1.0 pixel). This pen scaling caused
problems in the outline detection code. A new rendering flag, FLAG_OP_DETECT_PATH,
was added, which causes the pen definition not to be scaled when it is
- Added a new command SetViewFocus which
gets callled before an object creation starts. It is used to define the
aperture where the creation will be done. The Command ObjectCreation
was modified to use this information.
- Improved the detection code when multiple apertures are defined. This
required changes in following classes : VP::DocView,
- Fixed command DetectObjectsInBox to work
with several apertures. The caller specified the root, but the command did
not take into account the aperture's matrix.
12 February 2003
- Modified VP::DocTrans::Group::Create to be
able to allocate additional indexes in a group used to represent a logical
page (to store the page record and the page name with known indexes with
respect to the block).
- Modified the way the polygon dirty information was handled in the
text flow : the information is now attached to every frame and the flow
will be considered to have a dirty polygon as soon as one text frame has an
invalid polygon. This is important for the work preparing the
multi-text-frame flows and the multi-page documents.
- Added commands to manage logical and physical pages.
- Modified the way logical pages are represented in physical pages. The
original implementation used aliases to link to the logical pages, which was
a bad idea, since this moved the logical page definition blocks to the alias
root block. Searching for them in the logical page root block was therefore
- Added a label object to the logical page definition. Updated the VP::DocTrans::Group
class in order to extract the name on processing.
- Lost about 2 hours because of a Visual Source Safe bug. Reinstalled
VSS 6.0c and applied SP6, with no visible effect. Disconnecting the
database in Visual Studio did not help either. Finally, I tried a lot of
things and suddenly everything was back in place again. Why ?
- Added InsertViewRoot and RemoveViewRoots
commands to manipulate the apertures attached to a document view.
- Added command FindLogPageByRank to
enumerate all logical page indexes matching a specified rank range. This
required a new method in the VP::Document
- Fixed bugs in VP::DocView::RenderView and
which caused some problems with apertures not positioned at [0 0].
- Bug hunting till late into the night...
11 February 2003
- Working on the text tool in order to add support for multiple-frame text
- Fixed bug in VP::Unit::Conv::WriteUnit
which did not properly handle the sign of small values between -1.0 and 0
(the sign was dropped).
- Added core event notification delaying in MoveGrip
- Fixed InsertPtDef command Purge
- Fixed VP.PIS.GUI.DefaultEventHandler.ObjCreation
in order to remove the temporary point(s) when a grip event is detected;
this is much cleaner for the user who is modifying a figure while it is
still being created.
- Fixed the Bézier curve in order to make the last secondary control point
glued with the creation validation command in the command history. Undoing a
Bézier curve creation could produce strange things (curves with too many
- Added a new plug-in class for the text frame attribute, which will
have to handle the events generated when the cursor gets pressed on the text
10 February 2003
- Working on the text tool in order to add support for multiple-frame text
- Implemented Bézier path to VP::TextLib::Polygon
conversion and modified A-TextFrame
accordingly. This means that now, text flows properly into curved figures
- Fixed VP.FrontEnd.Logic.MainToolCursorIBeam.SetTextOp;
it crashed after a document was opened, if there was no active frame and the
user tried to click into a frame which was active when the document was
- Fixed horizontal tabulation algorithm so that it works with
non-rectangular shapes (the reference of the tabulation can be chosen
between the left side of the bounding box, the beginning of the line, the
reference of the figure and the document; however, this is not yet
accessible to the user).
- Fixed a bug in VP::TextLib::Fitter::Context::ExtractWord;
if a tab was forced to move to the next line because it did not fit,
then the word extraction method called by the scribe would miss the end
of line information and simply append the text after the tab on the same
- Both core structures ObjectDef and GripDef
now include a logic index, which is required when an attribute generates
grips for its associated graphical object. The logic index refers to the
graphical object and the standard index refers to the attribute. This is
used by the text frame attribute.
- Added support for TextIn/Out/... grips.
- Command QueryObjectGrips returns also the
object index for every grip; the filtering is now done on the logic index,
not the standard object index.
- The VP.PIS.GUI.IEdition interface now has a
SupportsUcid method which can be used to
check if the active editor is fit for the required grip edition. The replies
can be either Yes, No
or Generic. If the plug-in replies Yes,
we may call its edition methods and all will be fine. If, however, the
plug-in returns Generic, we must first check
for another possible editor which would reply Yes
and favor that one (if it exists).
- The Bézier curve plug-in now supports additional grips inserted by the
text frame attribute; it simply filters out the grips which do not belong to
- Added event filtering/retargeting in VP.PIS.GUI.BaseObjectClass,
which allows to send the grip edition events to the proper plug-in, not
necessarily the currently selected one. Before this modification, the active
tool determined which plug-in was used for edition. Now, the basic
implementation in VP.PIS.GUI.DefaultEventHandler.ObjEdition
only gets grip edition events if there is no specialised plug-in available.
Bézier is such a specialised plug-in !
- BUG : there seems to be an undo/redo bug (data trashing ?) with
a sample file I created this morning.
8-9 February 2003 - Week-end
7 February 2003
6 February 2003
- Fixed image Open dialog for the image tool.
- Fixed optimisation of AttrSetValue
command; when an attribute was modified several times in a row, the
additional commands were not removed (the original value was taken in
account in the optimisation check, which was a bad idea).
- Improved optimisation in command TransactionOptimise.
The AttrSetValue commands were
wrapped into transactions, so they were not optimised on creation. A call to
the command manager's Optimise method after
transaction optimisation does the trick.
5 February 2003
- The palette tab text handler now notifies the I-beam when changes are
going to be made to the tags stream. This allows it to include text marks
for the undo/redo operation.
- Improved active text flow management. This includes the generation of a
core event when the active text flow changes.
- The compact cursor position encoding has been expanded to support the fact
that a non-existing cursor position could be encoded. This will remove the
cursor on restore.
- Added new command TextCursorMark which is
used to store information about the active cursor position and the active
selection. This makes cursor movements and selections undoable.
- Implemented undo/redo support for command CreateImageFrame.
- Consolidation :
The command IDs (ClassCmdID.h) are now
explicitely numbered, which is required if we want to guarantee document
compatibility between different build versions of VP.
Fixed a nasty bug which was known since last summer... When loading a
document created with a Debug build, the Release build would crash (the
opposit was true too); this was caused by an internal type table stored in
the document instance which was not refreshed by method RescanRoots.
Calling InitialiseTypes from
it does the trick.
4 February 2003
- Improving undo and redo of text.
- Internally use caches with the same depth as the main graphics context
(e.g. for the image attribute).
- Implemented undo/redo for commands SetTextStyleMode and
- Added a new implementation of the VP::ISeqByteProvider
interface, called VP::RawSeqByteProvider,
which can be used to iterate over a buffer of bytes of fixed length.
- Added support for VP::Cmd::Record
resizing, which is needed by some undo/redo commands which store variable
- Added support for state deserialisation (VP::DocText::State::Parse)
based on a binary source. This is used by command SetTextStyleMode
in order to undo/redo the style modifications.
- Modified the label object : its text string is now stored in the
UTF-8 encoded format, which reduces the space needed, especially when the
label contents gets into the undo/redo history. The label user does not see
- Implemented undo/redo for SetStyleName, SetTextStyleName
and CreateTextStyle commands.
- Improved internal conversion support between UTF-8 and UTF-16.
- Added a new core event, called Command_AboutToInsert,
which is fired by the command manager just before a new command record gets
created. The caller of VP::Cmd::Manager::Insert
can specify that the event should not be sent by using the UNDO_REGULAR_SILENT
- In order to fire the event immediately, a new variant of VP::Document::Notify
was added, which can specify that the event is urgent and that no
delaying should take place.
- Fixed VP.FrontEnd.GUI.PaletteTabText.GetParaStyleFromName
which did not quote the style name.
3 February 2003
- Added QueryCursorCaret command whic is
used by the MainToolCursorIBeam class to
locate the text cursor (caret) in the document view.
- Added support for double arguments in
the command hub Execute method.
- The DocViewScrollable class generates event
ViewOffsetChanged when its ViewOffset
property is modified programatically. This can be distinguished from the DocScrolled
event. It is used by the text ruler.
- Added automatic centering on text cursor when the cursor is moved outside
of the visible portion of the document view. This required adding a CenterDocView
method to the I-beam and several variants of MakePointVisible
in the document view.
- Removed all useless references to document view ID in the text commands.
There were a lot of commands which required this argument but did not use
- Fixed command manager so that the PurgeRedo
and PurgeUndo methods set the internal state
just as if Redo or Undo
were being executed.
- When a new command gets inserted into the command manager, automatically
purge the redo history. This is a temporary fix since the TextMark
command does not currently support forking in the redo history.
- The I-beam cursor analyses what the user does. If the commands executed
belong to the same category (described by the TextOp
enum), then they will be appended together. However, if the new text
op is different from the last text op,
then a TextMark command gets executed.
What is still missing, is an interaction between the palette text tab and
the I-beam in order to record the state changes individually with TextMark
1-2 February 2003 - Week-end
31 January 2003
- Working on text UNDO/REDO.
- Added a command DebugTextUndo
to test the undo/redo engine I wrote this week.
- Finished implementation of VP::DocText::Meta::DoTextRemoveData
and DoTextInsertData. The first tests show
that things still don't behave exactly as they should, since the text
position associated with a text insertion or removal is not the CursorTextTagsCompactPos
and thus does not take into account any offsets in the tags stream.
Here is an example of what is going on : when the text beginning just
after a FORMAT_ParaStyle tag is removed, the
position recorded is the position immediately after the ParagraphSeparator
(which marks the end of the previous paragraph). When undo is
executed, the text is inserted at the proper position in the text stream,
but the skip tags will be recreated before the FORMAT_ParaStyle
tag, which is definitely a bad thing !
- Fixed problem described above...
- Did a UNIX "Word Count" on the Virtual Pen
project tree :
||Lines of code
|C++ source files
|C++ header files
|C# source files (without the Magic library)
- Added a TextMark command
which does the link between the standard command undo/redo mechanism and the
- Finished the implementation of VP::DocText::Undo::PopAndUndoOp,
which means that finally, it is possible to undo and redo text modifications
by undoing/redoing the TextMark command.
- Modified VP::DocText::Meta::DoTextInsertData to regenerate the
breaks and finished the implementation of DoTagsInsert/RemoveData...
30 January 2003
- Working on text UNDO/REDO.
- Fixed VP::DocText::Accessor::FindValidTag
to skip filler tags.
- Fixed VP::DocText::Meta::RemoveText to
remove formatting tags in one piece.
- Disabled VP::DocText::Meta::UndoableTagsRemoveData,
since it is not used.
- Removed the limit of 255 bytes for the data size stored in the undo/redo
stream for the text and the tags. The limit has now been raised to about
1000 bytes, which should be enough for event very complex formatting tag
sequences. However, the text should still be split into manageable chunks of
a few hundred bytes each.
- Identified lots of problems I hadn't properly thought about :
When deleting text, the sequence in which the elements get removed is
important. We must first remove the formatting and command tags, then the
skip tags and finally the text itself. If we don't, we won't be able to
properly undo the sequence (removing the skip tags first, for instance, will
move all other tags around and they won't be properly positionable).
When deleting text, the font formatting tags were preserved. But they must
be removed too if we want to be able to restore them afterwards when
undoing. So we will have to remove all formatting tags and insert some back
into the tags stream after their complete removal.
- Fixed the VP::DocText::Meta::RemoveText
method to address the problems described above. This required moving from a
4-phase algorithm to a 6-phase algorithm.
29 January 2003
- Working on text UNDO/REDO.
- Implementing the new Undo text stream,
which exists twice in a text story : once to store the undo
information, and once to store the redo information.
- Modified the command manager (VP::Cmd::Manager)
in order to know in what context commands get executed (while undoing,
redoing or simply doing).
- Implemented a cleanup method in the stream management class, so that empty
objects can be removed from the streams (the head won't ever be removed).
- Implemented variants of the InsertData/RemoveData
in the stream management class where the caller specifies the meta list ID.
This was needed for the undo stream, which has always the same identity (META_LIST_UNDO).
- Implemented VP::DocText::Meta::RemoveObjectFromList
which can be used to remove empty objects from a stream.
- Added a debugging command, DebugDumpTextUndoRedo,
used to dump the contents of the text undo/redo information.
- Added Read16Bit and Read32Bit
to the VP::DocText::Accessor class.
- Fixed detail in VP::DocText::Meta::NewRange,
UndoableTextRemoveData and UndoableTextInsertData
(we must work at the byte level, not the UTF-8 character level).
- Already implemented lots of the basic functionality in the undo manager
(undo stream support class).
- Fixed VP::DocText::Meta::SetupObject :
it must not use the undoable tags insertion code.
- Fixed the undoable methods which could modify the layout of the objects in
memory and cause the accessors to point to the wrong location. The fix is to
call ForgetCachedAddress on the live
28 January 2003
- Working on text UNDO/REDO.
- Identified all pieces of code which modify either the text or the tags
stream in the Meta class :
RemoveData (text stream) called from RemoveText.
RemoveData (tags stream) called from RemoveFillerTags.
InsertData (text stream) called from InsertText.
InsertData (tags stream) called from InsertFormat,
InsertFontState and insert_skip_tag.
accessor.Fill (or equivalent in tags stream)
called from RemoveText, RemoveParagraphFormatTags,
The method SetParagraphStyle also modifies
the tags stream (WriteParaStyle).
- Since we decide not to record the skip tag changes, some of the methods
above can be discarded.
- Added new version of Save/RestoreCompactPos
which only takes in account the position in the tags stream.
- Fixed bug in VP::DocText::SplitCompactPos.
- Implemented wrapper methods for the InsertData,
RemoveData and accessor.Fill
methods. These wrappers will provide the undoability features.
27 January 2003
- Working on text UNDO/REDO.
- Modified the internal data representation. Files produced with this
version of VP are no longer compatible with the previous versions.
- Added following methods to class VP::DocText::Meta :
AdjustCursor, to move the
position in the tags stream by a specified number of non skip tags.
SaveCompactPos, to store a
cursor position in a compact, 32-bit representation.
restore a cursor position from a compact, 32-bit representation.
The compact position (VP::DocText::CursorTextTagsCompactPos)
is defined by a 24-bit position into
the text stream (number of bytes to skip from beginning of stream) and by a
signed 8-bit position adjustment into the tags stream.
This adjustment measures the distance between the natural position
(which is reached in the tags stream by moving the cursor from the beginning
of the buffer to the specified position in the text stream) and the target
position. The distance only counts non skip tags and non data tags.
The compact position will be used to store positions in the text/tags
stream for the UNDO and REDO commands, where the index/offset encoding of
the CursorIndex cannot be used, since these
Added helper methods for VP::DocText::Accessor,
in order to simplify the implementation of the compact position related code
in the Meta text manager.
Fixed bug in VP::DocText::Accessor::MoveDeltaTag
(using FindNextTag was skipping the first
tag, which was interesting too).
Added method VP::DocText::Meta::DebugIsCompactPosCoherent
to check for compact cursor position coherence. This can be used in
assertions throughout the code, in order to make sure we don't produce
invalid cursor positions.
25-26 January 2003
24 January 2003
- Army today.
- EPSITEC meeting in the evening for VP installation.
23 January 2003
- Continuing work on cut and paste for the text object.
- Cleaned up and documented code written these past days.
- Added menu commands for Cut/Copy/Paste; also added icons into the tool
- Implemented a VP.Forms.ClipboardViewer
class which sends notifications whenever the contents of the clipboard
- Added code into the VP.FrontEnd.Logic.Document
class, in order to update intelligently the cut, copy and paste icons,
depending on what is currently selected in Virtual Pen (e.g. selecting text
enables cut/copy; putting the cursor into a text frame enables paste if the
clipboard contains text).
- Fixed problem with text export in the Meta
class : it expanded the selection just as it did for the hyphenation
and spell checking algorithms.
- Fixed multiple-handle implementation of ExchangeCopyTextHandles
- Fixed multiple-click text selection.
- Implemented cut/copy/paste in VP.FrontEnd.Logic.MainToolCursorIBeam.
Pressing CTRL+C really does a copy of the selected text, etc. This
required the command dispatching in the document class. Basically, there is
a meta-command named Forward which is
handled by class VP.FrontEnd.Logic.Document
and which does all the clever dispatching, depending on the current edition
22 January 2003
- Continuing work on the clipboard support.
- Added following commands :
put one or several text handles into the clipboard, removing any previous
free handles generated by ExchangeExportText
and not inserted in the clipboard with ExchangeCopyTextHandles.
import memory from the clipboard (sort of paste to memory).
free memory imported with ExchangePasteTextMemory.
dump memory imported with ExchangePasteTextMemory.
This is used for debugging purposes only.
- Implemented memory tracking in the VP::TextLib::Clipboard
class, which avoids errors such as freeing memory inserted into the
clipboard, or freeing memory twice.
- Fixed a few circular header inclusion problems...
- Added CMD_IMPLEMENT_EXECUTE_7 macro for
commands with 7 arguments.
- Implemented command ExchangeImportText,
which uses VP::DocText::Meta::ExchangeImport,
itself based on VP::DocText::ImportManager
21 January 2003
- Fixed problem with asynchronous redrawing in VP.FrontEnd.Controllers.DocView.
- Added commands ExchangeExportText and ExchangeImportText.
- Working on clipboard support for the text object. I finally decided to use
the HTML Format tag (also known as CF_HTML),
using the same internal representation as Microsoft Office 2000. This
means that I will have to understand how Word codes its different
attributes. The first stop was to find out how to encode the simple TAB
character (it happens to be encoded using a <span
20 January 2003
- Fixed problem with display caching when running on a display which was not
set to 100% (DPI settings not set to the default values).
- Found strange caret flickering problem. Not identified yet.
- Improving performance of redrawing in VP, since this seems to be the
problem #1 :
handle their internal invalidations with a better precision : when the
cursor moves, the only region affected by the invalidation will be the old
and new shape of the crosshairs and custom cursor, for instance.
was reworked to redraw a minimum.
Lots of other classes were updated and slightly modified
because of these changes.
Modifier A-TextFrame in
order not to render the text when the caller is just doing a graphical hit
Repainting some parts of the document only if the
application is idle for some time (not idle based on Windows IDLE
pseudo-event, but really idle since 200 ms). This changed a lot the
responsiveness of VP.
The A-ImageFrame now first
paints into a bitmap cache, then draws the bitmap with a 1:1 ratio onto the
graphics context. If the zoom does not change from one time to another, then
this speeds up the drawing dramatically.
18-19 January 2003
17 January 2003
16 January 2003
- Hunting a bug which was known to be in VP since the very beginning of the
attribute edition GUI : when the surface and the outline attributes
were sharing the same paint style, switching from hatched to plain color (or
the reverse) would affect the surface instead of the outline. Here are the
- Method VP.FrontEnd.Logic.AttributeEditor.ReplaceStyles
used the first style path rather than the one matching the style type
(outline or surface).
- When replacing the sub-styles with command ReplaceStyleFixLinks,
the root style was specified, rather than the containing block (which is a
moderator in case of surface and outline attributes).
- Cleaning and wrapping up code.
- EPSITEC meeting today.
15 January 2003
- Made both VP.Unit.Value and VP.Text.TabRecord
comparable by implementing the System.IComparable
- Sort the tabs in the ascending order (sorted by their position, not their
ID) in the Logic.TextState class, which
fixes the problem found yesterday evening.
- Implemented a spell checker, based on the same principles as the
hyphenator : it is a separate DLL which is loaded by VP::TextLib::SpellManager.
Internally, the spell checker is based on GNU aspell, which is
published under the terms of the LGPL, meaning we can link it with VP
without having to put VP under the GPL. I had to write a wrapper around aspell
and thanks to delay-loading, I can use the DLL from the official Win32 aspell
installer, which resides in C:\Program Files\aspell.
- Added VP::DocText::ITextAndTagsProcessor
interface, used by the new method ProcessTextAndTags
of class VP::DocText::Meta to implement
customised processing of text ranges. This interface is implemented for
instance as VP::TextLib::SpellCheckProcessor.
- Made sure that every modification (through commands) of the text will
result in the corresponding flow to be re-spell-checked.
- Added visual feed-back of the words which are not spelt correctly.
- Tested printing with the text : there are flagrant differences
between PCL and PostScript output ! In the PCL output, the text is
offset by more than one millimeter with respect to the graphic output.
14 January 2003
- Simplified the focusing mechanism implemented in VP.Forms.Control.
We can rely on the Focused property, but me
must invalidate the control whenever we get or lose the focus for this to
- Implemented keyboard focus support for the VP.Forms.ColorSlider
class. Support for the arrow keys is still missing.
- Handle the core document reset event in the text ruler and in the I-beam
cursor. This fixes several small problems.
- Improved synchronisation between the ruler and the text state information
- Added a close button to the text ruler.
- Automatically hide the text ruler when it does not intersect with the
- Added commands to show or toggle the visibility of the text ruler.
- Implemented tab definition updating in the active style. This modifies the
basic style definition, since I currently have no means of defining a
partial tab list (with addition/removal of elements with respect to a
- Improved TextState serialisation so that it can be used to merge two text
states (by first serialising all properties that match the filter for the
first text state, then serialising all properties that do not match the
filter for the other text state). This is used by the implementation of
method ModifyParaStyle of
- Fixed VP::TextLib::Fitter::Context::HandleNewTab
when right aligned tabs are used. The available space in the line was not
- Changed the way disabled_tabs and
tabs_in_use bitsets are handled. The
bitsets define which tabs are disabled or in use, but the bit position no
longer encodes the tabulator ID, but the tabulator rank in the state.
- Implemented tab creation and deletion within the text
ruler. There still is a bug in there which makes the tab jump at the wrong
place if a tab gets inserted before other existing tabs... Somehow, the
internal numbering is still not based on the tab ranks but might still be on
13 January 2003
- Added VP.FrontEnd.Logic.Application.FindFocused which returns the focused (child) control.
- Make sure a label's tab stop property is set to false.
- The VP.Forms.UnitValueBox has been
improved. It better fits into the tab order and provides a simple means to
disable any display.
- Added special processing of the Enter (Return), Tab and Escape keys for
the VP.Forms.TextBox class. This was
required by the text ruler in order to be able to detect when the user
validates a tab creation by pressing Enter while editing a value.
- Making the text ruler get and process properly the Tab key (to move from a
tab to the next in the ruler) and the cursor arrow keys (to move a tab
inside the ruler) was a nightmare. I spent almost 10 hours figuring out
how to do it... Holy shit !
- Properly clip and adjust the text ruler so that it fits into the active
document window. When scrolling the document or resizing it, the text ruler
has to be updated.
- Added focus tracking to the VP.Forms.ImageButton
class. This took a lot of time until I found out why Windows would not send
me the GotFocus and LostFocus
12 January 2003 - Sunday
11 January 2003
- Still working on the text ruler.
- Improved the precision when painting the ruler marks. Formerly, the small
marks were painted at regular intervals, which could produce a one pixel
difference with respect to the mark's real position. This was made visible
by the text ruler's tabs.
- Added GetDouble to the base plug-in manager.
- Stored information about the text ruler's layout in its resources.
- When the text ruler is shown, the text frame does no longer lose its
- Refactored the text ruler form and extracted the painting and mouse
detection handling into a dedicated control, class VP.PlugIn.TextRuler.Form.RulerWidget.
This was required for the proper focus handling.
- Finally got a satisfactory rounding algorithm for the ruler...
- Worked hard trying to make keyboard navigation possible, but somehow,
somebody eats my cursor events...
10 January 2003
- Working on the text ruler.
- Lots of small fixed in order to allow for an orderly application shutdown
(e.g. application notifies all plug-ins by calling their Detach method,
which caused trouble with some plug-ins).
9 January 2003
- Oops. Already slipping away from planned schedule. Fortunately, I did not
publish it here ;-)
- Added support for active text frame geometry recording (and querying).
- Added a new core event used to notify the front-end of changes in the
caret information (Text_CaretUpdated).
- Added Application.FindChild and Application.FreezePainting
support methods. Why where such basic things not included in the .NET
- Added a special PaintRuler class in the VP.FrontEnd.Utilities
namespace, which will make all the drawing.
- The PaletteTabText class was not
accessible easily from the plug-ins, so I create a new interface named ITextStyleInfo
which provides what is needed to access the text style information (e.g. for
the text ruler).
- More work on the TextRuler
8 January 2003
- Refactoring the preliminary horizontal tabulation code (written
- Added a Bitset class, which makes a tight
bitset appear as a bool array to the user.
- Fixed method VP::DocText::Meta::CollapseFontState,
which did not remove the proper formatting tags when several tags changed
together (e.g. font style and size).
- Fixed keyboard event filtering problem; the dialogs shown
by VP should all be derived from VP.Forms.KeySinkingForm
in order to notify the I-beam cursor tool when to stop consuming keyboard
events (dialog activation disables the document caret).
- Fixed VP::Append for floating point values.
- Expanded command QueryViewCarets
to also return the flow and the frame IDs.
- First draft of the TextRuler
7 January 2003
- Fixed FORMAT_ParaTab parsing.
- Fixed VP::DocText::State::StreamParser::ExtractUnit
which did not update the point size representation.
- Fixed the value of the HorizontalTab
character in the Unicode definitions.
- Method VP::DocText::State::ParseCharacter
recognises and handles tabs.
- Implemented VP's own version of an enum
parser, which supports enumerations used as bitsets. Both a Parse
and a ToString method are provided.
- Class VP.FrontEnd.Logic.TextState now
supports the ParaTab field, which required
quite a bit of work to get it right.
- First preliminary implementation of the horizontal tabulation handling in
the fitter and in the scribe. The current implementation is very
experimental and will have to be reworked in order to be usable.
6 January 2003
- Defined internal planning.
- Working on text object in order to make tabulation information available.
History of previous months.