Difference between revisions of "Carbon interface internals/de"
m |
m |
||
Line 85: | Line 85: | ||
!STYLE="background:#FF9999;"|Abhängigkeiten | !STYLE="background:#FF9999;"|Abhängigkeiten | ||
!STYLE="background:#FF9999;"|Verantwortlich | !STYLE="background:#FF9999;"|Verantwortlich | ||
− | |||
− | |||
|---- | |---- | ||
|ShowWindow||Maximize <-> Restore is breaked|| || | |ShowWindow||Maximize <-> Restore is breaked|| || | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|---- | |---- | ||
|TCustomEdit.CharCase||Is ignored when typing text|| || | |TCustomEdit.CharCase||Is ignored when typing text|| || | ||
|---- | |---- | ||
− | + | |TMemo.WordWrap||persistent bug, when word wrap is disabled the memo doesn't scroll to caret|| || | |
− | |||
− | |TMemo.WordWrap|| | ||
− | |||
− | |||
− | |||
− | |||
|---- | |---- | ||
|EnumFontFamiliesEx, FindCarbonFontID||Get UTF-8 font names||UTF16ToUTF8||[[User:Tombo|Tombo]] | |EnumFontFamiliesEx, FindCarbonFontID||Get UTF-8 font names||UTF16ToUTF8||[[User:Tombo|Tombo]] | ||
− | |||
− | |||
|---- | |---- | ||
|TForm.ShowModal||Problem with repeated calling|| || | |TForm.ShowModal||Problem with repeated calling|| || |
Revision as of 23:34, 16 March 2007
│ Deutsch (de) │ English (en) │
Dieser Artikel behandelt ausschließlich macOS.
Siehe auch: Multiplatform Programming Guide/de
Dieser Artikel behandelt ausschließlich iOS.
Siehe auch: Multiplatform Programming Guide/de
Diese Seite bietet einen Überblick über die LCL Carbon Schnittstelle für Mac OS X und soll neuen Entwicklern helfen.
Für die Installation und Erzeugung einer ersten Carbon Anwendung lesen sie zunächst Carbon Interface.
Dokumentation über Carbon
"Learning Carbon" sample book chapter
Free Pascal's Carbon API unit is FPCMacOSAll.pas in /usr/local/share/fpcsrc/packages/extra/univint.
Carbon interface development basics
- Target Mac OS X version is 10.4
- Avoid using obsolete or deprecated APIs and functions (e. g. QuickDraw vs. Quartz 2D)
Was funktioniert bereits ?
- Forms and controls - see Roadmap Widgetset dependent components
- Erstellen von TOpenGLControl mit AGL Kontext (siehe components/opengl/)
- Maus Ereignisse
- Tastatur Ereignisse (VK_ mapping für fremde Tastaturen muß noch getestet werden)
Was muß als nächstes getan werden ?
Item | Anmerkung | Abhängigkeiten | Verantwortlich |
---|---|---|---|
TControl.Cursor | SetThemeCursor | ||
TWinControl.TabOrder + TabStop | kEventControlSetFocus | ||
TListBox + TCheckListBox | CreateListBoxControl does not function in compositing mode! We must create our own Carbon list box control. | Tombo | |
TBitBtn default glyphs | CreatePixmapIndirect | ||
TBrush Patterns | CGPatternCreate | ||
TCustomControl | Tombo | ||
TPanel | Frame3D | Tombo | |
TGraphicControl | MoveWindowOrgEx, IntersectClipRect, SaveDC, RestoreDC, RectVisible | Tombo | |
ScreenDC | CGDisplayCapture, CGDisplayGetDrawingContext, CGDisplayRegisterReconfigurationCallback | TCarbonScreenContext | |
Hints | CreateNewWindow with kHelpWindowClass | WindowFromPoint | Tombo |
TOpenDialog | NavCreateGetFileDialog | Phil | |
TSaveDialog | NavCreatePutFileDialog | Phil | |
TCalendar | maybe CreateClockControl, but it is more date time edit than calendar | ||
TFontDialog | FPShowHideFontPanel | ||
TListView | CreateDataBrowserControl | ||
TMainMenu + TPopupMenu | CreateNewMenu | Tombo | |
TNoteBook + TPage | CreateTabsControl | ||
TScrollBox | HIScrollViewCreate | ||
TStatusBar | maybe CreatePlacardControl |
Bugs
Item | Anmerkung | Abhängigkeiten | Verantwortlich |
---|---|---|---|
ShowWindow | Maximize <-> Restore is breaked | ||
TCustomEdit.CharCase | Is ignored when typing text | ||
TMemo.WordWrap | persistent bug, when word wrap is disabled the memo doesn't scroll to caret | ||
EnumFontFamiliesEx, FindCarbonFontID | Get UTF-8 font names | UTF16ToUTF8 | Tombo |
TForm.ShowModal | Problem with repeated calling | ||
TMaskEdit | Every typed char is doubled |
Compatibility issues
Tastatur
- Apple Command key is mapped to ssCtrl due to Apple Guidelines
- Apple control key is mapped to ssMeta
- Apple option key is mapped to its inscription, i.e. ssAlt
- Virtual key codes mapping (depends on keyboard language layout!)
- Shortcuts indication (ampersand)
Drawing on canvas outside OnPaint event
- paints into QuickDraw window port, maybe QDBeginCGContext, QDEndCGContext would help
TControl.Color
- background of Carbon controls is transparent
Wie man ein neues Bedienelement hinzufügt
Zum Beispiel TButton.
TButton wird definiert in lcl/buttons.pp. Dies ist der plattformunabhängige Teil der LCL, welcher vom normalen LCL Programmierer benutzt wird.
Seine widgetset Klasse befindet sich in lcl/widgetset/wsbuttons.pp. Dies ist die plattformabhängige Basis für alle widgetsets (carbon, gtk, win32, ...).
Seine Carbon Schnittstellenklasse ist in lcl/interfaces/carbon/carbonwsbuttons.pp:
TCarbonWSButton = class(TWSButton) private protected public class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; end;
Jede WS Klasse, die tatsächlich etwas implementiert, muß registriert werden. Schauen sie den initialization Abschnitt am Ende der carbonwsXXX.pp Unit an:
RegisterWSComponent(TCustomButton, TCarbonWSButton);
TCarbonWSButton setzt CreateHandle außer Kraft, um einen Carbon Button zu erstellen. Der Code ist kurz und sollte leicht anpassbar sein für andere Bedienelemente wie TCheckBox.