📄 atkrelation.xml
字号:
<refentry id="AtkRelation"><refmeta><refentrytitle>AtkRelation</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>ATK Library</refmiscinfo></refmeta><refnamediv><refname>AtkRelation</refname><refpurpose>An object used to describe a relation between a object and one or moreother objects.</refpurpose></refnamediv><refsynopsisdiv><title>Synopsis</title><synopsis>struct <link linkend="AtkRelation-struct">AtkRelation</link>;enum <link linkend="AtkRelationType">AtkRelationType</link>;<link linkend="AtkRelationType">AtkRelationType</link> <link linkend="atk-relation-type-register">atk_relation_type_register</link> (const <link linkend="gchar">gchar</link> *name);G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="atk-relation-type-get-name">atk_relation_type_get_name</link> (<link linkend="AtkRelationType">AtkRelationType</link> type);<link linkend="AtkRelationType">AtkRelationType</link> <link linkend="atk-relation-type-for-name">atk_relation_type_for_name</link> (const <link linkend="gchar">gchar</link> *name);<link linkend="AtkRelation">AtkRelation</link>* <link linkend="atk-relation-new">atk_relation_new</link> (<link linkend="AtkObject">AtkObject</link> **targets, <link linkend="gint">gint</link> n_targets, <link linkend="AtkRelationType">AtkRelationType</link> relationship);<link linkend="AtkRelationType">AtkRelationType</link> <link linkend="atk-relation-get-relation-type">atk_relation_get_relation_type</link> (<link linkend="AtkRelation">AtkRelation</link> *relation);<link linkend="GPtrArray">GPtrArray</link>* <link linkend="atk-relation-get-target">atk_relation_get_target</link> (<link linkend="AtkRelation">AtkRelation</link> *relation);</synopsis></refsynopsisdiv><refsect1><title>Object Hierarchy</title><synopsis> <link linkend="GObject">GObject</link> +----AtkRelation</synopsis></refsect1><refsect1><title>Properties</title><synopsis> "<link linkend="AtkRelation--relation-type">relation-type</link>" <link linkend="AtkRelationType">AtkRelationType</link> : Read / Write "<link linkend="AtkRelation--target">target</link>" <link linkend="GValueArray">GValueArray</link> : Read / Write</synopsis></refsect1><refsect1><title>Description</title><para>An AtkRelation describes a relation between an object and one or moreother objects. The actual relations that an object has with other objectsare defined as an AtkRelationSet, which is a set of AtkRelations.</para></refsect1><refsect1><title>Details</title><refsect2><title><anchor id="AtkRelation-struct"/>struct AtkRelation</title><indexterm><primary>AtkRelation</primary></indexterm><programlisting>struct AtkRelation;</programlisting><para>The AtkRelation structure should not be accessed directly.</para></refsect2><refsect2><title><anchor id="AtkRelationType"/>enum AtkRelationType</title><indexterm><primary>AtkRelationType</primary></indexterm><programlisting>typedef enum{ ATK_RELATION_NULL = 0, ATK_RELATION_CONTROLLED_BY, ATK_RELATION_CONTROLLER_FOR, ATK_RELATION_LABEL_FOR, ATK_RELATION_LABELLED_BY, ATK_RELATION_MEMBER_OF, ATK_RELATION_NODE_CHILD_OF, ATK_RELATION_FLOWS_TO, ATK_RELATION_FLOWS_FROM, ATK_RELATION_SUBWINDOW_OF, ATK_RELATION_EMBEDS, ATK_RELATION_EMBEDDED_BY, ATK_RELATION_POPUP_FOR, ATK_RELATION_LAST_DEFINED} AtkRelationType;</programlisting><para>Describes the type of the relation</para><para></para><variablelist role="enum"><varlistentry><term><literal>ATK_RELATION_NULL</literal></term><listitem><simpara></simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_CONTROLLED_BY</literal></term><listitem><simpara> Indicates an object controlled by one or more target objects.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_CONTROLLER_FOR</literal></term><listitem><simpara> Indicates an object is an controller for one or more target objects.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_LABEL_FOR</literal></term><listitem><simpara> Indicates an object is a label for one or more target objects.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_LABELLED_BY</literal></term><listitem><simpara> Indicates an object is labelled by one or more target objects.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_MEMBER_OF</literal></term><listitem><simpara> Indicates an object is a member of a group of one or more target objects.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_NODE_CHILD_OF</literal></term><listitem><simpara> Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_FLOWS_TO</literal></term><listitem><simpara> Indicates that the object has content that flows logically to another AtkObject in a sequential way, (for instance text-flow).</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_FLOWS_FROM</literal></term><listitem><simpara> Indicates that the object has content that flows logically from another AtkObject in a sequential way, (for instance text-flow).</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_SUBWINDOW_OF</literal></term><listitem><simpara> [not sure about this one, ask Peter]</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_EMBEDS</literal></term><listitem><simpara> Indicates that the object visually embeds another object's content, i.e. this object's content flows around another's content.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_EMBEDDED_BY</literal></term><listitem><simpara> Inverse of <literal>ATK_RELATION_EMBEDS</literal>, indicates that this object's content is visualy embedded in another object.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_POPUP_FOR</literal></term><listitem><simpara> Indicates that an object is a popup for another object.</simpara></listitem></varlistentry><varlistentry><term><literal>ATK_RELATION_LAST_DEFINED</literal></term><listitem><simpara></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-type-register"/>atk_relation_type_register ()</title><indexterm><primary>atk_relation_type_register</primary></indexterm><programlisting><link linkend="AtkRelationType">AtkRelationType</link> atk_relation_type_register (const <link linkend="gchar">gchar</link> *name);</programlisting><para>Associate <parameter>name</parameter> with a new <link linkend="AtkRelationType"><type>AtkRelationType</type></link></para><para></para><variablelist role="params"><varlistentry><term><parameter>name</parameter> :</term><listitem><simpara> a name string</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> an <link linkend="AtkRelationType"><type>AtkRelationType</type></link> associated with <parameter>name</parameter></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-type-get-name"/>atk_relation_type_get_name ()</title><indexterm><primary>atk_relation_type_get_name</primary></indexterm><programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* atk_relation_type_get_name (<link linkend="AtkRelationType">AtkRelationType</link> type);</programlisting><para>Gets the description string describing the <link linkend="AtkRelationType"><type>AtkRelationType</type></link> <parameter>type</parameter>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>type</parameter> :</term><listitem><simpara> The <link linkend="AtkRelationType"><type>AtkRelationType</type></link> whose name is required</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the string describing the AtkRelationType</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-type-for-name"/>atk_relation_type_for_name ()</title><indexterm><primary>atk_relation_type_for_name</primary></indexterm><programlisting><link linkend="AtkRelationType">AtkRelationType</link> atk_relation_type_for_name (const <link linkend="gchar">gchar</link> *name);</programlisting><para>Get the <link linkend="AtkRelationType"><type>AtkRelationType</type></link> type corresponding to a relation name.</para><para></para><variablelist role="params"><varlistentry><term><parameter>name</parameter> :</term><listitem><simpara> a string which is the (non-localized) name of an ATK relation type.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the <link linkend="AtkRelationType"><type>AtkRelationType</type></link> enumerated type corresponding to the specified name, or <link linkend="ATK-RELATION-NULL-CAPS"><type>ATK_RELATION_NULL</type></link> if no matching relation type is found.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-new"/>atk_relation_new ()</title><indexterm><primary>atk_relation_new</primary></indexterm><programlisting><link linkend="AtkRelation">AtkRelation</link>* atk_relation_new (<link linkend="AtkObject">AtkObject</link> **targets, <link linkend="gint">gint</link> n_targets, <link linkend="AtkRelationType">AtkRelationType</link> relationship);</programlisting><para>Create a new relation for the specified key and the specified listof targets.</para><para></para><variablelist role="params"><varlistentry><term><parameter>targets</parameter> :</term><listitem><simpara> an array of pointers to <link linkend="AtkObjects"><type>AtkObjects</type></link> </simpara></listitem></varlistentry><varlistentry><term><parameter>n_targets</parameter> :</term><listitem><simpara> number of <link linkend="AtkObjects"><type>AtkObjects</type></link> pointed to by <parameter>targets</parameter></simpara></listitem></varlistentry><varlistentry><term><parameter>relationship</parameter> :</term><listitem><simpara> an <link linkend="AtkRelationType"><type>AtkRelationType</type></link> with which to create the new <link linkend="AtkRelation"><type>AtkRelation</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a pointer to a new <link linkend="AtkRelation"><type>AtkRelation</type></link></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-get-relation-type"/>atk_relation_get_relation_type ()</title><indexterm><primary>atk_relation_get_relation_type</primary></indexterm><programlisting><link linkend="AtkRelationType">AtkRelationType</link> atk_relation_get_relation_type (<link linkend="AtkRelation">AtkRelation</link> *relation);</programlisting><para>Gets the type of <parameter>relation</parameter></para><para></para><variablelist role="params"><varlistentry><term><parameter>relation</parameter> :</term><listitem><simpara> an <link linkend="AtkRelation"><type>AtkRelation</type></link> </simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the type of <parameter>relation</parameter></simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-relation-get-target"/>atk_relation_get_target ()</title><indexterm><primary>atk_relation_get_target</primary></indexterm><programlisting><link linkend="GPtrArray">GPtrArray</link>* atk_relation_get_target (<link linkend="AtkRelation">AtkRelation</link> *relation);</programlisting><para>Gets the target list of <parameter>relation</parameter></para><para></para><variablelist role="params"><varlistentry><term><parameter>relation</parameter> :</term><listitem><simpara> an <link linkend="AtkRelation"><type>AtkRelation</type></link></simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the target list of <parameter>relation</parameter></simpara></listitem></varlistentry></variablelist></refsect2></refsect1><refsect1><title>Properties</title><variablelist><varlistentry><term><anchor id="AtkRelation--relation-type"/>"<literal>relation-type</literal>" (<link linkend="AtkRelationType">AtkRelationType</link> : Read / Write)</term><listitem><para>The type of the relation.</para></listitem></varlistentry><varlistentry><term><anchor id="AtkRelation--target"/>"<literal>target</literal>" (<link linkend="GValueArray">GValueArray</link> : Read / Write)</term><listitem><para>An array of the targets for the relation.</para></listitem></varlistentry></variablelist></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -