ui.setborderattributes.pkg

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PKG 代码 · 共 164 行

PKG
164
字号
<?xml version="1.0" encoding="iso-8859-1" ?>
<!-- $Revision: 1.4 $ -->

<refentry id="{@id}">

 <refnamediv>
  <refname><function>HTML_Progress_UI::setBorderAttributes</function></refname>
  <refpurpose>defines look and feel of the progress bar border</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::setBorderAttributes</function></funcdef>
     <paramdef>mixed <parameter>$attributes</parameter></paramdef>
    </funcprototype>
   </funcsynopsis>
  </refsynopsisdivinfo>
 </refsynopsisdiv>
 </refsect1>

 <refsect1 id="{@id description}">
  <title>Description</title>
  <para>
   This method is used to give a look and feel, such as size, style and color, 
   to the border of a progress meter.
  </para>
  <para>
   <emphasis>$attributes</emphasis> is an associative array or string of HTML tag attributes.
  </para>
 </refsect1>

 <refsect1 id="{@id parameter}">
  <title>Parameter</title>
  <para>
   <variablelist>
    <varlistentry>
     <term>
      <type>mixed</type>
      <parameter>$attributes</parameter>
     </term>
     <listitem>
      <para>
       the new border attributes of the progress meter.
      </para>
      <para>
       <table frame="all">
        <title>Key-values allowed are:</title>
        <tgroup cols="3">
        <thead align="center">
          <row>
           <entry><emphasis>Attribute</emphasis></entry>
           <entry><emphasis>Format</emphasis></entry>
           <entry><emphasis>Default value</emphasis></entry>
          </row>
        </thead>
        <tbody>
         <row>
          <entry>class </entry>
          <entry>string </entry>
          <entry>progressBarBorder </entry>
         </row>
         <row>
          <entry>width </entry>
          <entry>integer </entry>
          <entry>0 </entry>
         </row>
         <row>
          <entry>style </entry>
          <entry>string </entry>
          <entry>solid </entry>
         </row>
         <row>
          <entry>color </entry>
          <entry>string </entry>
          <entry>#000000 </entry>
         </row>
        </tbody>
        </tgroup>
       </table>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </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>
   <tip>
    You may also used an existing StyleSheet and a CSS class-selector with pre-defined style.
    For example:
    <para>
    <programlisting role="php">
    <![CDATA[
<?php
require_once 'HTML/Progress.php';

$bar = new HTML_Progress();
// specify a user-ident (instead of the auto-generated value)
$bar->setIdent('PB1');  

$ui =& $bar->getUI();
$ui->setBorderAttributes('class="myProgressBorder"');
?>
    ]]>
    </programlisting>
    could be replaced by:
    <screen>
&lt;style type="text/css">
&lt;!--
.PB1 .myProgressBar { border: 3px dotted #0000FF; }
// -->
&lt;/style>
    </screen>
   </para>
   <para>
    <graphic fileref="../media/screenshots/border3.png"></graphic>
   </para>
  </tip>
  </para>
 </refsect1>

 <refsect1 id="{@id see}">
  <title>See</title>
  <para>
   {@tutorial ui.getborderattributes.pkg},
   {@tutorial progress.setborderpainted.pkg}
  </para>
 </refsect1>

 <refsect1 id="{@id example}">
  <title>Example</title>
  <para>
   <simpara>
    Example below will produced a progress bar with a solid navy border.
    It's a static example, the progress bar will not run.
   </simpara>
   <figure>
    <graphic fileref="../media/screenshots/border2.png"></graphic>
   </figure>
   <example>
    {@example setborderattributes.php}
   </example>
  </para>
 </refsect1>

</refentry>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?