lazarus-ccr/components/orpheus/OrphStatus.html
2007-01-28 20:57:21 +00:00

621 lines
19 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--Copyright 2007 Phil Hess-->
<HTML>
<HEAD>
<TITLE>Status of Orpheus Port</TITLE>
<META NAME="AUTHOR" CONTENT="Phil Hess">
</HEAD>
<BODY>
<CENTER>
<H1>Status of Orpheus Port</H1>
</CENTER>
<HR>
<H3>Contents</H3>
<A HREF="#Whats_New">What's New</A><BR>
<A HREF="#Introduction">Introduction</A><BR>
<A HREF="#Installation">Installation</A><BR>
<A HREF="#Platforms_Tested">Platforms Tested</A><BR>
<A HREF="#Examples">Examples</A><BR>
<A HREF="#Porting_Philosophy">Porting Philosophy</A><BR>
<A HREF="#Usage_Notes">Usage Notes</A><BR>
<A HREF="#Limitations">Limitations</A><BR>
<A HREF="#Status_Controls">Status of Individual Controls</A><BR>
<A HREF="#To_Do">To Do</A><BR>
<A HREF="#Other_Resources">Other Resources</A><P>
<HR>
<A name="Whats_New"></A><H3>What's New</H3>
<UL>
<LI>20070128 release:
<UL>
<LI>An example program that demos the TO32FlexEdit control has been added
even though validation doesn't work with LCL (see "To Do" list below).
If you have Delphi you can compile the example to see how validation
is supposed to work.
<LI>Recent changes in FPC 2.1.1 appear to have broken both the Columns
and Rows design-time property editors for the TOvcTable control. The
property editors still work with FPC 2.0.4. Stay tuned...
<LI>Custom cursors are now visible when resizing table columns at runtime on
Windows. However, cursor also disappears sometimes. Stay tuned on
this one too...<P>
</UL>
<LI>20070127 note:
<UL>
<LI>Recent improvements in the Lazarus Qt widgetset make a couple of Orpheus controls
work better with Qt.<P>
</UL>
<LI>20070115 note:
<UL>
<LI>In addition to downloading the .zip file (see link below), you can now
also obtain the Orpheus ported source using Subversion:<P>
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/orpheus [local_dir]
</UL>
<LI>20070114 note:
<UL>
<LI>Controls have now been tested with GTK2 widgetset (see table below).<P>
</UL>
<LI>20070107 release:
<UL>
<LI>TOvcVirtualListBox control added.
<LI>Installation no longer registers TOvcSimpleField and TOvcTCSimpleField
controls (see myovcreg.pas) on non-Windows platforms since these two controls
don't work on other platforms and crash Lazarus IDE if added to a form on
those platforms.
</UL>
</UL>
<HR>
<A name="Introduction"></A><H3>Introduction</H3>
These notes describe the status of the OrphPort Project, an attempt to
port a subset of TurboPower's Orpheus controls to <A HREF="http://www.lazarus.freepascal.org">Lazarus</A>
and <A HREF="http://www.freepascal.org">Free Pascal</A>. At this time,
several <B>enhanced label controls</B> and most of the <B>table (grid) controls</B>
have been ported. Some of the controls
work quite well on multiple platforms; others need more work or
await better support by the Lazarus LCL or by specific widgetsets before
they are fully functional. The table below gives the status of individual
controls. You are encouraged to work on improving these controls
(see <A HREF="#To_Do">To Do list</A>). Please send your bug reports, suggestions
and patches to:<P>
&nbsp;&nbsp;MacPgmr (at) fastermac (dot) net<P>
<I>Note:</I> You can also post to the "Ported from Delphi/Kylix" section of the Lazarus
forum if you want your bug reports and suggestions to be seen by the entire
Lazarus community.<P>
The ported source code is here: <A HREF="http://web.fastermac.net/~MacPgmr/OrphPort/downloads">http://web.fastermac.net/~MacPgmr/OrphPort/downloads</A><P>
The original Orpheus 4.06 source code that this port was based on is here:
<A HREF="http://sourceforge.net/projects/tporpheus">http://sourceforge.net/projects/tporpheus</A>
(although you don't need this for Lazarus)<p>
TurboPower's 1,392-page Orpheus User's Manual is also available from the Source Forge site.<P>
Note that the ported source remains under the original MPL 1.1 license.
<HR>
<A name="Installation"></A><H3>Installation</H3>
<OL>
<LI>Unzip the ported source files into their own folder.
<LI>Start Lazarus.
<LI>Optionally, choose File | New | Application to make sure Lazarus doesn't
mess up the currently open project.
<LI>Choose Component | Open package file and select orpheus.lpk.
<LI>Click Compile to make sure your version of Lazarus can compile the
Orpheus units.
<LI>Click Install and click Yes when prompted to rebuild the Lazarus IDE.
<LI>After rebuilding is finished, restart Lazarus if it didn't restart
automatically. The installed Orpheus controls will be on the Orpheus tab
of the component palette.
</OL>
<I>Important!</I> If you don't have write access to the folder where Lazarus
is installed, you may have problems rebuilding the Lazarus IDE with older
versions of Lazarus. However, if you have a relatively new version of Lazarus,
it will compile itself to the ~/.lazarus/bin folder if you don't have write
access to the Lazarus install folder. After rebuilding, be sure to start
~/.lazarus/bin/lazarus, not the installed Lazarus.<P>
<HR>
<A name="Platforms_Tested"></A><H3>Platforms Tested</H3>
<TABLE BORDER=1 CELLPADDING=3>
<TR VALIGN=TOP>
<TH>Platform</TH>
<TH>OS Version</TH>
<TH>Library Versions</TH>
<TH>Widgetsets Tested</TH>
<TH>Lazarus Version Tested</TH>
</TR>
<TR VALIGN=TOP>
<TD>Windows</TD>
<TD>XP SP2</TD>
<TD>&nbsp;</TD>
<TD>win32</TD>
<TD>20070126 snapshot of 0.9.21 with FPC 2.1.1</TD>
</TR>
<TR VALIGN=TOP>
<TD>OS X</TD>
<TD>10.3.9 (Panther) on PowerPC</TD>
<TD>gtk: 1.2.0.9.1<BR>gtk2: 2.6.10<BR>qt: 4.2.2</TD>
<TD>gtk, gtk2, carbon, qt</TD>
<TD>20070126 snapshot of 0.9.21 with FPC 2.0.4</TD>
</TR>
<TR VALIGN=TOP>
<TD>Linux</TD>
<TD>SUSE 10.1</TD>
<TD>gtk: 1.2.10-907</TD>
<TD>gtk</TD>
<TD>Stable 0.9.20 with FPC 2.0.4</TD>
</TR>
</TABLE><BR>
<HR>
<A name="Examples"></A><H3>Examples</H3>
The source for several small test applications is included which demonstrates
most of the ported controls. Open each test app's .lpi file and compile it once
Orpheus has been installed in Lazarus. Folders for the test apps are located
in the <I>tests</I> folder in your Orpheus folder, as follows:
<UL>
<LI>TestTable - demos TOvcTable and various table cell controls (column
headers, row labels, string, memo, check box, combo box, bitmap).
<LI>TestURL - demos TOvcURL
<LI>TestRLbl - demos TOvcRotatedLabel
<LI>TestLabel - demos TOvcLabel
<LI>TestVLB - demos TOvcVirtualListBox
</UL>
To see the TOvcSpinner control in action, try out the table's Rows and Columns
property editors with the TestTable app.<P>
<I>Note:</I> The TestTable app uses the included .bmp files to demo the
TOvcTCBitMap control. These bitmap files are not needed to rebuild the Lazarus
IDE since they're in the ovcreg.lrs resource file, but they are
included for completeness.<p>
<I>Tip:</I> The necessary files for compiling the test apps with Delphi are
also included (.dof, .dfm, .bdsproj). If you have Delphi you can compile
the apps to see exactly how the Orpheus controls are supposed to look and
behave. Note that with the free Turbo Delphi Explorer you can't install
Orpheus (a limitation of the free version). However, you can still compile
the test apps, as follows:
<UL>
<LI>Start Turbo Delphi Explorer and open the test app's .bdsproj file.
<LI>Click Ignore All to proceed when Delphi encounters the unrecognized
Orpheus controls.
<LI>Choose File | Close and click Cancel to close the main form.
<LI>Choose Project | Options and make sure the Search path in
Directories/Conditionals points to your Orpheus folder.
<LI>Choose Project | Compile to compile the test app.
</UL>
<HR>
<A name="Porting_Philosophy"></A><H3>Porting Philosophy</H3>
<UL>
<LI>All changes to the original source code were made via conditional
compiling (IFDEF's). Thus the ported source retains full Delphi compatibility.
An added benefit is that you can see what the original code was, something
that is often lost with ported code.
<LI>A compatibility unit, <I>MyMisc</I>, was added to fill in gaps in the
Lazarus LCL and provide other compatibility routines.
<LI>Orpheus functions written in assembly were "Pascal-ized" so the ported code could
be compiled on non-Intel platforms.
<LI>For now, the Lazarus package (orpheus.lpk) compiles the source with range,
overflow and stack checking turned on. This revealed several apparently harmless
bugs in the TurboPower code, which have been fixed. To find these and other
minor bugs, grep the source for "TurboPower bug".
<LI>In general, no other significant changes or "improvements" were made to
the source. An exception is the o32tcflx unit, where a few additions were
made to correct apparent omissions or inconsistencies.
<LI>A note on comments: Comments added to the ported source are generally
marked with "//". However, the "o32" units (developed later than other units
by TurboPower) already included some "//" comments. With these units, you can
tell the added comments by their context (near IFDEF's, for example).
</UL>
<HR>
<A name="Usage_Notes"></A><H3>Usage Notes</H3>
<OL>
<LI>When you first add an Orpheus control to a form, Lazarus will add
the Orpheus unit to the uses section of your main source file (.lpr).
This pulls in a great deal of code that you don't need. Delete the Orpheus unit
from the uses section to reduce the size of your executable file.<P>
<LI>Several of the ported controls are not supported by the GTK widgetset
(see table below). Don't use these controls in cross-platform applications.
Just opening a form that has a TOvcSimpleField or TOvcTCSimpleField control
on it will likely crash the Lazarus IDE with GTK. Use the
TO32FlexEdit and TO32TCFlexEdit controls in place of TOvcSimpleField and
TOvcTCSimpleField controls in cross-platform applications.<P>
<LI>To display the TOvcLabel's Style Manager property editor in the Lazarus
IDE, right-click on the TOvcLabel control (Apple key+click on Mac). You can
also change Style Manager properties via the CustomSettings in the
Object Inspector. Also, with GTK, the default clNone Color displays a black
background, so be sure to set ParentColor to True or select a different
Color.<P>
<LI>An added benefit of the Orpheus TOvcSpinner control is that it is
available for Delphi too, unlike the LCL TSpinEdit, which has no equivalent
in the Delphi VCL.
</OL>
<HR>
<A name="Limitations"></A><H3>Limitations</H3>
<OL>
<LI>The TO32FlexEdit and TO32TCFlexEdit controls include code for displaying
an optional button within the text editing area. However, this TBitBtn-within-
a-TEdit is not supported by the LCL, so the code has been IFDEF'd out for now.
If this is ever supported by the LCL, defining ButtonOkay in o32flxed.pas
is all that's needed to enable the button code.<P>
<LI>Widgetsets generally implement LCL controls by creating native controls
that correspond to the LCL controls (text edit, check box, etc.). However,
Orpheus builds its TOvcSimpleField control from TCustomControl, rather than
descending from an existing edit control such as TCustomEdit. This sort of
edit control does not appear to be supported by the GTK widgetset.<P>
<LI>The GTK and Carbon widgetsets do not support TOvcRotatedLabel, apparently
because the GetTextMetrics function is not fully implemented on those
widgetsets.
</OL>
<HR>
<A name="Status_Controls"></A><H3>Status of Individual Controls</H3>
<TABLE BORDER=1 CELLPADDING=3>
<TR VALIGN=TOP>
<TH>Control</TH>
<TH>VCL / LCL ancestor</TH>
<TH>Description</TH>
<TH>Issues / To-do</TH>
<TH>win32</TH>
<TH>gtk</TH>
<TH>gtk2</TH>
<TH>carbon</TH>
<TH>qt</TH>
</TR>
<TR VALIGN=TOP>
<TD>TOvcRotatedLabel<BR><IMG SRC="TOVCROTATEDLABEL.bmp"></TD>
<TD>TGraphicControl</TD>
<TD>Rotated text</TD>
<TD>gtk and carbon don't support</TD>
<TD>Working</TD>
<TD>Not working</TD>
<TD>Crashes</TD>
<TD>Not working</TD>
<TD>Working</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcLabel<BR><IMG SRC="TOVCLABEL.bmp"></TD>
<TD>TGraphicControl</TD>
<TD>Fancy shading, color and highlighting</TD>
<TD>Property editor still needs work</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Not working</TD>
<TD>Crashes</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcURL<BR><IMG SRC="TOVCURL.bmp"></TD>
<TD>TCustomLabel</TD>
<TD>Looks and acts like HTML hyperlink</TD>
<TD>No TLabel yet on carbon</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Not working</TD>
<TD>Partial</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcSpinner<BR><IMG SRC="TOVCSPINNER.bmp"></TD>
<TD>TCustomControl</TD>
<TD>Can associate with a TEdit; 8 different styles</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Crashes</TD>
<TD>Crashes</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcVirtualListBox<BR><IMG SRC="TOVCVIRTUALLISTBOX.bmp"></TD>
<TD>TCustomControl</TD>
<TD>Tabs, header, huge number of rows</TD>
<TD>Scrolling problems</TD>
<TD>Partial</TD>
<TD>Partial</TD>
<TD>Partial</TD>
<TD>Not working</TD>
<TD>Partial</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcSimpleField<BR><IMG SRC="TOVCSIMPLEFIELD.bmp"></TD>
<TD>TCustomControl</TD>
<TD>Edit control with validation</TD>
<TD>gtk doesn't support</TD>
<TD>Working</TD>
<TD>Crashes</TD>
<TD>Crashes</TD>
<TD>Not working</TD>
<TD>Not working</TD>
</TR>
<TR VALIGN=TOP>
<TD>TO32FlexEdit<BR><IMG SRC="TO32FLEXEDIT.bmp"></TD>
<TD>TCustomEdit</TD>
<TD>Edit control with validation</TD>
<TD>See "To Do" list</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Crashes</TD>
<TD>Working</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTable<BR><IMG SRC="TOVCTABLE.bmp"></TD>
<TD>TCustomControl</TD>
<TD>Full-featured grid control</TD>
<TD>See "To Do" list</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Crashes</TD>
<TD>Crashes</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCColHead<BR><IMG SRC="TOVCTCCOLHEAD.bmp"></TD>
<TD>TComponent</TD>
<TD>Table column headings</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCRowHead<BR><IMG SRC="TOVCTCROWHEAD.bmp"></TD>
<TD>TComponent</TD>
<TD>Table row headings</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCString<BR><IMG SRC="TOVCTCSTRING.bmp"></TD>
<TD>TComponent<BR>(edits with TEdit)</TD>
<TD>Table cell for editing strings</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCSimpleField<BR><IMG SRC="TOVCTCSIMPLEFIELD.bmp"></TD>
<TD>TComponent<BR>(edits with TOvcSimpleField)</TD>
<TD>Table cell for editing strings, with validation</TD>
<TD>gtk doesn't support</TD>
<TD>Working</TD>
<TD>Crashes</TD>
<TD>Crashes</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCMemo<BR><IMG SRC="TOVCTCMEMO.bmp"></TD>
<TD>TComponent<BR>(edits with TMemo)</TD>
<TD>Table cell for editing memo text</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCCheckBox<BR><IMG SRC="TOVCTCCHECKBOX.bmp"></TD>
<TD>TComponent<BR>(edits with TCustomControl)</TD>
<TD>Table cell for check box</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCComboBox<BR><IMG SRC="TOVCTCCOMBOBOX.bmp"></TD>
<TD>TComponent<BR>(edits with TComboBox)</TD>
<TD>Table cell for combo box</TD>
<TD>Dropdown problem w/o XP manifest</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCBitmap<BR><IMG SRC="TOVCTCBITMAP.bmp"></TD>
<TD>TComponent</TD>
<TD>Table cell for displaying bitmap</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCGlyph<BR><IMG SRC="TOVCTCGLYPH.bmp"></TD>
<TD>TComponent</TD>
<TD>Table cell for cycling thru glyphs</TD>
<TD>&nbsp;</TD>
<TD>Working?</TD>
<TD>Working?</TD>
<TD>Working?</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcTCIcon<BR><IMG SRC="TOVCTCICON.bmp"></TD>
<TD>TComponent</TD>
<TD>Table cell for displaying icon</TD>
<TD>&nbsp;</TD>
<TD>Working?</TD>
<TD>Working?</TD>
<TD>Working?</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TO32TCFlexEdit<BR><IMG SRC="TO32TCFLEXEDIT.bmp"></TD>
<TD>TComponent<BR>(edits with TO32FlexEdit)</TD>
<TD>Table cell for editing strings, with validation</TD>
<TD>&nbsp;</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>Working</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
<TR VALIGN=TOP>
<TD>TOvcController<BR><IMG SRC="TOVCCONTROLLER.bmp"></TD>
<TD>TComponent</TD>
<TD>Key-to-command translator</TD>
<TD>Property editor uses TTabSet</TD>
<TD>?</TD>
<TD>?</TD>
<TD>?</TD>
<TD>?</TD>
<TD>?</TD>
</TR>
</TABLE>
<BR>
Notes:<BR>
(1) "Working" means control is basically functional. "Partial" means
control compiles, installs in IDE and displays at run-time, but doesn't function
correctly. "Not working" means control compiles and installs in IDE but
doesn't display correctly. "Widgetset doesn't support" means the widgetset
currently does not provide the support needed for the control.<BR>
(2) TOvcSimpleField and TOvcTable require a TOvcController on form.
However, TO32FlexEdit doesn't need TOvcController.<P>
<HR>
<A name="To_Do"></A><H3>To Do</H3>
<UL>
<LI>TOvcLabel
<UL>
<LI>Figure out why TOvcColorComboBox controls in Style Manager property editor
don't work.
<LI>Figure out why Color's default value (clNone) displays black
background with GTK. Workaround for now is to set TOvcLabel's
ParentColor to True in Object Inspector or select a different Color.
</UL>
<LI>TOvcVirtualListBox
<UL>
<LI>Fix scrolling problems on both Windows and GTK.
<LI>Figure out why double-click doesn't work on GTK.
</UL>
<LI>TO32FlexEdit
<UL>
<LI>Figure out why, on Windows, presence of XP manifest prevents setting Text.
<LI>Come up with workaround for LCL's lack of MakeObjectInstance for making
callback function from method. Without this, control's validation is not
performed. (See LclEditWindowProc in ovctccbx.pas for example
of a workaround approach that currently doesn't work.)
<LI>Can't tab out of control on Windows with win32 widgetset (tabbing works
with qt widgetset on Windows though).
</UL>
<LI>TOvcTable
<UL>
<LI>Custom cursors not visible when sizing and moving columns and rows.
Determine whether this is an LCL limitation.
<LI>Sizing and moving columns and rows doesn't work at all with GTK.
Determine whether this is a GTK limitation.
<LI>Table scroll bar "thumb" extends entire length of scrollbar with GTK
(same problem with TScrollBar on GTK). Determine if this is a GTK limitation.
<LI>Figure out how to move edit cell to stay with its row when scrolling
table (GTK only).
</UL>
<LI>TOvcTCComboBox
<UL>
<LI>Figure out why, on Windows, won't drop down without presence of
XP manifest.
</UL>
<LI>TO32TCFlexEdit
<UL>
<LI>Need a way of setting OnValidationError handler (an apparent
omission since TO32FlexEdit has it).
</UL>
<LI>TOvcController
<UL>
<LI>Rewrite ovccmdp0.pas property editor to use TTabControl instead of
TTabSet (not part of LCL).
</UL>
</UL>
<HR>
<A name="Other_Resources"></A><H3>Other Resources</H3>
Qt widgetset status:<P>
<A HREF="http://wiki.lazarus.freepascal.org/Qt_Interface">http://wiki.lazarus.freepascal.org/Qt_Interface</A><P>
Carbon widgetset status:<P>
<A HREF="http://wiki.lazarus.freepascal.org/Carbon_Interface">http://wiki.lazarus.freepascal.org/Carbon_Interface</A><P>
OS X tips for Lazarus:<P>
<A HREF="http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips">http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips</A><P>
<P>
<HR>
Last updated: Jan. 28, 2007
<P>
</BODY>
</HTML>