[lazarus] Update

Marc Weustink weus at quicknet.nl
Tue Oct 26 17:44:48 EDT 1999


At 14:46 26-10-99 -0500, Shane wrote:
>I certainly could use the help with MWEDIT.  If you search (grep) for the
words TODO: you can see an awful lot of procedures and functions that need
to be written yet.
>
>Feel free...  :-)  It'll make mwedit a lot more fun once we get it to compile

OK, second attempt (the first time NT just locked and I loosed all)

I looked at the TODO's and found:

Windows:
  GetDC
  ReleaseDC
  GetObject
  SelectObject
  DeleteObject
  ShowCaret
  HideCaret
  SetCaretPos 
  GetSystemMetrics 
  RecreateWnd

  Canvas: (*)
    ExtTextOut
 
  Font: (*)
    GetTextMetrics
    CreateFontIndirect

  ScrollBar: (*)
    SetScrollInfo
    ShowScrollBar

System:
  StringOfChar

Menus: (!)
  ShortCut
  ShortCutToKey

other:
  TRegistry
  TBitmap.LoadFromResourceName
  TFont.Pitch

Now the question how to implement. I think thewre are a few options:
1)
Don't support direct API calls. Use their class counterparts. IE, dont use
ExtTextOut(Canvas.Handle, ...) but use Canvas.ExtTextOut(...). This bereaks
a lot of compatibility.

2)
Use a platform dependent windows.pp like the classes unit. However there
aleady exists a rtl windows.pp (and linux.pp)

3)
Since linux.pp and windows.pp are rtl files, create ONE LCLwindows.pp. This
file contains (win)API related implementations for every platform (if it is
possible) or just a call to its InterfaceObject(since it's global)
counterpart (all platform specific stuff in one place). Like
LCLwindows.ExtTextOut calls InterfaceObject.ExtTextOut.

Question is, what way to go. I think I prefer last one. It's only adding a
reference to LCLwindows if needed. Any thoughts ?

Marc

(meanwhile doing some menu stuff)







More information about the Lazarus mailing list