carbon: started carbon calendar

git-svn-id: trunk@21816 -
This commit is contained in:
dmitry 2009-09-22 12:08:44 +00:00
parent 75c0fc522b
commit c495c5795d
4 changed files with 1155 additions and 1 deletions

2
.gitattributes vendored
View File

@ -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

View 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.

File diff suppressed because it is too large Load Diff

View File

@ -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
////////////////////////////////////////////////////