carbon: clean up

git-svn-id: trunk@37007 -
This commit is contained in:
mattias 2012-04-24 10:58:37 +00:00
parent 41130b9523
commit 1e015d492b
13 changed files with 70 additions and 86 deletions

View File

@ -1,5 +1,4 @@
{ $Id: { --------------------------------------------
--------------------------------------------
carboncalendar.pp - Carbon calendar carboncalendar.pp - Carbon calendar
-------------------------------------------- --------------------------------------------

View File

@ -1,5 +1,4 @@
{ $Id: $ { --------------------------------------------
--------------------------------------------
carbonprivate.pp - Carbon internal classes carbonprivate.pp - Carbon internal classes
-------------------------------------------- --------------------------------------------

View File

@ -1,5 +1,4 @@
{ $Id: $ { --------------------------------------------
--------------------------------------------
carbonprivate.pp - Carbon internal classes carbonprivate.pp - Carbon internal classes
-------------------------------------------- --------------------------------------------
@ -30,14 +29,14 @@ interface
uses uses
// rtl+ftl // rtl+ftl
Types, Classes, SysUtils, Math, Contnrs, Types, Classes, SysUtils,
// carbon bindings // carbon bindings
MacOSAll, MacOSAll,
{$ifdef CarbonUseCocoaAll} {$ifdef CarbonUseCocoaAll}
CocoaAll, CocoaAll,
{$endif} {$endif}
// widgetset // widgetset
WSControls, WSLCLClasses, WSProc, WSLCLClasses,
// LCL Carbon // LCL Carbon
CarbonDef, CarbonGDIObjects, CarbonMenus, CarbonDef, CarbonGDIObjects, CarbonMenus,
// LCL // LCL
@ -337,8 +336,7 @@ const
implementation implementation
uses InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils, uses InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonCaret;
CarbonWSStdCtrls, CarbonCanvas, CarbonCaret;
var var
// recursive number of draw events called by OSX // recursive number of draw events called by OSX
@ -1683,7 +1681,7 @@ begin
if OSError( if OSError(
CreateStaticTextControl(GetTopParentWindow, ParamsToCarbonRect(AParams), CreateStaticTextControl(GetTopParentWindow, ParamsToCarbonRect(AParams),
nil, @FontStyle, Control), nil, @FontStyle, Control{%H-}),
Self, SCreateWidget, 'CreateStaticTextControl') then RaiseCreateWidgetError(LCLObject); Self, SCreateWidget, 'CreateStaticTextControl') then RaiseCreateWidgetError(LCLObject);
Widget := Control; Widget := Control;

View File

@ -27,11 +27,9 @@ interface
uses uses
// rtl+ftl // rtl+ftl
Types, Classes, SysUtils, Math, Contnrs, Types, Classes, SysUtils, Contnrs,
// carbon bindings // carbon bindings
MacOSAll, MacOSAll, WSLCLClasses,
// widgetset
WSControls, WSLCLClasses, WSProc,
// LCL Carbon // LCL Carbon
CarbonDef, CarbonPrivate, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonGDIObjects, CarbonDef, CarbonPrivate, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonGDIObjects,
// LCL // LCL
@ -95,7 +93,7 @@ type
procedure DisableChangeEvent; procedure DisableChangeEvent;
procedure EnableChangeEvent; procedure EnableChangeEvent;
public public
function SetText(const S: String): Boolean; override; function SetText(const {%H-}S: String): Boolean; override;
function GetClientRect(var ARect: TRect): Boolean; override; function GetClientRect(var ARect: TRect): Boolean; override;
function SetBounds(const ARect: TRect): Boolean; override; function SetBounds(const ARect: TRect): Boolean; override;
@ -259,7 +257,7 @@ const
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function CarbonTabsPrevArrow_Reverse(ANextHandler: EventHandlerCallRef; function CarbonTabsPrevArrow_Reverse(ANextHandler: EventHandlerCallRef;
AEvent: EventRef; AEvent: EventRef;
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF} {%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
var var
Context : CGContextRef; Context : CGContextRef;
layer : CGLayerRef; layer : CGLayerRef;
@ -362,10 +360,10 @@ begin
if FShowTabBar then if FShowTabBar then
begin begin
FillChar(TabEntry, SizeOf(TabEntry), 0); FillChar(TabEntry{%H-}, SizeOf(TabEntry), 0);
if OSError( if OSError(
CreateTabsControl(GetTopParentWindow, ParamsToCarbonRect(AParams), CreateTabsControl(GetTopParentWindow, ParamsToCarbonRect(AParams),
kControlTabSizeLarge, Direction, 0, TabEntry, Control), kControlTabSizeLarge, Direction, 0, TabEntry, Control{%H-}),
Self, SCreateWidget, 'CreateTabsControl') then RaiseCreateWidgetError(LCLObject); Self, SCreateWidget, 'CreateTabsControl') then RaiseCreateWidgetError(LCLObject);
end end
else else
@ -381,7 +379,7 @@ begin
Widget := Control; Widget := Control;
if not GetClientRect(R) then if not GetClientRect(R{%H-}) then
begin begin
DebugLn('TCarbonTabsControl.CreateWidget Error - no content region!'); DebugLn('TCarbonTabsControl.CreateWidget Error - no content region!');
Exit; Exit;
@ -419,7 +417,7 @@ begin
RegisterEventHandler(@CarbonTabsNextArrow_Track), RegisterEventHandler(@CarbonTabsNextArrow_Track),
1, @TmpSpec, Pointer(Self), nil); 1, @TmpSpec, Pointer(Self), nil);
Err:=Gestalt(gestaltSystemVersion, Ver); Err:=Gestalt(gestaltSystemVersion, Ver{%H-});
if (Err <> 0) or (Ver >= $1040) then begin if (Err <> 0) or (Ver >= $1040) then begin
TmpSpec := MakeEventSpec(kEventClassControl, kEventControlDraw); TmpSpec := MakeEventSpec(kEventClassControl, kEventControlDraw);
InstallControlEventHandler(FPrevArrow, InstallControlEventHandler(FPrevArrow,
@ -493,7 +491,7 @@ begin
begin begin
if I = FTabIndex then // update tab bounds if I = FTabIndex then // update tab bounds
begin begin
GetClientRect(R); GetClientRect(R{%H-});
OffsetRect(R, -R.Left, -R.Top); OffsetRect(R, -R.Left, -R.Top);
TCarbonTab(FTabs[I]).SetBounds(R); TCarbonTab(FTabs[I]).SetBounds(R);
end; end;
@ -542,7 +540,7 @@ begin
begin begin
S := TCarbonTab(FTabs[I]).FText; S := TCarbonTab(FTabs[I]).FText;
DeleteAmpersands(S); DeleteAmpersands(S);
if DefaultContext.GetTextExtentPoint(PChar(S), Length(S), Size) then if DefaultContext.GetTextExtentPoint(PChar(S), Length(S), Size{%H-}) then
TabSizes[I] := Size.cx + 24 TabSizes[I] := Size.cx + 24
else else
TabSizes[I] := 24; TabSizes[I] := 24;
@ -769,10 +767,10 @@ begin
end; end;
// send changing // send changing
FillChar(Msg, SizeOf(TLMNotify), 0); FillChar(Msg{%H-}, SizeOf(TLMNotify), 0);
Msg.Msg := LM_NOTIFY; Msg.Msg := LM_NOTIFY;
FillChar(NMHdr, SizeOf(TNMHdr), 0); FillChar(NMHdr{%H-}, SizeOf(TNMHdr), 0);
NMHdr.code := TCN_SELCHANGING; NMHdr.code := TCN_SELCHANGING;
NMHdr.hwndFrom := LCLObject.Handle; NMHdr.hwndFrom := LCLObject.Handle;
NMHdr.idFrom := PIndex; NMHdr.idFrom := PIndex;
@ -866,7 +864,7 @@ begin
begin begin
UpdateContentBounds; UpdateContentBounds;
GetClientRect(R); GetClientRect(R{%H-});
if FShowTabBar then if FShowTabBar then
begin begin
@ -887,7 +885,7 @@ var
tabno : ControlPartCode; tabno : ControlPartCode;
begin begin
Result := -1; Result := -1;
if not CarbonHitTest(Widget, AClientPos.X, AClientPos.Y, tabno) then Exit; if not CarbonHitTest(Widget, AClientPos.X, AClientPos.Y, tabno{%H-}) then Exit;
if tabno = kControlNoPart then if tabno = kControlNoPart then
begin begin
@ -908,7 +906,7 @@ function TCarbonTabsControl.IsDesignInteractive(const P: TPoint): Boolean;
var var
R: TRect; R: TRect;
begin begin
GetClientRect(R); GetClientRect(R{%H-});
Offsetrect(R, -R.Left, -R.Top); Offsetrect(R, -R.Left, -R.Top);
case FTabPosition of case FTabPosition of

View File

@ -35,9 +35,9 @@ uses
// LCL // LCL
Classes, Controls, Buttons, LCLType, LCLProc, Graphics, Classes, Controls, Buttons, LCLType, LCLProc, Graphics,
// widgetset // widgetset
WSButtons, WSLCLClasses, WSProc, WSButtons, WSLCLClasses,
// LCL Carbon // LCL Carbon
CarbonDef, CarbonPrivate, CarbonButtons, CarbonWSControls, CarbonGDIObjects; CarbonDef, CarbonButtons, CarbonGDIObjects;
type type
@ -60,7 +60,7 @@ type
implementation implementation
uses uses
CarbonProc, CarbonDbgConsts, CarbonCanvas; CarbonProc;
{ TCarbonWSBitBtn } { TCarbonWSBitBtn }

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSCalendar.pp * * CarbonWSCalendar.pp *

View File

@ -30,14 +30,12 @@ interface
{$I carbondefines.inc} {$I carbondefines.inc}
uses uses
// libs
MacOSAll,
// LCL // LCL
Classes, Controls, ComCtrls, StdCtrls, LCLType, LCLProc, Graphics, Math, ImgList, Classes, Controls, ComCtrls, StdCtrls, LCLType, LCLProc, Graphics, ImgList,
// widgetset // widgetset
WSComCtrls, WSLCLClasses, WSControls, WSProc, WSComCtrls, WSLCLClasses,
// LCL Carbon // LCL Carbon
CarbonDef, CarbonPrivate, CarbonBars, CarbonStrings, CarbonWSControls, CarbonDef, CarbonPrivate, CarbonBars,
CarbonListViews; CarbonListViews;
type type
@ -99,31 +97,31 @@ type
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
// Column // Column
class procedure ColumnDelete(const ALV: TCustomListView; const AIndex: Integer); override; class procedure ColumnDelete(const ALV: TCustomListView; const AIndex: Integer); override;
class function ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn): Integer; override; class function ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn): Integer; override;
class procedure ColumnInsert(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn); override; class procedure ColumnInsert(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn); override;
class procedure ColumnMove(const ALV: TCustomListView; const AOldIndex, ANewIndex: Integer; const AColumn: TListColumn); override; class procedure ColumnMove(const ALV: TCustomListView; const AOldIndex, ANewIndex: Integer; const AColumn: TListColumn); override;
class procedure ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAlignment: TAlignment); override; class procedure ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AAlignment: TAlignment); override;
class procedure ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAutoSize: Boolean); override; class procedure ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AAutoSize: Boolean); override;
class procedure ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ACaption: String); override; class procedure ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const ACaption: String); override;
class procedure ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AImageIndex: Integer); override; class procedure ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AImageIndex: Integer); override;
class procedure ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMaxWidth: Integer); override; class procedure ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AMaxWidth: Integer); override;
class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMinWidth: integer); override; class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AMinWidth: integer); override;
class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AWidth: Integer); override; class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AWidth: Integer); override;
class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AVisible: Boolean); override; class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AVisible: Boolean); override;
// Item // Item
class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override; class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override;
class function ItemDisplayRect(const ALV: TCustomListView; const AIndex, ASubItem: Integer; ACode: TDisplayCode): TRect; override; class function ItemDisplayRect(const ALV: TCustomListView; const AIndex, ASubItem: Integer; ACode: TDisplayCode): TRect; override;
class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean; override; class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem): Boolean; override;
class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override; class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override;
class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported
class procedure ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem); override; class procedure ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem); override;
class procedure ItemSetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AChecked: Boolean); override; class procedure ItemSetChecked(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AChecked: Boolean); override;
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex, AImageIndex: Integer); override; class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex, {%H-}AImageIndex: Integer); override;
//class function ItemSetPosition(const ALV: TCustomListView; const AIndex: Integer; const ANewPosition: TPoint): Boolean; override; //class function ItemSetPosition(const ALV: TCustomListView; const AIndex: Integer; const ANewPosition: TPoint): Boolean; override;
class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override; class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override;
class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String); override; class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex: Integer; const {%H-}AText: String); override;
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean); override; class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const PartialOK: Boolean); override;
// LV // LV
//class procedure BeginUpdate(const ALV: TCustomListView); override; //class procedure BeginUpdate(const ALV: TCustomListView); override;
@ -144,14 +142,14 @@ type
class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override; class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override;
//class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override; //class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override;
//class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override; //class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override;
class procedure SetImageList(const ALV: TCustomListView; const AList: TListViewImageList; const AValue: TCustomImageList); override; class procedure SetImageList(const ALV: TCustomListView; const {%H-}AList: TListViewImageList; const {%H-}AValue: TCustomImageList); override;
class procedure SetItemsCount(const ALV: TCustomListView; const Avalue: Integer); override; class procedure SetItemsCount(const ALV: TCustomListView; const Avalue: Integer); override;
class procedure SetOwnerData(const ALV: TCustomListView; const AValue: Boolean); override; class procedure SetOwnerData(const ALV: TCustomListView; const {%H-}AValue: Boolean); override;
class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override; class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override;
class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override; class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override; class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer; class procedure SetSort(const ALV: TCustomListView; const {%H-}AType: TSortType; const {%H-}AColumn: Integer;
const ASortDirection: TSortDirection); override; const {%H-}ASortDirection: TSortDirection); override;
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override; class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
class procedure SetViewStyle(const ALV: TCustomListView; const AValue: TViewStyle); override; class procedure SetViewStyle(const ALV: TCustomListView; const AValue: TViewStyle); override;
end; end;
@ -168,7 +166,7 @@ type
published published
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
class procedure ApplyChanges(const AProgressBar: TCustomProgressBar); override; class procedure ApplyChanges(const AProgressBar: TCustomProgressBar); override;
class procedure SetPosition(const AProgressBar: TCustomProgressBar; const NewPosition: integer); override; class procedure SetPosition(const AProgressBar: TCustomProgressBar; const {%H-}NewPosition: integer); override;
class procedure SetStyle(const AProgressBar: TCustomProgressBar; const AStyle: TProgressBarStyle); override; class procedure SetStyle(const AProgressBar: TCustomProgressBar; const AStyle: TProgressBarStyle); override;
end; end;
@ -204,7 +202,7 @@ type
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
class procedure ApplyChanges(const ATrackBar: TCustomTrackBar); override; class procedure ApplyChanges(const ATrackBar: TCustomTrackBar); override;
class function GetPosition(const ATrackBar: TCustomTrackBar): integer; override; class function GetPosition(const ATrackBar: TCustomTrackBar): integer; override;
class procedure SetPosition(const ATrackBar: TCustomTrackBar; const NewPosition: integer); override; class procedure SetPosition(const ATrackBar: TCustomTrackBar; const {%H-}NewPosition: integer); override;
end; end;
{ TCarbonWSCustomTreeView } { TCarbonWSCustomTreeView }
@ -223,7 +221,7 @@ type
implementation implementation
uses uses
CarbonProc, CarbonTabs, CarbonDbgConsts; CarbonProc, CarbonTabs;
{ TCarbonWSToolBar } { TCarbonWSToolBar }

View File

@ -35,9 +35,9 @@ uses
// LCL // LCL
Classes, SysUtils, FileUtil, Controls, Dialogs, LCLType, LCLProc, Masks, Graphics, Classes, SysUtils, FileUtil, Controls, Dialogs, LCLType, LCLProc, Masks, Graphics,
// widgetset // widgetset
WSLCLClasses, WSProc, WSDialogs, WSLCLClasses, WSDialogs,
// LCL Carbon // LCL Carbon
CarbonDef, CarbonPrivate; CarbonDef;
type type
@ -105,7 +105,7 @@ var
FilterIndex: Integer; FilterIndex: Integer;
function FilterCallback(var theItem: AEDesc; info: NavFileOrFolderInfoPtr; function FilterCallback(var theItem: AEDesc; info: NavFileOrFolderInfoPtr;
callbackUD: UnivPtr; filterMode: NavFilterModes): Boolean; mwpascal; callbackUD: UnivPtr; {%H-}filterMode: NavFilterModes): Boolean; mwpascal;
{Custom filter callback function. Pointer to this function is passed as {Custom filter callback function. Pointer to this function is passed as
inFilterProc to NavCreateGetFileDialog and NavCreateChooseFolderDialog. inFilterProc to NavCreateGetFileDialog and NavCreateChooseFolderDialog.
If theItem file should be highlighted in file dialog, return True; If theItem file should be highlighted in file dialog, return True;
@ -198,8 +198,8 @@ begin
end; end;
if DirURL <> nil then if DirURL <> nil then
if CFURLGetFSRef(DirURL, DirRef) then if CFURLGetFSRef(DirURL, DirRef{%H-}) then
if not OSError(AECreateDesc(typeFSRef, @DirRef, SizeOf(FSRef), Dir), if not OSError(AECreateDesc(typeFSRef, @DirRef, SizeOf(FSRef), Dir{%H-}),
SName, 'AECreateDesc') then SName, 'AECreateDesc') then
OSError(NavCustomControl(CallBackParms^.context, kNavCtlSetLocation, @Dir), OSError(NavCustomControl(CallBackParms^.context, kNavCtlSetLocation, @Dir),
SName, 'NavCustomControl', 'InitialDir'); SName, 'NavCustomControl', 'InitialDir');
@ -257,7 +257,7 @@ begin
FileDialog := ACommonDialog as TFileDialog; FileDialog := ACommonDialog as TFileDialog;
// Initialize record to default values // Initialize record to default values
if OSError(NavGetDefaultDialogCreationOptions(CreationOptions), if OSError(NavGetDefaultDialogCreationOptions(CreationOptions{%H-}),
Self, SShowModal, 'NavGetDefaultDialogCreationOptions') then Exit; Self, SShowModal, 'NavGetDefaultDialogCreationOptions') then Exit;
if FileDialog.Title <> '' then // Override dialog's default title? if FileDialog.Title <> '' then // Override dialog's default title?
@ -311,7 +311,7 @@ begin
// Create Save dialog // Create Save dialog
if OSError( if OSError(
NavCreatePutFileDialog(@CreationOptions, 0, 0, NavDialogUPP, NavCreatePutFileDialog(@CreationOptions, 0, 0, NavDialogUPP,
UnivPtr(FileDialog), DialogRef), UnivPtr(FileDialog), DialogRef{%H-}),
Self, SShowModal, 'NavCreatePutFileDialog') then Exit; Self, SShowModal, 'NavCreatePutFileDialog') then Exit;
end end
else else
@ -345,17 +345,17 @@ begin
if NavDialogGetUserAction(DialogRef) <> kNavUserActionCancel then // User OK? if NavDialogGetUserAction(DialogRef) <> kNavUserActionCancel then // User OK?
begin begin
if OSError(NavDialogGetReply(DialogRef, DialogReply), Self, SShowModal, if OSError(NavDialogGetReply(DialogRef, DialogReply{%H-}), Self, SShowModal,
'NavDialogGetReply') then Exit; // Get user's selection 'NavDialogGetReply') then Exit; // Get user's selection
if OSError(AECountItems(DialogReply.Selection, FileCount), Self, if OSError(AECountItems(DialogReply.Selection, FileCount{%H-}), Self,
SShowModal, 'AECountItems') then Exit; SShowModal, 'AECountItems') then Exit;
FileDialog.Files.Clear; FileDialog.Files.Clear;
for FileIdx := 1 to FileCount do for FileIdx := 1 to FileCount do
begin begin
if OSError(AEGetNthDesc(DialogReply.Selection, FileIdx, typeFSRef, if OSError(AEGetNthDesc(DialogReply.Selection, FileIdx, typeFSRef,
@Keyword, FileDesc), Self, SShowModal, 'AEGetNthDesc') then Exit; @Keyword, FileDesc{%H-}), Self, SShowModal, 'AEGetNthDesc') then Exit;
// Get file reference // Get file reference
if OSError(AEGetDescData(FileDesc, @FileRef, SizeOf(FSRef)), Self, if OSError(AEGetDescData(FileDesc, @FileRef, SizeOf(FSRef)), Self,
SShowModal, 'AEGetDescData') then Exit; SShowModal, 'AEGetDescData') then Exit;
@ -433,8 +433,8 @@ begin
ACommonDialog.UserChoice := mrCancel; ACommonDialog.UserChoice := mrCancel;
ColorDialog := ACommonDialog as TColorDialog; ColorDialog := ACommonDialog as TColorDialog;
CMGetDefaultProfileBySpace(cmRGBData, Profile); CMGetDefaultProfileBySpace(cmRGBData, Profile{%H-});
FillChar(ColorInfo, SizeOf(ColorPickerInfo), 0); FillChar(ColorInfo{%H-}, SizeOf(ColorPickerInfo), 0);
ColorInfo.theColor.color.rgb := CMRGBColor(ColorToRGBColor(ColorDialog.Color)); ColorInfo.theColor.color.rgb := CMRGBColor(ColorToRGBColor(ColorDialog.Color));
ColorInfo.theColor.profile := Profile; ColorInfo.theColor.profile := Profile;
ColorInfo.dstProfile := Profile; ColorInfo.dstProfile := Profile;
@ -462,14 +462,12 @@ var
function CarbonFontDialog_Selection(ANextHandler: EventHandlerCallRef; function CarbonFontDialog_Selection(ANextHandler: EventHandlerCallRef;
AEvent: EventRef; AEvent: EventRef;
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF} {%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
var var
ID: ATSUFontID; ID: ATSUFontID;
Size: Fixed; Size: Fixed;
Color: RGBColor; Color: RGBColor;
Style: FMFontStyle; Style: FMFontStyle;
const
SName = 'CarbonFontDialog_Selection';
begin begin
{$IFDEF VerboseWSClass} {$IFDEF VerboseWSClass}
DebugLn('CarbonFontDialog_Selection: ', DbgSName(FontDialog)); DebugLn('CarbonFontDialog_Selection: ', DbgSName(FontDialog));
@ -520,7 +518,7 @@ end;
function CarbonFontDialog_Close(ANextHandler: EventHandlerCallRef; function CarbonFontDialog_Close(ANextHandler: EventHandlerCallRef;
AEvent: EventRef; AEvent: EventRef;
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF} {%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
begin begin
{$IFDEF VerboseWSClass} {$IFDEF VerboseWSClass}
DebugLn('CarbonFontDialog_Close: ', DbgSName(FontDialog)); DebugLn('CarbonFontDialog_Close: ', DbgSName(FontDialog));
@ -563,7 +561,7 @@ begin
if OSError( if OSError(
CreateNewWindow(kModalWindowClass, CreateNewWindow(kModalWindowClass,
kWindowCompositingAttribute or kWindowStandardHandlerAttribute, GetCarbonRect(0, 0, 0, 0), Dialog), kWindowCompositingAttribute or kWindowStandardHandlerAttribute, GetCarbonRect(0, 0, 0, 0), Dialog{%H-}),
Self, SShowModal, 'CreateNewWindow') then Exit; Self, SShowModal, 'CreateNewWindow') then Exit;
try try
@ -578,7 +576,7 @@ begin
1, @TmpSpec, nil, nil); 1, @TmpSpec, nil, nil);
OSError(ATSUCreateAndCopyStyle(TCarbonFont(AFontDialog.Font.Reference.Handle).Style, Style), OSError(ATSUCreateAndCopyStyle(TCarbonFont(AFontDialog.Font.Reference.Handle).Style, Style{%H-}),
Self, SShowModal, 'ATSUCreateAndCopyStyle'); Self, SShowModal, 'ATSUCreateAndCopyStyle');
// force set font ID // force set font ID

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSExtCtrls.pp * * CarbonWSExtCtrls.pp *
@ -140,7 +139,7 @@ type
TCarbonWSCustomPanel = class(TWSCustomPanel) TCarbonWSCustomPanel = class(TWSCustomPanel)
published published
class procedure GetPreferredSize(const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean); override; class procedure GetPreferredSize(const {%H-}AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer; {%H-}WithThemeSpace: Boolean); override;
end; end;
{ TCarbonWSPanel } { TCarbonWSPanel }

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSForms.pp * * CarbonWSForms.pp *

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSMenus.pp * * CarbonWSMenus.pp *

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSPairSplitter.pp * * CarbonWSPairSplitter.pp *

View File

@ -1,4 +1,3 @@
{ $Id$}
{ {
***************************************************************************** *****************************************************************************
* CarbonWSSpin.pp * * CarbonWSSpin.pp *