mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:16:13 +02:00
carbon: started carbon calendar
git-svn-id: trunk@21816 -
This commit is contained in:
parent
75c0fc522b
commit
c495c5795d
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -4054,6 +4054,8 @@ lcl/interfaces/carbon/README.txt svneol=native#text/plain
|
||||
lcl/interfaces/carbon/agl.pp svneol=native#text/plain
|
||||
lcl/interfaces/carbon/carbonbars.pp svneol=native#text/pascal
|
||||
lcl/interfaces/carbon/carbonbuttons.pp svneol=native#text/pascal
|
||||
lcl/interfaces/carbon/carboncalendar.pas svneol=native#text/plain
|
||||
lcl/interfaces/carbon/carboncalendarview.pas svneol=native#text/plain
|
||||
lcl/interfaces/carbon/carboncanvas.pp svneol=native#text/pascal
|
||||
lcl/interfaces/carbon/carboncaret.pas svneol=native#text/pascal
|
||||
lcl/interfaces/carbon/carbonclipboard.pp svneol=native#text/pascal
|
||||
|
54
lcl/interfaces/carbon/carboncalendar.pas
Normal file
54
lcl/interfaces/carbon/carboncalendar.pas
Normal file
@ -0,0 +1,54 @@
|
||||
{ $Id:
|
||||
--------------------------------------------
|
||||
carboncalendar.pp - Carbon calendar
|
||||
--------------------------------------------
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
unit CarbonCalendar;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// FCL
|
||||
Classes, SysUtils,
|
||||
// LCL
|
||||
LCLType, Controls,
|
||||
// Carbon
|
||||
CarbonProc, CarbonPrivate, CarbonCalendarView;
|
||||
|
||||
type
|
||||
|
||||
{ TCarbonCalendar }
|
||||
|
||||
TCarbonCalendar = class(TCarbonControl)
|
||||
protected
|
||||
procedure CreateWidget(const AParams: TCreateParams); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TCarbonCalendar }
|
||||
|
||||
procedure TCarbonCalendar.CreateWidget(const AParams: TCreateParams);
|
||||
begin
|
||||
if OSError(CalendarViewCreate(GetTopParentWindow, ParamsToCarbonRect(AParams), Widget),
|
||||
Self, 'CreateWidget', 'CalendarViewCreate') then RaiseCreateWidgetError(LCLObject);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
1087
lcl/interfaces/carbon/carboncalendarview.pas
Normal file
1087
lcl/interfaces/carbon/carboncalendarview.pas
Normal file
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,8 @@ uses
|
||||
////////////////////////////////////////////////////
|
||||
// Calendar,
|
||||
////////////////////////////////////////////////////
|
||||
WSCalendar, WSLCLClasses;
|
||||
Controls, LCLType,
|
||||
WSCalendar, WSLCLClasses, CarbonCalendar;
|
||||
|
||||
type
|
||||
|
||||
@ -43,11 +44,21 @@ type
|
||||
|
||||
TCarbonWSCustomCalendar = class(TWSCustomCalendar)
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{ TCarbonWSCustomCalendar }
|
||||
|
||||
class function TCarbonWSCustomCalendar.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
begin
|
||||
Result := TLCLIntfHandle(TCarbonCalendar.Create(AWinControl, AParams));
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user