mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 17:55:55 +02:00
carbon: clean up
git-svn-id: trunk@37007 -
This commit is contained in:
parent
41130b9523
commit
1e015d492b
@ -1,5 +1,4 @@
|
||||
{ $Id:
|
||||
--------------------------------------------
|
||||
{ --------------------------------------------
|
||||
carboncalendar.pp - Carbon calendar
|
||||
--------------------------------------------
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ $Id: $
|
||||
--------------------------------------------
|
||||
{ --------------------------------------------
|
||||
carbonprivate.pp - Carbon internal classes
|
||||
--------------------------------------------
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ $Id: $
|
||||
--------------------------------------------
|
||||
{ --------------------------------------------
|
||||
carbonprivate.pp - Carbon internal classes
|
||||
--------------------------------------------
|
||||
|
||||
@ -30,14 +29,14 @@ interface
|
||||
|
||||
uses
|
||||
// rtl+ftl
|
||||
Types, Classes, SysUtils, Math, Contnrs,
|
||||
Types, Classes, SysUtils,
|
||||
// carbon bindings
|
||||
MacOSAll,
|
||||
{$ifdef CarbonUseCocoaAll}
|
||||
CocoaAll,
|
||||
{$endif}
|
||||
// widgetset
|
||||
WSControls, WSLCLClasses, WSProc,
|
||||
// widgetset
|
||||
WSLCLClasses,
|
||||
// LCL Carbon
|
||||
CarbonDef, CarbonGDIObjects, CarbonMenus,
|
||||
// LCL
|
||||
@ -337,8 +336,7 @@ const
|
||||
|
||||
implementation
|
||||
|
||||
uses InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils,
|
||||
CarbonWSStdCtrls, CarbonCanvas, CarbonCaret;
|
||||
uses InterfaceBase, CarbonInt, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonCaret;
|
||||
|
||||
var
|
||||
// recursive number of draw events called by OSX
|
||||
@ -1683,7 +1681,7 @@ begin
|
||||
|
||||
if OSError(
|
||||
CreateStaticTextControl(GetTopParentWindow, ParamsToCarbonRect(AParams),
|
||||
nil, @FontStyle, Control),
|
||||
nil, @FontStyle, Control{%H-}),
|
||||
Self, SCreateWidget, 'CreateStaticTextControl') then RaiseCreateWidgetError(LCLObject);
|
||||
|
||||
Widget := Control;
|
||||
|
@ -27,11 +27,9 @@ interface
|
||||
|
||||
uses
|
||||
// rtl+ftl
|
||||
Types, Classes, SysUtils, Math, Contnrs,
|
||||
Types, Classes, SysUtils, Contnrs,
|
||||
// carbon bindings
|
||||
MacOSAll,
|
||||
// widgetset
|
||||
WSControls, WSLCLClasses, WSProc,
|
||||
MacOSAll, WSLCLClasses,
|
||||
// LCL Carbon
|
||||
CarbonDef, CarbonPrivate, CarbonProc, CarbonDbgConsts, CarbonUtils, CarbonCanvas, CarbonGDIObjects,
|
||||
// LCL
|
||||
@ -95,7 +93,7 @@ type
|
||||
procedure DisableChangeEvent;
|
||||
procedure EnableChangeEvent;
|
||||
public
|
||||
function SetText(const S: String): Boolean; override;
|
||||
function SetText(const {%H-}S: String): Boolean; override;
|
||||
function GetClientRect(var ARect: TRect): Boolean; override;
|
||||
function SetBounds(const ARect: TRect): Boolean; override;
|
||||
|
||||
@ -259,7 +257,7 @@ const
|
||||
------------------------------------------------------------------------------}
|
||||
function CarbonTabsPrevArrow_Reverse(ANextHandler: EventHandlerCallRef;
|
||||
AEvent: EventRef;
|
||||
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
{%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
var
|
||||
Context : CGContextRef;
|
||||
layer : CGLayerRef;
|
||||
@ -362,10 +360,10 @@ begin
|
||||
|
||||
if FShowTabBar then
|
||||
begin
|
||||
FillChar(TabEntry, SizeOf(TabEntry), 0);
|
||||
FillChar(TabEntry{%H-}, SizeOf(TabEntry), 0);
|
||||
if OSError(
|
||||
CreateTabsControl(GetTopParentWindow, ParamsToCarbonRect(AParams),
|
||||
kControlTabSizeLarge, Direction, 0, TabEntry, Control),
|
||||
kControlTabSizeLarge, Direction, 0, TabEntry, Control{%H-}),
|
||||
Self, SCreateWidget, 'CreateTabsControl') then RaiseCreateWidgetError(LCLObject);
|
||||
end
|
||||
else
|
||||
@ -381,7 +379,7 @@ begin
|
||||
|
||||
Widget := Control;
|
||||
|
||||
if not GetClientRect(R) then
|
||||
if not GetClientRect(R{%H-}) then
|
||||
begin
|
||||
DebugLn('TCarbonTabsControl.CreateWidget Error - no content region!');
|
||||
Exit;
|
||||
@ -419,7 +417,7 @@ begin
|
||||
RegisterEventHandler(@CarbonTabsNextArrow_Track),
|
||||
1, @TmpSpec, Pointer(Self), nil);
|
||||
|
||||
Err:=Gestalt(gestaltSystemVersion, Ver);
|
||||
Err:=Gestalt(gestaltSystemVersion, Ver{%H-});
|
||||
if (Err <> 0) or (Ver >= $1040) then begin
|
||||
TmpSpec := MakeEventSpec(kEventClassControl, kEventControlDraw);
|
||||
InstallControlEventHandler(FPrevArrow,
|
||||
@ -493,7 +491,7 @@ begin
|
||||
begin
|
||||
if I = FTabIndex then // update tab bounds
|
||||
begin
|
||||
GetClientRect(R);
|
||||
GetClientRect(R{%H-});
|
||||
OffsetRect(R, -R.Left, -R.Top);
|
||||
TCarbonTab(FTabs[I]).SetBounds(R);
|
||||
end;
|
||||
@ -542,7 +540,7 @@ begin
|
||||
begin
|
||||
S := TCarbonTab(FTabs[I]).FText;
|
||||
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
|
||||
else
|
||||
TabSizes[I] := 24;
|
||||
@ -769,10 +767,10 @@ begin
|
||||
end;
|
||||
|
||||
// send changing
|
||||
FillChar(Msg, SizeOf(TLMNotify), 0);
|
||||
FillChar(Msg{%H-}, SizeOf(TLMNotify), 0);
|
||||
Msg.Msg := LM_NOTIFY;
|
||||
|
||||
FillChar(NMHdr, SizeOf(TNMHdr), 0);
|
||||
FillChar(NMHdr{%H-}, SizeOf(TNMHdr), 0);
|
||||
NMHdr.code := TCN_SELCHANGING;
|
||||
NMHdr.hwndFrom := LCLObject.Handle;
|
||||
NMHdr.idFrom := PIndex;
|
||||
@ -866,7 +864,7 @@ begin
|
||||
begin
|
||||
UpdateContentBounds;
|
||||
|
||||
GetClientRect(R);
|
||||
GetClientRect(R{%H-});
|
||||
|
||||
if FShowTabBar then
|
||||
begin
|
||||
@ -887,7 +885,7 @@ var
|
||||
tabno : ControlPartCode;
|
||||
begin
|
||||
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
|
||||
begin
|
||||
@ -908,7 +906,7 @@ function TCarbonTabsControl.IsDesignInteractive(const P: TPoint): Boolean;
|
||||
var
|
||||
R: TRect;
|
||||
begin
|
||||
GetClientRect(R);
|
||||
GetClientRect(R{%H-});
|
||||
Offsetrect(R, -R.Left, -R.Top);
|
||||
|
||||
case FTabPosition of
|
||||
|
@ -35,9 +35,9 @@ uses
|
||||
// LCL
|
||||
Classes, Controls, Buttons, LCLType, LCLProc, Graphics,
|
||||
// widgetset
|
||||
WSButtons, WSLCLClasses, WSProc,
|
||||
WSButtons, WSLCLClasses,
|
||||
// LCL Carbon
|
||||
CarbonDef, CarbonPrivate, CarbonButtons, CarbonWSControls, CarbonGDIObjects;
|
||||
CarbonDef, CarbonButtons, CarbonGDIObjects;
|
||||
|
||||
type
|
||||
|
||||
@ -60,7 +60,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
CarbonProc, CarbonDbgConsts, CarbonCanvas;
|
||||
CarbonProc;
|
||||
|
||||
{ TCarbonWSBitBtn }
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSCalendar.pp *
|
||||
|
@ -30,14 +30,12 @@ interface
|
||||
{$I carbondefines.inc}
|
||||
|
||||
uses
|
||||
// libs
|
||||
MacOSAll,
|
||||
// LCL
|
||||
Classes, Controls, ComCtrls, StdCtrls, LCLType, LCLProc, Graphics, Math, ImgList,
|
||||
Classes, Controls, ComCtrls, StdCtrls, LCLType, LCLProc, Graphics, ImgList,
|
||||
// widgetset
|
||||
WSComCtrls, WSLCLClasses, WSControls, WSProc,
|
||||
WSComCtrls, WSLCLClasses,
|
||||
// LCL Carbon
|
||||
CarbonDef, CarbonPrivate, CarbonBars, CarbonStrings, CarbonWSControls,
|
||||
CarbonDef, CarbonPrivate, CarbonBars,
|
||||
CarbonListViews;
|
||||
|
||||
type
|
||||
@ -99,31 +97,31 @@ type
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
// Column
|
||||
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 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 ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAutoSize: Boolean); override;
|
||||
class procedure ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ACaption: String); override;
|
||||
class procedure ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AImageIndex: Integer); override;
|
||||
class procedure ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMaxWidth: Integer); override;
|
||||
class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMinWidth: integer); override;
|
||||
class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AWidth: Integer); override;
|
||||
class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AVisible: Boolean); 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 {%H-}AColumn: TListColumn; const AAutoSize: Boolean); 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 {%H-}AColumn: TListColumn; const AImageIndex: 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 {%H-}AColumn: TListColumn; const AMinWidth: 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 {%H-}AColumn: TListColumn; const AVisible: Boolean); override;
|
||||
|
||||
// Item
|
||||
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 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 ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const 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 ItemSetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AChecked: Boolean); override;
|
||||
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex, AImageIndex: Integer); override;
|
||||
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 {%H-}AItem: TListItem); 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 {%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 procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const 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 ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: 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 {%H-}AItem: TListItem; const {%H-}ASubIndex: Integer; const {%H-}AText: String); override;
|
||||
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const PartialOK: Boolean); override;
|
||||
|
||||
// LV
|
||||
//class procedure BeginUpdate(const ALV: TCustomListView); override;
|
||||
@ -144,14 +142,14 @@ type
|
||||
class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override;
|
||||
//class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); 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 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 SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override;
|
||||
class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override;
|
||||
class procedure SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer;
|
||||
const ASortDirection: TSortDirection); override;
|
||||
class procedure SetSort(const ALV: TCustomListView; const {%H-}AType: TSortType; const {%H-}AColumn: Integer;
|
||||
const {%H-}ASortDirection: TSortDirection); override;
|
||||
class procedure SetViewOrigin(const ALV: TCustomListView; const AValue: TPoint); override;
|
||||
class procedure SetViewStyle(const ALV: TCustomListView; const AValue: TViewStyle); override;
|
||||
end;
|
||||
@ -168,7 +166,7 @@ type
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; 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;
|
||||
end;
|
||||
|
||||
@ -204,7 +202,7 @@ type
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure ApplyChanges(const ATrackBar: TCustomTrackBar); 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;
|
||||
|
||||
{ TCarbonWSCustomTreeView }
|
||||
@ -223,7 +221,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
CarbonProc, CarbonTabs, CarbonDbgConsts;
|
||||
CarbonProc, CarbonTabs;
|
||||
|
||||
{ TCarbonWSToolBar }
|
||||
|
||||
|
@ -35,9 +35,9 @@ uses
|
||||
// LCL
|
||||
Classes, SysUtils, FileUtil, Controls, Dialogs, LCLType, LCLProc, Masks, Graphics,
|
||||
// widgetset
|
||||
WSLCLClasses, WSProc, WSDialogs,
|
||||
WSLCLClasses, WSDialogs,
|
||||
// LCL Carbon
|
||||
CarbonDef, CarbonPrivate;
|
||||
CarbonDef;
|
||||
|
||||
type
|
||||
|
||||
@ -105,7 +105,7 @@ var
|
||||
FilterIndex: Integer;
|
||||
|
||||
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
|
||||
inFilterProc to NavCreateGetFileDialog and NavCreateChooseFolderDialog.
|
||||
If theItem file should be highlighted in file dialog, return True;
|
||||
@ -198,8 +198,8 @@ begin
|
||||
end;
|
||||
|
||||
if DirURL <> nil then
|
||||
if CFURLGetFSRef(DirURL, DirRef) then
|
||||
if not OSError(AECreateDesc(typeFSRef, @DirRef, SizeOf(FSRef), Dir),
|
||||
if CFURLGetFSRef(DirURL, DirRef{%H-}) then
|
||||
if not OSError(AECreateDesc(typeFSRef, @DirRef, SizeOf(FSRef), Dir{%H-}),
|
||||
SName, 'AECreateDesc') then
|
||||
OSError(NavCustomControl(CallBackParms^.context, kNavCtlSetLocation, @Dir),
|
||||
SName, 'NavCustomControl', 'InitialDir');
|
||||
@ -257,7 +257,7 @@ begin
|
||||
FileDialog := ACommonDialog as TFileDialog;
|
||||
|
||||
// Initialize record to default values
|
||||
if OSError(NavGetDefaultDialogCreationOptions(CreationOptions),
|
||||
if OSError(NavGetDefaultDialogCreationOptions(CreationOptions{%H-}),
|
||||
Self, SShowModal, 'NavGetDefaultDialogCreationOptions') then Exit;
|
||||
|
||||
if FileDialog.Title <> '' then // Override dialog's default title?
|
||||
@ -311,7 +311,7 @@ begin
|
||||
// Create Save dialog
|
||||
if OSError(
|
||||
NavCreatePutFileDialog(@CreationOptions, 0, 0, NavDialogUPP,
|
||||
UnivPtr(FileDialog), DialogRef),
|
||||
UnivPtr(FileDialog), DialogRef{%H-}),
|
||||
Self, SShowModal, 'NavCreatePutFileDialog') then Exit;
|
||||
end
|
||||
else
|
||||
@ -345,17 +345,17 @@ begin
|
||||
|
||||
if NavDialogGetUserAction(DialogRef) <> kNavUserActionCancel then // User OK?
|
||||
begin
|
||||
if OSError(NavDialogGetReply(DialogRef, DialogReply), Self, SShowModal,
|
||||
if OSError(NavDialogGetReply(DialogRef, DialogReply{%H-}), Self, SShowModal,
|
||||
'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;
|
||||
|
||||
FileDialog.Files.Clear;
|
||||
for FileIdx := 1 to FileCount do
|
||||
begin
|
||||
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
|
||||
if OSError(AEGetDescData(FileDesc, @FileRef, SizeOf(FSRef)), Self,
|
||||
SShowModal, 'AEGetDescData') then Exit;
|
||||
@ -433,8 +433,8 @@ begin
|
||||
ACommonDialog.UserChoice := mrCancel;
|
||||
ColorDialog := ACommonDialog as TColorDialog;
|
||||
|
||||
CMGetDefaultProfileBySpace(cmRGBData, Profile);
|
||||
FillChar(ColorInfo, SizeOf(ColorPickerInfo), 0);
|
||||
CMGetDefaultProfileBySpace(cmRGBData, Profile{%H-});
|
||||
FillChar(ColorInfo{%H-}, SizeOf(ColorPickerInfo), 0);
|
||||
ColorInfo.theColor.color.rgb := CMRGBColor(ColorToRGBColor(ColorDialog.Color));
|
||||
ColorInfo.theColor.profile := Profile;
|
||||
ColorInfo.dstProfile := Profile;
|
||||
@ -462,14 +462,12 @@ var
|
||||
|
||||
function CarbonFontDialog_Selection(ANextHandler: EventHandlerCallRef;
|
||||
AEvent: EventRef;
|
||||
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
{%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
var
|
||||
ID: ATSUFontID;
|
||||
Size: Fixed;
|
||||
Color: RGBColor;
|
||||
Style: FMFontStyle;
|
||||
const
|
||||
SName = 'CarbonFontDialog_Selection';
|
||||
begin
|
||||
{$IFDEF VerboseWSClass}
|
||||
DebugLn('CarbonFontDialog_Selection: ', DbgSName(FontDialog));
|
||||
@ -520,7 +518,7 @@ end;
|
||||
|
||||
function CarbonFontDialog_Close(ANextHandler: EventHandlerCallRef;
|
||||
AEvent: EventRef;
|
||||
AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
{%H-}AWidget: TCarbonWidget): OSStatus; {$IFDEF darwin}mwpascal;{$ENDIF}
|
||||
begin
|
||||
{$IFDEF VerboseWSClass}
|
||||
DebugLn('CarbonFontDialog_Close: ', DbgSName(FontDialog));
|
||||
@ -563,7 +561,7 @@ begin
|
||||
|
||||
if OSError(
|
||||
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;
|
||||
|
||||
try
|
||||
@ -578,7 +576,7 @@ begin
|
||||
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');
|
||||
|
||||
// force set font ID
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSExtCtrls.pp *
|
||||
@ -140,7 +139,7 @@ type
|
||||
|
||||
TCarbonWSCustomPanel = class(TWSCustomPanel)
|
||||
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;
|
||||
|
||||
{ TCarbonWSPanel }
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSForms.pp *
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSMenus.pp *
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSPairSplitter.pp *
|
||||
|
@ -1,4 +1,3 @@
|
||||
{ $Id$}
|
||||
{
|
||||
*****************************************************************************
|
||||
* CarbonWSSpin.pp *
|
||||
|
Loading…
Reference in New Issue
Block a user