fpc/packages/fcl-res/xml/groupresource.xml
michael 174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00

145 lines
8.2 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="fcl-res">
<!--
====================================================================
groupresource
====================================================================
-->
<module name="groupresource">
<short>Contains group resource classes</short>
<descr>
<p>This unit contains <link id="TGroupResource"/> and <link id="TGroupCachedDataStream"/>, two classes used for resources of type <link id="resource.RT_GROUP_ICON">RT_GROUP_ICON</link> and <link id="resource.RT_GROUP_CURSOR">RT_GROUP_CURSOR</link>.</p>
<p>The former is an abstract resource class which is implemented by <link id="groupiconresource.TGroupIconResource">TGroupIconResource</link> and <link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>, and the latter is a <link id="resdatastream.TCachedDataStream">TCachedDataStream</link> descendant used to provide .ico/.cur like streams for resource classes mentioned earlier.</p>
<p>This unit shouldn't be of interest for the user, who should look at documentation for <link id="groupiconresource"/> and <link id="groupcursorresource"/> units instead.</p>
</descr>
<!-- unresolved type reference Visibility: default -->
<element name="Classes">
</element>
<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
</element>
<!-- unresolved type reference Visibility: default -->
<element name="resource">
</element>
<!-- unresolved type reference Visibility: default -->
<element name="resdatastream">
</element>
<!-- object Visibility: default -->
<element name="TGroupResource">
<short>Abstract common class for group icon and group cursor classes</short>
<descr>
<p>This class provides common functionalities that are extended by <link id="groupiconresource.TGroupIconResource">TGroupIconResource</link> and <link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>.</p>
<p>Resources of type <link id="resource.RT_GROUP_ICON">RT_GROUP_ICON</link> and <link id="resource.RT_GROUP_CURSOR">RT_GROUP_CURSOR</link> represent a .ico or .cur file, respectively. However, data isn't contained in a single resource, but it's scattered over several different resources. That is, a .ico file contains an icon, which is made of several different images (for different sizes and color depth); when it is represented as a resource, however, the <link id="resource.RT_GROUP_ICON">RT_GROUP_ICON</link> resource only contains information about the single images, which are contained each in a different resource of type <link id="resource.RT_ICON">RT_ICON</link>. The single resources are pretty unuseful alone, since they only consist of raw image data: they must be accessed in the contest of the <link id="resource.RT_GROUP_ICON">RT_GROUP_ICON</link> resource, which provides information about them.</p>
<p><link id="groupiconresource.TGroupIconResource">TGroupIconResource</link> and <link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link> provide a way to handle resources of these types as if they were .ico or .cur files. This class implements common functionalities, since icons and cursors are very similar.</p>
<remark>An object of this class should never be directly instantiated: use a descendant class instead.</remark>
</descr>
<seealso>
<link id="groupiconresource.TGroupIconResource">TGroupIconResource</link>
<link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>
</seealso>
</element>
<!-- destructor Visibility: public -->
<element name="TGroupResource.Destroy">
<short></short>
<descr>
</descr>
<errors>
</errors>
<seealso>
</seealso>
</element>
<!-- procedure Visibility: public -->
<element name="TGroupResource.SetCustomItemDataStream">
<short>Sets a custom stream as the underlying stream for ItemData</short>
<descr>
<p>This method allows the user to use a custom stream as the underlying stream for <link id="TGroupResource.ItemData">ItemData</link>. This is useful when you want a <link id="groupiconresource.TGroupIconResource">TGroupIconResource</link> or <link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link> to be created from a ico or cur file for which you have a stream.</p>
<p><b>Sample code</b></p>
<p>This code creates a resource containing an icon</p>
<code>
var
aName : TResourceDesc;
aRes : TGroupIconResource;
aFile : TFileStream;
Resources : TResources;
begin
Resources:=TResources.Create;
aName:=TResourceDesc.Create('MAINICON');
aRes:=TGroupIconResource.Create(nil,aName); //type is always RT_GROUP_ICON
aName.Free; //not needed anymore
aFile:=TFileStream.Create('mainicon.ico',fmOpenRead or fmShareDenyNone);
aRes.SetCustomItemDataStream(aFile);
Resources.Add(aRes);
Resources.WriteToFile('myresource.res');
Resources.Free; //it destroys aRes as well.
aFile.Free;
end;
</code>
</descr>
<errors>
</errors>
<seealso>
<link id="TGroupResource.ItemData"/>
<link id="groupiconresource.TGroupIconResource">TGroupIconResource</link>
<link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>
<link id="resource.TAbstractResource.UpdateRawData">TAbstractResource.UpdateRawData</link>
</seealso>
</element>
<!-- argument Visibility: default -->
<element name="TGroupResource.SetCustomItemDataStream.aStream">
<short>The custom stream to use as the underlying ItemData stream</short>
</element>
<!-- property Visibility: public -->
<element name="TGroupResource.ItemData">
<short>Resource data as an ICO/CUR stream</short>
<descr>
<p>This property gives access to resource data in a (ICO or CUR) file-like stream, unlike <link id="resource.TAbstractResource.RawData">RawData</link>.</p>
<p>The exact format of the stream (ico or cur) is determined by the descendant class of <link id="TGroupResource"/> that is used.</p>
<p>ItemData does not create a copy of <link id="resource.TAbstractResource.RawData">RawData</link> so memory usage is generally kept limited.</p>
<p>You can also set a custom stream as the underlying stream for ItemData via <link id="TGroupResource.SetCustomItemDataStream">SetCustomItemDataStream</link>, much like <link id="resource.TAbstractResource.SetCustomRawDataStream">SetCustomRawDataStream</link> does for <link id="resource.TAbstractResource.RawData">RawData</link>. This is useful when you want a <link id="groupiconresource.TGroupIconResource">TGroupIconResource</link> or <link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link> to be created from a ico or cur file for which you have a stream.</p>
<remark>If you need to access <link id="resource.TAbstractResource.RawData">RawData</link> after you modified ItemData, be sure to call <link id="resource.TAbstractResource.UpdateRawData">UpdateRawData</link> first. This isn't needed however when resource is written to a stream, since <link id="resource.TResources">TResources</link> takes care of it.</remark>
</descr>
<seealso>
<link id="TGroupResource.SetCustomItemDataStream"/>
<link id="groupiconresource.TGroupIconResource">TGroupIconResource</link>
<link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>
<link id="resource.TAbstractResource.RawData">TAbstractResource.RawData</link>
<link id="resource.TAbstractResource.UpdateRawData">TAbstractResource.UpdateRawData</link>
</seealso>
</element>
<!-- object Visibility: default -->
<element name="TGroupCachedDataStream">
<short>Cached stream for group classes</short>
<descr>
<p>This class is used by <link id="TGroupResource"/> descendants to provide an .ico/.cur like stream.</p>
<p>Unlike <link id="resdatastream.TCachedResourceDataStream">TCachedResourceDataStream</link>, which provides a stream-like interface over a portion of another stream, this class lets multiple stream to be seen as one: this way, several <link id="resource.RT_ICON">RT_ICON</link> or <link id="resource.RT_CURSOR">RT_CURSOR</link> resources can appear like a single .ico or .cur file.</p>
</descr>
<seealso>
<link id="TGroupResource"/>
<link id="groupiconresource.TGroupIconResource">TGroupIconResource</link>
<link id="groupcursorresource.TGroupCursorResource">TGroupCursorResource</link>
<link id="resdatastream.TCachedDataStream">TCachedDataStream</link>
<link id="resdatastream.TCachedResourceDataStream">TCachedResourceDataStream</link>
</seealso>
</element>
</module> <!-- groupresource -->
</package>
</fpdoc-descriptions>