Commit df6cdceb authored by Etienne Nadji's avatar Etienne Nadji
Browse files

modifié : _modules/pyscribus/pageobjects.html

	modifié :         _modules/pyscribus/styles.html
	modifié :         genindex.html
	modifié :         objects.inv
	modifié :         pyscribus.html
	modifié :         searchindex.js
parent dd45f1fc
This diff is collapsed.
......@@ -814,6 +814,11 @@
<span class="s2">&quot;first-line&quot;</span><span class="p">:</span> <span class="kc">None</span>
<span class="p">}</span>
<span class="bp">self</span><span class="o">.</span><span class="n">listing</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="s2">&quot;char&quot;</span><span class="p">:</span> <span class="kc">None</span>
<span class="p">}</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_quick_setup</span><span class="p">(</span><span class="n">kwargs</span><span class="p">)</span>
<div class="viewcode-block" id="ParagraphStyle.fromxml"><a class="viewcode-back" href="../../pyscribus.html#pyscribus.styles.ParagraphStyle.fromxml">[docs]</a> <span class="k">def</span> <span class="nf">fromxml</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">xml</span><span class="p">):</span>
......@@ -840,25 +845,25 @@
<span class="c1">#--- Lists ------------------------------------------------------</span>
<span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span><span class="p">,</span><span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span><span class="kc">False</span>
<span class="n">is_ul</span><span class="p">,</span><span class="n">is_ol</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span><span class="kc">False</span>
<span class="k">if</span> <span class="p">(</span><span class="n">is_bullet</span> <span class="p">:</span><span class="o">=</span> <span class="n">xml</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Bullet&quot;</span><span class="p">))</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">is_bullet</span> <span class="o">==</span> <span class="s2">&quot;1&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span> <span class="o">=</span> <span class="kc">True</span>
<span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;ul&quot;</span>
<span class="n">is_ul</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="p">(</span><span class="n">is_numeroted</span> <span class="p">:</span><span class="o">=</span> <span class="n">xml</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Numeration&quot;</span><span class="p">))</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">is_numeroted</span> <span class="o">==</span> <span class="s2">&quot;1&quot;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span> <span class="o">=</span> <span class="kc">True</span>
<span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;ol&quot;</span>
<span class="n">is_ol</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span><span class="p">:</span>
<span class="k">if</span> <span class="n">is_ol</span> <span class="ow">and</span> <span class="n">is_ul</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">InsaneSLAValue</span><span class="p">(</span>
<span class="s2">&quot;Style </span><span class="si">{}</span><span class="s2"> is both bullet and numeroted list.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span><span class="p">:</span>
<span class="k">if</span> <span class="p">(</span><span class="n">bullet_char</span> <span class="p">:</span><span class="o">=</span> <span class="n">xml</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;BulletStr&quot;</span><span class="p">))</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># TODO</span>
<span class="k">pass</span>
<span class="k">if</span> <span class="p">(</span><span class="n">bullet_char</span> <span class="p">:</span><span class="o">=</span> <span class="n">xml</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;BulletStr&quot;</span><span class="p">))</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;char&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">bullet_char</span>
<span class="c1">#--- Parent character style -------------------------------------</span>
......@@ -939,13 +944,17 @@
<span class="c1">#--- Lists ------------------------------------------------------</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">InsaneSLAValue</span><span class="p">(</span>
<span class="s2">&quot;Style </span><span class="si">{}</span><span class="s2"> is both bullet and numeroted list.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;ol&quot;</span><span class="p">:</span>
<span class="n">att_seq</span> <span class="o">=</span> <span class="p">[</span><span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">]</span>
<span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;type&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;ul&quot;</span><span class="p">:</span>
<span class="n">att_seq</span> <span class="o">=</span> <span class="p">[</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">for</span> <span class="n">case</span> <span class="ow">in</span> <span class="p">[[</span><span class="s2">&quot;Bullet&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ul</span><span class="p">],</span> <span class="p">[</span><span class="s2">&quot;Numeration&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_ol</span><span class="p">]]:</span>
<span class="n">xml</span><span class="o">.</span><span class="n">attrib</span><span class="p">[</span><span class="n">case</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">bool_to_num</span><span class="p">(</span><span class="n">case</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="n">att_seq</span> <span class="o">=</span> <span class="p">[</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">]</span>
<span class="k">for</span> <span class="n">case</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">att_seq</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;Bullet&quot;</span><span class="p">,</span> <span class="s2">&quot;Numeration&quot;</span><span class="p">]):</span>
<span class="n">xml</span><span class="o">.</span><span class="n">attrib</span><span class="p">[</span><span class="n">case</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">bool_to_num</span><span class="p">(</span><span class="n">case</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<span class="n">xml</span><span class="o">.</span><span class="n">attrib</span><span class="p">[</span><span class="s2">&quot;BulletStr&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">xmlc</span><span class="o">.</span><span class="n">none_or_str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">listing</span><span class="p">[</span><span class="s2">&quot;char&quot;</span><span class="p">])</span>
<span class="c1">#--- Parent character style ---------------------------------</span>
......
......@@ -890,10 +890,14 @@
</li>
<li><a href="pyscribus.html#pyscribus.papers.ansi.Letter">Letter (class in pyscribus.papers.ansi)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pageobjects.PageObject.line_type_xml">line_type_xml (pyscribus.pageobjects.PageObject attribute)</a>
<li><a href="pyscribus.html#pyscribus.pageobjects.PageObject.line_endcap_xml">line_endcap_xml (pyscribus.pageobjects.PageObject attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pageobjects.PageObject.line_join_xml">line_join_xml (pyscribus.pageobjects.PageObject attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pyscribus.html#pyscribus.pageobjects.PageObject.line_type_xml">line_type_xml (pyscribus.pageobjects.PageObject attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.styles.RuleStyleLine.lineend_xml">lineend_xml (pyscribus.styles.RuleStyleLine attribute)</a>
</li>
<li><a href="pyscribus.html#pyscribus.styles.RuleStyleLine.linejoin_xml">linejoin_xml (pyscribus.styles.RuleStyleLine attribute)</a>
......@@ -1302,6 +1306,8 @@
<li><a href="pyscribus.html#pyscribus.notes.NoteFrame.toxml">(pyscribus.notes.NoteFrame method)</a>
</li>
<li><a href="pyscribus.html#pyscribus.notes.NoteText.toxml">(pyscribus.notes.NoteText method)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pageobjects.GroupObject.toxml">(pyscribus.pageobjects.GroupObject method)</a>
</li>
<li><a href="pyscribus.html#pyscribus.pageobjects.HeadersRenderProperty.toxml">(pyscribus.pageobjects.HeadersRenderProperty method)</a>
</li>
......
No preview for this file type
......@@ -2168,6 +2168,21 @@ of defaults available.</p>
</table>
</dd></dl>
<dl class="method">
<dt id="pyscribus.pageobjects.GroupObject.toxml">
<code class="descname">toxml</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyscribus/pageobjects.html#GroupObject.toxml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyscribus.pageobjects.GroupObject.toxml" title="Permalink to this definition"></a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">lxml._Element</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Table object as LXML element</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
......@@ -2507,6 +2522,16 @@ of defaults available.</p>
<code class="descname">image_scaling_type_xml</code><em class="property"> = {'frame': '1', 'free': '0'}</em><a class="headerlink" href="#pyscribus.pageobjects.PageObject.image_scaling_type_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pageobjects.PageObject.line_endcap_xml">
<code class="descname">line_endcap_xml</code><em class="property"> = {'flat': '0', 'round': '32', 'square': '16'}</em><a class="headerlink" href="#pyscribus.pageobjects.PageObject.line_endcap_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pageobjects.PageObject.line_join_xml">
<code class="descname">line_join_xml</code><em class="property"> = {'bevel': '64', 'miter': '0', 'round': '128'}</em><a class="headerlink" href="#pyscribus.pageobjects.PageObject.line_join_xml" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pyscribus.pageobjects.PageObject.line_type_xml">
<code class="descname">line_type_xml</code><em class="property"> = {'dash-dot': 4, 'dash-dot-dot': 5, 'dashed': 2, 'dotted': 3, 'solid': 1}</em><a class="headerlink" href="#pyscribus.pageobjects.PageObject.line_type_xml" title="Permalink to this definition"></a></dt>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment