atkmm 2.36.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Atk::Relation Class Reference

An Atk::Relation describes a relation between an object and one or more other objects. More...

#include <atkmm/relation.h>

Inheritance diagram for Atk::Relation:
Inheritance graph
[legend]

Public Types

enum class  Type {
  NONE ,
  CONTROLLED_BY ,
  CONTROLLER_FOR ,
  LABEL_FOR ,
  LABELLED_BY ,
  MEMBER_OF ,
  NODE_CHILD_OF ,
  FLOWS_TO ,
  FLOWS_FROM ,
  SUBWINDOW_OF ,
  EMBEDS ,
  EMBEDDED_BY ,
  POPUP_FOR ,
  PARENT_WINDOW_OF ,
  DESCRIBED_BY ,
  DESCRIPTION_FOR ,
  NODE_PARENT_OF ,
  DETAILS ,
  DETAILS_FOR ,
  ERROR_MESSAGE ,
  ERROR_FOR ,
  LAST_DEFINED
}
 

Public Member Functions

 Relation (Relation&& src) noexcept
 
Relationoperator= (Relation&& src) noexcept
 
 ~Relation () noexcept override
 
AtkRelation* gobj ()
 Provides access to the underlying C GObject.
 
const AtkRelation* gobj () const
 Provides access to the underlying C GObject.
 
AtkRelation* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
Type get_relation_type () const
 Gets the type of relation.
 
std::vector< Glib::RefPtr< Atk::Object > > get_target ()
 
std::vector< Glib::RefPtr< const Atk::Object > > get_target () const
 
void add_target (const Glib::RefPtr< Atk::Object >& target)
 Adds the specified AtkObject to the target for the relation, if it is not already present.
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 
static Glib::RefPtr< Relationcreate (const std::vector< Glib::RefPtr< Atk::Object > >& targets, Type relationship=Type::NONE)
 

Protected Member Functions

 Relation (const std::vector< Glib::RefPtr< Atk::Object > >& targets, Relation::Type relationship)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Atk::Relationwrap (AtkRelation* object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Detailed Description

An Atk::Relation describes a relation between an object and one or more other objects.

The actual relations that an object has with other objects are defined as an Atk::RelationSet, which is a set of Atk::Relations.

Member Enumeration Documentation

◆ Type

enum class Atk::Relation::Type
strong
Enumerator
NONE 

Not used, represens "no relationship" or an error condition.

CONTROLLED_BY 

Indicates an object controlled by one or more target objects.

CONTROLLER_FOR 

Indicates an object is an controller for one or more target objects.

LABEL_FOR 

Indicates an object is a label for one or more target objects.

LABELLED_BY 

Indicates an object is labelled by one or more target objects.

MEMBER_OF 

Indicates an object is a member of a group of one or more target objects.

NODE_CHILD_OF 

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.

FLOWS_TO 

Indicates that the object has content that flows logically to another AtkObject in a sequential way, (for instance text-flow).

FLOWS_FROM 

Indicates that the object has content that flows logically from another AtkObject in a sequential way, (for instance text-flow).

SUBWINDOW_OF 

Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.

EMBEDS 

Indicates that the object visually embeds another object's content, i.e.

this object's content flows around another's content.

EMBEDDED_BY 

Reciprocal of Atk::Relation::Type::EMBEDS, indicates that this object's content is visualy embedded in another object.

POPUP_FOR 

Indicates that an object is a popup for another object.

PARENT_WINDOW_OF 

Indicates that an object is a parent window of another object.

DESCRIBED_BY 

Reciprocal of Atk::Relation::Type::DESCRIPTION_FOR.

Indicates that one or more target objects provide descriptive information about this object. This relation type is most appropriate for information that is not essential as its presentation may be user-configurable and/or limited to an on-demand mechanism such as an assistive technology command. For brief, essential information such as can be found in a widget's on-screen label, use Atk::Relation::Type::LABELLED_BY. For an on-screen error message, use Atk::Relation::Type::ERROR_MESSAGE. For lengthy extended descriptive information contained in an on-screen object, consider using Atk::Relation::Type::DETAILS as assistive technologies may provide a means for the user to navigate to objects containing detailed descriptions so that their content can be more closely reviewed.

DESCRIPTION_FOR 

Reciprocal of Atk::Relation::Type::DESCRIBED_BY.

Indicates that this object provides descriptive information about the target object(s). See also Atk::Relation::Type::DETAILS_FOR and Atk::Relation::Type::ERROR_FOR.

NODE_PARENT_OF 

Indicates an object is a cell in a treetable and is expanded to display other cells in the same column.

DETAILS 

Reciprocal of Atk::Relation::Type::DETAILS_FOR.

Indicates that this object has a detailed or extended description, the contents of which can be found in the target object(s). This relation type is most appropriate for information that is sufficiently lengthy as to make navigation to the container of that information desirable. For less verbose information suitable for announcement only, see Atk::Relation::Type::DESCRIBED_BY. If the detailed information describes an error condition, Atk::Relation::Type::ERROR_FOR should be used instead. Since: ATK-2.26.

DETAILS_FOR 

Reciprocal of Atk::Relation::Type::DETAILS.

Indicates that this object provides a detailed or extended description about the target object(s). See also Atk::Relation::Type::DESCRIPTION_FOR and Atk::Relation::Type::ERROR_FOR. Since: ATK-2.26.

ERROR_MESSAGE 

Reciprocal of Atk::Relation::Type::ERROR_FOR.

Indicates that this object has one or more errors, the nature of which is described in the contents of the target object(s). Objects that have this relation type should also contain Atk::StateType::INVALID_ENTRY in their Atk::StateSet. Since: ATK-2.26.

ERROR_FOR 

Reciprocal of Atk::Relation::Type::ERROR_MESSAGE.

Indicates that this object contains an error message describing an invalid condition in the target object(s). Since: ATK_2.26.

LAST_DEFINED 

Not used, this value indicates the end of the enumeration.

Constructor & Destructor Documentation

◆ Relation() [1/2]

Atk::Relation::Relation ( Relation&&  src)
noexcept

◆ ~Relation()

Atk::Relation::~Relation ( )
overridenoexcept

◆ Relation() [2/2]

Atk::Relation::Relation ( const std::vector< Glib::RefPtr< Atk::Object > >&  targets,
Relation::Type  relationship 
)
explicitprotected

Member Function Documentation

◆ add_target()

void Atk::Relation::add_target ( const Glib::RefPtr< Atk::Object >&  target)

Adds the specified AtkObject to the target for the relation, if it is not already present.

See also Atk::Object::add_relationship().

Since atkmm 1.9:
Parameters
targetAn Atk::Object.

◆ create()

static Glib::RefPtr< Relation > Atk::Relation::create ( const std::vector< Glib::RefPtr< Atk::Object > >&  targets,
Type  relationship = Type::NONE 
)
static

◆ get_relation_type()

Type Atk::Relation::get_relation_type ( ) const

Gets the type of relation.

Returns
The type of relation.

◆ get_target() [1/2]

std::vector< Glib::RefPtr< Atk::Object > > Atk::Relation::get_target ( )

◆ get_target() [2/2]

std::vector< Glib::RefPtr< const Atk::Object > > Atk::Relation::get_target ( ) const

◆ get_type()

static GType Atk::Relation::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

AtkRelation * Atk::Relation::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const AtkRelation * Atk::Relation::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

AtkRelation * Atk::Relation::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator=()

Relation& Atk::Relation::operator= ( Relation&&  src)
noexcept

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Atk::Relation > wrap ( AtkRelation *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.