📄 uimages.pas
字号:
{ JADD - Just Another DelphiDoc: Documentation from Delphi Source Code
Copyright (C) 2004-2008 Gerold Veith
This file is part of JADD - Just Another DelphiDoc.
DelphiDoc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation.
DelphiDoc 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
unit UImages;
{Contains some data for images in the documentation. }
interface
uses Windows, SysUtils,
UBaseIdents;
type
//raised when an unknown or invalid image should be included in the
//documentation
EInvalidDocImage = class(Exception);
//raised when an image uses features that are not supported by the generator
//of the documentation
EUnsupportedDocImage = class(EInvalidDocImage);
{ * * * *** * * * *** TImageLinkList *** * * * *** * * * }
//what kind of link is used inside an image
TImageLinkKind = (
ilkIdentifier, //link to an identifier or file
ilkExtern, //external link
ilkPage, //link to a page of user documentation
ilkGUI); //link inside help on a GUI
//all data of a link inside an image to be included in the documentation
TImageLinkData = record
//if it is a link over the whole image
IsAll: Boolean;
//position of the link in the image (if not ~[link IsAll])
Position: TRect;
//whether it links to an external URI
//~deprecated use ~[code ~[link Kind] = ~[link ilkExtern]] instead
ExternLink: Boolean;
//the URI to link to; unless ~[link ExternLink] it is a link inside the
LinkTarget: String; //generated documentation
//text to use for the link as an alternative text (only used hidden)
AlternativeText: String;
case Kind: TImageLinkKind of //the kind of link this is
ilkIdentifier: ( Identifier: TIdentifier; //the identifier to link to
ToFile: TPascalFile; //the file to link to
);
ilkExtern: ( ); //uses ~[link LinkTarget]
ilkPage: ( PageIndex: Integer); //index of page to link to
ilkGUI: ( GUIIndex: Integer; //index of form to link to
GUICommentIndex: Integer; //index of comment in form
);
end;
{$UNDEF ListTemplateItemIsObject}
{$UNDEF ListTemplateItemMayBeFreed}
{$UNDEF ListTemplateItemFreedByDefault}
{$DEFINE ListTemplateItemAssignFromSelf}
//the items for the template list to use
TListTemplateListItem = TImageLinkData;
//forward declaration to be able to define an alias so the template can
//reference itself
TImageLinkList = class;
//alias for the list to be used by the implementations of the methods
TListTemplate = TImageLinkList;
{$INCLUDE ..\..\General\Templates\ListTemplate.inc}
{A list of links inside an image. }
TImageLinkList
{$INCLUDE ..\..\General\Templates\ListTemplate.inc}
implementation
{ * * * *** * * * *** TImageLinkList *** * * * *** * * * }
{$INCLUDE ..\..\General\Templates\ListTemplate.inc}
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -