summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-atkvalue.xml
blob: c14e89bf5cc86030ccac2cd4a91bff4abda3b5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-atkvalue">

  <refnamediv>
    <refname>atk.Value</refname>
      <refpurpose>the ATK interface implemented by valuators and components
      which display or select a value from a bounded range of values.
      </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>atk.Value</classname></ooclass>
      <ooclass><classname>gobject.GInterface</classname></ooclass>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkvalue--get-current-value">get_current_value</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkvalue--get-maximum-value">get_maximum_value</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkvalue--get-minimum-value">get_minimum_value</link></methodname>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-atkvalue--set-current-value">set_current_value</link></methodname>
        <methodparam><parameter role="keyword">value</parameter></methodparam>
      </methodsynopsis>
</classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para><link
    linkend="class-atkvalue"><classname>atk.Value</classname></link> should
    be implemented for components which either display a value from a
    bounded range, or which allow the user to specify a value from a bounded
    range, or both.  For instance, most sliders and range controls, as well
    as dials, should have <link
    linkend="class-atkobject"><classname>atk.Object</classname></link>
    representations which implement <link
    linkend="class-atkvalue"><classname>atk.Value</classname></link> on the
    component's behalf.  <link
    linkend="class-atkvalue"><classname>atk.Value</classname></link> objects
    may be read-only, in which case attempts to alter the value return
    <literal>False</literal> to indicate failure.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-atkvalue--get-current-value">
      <title>atk.Value.get_current_value</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_current_value</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the current accessible
          value</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the value of this object.</para>

    </refsect2>

    <refsect2 id="method-atkvalue--get-maximum-value">
      <title>atk.Value.get_maximum_value</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_maximum_value</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the maximum accessible
          value</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the maximum value of this object.</para>

    </refsect2>

    <refsect2 id="method-atkvalue--get-minimum-value">
      <title>atk.Value.get_minimum_value</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_minimum_value</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara> the minimum accessible
          value</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Gets the minimum value of this object.</para>

    </refsect2>

    <refsect2 id="method-atkvalue--set-current-value">
      <title>atk.Value.set_current_value</title>

      <programlisting><methodsynopsis language="python">
        <methodname>set_current_value</methodname>
        <methodparam><parameter role="keyword">value</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">value</parameter>&nbsp;:</term>
          <listitem><simpara>the desired new accessible
          value.</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if new value is
          successfully set, <literal>False</literal>
          otherwise.</simpara></listitem>
        </varlistentry>
      </variablelist>

      <para>Sets the value of this object.</para>

    </refsect2>

  </refsect1>

</refentry>