You've already forked lazarus-ccr
tvplanit: Adjust visibility of WeekView and MonthView variables and methods. Cosmetic changes. Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8413 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -316,7 +316,7 @@ implementation
|
||||
|
||||
uses
|
||||
SysUtils, DateUtils, Dialogs,
|
||||
VpVCard, VpContactEditDlg, VpContactGridPainter;
|
||||
VpContactEditDlg, VpContactGridPainter;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
@ -1649,9 +1649,7 @@ end;
|
||||
procedure TVpContactGrid.PopupImportVCards(Sender: TObject);
|
||||
var
|
||||
dlg: TOpenDialog;
|
||||
i: Integer;
|
||||
fn: String;
|
||||
id: Integer;
|
||||
begin
|
||||
if ReadOnly or (not CheckCreateResource) or
|
||||
(not Assigned(Datastore)) or (not Assigned(Datastore.Resource))
|
||||
|
@ -500,7 +500,7 @@ type
|
||||
function GetContact(Index: Integer): TVpContact;
|
||||
function Last:TVpContact;
|
||||
function ImportVCardFile(const AFileName: String; const APreview: Boolean = false;
|
||||
ADefaultCategory: Integer = -1): TVpContactArr;
|
||||
{%H-}ADefaultCategory: Integer = -1): TVpContactArr;
|
||||
procedure ExportVCardFile(const AFileName: String; const AContacts: TVpContactArr);
|
||||
procedure Sort;
|
||||
|
||||
|
@ -32,19 +32,23 @@
|
||||
|
||||
The rendering of Visual PlanIt components is a bit involved. The component's
|
||||
Paint method calls RenderToCanvas. The RenderToCanvas method of each of
|
||||
the visual VisualPlanIt controls is repsonsible both for drawing to the
|
||||
the visual VisualPlanIt controls is responsible both for drawing to the
|
||||
screen (both design and run time) as well as printing. In the case of
|
||||
printing, the component needs to render itself to an arbitrary rectangle
|
||||
and possibly rotated (for the screen the rectangle is the ClientRect
|
||||
and the rotation angle is always zero). To achieve that goal, the
|
||||
and the rotation angle is always zero). To achieve that goal, the
|
||||
functions in VpCanvasUtils are used to go between the rendering of the
|
||||
control and the TCanvas that it needs to render to.
|
||||
|
||||
The rendering of the DayView is complex. Look at the other components
|
||||
The rendering of the DayView is complex. Look at the other components
|
||||
(MonthView and TaskList are probably the best places to start) before making
|
||||
changes to the DayView rendering.
|
||||
|
||||
The in place editor is currently based off the TCustomEdit class. This can
|
||||
In the current version of TvPlanIt the extremely long rendering procedure
|
||||
has been split off to a separate unit and an auxiliary painter class
|
||||
(TVpDayViewPaitner in unit VpDayViewPainter).
|
||||
|
||||
The in place editor is currently based off the TCustomEdit class. This can
|
||||
probably be changed to use a TCustomMemo as its base class. This will
|
||||
provide multi-line editing capabilities.
|
||||
}
|
||||
@ -83,10 +87,8 @@ type
|
||||
Date: TDateTime;
|
||||
end;
|
||||
|
||||
type
|
||||
TVpLineArray = array of TVpLineRec;
|
||||
|
||||
type
|
||||
TVpLineMatrix = array of TVpLineArray;
|
||||
TVpColRectArray = array of TVpColRec;
|
||||
|
||||
@ -114,7 +116,7 @@ type
|
||||
TVpDayView = class;
|
||||
|
||||
TVpDvInplaceEdit = class(TCustomEdit)
|
||||
protected{private}
|
||||
protected
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
{$IFNDEF LCL}
|
||||
@ -127,7 +129,7 @@ type
|
||||
end;
|
||||
|
||||
TVpRHAttributes = class(TPersistent)
|
||||
protected{ private }
|
||||
private
|
||||
FOwner: TVpDayView;
|
||||
FColor: TColor;
|
||||
FHourFont: TVpFont;
|
||||
@ -135,6 +137,7 @@ type
|
||||
procedure SetColor(const Value: TColor);
|
||||
procedure SetHourFont(Value: TVpFont);
|
||||
procedure SetMinuteFont(Value: TVpFont);
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TVpDayView);
|
||||
destructor Destroy; override;
|
||||
@ -146,12 +149,13 @@ type
|
||||
end;
|
||||
|
||||
TVpAllDayEventAttributes = class(TPersistent)
|
||||
protected {Private}
|
||||
FOwner: TWinControl;
|
||||
private
|
||||
FBackgroundColor: TColor;
|
||||
FEventBackgroundColor: TColor;
|
||||
FEventBorderColor: TColor;
|
||||
FFont: TVpFont;
|
||||
protected
|
||||
FOwner: TWinControl;
|
||||
public
|
||||
constructor Create(AOwner: TWinControl);
|
||||
destructor Destroy; override;
|
||||
@ -171,12 +175,13 @@ type
|
||||
end;
|
||||
|
||||
TVpCHAttributes = class(TPersistent)
|
||||
protected{ private }
|
||||
private
|
||||
FOwner: TVpDayView;
|
||||
FColor: TColor;
|
||||
FFont: TVpFont;
|
||||
procedure SetColor(const Value: TColor);
|
||||
procedure SetFont(Value: TVpFont);
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TVpDayView);
|
||||
destructor Destroy; override;
|
||||
@ -187,47 +192,47 @@ type
|
||||
end;
|
||||
|
||||
TVpDayViewIconAttributes = class(TPersistent)
|
||||
private
|
||||
FShowAlarmBitmap: Boolean;
|
||||
FShowCategoryBitmap: Boolean;
|
||||
FShowRecurringBitmap: Boolean;
|
||||
FAlarmBitmap: TBitmap;
|
||||
FRecurringBitmap: TBitmap;
|
||||
FAlarmImageIndex: TImageIndex;
|
||||
FRecurringImageIndex: TImageIndex;
|
||||
FShowInPrint: Boolean;
|
||||
FOwner: TVpLinkableControl;
|
||||
private
|
||||
FShowAlarmBitmap: Boolean;
|
||||
FShowCategoryBitmap: Boolean;
|
||||
FShowRecurringBitmap: Boolean;
|
||||
FAlarmBitmap: TBitmap;
|
||||
FRecurringBitmap: TBitmap;
|
||||
FAlarmImageIndex: TImageIndex;
|
||||
FRecurringImageIndex: TImageIndex;
|
||||
FShowInPrint: Boolean;
|
||||
FOwner: TVpLinkableControl;
|
||||
|
||||
protected
|
||||
procedure SetAlarmBitmap(v: TBitmap);
|
||||
procedure SetAlarmImageIndex(v: TImageIndex);
|
||||
procedure SetRecurringBitmap(v: TBitmap);
|
||||
procedure SetRecurringImageIndex(v: TImageIndex);
|
||||
procedure SetShowAlarmBitmap(const v: Boolean);
|
||||
procedure SetShowCategoryBitmap(const v: Boolean);
|
||||
procedure SetShowRecurringBitmap(const v: Boolean);
|
||||
protected
|
||||
procedure SetAlarmBitmap(v: TBitmap);
|
||||
procedure SetAlarmImageIndex(v: TImageIndex);
|
||||
procedure SetRecurringBitmap(v: TBitmap);
|
||||
procedure SetRecurringImageIndex(v: TImageIndex);
|
||||
procedure SetShowAlarmBitmap(const v: Boolean);
|
||||
procedure SetShowCategoryBitmap(const v: Boolean);
|
||||
procedure SetShowRecurringBitmap(const v: Boolean);
|
||||
|
||||
public
|
||||
constructor Create(AOwner: TVpLinkableControl);
|
||||
destructor Destroy; override;
|
||||
public
|
||||
constructor Create(AOwner: TVpLinkableControl);
|
||||
destructor Destroy; override;
|
||||
|
||||
published
|
||||
property AlarmBitmap: TBitmap
|
||||
read FAlarmBitmap write SetAlarmBitmap;
|
||||
property AlarmImageIndex: TImageIndex
|
||||
read FAlarmImageIndex write SetAlarmImageIndex default -1;
|
||||
property RecurringBitmap: TBitmap
|
||||
read FRecurringBitmap write SetRecurringBitmap;
|
||||
property RecurringImageIndex: TImageIndex
|
||||
read FRecurringImageIndex write SetRecurringImageIndex default -1;
|
||||
property ShowAlarmBitmap: Boolean
|
||||
read FShowAlarmBitmap write SetShowAlarmBitmap default True;
|
||||
property ShowCategoryBitmap : Boolean
|
||||
read FShowCategoryBitmap write SetShowCategoryBitmap default True;
|
||||
property ShowRecurringBitmap : Boolean
|
||||
read FShowRecurringBitmap write SetShowRecurringBitmap default True;
|
||||
property ShowInPrint: Boolean
|
||||
read FShowInPrint write FShowInPrint default True;
|
||||
published
|
||||
property AlarmBitmap: TBitmap
|
||||
read FAlarmBitmap write SetAlarmBitmap;
|
||||
property AlarmImageIndex: TImageIndex
|
||||
read FAlarmImageIndex write SetAlarmImageIndex default -1;
|
||||
property RecurringBitmap: TBitmap
|
||||
read FRecurringBitmap write SetRecurringBitmap;
|
||||
property RecurringImageIndex: TImageIndex
|
||||
read FRecurringImageIndex write SetRecurringImageIndex default -1;
|
||||
property ShowAlarmBitmap: Boolean
|
||||
read FShowAlarmBitmap write SetShowAlarmBitmap default True;
|
||||
property ShowCategoryBitmap : Boolean
|
||||
read FShowCategoryBitmap write SetShowCategoryBitmap default True;
|
||||
property ShowRecurringBitmap : Boolean
|
||||
read FShowRecurringBitmap write SetShowRecurringBitmap default True;
|
||||
property ShowInPrint: Boolean
|
||||
read FShowInPrint write FShowInPrint default True;
|
||||
end;
|
||||
|
||||
{ TVpDayView }
|
||||
@ -276,7 +281,7 @@ type
|
||||
FTopLine: Integer;
|
||||
FVisibleLines: Integer;
|
||||
FWrapStyle: TVpDVWrapStyle;
|
||||
// internal variables
|
||||
// Internal variables
|
||||
dvClickTimer: TTimer;
|
||||
dvClientVArea: Integer;
|
||||
dvColHeadHeight: Integer;
|
||||
@ -284,7 +289,6 @@ type
|
||||
dvDragging: Boolean;
|
||||
dvDragStartTime: TDateTime;
|
||||
dvEndingEditing: Boolean;
|
||||
dvHotPoint: TPoint;
|
||||
dvInLinkHandler: Boolean;
|
||||
dvLoaded: Boolean;
|
||||
dvMouseDown: Boolean;
|
||||
@ -293,8 +297,7 @@ type
|
||||
dvRowHeadWidth: Integer;
|
||||
dvRowHeight: Integer;
|
||||
dvTimeIncSize: double;
|
||||
dvVScrollDelta: Integer;
|
||||
// event variables
|
||||
// Event variables
|
||||
FAfterEdit: TVpAfterEditEvent;
|
||||
FBeforeEdit: TVpBeforeEditEvent;
|
||||
FOnAddEvent: TVpOnAddNewEvent;
|
||||
@ -352,7 +355,7 @@ type
|
||||
dvInPlaceEditor: TVpDvInPlaceEdit;
|
||||
dvLineMatrix: TVpLineMatrix;
|
||||
|
||||
{ drag-drop methods }
|
||||
{ Drag-drop methods }
|
||||
procedure DoStartDrag(var DragObject: TDragObject); override;
|
||||
procedure DoEndDrag(Target: TObject; X, Y: Integer); override;
|
||||
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
|
||||
|
@ -20,7 +20,7 @@ type
|
||||
FCalendar: TVpICalendar;
|
||||
FChecked: Boolean;
|
||||
protected
|
||||
procedure SaveToStrings(const AList: TStrings); virtual;
|
||||
procedure SaveToStrings(const {%H-}AList: TStrings); virtual;
|
||||
public
|
||||
constructor Create(ACalendar: TVpICalendar); virtual;
|
||||
function FindItem(AKey: String): TVpICalItem;
|
||||
@ -353,6 +353,7 @@ procedure TVpICalEntry.SaveToStrings(const AList: TStrings);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
{==============================================================================}
|
||||
{ TVpICalAlarm }
|
||||
{==============================================================================}
|
||||
|
@ -13,9 +13,9 @@ type
|
||||
{ TVpImportPreviewICalEventForm }
|
||||
|
||||
TVpImportPreviewICalEventForm = class(TVpImportPreviewForm)
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
const Value: string);
|
||||
private
|
||||
FCalendar: TVpICalendar;
|
||||
|
@ -1,7 +1,7 @@
|
||||
unit VpImportPreview_ICalTask;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{$WARN 5024 off : Parameter "$1" not used}
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -13,9 +13,9 @@ type
|
||||
{ TVpImportPreviewICalTaskForm }
|
||||
|
||||
TVpImportPreviewICalTaskForm = class(TVpImportPreviewForm)
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, ARow: Integer;
|
||||
const Value: string);
|
||||
private
|
||||
FCalendar: TVpICalendar;
|
||||
@ -154,7 +154,7 @@ end;
|
||||
|
||||
procedure TVpImportPreviewICalTaskForm.PrepareItems;
|
||||
var
|
||||
i, j: Integer;
|
||||
i: Integer;
|
||||
ct: TVpCategoryType;
|
||||
cat: String;
|
||||
L: TStrings;
|
||||
|
@ -6,16 +6,16 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
||||
VpData, VpBaseDS, VpImportPreview, VpVCard, Grids;
|
||||
VpBaseDS, VpImportPreview, VpVCard, Grids;
|
||||
|
||||
type
|
||||
|
||||
{ TVpImportPreviewVCardForm }
|
||||
|
||||
TVpImportPreviewVCardForm = class(TVpImportPreviewForm)
|
||||
procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridGetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
var Value: string);
|
||||
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer;
|
||||
procedure GridSetEditText(Sender: TObject; {%H-}ACol, {%H-}ARow: Integer;
|
||||
const Value: string);
|
||||
private
|
||||
FVCards: TVpVCards;
|
||||
|
@ -126,9 +126,10 @@ type
|
||||
end;
|
||||
*)
|
||||
TVpMvTodayAttr = class(TVpMonthViewAttr)
|
||||
protected
|
||||
private
|
||||
FBorderPen: TPen;
|
||||
procedure SetBorderPen(Value: TPen);
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TVpMonthView);
|
||||
destructor Destroy; override;
|
||||
@ -141,89 +142,87 @@ type
|
||||
|
||||
TVpMonthView = class(TVpLinkableControl)
|
||||
private
|
||||
FComponentHint: TTranslateString;
|
||||
FDefaultPopup: TPopupMenu;
|
||||
FExternalPopup: TPopupMenu;
|
||||
FHintMode: TVpHintMode;
|
||||
FOnHoliday: TVpHolidayEvent;
|
||||
FAllowDragAndDrop: Boolean;
|
||||
FDragDropTransparent: Boolean;
|
||||
FApplyCategoryInfos: Boolean;
|
||||
procedure SetPopupMenu(AValue: TPopupMenu);
|
||||
function IsStoredDateLabelFormat: Boolean;
|
||||
procedure SetApplyCategoryInfos(AValue: Boolean);
|
||||
protected{ private }
|
||||
FKBNavigate: Boolean;
|
||||
FColumnWidth: Integer;
|
||||
FColor: TColor;
|
||||
FLineColor: TColor;
|
||||
FLineCount: Integer;
|
||||
FVisibleLines: Integer;
|
||||
FColumnWidth: Integer;
|
||||
FComponentHint: TTranslateString;
|
||||
FDate: TDateTime;
|
||||
FDateLabelFormat: string;
|
||||
FDayHeadAttr: TVpMonthViewAttr;
|
||||
FDayNameStyle: TVpMVDayNameStyle;
|
||||
FDayNumberFont: TVpFont;
|
||||
FDefaultPopup: TPopupMenu;
|
||||
FDragDropTransparent: Boolean;
|
||||
FDrawingStyle: TVpDrawingStyle;
|
||||
FEventDayStyle: TFontStyles;
|
||||
FEventFont: TVpFont;
|
||||
FExternalPopup: TPopupMenu;
|
||||
FHeadAttr: TVpMonthViewAttr;
|
||||
FHintMode: TVpHintMode;
|
||||
FHolidayAttr: TVpMvHolidayAttr;
|
||||
FKBNavigate: Boolean;
|
||||
FLineColor: TColor;
|
||||
FMouseDate: TDateTime;
|
||||
FOffDayColor: TColor;
|
||||
FOffDayFontColor: TColor;
|
||||
FRightClickChangeDate: Boolean;
|
||||
FSelectedDayColor: TColor;
|
||||
FWeekStartsOn: TVpDayType;
|
||||
FShowEvents: Boolean;
|
||||
FEventDayStyle: TFontStyles;
|
||||
FDateLabelFormat: string;
|
||||
FShowEventTime: Boolean;
|
||||
FTopLine: Integer;
|
||||
FDayHeadAttr: TVpMonthViewAttr;
|
||||
FHeadAttr: TVpMonthViewAttr;
|
||||
FHolidayAttr: TVpMvHolidayAttr;
|
||||
FTimeFormat: TVpTimeFormat;
|
||||
FTodayAttr: TVpMvTodayAttr;
|
||||
FWeekendAttr: TVpMvWeekendAttr;
|
||||
FDayNumberFont: TVpFont;
|
||||
FEventFont: TVpFont;
|
||||
FTimeFormat: TVpTimeFormat;
|
||||
FDrawingStyle: TVpDrawingStyle;
|
||||
FDate: TDateTime;
|
||||
FRightClickChangeDate: Boolean;
|
||||
FMouseDate: TDateTime;
|
||||
FWeekStartsOn: TVpDayType;
|
||||
|
||||
// Internal variables
|
||||
mvActiveEvent: TVpEvent;
|
||||
mvActiveEventRec: TRect;
|
||||
mvDragging: Boolean;
|
||||
mvLoaded: Boolean;
|
||||
mvMouseDown: Boolean;
|
||||
mvMouseDownPoint: TPoint;
|
||||
|
||||
// Event variables
|
||||
FOnAddEvent: TVpOnAddNewEvent;
|
||||
FOnEventClick: TVpOnEventClick;
|
||||
FOnEventDblClick: TVpOnEventClick;
|
||||
FOnHoliday: TVpHolidayEvent;
|
||||
FOnModifyEvent: TVpOnModifyEvent;
|
||||
FOwnerDrawCells: TVpOwnerDrawDayEvent;
|
||||
FOwnerEditEvent: TVpEditEvent;
|
||||
|
||||
{ property methods }
|
||||
function IsStoredDateLabelFormat: Boolean;
|
||||
procedure SetApplyCategoryInfos(AValue: Boolean);
|
||||
procedure SetColor(Value: TColor); reintroduce;
|
||||
procedure SetDate(Value: TDateTime);
|
||||
procedure SetDateLabelFormat(Value: string);
|
||||
procedure SetDayNameStyle(Value: TVpMVDayNameStyle);
|
||||
procedure SetDayNumberFont(Value: TVpFont);
|
||||
procedure SetDrawingStyle(Value: TVpDrawingStyle);
|
||||
procedure SetEventDayStyle(Value: TFontStyles);
|
||||
procedure SetEventFont(Value: TVpFont);
|
||||
procedure SetLineColor(Value: TColor);
|
||||
procedure SetOffDayColor(Value: TColor);
|
||||
procedure SetOffDayFontColor(Value: TColor);
|
||||
procedure SetPopupMenu(AValue: TPopupMenu);
|
||||
procedure SetRightClickChangeDate(const v: Boolean);
|
||||
procedure SetSelectedDayColor(Value: TColor);
|
||||
procedure SetShowEvents(Value: Boolean);
|
||||
procedure SetShowEventTime(Value: Boolean);
|
||||
procedure SetTimeFormat(Value: TVpTimeFormat);
|
||||
procedure SetWeekStartsOn(Value: TVpDayType);
|
||||
|
||||
protected{ private }
|
||||
// Needed by the drawer
|
||||
FPrevYearBtn: TSpeedButton;
|
||||
FPrevMonthBtn: TSpeedButton;
|
||||
FNextMonthBtn: TSpeedButton;
|
||||
FNextYearBtn: TSpeedButton;
|
||||
|
||||
{ event variables }
|
||||
FOnAddEvent: TVpOnAddNewEvent;
|
||||
FOnModifyEvent: TVpOnModifyEvent;
|
||||
FOwnerDrawCells: TVpOwnerDrawDayEvent;
|
||||
FOwnerEditEvent: TVpEditEvent;
|
||||
FOnEventClick: TVpOnEventClick;
|
||||
FOnEventDblClick: TVpOnEventClick;
|
||||
|
||||
{ internal variables }
|
||||
mvLoaded: Boolean;
|
||||
mvDayHeadHeight: Integer;
|
||||
mvEventArray: TVpEventArray;
|
||||
mvMonthDayArray: TVpMonthdayArray;
|
||||
mvActiveEvent: TVpEvent;
|
||||
mvActiveEventRec: TRect;
|
||||
mvDragging: Boolean;
|
||||
mvMouseDown: Boolean;
|
||||
mvMouseDownPoint: TPoint;
|
||||
// wvHotPoint: TPoint;
|
||||
|
||||
{ property methods }
|
||||
procedure SetDrawingStyle(Value: TVpDrawingStyle);
|
||||
procedure SetColor(Value: TColor); reintroduce;
|
||||
procedure SetLineColor(Value: TColor);
|
||||
procedure SetOffDayColor(Value: TColor);
|
||||
procedure SetOffDayFontColor(Value: TColor);
|
||||
procedure SetDateLabelFormat(Value: string);
|
||||
procedure SetShowEvents(Value: Boolean);
|
||||
procedure SetEventDayStyle(Value: TFontStyles);
|
||||
procedure SetDayNameStyle(Value: TVpMVDayNameStyle);
|
||||
procedure SetDayNumberFont(Value: TVpFont);
|
||||
procedure SetEventFont(Value: TVpFont);
|
||||
procedure SetSelectedDayColor(Value: TColor);
|
||||
procedure SetShowEventTime(Value: Boolean);
|
||||
procedure SetTimeFormat(Value: TVpTimeFormat);
|
||||
procedure SetDate(Value: TDateTime);
|
||||
procedure SetRightClickChangeDate(const v: Boolean);
|
||||
procedure SetWeekStartsOn(Value: TVpDayType);
|
||||
|
||||
{ internal methods }
|
||||
function GetDateAtCoord(APoint: TPoint): TDateTime;
|
||||
@ -563,7 +562,6 @@ begin
|
||||
FWeekendAttr.Free;
|
||||
FDayNumberFont.Free;
|
||||
FEventFont.Free;
|
||||
// FDefaultPopup.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
@ -650,7 +648,6 @@ begin
|
||||
// mvInLinkHandler := false;
|
||||
// end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.mvHookUp;
|
||||
var
|
||||
@ -678,7 +675,6 @@ begin
|
||||
mvLoaded := true;
|
||||
mvPopulate;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
function TVpMonthView.GetControlType: TVpItemType;
|
||||
begin
|
||||
@ -719,7 +715,6 @@ begin
|
||||
if DataStore <> nil then
|
||||
DataStore.Date := FDate;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.mvSpawnEventEditDialog(IsNewEvent: Boolean);
|
||||
var
|
||||
@ -924,7 +919,6 @@ begin
|
||||
{ force a repaint on resize }
|
||||
Invalidate;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.CreateParams(var Params: TCreateParams);
|
||||
begin
|
||||
@ -937,7 +931,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.CreateWnd;
|
||||
begin
|
||||
@ -947,7 +940,6 @@ begin
|
||||
FNextMonthBtn.Parent := self;
|
||||
FNextYearBtn.Parent := self;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.DoEndDrag(Target: TObject; X, Y: Integer);
|
||||
begin
|
||||
@ -1035,7 +1027,6 @@ begin
|
||||
Accept := true;
|
||||
end;
|
||||
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpMonthView.WMLButtonDown(var Msg: TWMLButtonDown);
|
||||
{$ELSE}
|
||||
@ -1056,7 +1047,6 @@ begin
|
||||
FOnEventClick(self, mvActiveEvent);
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpMonthView.WMLButtonDblClick(var Msg: TWMLButtonDblClk);
|
||||
@ -1105,7 +1095,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpMonthView.WMSetFocus(var Msg: TWMSetFocus);
|
||||
@ -1116,7 +1105,6 @@ begin
|
||||
Unused(Msg);
|
||||
// if active event is nil then set active event to the first diaplsyed one.
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpMonthView.CMWantSpecialKey(var Msg: TCMWantSpecialKey);
|
||||
@ -1125,7 +1113,6 @@ begin
|
||||
Msg.Result := 1;
|
||||
end;
|
||||
{$ENDIF}
|
||||
{=====}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpMonthView.WMRButtonDown(var Msg: TWMRButtonDown);
|
||||
@ -1141,7 +1128,9 @@ begin
|
||||
mvSetDateByCoord (Point (Msg.XPos, Msg.YPos));
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
|
||||
{ Hint support }
|
||||
|
||||
procedure TVpMonthView.ShowHintWindow(APoint: TPoint; ADate: TDateTime);
|
||||
var
|
||||
@ -1390,8 +1379,6 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
{=====}
|
||||
|
||||
procedure TVpMonthView.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
M, D, Y: Word;
|
||||
@ -1594,7 +1581,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{$IF VP_LCL_SCALING = 2}
|
||||
procedure TVpMonthView.ScaleFontsPPI(const AToPPI: Integer;
|
||||
const AProportion: Double);
|
||||
|
@ -310,7 +310,7 @@ begin
|
||||
fs := FormatSettings;
|
||||
fs.DateSeparator := '-';
|
||||
fs.ShortDateFormat := 'yyyy/mm/dd';
|
||||
if TryStrToDate(item.Value, dt) then
|
||||
if TryStrToDate(item.Value, dt, fs) then
|
||||
begin
|
||||
if (item.Key = 'BDAY') then
|
||||
FBirthday := dt
|
||||
@ -397,8 +397,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TVpVCard.SaveToStrings(AList: TStrings);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
AList.Add('BEGIN:VCARD');
|
||||
AList.Add('VERSION:3.0');
|
||||
|
@ -77,7 +77,7 @@ type
|
||||
TVpWeekView = class;
|
||||
|
||||
TVpWvInPlaceEdit = class(TCustomEdit)
|
||||
protected{private}
|
||||
protected
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
public
|
||||
@ -85,12 +85,13 @@ type
|
||||
end;
|
||||
|
||||
TVpWvHeadAttributes = class(TPersistent)
|
||||
protected{ private }
|
||||
private
|
||||
FOwner: TVpWeekView;
|
||||
FColor: TColor;
|
||||
FFont: TVpFont;
|
||||
procedure SetColor(const Value: TColor);
|
||||
procedure SetFont(Value: TVpFont);
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TVpWeekView);
|
||||
destructor Destroy; override;
|
||||
@ -101,7 +102,7 @@ type
|
||||
end;
|
||||
|
||||
TVpDayHeadAttr = class(TPersistent)
|
||||
protected{private}
|
||||
private
|
||||
FWeekView: TVpWeekView;
|
||||
FFont: TVpFont;
|
||||
FDateFormat: string;
|
||||
@ -112,96 +113,134 @@ type
|
||||
procedure SetFont(Value: TVpFont);
|
||||
procedure SetBordered(Value: Boolean);
|
||||
procedure SetDateFormat(Value: string);
|
||||
protected
|
||||
public
|
||||
constructor Create(AOwner: TVpWeekView);
|
||||
destructor Destroy; override;
|
||||
property WeekView: TVpWeekView read FWeekView;
|
||||
published
|
||||
property Bordered: Boolean read FBordered write SetBordered default true;
|
||||
property Color: TColor read FColor write SetColor default DEFAULT_COLOR;
|
||||
property DateFormat: string read FDateFormat write SetDateFormat stored IsStoredDateFormat;
|
||||
property Font: TVpFont read FFont write SetFont;
|
||||
property Bordered: Boolean read FBordered write SetBordered default true;
|
||||
end;
|
||||
|
||||
{ TVpWeekView }
|
||||
|
||||
TVpWeekView = class(TVpLinkableControl)
|
||||
private
|
||||
FComponentHint: TTranslateString;
|
||||
FDefaultPopup: TPopupMenu;
|
||||
FExternalPopup: TPopupMenu;
|
||||
FHintMode: TVpHintMode;
|
||||
FMouseEvent: TVpEvent;
|
||||
FLayout: TVpWeekviewLayout;
|
||||
FOnHoliday: TVpHolidayEvent;
|
||||
function IsStoredDateLabelFormat: Boolean;
|
||||
procedure SetActiveEvent(AValue: TVpEvent);
|
||||
procedure SetApplyCategoryInfos(AValue: Boolean);
|
||||
procedure SetLayout(AValue: TVpWeekviewLayout);
|
||||
procedure SetPopupMenu(AValue: TPopupMenu);
|
||||
protected{ private }
|
||||
FActiveDate: TDateTime;
|
||||
FColumnWidth: Integer;
|
||||
FColor: TColor;
|
||||
FDateLabelFormat: string;
|
||||
FDayHeadAttributes: TVpDayHeadAttr;
|
||||
FDrawingStyle: TVpDrawingStyle;
|
||||
FActiveEvent: TVpEvent;
|
||||
FHeadAttr: TVpWvHeadAttributes;
|
||||
FEventFont: TVpFont; // was: TFont
|
||||
FLineColor: TColor;
|
||||
FLineCount: Integer;
|
||||
FTimeFormat: TVpTimeFormat;
|
||||
FShowEventTime: Boolean;
|
||||
FVisibleLines: Integer;
|
||||
FWeekStartsOn: TVpDayType;
|
||||
FAllDayEventAttr: TVpAllDayEventAttributes;
|
||||
FAllowInplaceEdit: Boolean;
|
||||
FAllowDragAndDrop: Boolean;
|
||||
FApplyCategoryInfos: Boolean;
|
||||
FColor: TColor;
|
||||
FColumnWidth: Integer;
|
||||
FComponentHint: TTranslateString;
|
||||
FDateLabelFormat: string;
|
||||
FDayHeadAttributes: TVpDayHeadAttr;
|
||||
FDefaultPopup: TPopupMenu;
|
||||
FDragDropTransparent: Boolean;
|
||||
FDrawingStyle: TVpDrawingStyle;
|
||||
FEventFont: TVpFont; // was: TFont
|
||||
FExternalPopup: TPopupMenu;
|
||||
FHeadAttr: TVpWvHeadAttributes;
|
||||
FHintMode: TVpHintMode;
|
||||
FLineColor: TColor;
|
||||
FMouseEvent: TVpEvent;
|
||||
FLayout: TVpWeekviewLayout;
|
||||
FShowEventTime: Boolean;
|
||||
FTimeFormat: TVpTimeFormat;
|
||||
FVisibleLines: Integer;
|
||||
FWeekStartsOn: TVpDayType;
|
||||
|
||||
// Internal variables
|
||||
wvClickTimer: TTimer;
|
||||
wvCreatingEditor: Boolean;
|
||||
wvDragging: Boolean;
|
||||
wvHotPoint: TPoint;
|
||||
wvInLinkHandler: Boolean;
|
||||
wvInPlaceEditor: TVpWvInPlaceEdit;
|
||||
wvLoaded: Boolean;
|
||||
wvMouseDown: Boolean;
|
||||
wvMouseDownPoint: TPoint;
|
||||
wvPainting: Boolean;
|
||||
|
||||
// Event variables
|
||||
FAfterEdit: TVpAfterEditEvent;
|
||||
FBeforeEdit: TVpBeforeEditEvent;
|
||||
FOnAddEvent: TVpOnAddNewEvent;
|
||||
FOnDeletingEvent: TVpOnDeletingEvent;
|
||||
FOnHoliday: TVpHolidayEvent;
|
||||
FOnModifyEvent: TVpOnModifyEvent;
|
||||
FOwnerEditEvent: TVpEditEvent;
|
||||
|
||||
// Property getter and setter methods
|
||||
function IsStoredDateLabelFormat: Boolean;
|
||||
procedure SetActiveDate(Value: TDateTime);
|
||||
procedure SetActiveEvent(AValue: TVpEvent);
|
||||
procedure SetApplyCategoryInfos(AValue: Boolean);
|
||||
procedure SetColor(Value: TColor); reintroduce;
|
||||
procedure SetDateLabelFormat(Value: string);
|
||||
procedure SetDrawingStyle(Value: TVpDrawingStyle);
|
||||
procedure SetEventFont(Value: TVpFont);
|
||||
procedure SetLayout(AValue: TVpWeekviewLayout);
|
||||
procedure SetLineColor(Value: TColor);
|
||||
procedure SetPopupMenu(AValue: TPopupMenu);
|
||||
procedure SetShowEventTime(Value: Boolean);
|
||||
procedure SetTimeFormat(Value: TVpTimeFormat);
|
||||
procedure SetWeekStartsOn(Value: TVpDayType);
|
||||
|
||||
protected
|
||||
// Needed by the drawer
|
||||
FPrevWeekBtn: TSpeedButton;
|
||||
FPrevMonthBtn: TSpeedButton;
|
||||
FNextMonthBtn: TSpeedButton;
|
||||
FNextWeekBtn: TSpeedButton;
|
||||
|
||||
{ event variables }
|
||||
FBeforeEdit: TVpBeforeEditEvent;
|
||||
FAfterEdit: TVpAfterEditEvent;
|
||||
FOwnerEditEvent: TVpEditEvent;
|
||||
FOnAddEvent: TVpOnAddNewEvent;
|
||||
FOnModifyEvent: TVpOnModifyEvent;
|
||||
FOnDeletingEvent: TVpOnDeletingEvent;
|
||||
{ internal variables }
|
||||
wvInLinkHandler: Boolean;
|
||||
wvClickTimer: TTimer;
|
||||
wvLoaded: Boolean;
|
||||
wvRowHeight: Integer;
|
||||
// wvDayHeadHeight: Integer;
|
||||
wvHeaderHeight: Integer;
|
||||
wvStartDate: TDateTime;
|
||||
wvEventList: TList;
|
||||
wvEventArray: TVpEventArray;
|
||||
wvWeekdayArray: TVpWeekdayArray;
|
||||
wvActiveEventRec: TRect;
|
||||
wvInPlaceEditor: TVpWvInPlaceEdit;
|
||||
wvCreatingEditor: Boolean;
|
||||
wvPainting: Boolean;
|
||||
wvDragging: Boolean;
|
||||
wvMouseDown: Boolean;
|
||||
wvMouseDownPoint: TPoint;
|
||||
wvHotPoint: TPoint;
|
||||
wvEventArray: TVpEventArray;
|
||||
wvEventList: TList;
|
||||
wvHeaderHeight: Integer;
|
||||
wvRowHeight: Integer;
|
||||
wvStartDate: TDateTime;
|
||||
wvWeekdayArray: TVpWeekdayArray;
|
||||
|
||||
{ property methods }
|
||||
procedure SetDrawingStyle(Value: TVpDrawingStyle);
|
||||
procedure SetColor(Value: TColor); reintroduce;
|
||||
procedure SetLineColor(Value: TColor);
|
||||
procedure SetDateLabelFormat(Value: string);
|
||||
procedure SetEventFont(Value: TVpFont);
|
||||
procedure SetShowEventTime(Value: Boolean);
|
||||
procedure SetTimeFormat(Value: TVpTimeFormat);
|
||||
procedure SetActiveDate(Value: TDateTime);
|
||||
procedure SetWeekStartsOn(Value: TVpDayType);
|
||||
{ internal methods }
|
||||
procedure SpinButtonClick(Sender: TObject);
|
||||
procedure wvEditInPlace(Sender: TObject);
|
||||
procedure wvHookUp;
|
||||
procedure wvPopulate;
|
||||
|
||||
{ inherited standard methods }
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure Loaded; override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;
|
||||
procedure MouseEnter; override;
|
||||
procedure MouseLeave; override;
|
||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure Paint; override;
|
||||
|
||||
{ event related methods }
|
||||
procedure EditEvent;
|
||||
procedure EndEdit(Sender: TObject);
|
||||
function EventAtCoord(Pt: TPoint): Boolean;
|
||||
function GetEventAtCoord(Pt: TPoint): TVpEvent;
|
||||
function GetEventRect(AEvent: TVpEvent): TRect;
|
||||
procedure wvSetDateByCoord(Point: TPoint);
|
||||
procedure wvSpawnEventEditDialog(IsNewEvent: Boolean);
|
||||
|
||||
{ drag and drop }
|
||||
procedure DoEndDrag(Target: TObject; X, Y: Integer); override;
|
||||
procedure DoStartDrag(var DragObject: TDragObject); override;
|
||||
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
|
||||
var Accept: Boolean); override;
|
||||
|
||||
{ Popup }
|
||||
function GetPopupMenu: TPopupMenu; override;
|
||||
@ -221,40 +260,6 @@ type
|
||||
procedure PopupCustomDate(Sender: TObject);
|
||||
procedure PopupPickResourceGroupEvent(Sender: TObject);
|
||||
|
||||
{ internal methods }
|
||||
procedure SpinButtonClick(Sender: TObject);
|
||||
procedure wvEditInPlace(Sender: TObject);
|
||||
procedure wvHookUp;
|
||||
procedure wvPopulate;
|
||||
|
||||
{ event related methods }
|
||||
procedure EditEvent;
|
||||
procedure EndEdit(Sender: TObject);
|
||||
function EventAtCoord(Pt: TPoint): Boolean;
|
||||
function GetEventAtCoord(Pt: TPoint): TVpEvent;
|
||||
function GetEventRect(AEvent: TVpEvent): TRect;
|
||||
procedure wvSetDateByCoord(Point: TPoint);
|
||||
procedure wvSpawnEventEditDialog(IsNewEvent: Boolean);
|
||||
|
||||
{ inherited standard methods }
|
||||
procedure CreateParams(var Params: TCreateParams); override;
|
||||
procedure CreateWnd; override;
|
||||
procedure Loaded; override;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;
|
||||
procedure MouseEnter; override;
|
||||
procedure MouseLeave; override;
|
||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X,Y: Integer); override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure Paint; override;
|
||||
|
||||
{ drag and drop }
|
||||
procedure DoEndDrag(Target: TObject; X, Y: Integer); override;
|
||||
procedure DoStartDrag(var DragObject: TDragObject); override;
|
||||
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
|
||||
var Accept: Boolean); override;
|
||||
|
||||
{ hints }
|
||||
procedure ShowHintWindow(APoint: TPoint; AEvent: TVpEvent);
|
||||
procedure HideHintWindow;
|
||||
@ -355,6 +360,7 @@ uses
|
||||
SysUtils, StrUtils, LazUTF8, Dialogs,
|
||||
VpEvntEditDlg, VpWeekViewPainter;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
{ TVpTGInPlaceEdit }
|
||||
(*****************************************************************************)
|
||||
@ -368,14 +374,12 @@ begin
|
||||
// DoubleBuffered := False;
|
||||
{$ENDIF}
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWvInPlaceEdit.CreateParams(var Params: TCreateParams);
|
||||
begin
|
||||
inherited CreateParams(Params);
|
||||
// Params.Style := Params.Style or ES_MULTILINE;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWvInPlaceEdit.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
@ -417,6 +421,8 @@ end;
|
||||
|
||||
(*****************************************************************************)
|
||||
{ TVpContactHeadAttr }
|
||||
(*****************************************************************************)
|
||||
|
||||
constructor TVpDayHeadAttr.Create(AOwner: TVpWeekView);
|
||||
begin
|
||||
inherited Create;
|
||||
@ -470,8 +476,41 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
{ TVpWvHeadAttributes }
|
||||
(*****************************************************************************)
|
||||
|
||||
constructor TVpWvHeadAttributes.Create(AOwner: TVpWeekView);
|
||||
begin
|
||||
inherited Create;
|
||||
FOwner := AOwner;
|
||||
FColor := clBtnFace;
|
||||
FFont := TVpFont.Create(AOwner);
|
||||
end;
|
||||
|
||||
destructor TVpWvHeadAttributes.Destroy;
|
||||
begin
|
||||
FFont.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TVpWvHeadAttributes.SetColor(const Value: TColor);
|
||||
begin
|
||||
if FColor <> Value then begin
|
||||
FColor := Value;
|
||||
FOwner.Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TVpWvHeadAttributes.SetFont(Value: TVpFont);
|
||||
begin
|
||||
FFont.Assign(Value);
|
||||
end;
|
||||
|
||||
|
||||
(*****************************************************************************)
|
||||
{ TVpWeekView }
|
||||
(*****************************************************************************)
|
||||
|
||||
constructor TVpWeekView.Create(AOwner: TComponent);
|
||||
begin
|
||||
@ -543,7 +582,6 @@ begin
|
||||
FAllowInplaceEdit := true;
|
||||
|
||||
{ set up fonts and colors }
|
||||
// FDayHeadAttributes.Font.Name := 'Tahoma';
|
||||
FDayHeadAttributes.Font.Size := 10;
|
||||
FDayHeadAttributes.Font.Style := [];
|
||||
FDayHeadAttributes.Color := clBtnFace;
|
||||
@ -757,7 +795,6 @@ procedure TVpWeekView.PaintToCanvas(ACanvas: TCanvas; ARect: TRect;
|
||||
begin
|
||||
RenderToCanvas(ACanvas, ARect, Angle, 1, ADate, -1, -1, gr30Min, True);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.RenderToCanvas(RenderCanvas: TCanvas; RenderIn: TRect;
|
||||
Angle: TVpRotationAngle; Scale: Extended; RenderDate: TDateTime;
|
||||
@ -1346,7 +1383,6 @@ begin
|
||||
if (Datastore <> nil) and (Datastore.Resource <> nil) then
|
||||
AddResourceGroupMenu(FDefaultPopup.Items, Datastore.Resource, PopupPickResourceGroupEvent);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.PopupAddEvent(Sender: TObject);
|
||||
var
|
||||
@ -1439,7 +1475,6 @@ begin
|
||||
if ActiveEvent <> nil then
|
||||
wvSpawnEventEditDialog(IsNewEvent);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.PopupToday(Sender: TObject);
|
||||
begin
|
||||
@ -1533,7 +1568,6 @@ begin
|
||||
end;
|
||||
Invalidate;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
{$IFNDEF LCL}
|
||||
procedure TVpWeekView.CMWantSpecialKey(var Msg: TCMWantSpecialKey);
|
||||
@ -1542,7 +1576,6 @@ begin
|
||||
Msg.Result := 1;
|
||||
end;
|
||||
{$ENDIF}
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.wvSetDateByCoord(Point: TPoint);
|
||||
var
|
||||
@ -1556,7 +1589,6 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
function TVpWeekView.EventAtCoord(Pt: TPoint): Boolean;
|
||||
var
|
||||
@ -1617,8 +1649,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{=====}
|
||||
|
||||
{ This is the timer event which spawns an in-place editor.
|
||||
If the event is double-clicked before this timer fires, then the event is
|
||||
edited in a dialog based editor. }
|
||||
@ -1627,7 +1657,6 @@ begin
|
||||
wvClickTimer.Enabled := false;
|
||||
EditEvent;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.EditEvent;
|
||||
var
|
||||
@ -1670,7 +1699,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
@ -1760,7 +1788,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWeekView.EndEdit(Sender: TObject);
|
||||
begin
|
||||
@ -1919,37 +1946,5 @@ begin
|
||||
FExternalPopup := nil;
|
||||
end;
|
||||
|
||||
{ TVpWvHeadAttributes }
|
||||
|
||||
constructor TVpWvHeadAttributes.Create(AOwner: TVpWeekView);
|
||||
begin
|
||||
inherited Create;
|
||||
FOwner := AOwner;
|
||||
FColor := clBtnFace;
|
||||
FFont := TVpFont.Create(AOwner);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
destructor TVpWvHeadAttributes.Destroy;
|
||||
begin
|
||||
FFont.Free;
|
||||
inherited;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWvHeadAttributes.SetColor(const Value: TColor);
|
||||
begin
|
||||
if FColor <> Value then begin
|
||||
FColor := Value;
|
||||
FOwner.Invalidate;
|
||||
end;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
procedure TVpWvHeadAttributes.SetFont(Value: TVpFont);
|
||||
begin
|
||||
FFont.Assign(Value);
|
||||
end;
|
||||
{=====}
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user