ui.setorientation.pkg
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PKG 代码 · 共 170 行
PKG
170 行
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.4 $ -->
<refentry id="{@id}">
<refnamediv>
<refname><function>HTML_Progress_UI::setOrientation</function></refname>
<refpurpose>sets the orientation of the progress meter</refpurpose>
</refnamediv>
<refsect1 id="{@id synopsis}">
<title>Synopsis</title>
<refsynopsisdiv>
<refsynopsisdivinfo>
<funcsynopsis>
<funcsynopsisinfo>
require_once 'HTML/Progress/UI.php';
</funcsynopsisinfo>
<funcprototype>
<funcdef>void <function>HTML_Progress_UI::setOrientation</function></funcdef>
<paramdef>integer <parameter>$orient</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdivinfo>
</refsynopsisdiv>
</refsect1>
<refsect1 id="{@id description}">
<title>Description</title>
<para>
This method is used to change orientation of the progress meter in one step.
</para>
<para>
<table frame="all">
<title>It could be:</title>
<tgroup cols="2">
<thead align="center">
<row>
<entry><emphasis>Orientation</emphasis></entry>
<entry><emphasis>Use constant</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry>horizontal </entry>
<entry><constant>HTML_PROGRESS_BAR_HORIZONTAL</constant> </entry>
</row>
<row>
<entry>vertical </entry>
<entry><constant>HTML_PROGRESS_BAR_VERTICAL</constant> </entry>
</row>
<row>
<entry>polygonal (square, rectangle) </entry>
<entry><constant>HTML_PROGRESS_POLYGONAL</constant> </entry>
</row>
<row>
<entry>circle, ellipse </entry>
<entry><constant>HTML_PROGRESS_CIRCLE</constant> </entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 id="{@id parameter}">
<title>Parameter</title>
<para>
<variablelist>
<varlistentry>
<term>
<type>integer</type>
<parameter>$orient</parameter>
</term>
<listitem>
<para>
the new progress meter orientation.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 id="{@id throws}">
<title>Throws</title>
<para>
<table frame="all">
<title>Possible PEAR_Error values</title>
<tgroup cols="4">
<thead>
<row>
<entry>Error level</entry>
<entry>Error code</entry>
<entry>Error message</entry>
<entry>Solution</entry>
</row>
</thead>
<tbody>
<row>
<entry>exception</entry>
<entry><constant>HTML_PROGRESS_ERROR_INVALID_INPUT</constant></entry>
<entry>invalid input, parameter #1 "<parameter>$orient</parameter>" was expecting "integer"</entry>
<entry>Fixed the cast of parameter</entry>
</row>
<row>
<entry>error</entry>
<entry><constant>HTML_PROGRESS_ERROR_INVALID_INPUT</constant></entry>
<entry>invalid input, parameter #1 "<parameter>$orient</parameter>" was expecting "1|2|3|4"</entry>
<entry>Expected one of these constants:
<para>
<orderedlist>
<listitem><constant>HTML_PROGRESS_BAR_HORIZONTAL </constant></listitem>
<listitem><constant>HTML_PROGRESS_BAR_VERTICAL </constant></listitem>
<listitem><constant>HTML_PROGRESS_POLYGONAL </constant></listitem>
<listitem><constant>HTML_PROGRESS_CIRCLE </constant></listitem>
</orderedlist>
</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 id="{@id note}">
<title>Note</title>
<simpara>
( HTML_Progress >= 1.0 )
</simpara>
<para>
<important>
This function can not be called statically.
</important>
</para>
<para>
<caution>
Parameter <emphasis>$orient</emphasis> is an integer which identify only 2 shapes (in version 1.0):
Horizontal and Vertical progress bars.
Polygonal and Circle shapes are available only since version 1.2.0RC1.
</caution>
</para>
</refsect1>
<refsect1 id="{@id see}">
<title>See</title>
<para>
{@tutorial ui.getorientation.pkg}
</para>
</refsect1>
<refsect1 id="{@id example}">
<title>Example</title>
<para>
<simpara>
Example below (that requires HTML_Progress >= 1.2.0RC3) will produced a vertical progress bar
(see line 11) with only 6 cells. It's a dynamic example, the progress bar will run.
</simpara>
<figure>
<graphic fileref="../media/screenshots/vertical1.png"></graphic>
</figure>
<example>
{@example setorientation.php}
</example>
</para>
</refsect1>
</refentry>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?