CongEditorNode

CongEditorNode

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── CongEditorNode
        ╰── CongEditorNodeElement

Description

Functions

CONG_EDITOR_NODE()

#define CONG_EDITOR_NODE(obj)         G_TYPE_CHECK_INSTANCE_CAST (obj, CONG_EDITOR_NODE_TYPE, CongEditorNode)


CONG_EDITOR_NODE_CLASS()

#define CONG_EDITOR_NODE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CONG_EDITOR_NODE_TYPE, CongEditorNodeClass)


IS_CONG_EDITOR_NODE()

#define IS_CONG_EDITOR_NODE(obj)      G_TYPE_CHECK_INSTANCE_TYPE (obj, CONG_EDITOR_NODE_TYPE)


cong_editor_node_construct ()

CongEditorNode *
cong_editor_node_construct (CongEditorNode *editor_node,
                            CongEditorWidget3 *widget,
                            CongTraversalNode *traversal_node);

TODO: Write me


cong_editor_node_manufacture ()

CongEditorNode *
cong_editor_node_manufacture (CongEditorWidget3 *widget,
                              CongTraversalNode *traversal_node);

TODO: Write me


cong_editor_node_get_widget ()

CongEditorWidget3 *
cong_editor_node_get_widget (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_document ()

CongDocument *
cong_editor_node_get_document (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_node ()

CongNodePtr
cong_editor_node_get_node (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_traversal_node ()

CongTraversalNode *
cong_editor_node_get_traversal_node (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_traversal_parent ()

CongEditorNode *
cong_editor_node_get_traversal_parent (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_is_selected ()

gboolean
cong_editor_node_is_selected (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_private_set_selected ()

void
cong_editor_node_private_set_selected (CongEditorNode *editor_node,
                                       gboolean is_selected);

TODO: Write me


cong_editor_node_generate_block_area ()

CongEditorArea *
cong_editor_node_generate_block_area (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_generate_line_areas_recursive ()

CongEditorLineFragments *
cong_editor_node_generate_line_areas_recursive
                               (CongEditorNode *editor_node,
                                gint line_width,
                                gint initial_indent);

TODO: Write me


cong_editor_node_line_regeneration_required ()

void
cong_editor_node_line_regeneration_required
                               (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_is_referenced_entity_decl ()

gboolean
cong_editor_node_is_referenced_entity_decl
                               (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_prev ()

CongEditorNode *
cong_editor_node_get_prev (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_next ()

CongEditorNode *
cong_editor_node_get_next (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_get_child_policy ()

CongEditorChildPolicy *
cong_editor_node_get_child_policy (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_set_child_policy ()

void
cong_editor_node_set_child_policy (CongEditorNode *editor_node,
                                   CongEditorChildPolicy *child_policy);

TODO: Write me


cong_editor_node_get_parents_child_policy ()

CongEditorChildPolicy *
cong_editor_node_get_parents_child_policy
                               (CongEditorNode *editor_node);

TODO: Write me


cong_editor_node_set_parents_child_policy ()

void
cong_editor_node_set_parents_child_policy
                               (CongEditorNode *editor_node,
                                CongEditorChildPolicy *child_policy);

TODO: Write me

Types and Values

DEBUG_EDITOR_NODE_LIFETIMES

#define DEBUG_EDITOR_NODE_LIFETIMES 0


CongEditorNode

typedef struct _CongEditorNode CongEditorNode;

A CongEditorNode is a per-editor-widget GObject, and represents a node that is visited in a traversal of the xml tree. Hence there is generally a 1-1 mapping between xml nodes and CongEditorNodes. When an xmlnode is added or removed from the tree, even temporarily, then a corresponding CongEditorNode is added/removed.

However. if you have an entity ref, then the nodes below the entity decls get visited multiple times in a traversal, hence there are multiple CongEditorNodes for such nodes, one for below the entity decl, and one below every entity ref.

In order to support this every editor node know both which xml node it represents, and which "traversal parent" it has. So although it is generally the case that the traversal parent is the parent of the xml node, it is NOT always the case.

The motivating example is for the immediate children of entity references, for which the parent of the xml node is the entity declaration, not the entity reference. In this case, the traversal parent IS the entity reference node.

The traversal parent is stored as a pointer to the relevant CongEditorNode, rather than a CongNodePtr.


enum CongFlowType

Members

CONG_FLOW_TYPE_BLOCK

   

CONG_FLOW_TYPE_INLINE

   

Signal Details

The “is-selected-changed” signal

void
user_function (CongEditorNode *congeditornode,
               gpointer        user_data)

Parameters

congeditornode

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “line-regeneration-required” signal

void
user_function (CongEditorNode *congeditornode,
               gpointer        user_data)

Parameters

congeditornode

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First