{*********************************************************} {* 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 ***** *} {.$I vp.inc} unit VpConst; {$IFDEF FPC} {$MODE Delphi} {$ENDIF} {-Versioning defines and methods} interface uses {$IFDEF LCL} Controls, LCLType, LCLProc, LCLVersion, {$ELSE} Windows, {$ENDIF} Graphics, Forms, StdCtrls; const BuildTime = {$I %DATE%} + {$I %TIME}; //'09/13/2002 09:25 AM'; VpVersionStr = 'v1.12'; {Visual PlanIt library version} VpProductName = 'Visual PlanIt'; BorderStyles: array[TBorderStyle] of LongInt = (0, WS_BORDER); CATEGORY_COLORS: Array[0..9] of TColor = ( clNavy, clRed, clYellow, clLime, clPurple, clTeal, clFuchsia, clOlive, clAqua, clMaroon ); ScrollBarStyles: array[TScrollStyle] of LongInt = ( 0, WS_HSCROLL, WS_VSCROLL, WS_HSCROLL or WS_VSCROLL{$IFDEF LCL},0,0,0{$ENDIF} ); NO_DATE = 9999999; FOREVER_DATE = 999999; 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 } OneSecond = 1.0 / SecondsInDay; OneMinute = 1.0 / MinutesInDay; OneHour = 1.0 / HoursInDay; MaxDateLen = 40; { maximum length of date picture strings } MaxMonthName = 15; { maximum length for month names } MaxDayName = 15; { maximum length for day names } TEXT_MARGIN = 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. } CompareTimeEPS = 0.1 * OneSecond; { Epsilon for time comparison, 0.1 sec } cmPerInch = 2.54; { 1 inch is 2.54 cm } ResourceTableName = 'Resources'; TasksTableName = 'Tasks'; EventsTableName = 'Events'; ContactsTableName = 'Contacts'; RecordIDTableName = 'RecordIDS'; TallShortChars = 'Wy'; strTRUE = 'true'; strFALSE = 'false'; DEFAULT_COLOR = clWindow; DEFAULT_LINECOLOR = clSilver; DEFAULT_HEADERCOLOR = clBtnFace; WEEKDAY_COLOR = $FFFFFF; WEEKEND_COLOR = $D0D0D0; HOLIDAY_COLOR = $8080FF; TODAY_COLOR = $FFC0C0; OFF_COLOR = $E0E0E0; {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'); {------------------- 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); {