2008-02-03 12:05:55 +00:00
|
|
|
{*********************************************************}
|
|
|
|
{* VPCONST.PAS 1.03 *}
|
|
|
|
{*********************************************************}
|
|
|
|
|
|
|
|
{* ***** BEGIN LICENSE BLOCK ***** *}
|
|
|
|
{* Version: MPL 1.1 *}
|
|
|
|
{* *}
|
|
|
|
{* The contents of this file are subject to the Mozilla Public License *}
|
|
|
|
{* Version 1.1 (the "License"); you may not use this file except in *}
|
|
|
|
{* compliance with the License. You may obtain a copy of the License at *}
|
|
|
|
{* http://www.mozilla.org/MPL/ *}
|
|
|
|
{* *}
|
|
|
|
{* Software distributed under the License is distributed on an "AS IS" basis, *}
|
|
|
|
{* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License *}
|
|
|
|
{* for the specific language governing rights and limitations under the *}
|
|
|
|
{* License. *}
|
|
|
|
{* *}
|
|
|
|
{* The Original Code is TurboPower Visual PlanIt *}
|
|
|
|
{* *}
|
|
|
|
{* The Initial Developer of the Original Code is TurboPower Software *}
|
|
|
|
{* *}
|
|
|
|
{* Portions created by TurboPower Software Inc. are Copyright (C) 2002 *}
|
|
|
|
{* TurboPower Software Inc. All Rights Reserved. *}
|
|
|
|
{* *}
|
|
|
|
{* Contributor(s): *}
|
|
|
|
{* *}
|
|
|
|
{* ***** END LICENSE BLOCK ***** *}
|
|
|
|
|
2012-09-24 19:30:17 +00:00
|
|
|
{.$I Vp.INC}
|
2008-02-03 12:05:55 +00:00
|
|
|
|
|
|
|
unit VpConst;
|
2016-06-07 15:09:01 +00:00
|
|
|
|
|
|
|
{$IFDEF FPC}
|
|
|
|
{$MODE Delphi}
|
|
|
|
{$ENDIF}
|
|
|
|
|
2008-02-03 12:05:55 +00:00
|
|
|
{-Versioning defines and methods}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
{$IFDEF LCL}
|
2017-05-22 08:11:27 +00:00
|
|
|
Controls, LCLType, LCLProc, LCLVersion,
|
2008-02-03 12:05:55 +00:00
|
|
|
{$ELSE}
|
|
|
|
Windows,
|
|
|
|
{$ENDIF}
|
|
|
|
Forms, StdCtrls;
|
|
|
|
|
|
|
|
const
|
2016-06-10 20:49:35 +00:00
|
|
|
BuildTime = {$I %DATE%} + {$I %TIME}; //'09/13/2002 09:25 AM';
|
2017-05-23 17:39:54 +00:00
|
|
|
VpVersionStr = 'v1.08'; {Visual PlanIt library version}
|
2008-02-03 12:05:55 +00:00
|
|
|
VpProductName = 'Visual PlanIt';
|
|
|
|
|
|
|
|
BorderStyles : array[TBorderStyle] of LongInt =
|
|
|
|
(0, WS_BORDER);
|
|
|
|
ScrollBarStyles : array [TScrollStyle] of LongInt =
|
|
|
|
(0, WS_HSCROLL, WS_VSCROLL, WS_HSCROLL or WS_VSCROLL{$IFDEF LCL},0,0,0{$ENDIF});
|
|
|
|
|
|
|
|
SecondsInDay = 86400; { Number of seconds in a day }
|
|
|
|
SecondsInHour = 3600; { Number of seconds in an hour }
|
|
|
|
SecondsInMinute = 60; { Number of seconds in a minute }
|
|
|
|
HoursInDay = 24; { Number of hours in a day }
|
|
|
|
MinutesInHour = 60; { Number of minutes in an hour }
|
|
|
|
MinutesInDay = 1440; { Number of minutes in a day }
|
2016-07-04 19:00:42 +00:00
|
|
|
OneSecond = 1.0 / SecondsInDay;
|
|
|
|
OneMinute = 1.0 / MinutesInDay;
|
|
|
|
OneHour = 1.0 / HoursInDay;
|
2008-02-03 12:05:55 +00:00
|
|
|
MaxDateLen = 40; { maximum length of date picture strings }
|
|
|
|
MaxMonthName = 15; { maximum length for month names }
|
|
|
|
MaxDayName = 15; { maximum length for day names }
|
|
|
|
TextMargin = 5; { amount of space around text }
|
|
|
|
MaxVisibleEvents = 1024; { maximum number of events that can be }
|
|
|
|
{ visible at any one time }
|
|
|
|
MaxEventDepth = 50; { the maximum number of side by side }
|
|
|
|
{ events, which can be displayed in the }
|
|
|
|
{ DayView component. }
|
|
|
|
ClickDelay : Integer = 500; { the number of milliseconds of delay for }
|
|
|
|
{ each event click in the TimeGrid }
|
|
|
|
calDefHeight = 140; { popup calendar default height }
|
|
|
|
calDefWidth = 200; { popup calendar default width }
|
|
|
|
ExtraBarWidth = 2; { The extra, draggable area on either side }
|
|
|
|
{ of the Contact Grid's horizontal bars. }
|
2016-06-14 14:20:23 +00:00
|
|
|
CompareTimeEPS = 1.0 / (24*60*60*10); { Epsilon for time comparison, 0.1 sec }
|
2008-02-03 12:05:55 +00:00
|
|
|
|
2016-07-08 11:05:54 +00:00
|
|
|
cmPerInch = 2.54; { 1 inch is 2.54 cm }
|
|
|
|
|
2008-02-03 12:05:55 +00:00
|
|
|
ResourceTableName = 'Resources';
|
|
|
|
TasksTableName = 'Tasks';
|
|
|
|
EventsTableName = 'Events';
|
|
|
|
ContactsTableName = 'Contacts';
|
|
|
|
RecordIDTableName = 'RecordIDS';
|
|
|
|
|
2016-07-04 20:30:36 +00:00
|
|
|
TallShortChars = 'Wy';
|
2016-07-11 21:13:57 +00:00
|
|
|
strTRUE = 'true';
|
|
|
|
strFALSE = 'false';
|
2016-07-04 20:30:36 +00:00
|
|
|
|
2016-09-22 23:12:16 +00:00
|
|
|
WEEKDAY_COLOR = $FFFFFF;
|
2016-11-21 17:12:05 +00:00
|
|
|
WEEKEND_COLOR = $C0C0C0;
|
2016-09-22 17:47:27 +00:00
|
|
|
HOLIDAY_COLOR = $8080FF;
|
|
|
|
TODAY_COLOR = $FFC0C0;
|
2016-09-22 23:12:16 +00:00
|
|
|
OFF_COLOR = $E0E0E0;
|
2016-07-04 20:30:36 +00:00
|
|
|
|
2008-02-03 12:05:55 +00:00
|
|
|
{virtual key constants not already defined}
|
|
|
|
VK_NONE = 0;
|
|
|
|
VK_ALT = VK_MENU;
|
|
|
|
VK_A = Ord('A'); VK_B = Ord('B'); VK_C = Ord('C'); VK_D = Ord('D');
|
|
|
|
VK_E = Ord('E'); VK_F = Ord('F'); VK_G = Ord('G'); VK_H = Ord('H');
|
|
|
|
VK_I = Ord('I'); VK_J = Ord('J'); VK_K = Ord('K'); VK_L = Ord('L');
|
|
|
|
VK_M = Ord('M'); VK_N = Ord('N'); VK_O = Ord('O'); VK_P = Ord('P');
|
|
|
|
VK_Q = Ord('Q'); VK_R = Ord('R'); VK_S = Ord('S'); VK_T = Ord('T');
|
|
|
|
VK_U = Ord('U'); VK_V = Ord('V'); VK_W = Ord('W'); VK_X = Ord('X');
|
|
|
|
VK_Y = Ord('Y'); VK_Z = Ord('Z'); VK_0 = Ord('0'); VK_1 = Ord('1');
|
|
|
|
VK_2 = Ord('2'); VK_3 = Ord('3'); VK_4 = Ord('4'); VK_5 = Ord('5');
|
|
|
|
VK_6 = Ord('6'); VK_7 = Ord('7'); VK_8 = Ord('8'); VK_9 = Ord('9');
|
|
|
|
|
2017-05-25 21:24:23 +00:00
|
|
|
|
2008-02-03 12:05:55 +00:00
|
|
|
{------------------- Windows messages -----------------------}
|
|
|
|
{Not a message code. Value of the first of the message codes used}
|
|
|
|
Vp_FIRST = $7F00; {***}
|
|
|
|
{sent to force a call to RecreateWnd}
|
|
|
|
Vp_RECREATEWND = Vp_FIRST + 1;
|
|
|
|
{sent to perform after-enter notification}
|
|
|
|
Vp_AFTERENTER = Vp_FIRST + 2;
|
|
|
|
{sent to perform after-exit notification}
|
|
|
|
Vp_AFTEREXIT = Vp_FIRST + 3;
|
|
|
|
{sent by a collection to its property editor when a property is changed}
|
|
|
|
Vp_PROPCHANGE = Vp_FIRST + 4;
|
|
|
|
|
|
|
|
|
|
|
|
{*** Error message codes ***}
|
|
|
|
oeFirst = 256;
|
|
|
|
|
|
|
|
{ XML support }
|
|
|
|
|
|
|
|
{The following constants are the tokens needed to parse an XML
|
|
|
|
document. The tokens are stored in UCS-4 format to reduce the
|
|
|
|
number of conversions needed by the filter.}
|
|
|
|
Xpc_BracketAngleLeft : array[0..0] of Longint = (60); {<}
|
|
|
|
Xpc_BracketAngleRight : array[0..0] of Longint = (62); {>}
|
|
|
|
Xpc_BracketSquareLeft : array[0..0] of Longint = (91); {[}
|
|
|
|
Xpc_BracketSquareRight : array[0..0] of Longint = (93); {]}
|
|
|
|
Xpc_CDATAStart :
|
|
|
|
array[0..5] of Longint = (67, 68, 65, 84, 65, 91); {CDATA[}
|
|
|
|
Xpc_CharacterRef : array[0..0] of Longint = (35); {#}
|
|
|
|
Xpc_CharacterRefHex : array[0..0] of Longint = (120); {x}
|
|
|
|
Xpc_CommentEnd : array[0..2] of Longint = (45, 45, 62); {-->}
|
|
|
|
Xpc_CommentStart : array[0..3] of Longint = (60, 33, 45, 45); {<!--}
|
|
|
|
Xpc_ConditionalEnd : array[0..2] of Longint = (93, 93, 62); {]]>}
|
|
|
|
Xpc_ConditionalIgnore :
|
|
|
|
array[0..5] of Longint = (73, 71, 78, 79, 82, 69); {IGNORE}
|
|
|
|
Xpc_ConditionalInclude :
|
|
|
|
array[0..6] of Longint = (73, 78, 67, 76, 85, 68, 69); {INCLUDE}
|
|
|
|
Xpc_ConditionalStart :
|
|
|
|
array[0..2] of Longint = (60, 33, 91); {<![}
|
|
|
|
Xpc_Dash : array[0..0] of Longint = (45); {-}
|
|
|
|
Xpc_DTDAttFixed :
|
|
|
|
array[0..4] of Longint = (70, 73, 88, 69, 68); {FIXED}
|
|
|
|
Xpc_DTDAttImplied :
|
|
|
|
array[0..6] of Longint = (73, 77, 80, 76, 73, 69, 68); {IMPLIED}
|
|
|
|
Xpc_DTDAttlist :
|
|
|
|
array[0..8] of Longint =
|
|
|
|
(60, 33, 65, 84, 84, 76, 73, 83, 84); {<!ATTLIST}
|
|
|
|
Xpc_DTDAttRequired :
|
|
|
|
array[0..7] of Longint =
|
|
|
|
(82, 69, 81, 85, 73, 82, 69, 68); {REQUIRED}
|
|
|
|
Xpc_DTDDocType :
|
|
|
|
array[0..8] of Longint =
|
|
|
|
(60, 33, 68, 79, 67, 84, 89, 80, 69); {<!DOCTYPE}
|
|
|
|
Xpc_DTDElement :
|
|
|
|
array[0..8] of Longint =
|
|
|
|
(60, 33, 69, 76, 69, 77, 69, 78, 84); {<!ELEMENT}
|
|
|
|
Xpc_DTDElementAny : array[0..2] of Longint = (65, 78, 89); {ANY}
|
|
|
|
Xpc_DTDElementCharData :
|
|
|
|
array[0..6] of Longint = (35, 80, 67, 68, 65, 84, 65); {#PCDATA}
|
|
|
|
Xpc_DTDElementEmpty :
|
|
|
|
array[0..4] of Longint = (69, 77, 80, 84, 89); {EMPTY}
|
|
|
|
Xpc_DTDEntity :
|
|
|
|
array[0..7] of Longint =
|
|
|
|
(60, 33, 69, 78, 84, 73, 84, 89); {<!ENTITY}
|
|
|
|
Xpc_DTDNotation :
|
|
|
|
array[0..9] of Longint =
|
|
|
|
(60, 33, 78, 79, 84, 65, 84, 73, 79, 78); {<!NOTATION}
|
|
|
|
Xpc_Encoding : array[0..7] of Longint =
|
|
|
|
(101, 110, 99, 111, 100, 105, 110, 103); {encoding}
|
|
|
|
Xpc_Equation : array[0..0] of Longint = (61); {=}
|
|
|
|
Xpc_ExternalPublic :
|
|
|
|
array[0..5] of Longint = (80, 85, 66, 76, 73, 67); {PUBLIC}
|
|
|
|
Xpc_ExternalSystem :
|
|
|
|
array[0..5] of Longint = (83, 89, 83, 84, 69, 77); {SYSTEM}
|
|
|
|
Xpc_GenParsedEntityEnd : array[0..0] of Longint = (59); {;}
|
|
|
|
Xpc_ListOperator : array[0..0] of Longint = (124); {|}
|
|
|
|
Xpc_MixedEnd : array[0..1] of Longint = (41, 42); {)*}
|
|
|
|
Xpc_OneOrMoreOpr : array[0..0] of Longint = (42); {*}
|
|
|
|
Xpc_ParamEntity : array[0..0] of Longint = (37); {%}
|
|
|
|
Xpc_ParenLeft : array[0..0] of Longint = (40); {(}
|
|
|
|
Xpc_ParenRight : array[0..0] of Longint = (41); {)}
|
|
|
|
Xpc_ProcessInstrEnd : array[0..1] of Longint = (63, 62); {?>}
|
|
|
|
Xpc_ProcessInstrStart : array[0..1] of Longint = (60, 63); {<?}
|
|
|
|
Xpc_QuoteDouble : array[0..0] of Longint = (34); {"}
|
|
|
|
Xpc_QuoteSingle : array[0..0] of Longint = (39); {'}
|
|
|
|
Xpc_Standalone :
|
|
|
|
array[0..9] of Longint =
|
|
|
|
(115, 116, 97, 110, 100, 97, 108, 111, 110, 101); {standalone}
|
|
|
|
Xpc_UnparsedEntity :
|
|
|
|
array[0..4] of Longint = (78, 68, 65, 84, 65); {NDATA}
|
|
|
|
Xpc_Version :
|
|
|
|
array[0..6] of Longint =
|
|
|
|
(118, 101, 114, 115, 105, 111, 110); {version}
|
|
|
|
|
|
|
|
LIT_CHAR_REF = 1;
|
|
|
|
LIT_ENTITY_REF = 2;
|
|
|
|
LIT_PE_REF = 4;
|
|
|
|
LIT_NORMALIZE = 8;
|
|
|
|
|
|
|
|
CONTEXT_NONE = 0;
|
|
|
|
CONTEXT_DTD = 1;
|
|
|
|
CONTEXT_ENTITYVALUE = 2;
|
|
|
|
CONTEXT_ATTRIBUTEVALUE = 3;
|
|
|
|
|
|
|
|
CONTENT_UNDECLARED = 0;
|
|
|
|
CONTENT_ANY = 1;
|
|
|
|
CONTENT_EMPTY = 2;
|
|
|
|
CONTENT_MIXED = 3;
|
|
|
|
CONTENT_ELEMENTS = 4;
|
|
|
|
|
|
|
|
OCCURS_REQ_NOREPEAT = 0;
|
|
|
|
OCCURS_OPT_NOREPEAT = 1;
|
|
|
|
OCCURS_OPT_REPEAT = 2;
|
|
|
|
OCCURS_REQ_REPEAT = 3;
|
|
|
|
|
|
|
|
REL_OR = 0;
|
|
|
|
REL_AND = 1;
|
|
|
|
REL_NONE = 2;
|
|
|
|
|
|
|
|
ATTRIBUTE_UNDECLARED = 0;
|
|
|
|
ATTRIBUTE_CDATA = 1;
|
|
|
|
ATTRIBUTE_ID = 2;
|
|
|
|
ATTRIBUTE_IDREF = 3;
|
|
|
|
ATTRIBUTE_IDREFS = 4;
|
|
|
|
ATTRIBUTE_ENTITY = 5;
|
|
|
|
ATTRIBUTE_ENTITIES = 6;
|
|
|
|
ATTRIBUTE_NMTOKEN = 7;
|
|
|
|
ATTRIBUTE_NMTOKENS = 8;
|
|
|
|
ATTRIBUTE_ENUMERATED = 9;
|
|
|
|
ATTRIBUTE_NOTATION = 10;
|
|
|
|
|
|
|
|
ATTRIBUTE_DEFAULT_UNDECLARED = 0;
|
|
|
|
ATTRIBUTE_DEFAULT_SPECIFIED = 1;
|
|
|
|
ATTRIBUTE_DEFAULT_IMPLIED = 2;
|
|
|
|
ATTRIBUTE_DEFAULT_REQUIRED = 3;
|
|
|
|
ATTRIBUTE_DEFAULT_FIXED = 4;
|
|
|
|
|
|
|
|
ENTITY_UNDECLARED = 0;
|
|
|
|
ENTITY_INTERNAL = 1;
|
|
|
|
ENTITY_NDATA = 2;
|
|
|
|
ENTITY_TEXT = 3;
|
|
|
|
|
|
|
|
CONDITIONAL_INCLUDE = 0;
|
|
|
|
CONDITIONAL_IGNORE = 1;
|
|
|
|
|
|
|
|
{ Version numbers }
|
|
|
|
VpXSLImplementation = 0.0;
|
|
|
|
VpXMLSpecification = '1.0';
|
|
|
|
|
2016-09-12 22:25:34 +00:00
|
|
|
{ Defaults }
|
2008-02-03 12:05:55 +00:00
|
|
|
|
2016-06-20 09:06:30 +00:00
|
|
|
{ MonthView }
|
|
|
|
vpDefWVRClickChangeDate = True;
|
2008-02-03 12:05:55 +00:00
|
|
|
|
2016-09-12 22:25:34 +00:00
|
|
|
{ Hint support }
|
|
|
|
MAX_HINT_WIDTH = 400;
|
|
|
|
|
2018-05-04 22:28:03 +00:00
|
|
|
DesignTimeDPI = 96;
|
|
|
|
|
2017-05-22 08:11:27 +00:00
|
|
|
{$IFDEF LCL}
|
2018-01-12 11:07:34 +00:00
|
|
|
{$IF LCL_FULLVERSION >= 1080100}
|
|
|
|
VP_LCL_SCALING = 2;
|
|
|
|
{$ELSE}
|
2017-05-22 08:11:27 +00:00
|
|
|
{$IF LCL_FULLVERSION >= 1080000}
|
|
|
|
VP_LCL_SCALING = 1;
|
|
|
|
{$ELSE}
|
|
|
|
VP_LCL_SCALING = 0;
|
2018-01-12 11:07:34 +00:00
|
|
|
{$ENDIF}{$ENDIF}
|
2017-05-22 08:11:27 +00:00
|
|
|
{$ELSE}
|
|
|
|
VL_LCL_SCALING := 0;
|
|
|
|
{$ENDIF}
|
|
|
|
|
2016-09-12 22:25:34 +00:00
|
|
|
|
2008-02-03 12:05:55 +00:00
|
|
|
implementation
|
|
|
|
|
2016-06-20 09:06:30 +00:00
|
|
|
initialization
|
2008-02-03 12:05:55 +00:00
|
|
|
{$IFNDEF LCL}
|
|
|
|
ClickDelay := GetDoubleClickTime;
|
|
|
|
{$ENDIF}
|
|
|
|
|
|
|
|
end.
|