Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

Updates

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi all,

Many changes from Andrew:

- GTK interface : Improvements to GTK Styles/Default Font
- TextRect now has a SystemFont flag, to allow drawing with the default System Font
- SpeedButton now uses SystemFont, so Text matches System Theme, except for prefix underline
- Basic AutoSizing code for TWinControls has been added for TPanel/TForm etc.
- TScrollBox :
This Widget only works under GTK, as I do not understand Windows Scrolling as of yet.
AutoScroll is always set, as trying to change it under GTK would require several hack's until its implementation more fully matches Delphi's/Win32. So if anyone out there wants to take a whack at finishing it up for windows, it might help.
- TBitmap
- Settng Width/Height is now functional, if not complete
- Getting Width/Height now works properly
- FreeImage now empties the handle
- LoadFromFile now calls to LoadFromXPMFile, till things are more functional
- Misc fixes/hacks
- TPicture now works, via a few hacks, however it does not copy an assigned Image since Assigning is not functional under TBitmap
- TImage
- Added Transparent, Stretch and Center
- Now works properly, with two noteable exceptions:
1) clipping a Pixmap With Transparency larger than the area does not work under GTK, so it draws outside its bounds
2) Stretching a Pixmap with Transparency loses the Transparency
- GTK interface : GetObject, now partially works for Bitmaps, and can get Width/Height and Depth properly
- GTK interface : a LoadFromPixbufFile has been added which supports loading misc. Graphics Formats specifically .bmp for use with TBitmap. This could feasably be extended to use GDKPixbufLoader to enable loading from a TStream as well. But for now this ensure that when Pixbuf support is enabled TBitmap.LoadFromFile will work.
- Property editors have been added for TBitmap/TPixmap/TPicture and for TBitBtn & TSpeedButton.Glyph though until Saving to Stream works, they are really just a pretty toys. ;)
- Misc. Fixes and hacks all over the place..

please note that the TBitBtn.Glyph property is now published, meaning any lfm files with BitBtns will not be compatible with older versions of Lazarus.

I think that is everything for now, except that much of this is only partially implemented, so there are various hacks in place.. and while more functionailty has been added there is still much missing or incompatible with Delphi., so if anyone wants to try their hand at finishing Saving Bitmaps & Pixmaps to stream, or working on TScrollBox, or finishing DIB Sections, and loading Bitmaps form streams, it would help out a great deal.

Other updates:
- synedit: right margin is now painted under the text
- new property editors for TTime, TDate, TDateTime
- Double, Triple and Quad clicks now works under gtk
- synedit: Quad click selects paragraph

Mattias

Reply by email

Mattias Gaertner

Hi,

I committed some updates from Andrew.

WARNING: do NOT use the IDE for loading images/Glyphs.. it will try and save them but usually incorectly, which can kill lazarus or program on next load.. (You have to edit the lfm file manually if you do)

-LCL
-improvements to the TWinControl AutoSizing code
-Minor Fixes to TStatusbar drawing
-Implemented TControlScrollBar basics
-Implemented TScrollingWinControl, w/AutoScrolling support NOTE: this does not work under Win32 yet, any volunteers welcome! -Inherited TScrollBox from TScrollingWinControl, and moved to Forms -Implemented basic version of TBitmap.WriteStream, needs Work

-GTK Interface
-GetObject routine, more accurately retrieves Bitmap Information -gdiBitmaps all now have an internal Visual, and colormap -Pixmap/Bitmap now have initial support for multiple depths -CreateBitmap tries to load Bitmap Data using GDKPixbufLoader, only partial
-GetDIBits & GetBitmapBits have been partially implemented for 24 bit Depth
-TScrollBox now uses a GTK Layout, and has partial support for Scrolling TControls(BTW Mattias Thanks for the offset code, it mostly works) -Misc other fixes/improvements

-Win32 Interface
-Added GetDIBits, GetBitmapBits, & CreateDIBSection

Until DIB loading/Saving has been finished under GTK, LoadFromStream will not load most .bmp properly. For this reason it may be to your advantage, to use TBitmap.LoadFromXPMFile, instead of LoadFromFile, or better yet(shameless plug) help finish this rather complex set of routines. ;-)

Mattias

Reply by email

Mattias Gaertner

Hi,

I have added the 'Unit dependencies' tool window to the IDE. Available under View->Unit Dependencies. This window shows the used units of a source in a treeview. Usage should be quite clear, but here are some extra hints:
- double click on an item will open the file in the editor
- There is bug in TComboBox. Therefore you must press enter, to select an item from the history.

Other updates:

- keymapping for designer
- TComponentPropertyEditor shows sub properties of components
- Saving dialog sizes of environment, editor and codetoolsdefines options
- added TSynEdit.BlockIndent (You can set them in the editor options)
- memcheck of IDE repaired
- and of course many fixes and optimiziations

Mattias

Reply by email

Andrew Johnson
On Wed, 2002-09-18 at 13:54, Mattias Gaertner wrote:

well actually it was me.. he was just passing it along..

Show quoted text 12 lines
>gtk/gnome PROPERLY, not just hacks like Lazarus. > Are you calling my IDE of choice a... I get choked up saying it... HACK? I'm ashamed of you! LOL!

Wepedia's definition of Hack:

(v) 1. To write program code.
2. To modify a program, often in an unauthorized manner, by changing the code itself.

(n) 1. Code that is written to provide extra functionality to an existing program.

2. An inelegant and usually temporary solution to a problem.

By my way of thinking, Much of the LCL currently falls under (N) #2. And while 'an unauthorized manner' isn't exactly right, substiting 'an improper manner' or 'an illadvised manner' (V) #2 describes much of how Lazarus has in the past and currently still does tackle certain types of functionality.. portions of my new GC code falls under both. And besides.. if you take the other two definitions at face value, every program library etc is a hack, therefore I choose to look at Lazarus as being simply a Hack (N) #1 of a Hack (V) #1, with the other two at times thrown in for fun!! hehe..

Andrew

_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

Reply by email

Mattias Gaertner

Here is a new patch from Andrew ...

-Added Interface independant RoundRect routine
-Fixed Brush Hatch/Bitmap under GTK
-Switched all GTK backend colors to a new TGDIColor record -a few minor graphics fixes
-removed all ColorToRGB references I could find
-switched SysColor checking to Interface portion
-GTK now attempts to use Style GC's for SysColors if possible -Brush, pen etc colors are now allocated only when used -Initial code references for Palettes, for future support -Initial code in DrawFrameControl, for DFCS_BUTTONCHECK WARNING - this code is not always accurate, and depending your theme engine, can kill your program!!!

-misc. other stuff

On the initial code for GC dependent drawing -

this is GC dependent still, not Style dependent. This means that bad/poorly designed Themes will have problems, along with a few Engine themes. Example
- most Xenophilia and EnGradient themes should work, though Gradients and advanced style features will not show up, but various Pixmaps engine themes will look awfull. This is not a flaw in the code persay, but rather a missing feature, and poorly designed themes. Many theme designers will ignore color settings in Pixmap themes, so the default is used, which may or may not be nice. (One such theme on my system is PES-RILY, a gray theme where clBtnFace is defaulted to BLACK!!)

If you find that your favorite/default theme is such a theme, you can a.) fix the theme ;), or b.) disable the code by recompiling lazarus with a -dDisable_GC_SysColors or with this flag enabled in gtkint.pp.

In time this may no longer be an issue, but don't hold your breath.. I have known these problems too show up in several various programs which use gtk/gnome PROPERLY, not just hacks like Lazarus.

Andrew
TTFN
Genius(in name only)

Reply by email