{"id":1051,"date":"2014-04-22T21:46:24","date_gmt":"2014-04-22T20:46:24","guid":{"rendered":"http:\/\/tulip-ui.azurewebsites.net\/?page_id=1051"},"modified":"2014-04-22T23:19:43","modified_gmt":"2014-04-22T22:19:43","slug":"tulip-ui-types-pas","status":"publish","type":"page","link":"http:\/\/tulip-ui.azurewebsites.net\/?page_id=1051","title":{"rendered":"Tulip.UI.Types.pas"},"content":{"rendered":"<div style=\"background-color: #FFFFFF; width: 680px\">\n<p style=\"text-align: right;\"><a title=\"Source Files\" href=\"http:\/\/tulip-ui.azurewebsites.net\/?page_id=1091\">Source Files<\/a><\/p>\n<p><code><\/p>\n<pre>\r\n{******************************************************************************}\r\n{                                                                              }\r\n{                        Tulip - User Interface Library                        }\r\n{                                                                              }\r\n{             Copyright(c) 2012 Marcos Gomes. All rights Reserved.             }\r\n{                                                                              }\r\n{  --------------------------------------------------------------------------  }\r\n{                                                                              }\r\n{  This product is based on Asphyre Sphinx (c) 2000 - 2012  Yuriy Kotsarenko.  }\r\n{       All rights reserved. Official web site: http:\/\/www.afterwarp.net       }\r\n{                                                                              }\r\n{******************************************************************************}\r\n{                                                                              }\r\n{  Important Notice:                                                           }\r\n{                                                                              }\r\n{  If you modify\/use this code or one of its parts either in original or       }\r\n{  modified form, you must comply with Mozilla Public License Version 2.0,     }\r\n{  including section 3, \"Responsibilities\". Failure to do so will result in    }\r\n{  the license breach, which will be resolved in the court. Remember that      }\r\n{  violating author's rights either accidentally or intentionally is           }\r\n{  considered a serious crime in many countries. Thank you!                    }\r\n{                                                                              }\r\n{  !! Please *read* Mozilla Public License 2.0 document located at:            }\r\n{  http:\/\/www.mozilla.org\/MPL\/                                                 }\r\n{                                                                              }\r\n{  --------------------------------------------------------------------------  }\r\n{                                                                              }\r\n{  The contents of this file are subject to the Mozilla Public License         }\r\n{  Version 2.0 (the \"License\"); you may not use this file except in            }\r\n{  compliance with the License. You may obtain a copy of the License at        }\r\n{  http:\/\/www.mozilla.org\/MPL\/                                                 }\r\n{                                                                              }\r\n{  Software distributed under the License is distributed on an \"AS IS\"         }\r\n{  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the     }\r\n{  License for the specific language governing rights and limitations          }\r\n{  under the License.                                                          }\r\n{                                                                              }\r\n{  The Original Code is Tulip.UI.Types.pas.                                    }\r\n{                                                                              }\r\n{  The Initial Developer of the Original Code is Marcos Gomes.                 }\r\n{  Portions created by Marcos Gomes are Copyright (C) 2012, Marcos Gomes.      }\r\n{  All Rights Reserved.                                                        }\r\n{                                                                              }\r\n{******************************************************************************}\r\n{                                                                              }\r\n{  Tulip.UI.Types.pas                                   Modified: 05-Out-2012  }\r\n{  --------------------------------------------------------------------------  }\r\n{                                                                              }\r\n{                      Type definitions used by Controls                       }\r\n{                                                                              }\r\n{                                Version 1.02                                  }\r\n{                                                                              }\r\n{******************************************************************************}\r\n\r\nunit Tulip.UI.Types;\r\n\r\ninterface\r\n\r\nuses\r\n  Winapi.Messages, System.Classes, System.Types, System.UITypes;\r\n\r\nconst\r\n{$REGION 'Cursors'}\r\n  crDefault = System.UITypes.crDefault;\r\n  crNone = System.UITypes.crNone;\r\n  crArrow = System.UITypes.crArrow;\r\n  crCross = System.UITypes.crCross;\r\n  crIBeam = System.UITypes.crIBeam;\r\n  crSize = System.UITypes.crSize;\r\n  crSizeNESW = System.UITypes.crSizeNESW;\r\n  crSizeNS = System.UITypes.crSizeNS;\r\n  crSizeNWSE = System.UITypes.crSizeNWSE;\r\n  crSizeWE = System.UITypes.crSizeWE;\r\n  crUpArrow = System.UITypes.crUpArrow;\r\n  crHourGlass = System.UITypes.crHourGlass;\r\n  crDrag = System.UITypes.crDrag;\r\n  crNoDrop = System.UITypes.crNoDrop;\r\n  crHSplit = System.UITypes.crHSplit;\r\n  crVSplit = System.UITypes.crVSplit;\r\n  crMultiDrag = System.UITypes.crMultiDrag;\r\n  crSQLWait = System.UITypes.crSQLWait;\r\n  crNo = System.UITypes.crNo;\r\n  crAppStart = System.UITypes.crAppStart;\r\n  crHelp = System.UITypes.crHelp;\r\n  crHandPoint = System.UITypes.crHandPoint;\r\n  crSizeAll = System.UITypes.crSizeAll;\r\n{$ENDREGION}\r\n{$REGION 'MouseButtons'}\r\n  mbLeft = System.UITypes.TMouseButton.mbLeft;\r\n  mbRight = System.UITypes.TMouseButton.mbRight;\r\n  mbMiddle = System.UITypes.TMouseButton.mbMiddle;\r\n{$ENDREGION}\r\n\r\ntype\r\n\r\n{$REGION 'Controls'}\r\n  TAColor = Cardinal;\r\n\r\n  TEdge = (eLeft, eTop, eRight, eBottom);\r\n  TEdges = set of Tulip.UI.Types.TEdge;\r\n  TConstraintSize = 0 .. MaxInt;\r\n\r\n  TControlState = set of (csLButtonDown, csClicked, csPalette, csReadingState,\r\n    csAlignmentNeeded, csFocusing, csCreating, csPaintCopy, csCustomPaint,\r\n    csDestroyingHandle, csDocking, csDesignerHide, csPanning, csRecreating,\r\n    csAligning, csGlassPaint, csPrintClient, csMouseHover);\r\n\r\n  TFocusRect = (fNone, fLight, fDark);\r\n\r\n  TMouseButton = System.UITypes.TMouseButton;\r\n\r\n  TProgressDisplay = (pdNone, pdValue, pdPercentage, pdCustom);\r\n\r\n  TTabOrder = System.UITypes.TTabOrder;\r\n\r\n  TUpDownType = (udNone, udUp, udDown);\r\n\r\n{$ENDREGION}\r\n{$REGION 'Events'}\r\n  TMouseEvent = procedure(Sender: TObject; Button: TMouseButton;\r\n    Shift: TShiftState; X, Y: Integer) of object;\r\n\r\n  TMouseMoveEvent = procedure(Sender: TObject; Shift: TShiftState;\r\n    X, Y: Integer) of object;\r\n\r\n  TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift: TShiftState)\r\n    of object;\r\n\r\n  TKeyPressEvent = procedure(Sender: TObject; var Key: Char) of object;\r\n\r\n  TMouseWheelEvent = procedure(Sender: TObject; Shift: TShiftState;\r\n    WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean) of object;\r\n\r\n  TMouseWheelUpDownEvent = procedure(Sender: TObject; Shift: TShiftState;\r\n    MousePos: TPoint; var Handled: Boolean) of object;\r\n\r\n  TShortCutEvent = procedure(var Msg: TWMKey; var Handled: Boolean) of object;\r\n{$ENDREGION}\r\n{$REGION 'Text'}\r\n  TStringArray = array of String;\r\n\r\n  TSelection = record\r\n    StartPos, EndPos: Integer;\r\n  end;\r\n\r\n  TAChar = record\r\n    Char: Char;\r\n    Width: Integer;\r\n  end;\r\n\r\n  TAChars = array of Tulip.UI.Types.TAChar;\r\n  TEditCharCase = (ecNormal, ecUpperCase, ecLowerCase);\r\n\r\n  THorizontalAlign = (aLeft, aCenter, aRight, aJustify);\r\n\r\n  TVerticalAlign = (aTop, aMiddle, aBottom);\r\n\r\n{$ENDREGION}\r\n\r\nimplementation\r\n\r\nend.\r\n<\/pre>\n<p><\/code>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Source Files {******************************************************************************} { } { Tulip &#8211; User Interface Library } { } { Copyright(c) 2012 Marcos Gomes. All rights Reserved. } { } { &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; } { } <a class=\"more-link\" href=\"http:\/\/tulip-ui.azurewebsites.net\/?page_id=1051\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1091,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/pages\/1051"}],"collection":[{"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1051"}],"version-history":[{"count":2,"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/pages\/1051\/revisions"}],"predecessor-version":[{"id":1831,"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/pages\/1051\/revisions\/1831"}],"up":[{"embeddable":true,"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=\/wp\/v2\/pages\/1091"}],"wp:attachment":[{"href":"http:\/\/tulip-ui.azurewebsites.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}