![]() |
![]() |
![]() |
Conglomerate Programmer's Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define DEBUG_EDITOR_NODE_LIFETIMES CongEditorNode; #define CONG_EDITOR_NODE (obj) #define CONG_EDITOR_NODE_CLASS (klass) #define IS_CONG_EDITOR_NODE (obj) enum CongFlowType; CongEditorNode * cong_editor_node_construct (CongEditorNode *editor_node
,CongEditorWidget3 *widget
,CongTraversalNode *traversal_node
); CongEditorNode * cong_editor_node_manufacture (CongEditorWidget3 *widget
,CongTraversalNode *traversal_node
); CongEditorWidget3 * cong_editor_node_get_widget (CongEditorNode *editor_node
); CongDocument * cong_editor_node_get_document (CongEditorNode *editor_node
); CongNodePtr cong_editor_node_get_node (CongEditorNode *editor_node
); CongTraversalNode * cong_editor_node_get_traversal_node (CongEditorNode *editor_node
); CongEditorNode * cong_editor_node_get_traversal_parent (CongEditorNode *editor_node
); gboolean cong_editor_node_is_selected (CongEditorNode *editor_node
); void cong_editor_node_private_set_selected (CongEditorNode *editor_node
,gboolean is_selected
); CongEditorArea * cong_editor_node_generate_block_area (CongEditorNode *editor_node
); CongEditorLineFragments * cong_editor_node_generate_line_areas_recursive (CongEditorNode *editor_node
,gint line_width
,gint initial_indent
); void cong_editor_node_line_regeneration_required (CongEditorNode *editor_node
); gboolean cong_editor_node_is_referenced_entity_decl (CongEditorNode *editor_node
); CongEditorNode * cong_editor_node_get_prev (CongEditorNode *editor_node
); CongEditorNode * cong_editor_node_get_next (CongEditorNode *editor_node
); CongEditorChildPolicy * cong_editor_node_get_child_policy (CongEditorNode *editor_node
); void cong_editor_node_set_child_policy (CongEditorNode *editor_node
,CongEditorChildPolicy *child_policy
); CongEditorChildPolicy * cong_editor_node_get_parents_child_policy (CongEditorNode *editor_node
); void cong_editor_node_set_parents_child_policy (CongEditorNode *editor_node
,CongEditorChildPolicy *child_policy
);
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.
#define CONG_EDITOR_NODE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, CONG_EDITOR_NODE_TYPE, CongEditorNode)
#define CONG_EDITOR_NODE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, CONG_EDITOR_NODE_TYPE, CongEditorNodeClass)
#define IS_CONG_EDITOR_NODE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, CONG_EDITOR_NODE_TYPE)
CongEditorNode * cong_editor_node_construct (CongEditorNode *editor_node
,CongEditorWidget3 *widget
,CongTraversalNode *traversal_node
);
TODO: Write me
CongEditorNode * cong_editor_node_manufacture (CongEditorWidget3 *widget
,CongTraversalNode *traversal_node
);
TODO: Write me
CongEditorWidget3 * cong_editor_node_get_widget (CongEditorNode *editor_node
);
TODO: Write me
CongDocument * cong_editor_node_get_document (CongEditorNode *editor_node
);
TODO: Write me
CongNodePtr cong_editor_node_get_node (CongEditorNode *editor_node
);
TODO: Write me
CongTraversalNode * cong_editor_node_get_traversal_node (CongEditorNode *editor_node
);
TODO: Write me
CongEditorNode * cong_editor_node_get_traversal_parent
(CongEditorNode *editor_node
);
TODO: Write me
gboolean cong_editor_node_is_selected (CongEditorNode *editor_node
);
TODO: Write me
void cong_editor_node_private_set_selected (CongEditorNode *editor_node
,gboolean is_selected
);
TODO: Write me
CongEditorArea * cong_editor_node_generate_block_area
(CongEditorNode *editor_node
);
TODO: Write me
CongEditorLineFragments * cong_editor_node_generate_line_areas_recursive (CongEditorNode *editor_node
,gint line_width
,gint initial_indent
);
TODO: Write me
void cong_editor_node_line_regeneration_required
(CongEditorNode *editor_node
);
TODO: Write me
gboolean cong_editor_node_is_referenced_entity_decl
(CongEditorNode *editor_node
);
Entity decls can be visited in the tree both below the DTD node, and below each entity ref node that references them. This function returns TRUE iff the editor_node represents the latter case. This is useful e.g. if you want to know the "effective siblings" of the node, which should be the other entity decls in the former case, and should be NULL in the latter case.
CongEditorNode * cong_editor_node_get_prev (CongEditorNode *editor_node
);
TODO: Write me
CongEditorNode * cong_editor_node_get_next (CongEditorNode *editor_node
);
TODO: Write me
CongEditorChildPolicy * cong_editor_node_get_child_policy
(CongEditorNode *editor_node
);
TODO: Write me
void cong_editor_node_set_child_policy (CongEditorNode *editor_node
,CongEditorChildPolicy *child_policy
);
TODO: Write me
CongEditorChildPolicy * cong_editor_node_get_parents_child_policy
(CongEditorNode *editor_node
);
TODO: Write me
void cong_editor_node_set_parents_child_policy (CongEditorNode *editor_node
,CongEditorChildPolicy *child_policy
);
TODO: Write me
"is-selected-changed"
signalvoid user_function (CongEditorNode *congeditornode,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"line-regeneration-required"
signalvoid user_function (CongEditorNode *congeditornode,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |