diff --git a/Docs/X2Utils-html.xsl b/Docs/X2Utils-html.xsl new file mode 100644 index 0000000..83458e5 --- /dev/null +++ b/Docs/X2Utils-html.xsl @@ -0,0 +1,28 @@ + + + + + html.css + 3 + 0 + + + + + + + + + + + + + + + + + + + diff --git a/Docs/X2Utils-singlehtml.xsl b/Docs/X2Utils-singlehtml.xsl new file mode 100644 index 0000000..13bead2 --- /dev/null +++ b/Docs/X2Utils-singlehtml.xsl @@ -0,0 +1,28 @@ + + + + + html.css + 3 + 0 + + + + + + + + + + + + + + + + + + + diff --git a/Docs/X2Utils.xml b/Docs/X2Utils.xml new file mode 100644 index 0000000..a1767cf --- /dev/null +++ b/Docs/X2Utils.xml @@ -0,0 +1,100 @@ + + + + + + M. + van Renswoude + + + + X²Utils + + + Introduction + +
+ Overview + + X²Utils is an open-source set of utility classes and functions released under the zlib/libpng license, a copy of which is shown below. It's main function is reusability and convenience; anything which is used often deserves a spot in the library, assuming it is written with portability in mind. + + + + The official website for X²Utils is located at http://x2utils.kamadev.net/. Contributions to the source code are appreciated, and after reviewing will be committed to the Subversion repository. + +
+ +
+ Documentation + + The documentation for X²Utils is kept both as in-source comments and external docBook format. The in-source comments can be used in combination with Delphi Component Help Builder to generate reference documentation. The docBook sources must be kept in sync manually, but allow for detailed explanation of the various functions. + +
+ +
+ License + + Copyright (c) 2004 X²Software This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + + + + Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + + + + The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + + + Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + + + This notice may not be removed or altered from any source distribution. + + +
+
+ + + Environment information +
+ X2UtApp.pas + + + Contains a TX2App class which can be initiated as a singleton using the App() function. It provides information related to the application, such as the executable path and version information. + + + + Note that you should not free the return value of the App() function, the unit's finalization clause takes care of destroying the object when the application closes. This makes it suitable to use the App() function in a way similar to Delphi's Application object. + + + + Using the App function + + MyDataFileLocation := App.Path + 'data.ini'; + + + + + The version information is accessible through App.Version. It contains the version numbers and various build flags as specified in the project options. You can also access the version strings through App.Version.Strings, which contain information such as the product name and copyright. + + + + Useful for display purposes is the App.FormatVersion() function. It returns a string with the version information in the format "vX.X.X". If the optional Build parameter is set to True (default), "build X" is appended as well. + +
+ +
+ X2UtOS.pas + + + Similar to X2UtApp.pas, this unit contains a TX2OS class which you can access using the OS() function. It provides information about the Operating System the application currently runs on. + + + + OS.Version is an enumeration of versions recognized by X2UtOS. Extended information if available through OS.VersionEx, and an OS.FormatVersion() is provided for display purposes as well. + +
+
+
\ No newline at end of file diff --git a/Docs/compile-all.bat b/Docs/compile-all.bat new file mode 100644 index 0000000..2dd69c9 --- /dev/null +++ b/Docs/compile-all.bat @@ -0,0 +1,3 @@ +@Echo Off +call compile-html.bat +call compile-singlehtml.bat \ No newline at end of file diff --git a/Docs/compile-html.bat b/Docs/compile-html.bat new file mode 100644 index 0000000..7c8105d --- /dev/null +++ b/Docs/compile-html.bat @@ -0,0 +1,6 @@ +@Echo Off +echo Compiling paged HTML documentation... +cd html +xsltproc ..\X2Utils-html.xsl ..\X2Utils.xml +cd .. +copy html.css html \ No newline at end of file diff --git a/Docs/compile-singlehtml.bat b/Docs/compile-singlehtml.bat new file mode 100644 index 0000000..1161685 --- /dev/null +++ b/Docs/compile-singlehtml.bat @@ -0,0 +1,5 @@ +@Echo Off +echo Compiling single-HTML documentation... +xsltproc X2Utils-singlehtml.xsl X2Utils.xml > singlehtml\index.html +cd .. +copy html.css singlehtml \ No newline at end of file diff --git a/Docs/html.css b/Docs/html.css new file mode 100644 index 0000000..21b51be --- /dev/null +++ b/Docs/html.css @@ -0,0 +1,87 @@ +body +{ + background-color: #ffffff; + color: #000000; + font-family: verdana, tahoma, arial, sans-serif; + font-size: 10pt; +} + +td +{ + font-size: 10pt; +} + +a +{ + background-color: transparent; + color: #000080; + text-decoration: underline; +} + +a:hover +{ + background-color: #f0f0ff; + color: #000080; +} + +h1, h2, h3, h4, h5 +{ + background-color: transparent; + color: #800000; +} + +h3 +{ + font-size: 13pt; + font-weight: bold; +} + +h4 +{ + font-size: 10pt; + font-weight: bold; +} + +span.term +{ + font-weight: bold; +} + +div.sidebar +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + margin: 20px; + padding: 5px; +} + +pre.programlisting +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + font-size: 10pt; + padding: 2px; + white-space: pre; +} + +span.codestring +{ + background-color: transparent; + color: #008000; +} + +dl +{ + margin-top: 0px; +} + +dd +{ + margin-left: 20px; +} \ No newline at end of file diff --git a/Docs/html/ch01.html b/Docs/html/ch01.html new file mode 100644 index 0000000..88b0906 --- /dev/null +++ b/Docs/html/ch01.html @@ -0,0 +1,5 @@ +Chapter 1. Introduction

Chapter 1. Introduction

Table of Contents

Overview
Documentation
License

Overview

+ X²Utils is an open-source set of utility classes and functions released under the zlib/libpng license, a copy of which is shown below. It's main function is reusability and convenience; anything which is used often deserves a spot in the library, assuming it is written with portability in mind. +

+ The official website for X²Utils is located at http://x2utils.kamadev.net/. Contributions to the source code are appreciated, and after reviewing will be committed to the Subversion repository. +

diff --git a/Docs/html/ch01s02.html b/Docs/html/ch01s02.html new file mode 100644 index 0000000..abc4e95 --- /dev/null +++ b/Docs/html/ch01s02.html @@ -0,0 +1,3 @@ +Documentation

Documentation

+ The documentation for X²Utils is kept both as in-source comments and external docBook format. The in-source comments can be used in combination with Delphi Component Help Builder to generate reference documentation. The docBook sources must be kept in sync manually, but allow for detailed explanation of the various functions. +

diff --git a/Docs/html/ch01s03.html b/Docs/html/ch01s03.html new file mode 100644 index 0000000..9df3ef2 --- /dev/null +++ b/Docs/html/ch01s03.html @@ -0,0 +1,11 @@ +License

License

+ Copyright (c) 2004 X²Software

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +

+ Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +

  1. + The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +
  2. + Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +
  3. + This notice may not be removed or altered from any source distribution. +
diff --git a/Docs/html/ch02.html b/Docs/html/ch02.html new file mode 100644 index 0000000..b838bb3 --- /dev/null +++ b/Docs/html/ch02.html @@ -0,0 +1,11 @@ +Chapter 2. Environment information

Chapter 2. Environment information

Table of Contents

X2UtApp.pas
X2UtOS.pas

X2UtApp.pas

+ Contains a TX2App class which can be initiated as a singleton using the App() function. It provides information related to the application, such as the executable path and version information. +

+ Note that you should not free the return value of the App() function, the unit's finalization clause takes care of destroying the object when the application closes. This makes it suitable to use the App() function in a way similar to Delphi's Application object. +

Example 2.1. Using the App function

+ MyDataFileLocation := App.Path + 'data.ini'; +

+ The version information is accessible through App.Version. It contains the version numbers and various build flags as specified in the project options. You can also access the version strings through App.Version.Strings, which contain information such as the product name and copyright. +

+ Useful for display purposes is the App.FormatVersion() function. It returns a string with the version information in the format "vX.X.X". If the optional Build parameter is set to True (default), "build X" is appended as well. +

diff --git a/Docs/html/ch02s02.html b/Docs/html/ch02s02.html new file mode 100644 index 0000000..008c7d9 --- /dev/null +++ b/Docs/html/ch02s02.html @@ -0,0 +1,5 @@ +X2UtOS.pas

X2UtOS.pas

+ Similar to X2UtApp.pas, this unit contains a TX2OS class which you can access using the OS() function. It provides information about the Operating System the application currently runs on. +

+ OS.Version is an enumeration of versions recognized by X2UtOS. Extended information if available through OS.VersionEx, and an OS.FormatVersion() is provided for display purposes as well. +

diff --git a/Docs/html/html.css b/Docs/html/html.css new file mode 100644 index 0000000..21b51be --- /dev/null +++ b/Docs/html/html.css @@ -0,0 +1,87 @@ +body +{ + background-color: #ffffff; + color: #000000; + font-family: verdana, tahoma, arial, sans-serif; + font-size: 10pt; +} + +td +{ + font-size: 10pt; +} + +a +{ + background-color: transparent; + color: #000080; + text-decoration: underline; +} + +a:hover +{ + background-color: #f0f0ff; + color: #000080; +} + +h1, h2, h3, h4, h5 +{ + background-color: transparent; + color: #800000; +} + +h3 +{ + font-size: 13pt; + font-weight: bold; +} + +h4 +{ + font-size: 10pt; + font-weight: bold; +} + +span.term +{ + font-weight: bold; +} + +div.sidebar +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + margin: 20px; + padding: 5px; +} + +pre.programlisting +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + font-size: 10pt; + padding: 2px; + white-space: pre; +} + +span.codestring +{ + background-color: transparent; + color: #008000; +} + +dl +{ + margin-top: 0px; +} + +dd +{ + margin-left: 20px; +} \ No newline at end of file diff --git a/Docs/html/index.html b/Docs/html/index.html new file mode 100644 index 0000000..0b1380c --- /dev/null +++ b/Docs/html/index.html @@ -0,0 +1 @@ +X²Utils

X²Utils

M. van Renswoude


Table of Contents

1. Introduction
Overview
Documentation
License
2. Environment information
X2UtApp.pas
X2UtOS.pas

List of Examples

2.1. Using the App function
diff --git a/Docs/readme.txt b/Docs/readme.txt new file mode 100644 index 0000000..89696db --- /dev/null +++ b/Docs/readme.txt @@ -0,0 +1,13 @@ +To build the documentation: + +- Download the docBook XSL stylesheets from: + http://docbook.sourceforge.net/projects/xsl/index.html + +- Download XSLTProc, Windows version available at: + http://www.zlatkovic.com/libxml.en.html + +- Modify the XSL files and point the include directive + to the path where you extracted the docBook files. + +- Run compile-html-chunk.bat for the multi-page output or + compile-html.bat for a single-page output. \ No newline at end of file diff --git a/Docs/singlehtml/html.css b/Docs/singlehtml/html.css new file mode 100644 index 0000000..21b51be --- /dev/null +++ b/Docs/singlehtml/html.css @@ -0,0 +1,87 @@ +body +{ + background-color: #ffffff; + color: #000000; + font-family: verdana, tahoma, arial, sans-serif; + font-size: 10pt; +} + +td +{ + font-size: 10pt; +} + +a +{ + background-color: transparent; + color: #000080; + text-decoration: underline; +} + +a:hover +{ + background-color: #f0f0ff; + color: #000080; +} + +h1, h2, h3, h4, h5 +{ + background-color: transparent; + color: #800000; +} + +h3 +{ + font-size: 13pt; + font-weight: bold; +} + +h4 +{ + font-size: 10pt; + font-weight: bold; +} + +span.term +{ + font-weight: bold; +} + +div.sidebar +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + margin: 20px; + padding: 5px; +} + +pre.programlisting +{ + background-color: #f0f0f0; + border-color: gray; + border-style: solid; + border-width: 1px; + color: #000000; + font-size: 10pt; + padding: 2px; + white-space: pre; +} + +span.codestring +{ + background-color: transparent; + color: #008000; +} + +dl +{ + margin-top: 0px; +} + +dd +{ + margin-left: 20px; +} \ No newline at end of file diff --git a/Docs/singlehtml/index.html b/Docs/singlehtml/index.html new file mode 100644 index 0000000..7566fa0 --- /dev/null +++ b/Docs/singlehtml/index.html @@ -0,0 +1,31 @@ +X²Utils

X²Utils

M. van Renswoude


Table of Contents

1. Introduction
Overview
Documentation
License
2. Environment information
X2UtApp.pas
X2UtOS.pas

List of Examples

2.1. Using the App function

Chapter 1. Introduction

Overview

+ X²Utils is an open-source set of utility classes and functions released under the zlib/libpng license, a copy of which is shown below. It's main function is reusability and convenience; anything which is used often deserves a spot in the library, assuming it is written with portability in mind. +

+ The official website for X²Utils is located at http://x2utils.kamadev.net/. Contributions to the source code are appreciated, and after reviewing will be committed to the Subversion repository. +

Documentation

+ The documentation for X²Utils is kept both as in-source comments and external docBook format. The in-source comments can be used in combination with Delphi Component Help Builder to generate reference documentation. The docBook sources must be kept in sync manually, but allow for detailed explanation of the various functions. +

License

+ Copyright (c) 2004 X²Software

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +

+ Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +

  1. + The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +
  2. + Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +
  3. + This notice may not be removed or altered from any source distribution. +

Chapter 2. Environment information

Table of Contents

X2UtApp.pas
X2UtOS.pas

X2UtApp.pas

+ Contains a TX2App class which can be initiated as a singleton using the App() function. It provides information related to the application, such as the executable path and version information. +

+ Note that you should not free the return value of the App() function, the unit's finalization clause takes care of destroying the object when the application closes. This makes it suitable to use the App() function in a way similar to Delphi's Application object. +

Example 2.1. Using the App function

+ MyDataFileLocation := App.Path + 'data.ini'; +

+ The version information is accessible through App.Version. It contains the version numbers and various build flags as specified in the project options. You can also access the version strings through App.Version.Strings, which contain information such as the product name and copyright. +

+ Useful for display purposes is the App.FormatVersion() function. It returns a string with the version information in the format "vX.X.X". If the optional Build parameter is set to True (default), "build X" is appended as well. +

X2UtOS.pas

+ Similar to X2UtApp.pas, this unit contains a TX2OS class which you can access using the OS() function. It provides information about the Operating System the application currently runs on. +

+ OS.Version is an enumeration of versions recognized by X2UtOS. Extended information if available through OS.VersionEx, and an OS.FormatVersion() is provided for display purposes as well. +