RichView
What is it
TRichView is a native C++ VCL component for C++Builder 1 created by me
from _scratch_ to have browser like abilities of visualing text. The reason
behind spending lots of time doing this control a good one was that I got
sich of TRichEdit standard control in Windows95, which was too slow and
not flexible enough for my specific needs of coding an IRC like chat client.
Copyright (c) Alex Chudnovsky, Russia 1997-4ever. All rights reserved.
It's free for freeware usage, but if you plan to make ANYTHING commercial
or shareware you have to obtain my written permission. I do not think thsi
would be a problem, in fact I am sure no one would ever need my component,
but just in case.
Why not something else?
All I could see on the Net were bad either because:
Features (which are in fact reasons why I coded it)
That's why I coded it to provide:
-
a FAST, flicker-free viewer of colored texts (mIRC
colors conversions and HTML tags recognised)
-
allows links and (yes blinks, I
did it, Microsoft was not up to
mess with it in their Explorer, while in reality I made it work less then
3 hours, of course that required some sort of brain usage, perhaps they
lack it *hInt-hInt*)
-
auto-scroll like in mIRC
-
ability to log and save to file in both TXT (with escape codes stripped
out) or HTML
-
is more or less portable to enable future Java ports (can Pascal do it,
hugh?)
-
allows full mouse selecting, and done _RIGHT_, not glitchy as mIRC and
(sometimes) Netscape has.
-
provides an easy to code interface to implement custom parsers, which still
would be rendered FAST.
-
automaticly starts browser you have on link click, with optional right
click menu to copy link to clipboard.
-
no big overhead on adding new lines dynamicly, and almost none on deleteing.
The not really slow re-render occurs only on resize on X coordinate (when
width changes) for obvious reasons. Height change do not involve extra
overhead except rendering on screen.
-
it's pretty portable since it's not relying on bunch of code, only requires
few basic rendering routines like DrawFontAt, I belive I can port it to
Java or other GUI for about few days time. I would when I will need it.
Right now Win32 is my platform.For those familiar with Delphi/C++Builder
VCL's object hierarchy, it was descended from TGraphicsControl, not from
TWindowControl, to make it FAST, less overhead. Though, it made my code
more complicated. But more effective.
HTML parser:
It can accept HTML and save to HTML also, can even put into clipboard selected
text in HTML. Supported visual tags:
<B> <I> <U> <FONT color=anyHTMLcolor> <HR> <BR> <A>
<BLINK> <CENTER>
(of course all end/cancel tags), you can easily add your own tags in
HTML renderer.
Whats sucks
Good question, I would be a lamer not to mention what sucks:
-
not easy to use to person who has no idea what is it (power is oppose
to easy of use) MIGHT be fixed
-
poor coding style
-
little rendering problems (not displayied correncly) on buggy Win95 drivers
:-)
-
not designed for YOUR needs, but hey, you got source right?
-
not perfect with mouse selection in sense of flickering and perfomance
-
something else I forgot at the moment
Source
It is about 50kb of C++ TRichView, and 25kb of coded by me also HTML parser,
which can be used as stand-alone class for parsing.
Oh yes, I decided to give away source not someone to complain about
my way of coding, and my style, it's BAD, I know.
Although reasonable suggestions would be fine. I think so.
Download
FREEWARE, but no way to use in any app you want money for without my explcit
written permission.
Also, no derivatives of code can be distributed without my permission
also. Sounds strict? maybe, but fair.
I spend my time and do not ask for money, why would you use my time
to get money to yourself? You'd have to share some,
contact me, I am sure we will find way to deal.
Oh yes, I can't avoid bad words here :-)
About component writes, some of them, who make a one-week work of deriving
some control from like, say, TLabel,
and ask for money for it's usage, this is lame. But, it's nothing comparing
to those who make a simple control
and ask for money AND put an check to make it run only with-in IDE.
Guys, this is frigging lame! ($_$) look at the mirror, do you have $$$
instead of eyes????
:) I am lame too, but do not at least ask for money from those who can't
afford or/and do not write commercial apps (as I do)
Download
There are basicly two versions available.
-
Proven to compile and work, let's call it RichView
v1.0
-
Major remake, should be much faster, but not finished, still worth a look
RichView v2.0
Intall is easy, choose Install component in C++Builder and choose RichView.cpp
in it, then re-build library.
If it says not-found RichView.obj when you try to build your app, check
directories of lib files. C++Builder is buggy on that thing.
~ Final Wor[L]ds
Well, honetly I think that no one would need it, since it's C++, which
is less popular then Delphi nowadays, hence I am not writing a long-long
helps, documentations etc. Anyway, if someone needs it then it could save
some months of work. If you see my words and really interested in some
details to explain then mail me.
Alex Chudnovsky aka AtW, Russia,
20, March 1998