/* Node.c generated by valac 0.56.19, the Vala compiler
 * generated from Node.vala, do not modify */

/*
* Copyright (c) 2018-2026 (https://github.com/phase1geo/Minder)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Trevor Williams <phase1geo@gmail.com>
*/

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>
#include <gdk/gdk.h>
#include <libxml/tree.h>
#include <cairo-gobject.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <pango/pango.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <granite-7.h>
#include <pango/pangocairo.h>
#include <stdio.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

typedef enum  {
	NODE_MODE_NONE = 0,
	NODE_MODE_CURRENT,
	NODE_MODE_SELECTED,
	NODE_MODE_EDITABLE,
	NODE_MODE_ATTACHABLE,
	NODE_MODE_DROPPABLE,
	NODE_MODE_HIGHLIGHTED
} NodeMode;

#define TYPE_NODE_MODE (node_mode_get_type ())
typedef enum  {
	NODE_SIDE_LEFT = 1,
	NODE_SIDE_TOP = 2,
	NODE_SIDE_RIGHT = 4,
	NODE_SIDE_BOTTOM = 8
} NodeSide;

#define TYPE_NODE_SIDE (node_side_get_type ())

#define TYPE_NODE_BOUNDS (node_bounds_get_type ())
#define NODE_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_BOUNDS, NodeBounds))
#define NODE_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_BOUNDS, NodeBoundsClass))
#define IS_NODE_BOUNDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_BOUNDS))
#define IS_NODE_BOUNDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_BOUNDS))
#define NODE_BOUNDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_BOUNDS, NodeBoundsClass))

typedef struct _NodeBounds NodeBounds;
typedef struct _NodeBoundsClass NodeBoundsClass;
typedef struct _NodeBoundsPrivate NodeBoundsPrivate;

#define TYPE_MIND_MAP (mind_map_get_type ())
#define MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MIND_MAP, MindMap))
#define MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MIND_MAP, MindMapClass))
#define IS_MIND_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MIND_MAP))
#define IS_MIND_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MIND_MAP))
#define MIND_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MIND_MAP, MindMapClass))

typedef struct _MindMap MindMap;
typedef struct _MindMapClass MindMapClass;
#define _mind_map_unref0(var) ((var == NULL) ? NULL : (var = (mind_map_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ParamSpecNodeBounds ParamSpecNodeBounds;

#define TYPE_NODE_INFO (node_info_get_type ())
typedef struct _NodeInfo NodeInfo;

#define TYPE_NODE_LINK_INFO (node_link_info_get_type ())
typedef struct _NodeLinkInfo NodeLinkInfo;

#define TYPE_NODE (node_get_type ())
#define NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE, Node))
#define NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE, NodeClass))
#define IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE))
#define IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE))
#define NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE, NodeClass))

typedef struct _Node Node;
typedef struct _NodeClass NodeClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_NODE_TASK_INFO (node_task_info_get_type ())
typedef struct _NodeTaskInfo NodeTaskInfo;
typedef struct _NodePrivate NodePrivate;

#define TYPE_CALLOUT (callout_get_type ())
#define CALLOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CALLOUT, Callout))
#define CALLOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CALLOUT, CalloutClass))
#define IS_CALLOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CALLOUT))
#define IS_CALLOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CALLOUT))
#define CALLOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CALLOUT, CalloutClass))

typedef struct _Callout Callout;
typedef struct _CalloutClass CalloutClass;

#define TYPE_THEME (theme_get_type ())
#define THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEME, Theme))
#define THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEME, ThemeClass))
#define IS_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEME))
#define IS_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEME))
#define THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEME, ThemeClass))

typedef struct _Theme Theme;
typedef struct _ThemeClass ThemeClass;

#define TYPE_CANVAS_TEXT (canvas_text_get_type ())
#define CANVAS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CANVAS_TEXT, CanvasText))
#define CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CANVAS_TEXT, CanvasTextClass))
#define IS_CANVAS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CANVAS_TEXT))
#define IS_CANVAS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CANVAS_TEXT))
#define CANVAS_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CANVAS_TEXT, CanvasTextClass))

typedef struct _CanvasText CanvasText;
typedef struct _CanvasTextClass CanvasTextClass;

#define TYPE_NODE_IMAGE (node_image_get_type ())
#define NODE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_IMAGE, NodeImage))
#define NODE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_IMAGE, NodeImageClass))
#define IS_NODE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_IMAGE))
#define IS_NODE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_IMAGE))
#define NODE_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_IMAGE, NodeImageClass))

typedef struct _NodeImage NodeImage;
typedef struct _NodeImageClass NodeImageClass;

#define TYPE_LAYOUT (layout_get_type ())
#define LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUT, Layout))
#define LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUT, LayoutClass))
#define IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUT))
#define IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUT))
#define LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUT, LayoutClass))

typedef struct _Layout Layout;
typedef struct _LayoutClass LayoutClass;

#define TYPE_STYLE (style_get_type ())
#define STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STYLE, Style))
#define STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STYLE, StyleClass))
#define IS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STYLE))
#define IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STYLE))
#define STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STYLE, StyleClass))

typedef struct _Style Style;
typedef struct _StyleClass StyleClass;

#define TYPE_NODE_LINK (node_link_get_type ())
#define NODE_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_LINK, NodeLink))
#define NODE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NODE_LINK, NodeLinkClass))
#define IS_NODE_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_LINK))
#define IS_NODE_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NODE_LINK))
#define NODE_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NODE_LINK, NodeLinkClass))

typedef struct _NodeLink NodeLink;
typedef struct _NodeLinkClass NodeLinkClass;

#define TYPE_SEQUENCE_NUM (sequence_num_get_type ())
#define SEQUENCE_NUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEQUENCE_NUM, SequenceNum))
#define SEQUENCE_NUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEQUENCE_NUM, SequenceNumClass))
#define IS_SEQUENCE_NUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEQUENCE_NUM))
#define IS_SEQUENCE_NUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEQUENCE_NUM))
#define SEQUENCE_NUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEQUENCE_NUM, SequenceNumClass))

typedef struct _SequenceNum SequenceNum;
typedef struct _SequenceNumClass SequenceNumClass;

#define TYPE_TAGS (tags_get_type ())
#define TAGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAGS, Tags))
#define TAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAGS, TagsClass))
#define IS_TAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAGS))
#define IS_TAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAGS))
#define TAGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAGS, TagsClass))

typedef struct _Tags Tags;
typedef struct _TagsClass TagsClass;

#define TYPE_CONNECTION (connection_get_type ())
#define CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONNECTION, Connection))
#define CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONNECTION, ConnectionClass))
#define IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONNECTION))
#define IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONNECTION))
#define CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONNECTION, ConnectionClass))

typedef struct _Connection Connection;
typedef struct _ConnectionClass ConnectionClass;
enum  {
	NODE_0_PROPERTY,
	NODE_MAP_PROPERTY,
	NODE_NAME_PROPERTY,
	NODE_POSX_PROPERTY,
	NODE_POSY_PROPERTY,
	NODE_NOTE_PROPERTY,
	NODE_MODE_PROPERTY,
	NODE_PARENT_PROPERTY,
	NODE_SIDE_PROPERTY,
	NODE_FOLDED_PROPERTY,
	NODE_SHOW_FOLD_PROPERTY,
	NODE_TREE_SIZE_PROPERTY,
	NODE_GROUP_PROPERTY,
	NODE_LINK_COLOR_PROPERTY,
	NODE_LINK_COLOR_ONLY_PROPERTY,
	NODE_LINK_COLOR_CHILD_PROPERTY,
	NODE_LINK_COLOR_ROOT_PROPERTY,
	NODE_LINK_COLOR_SET_PROPERTY,
	NODE_ATTACHED_PROPERTY,
	NODE_STYLE_PROPERTY,
	NODE_LAYOUT_PROPERTY,
	NODE_LAST_SELECTED_CHILD_PROPERTY,
	NODE_LAST_SELECTED_CONNECTION_PROPERTY,
	NODE_WIDTH_PROPERTY,
	NODE_HEIGHT_PROPERTY,
	NODE_IMAGE_PROPERTY,
	NODE_TOTAL_WIDTH_PROPERTY,
	NODE_TOTAL_HEIGHT_PROPERTY,
	NODE_IMAGE_RESIZABLE_PROPERTY,
	NODE_ALPHA_PROPERTY,
	NODE_LINKED_NODE_PROPERTY,
	NODE_TREE_BBOX_PROPERTY,
	NODE_TASK_COUNT_PROPERTY,
	NODE_DONE_COUNT_PROPERTY,
	NODE_STICKER_PROPERTY,
	NODE_CALLOUT_PROPERTY,
	NODE_SEQUENCE_PROPERTY,
	NODE_TAGS_PROPERTY,
	NODE_NUM_PROPERTIES
};
static GParamSpec* node_properties[NODE_NUM_PROPERTIES];
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
#define _node_bounds_unref0(var) ((var == NULL) ? NULL : (var = (node_bounds_unref (var), NULL)))
#define __vala_GdkRGBA_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkRGBA_free (var), NULL)))
#define _node_image_unref0(var) ((var == NULL) ? NULL : (var = (node_image_unref (var), NULL)))
#define _style_unref0(var) ((var == NULL) ? NULL : (var = (style_unref (var), NULL)))
#define _node_link_unref0(var) ((var == NULL) ? NULL : (var = (node_link_unref (var), NULL)))
#define _sequence_num_unref0(var) ((var == NULL) ? NULL : (var = (sequence_num_unref (var), NULL)))
#define _tags_unref0(var) ((var == NULL) ? NULL : (var = (tags_unref (var), NULL)))

#define TYPE_IMAGE_MANAGER (image_manager_get_type ())
#define IMAGE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMAGE_MANAGER, ImageManager))
#define IMAGE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMAGE_MANAGER, ImageManagerClass))
#define IS_IMAGE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMAGE_MANAGER))
#define IS_IMAGE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMAGE_MANAGER))
#define IMAGE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMAGE_MANAGER, ImageManagerClass))

typedef struct _ImageManager ImageManager;
typedef struct _ImageManagerClass ImageManagerClass;

#define TYPE_FORMATTED_TEXT (formatted_text_get_type ())
#define FORMATTED_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FORMATTED_TEXT, FormattedText))
#define FORMATTED_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FORMATTED_TEXT, FormattedTextClass))
#define IS_FORMATTED_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FORMATTED_TEXT))
#define IS_FORMATTED_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FORMATTED_TEXT))
#define FORMATTED_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FORMATTED_TEXT, FormattedTextClass))

typedef struct _FormattedText FormattedText;
typedef struct _FormattedTextClass FormattedTextClass;

#define TYPE_TEXT_PARSER (text_parser_get_type ())
#define TEXT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEXT_PARSER, TextParser))
#define TEXT_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEXT_PARSER, TextParserClass))
#define IS_TEXT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEXT_PARSER))
#define IS_TEXT_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEXT_PARSER))
#define TEXT_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEXT_PARSER, TextParserClass))

typedef struct _TextParser TextParser;
typedef struct _TextParserClass TextParserClass;

#define TYPE_MARKDOWN_PARSER (markdown_parser_get_type ())
#define MARKDOWN_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKDOWN_PARSER, MarkdownParser))
#define MARKDOWN_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MARKDOWN_PARSER, MarkdownParserClass))
#define IS_MARKDOWN_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKDOWN_PARSER))
#define IS_MARKDOWN_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MARKDOWN_PARSER))
#define MARKDOWN_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MARKDOWN_PARSER, MarkdownParserClass))

typedef struct _MarkdownParser MarkdownParser;
typedef struct _MarkdownParserClass MarkdownParserClass;

#define TYPE_URL_PARSER (url_parser_get_type ())
#define URL_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_URL_PARSER, UrlParser))
#define URL_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_URL_PARSER, UrlParserClass))
#define IS_URL_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_URL_PARSER))
#define IS_URL_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_URL_PARSER))
#define URL_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_URL_PARSER, UrlParserClass))

typedef struct _UrlParser UrlParser;
typedef struct _UrlParserClass UrlParserClass;

#define TYPE_UNICODE_PARSER (unicode_parser_get_type ())
#define UNICODE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNICODE_PARSER, UnicodeParser))
#define UNICODE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNICODE_PARSER, UnicodeParserClass))
#define IS_UNICODE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNICODE_PARSER))
#define IS_UNICODE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNICODE_PARSER))
#define UNICODE_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNICODE_PARSER, UnicodeParserClass))

typedef struct _UnicodeParser UnicodeParser;
typedef struct _UnicodeParserClass UnicodeParserClass;
typedef enum  {
	SEQUENCE_NUM_TYPE_NUM,
	SEQUENCE_NUM_TYPE_LETTER
} SequenceNumType;

#define TYPE_SEQUENCE_NUM_TYPE (sequence_num_type_get_type ())

#define TYPE_SUMMARY_NODE (summary_node_get_type ())
#define SUMMARY_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUMMARY_NODE, SummaryNode))
#define SUMMARY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUMMARY_NODE, SummaryNodeClass))
#define IS_SUMMARY_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUMMARY_NODE))
#define IS_SUMMARY_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUMMARY_NODE))
#define SUMMARY_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUMMARY_NODE, SummaryNodeClass))

typedef struct _SummaryNode SummaryNode;
typedef struct _SummaryNodeClass SummaryNodeClass;
typedef enum  {
	CALLOUT_MODE_NONE = 0,
	CALLOUT_MODE_SELECTED,
	CALLOUT_MODE_EDITABLE,
	CALLOUT_MODE_HIDING,
	CALLOUT_MODE_HIDDEN
} CalloutMode;

#define TYPE_CALLOUT_MODE (callout_mode_get_type ())

#define TYPE_LAYOUTS (layouts_get_type ())
#define LAYOUTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAYOUTS, Layouts))
#define LAYOUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAYOUTS, LayoutsClass))
#define IS_LAYOUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAYOUTS))
#define IS_LAYOUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAYOUTS))
#define LAYOUTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAYOUTS, LayoutsClass))

typedef struct _Layouts Layouts;
typedef struct _LayoutsClass LayoutsClass;

#define TYPE_STYLES (styles_get_type ())
#define STYLES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STYLES, Styles))
#define STYLES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STYLES, StylesClass))
#define IS_STYLES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STYLES))
#define IS_STYLES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STYLES))
#define STYLES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STYLES, StylesClass))

typedef struct _Styles Styles;
typedef struct _StylesClass StylesClass;

#define TYPE_MAP_MODEL (map_model_get_type ())
#define MAP_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAP_MODEL, MapModel))
#define MAP_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAP_MODEL, MapModelClass))
#define IS_MAP_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAP_MODEL))
#define IS_MAP_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAP_MODEL))
#define MAP_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAP_MODEL, MapModelClass))

typedef struct _MapModel MapModel;
typedef struct _MapModelClass MapModelClass;

#define TYPE_TAG (tag_get_type ())
#define TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG, Tag))
#define TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG, TagClass))
#define IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG))
#define IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG))
#define TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG, TagClass))

typedef struct _Tag Tag;
typedef struct _TagClass TagClass;
typedef enum  {
	TAG_COMBO_TYPE_AND,
	TAG_COMBO_TYPE_OR,
	TAG_COMBO_TYPE_NONE,
	TAG_COMBO_TYPE_NUM
} TagComboType;

#define TYPE_TAG_COMBO_TYPE (tag_combo_type_get_type ())
typedef enum  {
	SEARCH_OPTIONS_NODES,
	SEARCH_OPTIONS_CONNECTIONS,
	SEARCH_OPTIONS_CALLOUTS,
	SEARCH_OPTIONS_GROUPS,
	SEARCH_OPTIONS_TITLES,
	SEARCH_OPTIONS_NOTES,
	SEARCH_OPTIONS_FOLDED,
	SEARCH_OPTIONS_UNFOLDED,
	SEARCH_OPTIONS_TASKS,
	SEARCH_OPTIONS_NONTASKS,
	SEARCH_OPTIONS_NUM
} SearchOptions;

#define TYPE_SEARCH_OPTIONS (search_options_get_type ())

#define TYPE_NODE_BORDER (node_border_get_type ())
#define NODE_BORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NODE_BORDER, NodeBorder))
#define IS_NODE_BORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NODE_BORDER))
#define NODE_BORDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_NODE_BORDER, NodeBorderIface))

typedef struct _NodeBorder NodeBorder;
typedef struct _NodeBorderIface NodeBorderIface;
enum  {
	NODE_MOVED_SIGNAL,
	NODE_RESIZED_SIGNAL,
	NODE_NUM_SIGNALS
};
static guint node_signals[NODE_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _NodeBounds {
	GTypeInstance parent_instance;
	volatile int ref_count;
	NodeBoundsPrivate * priv;
};

struct _NodeBoundsClass {
	GTypeClass parent_class;
	void (*finalize) (NodeBounds *self);
};

struct _NodeBoundsPrivate {
	MindMap* _map;
	gdouble _x;
	gdouble _y;
	gdouble _width;
	gdouble _height;
};

struct _ParamSpecNodeBounds {
	GParamSpec parent_instance;
};

struct _NodeInfo {
	gdouble posx;
	gdouble posy;
	NodeSide side;
	GdkRGBA color;
};

struct _NodeLinkInfo {
	gchar* id_str;
	Node* node;
};

struct _NodeTaskInfo {
	gboolean enabled;
	gboolean done;
	Node* node;
};

struct _Node {
	GObject parent_instance;
	NodePrivate * priv;
	gint _id;
	gdouble _width;
	gdouble _height;
	gdouble _total_width;
	gdouble _total_height;
	gdouble _ipadx;
	gdouble _ipady;
	gdouble _task_radius;
	gdouble _alpha;
	GArray* _children;
};

struct _NodeClass {
	GObjectClass parent_class;
	void (*clear_summary_extents) (Node* self);
	void (*set_summary_extents) (Node* self);
	gboolean (*is_summary) (Node* self);
	gboolean (*is_summarized) (Node* self);
	gboolean (*first_summarized) (Node* self);
	gboolean (*last_summarized) (Node* self);
	gboolean (*is_within) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_node) (Node* self, gdouble x, gdouble y);
	void (*task_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*sticker_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*sequence_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*linked_node_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*note_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*image_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*resizer_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*tag_bbox) (Node* self, gint index, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*tags_bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	gboolean (*is_within_task) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_note) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_linked_node) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_fold) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_fold_area) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_image) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_resizer) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_tags) (Node* self, gdouble x, gdouble y);
	gboolean (*is_within_title) (Node* self, gdouble x, gdouble y);
	Node* (*contains) (Node* self, gdouble x, gdouble y, gboolean allow_selected);
	Callout* (*contains_callout) (Node* self, gdouble x, gdouble y);
	gboolean (*contains_node) (Node* self, Node* node);
	gint (*index) (Node* self);
	gint (*side_count) (Node* self, NodeSide side);
	Node* (*get_node) (Node* self, gint id);
	void (*load) (Node* self, MindMap* map, xmlNode* n, gboolean isroot, Node* sibling_parent, GArray** siblings);
	void (*save) (Node* self, xmlNode* parent);
	void (*resize) (Node* self, gdouble diff);
	void (*bbox) (Node* self, gdouble* x, gdouble* y, gdouble* w, gdouble* h);
	void (*detach) (Node* self, NodeSide side);
	void (*delete) (Node* self);
	void (*delete_only) (Node* self);
	void (*attach_only) (Node* self, Node* prev_parent, gint prev_index);
	void (*attach) (Node* self, Node* parent, gint idx, Theme* theme, gboolean set_side);
	void (*attach_init) (Node* self, Node* parent, gint index);
	void (*attach_common) (Node* self, gint index, Theme* theme);
	Node* (*first_child) (Node* self, NodeSide* side);
	Node* (*last_child) (Node* self, NodeSide* side);
	Node* (*next_child) (Node* self, Node* n, gboolean wrap);
	Node* (*prev_child) (Node* self, Node* n, gboolean wrap);
	void (*link_point) (Node* self, gdouble* x, gdouble* y, gboolean seq);
	void (*draw_image) (Node* self, cairo_t* ctx, Theme* theme);
	void (*draw_name) (Node* self, cairo_t* ctx, Theme* theme, gboolean exporting);
	void (*draw_leaf_task) (Node* self, cairo_t* ctx, GdkRGBA* color, GdkRGBA* background);
	void (*draw_acc_task) (Node* self, cairo_t* ctx, GdkRGBA* color, GdkRGBA* background);
	void (*draw_sticker) (Node* self, cairo_t* ctx, GdkRGBA* sel_color, GdkRGBA* bg_color);
	void (*draw_sequence_num) (Node* self, cairo_t* ctx, GdkRGBA* sel_color, GdkRGBA* fg_color);
	void (*draw_common_note) (Node* self, cairo_t* ctx, GdkRGBA* reg_color, GdkRGBA* sel_color, GdkRGBA* bg_color);
	void (*draw_link_node) (Node* self, cairo_t* ctx, GdkRGBA* reg_color, GdkRGBA* sel_color, GdkRGBA* bg_color);
	void (*draw_common_fold) (Node* self, cairo_t* ctx, GdkRGBA* bg_color, GdkRGBA* fg_color);
	void (*draw_attachable) (Node* self, cairo_t* ctx, Theme* theme, GdkRGBA* frost_background);
	void (*draw_link) (Node* self, cairo_t* ctx, Theme* theme);
	void (*draw_link_arrow) (Node* self, cairo_t* ctx, Theme* theme, gdouble tailx, gdouble taily, gdouble tipx, gdouble tipy);
	void (*draw_resizer) (Node* self, cairo_t* ctx, Theme* theme, gboolean exporting);
	void (*draw_tags) (Node* self, cairo_t* ctx, Theme* theme, gboolean exporting);
	void (*draw_callout) (Node* self, cairo_t* ctx, Theme* theme, gboolean exporting);
	void (*draw) (Node* self, cairo_t* ctx, Theme* theme, gboolean motion, gboolean exporting);
};

struct _NodePrivate {
	MindMap* _map;
	CanvasText* _name;
	gchar* _note;
	NodeMode _mode;
	NodeBounds* _tree_bbox;
	gint _task_count;
	gint _task_done;
	gdouble _posx;
	gdouble _posy;
	GdkRGBA* _link_color;
	gboolean _link_color_set;
	gboolean _link_color_root;
	gdouble _min_width;
	NodeImage* _image;
	Layout* _layout;
	Style* _style;
	gboolean _loaded;
	NodeLink* _linked_node;
	gchar* _sticker;
	GdkPixbuf* _sticker_buf;
	SequenceNum* _sequence_num;
	Callout* _callout;
	gboolean _sequence;
	Tags* _tags;
	Node* _parent;
	NodeSide _side;
	gboolean _folded;
	gboolean _show_fold;
	gdouble _tree_size;
	gboolean _group;
	gboolean _attached;
	Node* _last_selected_child;
	Connection* _last_selected_connection;
};

struct _NodeBorderIface {
	GTypeInterface parent_iface;
	gchar* (*name) (NodeBorder* self);
	gchar* (*display_name) (NodeBorder* self);
	gchar* (*light_icon_name) (NodeBorder* self);
	gchar* (*dark_icon_name) (NodeBorder* self);
	gboolean (*is_fillable) (NodeBorder* self);
	void (*draw_border) (NodeBorder* self, cairo_t* ctx, gdouble x, gdouble y, gdouble w, gdouble h, NodeSide s, gint padding);
	void (*draw_fill) (NodeBorder* self, cairo_t* ctx, gdouble x, gdouble y, gdouble w, gdouble h, NodeSide s, gint padding);
};

static gint NodeBounds_private_offset;
static gpointer node_bounds_parent_class = NULL;
static gint Node_private_offset;
static gpointer node_parent_class = NULL;
VALA_EXTERN Styles* style_inspector_styles;

VALA_EXTERN GType node_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean node_mode_is_selected (NodeMode self);
VALA_EXTERN GType node_side_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* node_side_to_string (NodeSide self);
VALA_EXTERN NodeSide node_side_parse (const gchar* val);
VALA_EXTERN gboolean node_side_vertical (NodeSide self);
VALA_EXTERN gboolean node_side_horizontal (NodeSide self);
VALA_EXTERN gpointer node_bounds_ref (gpointer instance);
VALA_EXTERN void node_bounds_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_bounds (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_node_bounds (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_node_bounds (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_node_bounds (const GValue* value);
VALA_EXTERN GType node_bounds_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeBounds, node_bounds_unref)
VALA_EXTERN gpointer mind_map_ref (gpointer instance);
VALA_EXTERN void mind_map_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_mind_map (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
VALA_EXTERN void value_set_mind_map (GValue* value,
                         gpointer v_object);
VALA_EXTERN void value_take_mind_map (GValue* value,
                          gpointer v_object);
VALA_EXTERN gpointer value_get_mind_map (const GValue* value);
VALA_EXTERN GType mind_map_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MindMap, mind_map_unref)
VALA_EXTERN NodeBounds* node_bounds_new (MindMap* map);
VALA_EXTERN NodeBounds* node_bounds_construct (GType object_type,
                                   MindMap* map);
VALA_EXTERN NodeBounds* node_bounds_new_with_bounds (MindMap* map,
                                         gdouble x,
                                         gdouble y,
                                         gdouble w,
                                         gdouble h);
VALA_EXTERN NodeBounds* node_bounds_construct_with_bounds (GType object_type,
                                               MindMap* map,
                                               gdouble x,
                                               gdouble y,
                                               gdouble w,
                                               gdouble h);
VALA_EXTERN void node_bounds_set_x (NodeBounds* self,
                        gdouble value);
VALA_EXTERN void node_bounds_set_y (NodeBounds* self,
                        gdouble value);
VALA_EXTERN void node_bounds_set_width (NodeBounds* self,
                            gdouble value);
VALA_EXTERN void node_bounds_set_height (NodeBounds* self,
                             gdouble value);
VALA_EXTERN NodeBounds* node_bounds_new_copy (NodeBounds* nb);
VALA_EXTERN NodeBounds* node_bounds_construct_copy (GType object_type,
                                        NodeBounds* nb);
VALA_EXTERN void node_bounds_copy_from (NodeBounds* self,
                            NodeBounds* nb);
VALA_EXTERN gdouble node_bounds_get_x (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_get_y (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_get_width (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_get_height (NodeBounds* self);
VALA_EXTERN gboolean node_bounds_overlaps (NodeBounds* self,
                               NodeBounds* other);
VALA_EXTERN gdouble node_bounds_x1 (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_y1 (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_x2 (NodeBounds* self);
VALA_EXTERN gdouble node_bounds_y2 (NodeBounds* self);
VALA_EXTERN gchar* node_bounds_to_string (NodeBounds* self);
VALA_EXTERN gdouble mind_map_get_origin_x (MindMap* self);
VALA_EXTERN gdouble mind_map_get_origin_y (MindMap* self);
static void node_bounds_finalize (NodeBounds * obj);
static GType node_bounds_get_type_once (void);
VALA_EXTERN GType node_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN NodeInfo* node_info_dup (const NodeInfo* self);
VALA_EXTERN void node_info_free (NodeInfo* self);
VALA_EXTERN void node_info_init (NodeInfo *self,
                     gdouble x,
                     gdouble y,
                     NodeSide s,
                     GdkRGBA* c);
VALA_EXTERN GType node_link_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Node, g_object_unref)
VALA_EXTERN NodeLinkInfo* node_link_info_dup (const NodeLinkInfo* self);
VALA_EXTERN void node_link_info_free (NodeLinkInfo* self);
VALA_EXTERN void node_link_info_copy (const NodeLinkInfo* self,
                          NodeLinkInfo* dest);
VALA_EXTERN void node_link_info_destroy (NodeLinkInfo* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (NodeLinkInfo, node_link_info_destroy)
VALA_EXTERN void node_link_info_init (NodeLinkInfo *self,
                          const gchar* id,
                          Node* n);
VALA_EXTERN GType node_task_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN NodeTaskInfo* node_task_info_dup (const NodeTaskInfo* self);
VALA_EXTERN void node_task_info_free (NodeTaskInfo* self);
VALA_EXTERN void node_task_info_copy (const NodeTaskInfo* self,
                          NodeTaskInfo* dest);
VALA_EXTERN void node_task_info_destroy (NodeTaskInfo* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (NodeTaskInfo, node_task_info_destroy)
VALA_EXTERN void node_task_info_init (NodeTaskInfo *self,
                          gboolean e,
                          gboolean d,
                          Node* n);
VALA_EXTERN GType callout_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Callout, g_object_unref)
VALA_EXTERN GType theme_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Theme, g_object_unref)
VALA_EXTERN GType canvas_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CanvasText, g_object_unref)
VALA_EXTERN gpointer node_image_ref (gpointer instance);
VALA_EXTERN void node_image_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_image (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
VALA_EXTERN void value_set_node_image (GValue* value,
                           gpointer v_object);
VALA_EXTERN void value_take_node_image (GValue* value,
                            gpointer v_object);
VALA_EXTERN gpointer value_get_node_image (const GValue* value);
VALA_EXTERN GType node_image_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeImage, node_image_unref)
VALA_EXTERN GType layout_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Layout, g_object_unref)
VALA_EXTERN gpointer style_ref (gpointer instance);
VALA_EXTERN void style_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_style (const gchar* name,
                              const gchar* nick,
                              const gchar* blurb,
                              GType object_type,
                              GParamFlags flags);
VALA_EXTERN void value_set_style (GValue* value,
                      gpointer v_object);
VALA_EXTERN void value_take_style (GValue* value,
                       gpointer v_object);
VALA_EXTERN gpointer value_get_style (const GValue* value);
VALA_EXTERN GType style_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Style, style_unref)
VALA_EXTERN gpointer node_link_ref (gpointer instance);
VALA_EXTERN void node_link_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_node_link (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_node_link (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_node_link (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_node_link (const GValue* value);
VALA_EXTERN GType node_link_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeLink, node_link_unref)
VALA_EXTERN gpointer sequence_num_ref (gpointer instance);
VALA_EXTERN void sequence_num_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_sequence_num (const gchar* name,
                                     const gchar* nick,
                                     const gchar* blurb,
                                     GType object_type,
                                     GParamFlags flags);
VALA_EXTERN void value_set_sequence_num (GValue* value,
                             gpointer v_object);
VALA_EXTERN void value_take_sequence_num (GValue* value,
                              gpointer v_object);
VALA_EXTERN gpointer value_get_sequence_num (const GValue* value);
VALA_EXTERN GType sequence_num_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SequenceNum, sequence_num_unref)
VALA_EXTERN gpointer tags_ref (gpointer instance);
VALA_EXTERN void tags_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_tags (const gchar* name,
                             const gchar* nick,
                             const gchar* blurb,
                             GType object_type,
                             GParamFlags flags);
VALA_EXTERN void value_set_tags (GValue* value,
                     gpointer v_object);
VALA_EXTERN void value_take_tags (GValue* value,
                      gpointer v_object);
VALA_EXTERN gpointer value_get_tags (const GValue* value);
VALA_EXTERN GType tags_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Tags, tags_unref)
VALA_EXTERN GType connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Connection, g_object_unref)
VALA_EXTERN void node_clear_summary_extents (Node* self);
VALA_EXTERN void node_set_summary_extents (Node* self);
VALA_EXTERN gboolean node_is_summary (Node* self);
VALA_EXTERN gboolean node_is_summarized (Node* self);
VALA_EXTERN gboolean node_first_summarized (Node* self);
VALA_EXTERN gboolean node_last_summarized (Node* self);
VALA_EXTERN gboolean node_is_within (Node* self,
                         gdouble x,
                         gdouble y);
VALA_EXTERN gboolean node_is_within_node (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN void node_task_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
VALA_EXTERN void node_sticker_bbox (Node* self,
                        gdouble* x,
                        gdouble* y,
                        gdouble* w,
                        gdouble* h);
VALA_EXTERN void node_sequence_bbox (Node* self,
                         gdouble* x,
                         gdouble* y,
                         gdouble* w,
                         gdouble* h);
VALA_EXTERN void node_linked_node_bbox (Node* self,
                            gdouble* x,
                            gdouble* y,
                            gdouble* w,
                            gdouble* h);
VALA_EXTERN void node_note_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
VALA_EXTERN void node_image_bbox (Node* self,
                      gdouble* x,
                      gdouble* y,
                      gdouble* w,
                      gdouble* h);
VALA_EXTERN void node_resizer_bbox (Node* self,
                        gdouble* x,
                        gdouble* y,
                        gdouble* w,
                        gdouble* h);
VALA_EXTERN void node_tag_bbox (Node* self,
                    gint index,
                    gdouble* x,
                    gdouble* y,
                    gdouble* w,
                    gdouble* h);
VALA_EXTERN void node_tags_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
VALA_EXTERN gboolean node_is_within_task (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN gboolean node_is_within_note (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN gboolean node_is_within_linked_node (Node* self,
                                     gdouble x,
                                     gdouble y);
VALA_EXTERN gboolean node_is_within_fold (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN gboolean node_is_within_fold_area (Node* self,
                                   gdouble x,
                                   gdouble y);
VALA_EXTERN gboolean node_is_within_image (Node* self,
                               gdouble x,
                               gdouble y);
VALA_EXTERN gboolean node_is_within_resizer (Node* self,
                                 gdouble x,
                                 gdouble y);
VALA_EXTERN gboolean node_is_within_tags (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN gboolean node_is_within_title (Node* self,
                               gdouble x,
                               gdouble y);
VALA_EXTERN Node* node_contains (Node* self,
                     gdouble x,
                     gdouble y,
                     gboolean allow_selected);
VALA_EXTERN Callout* node_contains_callout (Node* self,
                                gdouble x,
                                gdouble y);
VALA_EXTERN gboolean node_contains_node (Node* self,
                             Node* node);
VALA_EXTERN gint node_index (Node* self);
VALA_EXTERN gint node_side_count (Node* self,
                      NodeSide side);
VALA_EXTERN Node* node_get_node (Node* self,
                     gint id);
VALA_EXTERN void node_load (Node* self,
                MindMap* map,
                xmlNode* n,
                gboolean isroot,
                Node* sibling_parent,
                GArray** siblings);
VALA_EXTERN void node_save (Node* self,
                xmlNode* parent);
VALA_EXTERN void node_resize (Node* self,
                  gdouble diff);
VALA_EXTERN void node_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h);
VALA_EXTERN void node_detach (Node* self,
                  NodeSide side);
VALA_EXTERN void node_delete (Node* self);
VALA_EXTERN void node_delete_only (Node* self);
VALA_EXTERN void node_attach_only (Node* self,
                       Node* prev_parent,
                       gint prev_index);
VALA_EXTERN void node_attach (Node* self,
                  Node* parent,
                  gint idx,
                  Theme* theme,
                  gboolean set_side);
VALA_EXTERN void node_attach_init (Node* self,
                       Node* parent,
                       gint index);
VALA_EXTERN void node_attach_common (Node* self,
                         gint index,
                         Theme* theme);
VALA_EXTERN Node* node_first_child (Node* self,
                        NodeSide* side);
VALA_EXTERN Node* node_last_child (Node* self,
                       NodeSide* side);
VALA_EXTERN Node* node_next_child (Node* self,
                       Node* n,
                       gboolean wrap);
VALA_EXTERN Node* node_prev_child (Node* self,
                       Node* n,
                       gboolean wrap);
VALA_EXTERN void node_link_point (Node* self,
                      gdouble* x,
                      gdouble* y,
                      gboolean seq);
VALA_EXTERN void node_draw_image (Node* self,
                      cairo_t* ctx,
                      Theme* theme);
VALA_EXTERN void node_draw_name (Node* self,
                     cairo_t* ctx,
                     Theme* theme,
                     gboolean exporting);
VALA_EXTERN void node_draw_leaf_task (Node* self,
                          cairo_t* ctx,
                          GdkRGBA* color,
                          GdkRGBA* background);
VALA_EXTERN void node_draw_acc_task (Node* self,
                         cairo_t* ctx,
                         GdkRGBA* color,
                         GdkRGBA* background);
VALA_EXTERN void node_draw_sticker (Node* self,
                        cairo_t* ctx,
                        GdkRGBA* sel_color,
                        GdkRGBA* bg_color);
VALA_EXTERN void node_draw_sequence_num (Node* self,
                             cairo_t* ctx,
                             GdkRGBA* sel_color,
                             GdkRGBA* fg_color);
VALA_EXTERN void node_draw_common_note (Node* self,
                            cairo_t* ctx,
                            GdkRGBA* reg_color,
                            GdkRGBA* sel_color,
                            GdkRGBA* bg_color);
VALA_EXTERN void node_draw_link_node (Node* self,
                          cairo_t* ctx,
                          GdkRGBA* reg_color,
                          GdkRGBA* sel_color,
                          GdkRGBA* bg_color);
VALA_EXTERN void node_draw_common_fold (Node* self,
                            cairo_t* ctx,
                            GdkRGBA* bg_color,
                            GdkRGBA* fg_color);
VALA_EXTERN void node_draw_attachable (Node* self,
                           cairo_t* ctx,
                           Theme* theme,
                           GdkRGBA* frost_background);
VALA_EXTERN void node_draw_link (Node* self,
                     cairo_t* ctx,
                     Theme* theme);
VALA_EXTERN void node_draw_link_arrow (Node* self,
                           cairo_t* ctx,
                           Theme* theme,
                           gdouble tailx,
                           gdouble taily,
                           gdouble tipx,
                           gdouble tipy);
VALA_EXTERN void node_draw_resizer (Node* self,
                        cairo_t* ctx,
                        Theme* theme,
                        gboolean exporting);
VALA_EXTERN void node_draw_tags (Node* self,
                     cairo_t* ctx,
                     Theme* theme,
                     gboolean exporting);
VALA_EXTERN void node_draw_callout (Node* self,
                        cairo_t* ctx,
                        Theme* theme,
                        gboolean exporting);
VALA_EXTERN void node_draw (Node* self,
                cairo_t* ctx,
                Theme* theme,
                gboolean motion,
                gboolean exporting);
static GdkRGBA* _vala_GdkRGBA_copy (GdkRGBA* self);
static void _vala_GdkRGBA_free (GdkRGBA* self);
VALA_EXTERN Style* style_new (void);
VALA_EXTERN Style* style_construct (GType object_type);
VALA_EXTERN Node* node_new (MindMap* map,
                Layout* layout);
VALA_EXTERN Node* node_construct (GType object_type,
                      MindMap* map,
                      Layout* layout);
VALA_EXTERN gint mind_map_get_next_node_id (MindMap* self);
static void _g_object_unref0_ (gpointer var);
static void _vala_Node_free_function_content_of (gpointer data);
VALA_EXTERN CanvasText* canvas_text_new (MindMap* map);
VALA_EXTERN CanvasText* canvas_text_construct (GType object_type,
                                   MindMap* map);
static void node_position_text_and_update_size (Node* self);
static void _node_position_text_and_update_size_canvas_text_resized (CanvasText* _sender,
                                                              gpointer self);
VALA_EXTERN Tags* tags_new (void);
VALA_EXTERN Tags* tags_construct (GType object_type);
VALA_EXTERN void node_set_parsers (Node* self);
VALA_EXTERN Node* node_new_with_name (MindMap* map,
                          const gchar* n,
                          Layout* layout);
VALA_EXTERN Node* node_construct_with_name (GType object_type,
                                MindMap* map,
                                const gchar* n,
                                Layout* layout);
VALA_EXTERN CanvasText* canvas_text_new_with_text (MindMap* map,
                                       const gchar* txt);
VALA_EXTERN CanvasText* canvas_text_construct_with_text (GType object_type,
                                             MindMap* map,
                                             const gchar* txt);
VALA_EXTERN Node* node_new_from_xml (MindMap* map,
                         Layout* layout,
                         xmlNode* n,
                         gboolean isroot,
                         Node* sibling_parent,
                         GArray** siblings);
VALA_EXTERN Node* node_construct_from_xml (GType object_type,
                               MindMap* map,
                               Layout* layout,
                               xmlNode* n,
                               gboolean isroot,
                               Node* sibling_parent,
                               GArray** siblings);
VALA_EXTERN gpointer image_manager_ref (gpointer instance);
VALA_EXTERN void image_manager_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_image_manager (const gchar* name,
                                      const gchar* nick,
                                      const gchar* blurb,
                                      GType object_type,
                                      GParamFlags flags);
VALA_EXTERN void value_set_image_manager (GValue* value,
                              gpointer v_object);
VALA_EXTERN void value_take_image_manager (GValue* value,
                               gpointer v_object);
VALA_EXTERN gpointer value_get_image_manager (const GValue* value);
VALA_EXTERN GType image_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImageManager, image_manager_unref)
VALA_EXTERN Node* node_new_copy (MindMap* map,
                     Node* n,
                     ImageManager* im);
VALA_EXTERN Node* node_construct_copy (GType object_type,
                           MindMap* map,
                           Node* n,
                           ImageManager* im);
VALA_EXTERN void node_copy_variables (Node* self,
                          Node* n,
                          ImageManager* im);
VALA_EXTERN void node_set_mode (Node* self,
                    NodeMode value);
VALA_EXTERN void node_set_parent (Node* self,
                      Node* value);
VALA_EXTERN Node* node_new_copy_only (MindMap* map,
                          Node* n,
                          ImageManager* im);
VALA_EXTERN Node* node_construct_copy_only (GType object_type,
                                MindMap* map,
                                Node* n,
                                ImageManager* im);
VALA_EXTERN Node* node_new_copy_tree (MindMap* map,
                          Node* n,
                          ImageManager* im);
VALA_EXTERN Node* node_construct_copy_tree (GType object_type,
                                MindMap* map,
                                Node* n,
                                ImageManager* im);
VALA_EXTERN gint node_id (Node* self);
VALA_EXTERN gdouble node_get_tree_size (Node* self);
VALA_EXTERN void node_set_tree_size (Node* self,
                         gdouble value);
VALA_EXTERN gpointer formatted_text_ref (gpointer instance);
VALA_EXTERN void formatted_text_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_formatted_text (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
VALA_EXTERN void value_set_formatted_text (GValue* value,
                               gpointer v_object);
VALA_EXTERN void value_take_formatted_text (GValue* value,
                                gpointer v_object);
VALA_EXTERN gpointer value_get_formatted_text (const GValue* value);
VALA_EXTERN GType formatted_text_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FormattedText, formatted_text_unref)
VALA_EXTERN FormattedText* canvas_text_get_text (CanvasText* self);
VALA_EXTERN gpointer text_parser_ref (gpointer instance);
VALA_EXTERN void text_parser_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_text_parser (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_text_parser (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_text_parser (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_text_parser (const GValue* value);
VALA_EXTERN GType text_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TextParser, text_parser_unref)
VALA_EXTERN void formatted_text_add_parser (FormattedText* self,
                                TextParser* parser);
VALA_EXTERN GType markdown_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MarkdownParser, text_parser_unref)
VALA_EXTERN MarkdownParser* mind_map_get_markdown_parser (MindMap* self);
VALA_EXTERN GType url_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UrlParser, text_parser_unref)
VALA_EXTERN UrlParser* mind_map_get_url_parser (MindMap* self);
VALA_EXTERN GType unicode_parser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UnicodeParser, text_parser_unref)
VALA_EXTERN UnicodeParser* mind_map_get_unicode_parser (MindMap* self);
VALA_EXTERN Style* node_get_style (Node* self);
VALA_EXTERN gint* style_get_node_width (Style* self);
VALA_EXTERN NodeImage* node_image_new_from_node_image (ImageManager* im,
                                           NodeImage* ni,
                                           gint width);
VALA_EXTERN NodeImage* node_image_construct_from_node_image (GType object_type,
                                                 ImageManager* im,
                                                 NodeImage* ni,
                                                 gint width);
VALA_EXTERN void canvas_text_copy (CanvasText* self,
                       CanvasText* ct);
VALA_EXTERN gboolean node_get_folded (Node* self);
VALA_EXTERN void node_set_folded (Node* self,
                      gboolean value);
VALA_EXTERN const gchar* node_get_note (Node* self);
VALA_EXTERN void node_set_note (Node* self,
                    const gchar* value);
VALA_EXTERN NodeMode node_get_mode (Node* self);
VALA_EXTERN Node* node_get_parent (Node* self);
VALA_EXTERN NodeSide node_get_side (Node* self);
VALA_EXTERN void node_set_side (Node* self,
                    NodeSide value);
VALA_EXTERN void node_set_style (Node* self,
                     Style* value);
VALA_EXTERN NodeBounds* node_get_tree_bbox (Node* self);
VALA_EXTERN const gchar* node_get_sticker (Node* self);
VALA_EXTERN void node_set_sticker (Node* self,
                       const gchar* value);
VALA_EXTERN gboolean node_get_sequence (Node* self);
VALA_EXTERN void node_set_sequence (Node* self,
                        gboolean value);
VALA_EXTERN void tags_copy_tags (Tags* self,
                     Tags* other);
VALA_EXTERN Tags* node_get_tags (Node* self);
VALA_EXTERN void node_reassign_ids (Node* self);
VALA_EXTERN void node_set_posx_only (Node* self,
                         gdouble value);
static void node_update_tree_bbox (Node* self,
                            gdouble diffx,
                            gdouble diffy);
static void node_position_text (Node* self);
VALA_EXTERN void node_set_posy_only (Node* self,
                         gdouble value);
VALA_EXTERN void node_set_alpha_only (Node* self,
                          gdouble value);
VALA_EXTERN void callout_set_alpha (Callout* self,
                        gdouble value);
VALA_EXTERN void node_update_alpha (Node* self,
                        gdouble value);
VALA_EXTERN gboolean node_traversable (Node* self);
VALA_EXTERN void node_set_style_for_tree (Node* self,
                              Style* s);
VALA_EXTERN Callout* node_get_callout (Node* self);
VALA_EXTERN void callout_set_style (Callout* self,
                        Style* value);
VALA_EXTERN void node_adjust_posx_only (Node* self,
                            gdouble value);
VALA_EXTERN void node_adjust_posy_only (Node* self,
                            gdouble value);
VALA_EXTERN void node_update_sequence_num (Node* self);
VALA_EXTERN SequenceNum* sequence_num_new (MindMap* map);
VALA_EXTERN SequenceNum* sequence_num_construct (GType object_type,
                                     MindMap* map);
VALA_EXTERN void sequence_num_set_font (SequenceNum* self,
                            const gchar* family,
                            gint* size,
                            gdouble zoom_factor);
VALA_EXTERN PangoFontDescription* style_get_node_font (Style* self);
VALA_EXTERN GType sequence_num_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SequenceNumType sequence_num_get_seq_type (SequenceNum* self);
VALA_EXTERN void sequence_num_set_num (SequenceNum* self,
                           gint index,
                           SequenceNumType type);
static void node_real_clear_summary_extents (Node* self);
VALA_EXTERN GType summary_node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SummaryNode, g_object_unref)
VALA_EXTERN SummaryNode* node_summary_node (Node* self);
VALA_EXTERN void summary_node_clear_extents (SummaryNode* self);
static void node_real_set_summary_extents (Node* self);
VALA_EXTERN void summary_node_set_extents (SummaryNode* self);
VALA_EXTERN void node_set_tree_bbox (Node* self,
                         NodeBounds* value);
static void node_update_size (Node* self);
static void node_calculate_node_size (Node* self,
                               gdouble* width,
                               gdouble* height,
                               gdouble* name_space);
VALA_EXTERN gint style_get_node_margin (Style* self);
VALA_EXTERN gint style_get_node_padding (Style* self);
VALA_EXTERN gdouble node_sticker_height (Node* self);
VALA_EXTERN gdouble node_task_width (Node* self);
VALA_EXTERN gdouble node_sticker_width (Node* self);
VALA_EXTERN gdouble node_sequence_width (Node* self);
VALA_EXTERN gdouble node_note_width (Node* self);
VALA_EXTERN gdouble node_linked_node_width (Node* self);
VALA_EXTERN gdouble canvas_text_get_width (CanvasText* self);
VALA_EXTERN gdouble canvas_text_get_height (CanvasText* self);
VALA_EXTERN gint node_image_get_width (NodeImage* self);
VALA_EXTERN gint node_image_get_height (NodeImage* self);
VALA_EXTERN gdouble node_tags_width (Node* self);
VALA_EXTERN gdouble node_tags_height (Node* self);
static void node_update_total_size (Node* self);
VALA_EXTERN void layout_handle_update_by_edit (Layout* self,
                                   Node* n,
                                   gdouble diffw,
                                   gdouble diffh);
VALA_EXTERN GType callout_mode_get_type (void) G_GNUC_CONST ;
VALA_EXTERN CalloutMode callout_get_mode (Callout* self);
VALA_EXTERN gboolean callout_mode_is_disconnected (CalloutMode self);
VALA_EXTERN gdouble callout_get_total_width (Callout* self);
VALA_EXTERN gdouble callout_get_total_height (Callout* self);
VALA_EXTERN void node_set_callout_modes (Node* self,
                             CalloutMode mode);
VALA_EXTERN void callout_set_mode (Callout* self,
                       CalloutMode value);
VALA_EXTERN void node_update_tree (Node* self);
VALA_EXTERN void canvas_text_update_size (CanvasText* self,
                              gboolean call_resized);
VALA_EXTERN void node_set_image (Node* self,
                     ImageManager* im,
                     NodeImage* ni);
VALA_EXTERN void image_manager_set_valid (ImageManager* self,
                              gint id,
                              gboolean value);
VALA_EXTERN gint node_image_get_id (NodeImage* self);
VALA_EXTERN guint node_get_level (Node* self);
VALA_EXTERN gboolean node_is_root (Node* self);
static gboolean node_real_is_summary (Node* self);
static gboolean node_real_is_summarized (Node* self);
static gboolean node_real_first_summarized (Node* self);
VALA_EXTERN Node* summary_node_first_node (SummaryNode* self);
static gboolean node_real_last_summarized (Node* self);
VALA_EXTERN Node* summary_node_last_node (SummaryNode* self);
VALA_EXTERN GArray* node_children (Node* self);
VALA_EXTERN gboolean node_is_between_siblings (Node* self,
                                   Node* first,
                                   Node* last);
VALA_EXTERN gboolean node_is_grouped (Node* self);
VALA_EXTERN gboolean node_get_group (Node* self);
VALA_EXTERN gint node_groups_between (Node* self,
                          Node* node);
VALA_EXTERN gboolean node_main_branch (Node* self);
VALA_EXTERN gint node_descendant_count (Node* self);
VALA_EXTERN gboolean node_is_leaf (Node* self);
VALA_EXTERN gboolean node_is_task (Node* self);
VALA_EXTERN gboolean node_is_task_done (Node* self);
VALA_EXTERN gboolean node_is_descendant_of (Node* self,
                                Node* node);
VALA_EXTERN gboolean node_is_left_of (Node* self,
                          NodeBounds* nb);
VALA_EXTERN gboolean node_is_right_of (Node* self,
                           NodeBounds* nb);
VALA_EXTERN gboolean node_is_above (Node* self,
                        NodeBounds* nb);
VALA_EXTERN gboolean node_is_below (Node* self,
                        NodeBounds* nb);
VALA_EXTERN gboolean node_contains_sequence (Node* self);
VALA_EXTERN gboolean node_is_in_sequence (Node* self);
VALA_EXTERN gdouble node_task_completion_percentage (Node* self);
VALA_EXTERN gboolean node_resizer_on_left (Node* self);
static gboolean node_real_is_within (Node* self,
                              gdouble x,
                              gdouble y);
VALA_EXTERN gboolean utils_is_within_bounds (gdouble x,
                                 gdouble y,
                                 gdouble bx,
                                 gdouble by,
                                 gdouble bw,
                                 gdouble bh);
static gboolean node_real_is_within_node (Node* self,
                                   gdouble x,
                                   gdouble y);
VALA_EXTERN void node_node_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
static void node_real_task_bbox (Node* self,
                          gdouble* x,
                          gdouble* y,
                          gdouble* w,
                          gdouble* h);
VALA_EXTERN gdouble node_get_posx (Node* self);
VALA_EXTERN gdouble node_get_posy (Node* self);
static void node_real_sticker_bbox (Node* self,
                             gdouble* x,
                             gdouble* y,
                             gdouble* w,
                             gdouble* h);
static void node_real_sequence_bbox (Node* self,
                              gdouble* x,
                              gdouble* y,
                              gdouble* w,
                              gdouble* h);
VALA_EXTERN gdouble sequence_num_get_height (SequenceNum* self);
VALA_EXTERN CanvasText* node_get_name (Node* self);
VALA_EXTERN gdouble canvas_text_get_posy (CanvasText* self);
VALA_EXTERN gdouble node_sequence_height (Node* self);
static void node_real_linked_node_bbox (Node* self,
                                 gdouble* x,
                                 gdouble* y,
                                 gdouble* w,
                                 gdouble* h);
static void node_real_note_bbox (Node* self,
                          gdouble* x,
                          gdouble* y,
                          gdouble* w,
                          gdouble* h);
static void node_real_image_bbox (Node* self,
                           gdouble* x,
                           gdouble* y,
                           gdouble* w,
                           gdouble* h);
static void node_real_resizer_bbox (Node* self,
                             gdouble* x,
                             gdouble* y,
                             gdouble* w,
                             gdouble* h);
static void node_real_tag_bbox (Node* self,
                         gint index,
                         gdouble* x,
                         gdouble* y,
                         gdouble* w,
                         gdouble* h);
VALA_EXTERN gdouble canvas_text_get_posx (CanvasText* self);
static void node_real_tags_bbox (Node* self,
                          gdouble* x,
                          gdouble* y,
                          gdouble* w,
                          gdouble* h);
VALA_EXTERN gint tags_size (Tags* self);
static gboolean node_real_is_within_task (Node* self,
                                   gdouble x,
                                   gdouble y);
static gboolean node_real_is_within_note (Node* self,
                                   gdouble x,
                                   gdouble y);
static gboolean node_real_is_within_linked_node (Node* self,
                                          gdouble x,
                                          gdouble y);
VALA_EXTERN NodeLink* node_get_linked_node (Node* self);
static gboolean node_real_is_within_fold (Node* self,
                                   gdouble x,
                                   gdouble y);
VALA_EXTERN void node_fold_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
static gboolean node_real_is_within_fold_area (Node* self,
                                        gdouble x,
                                        gdouble y);
static gboolean node_real_is_within_image (Node* self,
                                    gdouble x,
                                    gdouble y);
static gboolean node_real_is_within_resizer (Node* self,
                                      gdouble x,
                                      gdouble y);
static gboolean node_real_is_within_tags (Node* self,
                                   gdouble x,
                                   gdouble y);
static gboolean node_real_is_within_title (Node* self,
                                    gdouble x,
                                    gdouble y);
VALA_EXTERN gboolean canvas_text_is_within (CanvasText* self,
                                gdouble x,
                                gdouble y);
static Node* node_real_contains (Node* self,
                          gdouble x,
                          gdouble y,
                          gboolean allow_selected);
static Callout* node_real_contains_callout (Node* self,
                                     gdouble x,
                                     gdouble y);
VALA_EXTERN gboolean callout_contains (Callout* self,
                           gdouble x,
                           gdouble y);
static gboolean node_real_contains_node (Node* self,
                                  Node* node);
VALA_EXTERN gboolean node_intersects_with (Node* self,
                               GdkRectangle* box);
VALA_EXTERN gdouble node_get_width (Node* self);
VALA_EXTERN gdouble node_get_height (Node* self);
VALA_EXTERN void node_get_nodes_within_box (Node* self,
                                GdkRectangle* box,
                                GArray* nodes);
VALA_EXTERN Node* node_get_root (Node* self);
static gint node_real_index (Node* self);
static gint node_real_side_count (Node* self,
                           NodeSide side);
VALA_EXTERN NodeSide node_relative_side (Node* self);
static Node* node_real_get_node (Node* self,
                          gint id);
static Node* node_get_sibling (Node* self,
                        gint dir,
                        gboolean wrap);
VALA_EXTERN Node* node_previous_sibling (Node* self,
                             gboolean wrap);
VALA_EXTERN Node* node_next_sibling (Node* self,
                         gboolean wrap);
static void node_load_name (Node* self,
                     xmlNode* n);
VALA_EXTERN void formatted_text_insert_text (FormattedText* self,
                                 gint index,
                                 const gchar* str);
VALA_EXTERN void canvas_text_load (CanvasText* self,
                       xmlNode* n);
static void node_load_note (Node* self,
                     xmlNode* n);
static void node_load_image (Node* self,
                      ImageManager* im,
                      xmlNode* n);
VALA_EXTERN NodeImage* node_image_new_from_xml (ImageManager* im,
                                    xmlNode* n,
                                    gint width);
VALA_EXTERN NodeImage* node_image_construct_from_xml (GType object_type,
                                          ImageManager* im,
                                          xmlNode* n,
                                          gint width);
VALA_EXTERN gboolean node_image_get_valid (NodeImage* self);
static void node_load_node_link (Node* self,
                          xmlNode* n);
VALA_EXTERN NodeLink* node_link_new_from_xml (xmlNode* node);
VALA_EXTERN NodeLink* node_link_construct_from_xml (GType object_type,
                                        xmlNode* node);
static void node_load_style (Node* self,
                      xmlNode* n);
VALA_EXTERN void style_load_node (Style* self,
                      xmlNode* node);
VALA_EXTERN void canvas_text_set_text_alignment (CanvasText* self,
                                     PangoAlignment* text_align);
VALA_EXTERN PangoAlignment* style_get_node_text_align (Style* self);
VALA_EXTERN void canvas_text_set_font (CanvasText* self,
                           const gchar* family,
                           gint* size,
                           gdouble zoom_factor);
static void node_load_callout (Node* self,
                        xmlNode* n);
VALA_EXTERN Callout* callout_new (Node* node);
VALA_EXTERN Callout* callout_construct (GType object_type,
                            Node* node);
VALA_EXTERN void node_set_callout (Node* self,
                       Callout* value);
VALA_EXTERN void callout_load (Callout* self,
                   xmlNode* node);
static void node_load_nodes (Node* self,
                      xmlNode* n,
                      Node* sibling_parent,
                      GArray** siblings);
VALA_EXTERN SummaryNode* summary_node_new_from_xml (MindMap* map,
                                        Layout* layout,
                                        xmlNode* node,
                                        GArray** siblings);
VALA_EXTERN SummaryNode* summary_node_construct_from_xml (GType object_type,
                                              MindMap* map,
                                              Layout* layout,
                                              xmlNode* node,
                                              GArray** siblings);
VALA_EXTERN void summary_node_attach_nodes (SummaryNode* self,
                                Node* p,
                                GArray* nodes,
                                gboolean sort,
                                Theme* theme);
static void node_real_load (Node* self,
                     MindMap* map,
                     xmlNode* n,
                     gboolean isroot,
                     Node* sibling_parent,
                     GArray** siblings);
VALA_EXTERN void mind_map_set_next_node_id (MindMap* self,
                                gint value);
VALA_EXTERN NodeLink* node_link_new_for_local (gint id);
VALA_EXTERN NodeLink* node_link_construct_for_local (GType object_type,
                                         gint id);
VALA_EXTERN void node_set_group (Node* self,
                     gboolean value);
VALA_EXTERN GType layouts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Layouts, g_object_unref)
VALA_EXTERN Layouts* mind_map_get_layouts (MindMap* self);
VALA_EXTERN Layout* layouts_get_layout (Layouts* self,
                            const gchar* name);
VALA_EXTERN void node_set_layout (Node* self,
                      Layout* value);
VALA_EXTERN gboolean style_copy (Style* self,
                     Style* s);
VALA_EXTERN gpointer styles_ref (gpointer instance);
VALA_EXTERN void styles_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_styles (const gchar* name,
                               const gchar* nick,
                               const gchar* blurb,
                               GType object_type,
                               GParamFlags flags);
VALA_EXTERN void value_set_styles (GValue* value,
                       gpointer v_object);
VALA_EXTERN void value_take_styles (GValue* value,
                        gpointer v_object);
VALA_EXTERN gpointer value_get_styles (const GValue* value);
VALA_EXTERN GType styles_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Styles, styles_unref)
VALA_EXTERN Style* styles_get_style_for_level (Styles* self,
                                   guint level,
                                   Style* alternative);
VALA_EXTERN ImageManager* mind_map_get_image_manager (MindMap* self);
VALA_EXTERN void tags_load_indices (Tags* self,
                        xmlNode* node,
                        Tags* all_tags);
VALA_EXTERN gpointer map_model_ref (gpointer instance);
VALA_EXTERN void map_model_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_map_model (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_map_model (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_map_model (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_map_model (const GValue* value);
VALA_EXTERN GType map_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MapModel, map_model_unref)
VALA_EXTERN MapModel* mind_map_get_model (MindMap* self);
VALA_EXTERN Tags* map_model_get_tags (MapModel* self);
VALA_EXTERN Theme* mind_map_get_theme (MindMap* self);
VALA_EXTERN GdkRGBA* theme_next_color (Theme* self);
VALA_EXTERN void node_set_link_color_child (Node* self,
                                GdkRGBA * value);
VALA_EXTERN Layout* node_get_layout (Node* self);
VALA_EXTERN NodeBounds* layout_bbox (Layout* self,
                         Node* parent,
                         gint side_mask,
                         const gchar* msg);
static void node_real_save (Node* self,
                     xmlNode* parent);
VALA_EXTERN xmlNode* node_save_node (Node* self);
VALA_EXTERN gchar* utils_color_from_rgba (GdkRGBA* rgba);
VALA_EXTERN gboolean node_get_link_color_root (Node* self);
VALA_EXTERN const gchar* layout_get_name (Layout* self);
VALA_EXTERN void style_save_node (Style* self,
                      xmlNode* parent);
VALA_EXTERN void node_image_save (NodeImage* self,
                      xmlNode* parent);
VALA_EXTERN xmlNode* canvas_text_save (CanvasText* self,
                           const gchar* title);
VALA_EXTERN xmlNode* tags_save_indices (Tags* self,
                            Tags* all_tags);
VALA_EXTERN xmlNode* node_link_save (NodeLink* self);
VALA_EXTERN xmlNode* callout_save (Callout* self);
VALA_EXTERN gboolean node_xml_find (xmlNode* n,
                        gint id,
                        gchar** name);
VALA_EXTERN gchar* canvas_text_xml_text (xmlNode* n);
VALA_EXTERN void node_set_resizable (Node* self,
                         gboolean resizable);
VALA_EXTERN void node_image_set_resizable (NodeImage* self,
                               gboolean value);
static void node_real_resize (Node* self,
                       gdouble diff);
VALA_EXTERN gboolean canvas_text_is_wrapped (CanvasText* self);
VALA_EXTERN void style_set_node_width (Style* self,
                           gint* value);
VALA_EXTERN void node_image_set_width (NodeImage* self,
                           gint width);
VALA_EXTERN void canvas_text_resize (CanvasText* self,
                         gdouble diff);
static void node_real_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h);
VALA_EXTERN void node_set_fold (Node* self,
                    gboolean value,
                    gboolean deep,
                    GArray* changed);
VALA_EXTERN void layout_handle_update_by_fold (Layout* self,
                                   Node* n);
VALA_EXTERN void node_set_fold_only (Node* self,
                         gboolean value);
VALA_EXTERN gboolean node_completed_tasks_foldable (Node* self);
VALA_EXTERN gboolean node_unfoldable (Node* self);
VALA_EXTERN void node_fold_completed_tasks (Node* self,
                                GArray* changed);
VALA_EXTERN gdouble sequence_num_get_width (SequenceNum* self);
VALA_EXTERN gboolean node_move_to_position (Node* self,
                                Node* child,
                                NodeSide side,
                                gdouble x,
                                gdouble y);
VALA_EXTERN Node* node_get_last_selected_child (Node* self);
VALA_EXTERN void node_set_attached (Node* self,
                        gboolean value);
VALA_EXTERN void node_set_last_selected_child (Node* self,
                                   Node* value);
VALA_EXTERN void node_return_to_position (Node* self);
VALA_EXTERN void node_swap_with_previous_sibling (Node* self);
VALA_EXTERN void summary_node_remove_node (SummaryNode* self,
                               Node* node);
VALA_EXTERN void summary_node_add_node (SummaryNode* self,
                            Node* node);
VALA_EXTERN void node_make_parent_sibling (Node* self);
VALA_EXTERN void node_make_children_siblings (Node* self);
VALA_EXTERN void canvas_text_set_posx (CanvasText* self,
                           gdouble value);
VALA_EXTERN void canvas_text_set_posy (CanvasText* self,
                           gdouble value);
VALA_EXTERN void callout_position_text (Callout* self,
                            gboolean call_resized);
VALA_EXTERN void node_parent_moved (Node* self,
                        Node* parent,
                        gdouble diffx,
                        gdouble diffy);
static void node_real_detach (Node* self,
                       NodeSide side);
static void node_propagate_task_info_up (Node* self,
                                  gint count_adjust,
                                  gint done_adjust);
static void _node_parent_moved_node_moved (Node* _sender,
                                    gdouble diffx,
                                    gdouble diffy,
                                    gpointer self);
VALA_EXTERN void layout_handle_update_by_delete (Layout* self,
                                     Node* parent,
                                     gint index,
                                     NodeSide side,
                                     gdouble size);
static void node_real_delete (Node* self);
static void node_real_delete_only (Node* self);
VALA_EXTERN GArray* mind_map_get_nodes (MindMap* self);
VALA_EXTERN void map_model_remove_root_node (MapModel* self,
                                 Node* node);
static void node_real_attach_only (Node* self,
                            Node* prev_parent,
                            gint prev_index);
VALA_EXTERN void map_model_position_root_node (MapModel* self,
                                   Node* node);
VALA_EXTERN void map_model_add_root (MapModel* self,
                         Node* n,
                         gint index);
static void node_real_attach (Node* self,
                       Node* parent,
                       gint idx,
                       Theme* theme,
                       gboolean set_side);
VALA_EXTERN NodeSide layout_side_mapping (Layout* self,
                              NodeSide side);
VALA_EXTERN void layout_propagate_side (Layout* self,
                            Node* parent,
                            NodeSide side);
VALA_EXTERN void layout_initialize (Layout* self,
                        Node* parent);
static void node_real_attach_init (Node* self,
                            Node* parent,
                            gint index);
static void node_real_attach_common (Node* self,
                              gint index,
                              Theme* theme);
VALA_EXTERN void layout_handle_update_by_insert (Layout* self,
                                     Node* parent,
                                     Node* child,
                                     gint pos);
VALA_EXTERN GdkRGBA* node_get_link_color (Node* self);
static Node* node_real_first_child (Node* self,
                             NodeSide* side);
static gboolean _node_side_equal (const NodeSide * s1,
                           const NodeSide * s2);
static Node* node_real_last_child (Node* self,
                            NodeSide* side);
static Node* node_real_next_child (Node* self,
                            Node* n,
                            gboolean wrap);
static Node* node_real_prev_child (Node* self,
                            Node* n,
                            gboolean wrap);
static void node_propagate_task_info_down (Node* self,
                                    gboolean* enable,
                                    gboolean* done);
static void node_propagate_task_info (Node* self,
                               gboolean* enable,
                               gboolean* done);
VALA_EXTERN gboolean node_task_enabled (Node* self);
VALA_EXTERN gboolean node_task_done (Node* self);
VALA_EXTERN void node_enable_task (Node* self,
                       gboolean task);
VALA_EXTERN void node_set_task_done (Node* self,
                         gboolean done);
VALA_EXTERN void node_toggle_task_done (Node* self,
                            GArray** changed);
VALA_EXTERN GType tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Tag, g_object_unref)
VALA_EXTERN gboolean node_add_tag (Node* self,
                       Tag* tag);
VALA_EXTERN gboolean tags_add_tag (Tags* self,
                       Tag* tag,
                       gint index);
VALA_EXTERN gboolean node_remove_tag (Node* self,
                          Tag* tag,
                          GArray* nodes);
VALA_EXTERN gint tags_get_tag_index (Tags* self,
                         Tag* tag);
VALA_EXTERN gboolean tags_remove_tag (Tags* self,
                          gint index);
VALA_EXTERN GType tag_combo_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean node_highlightable (Node* self,
                             Tags* tags,
                             TagComboType combo_type);
VALA_EXTERN gboolean tag_combo_type_highlightable (TagComboType self,
                                       Tags* tags,
                                       Tags* highlight);
VALA_EXTERN void node_highlight_tags (Node* self,
                          Tags* tags,
                          TagComboType combo_type);
VALA_EXTERN Node* node_folded_ancestor (Node* self);
VALA_EXTERN void node_get_match_items (Node* self,
                           const gchar* tabname,
                           const gchar* pattern,
                           gboolean* search_opts,
                           gint search_opts_length1,
                           GtkListStore** matches);
VALA_EXTERN GType search_options_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* utils_rootname (const gchar* filename);
VALA_EXTERN gchar* utils_match_string (const gchar* pattern,
                           const gchar* value);
VALA_EXTERN const gchar* formatted_text_get_text (FormattedText* self);
VALA_EXTERN CanvasText* callout_get_text (Callout* self);
VALA_EXTERN void node_update_theme_colors (Node* self,
                               Theme* old_theme,
                               Theme* new_theme);
VALA_EXTERN gint theme_get_color_index (Theme* self,
                            GdkRGBA* color);
VALA_EXTERN void theme_link_color (Theme* self,
                       gint index,
                       GdkRGBA* result);
VALA_EXTERN void node_set_link_color_only (Node* self,
                               GdkRGBA * value);
VALA_EXTERN void canvas_text_update_attributes (CanvasText* self);
VALA_EXTERN void node_get_node_info (Node* self,
                         GArray** info);
VALA_EXTERN void node_set_node_info (Node* self,
                         GArray* info,
                         gint* index);
static void node_real_link_point (Node* self,
                           gdouble* x,
                           gdouble* y,
                           gboolean seq);
VALA_EXTERN GType node_border_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeBorder, g_object_unref)
VALA_EXTERN NodeBorder* style_get_node_border (Style* self);
VALA_EXTERN gchar* node_border_name (NodeBorder* self);
VALA_EXTERN void node_draw_shape (Node* self,
                      cairo_t* ctx,
                      Theme* theme,
                      GdkRGBA* border_color,
                      gboolean exporting);
VALA_EXTERN void utils_set_context_color (cairo_t* ctx,
                              GdkRGBA* color);
VALA_EXTERN GdkRGBA* theme_get_color (Theme* self,
                          const gchar* name);
VALA_EXTERN void style_draw_node_fill (Style* self,
                           cairo_t* ctx,
                           gdouble x,
                           gdouble y,
                           gdouble w,
                           gdouble h,
                           NodeSide s);
VALA_EXTERN void utils_set_context_color_with_alpha (cairo_t* ctx,
                                         GdkRGBA* color,
                                         gdouble alpha);
VALA_EXTERN gboolean style_is_fillable (Style* self);
VALA_EXTERN gint* style_get_node_borderwidth (Style* self);
VALA_EXTERN void style_draw_node_border (Style* self,
                             cairo_t* ctx,
                             gdouble x,
                             gdouble y,
                             gdouble w,
                             gdouble h,
                             NodeSide s);
VALA_EXTERN gint* style_get_link_width (Style* self);
static void node_real_draw_image (Node* self,
                           cairo_t* ctx,
                           Theme* theme);
VALA_EXTERN void node_image_draw (NodeImage* self,
                      cairo_t* ctx,
                      gdouble x,
                      gdouble y,
                      gdouble opacity);
static void node_real_draw_name (Node* self,
                          cairo_t* ctx,
                          Theme* theme,
                          gboolean exporting);
VALA_EXTERN void canvas_text_draw (CanvasText* self,
                       cairo_t* ctx,
                       Theme* theme,
                       GdkRGBA* fg,
                       gdouble alpha,
                       gboolean copy_layout);
static void node_real_draw_leaf_task (Node* self,
                               cairo_t* ctx,
                               GdkRGBA* color,
                               GdkRGBA* background);
static void node_real_draw_acc_task (Node* self,
                              cairo_t* ctx,
                              GdkRGBA* color,
                              GdkRGBA* background);
static void node_real_draw_sticker (Node* self,
                             cairo_t* ctx,
                             GdkRGBA* sel_color,
                             GdkRGBA* bg_color);
static void node_real_draw_sequence_num (Node* self,
                                  cairo_t* ctx,
                                  GdkRGBA* sel_color,
                                  GdkRGBA* fg_color);
VALA_EXTERN PangoLayout* sequence_num_get_layout (SequenceNum* self);
static void node_real_draw_common_note (Node* self,
                                 cairo_t* ctx,
                                 GdkRGBA* reg_color,
                                 GdkRGBA* sel_color,
                                 GdkRGBA* bg_color);
static void node_real_draw_link_node (Node* self,
                               cairo_t* ctx,
                               GdkRGBA* reg_color,
                               GdkRGBA* sel_color,
                               GdkRGBA* bg_color);
VALA_EXTERN gboolean node_link_is_local (NodeLink* self);
static void node_real_draw_common_fold (Node* self,
                                 cairo_t* ctx,
                                 GdkRGBA* bg_color,
                                 GdkRGBA* fg_color);
VALA_EXTERN gboolean node_get_show_fold (Node* self);
static void node_real_draw_attachable (Node* self,
                                cairo_t* ctx,
                                Theme* theme,
                                GdkRGBA* frost_background);
static void node_real_draw_link (Node* self,
                          cairo_t* ctx,
                          Theme* theme);
VALA_EXTERN gdouble node_get_alpha (Node* self);
VALA_EXTERN void style_draw_link (Style* self,
                      cairo_t* ctx,
                      Node* from_node,
                      Node* to_node,
                      gboolean force_straight_link_type,
                      gdouble from_x,
                      gdouble from_y,
                      gdouble to_x1,
                      gdouble to_y1,
                      gdouble to_x2,
                      gdouble to_y2,
                      gdouble* tailx,
                      gdouble* taily,
                      gdouble* tipx,
                      gdouble* tipy);
VALA_EXTERN gboolean* style_get_link_arrow (Style* self);
static void node_real_draw_link_arrow (Node* self,
                                cairo_t* ctx,
                                Theme* theme,
                                gdouble tailx,
                                gdouble taily,
                                gdouble tipx,
                                gdouble tipy);
VALA_EXTERN gint* style_get_link_arrow_size (Style* self);
static void node_real_draw_resizer (Node* self,
                             cairo_t* ctx,
                             Theme* theme,
                             gboolean exporting);
static void node_real_draw_tags (Node* self,
                          cairo_t* ctx,
                          Theme* theme,
                          gboolean exporting);
VALA_EXTERN Tag* tags_get_tag (Tags* self,
                   gint index);
VALA_EXTERN void tag_get_color (Tag* self,
                    GdkRGBA * result);
static void node_real_draw_callout (Node* self,
                             cairo_t* ctx,
                             Theme* theme,
                             gboolean exporting);
VALA_EXTERN void callout_draw (Callout* self,
                   cairo_t* ctx,
                   Theme* theme,
                   gboolean exporting);
static void node_real_draw (Node* self,
                     cairo_t* ctx,
                     Theme* theme,
                     gboolean motion,
                     gboolean exporting);
static void node_draw_side_links (Node* self,
                           cairo_t* ctx,
                           Theme* theme,
                           gint first,
                           gint last);
VALA_EXTERN void node_draw_links (Node* self,
                      cairo_t* ctx,
                      Theme* theme);
VALA_EXTERN void node_draw_all (Node* self,
                    cairo_t* ctx,
                    Theme* theme,
                    Node* current,
                    gboolean motion,
                    gboolean exporting);
VALA_EXTERN void node_display (Node* self,
                   gboolean recursive,
                   const gchar* prefix);
VALA_EXTERN MindMap* node_get_map (Node* self);
VALA_EXTERN void node_set_name (Node* self,
                    CanvasText* value);
VALA_EXTERN void node_set_posx (Node* self,
                    gdouble value);
VALA_EXTERN void node_set_posy (Node* self,
                    gdouble value);
VALA_EXTERN GSettings* mind_map_get_settings (MindMap* self);
VALA_EXTERN void canvas_text_set_edit (CanvasText* self,
                           gboolean value);
VALA_EXTERN void canvas_text_set_node_selected (CanvasText* self,
                                    gboolean value);
VALA_EXTERN void canvas_text_set_cursor_all (CanvasText* self,
                                 gboolean motion);
VALA_EXTERN void canvas_text_clear_selection (CanvasText* self,
                                  const gchar* msg);
VALA_EXTERN void node_set_show_fold (Node* self,
                         gboolean value);
VALA_EXTERN void node_set_link_color (Node* self,
                          GdkRGBA* value);
VALA_EXTERN void node_set_link_color_root (Node* self,
                               gboolean value);
VALA_EXTERN gboolean node_get_link_color_set (Node* self);
VALA_EXTERN gboolean node_get_attached (Node* self);
VALA_EXTERN gint* style_get_branch_margin (Style* self);
static gint* _int_dup (gint* self);
VALA_EXTERN void canvas_text_set_max_width (CanvasText* self,
                                gdouble value);
VALA_EXTERN void layout_apply_margin (Layout* self,
                          Node* n);
VALA_EXTERN Connection* node_get_last_selected_connection (Node* self);
VALA_EXTERN void node_set_last_selected_connection (Node* self,
                                        Connection* value);
VALA_EXTERN NodeImage* node_get_image (Node* self);
VALA_EXTERN gdouble node_get_total_width (Node* self);
VALA_EXTERN gdouble node_get_total_height (Node* self);
VALA_EXTERN gboolean node_get_image_resizable (Node* self);
VALA_EXTERN gboolean node_image_get_resizable (NodeImage* self);
VALA_EXTERN void node_set_image_resizable (Node* self,
                               gboolean value);
VALA_EXTERN void node_set_alpha (Node* self,
                     gdouble value);
VALA_EXTERN void node_set_linked_node (Node* self,
                           NodeLink* value);
VALA_EXTERN void node_link_normalize (NodeLink* self,
                          MindMap* map);
VALA_EXTERN gint node_get_task_count (Node* self);
VALA_EXTERN gint node_get_done_count (Node* self);
VALA_EXTERN GdkPixbuf* sticker_set_make_pixbuf (const gchar* resource,
                                    gint width);
static void _node_position_text_and_update_size_callout_resized (Callout* _sender,
                                                          gpointer self);
static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void node_finalize (GObject * obj);
static GType node_get_type_once (void);
static void _vala_node_get_property (GObject * object,
                              guint property_id,
                              GValue * value,
                              GParamSpec * pspec);
static void _vala_node_set_property (GObject * object,
                              guint property_id,
                              const GValue * value,
                              GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gboolean
node_mode_is_selected (NodeMode self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	if (self == NODE_MODE_CURRENT) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = self == NODE_MODE_SELECTED;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self == NODE_MODE_HIGHLIGHTED;
	}
	result = _tmp0_;
	return result;
}

static GType
node_mode_get_type_once (void)
{
	static const GEnumValue values[] = {{NODE_MODE_NONE, "NODE_MODE_NONE", "none"}, {NODE_MODE_CURRENT, "NODE_MODE_CURRENT", "current"}, {NODE_MODE_SELECTED, "NODE_MODE_SELECTED", "selected"}, {NODE_MODE_EDITABLE, "NODE_MODE_EDITABLE", "editable"}, {NODE_MODE_ATTACHABLE, "NODE_MODE_ATTACHABLE", "attachable"}, {NODE_MODE_DROPPABLE, "NODE_MODE_DROPPABLE", "droppable"}, {NODE_MODE_HIGHLIGHTED, "NODE_MODE_HIGHLIGHTED", "highlighted"}, {0, NULL, NULL}};
	GType node_mode_type_id;
	node_mode_type_id = g_enum_register_static ("NodeMode", values);
	return node_mode_type_id;
}

GType
node_mode_get_type (void)
{
	static volatile gsize node_mode_type_id__once = 0;
	if (g_once_init_enter (&node_mode_type_id__once)) {
		GType node_mode_type_id;
		node_mode_type_id = node_mode_get_type_once ();
		g_once_init_leave (&node_mode_type_id__once, node_mode_type_id);
	}
	return node_mode_type_id__once;
}

gchar*
node_side_to_string (NodeSide self)
{
	gchar* result;
	switch (self) {
		case NODE_SIDE_LEFT:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("left");
			result = _tmp0_;
			return result;
		}
		case NODE_SIDE_TOP:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("top");
			result = _tmp1_;
			return result;
		}
		case NODE_SIDE_RIGHT:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("right");
			result = _tmp2_;
			return result;
		}
		case NODE_SIDE_BOTTOM:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("bottom");
			result = _tmp3_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

NodeSide
node_side_parse (const gchar* val)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	NodeSide result;
	g_return_val_if_fail (val != NULL, 0);
	_tmp0_ = val;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("left")))) {
		switch (0) {
			default:
			{
				result = NODE_SIDE_LEFT;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("top")))) {
		switch (0) {
			default:
			{
				result = NODE_SIDE_TOP;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("right")))) {
		switch (0) {
			default:
			{
				result = NODE_SIDE_RIGHT;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("bottom")))) {
		switch (0) {
			default:
			{
				result = NODE_SIDE_BOTTOM;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_assert_not_reached ();
			}
		}
	}
}

gboolean
node_side_vertical (NodeSide self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (self == NODE_SIDE_TOP) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self == NODE_SIDE_BOTTOM;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_side_horizontal (NodeSide self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (self == NODE_SIDE_LEFT) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self == NODE_SIDE_RIGHT;
	}
	result = _tmp0_;
	return result;
}

static GType
node_side_get_type_once (void)
{
	static const GEnumValue values[] = {{NODE_SIDE_LEFT, "NODE_SIDE_LEFT", "left"}, {NODE_SIDE_TOP, "NODE_SIDE_TOP", "top"}, {NODE_SIDE_RIGHT, "NODE_SIDE_RIGHT", "right"}, {NODE_SIDE_BOTTOM, "NODE_SIDE_BOTTOM", "bottom"}, {0, NULL, NULL}};
	GType node_side_type_id;
	node_side_type_id = g_enum_register_static ("NodeSide", values);
	return node_side_type_id;
}

GType
node_side_get_type (void)
{
	static volatile gsize node_side_type_id__once = 0;
	if (g_once_init_enter (&node_side_type_id__once)) {
		GType node_side_type_id;
		node_side_type_id = node_side_get_type_once ();
		g_once_init_leave (&node_side_type_id__once, node_side_type_id);
	}
	return node_side_type_id__once;
}

static inline gpointer
node_bounds_get_instance_private (NodeBounds* self)
{
	return G_STRUCT_MEMBER_P (self, NodeBounds_private_offset);
}

static gpointer
_mind_map_ref0 (gpointer self)
{
	return self ? mind_map_ref (self) : NULL;
}

NodeBounds*
node_bounds_construct (GType object_type,
                       MindMap* map)
{
	NodeBounds* self = NULL;
	MindMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (NodeBounds*) g_type_create_instance (object_type);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	return self;
}

NodeBounds*
node_bounds_new (MindMap* map)
{
	return node_bounds_construct (TYPE_NODE_BOUNDS, map);
}

NodeBounds*
node_bounds_construct_with_bounds (GType object_type,
                                   MindMap* map,
                                   gdouble x,
                                   gdouble y,
                                   gdouble w,
                                   gdouble h)
{
	NodeBounds* self = NULL;
	MindMap* _tmp0_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (NodeBounds*) g_type_create_instance (object_type);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	node_bounds_set_x (self, x);
	node_bounds_set_y (self, y);
	node_bounds_set_width (self, w);
	node_bounds_set_height (self, h);
	return self;
}

NodeBounds*
node_bounds_new_with_bounds (MindMap* map,
                             gdouble x,
                             gdouble y,
                             gdouble w,
                             gdouble h)
{
	return node_bounds_construct_with_bounds (TYPE_NODE_BOUNDS, map, x, y, w, h);
}

NodeBounds*
node_bounds_construct_copy (GType object_type,
                            NodeBounds* nb)
{
	NodeBounds* self = NULL;
	g_return_val_if_fail (nb != NULL, NULL);
	self = (NodeBounds*) g_type_create_instance (object_type);
	node_bounds_copy_from (self, nb);
	return self;
}

NodeBounds*
node_bounds_new_copy (NodeBounds* nb)
{
	return node_bounds_construct_copy (TYPE_NODE_BOUNDS, nb);
}

void
node_bounds_copy_from (NodeBounds* self,
                       NodeBounds* nb)
{
	MindMap* _tmp0_;
	MindMap* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (nb != NULL);
	_tmp0_ = nb->priv->_map;
	_tmp1_ = _mind_map_ref0 (_tmp0_);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp1_;
	_tmp2_ = node_bounds_get_x (nb);
	_tmp3_ = _tmp2_;
	node_bounds_set_x (self, _tmp3_);
	_tmp4_ = node_bounds_get_y (nb);
	_tmp5_ = _tmp4_;
	node_bounds_set_y (self, _tmp5_);
	_tmp6_ = nb->priv->_width;
	node_bounds_set_width (self, _tmp6_);
	_tmp7_ = nb->priv->_height;
	node_bounds_set_height (self, _tmp7_);
}

gboolean
node_bounds_overlaps (NodeBounds* self,
                      NodeBounds* other)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (other != NULL, FALSE);
	_tmp2_ = node_bounds_get_x (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_bounds_get_x (other);
	_tmp5_ = _tmp4_;
	_tmp6_ = other->priv->_width;
	if (_tmp3_ < (_tmp5_ + _tmp6_)) {
		gdouble _tmp7_;
		gdouble _tmp8_;
		gdouble _tmp9_;
		gdouble _tmp10_;
		gdouble _tmp11_;
		_tmp7_ = node_bounds_get_x (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = self->priv->_width;
		_tmp10_ = node_bounds_get_x (other);
		_tmp11_ = _tmp10_;
		_tmp1_ = (_tmp8_ + _tmp9_) > _tmp11_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp12_ = FALSE;
		gdouble _tmp13_;
		gdouble _tmp14_;
		gdouble _tmp15_;
		gdouble _tmp16_;
		gdouble _tmp17_;
		_tmp13_ = node_bounds_get_y (self);
		_tmp14_ = _tmp13_;
		_tmp15_ = node_bounds_get_y (other);
		_tmp16_ = _tmp15_;
		_tmp17_ = other->priv->_height;
		if (_tmp14_ < (_tmp16_ + _tmp17_)) {
			gdouble _tmp18_;
			gdouble _tmp19_;
			gdouble _tmp20_;
			gdouble _tmp21_;
			gdouble _tmp22_;
			_tmp18_ = node_bounds_get_y (self);
			_tmp19_ = _tmp18_;
			_tmp20_ = self->priv->_height;
			_tmp21_ = node_bounds_get_y (other);
			_tmp22_ = _tmp21_;
			_tmp12_ = (_tmp19_ + _tmp20_) > _tmp22_;
		} else {
			_tmp12_ = FALSE;
		}
		_tmp0_ = _tmp12_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_bounds_x1 (NodeBounds* self)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = node_bounds_get_x (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

gdouble
node_bounds_y1 (NodeBounds* self)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = node_bounds_get_y (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

gdouble
node_bounds_x2 (NodeBounds* self)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = node_bounds_get_x (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_width;
	result = _tmp1_ + _tmp2_;
	return result;
}

gdouble
node_bounds_y2 (NodeBounds* self)
{
	gdouble _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = node_bounds_get_y (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_height;
	result = _tmp1_ + _tmp2_;
	return result;
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

gchar*
node_bounds_to_string (NodeBounds* self)
{
	MindMap* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = bool_to_string (_tmp0_ != NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = node_bounds_get_x (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = node_bounds_get_y (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->_width;
	_tmp8_ = self->priv->_height;
	_tmp9_ = g_strdup_printf ("map: %s, x: %g, y: %g, w: %g, h: %g", _tmp2_, _tmp4_, _tmp6_, _tmp7_, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp2_);
	result = _tmp10_;
	return result;
}

gdouble
node_bounds_get_x (NodeBounds* self)
{
	gdouble result;
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_x (_tmp0_);
	_tmp2_ = _tmp1_;
	result = self->priv->_x + _tmp2_;
	return result;
}

void
node_bounds_set_x (NodeBounds* self,
                   gdouble value)
{
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_x (_tmp0_);
	_tmp2_ = _tmp1_;
	self->priv->_x = value - _tmp2_;
}

gdouble
node_bounds_get_y (NodeBounds* self)
{
	gdouble result;
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_y (_tmp0_);
	_tmp2_ = _tmp1_;
	result = self->priv->_y + _tmp2_;
	return result;
}

void
node_bounds_set_y (NodeBounds* self,
                   gdouble value)
{
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_y (_tmp0_);
	_tmp2_ = _tmp1_;
	self->priv->_y = value - _tmp2_;
}

gdouble
node_bounds_get_width (NodeBounds* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_width;
	return result;
}

void
node_bounds_set_width (NodeBounds* self,
                       gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_width = value;
}

gdouble
node_bounds_get_height (NodeBounds* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_height;
	return result;
}

void
node_bounds_set_height (NodeBounds* self,
                        gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_height = value;
}

static void
value_node_bounds_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
value_node_bounds_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		node_bounds_unref (value->data[0].v_pointer);
	}
}

static void
value_node_bounds_copy_value (const GValue* src_value,
                              GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = node_bounds_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
value_node_bounds_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
value_node_bounds_collect_value (GValue* value,
                                 guint n_collect_values,
                                 GTypeCValue* collect_values,
                                 guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		NodeBounds * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = node_bounds_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
value_node_bounds_lcopy_value (const GValue* value,
                               guint n_collect_values,
                               GTypeCValue* collect_values,
                               guint collect_flags)
{
	NodeBounds ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = node_bounds_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
param_spec_node_bounds (const gchar* name,
                        const gchar* nick,
                        const gchar* blurb,
                        GType object_type,
                        GParamFlags flags)
{
	ParamSpecNodeBounds* spec;
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_NODE_BOUNDS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
value_get_node_bounds (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NODE_BOUNDS), NULL);
	return value->data[0].v_pointer;
}

void
value_set_node_bounds (GValue* value,
                       gpointer v_object)
{
	NodeBounds * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NODE_BOUNDS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NODE_BOUNDS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		node_bounds_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		node_bounds_unref (old);
	}
}

void
value_take_node_bounds (GValue* value,
                        gpointer v_object)
{
	NodeBounds * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_NODE_BOUNDS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_NODE_BOUNDS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		node_bounds_unref (old);
	}
}

static void
node_bounds_class_init (NodeBoundsClass * klass,
                        gpointer klass_data)
{
	node_bounds_parent_class = g_type_class_peek_parent (klass);
	((NodeBoundsClass *) klass)->finalize = node_bounds_finalize;
	g_type_class_adjust_private_offset (klass, &NodeBounds_private_offset);
}

static void
node_bounds_instance_init (NodeBounds * self,
                           gpointer klass)
{
	self->priv = node_bounds_get_instance_private (self);
	self->priv->_x = 0.0;
	self->priv->_y = 0.0;
	self->priv->_width = 0.0;
	self->priv->_height = 0.0;
	self->ref_count = 1;
}

static void
node_bounds_finalize (NodeBounds * obj)
{
	NodeBounds * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NODE_BOUNDS, NodeBounds);
	g_signal_handlers_destroy (self);
	_mind_map_unref0 (self->priv->_map);
}

static GType
node_bounds_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { value_node_bounds_init, value_node_bounds_free_value, value_node_bounds_copy_value, value_node_bounds_peek_pointer, "p", value_node_bounds_collect_value, "p", value_node_bounds_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (NodeBoundsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) node_bounds_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NodeBounds), 0, (GInstanceInitFunc) node_bounds_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType node_bounds_type_id;
	node_bounds_type_id = g_type_register_fundamental (g_type_fundamental_next (), "NodeBounds", &g_define_type_info, &g_define_type_fundamental_info, 0);
	NodeBounds_private_offset = g_type_add_instance_private (node_bounds_type_id, sizeof (NodeBoundsPrivate));
	return node_bounds_type_id;
}

GType
node_bounds_get_type (void)
{
	static volatile gsize node_bounds_type_id__once = 0;
	if (g_once_init_enter (&node_bounds_type_id__once)) {
		GType node_bounds_type_id;
		node_bounds_type_id = node_bounds_get_type_once ();
		g_once_init_leave (&node_bounds_type_id__once, node_bounds_type_id);
	}
	return node_bounds_type_id__once;
}

gpointer
node_bounds_ref (gpointer instance)
{
	NodeBounds * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
node_bounds_unref (gpointer instance)
{
	NodeBounds * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		NODE_BOUNDS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

void
node_info_init (NodeInfo *self,
                gdouble x,
                gdouble y,
                NodeSide s,
                GdkRGBA* c)
{
	GdkRGBA _tmp0_;
	g_return_if_fail (c != NULL);
	memset (self, 0, sizeof (NodeInfo));
	(*self).posx = x;
	(*self).posy = y;
	(*self).side = s;
	_tmp0_ = *c;
	(*self).color = _tmp0_;
}

NodeInfo*
node_info_dup (const NodeInfo* self)
{
	NodeInfo* dup;
	dup = g_new0 (NodeInfo, 1);
	memcpy (dup, self, sizeof (NodeInfo));
	return dup;
}

void
node_info_free (NodeInfo* self)
{
	g_free (self);
}

static GType
node_info_get_type_once (void)
{
	GType node_info_type_id;
	node_info_type_id = g_boxed_type_register_static ("NodeInfo", (GBoxedCopyFunc) node_info_dup, (GBoxedFreeFunc) node_info_free);
	return node_info_type_id;
}

GType
node_info_get_type (void)
{
	static volatile gsize node_info_type_id__once = 0;
	if (g_once_init_enter (&node_info_type_id__once)) {
		GType node_info_type_id;
		node_info_type_id = node_info_get_type_once ();
		g_once_init_leave (&node_info_type_id__once, node_info_type_id);
	}
	return node_info_type_id__once;
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
node_link_info_init (NodeLinkInfo *self,
                     const gchar* id,
                     Node* n)
{
	gchar* _tmp0_;
	Node* _tmp1_;
	g_return_if_fail (id != NULL);
	g_return_if_fail (n != NULL);
	memset (self, 0, sizeof (NodeLinkInfo));
	_tmp0_ = g_strdup (id);
	_g_free0 ((*self).id_str);
	(*self).id_str = _tmp0_;
	_tmp1_ = _g_object_ref0 (n);
	_g_object_unref0 ((*self).node);
	(*self).node = _tmp1_;
}

void
node_link_info_copy (const NodeLinkInfo* self,
                     NodeLinkInfo* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	Node* _tmp2_;
	Node* _tmp3_;
	_tmp0_ = (*self).id_str;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).id_str);
	(*dest).id_str = _tmp1_;
	_tmp2_ = (*self).node;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 ((*dest).node);
	(*dest).node = _tmp3_;
}

void
node_link_info_destroy (NodeLinkInfo* self)
{
	_g_free0 ((*self).id_str);
	_g_object_unref0 ((*self).node);
}

NodeLinkInfo*
node_link_info_dup (const NodeLinkInfo* self)
{
	NodeLinkInfo* dup;
	dup = g_new0 (NodeLinkInfo, 1);
	node_link_info_copy (self, dup);
	return dup;
}

void
node_link_info_free (NodeLinkInfo* self)
{
	node_link_info_destroy (self);
	g_free (self);
}

static GType
node_link_info_get_type_once (void)
{
	GType node_link_info_type_id;
	node_link_info_type_id = g_boxed_type_register_static ("NodeLinkInfo", (GBoxedCopyFunc) node_link_info_dup, (GBoxedFreeFunc) node_link_info_free);
	return node_link_info_type_id;
}

GType
node_link_info_get_type (void)
{
	static volatile gsize node_link_info_type_id__once = 0;
	if (g_once_init_enter (&node_link_info_type_id__once)) {
		GType node_link_info_type_id;
		node_link_info_type_id = node_link_info_get_type_once ();
		g_once_init_leave (&node_link_info_type_id__once, node_link_info_type_id);
	}
	return node_link_info_type_id__once;
}

void
node_task_info_init (NodeTaskInfo *self,
                     gboolean e,
                     gboolean d,
                     Node* n)
{
	Node* _tmp0_;
	g_return_if_fail (n != NULL);
	memset (self, 0, sizeof (NodeTaskInfo));
	(*self).enabled = e;
	(*self).done = d;
	_tmp0_ = _g_object_ref0 (n);
	_g_object_unref0 ((*self).node);
	(*self).node = _tmp0_;
}

void
node_task_info_copy (const NodeTaskInfo* self,
                     NodeTaskInfo* dest)
{
	Node* _tmp0_;
	Node* _tmp1_;
	(*dest).enabled = (*self).enabled;
	(*dest).done = (*self).done;
	_tmp0_ = (*self).node;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 ((*dest).node);
	(*dest).node = _tmp1_;
}

void
node_task_info_destroy (NodeTaskInfo* self)
{
	_g_object_unref0 ((*self).node);
}

NodeTaskInfo*
node_task_info_dup (const NodeTaskInfo* self)
{
	NodeTaskInfo* dup;
	dup = g_new0 (NodeTaskInfo, 1);
	node_task_info_copy (self, dup);
	return dup;
}

void
node_task_info_free (NodeTaskInfo* self)
{
	node_task_info_destroy (self);
	g_free (self);
}

static GType
node_task_info_get_type_once (void)
{
	GType node_task_info_type_id;
	node_task_info_type_id = g_boxed_type_register_static ("NodeTaskInfo", (GBoxedCopyFunc) node_task_info_dup, (GBoxedFreeFunc) node_task_info_free);
	return node_task_info_type_id;
}

GType
node_task_info_get_type (void)
{
	static volatile gsize node_task_info_type_id__once = 0;
	if (g_once_init_enter (&node_task_info_type_id__once)) {
		GType node_task_info_type_id;
		node_task_info_type_id = node_task_info_get_type_once ();
		g_once_init_leave (&node_task_info_type_id__once, node_task_info_type_id);
	}
	return node_task_info_type_id__once;
}

static inline gpointer
node_get_instance_private (Node* self)
{
	return G_STRUCT_MEMBER_P (self, Node_private_offset);
}

static GdkRGBA*
_vala_GdkRGBA_copy (GdkRGBA* self)
{
	return g_boxed_copy (gdk_rgba_get_type (), self);
}

static gpointer
__vala_GdkRGBA_copy0 (gpointer self)
{
	return self ? _vala_GdkRGBA_copy (self) : NULL;
}

static void
_vala_GdkRGBA_free (GdkRGBA* self)
{
	g_boxed_free (gdk_rgba_get_type (), self);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
_vala_Node_free_function_content_of (gpointer data)
{
	Node* self;
	self = *((Node**) data);
	_g_object_unref0_ (self);
}

static void
_node_position_text_and_update_size_canvas_text_resized (CanvasText* _sender,
                                                         gpointer self)
{
	node_position_text_and_update_size ((Node*) self);
}

Node*
node_construct (GType object_type,
                MindMap* map,
                Layout* layout)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GArray* _tmp3_;
	NodeBounds* _tmp4_;
	Layout* _tmp5_;
	CanvasText* _tmp6_;
	CanvasText* _tmp7_;
	Tags* _tmp8_;
	g_return_val_if_fail (map != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	_tmp1_ = mind_map_get_next_node_id (map);
	_tmp2_ = _tmp1_;
	self->_id = _tmp2_;
	_tmp3_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp3_, (GDestroyNotify) _vala_Node_free_function_content_of);
	_g_array_unref0 (self->_children);
	self->_children = _tmp3_;
	_tmp4_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp4_;
	_tmp5_ = _g_object_ref0 (layout);
	_g_object_unref0 (self->priv->_layout);
	self->priv->_layout = _tmp5_;
	_tmp6_ = canvas_text_new (map);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp6_;
	_tmp7_ = self->priv->_name;
	g_signal_connect_object (_tmp7_, "resized", (GCallback) _node_position_text_and_update_size_canvas_text_resized, self, 0);
	_tmp8_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp8_;
	node_set_parsers (self);
	return self;
}

Node*
node_new (MindMap* map,
          Layout* layout)
{
	return node_construct (TYPE_NODE, map, layout);
}

Node*
node_construct_with_name (GType object_type,
                          MindMap* map,
                          const gchar* n,
                          Layout* layout)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GArray* _tmp3_;
	NodeBounds* _tmp4_;
	Layout* _tmp5_;
	CanvasText* _tmp6_;
	CanvasText* _tmp7_;
	Tags* _tmp8_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (n != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	_tmp1_ = mind_map_get_next_node_id (map);
	_tmp2_ = _tmp1_;
	self->_id = _tmp2_;
	_tmp3_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp3_, (GDestroyNotify) _vala_Node_free_function_content_of);
	_g_array_unref0 (self->_children);
	self->_children = _tmp3_;
	_tmp4_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp4_;
	_tmp5_ = _g_object_ref0 (layout);
	_g_object_unref0 (self->priv->_layout);
	self->priv->_layout = _tmp5_;
	_tmp6_ = canvas_text_new_with_text (map, n);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp6_;
	_tmp7_ = self->priv->_name;
	g_signal_connect_object (_tmp7_, "resized", (GCallback) _node_position_text_and_update_size_canvas_text_resized, self, 0);
	_tmp8_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp8_;
	node_set_parsers (self);
	return self;
}

Node*
node_new_with_name (MindMap* map,
                    const gchar* n,
                    Layout* layout)
{
	return node_construct_with_name (TYPE_NODE, map, n, layout);
}

Node*
node_construct_from_xml (GType object_type,
                         MindMap* map,
                         Layout* layout,
                         xmlNode* n,
                         gboolean isroot,
                         Node* sibling_parent,
                         GArray** siblings)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	GArray* _tmp1_;
	NodeBounds* _tmp2_;
	Layout* _tmp3_;
	CanvasText* _tmp4_;
	CanvasText* _tmp5_;
	Tags* _tmp6_;
	Node* _tmp7_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (*siblings != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	_tmp1_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp1_, (GDestroyNotify) _vala_Node_free_function_content_of);
	_g_array_unref0 (self->_children);
	self->_children = _tmp1_;
	_tmp2_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp2_;
	_tmp3_ = _g_object_ref0 (layout);
	_g_object_unref0 (self->priv->_layout);
	self->priv->_layout = _tmp3_;
	_tmp4_ = canvas_text_new_with_text (map, "");
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp4_;
	_tmp5_ = self->priv->_name;
	g_signal_connect_object (_tmp5_, "resized", (GCallback) _node_position_text_and_update_size_canvas_text_resized, self, 0);
	_tmp6_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp6_;
	node_set_parsers (self);
	_tmp7_ = _g_object_ref0 (self);
	g_array_append_val (*siblings, _tmp7_);
	node_load (self, map, n, isroot, sibling_parent, siblings);
	return self;
}

Node*
node_new_from_xml (MindMap* map,
                   Layout* layout,
                   xmlNode* n,
                   gboolean isroot,
                   Node* sibling_parent,
                   GArray** siblings)
{
	return node_construct_from_xml (TYPE_NODE, map, layout, n, isroot, sibling_parent, siblings);
}

static gpointer
_g_array_ref0 (gpointer self)
{
	return self ? g_array_ref (self) : NULL;
}

Node*
node_construct_copy (GType object_type,
                     MindMap* map,
                     Node* n,
                     ImageManager* im)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GArray* _tmp3_;
	GArray* _tmp4_;
	NodeBounds* _tmp5_;
	CanvasText* _tmp6_;
	Tags* _tmp7_;
	CanvasText* _tmp8_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (n != NULL, NULL);
	g_return_val_if_fail (im != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	_tmp1_ = mind_map_get_next_node_id (map);
	_tmp2_ = _tmp1_;
	self->_id = _tmp2_;
	_tmp3_ = n->_children;
	_tmp4_ = _g_array_ref0 (_tmp3_);
	_g_array_unref0 (self->_children);
	self->_children = _tmp4_;
	_tmp5_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp5_;
	_tmp6_ = canvas_text_new (map);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp6_;
	_tmp7_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp7_;
	node_copy_variables (self, n, im);
	_tmp8_ = self->priv->_name;
	g_signal_connect_object (_tmp8_, "resized", (GCallback) _node_position_text_and_update_size_canvas_text_resized, self, 0);
	node_set_parsers (self);
	node_set_mode (self, NODE_MODE_NONE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp9_ = FALSE;
			_tmp9_ = TRUE;
			while (TRUE) {
				GArray* _tmp11_;
				GArray* _tmp12_;
				Node* _tmp13_;
				if (!_tmp9_) {
					gint _tmp10_;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp11_ = self->_children;
				if (!(((guint) i) < _tmp11_->len)) {
					break;
				}
				_tmp12_ = self->_children;
				_tmp13_ = g_array_index (_tmp12_, Node*, (guint) i);
				node_set_parent (_tmp13_, self);
			}
		}
	}
	return self;
}

Node*
node_new_copy (MindMap* map,
               Node* n,
               ImageManager* im)
{
	return node_construct_copy (TYPE_NODE, map, n, im);
}

Node*
node_construct_copy_only (GType object_type,
                          MindMap* map,
                          Node* n,
                          ImageManager* im)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GArray* _tmp3_;
	NodeBounds* _tmp4_;
	CanvasText* _tmp5_;
	Tags* _tmp6_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (n != NULL, NULL);
	g_return_val_if_fail (im != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	_tmp1_ = mind_map_get_next_node_id (map);
	_tmp2_ = _tmp1_;
	self->_id = _tmp2_;
	_tmp3_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp3_, (GDestroyNotify) _vala_Node_free_function_content_of);
	_g_array_unref0 (self->_children);
	self->_children = _tmp3_;
	_tmp4_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp4_;
	_tmp5_ = canvas_text_new (map);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp5_;
	_tmp6_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp6_;
	node_copy_variables (self, n, im);
	return self;
}

Node*
node_new_copy_only (MindMap* map,
                    Node* n,
                    ImageManager* im)
{
	return node_construct_copy_only (TYPE_NODE, map, n, im);
}

Node*
node_construct_copy_tree (GType object_type,
                          MindMap* map,
                          Node* n,
                          ImageManager* im)
{
	Node * self = NULL;
	MindMap* _tmp0_;
	GArray* _tmp1_;
	NodeBounds* _tmp2_;
	CanvasText* _tmp3_;
	Tags* _tmp4_;
	CanvasText* _tmp5_;
	gdouble _tmp6_;
	g_return_val_if_fail (map != NULL, NULL);
	g_return_val_if_fail (n != NULL, NULL);
	g_return_val_if_fail (im != NULL, NULL);
	self = (Node*) g_object_new (object_type, NULL);
	_tmp0_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp0_;
	self->_id = node_id (n);
	_tmp1_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp1_, (GDestroyNotify) _vala_Node_free_function_content_of);
	_g_array_unref0 (self->_children);
	self->_children = _tmp1_;
	_tmp2_ = node_bounds_new (map);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	self->priv->_tree_bbox = _tmp2_;
	_tmp3_ = canvas_text_new (map);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp3_;
	_tmp4_ = tags_new ();
	_tags_unref0 (self->priv->_tags);
	self->priv->_tags = _tmp4_;
	node_copy_variables (self, n, im);
	_tmp5_ = self->priv->_name;
	g_signal_connect_object (_tmp5_, "resized", (GCallback) _node_position_text_and_update_size_canvas_text_resized, self, 0);
	node_set_parsers (self);
	node_set_mode (self, NODE_MODE_NONE);
	_tmp6_ = n->priv->_tree_size;
	node_set_tree_size (self, _tmp6_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp7_ = FALSE;
			_tmp7_ = TRUE;
			while (TRUE) {
				GArray* _tmp9_;
				Node* child = NULL;
				GArray* _tmp10_;
				Node* _tmp11_;
				Node* _tmp12_;
				Node* _tmp13_;
				GArray* _tmp14_;
				Node* _tmp15_;
				Node* _tmp16_;
				if (!_tmp7_) {
					gint _tmp8_;
					_tmp8_ = i;
					i = _tmp8_ + 1;
				}
				_tmp7_ = FALSE;
				_tmp9_ = n->_children;
				if (!(((guint) i) < _tmp9_->len)) {
					break;
				}
				_tmp10_ = n->_children;
				_tmp11_ = g_array_index (_tmp10_, Node*, (guint) i);
				_tmp12_ = node_new_copy_tree (map, _tmp11_, im);
				child = _tmp12_;
				_tmp13_ = child;
				node_set_parent (_tmp13_, self);
				_tmp14_ = self->_children;
				_tmp15_ = child;
				_tmp16_ = _g_object_ref0 (_tmp15_);
				g_array_append_val (_tmp14_, _tmp16_);
				_g_object_unref0 (child);
			}
		}
	}
	return self;
}

Node*
node_new_copy_tree (MindMap* map,
                    Node* n,
                    ImageManager* im)
{
	return node_construct_copy_tree (TYPE_NODE, map, n, im);
}

void
node_set_parsers (Node* self)
{
	CanvasText* _tmp0_;
	FormattedText* _tmp1_;
	FormattedText* _tmp2_;
	MindMap* _tmp3_;
	MarkdownParser* _tmp4_;
	MarkdownParser* _tmp5_;
	CanvasText* _tmp6_;
	FormattedText* _tmp7_;
	FormattedText* _tmp8_;
	MindMap* _tmp9_;
	UrlParser* _tmp10_;
	UrlParser* _tmp11_;
	CanvasText* _tmp12_;
	FormattedText* _tmp13_;
	FormattedText* _tmp14_;
	MindMap* _tmp15_;
	UnicodeParser* _tmp16_;
	UnicodeParser* _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_name;
	_tmp1_ = canvas_text_get_text (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_map;
	_tmp4_ = mind_map_get_markdown_parser (_tmp3_);
	_tmp5_ = _tmp4_;
	formatted_text_add_parser (_tmp2_, (TextParser*) _tmp5_);
	_tmp6_ = self->priv->_name;
	_tmp7_ = canvas_text_get_text (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->priv->_map;
	_tmp10_ = mind_map_get_url_parser (_tmp9_);
	_tmp11_ = _tmp10_;
	formatted_text_add_parser (_tmp8_, (TextParser*) _tmp11_);
	_tmp12_ = self->priv->_name;
	_tmp13_ = canvas_text_get_text (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->priv->_map;
	_tmp16_ = mind_map_get_unicode_parser (_tmp15_);
	_tmp17_ = _tmp16_;
	formatted_text_add_parser (_tmp14_, (TextParser*) _tmp17_);
}

void
node_copy_variables (Node* self,
                     Node* n,
                     ImageManager* im)
{
	Layout* _tmp0_;
	Layout* _tmp1_;
	NodeImage* _tmp2_ = NULL;
	NodeImage* _tmp3_;
	NodeImage* _tmp10_;
	CanvasText* _tmp11_;
	CanvasText* _tmp12_;
	GdkRGBA* _tmp13_;
	GdkRGBA* _tmp14_;
	gboolean _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	NodeMode _tmp18_;
	NodeMode _tmp19_;
	Node* _tmp20_;
	NodeSide _tmp21_;
	Style* _tmp22_;
	Style* _tmp23_;
	NodeBounds* _tmp24_;
	NodeBounds* _tmp25_;
	NodeBounds* _tmp26_;
	NodeBounds* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	Tags* _tmp32_;
	Tags* _tmp33_;
	Tags* _tmp34_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (n != NULL);
	g_return_if_fail (im != NULL);
	self->_width = n->_width;
	self->_height = n->_height;
	self->_total_width = n->_total_width;
	self->_total_height = n->_total_height;
	self->_task_radius = n->_task_radius;
	self->_alpha = n->_alpha;
	self->priv->_task_count = n->priv->_task_count;
	self->priv->_task_done = n->priv->_task_done;
	_tmp0_ = n->priv->_layout;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_layout);
	self->priv->_layout = _tmp1_;
	self->priv->_posx = n->priv->_posx;
	self->priv->_posy = n->priv->_posy;
	_tmp3_ = n->priv->_image;
	if (_tmp3_ == NULL) {
		_node_image_unref0 (_tmp2_);
		_tmp2_ = NULL;
	} else {
		NodeImage* _tmp4_;
		Style* _tmp5_;
		Style* _tmp6_;
		gint* _tmp7_;
		gint* _tmp8_;
		NodeImage* _tmp9_;
		_tmp4_ = n->priv->_image;
		_tmp5_ = node_get_style (n);
		_tmp6_ = _tmp5_;
		_tmp7_ = style_get_node_width (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = node_image_new_from_node_image (im, _tmp4_, *_tmp8_);
		_node_image_unref0 (_tmp2_);
		_tmp2_ = _tmp9_;
	}
	_tmp10_ = _tmp2_;
	_tmp2_ = NULL;
	_node_image_unref0 (self->priv->_image);
	self->priv->_image = _tmp10_;
	_tmp11_ = self->priv->_name;
	_tmp12_ = n->priv->_name;
	canvas_text_copy (_tmp11_, _tmp12_);
	_tmp13_ = n->priv->_link_color;
	_tmp14_ = __vala_GdkRGBA_copy0 (_tmp13_);
	__vala_GdkRGBA_free0 (self->priv->_link_color);
	self->priv->_link_color = _tmp14_;
	self->priv->_link_color_set = n->priv->_link_color_set;
	self->priv->_link_color_root = n->priv->_link_color_root;
	_tmp15_ = n->priv->_folded;
	node_set_folded (self, _tmp15_);
	_tmp16_ = node_get_note (n);
	_tmp17_ = _tmp16_;
	node_set_note (self, _tmp17_);
	_tmp18_ = node_get_mode (n);
	_tmp19_ = _tmp18_;
	node_set_mode (self, _tmp19_);
	_tmp20_ = n->priv->_parent;
	node_set_parent (self, _tmp20_);
	_tmp21_ = n->priv->_side;
	node_set_side (self, _tmp21_);
	_tmp22_ = node_get_style (n);
	_tmp23_ = _tmp22_;
	node_set_style (self, _tmp23_);
	_tmp24_ = node_get_tree_bbox (self);
	_tmp25_ = _tmp24_;
	_tmp26_ = node_get_tree_bbox (n);
	_tmp27_ = _tmp26_;
	node_bounds_copy_from (_tmp25_, _tmp27_);
	_tmp28_ = node_get_sticker (n);
	_tmp29_ = _tmp28_;
	node_set_sticker (self, _tmp29_);
	_tmp30_ = node_get_sequence (n);
	_tmp31_ = _tmp30_;
	node_set_sequence (self, _tmp31_);
	_tmp32_ = self->priv->_tags;
	_tmp33_ = node_get_tags (n);
	_tmp34_ = _tmp33_;
	tags_copy_tags (_tmp32_, _tmp34_);
	_node_image_unref0 (_tmp2_);
}

gint
node_id (Node* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->_id;
	return result;
}

void
node_reassign_ids (Node* self)
{
	MindMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_next_node_id (_tmp0_);
	_tmp2_ = _tmp1_;
	self->_id = _tmp2_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				GArray* _tmp5_;
				GArray* _tmp6_;
				Node* _tmp7_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				_tmp5_ = self->_children;
				if (!(((guint) i) < _tmp5_->len)) {
					break;
				}
				_tmp6_ = self->_children;
				_tmp7_ = g_array_index (_tmp6_, Node*, (guint) i);
				node_reassign_ids (_tmp7_);
			}
		}
	}
}

void
node_set_posx_only (Node* self,
                    gdouble value)
{
	gdouble diff = 0.0;
	g_return_if_fail (self != NULL);
	diff = value - self->priv->_posx;
	self->priv->_posx = value;
	node_update_tree_bbox (self, diff, (gdouble) 0);
	node_position_text (self);
}

void
node_set_posy_only (Node* self,
                    gdouble value)
{
	gdouble diff = 0.0;
	g_return_if_fail (self != NULL);
	diff = value - self->priv->_posy;
	self->priv->_posy = value;
	node_update_tree_bbox (self, (gdouble) 0, diff);
	node_position_text (self);
}

void
node_set_alpha_only (Node* self,
                     gdouble value)
{
	Callout* _tmp0_;
	g_return_if_fail (self != NULL);
	self->_alpha = value;
	_tmp0_ = self->priv->_callout;
	if (_tmp0_ != NULL) {
		Callout* _tmp1_;
		_tmp1_ = self->priv->_callout;
		callout_set_alpha (_tmp1_, value);
	}
}

void
node_update_alpha (Node* self,
                   gdouble value)
{
	g_return_if_fail (self != NULL);
	if (self->_alpha < 1.0) {
		self->_alpha = value;
	}
	if (node_traversable (self)) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					Node* _tmp4_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->_children;
					if (!(((guint) i) < _tmp2_->len)) {
						break;
					}
					_tmp3_ = self->_children;
					_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
					node_update_alpha (_tmp4_, value);
				}
			}
		}
	}
}

void
node_set_style_for_tree (Node* self,
                         Style* s)
{
	Callout* _tmp0_;
	Callout* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (s != NULL);
	node_set_style (self, s);
	_tmp0_ = node_get_callout (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		Callout* _tmp2_;
		Callout* _tmp3_;
		_tmp2_ = node_get_callout (self);
		_tmp3_ = _tmp2_;
		callout_set_style (_tmp3_, s);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				GArray* _tmp6_;
				GArray* _tmp7_;
				Node* _tmp8_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = self->_children;
				if (!(((guint) i) < _tmp6_->len)) {
					break;
				}
				_tmp7_ = self->_children;
				_tmp8_ = g_array_index (_tmp7_, Node*, (guint) i);
				node_set_style_for_tree (_tmp8_, s);
			}
		}
	}
}

void
node_adjust_posx_only (Node* self,
                       gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_posx = self->priv->_posx + value;
	node_update_tree_bbox (self, value, (gdouble) 0);
	node_position_text (self);
}

void
node_adjust_posy_only (Node* self,
                       gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_posy = self->priv->_posy + value;
	node_update_tree_bbox (self, (gdouble) 0, value);
	node_position_text (self);
}

void
node_update_sequence_num (Node* self)
{
	Node* _tmp0_;
	Node* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_parent;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_parent;
	_tmp2_ = node_get_sequence (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		SequenceNum* _tmp4_;
		SequenceNumType seq_type = 0;
		gboolean _tmp16_ = FALSE;
		Node* _tmp17_;
		SequenceNum* _tmp18_;
		SequenceNum* _tmp23_;
		_tmp4_ = self->priv->_sequence_num;
		if (_tmp4_ == NULL) {
			MindMap* _tmp5_;
			SequenceNum* _tmp6_;
			SequenceNum* _tmp7_;
			Style* _tmp8_;
			PangoFontDescription* _tmp9_;
			PangoFontDescription* _tmp10_;
			const gchar* _tmp11_;
			Style* _tmp12_;
			PangoFontDescription* _tmp13_;
			PangoFontDescription* _tmp14_;
			gint _tmp15_;
			_tmp5_ = self->priv->_map;
			_tmp6_ = sequence_num_new (_tmp5_);
			_sequence_num_unref0 (self->priv->_sequence_num);
			self->priv->_sequence_num = _tmp6_;
			_tmp7_ = self->priv->_sequence_num;
			_tmp8_ = self->priv->_style;
			_tmp9_ = style_get_node_font (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = pango_font_description_get_family (_tmp10_);
			_tmp12_ = self->priv->_style;
			_tmp13_ = style_get_node_font (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = pango_font_description_get_size (_tmp14_) / PANGO_SCALE;
			sequence_num_set_font (_tmp7_, _tmp11_, &_tmp15_, 1.0);
		}
		seq_type = SEQUENCE_NUM_TYPE_NUM;
		_tmp17_ = self->priv->_parent;
		_tmp18_ = _tmp17_->priv->_sequence_num;
		if (_tmp18_ != NULL) {
			Node* _tmp19_;
			SequenceNum* _tmp20_;
			SequenceNumType _tmp21_;
			SequenceNumType _tmp22_;
			_tmp19_ = self->priv->_parent;
			_tmp20_ = _tmp19_->priv->_sequence_num;
			_tmp21_ = sequence_num_get_seq_type (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp16_ = _tmp22_ == SEQUENCE_NUM_TYPE_NUM;
		} else {
			_tmp16_ = FALSE;
		}
		if (_tmp16_) {
			seq_type = SEQUENCE_NUM_TYPE_LETTER;
		}
		_tmp23_ = self->priv->_sequence_num;
		sequence_num_set_num (_tmp23_, node_index (self), seq_type);
	} else {
		_sequence_num_unref0 (self->priv->_sequence_num);
		self->priv->_sequence_num = NULL;
	}
	node_position_text_and_update_size (self);
}

static void
node_real_clear_summary_extents (Node* self)
{
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				Node* node = NULL;
				GArray* _tmp3_;
				Node* _tmp4_;
				Node* _tmp5_;
				Node* _tmp6_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->_children;
				if (!(((guint) i) < _tmp2_->len)) {
					break;
				}
				_tmp3_ = self->_children;
				_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
				_tmp5_ = _g_object_ref0 (_tmp4_);
				node = _tmp5_;
				_tmp6_ = node;
				if (node_last_summarized (_tmp6_)) {
					Node* _tmp7_;
					SummaryNode* _tmp8_;
					SummaryNode* _tmp9_;
					_tmp7_ = node;
					_tmp8_ = node_summary_node (_tmp7_);
					_tmp9_ = _tmp8_;
					summary_node_clear_extents (_tmp9_);
					_g_object_unref0 (_tmp9_);
				}
				_g_object_unref0 (node);
			}
		}
	}
}

void
node_clear_summary_extents (Node* self)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->clear_summary_extents) {
		_klass_->clear_summary_extents (self);
	}
}

static void
node_real_set_summary_extents (Node* self)
{
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				Node* node = NULL;
				GArray* _tmp3_;
				Node* _tmp4_;
				Node* _tmp5_;
				Node* _tmp6_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->_children;
				if (!(((guint) i) < _tmp2_->len)) {
					break;
				}
				_tmp3_ = self->_children;
				_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
				_tmp5_ = _g_object_ref0 (_tmp4_);
				node = _tmp5_;
				_tmp6_ = node;
				if (node_last_summarized (_tmp6_)) {
					Node* _tmp7_;
					SummaryNode* _tmp8_;
					SummaryNode* _tmp9_;
					_tmp7_ = node;
					_tmp8_ = node_summary_node (_tmp7_);
					_tmp9_ = _tmp8_;
					summary_node_set_extents (_tmp9_);
					_g_object_unref0 (_tmp9_);
				}
				_g_object_unref0 (node);
			}
		}
	}
}

void
node_set_summary_extents (Node* self)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->set_summary_extents) {
		_klass_->set_summary_extents (self);
	}
}

static gpointer
_node_bounds_ref0 (gpointer self)
{
	return self ? node_bounds_ref (self) : NULL;
}

static void
node_update_tree_bbox (Node* self,
                       gdouble diffx,
                       gdouble diffy)
{
	NodeBounds* nb = NULL;
	NodeBounds* _tmp0_;
	NodeBounds* _tmp1_;
	NodeBounds* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_tree_bbox (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _node_bounds_ref0 (_tmp1_);
	nb = _tmp2_;
	_tmp3_ = node_bounds_get_x (nb);
	_tmp4_ = _tmp3_;
	node_bounds_set_x (nb, _tmp4_ + diffx);
	_tmp5_ = node_bounds_get_y (nb);
	_tmp6_ = _tmp5_;
	node_bounds_set_y (nb, _tmp6_ + diffy);
	node_set_tree_bbox (self, nb);
	_node_bounds_unref0 (nb);
}

static void
node_position_text_and_update_size (Node* self)
{
	g_return_if_fail (self != NULL);
	node_position_text (self);
	node_update_size (self);
}

static void
node_calculate_node_size (Node* self,
                          gdouble* width,
                          gdouble* height,
                          gdouble* name_space)
{
	gdouble _vala_width = 0.0;
	gdouble _vala_height = 0.0;
	gdouble _vala_name_space = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gdouble stk_height = 0.0;
	gdouble noname_width = 0.0;
	gdouble name_width = 0.0;
	CanvasText* _tmp8_;
	gdouble _tmp9_;
	gdouble _tmp10_;
	gdouble _tmp11_ = 0.0;
	CanvasText* _tmp12_;
	gdouble _tmp13_;
	gdouble _tmp14_;
	gdouble name_height = 0.0;
	gint _tmp18_ = 0;
	NodeImage* _tmp19_;
	gint image_width = 0;
	gint _tmp23_ = 0;
	NodeImage* _tmp24_;
	gint image_height = 0;
	gdouble tg_width = 0.0;
	gdouble tg_height = 0.0;
	gdouble all_width = 0.0;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	stk_height = node_sticker_height (self);
	noname_width = (((node_task_width (self) + node_sticker_width (self)) + node_sequence_width (self)) + node_note_width (self)) + node_linked_node_width (self);
	_tmp8_ = self->priv->_name;
	_tmp9_ = canvas_text_get_width (_tmp8_);
	_tmp10_ = _tmp9_;
	name_width = noname_width + _tmp10_;
	_tmp12_ = self->priv->_name;
	_tmp13_ = canvas_text_get_height (_tmp12_);
	_tmp14_ = _tmp13_;
	if (_tmp14_ < stk_height) {
		_tmp11_ = stk_height;
	} else {
		CanvasText* _tmp15_;
		gdouble _tmp16_;
		gdouble _tmp17_;
		_tmp15_ = self->priv->_name;
		_tmp16_ = canvas_text_get_height (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp11_ = _tmp17_;
	}
	name_height = _tmp11_;
	_tmp19_ = self->priv->_image;
	if (_tmp19_ != NULL) {
		NodeImage* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		_tmp20_ = self->priv->_image;
		_tmp21_ = node_image_get_width (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp18_ = _tmp22_;
	} else {
		_tmp18_ = 0;
	}
	image_width = _tmp18_;
	_tmp24_ = self->priv->_image;
	if (_tmp24_ != NULL) {
		NodeImage* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		_tmp25_ = self->priv->_image;
		_tmp26_ = node_image_get_height (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp23_ = _tmp27_ + padding;
	} else {
		_tmp23_ = 0;
	}
	image_height = _tmp23_;
	tg_width = noname_width + node_tags_width (self);
	tg_height = node_tags_height (self);
	all_width = fmax (name_width, fmax ((gdouble) image_width, tg_width));
	_vala_width = ((margin * 2) + (padding * 2)) + all_width;
	_vala_height = ((((margin * 2) + (padding * 2)) + image_height) + name_height) + tg_height;
	_vala_name_space = all_width - name_width;
	if (width) {
		*width = _vala_width;
	}
	if (height) {
		*height = _vala_height;
	}
	if (name_space) {
		*name_space = _vala_name_space;
	}
}

static void
node_update_size (Node* self)
{
	gdouble name_space = 0.0;
	gdouble orig_width = 0.0;
	gdouble orig_height = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble diffw = 0.0;
	gdouble diffh = 0.0;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	if (!self->priv->_loaded) {
		return;
	}
	orig_width = self->_total_width;
	orig_height = self->_total_height;
	node_calculate_node_size (self, &_tmp0_, &_tmp1_, &_tmp2_);
	self->_width = _tmp0_;
	self->_height = _tmp1_;
	name_space = _tmp2_;
	node_update_total_size (self);
	diffw = self->_total_width - orig_width;
	diffh = self->_total_height - orig_height;
	if (diffw != ((gdouble) 0)) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = diffh != ((gdouble) 0);
	}
	if (_tmp3_) {
		Layout* _tmp4_;
		_tmp4_ = self->priv->_layout;
		if (_tmp4_ != NULL) {
			Layout* _tmp5_;
			_tmp5_ = self->priv->_layout;
			layout_handle_update_by_edit (_tmp5_, self, diffw, diffh);
		}
		g_signal_emit (self, node_signals[NODE_RESIZED_SIGNAL], 0, diffw, diffh);
	}
}

static void
node_update_total_size (Node* self)
{
	gboolean _tmp0_ = FALSE;
	Callout* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_callout;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		Callout* _tmp2_;
		CalloutMode _tmp3_;
		CalloutMode _tmp4_;
		_tmp2_ = self->priv->_callout;
		_tmp3_ = callout_get_mode (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = callout_mode_is_disconnected (_tmp4_);
	}
	if (_tmp0_) {
		self->_total_width = self->_width;
		self->_total_height = self->_height;
	} else {
		NodeSide _tmp5_;
		_tmp5_ = self->priv->_side;
		if (node_side_horizontal (_tmp5_)) {
			gint margin = 0;
			Style* _tmp6_;
			Style* _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			gdouble callout_width = 0.0;
			Callout* _tmp10_;
			gdouble _tmp11_;
			gdouble _tmp12_;
			gdouble callout_height = 0.0;
			Callout* _tmp13_;
			gdouble _tmp14_;
			gdouble _tmp15_;
			gdouble _tmp16_ = 0.0;
			_tmp6_ = node_get_style (self);
			_tmp7_ = _tmp6_;
			_tmp8_ = style_get_node_margin (_tmp7_);
			_tmp9_ = _tmp8_;
			margin = _tmp9_;
			_tmp10_ = self->priv->_callout;
			_tmp11_ = callout_get_total_width (_tmp10_);
			_tmp12_ = _tmp11_;
			callout_width = _tmp12_ + (margin * 2);
			_tmp13_ = self->priv->_callout;
			_tmp14_ = callout_get_total_height (_tmp13_);
			_tmp15_ = _tmp14_;
			callout_height = _tmp15_ + margin;
			if (self->_width < callout_width) {
				_tmp16_ = callout_width;
			} else {
				_tmp16_ = self->_width;
			}
			self->_total_width = _tmp16_;
			self->_total_height = self->_height + callout_height;
		} else {
			gint margin = 0;
			Style* _tmp17_;
			Style* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gdouble callout_width = 0.0;
			Callout* _tmp21_;
			gdouble _tmp22_;
			gdouble _tmp23_;
			gdouble callout_height = 0.0;
			Callout* _tmp24_;
			gdouble _tmp25_;
			gdouble _tmp26_;
			gdouble _tmp27_ = 0.0;
			_tmp17_ = node_get_style (self);
			_tmp18_ = _tmp17_;
			_tmp19_ = style_get_node_margin (_tmp18_);
			_tmp20_ = _tmp19_;
			margin = _tmp20_;
			_tmp21_ = self->priv->_callout;
			_tmp22_ = callout_get_total_width (_tmp21_);
			_tmp23_ = _tmp22_;
			callout_width = _tmp23_ + margin;
			_tmp24_ = self->priv->_callout;
			_tmp25_ = callout_get_total_height (_tmp24_);
			_tmp26_ = _tmp25_;
			callout_height = _tmp26_ + (margin * 2);
			self->_total_width = self->_width + callout_width;
			if (self->_height < callout_height) {
				_tmp27_ = callout_height;
			} else {
				_tmp27_ = self->_height;
			}
			self->_total_height = _tmp27_;
		}
	}
}

void
node_set_callout_modes (Node* self,
                        CalloutMode mode)
{
	Callout* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_callout;
	if (_tmp0_ != NULL) {
		Callout* _tmp1_;
		_tmp1_ = self->priv->_callout;
		callout_set_mode (_tmp1_, mode);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GArray* _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = self->_children;
				if (!(((guint) i) < _tmp4_->len)) {
					break;
				}
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
				node_set_callout_modes (_tmp6_, mode);
			}
		}
	}
}

void
node_update_tree (Node* self)
{
	CanvasText* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_name;
	canvas_text_update_size (_tmp0_, TRUE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GArray* _tmp3_;
				GArray* _tmp4_;
				Node* _tmp5_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = self->_children;
				if (!(((guint) i) < _tmp3_->len)) {
					break;
				}
				_tmp4_ = self->_children;
				_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
				node_update_tree (_tmp5_);
			}
		}
	}
}

static gpointer
_node_image_ref0 (gpointer self)
{
	return self ? node_image_ref (self) : NULL;
}

void
node_set_image (Node* self,
                ImageManager* im,
                NodeImage* ni)
{
	NodeImage* _tmp0_;
	NodeImage* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (im != NULL);
	_tmp0_ = self->priv->_image;
	if (_tmp0_ != NULL) {
		NodeImage* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		_tmp1_ = self->priv->_image;
		_tmp2_ = node_image_get_id (_tmp1_);
		_tmp3_ = _tmp2_;
		image_manager_set_valid (im, _tmp3_, FALSE);
	}
	if (ni != NULL) {
		gint _tmp4_;
		gint _tmp5_;
		_tmp4_ = node_image_get_id (ni);
		_tmp5_ = _tmp4_;
		image_manager_set_valid (im, _tmp5_, TRUE);
	}
	_tmp6_ = _node_image_ref0 (ni);
	_node_image_unref0 (self->priv->_image);
	self->priv->_image = _tmp6_;
	node_update_size (self);
}

guint
node_get_level (Node* self)
{
	Node* p = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	guint level = 0U;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	p = _tmp1_;
	level = (guint) 0;
	while (TRUE) {
		Node* _tmp2_;
		guint _tmp3_;
		Node* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		_tmp2_ = p;
		if (!(_tmp2_ != NULL)) {
			break;
		}
		_tmp3_ = level;
		level = _tmp3_ + 1;
		_tmp4_ = p;
		_tmp5_ = _tmp4_->priv->_parent;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (p);
		p = _tmp6_;
	}
	result = level;
	_g_object_unref0 (p);
	return result;
}

gboolean
node_is_root (Node* self)
{
	Node* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_parent;
	result = _tmp0_ == NULL;
	return result;
}

gboolean
node_traversable (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (!node_is_summarized (self)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = node_last_summarized (self);
	}
	result = _tmp0_;
	return result;
}

static gboolean
node_real_is_summary (Node* self)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
node_is_summary (Node* self)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_summary) {
		return _klass_->is_summary (self);
	}
	return FALSE;
}

static gboolean
node_real_is_summarized (Node* self)
{
	gboolean _tmp0_ = FALSE;
	GArray* _tmp1_;
	gboolean result;
	_tmp1_ = self->_children;
	if (_tmp1_->len == ((guint) 1)) {
		GArray* _tmp2_;
		Node* _tmp3_;
		_tmp2_ = self->_children;
		_tmp3_ = g_array_index (_tmp2_, Node*, (guint) 0);
		_tmp0_ = node_is_summary (_tmp3_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_is_summarized (Node* self)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_summarized) {
		return _klass_->is_summarized (self);
	}
	return FALSE;
}

static gboolean
node_real_first_summarized (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (node_is_summarized (self)) {
		GArray* _tmp1_;
		Node* _tmp2_;
		Node* _tmp3_;
		Node* _tmp4_;
		_tmp1_ = self->_children;
		_tmp2_ = g_array_index (_tmp1_, Node*, (guint) 0);
		_tmp3_ = summary_node_first_node (IS_SUMMARY_NODE (_tmp2_) ? ((SummaryNode*) _tmp2_) : NULL);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == self;
		_g_object_unref0 (_tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_first_summarized (Node* self)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->first_summarized) {
		return _klass_->first_summarized (self);
	}
	return FALSE;
}

static gboolean
node_real_last_summarized (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	if (node_is_summarized (self)) {
		GArray* _tmp1_;
		Node* _tmp2_;
		Node* _tmp3_;
		Node* _tmp4_;
		_tmp1_ = self->_children;
		_tmp2_ = g_array_index (_tmp1_, Node*, (guint) 0);
		_tmp3_ = summary_node_last_node (IS_SUMMARY_NODE (_tmp2_) ? ((SummaryNode*) _tmp2_) : NULL);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == self;
		_g_object_unref0 (_tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_last_summarized (Node* self)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->last_summarized) {
		return _klass_->last_summarized (self);
	}
	return FALSE;
}

SummaryNode*
node_summary_node (Node* self)
{
	SummaryNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (node_is_summarized (self)) {
		GArray* _tmp0_;
		GArray* _tmp1_;
		Node* _tmp2_;
		SummaryNode* _tmp3_;
		SummaryNode* _tmp4_;
		_tmp0_ = node_children (self);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_array_index (_tmp1_, Node*, (guint) 0);
		_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SUMMARY_NODE, SummaryNode));
		_tmp4_ = _tmp3_;
		_g_array_unref0 (_tmp1_);
		result = _tmp4_;
		return result;
	}
	result = NULL;
	return result;
}

gboolean
node_is_between_siblings (Node* self,
                          Node* first,
                          Node* last)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Node* _tmp2_;
	Node* _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (first != NULL, FALSE);
	g_return_val_if_fail (last != NULL, FALSE);
	_tmp2_ = first->priv->_parent;
	_tmp3_ = self->priv->_parent;
	if (_tmp2_ == _tmp3_) {
		Node* _tmp4_;
		Node* _tmp5_;
		_tmp4_ = last->priv->_parent;
		_tmp5_ = self->priv->_parent;
		_tmp1_ = _tmp4_ == _tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp6_ = FALSE;
		if (node_index (first) <= node_index (self)) {
			_tmp6_ = node_index (self) <= node_index (last);
		} else {
			_tmp6_ = FALSE;
		}
		_tmp0_ = _tmp6_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_is_grouped (Node* self)
{
	Node* node = NULL;
	Node* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (self);
	node = _tmp0_;
	while (TRUE) {
		Node* _tmp1_;
		Node* _tmp2_;
		gboolean _tmp3_;
		Node* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		_tmp1_ = node;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = node;
		_tmp3_ = _tmp2_->priv->_group;
		if (_tmp3_) {
			result = TRUE;
			_g_object_unref0 (node);
			return result;
		}
		_tmp4_ = node;
		_tmp5_ = _tmp4_->priv->_parent;
		_tmp6_ = _g_object_ref0 (_tmp5_);
		_g_object_unref0 (node);
		node = _tmp6_;
	}
	result = FALSE;
	_g_object_unref0 (node);
	return result;
}

gint
node_groups_between (Node* self,
                     Node* node)
{
	Node* curr = NULL;
	Node* _tmp0_;
	gint count = 0;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (node != NULL, -1);
	_tmp0_ = _g_object_ref0 (self);
	curr = _tmp0_;
	count = 0;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		Node* _tmp2_;
		gint _tmp4_ = 0;
		Node* _tmp5_;
		gboolean _tmp6_;
		Node* _tmp7_;
		Node* _tmp8_;
		Node* _tmp9_;
		_tmp2_ = curr;
		if (!node_is_root (_tmp2_)) {
			Node* _tmp3_;
			_tmp3_ = curr;
			_tmp1_ = _tmp3_ != node;
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp5_ = curr;
		_tmp6_ = _tmp5_->priv->_group;
		if (_tmp6_) {
			_tmp4_ = 1;
		} else {
			_tmp4_ = 0;
		}
		count += _tmp4_;
		_tmp7_ = curr;
		_tmp8_ = _tmp7_->priv->_parent;
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (curr);
		curr = _tmp9_;
	}
	result = count;
	_g_object_unref0 (curr);
	return result;
}

gboolean
node_main_branch (Node* self)
{
	gboolean _tmp0_ = FALSE;
	Node* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_parent;
	if (_tmp1_ != NULL) {
		Node* _tmp2_;
		Node* _tmp3_;
		_tmp2_ = self->priv->_parent;
		_tmp3_ = _tmp2_->priv->_parent;
		_tmp0_ = _tmp3_ == NULL;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gint
node_descendant_count (Node* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	if (!node_traversable (self)) {
		result = 0;
		return result;
	} else {
		gint count = 0;
		GArray* _tmp0_;
		_tmp0_ = self->_children;
		count = (gint) _tmp0_->len;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					GArray* _tmp4_;
					Node* _tmp5_;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = self->_children;
					if (!(((guint) i) < _tmp3_->len)) {
						break;
					}
					_tmp4_ = self->_children;
					_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
					count += node_descendant_count (_tmp5_);
				}
			}
		}
		result = count;
		return result;
	}
}

gboolean
node_is_leaf (Node* self)
{
	gboolean _tmp0_ = FALSE;
	Node* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_parent;
	if (_tmp1_ != NULL) {
		GArray* _tmp2_;
		_tmp2_ = self->_children;
		_tmp0_ = _tmp2_->len == ((guint) 0);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_is_task (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (self->priv->_task_count > 0) {
		_tmp0_ = node_is_leaf (self);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_is_task_done (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_task_count == self->priv->_task_done;
	return result;
}

gboolean
node_is_descendant_of (Node* self,
                       Node* node)
{
	Node* p = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	Node* _tmp8_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (node != NULL, FALSE);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	p = _tmp1_;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		Node* _tmp3_;
		Node* _tmp5_;
		Node* _tmp6_;
		Node* _tmp7_;
		_tmp3_ = p;
		if (_tmp3_ != NULL) {
			Node* _tmp4_;
			_tmp4_ = p;
			_tmp2_ = _tmp4_ != node;
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp5_ = p;
		_tmp6_ = _tmp5_->priv->_parent;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (p);
		p = _tmp7_;
	}
	_tmp8_ = p;
	result = _tmp8_ == node;
	_g_object_unref0 (p);
	return result;
}

gboolean
node_is_left_of (Node* self,
                 NodeBounds* nb)
{
	NodeBounds* _tmp0_;
	NodeBounds* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	NodeBounds* _tmp4_;
	NodeBounds* _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (nb != NULL, FALSE);
	_tmp0_ = node_get_tree_bbox (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = node_bounds_get_x (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_get_tree_bbox (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = node_bounds_get_width (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = node_bounds_get_x (nb);
	_tmp9_ = _tmp8_;
	result = (_tmp3_ + _tmp7_) < _tmp9_;
	return result;
}

gboolean
node_is_right_of (Node* self,
                  NodeBounds* nb)
{
	NodeBounds* _tmp0_;
	NodeBounds* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (nb != NULL, FALSE);
	_tmp0_ = node_get_tree_bbox (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = node_bounds_get_x (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_bounds_get_x (nb);
	_tmp5_ = _tmp4_;
	_tmp6_ = node_bounds_get_width (nb);
	_tmp7_ = _tmp6_;
	result = _tmp3_ > (_tmp5_ + _tmp7_);
	return result;
}

gboolean
node_is_above (Node* self,
               NodeBounds* nb)
{
	NodeBounds* _tmp0_;
	NodeBounds* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	NodeBounds* _tmp4_;
	NodeBounds* _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (nb != NULL, FALSE);
	_tmp0_ = node_get_tree_bbox (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = node_bounds_get_y (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_get_tree_bbox (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = node_bounds_get_height (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = node_bounds_get_y (nb);
	_tmp9_ = _tmp8_;
	result = (_tmp3_ + _tmp7_) < _tmp9_;
	return result;
}

gboolean
node_is_below (Node* self,
               NodeBounds* nb)
{
	NodeBounds* _tmp0_;
	NodeBounds* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (nb != NULL, FALSE);
	_tmp0_ = node_get_tree_bbox (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = node_bounds_get_y (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_bounds_get_y (nb);
	_tmp5_ = _tmp4_;
	_tmp6_ = node_bounds_get_height (nb);
	_tmp7_ = _tmp6_;
	result = _tmp3_ > (_tmp5_ + _tmp7_);
	return result;
}

gboolean
node_contains_sequence (Node* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = node_get_sequence (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

gboolean
node_is_in_sequence (Node* self)
{
	SequenceNum* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_sequence_num;
	result = _tmp0_ != NULL;
	return result;
}

gdouble
node_task_completion_percentage (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = (self->priv->_task_done / (self->priv->_task_count * 1.0)) * 100;
	return result;
}

gboolean
node_resizer_on_left (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (!node_is_root (self)) {
		NodeSide _tmp1_;
		_tmp1_ = self->priv->_side;
		_tmp0_ = _tmp1_ == NODE_SIDE_LEFT;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
node_real_is_within (Node* self,
                     gdouble x,
                     gdouble y)
{
	gdouble bx = 0.0;
	gdouble by = 0.0;
	gdouble bw = 0.0;
	gdouble bh = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gboolean result;
	node_bbox (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
	bx = _tmp0_;
	by = _tmp1_;
	bw = _tmp2_;
	bh = _tmp3_;
	result = utils_is_within_bounds (x, y, bx, by, bw, bh);
	return result;
}

gboolean
node_is_within (Node* self,
                gdouble x,
                gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within) {
		return _klass_->is_within (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_node (Node* self,
                          gdouble x,
                          gdouble y)
{
	gdouble margin = 0.0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gdouble cx = 0.0;
	gdouble cy = 0.0;
	gdouble cw = 0.0;
	gdouble ch = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	gdouble _tmp7_ = 0.0;
	gboolean result;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = (gdouble) _tmp3_;
	node_node_bbox (self, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
	cx = _tmp4_;
	cy = _tmp5_;
	cw = _tmp6_;
	ch = _tmp7_;
	cx += margin;
	cy += margin;
	cw -= margin * 2;
	ch -= margin * 2;
	result = utils_is_within_bounds (x, y, cx, cy, cw, ch);
	return result;
}

gboolean
node_is_within_node (Node* self,
                     gdouble x,
                     gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_node) {
		return _klass_->is_within_node (self, x, y);
	}
	return FALSE;
}

static void
node_real_task_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble img_height = 0.0;
	gdouble _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	gdouble _tmp16_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_height (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ + padding;
	}
	img_height = (gdouble) _tmp8_;
	_tmp13_ = node_get_posx (self);
	_tmp14_ = _tmp13_;
	_vala_x = (_tmp14_ + margin) + padding;
	_tmp15_ = node_get_posy (self);
	_tmp16_ = _tmp15_;
	_vala_y = (((_tmp16_ + margin) + padding) + img_height) + (((self->_height - ((img_height + (padding * 2)) + (margin * 2))) / 2) - self->_task_radius);
	_vala_w = self->_task_radius * 2;
	_vala_h = self->_task_radius * 2;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_task_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->task_bbox) {
		_klass_->task_bbox (self, x, y, w, h);
	}
}

static void
node_real_sticker_bbox (Node* self,
                        gdouble* x,
                        gdouble* y,
                        gdouble* w,
                        gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble img_height = 0.0;
	gint _tmp13_ = 0;
	GdkPixbuf* _tmp14_;
	gdouble stk_height = 0.0;
	gdouble _tmp18_;
	gdouble _tmp19_;
	gdouble _tmp20_;
	gdouble _tmp21_;
	gint _tmp22_ = 0;
	GdkPixbuf* _tmp23_;
	gint _tmp27_ = 0;
	GdkPixbuf* _tmp28_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_height (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ + padding;
	}
	img_height = (gdouble) _tmp8_;
	_tmp14_ = self->priv->_sticker_buf;
	if (_tmp14_ == NULL) {
		_tmp13_ = 0;
	} else {
		GdkPixbuf* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		_tmp15_ = self->priv->_sticker_buf;
		_tmp16_ = gdk_pixbuf_get_height (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp13_ = _tmp17_;
	}
	stk_height = (gdouble) _tmp13_;
	_tmp18_ = node_get_posx (self);
	_tmp19_ = _tmp18_;
	_vala_x = ((_tmp19_ + margin) + padding) + node_task_width (self);
	_tmp20_ = node_get_posy (self);
	_tmp21_ = _tmp20_;
	_vala_y = ((((_tmp21_ + margin) + padding) + img_height) + ((self->_height - ((img_height + (padding * 2)) + (margin * 2))) / 2)) - (stk_height / 2);
	_tmp23_ = self->priv->_sticker_buf;
	if (_tmp23_ == NULL) {
		_tmp22_ = 0;
	} else {
		GdkPixbuf* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp24_ = self->priv->_sticker_buf;
		_tmp25_ = gdk_pixbuf_get_width (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp22_ = _tmp26_;
	}
	_vala_w = (gdouble) _tmp22_;
	_tmp28_ = self->priv->_sticker_buf;
	if (_tmp28_ == NULL) {
		_tmp27_ = 0;
	} else {
		GdkPixbuf* _tmp29_;
		gint _tmp30_;
		gint _tmp31_;
		_tmp29_ = self->priv->_sticker_buf;
		_tmp30_ = gdk_pixbuf_get_height (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp27_ = _tmp31_;
	}
	_vala_h = (gdouble) _tmp27_;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_sticker_bbox (Node* self,
                   gdouble* x,
                   gdouble* y,
                   gdouble* w,
                   gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->sticker_bbox) {
		_klass_->sticker_bbox (self, x, y, w, h);
	}
}

static void
node_real_sequence_bbox (Node* self,
                         gdouble* x,
                         gdouble* y,
                         gdouble* w,
                         gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble img_height = 0.0;
	gint _tmp13_ = 0;
	GdkPixbuf* _tmp14_;
	gdouble stk_height = 0.0;
	gdouble _tmp18_ = 0.0;
	SequenceNum* _tmp19_;
	gdouble seq_height = 0.0;
	gdouble _tmp23_;
	gdouble _tmp24_;
	CanvasText* _tmp25_;
	CanvasText* _tmp26_;
	gdouble _tmp27_;
	gdouble _tmp28_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_height (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ + padding;
	}
	img_height = (gdouble) _tmp8_;
	_tmp14_ = self->priv->_sticker_buf;
	if (_tmp14_ == NULL) {
		_tmp13_ = 0;
	} else {
		GdkPixbuf* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		_tmp15_ = self->priv->_sticker_buf;
		_tmp16_ = gdk_pixbuf_get_height (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp13_ = _tmp17_;
	}
	stk_height = (gdouble) _tmp13_;
	_tmp19_ = self->priv->_sequence_num;
	if (_tmp19_ == NULL) {
		_tmp18_ = (gdouble) 0;
	} else {
		SequenceNum* _tmp20_;
		gdouble _tmp21_;
		gdouble _tmp22_;
		_tmp20_ = self->priv->_sequence_num;
		_tmp21_ = sequence_num_get_height (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp18_ = _tmp22_;
	}
	seq_height = _tmp18_;
	_tmp23_ = node_get_posx (self);
	_tmp24_ = _tmp23_;
	_vala_x = (((_tmp24_ + margin) + padding) + node_task_width (self)) + node_sticker_width (self);
	_tmp25_ = node_get_name (self);
	_tmp26_ = _tmp25_;
	_tmp27_ = canvas_text_get_posy (_tmp26_);
	_tmp28_ = _tmp27_;
	_vala_y = _tmp28_;
	_vala_w = node_sequence_width (self);
	_vala_h = node_sequence_height (self);
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_sequence_bbox (Node* self,
                    gdouble* x,
                    gdouble* y,
                    gdouble* w,
                    gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->sequence_bbox) {
		_klass_->sequence_bbox (self, x, y, w, h);
	}
}

static void
node_real_linked_node_bbox (Node* self,
                            gdouble* x,
                            gdouble* y,
                            gdouble* w,
                            gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble img_height = 0.0;
	gdouble _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	gdouble _tmp16_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_height (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ + padding;
	}
	img_height = (gdouble) _tmp8_;
	_tmp13_ = node_get_posx (self);
	_tmp14_ = _tmp13_;
	_vala_x = (_tmp14_ + (self->_width - ((node_linked_node_width (self) + padding) + margin))) + self->_ipadx;
	_tmp15_ = node_get_posy (self);
	_tmp16_ = _tmp15_;
	_vala_y = ((((_tmp16_ + padding) + margin) + img_height) + ((self->_height - ((img_height + (padding * 2)) + (margin * 2))) / 2)) - 5;
	_vala_w = (gdouble) 11;
	_vala_h = (gdouble) 11;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_linked_node_bbox (Node* self,
                       gdouble* x,
                       gdouble* y,
                       gdouble* w,
                       gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->linked_node_bbox) {
		_klass_->linked_node_bbox (self, x, y, w, h);
	}
}

static void
node_real_note_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble img_height = 0.0;
	gdouble _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	gdouble _tmp16_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_height (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ + padding;
	}
	img_height = (gdouble) _tmp8_;
	_tmp13_ = node_get_posx (self);
	_tmp14_ = _tmp13_;
	_vala_x = (_tmp14_ + (self->_width - (((node_note_width (self) + node_linked_node_width (self)) + padding) + margin))) + self->_ipadx;
	_tmp15_ = node_get_posy (self);
	_tmp16_ = _tmp15_;
	_vala_y = ((((_tmp16_ + padding) + margin) + img_height) + ((self->_height - ((img_height + (padding * 2)) + (margin * 2))) / 2)) - 5;
	_vala_w = (gdouble) 11;
	_vala_h = (gdouble) 11;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_note_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->note_bbox) {
		_klass_->note_bbox (self, x, y, w, h);
	}
}

static void
node_real_image_bbox (Node* self,
                      gdouble* x,
                      gdouble* y,
                      gdouble* w,
                      gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	NodeImage* _tmp9_;
	gdouble _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	gdouble _tmp16_;
	gint _tmp17_ = 0;
	NodeImage* _tmp18_;
	gint _tmp22_ = 0;
	NodeImage* _tmp23_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp9_ = self->priv->_image;
	if (_tmp9_ == NULL) {
		_tmp8_ = 0;
	} else {
		NodeImage* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		_tmp10_ = self->priv->_image;
		_tmp11_ = node_image_get_width (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ / 2;
	}
	_tmp13_ = node_get_posx (self);
	_tmp14_ = _tmp13_;
	_vala_x = (_tmp14_ + (self->_width / 2)) - _tmp8_;
	_tmp15_ = node_get_posy (self);
	_tmp16_ = _tmp15_;
	_vala_y = (_tmp16_ + padding) + margin;
	_tmp18_ = self->priv->_image;
	if (_tmp18_ == NULL) {
		_tmp17_ = 0;
	} else {
		NodeImage* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		_tmp19_ = self->priv->_image;
		_tmp20_ = node_image_get_width (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp17_ = _tmp21_;
	}
	_vala_w = (gdouble) _tmp17_;
	_tmp23_ = self->priv->_image;
	if (_tmp23_ == NULL) {
		_tmp22_ = 0;
	} else {
		NodeImage* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp24_ = self->priv->_image;
		_tmp25_ = node_image_get_height (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp22_ = _tmp26_;
	}
	_vala_h = (gdouble) _tmp22_;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_image_bbox (Node* self,
                 gdouble* x,
                 gdouble* y,
                 gdouble* w,
                 gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->image_bbox) {
		_klass_->image_bbox (self, x, y, w, h);
	}
}

static void
node_real_resizer_bbox (Node* self,
                        gdouble* x,
                        gdouble* y,
                        gdouble* w,
                        gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp9_;
	gdouble _tmp10_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	if (node_resizer_on_left (self)) {
		gdouble _tmp5_;
		gdouble _tmp6_;
		_tmp5_ = node_get_posx (self);
		_tmp6_ = _tmp5_;
		_tmp4_ = _tmp6_ + margin;
	} else {
		gdouble _tmp7_;
		gdouble _tmp8_;
		_tmp7_ = node_get_posx (self);
		_tmp8_ = _tmp7_;
		_tmp4_ = ((_tmp8_ + self->_width) - margin) - 8;
	}
	_vala_x = _tmp4_;
	_tmp9_ = node_get_posy (self);
	_tmp10_ = _tmp9_;
	_vala_y = _tmp10_ + margin;
	_vala_w = (gdouble) 8;
	_vala_h = (gdouble) 8;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_resizer_bbox (Node* self,
                   gdouble* x,
                   gdouble* y,
                   gdouble* w,
                   gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->resizer_bbox) {
		_klass_->resizer_bbox (self, x, y, w, h);
	}
}

static void
node_real_tag_bbox (Node* self,
                    gint index,
                    gdouble* x,
                    gdouble* y,
                    gdouble* w,
                    gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gint margin = 0;
	Style* _tmp0_;
	Style* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint padding = 0;
	Style* _tmp4_;
	Style* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	CanvasText* _tmp8_;
	CanvasText* _tmp9_;
	gdouble _tmp10_;
	gdouble _tmp11_;
	gdouble _tmp12_;
	gdouble _tmp13_;
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	margin = _tmp3_;
	_tmp4_ = node_get_style (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = style_get_node_padding (_tmp5_);
	_tmp7_ = _tmp6_;
	padding = _tmp7_;
	_tmp8_ = node_get_name (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = canvas_text_get_posx (_tmp9_);
	_tmp11_ = _tmp10_;
	_vala_x = _tmp11_ + (index * 17);
	_tmp12_ = node_get_posy (self);
	_tmp13_ = _tmp12_;
	_vala_y = _tmp13_ + ((self->_height - (margin + padding)) - 8);
	_vala_w = (gdouble) 12;
	_vala_h = (gdouble) 8;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_tag_bbox (Node* self,
               gint index,
               gdouble* x,
               gdouble* y,
               gdouble* w,
               gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->tag_bbox) {
		_klass_->tag_bbox (self, index, x, y, w, h);
	}
}

static void
node_real_tags_bbox (Node* self,
                     gdouble* x,
                     gdouble* y,
                     gdouble* w,
                     gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	Tags* _tmp4_;
	node_tag_bbox (self, 0, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
	_vala_x = _tmp0_;
	_vala_y = _tmp1_;
	_vala_w = _tmp2_;
	_vala_h = _tmp3_;
	_tmp4_ = self->priv->_tags;
	if (tags_size (_tmp4_) > 1) {
		gdouble bx = 0.0;
		gdouble by = 0.0;
		gdouble bw = 0.0;
		gdouble bh = 0.0;
		Tags* _tmp5_;
		gdouble _tmp6_ = 0.0;
		gdouble _tmp7_ = 0.0;
		gdouble _tmp8_ = 0.0;
		gdouble _tmp9_ = 0.0;
		_tmp5_ = self->priv->_tags;
		node_tag_bbox (self, tags_size (_tmp5_) - 1, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
		bx = _tmp6_;
		by = _tmp7_;
		bw = _tmp8_;
		bh = _tmp9_;
		_vala_w = bx + bw;
	}
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_tags_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->tags_bbox) {
		_klass_->tags_bbox (self, x, y, w, h);
	}
}

static gboolean
node_real_is_within_task (Node* self,
                          gdouble x,
                          gdouble y)
{
	gboolean result;
	if (self->priv->_task_count > 0) {
		gdouble tx = 0.0;
		gdouble ty = 0.0;
		gdouble tw = 0.0;
		gdouble th = 0.0;
		gdouble _tmp0_ = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		node_task_bbox (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
		tx = _tmp0_;
		ty = _tmp1_;
		tw = _tmp2_;
		th = _tmp3_;
		result = utils_is_within_bounds (x, y, tx, ty, tw, th);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_task (Node* self,
                     gdouble x,
                     gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_task) {
		return _klass_->is_within_task (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_note (Node* self,
                          gdouble x,
                          gdouble y)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean result;
	_tmp0_ = node_get_note (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		gdouble nx = 0.0;
		gdouble ny = 0.0;
		gdouble nw = 0.0;
		gdouble nh = 0.0;
		gdouble _tmp4_ = 0.0;
		gdouble _tmp5_ = 0.0;
		gdouble _tmp6_ = 0.0;
		gdouble _tmp7_ = 0.0;
		node_note_bbox (self, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
		nx = _tmp4_;
		ny = _tmp5_;
		nw = _tmp6_;
		nh = _tmp7_;
		result = utils_is_within_bounds (x, y, nx, ny, nw, nh);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_note (Node* self,
                     gdouble x,
                     gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_note) {
		return _klass_->is_within_note (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_linked_node (Node* self,
                                 gdouble x,
                                 gdouble y)
{
	NodeLink* _tmp0_;
	NodeLink* _tmp1_;
	gboolean result;
	_tmp0_ = node_get_linked_node (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gdouble lx = 0.0;
		gdouble ly = 0.0;
		gdouble lw = 0.0;
		gdouble lh = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		gdouble _tmp5_ = 0.0;
		node_linked_node_bbox (self, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
		lx = _tmp2_;
		ly = _tmp3_;
		lw = _tmp4_;
		lh = _tmp5_;
		result = utils_is_within_bounds (x, y, lx, ly, lw, lh);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_linked_node (Node* self,
                            gdouble x,
                            gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_linked_node) {
		return _klass_->is_within_linked_node (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_fold (Node* self,
                          gdouble x,
                          gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GArray* _tmp1_;
	gboolean result;
	_tmp1_ = self->_children;
	if (_tmp1_->len > ((guint) 0)) {
		_tmp0_ = !node_is_summarized (self);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gdouble fx = 0.0;
		gdouble fy = 0.0;
		gdouble fw = 0.0;
		gdouble fh = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		gdouble _tmp5_ = 0.0;
		node_fold_bbox (self, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
		fx = _tmp2_;
		fy = _tmp3_;
		fw = _tmp4_;
		fh = _tmp5_;
		result = utils_is_within_bounds (x, y, fx, fy, fw, fh);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_fold (Node* self,
                     gdouble x,
                     gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_fold) {
		return _klass_->is_within_fold (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_fold_area (Node* self,
                               gdouble x,
                               gdouble y)
{
	gboolean _tmp0_ = FALSE;
	GArray* _tmp1_;
	gboolean result;
	_tmp1_ = self->_children;
	if (_tmp1_->len > ((guint) 0)) {
		_tmp0_ = !node_is_summarized (self);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gdouble fx = 0.0;
		gdouble fy = 0.0;
		gdouble fw = 0.0;
		gdouble fh = 0.0;
		gint pad = 0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		gdouble _tmp5_ = 0.0;
		pad = 20;
		node_fold_bbox (self, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
		fx = _tmp2_;
		fy = _tmp3_;
		fw = _tmp4_;
		fh = _tmp5_;
		result = utils_is_within_bounds (x, y, fx - pad, fy - pad, fw + (pad * 2), fh + (pad * 2));
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_fold_area (Node* self,
                          gdouble x,
                          gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_fold_area) {
		return _klass_->is_within_fold_area (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_image (Node* self,
                           gdouble x,
                           gdouble y)
{
	NodeImage* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_image;
	if (_tmp0_ != NULL) {
		gdouble ix = 0.0;
		gdouble iy = 0.0;
		gdouble iw = 0.0;
		gdouble ih = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		node_image_bbox (self, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
		ix = _tmp1_;
		iy = _tmp2_;
		iw = _tmp3_;
		ih = _tmp4_;
		result = utils_is_within_bounds (x, y, ix, iy, iw, ih);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_image (Node* self,
                      gdouble x,
                      gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_image) {
		return _klass_->is_within_image (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_resizer (Node* self,
                             gdouble x,
                             gdouble y)
{
	gboolean _tmp0_ = FALSE;
	NodeMode _tmp1_;
	NodeMode _tmp2_;
	gboolean result;
	_tmp1_ = node_get_mode (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NODE_MODE_CURRENT) {
		_tmp0_ = TRUE;
	} else {
		NodeMode _tmp3_;
		NodeMode _tmp4_;
		_tmp3_ = node_get_mode (self);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ == NODE_MODE_HIGHLIGHTED;
	}
	if (_tmp0_) {
		gdouble rx = 0.0;
		gdouble ry = 0.0;
		gdouble rw = 0.0;
		gdouble rh = 0.0;
		gdouble _tmp5_ = 0.0;
		gdouble _tmp6_ = 0.0;
		gdouble _tmp7_ = 0.0;
		gdouble _tmp8_ = 0.0;
		node_resizer_bbox (self, &_tmp5_, &_tmp6_, &_tmp7_, &_tmp8_);
		rx = _tmp5_;
		ry = _tmp6_;
		rw = _tmp7_;
		rh = _tmp8_;
		result = utils_is_within_bounds (x, y, rx, ry, rw, rh);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_resizer (Node* self,
                        gdouble x,
                        gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_resizer) {
		return _klass_->is_within_resizer (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_tags (Node* self,
                          gdouble x,
                          gdouble y)
{
	Tags* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_tags;
	if (tags_size (_tmp0_) > 0) {
		gdouble tx = 0.0;
		gdouble ty = 0.0;
		gdouble tw = 0.0;
		gdouble th = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		node_tags_bbox (self, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
		tx = _tmp1_;
		ty = _tmp2_;
		tw = _tmp3_;
		th = _tmp4_;
		result = utils_is_within_bounds (x, y, tx, ty, tw, th);
		return result;
	}
	result = FALSE;
	return result;
}

gboolean
node_is_within_tags (Node* self,
                     gdouble x,
                     gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_tags) {
		return _klass_->is_within_tags (self, x, y);
	}
	return FALSE;
}

static gboolean
node_real_is_within_title (Node* self,
                           gdouble x,
                           gdouble y)
{
	gboolean _tmp0_ = FALSE;
	CanvasText* _tmp1_;
	gboolean result;
	_tmp1_ = self->priv->_name;
	if (_tmp1_ != NULL) {
		CanvasText* _tmp2_;
		_tmp2_ = self->priv->_name;
		_tmp0_ = canvas_text_is_within (_tmp2_, x, y);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_is_within_title (Node* self,
                      gdouble x,
                      gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->is_within_title) {
		return _klass_->is_within_title (self, x, y);
	}
	return FALSE;
}

static Node*
node_real_contains (Node* self,
                    gdouble x,
                    gdouble y,
                    gboolean allow_selected)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Node* result;
	if (allow_selected) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp2_ = FALSE;
		NodeMode _tmp3_;
		NodeMode _tmp4_;
		_tmp3_ = node_get_mode (self);
		_tmp4_ = _tmp3_;
		if (_tmp4_ != NODE_MODE_CURRENT) {
			NodeMode _tmp5_;
			NodeMode _tmp6_;
			_tmp5_ = node_get_mode (self);
			_tmp6_ = _tmp5_;
			_tmp2_ = _tmp6_ != NODE_MODE_SELECTED;
		} else {
			_tmp2_ = FALSE;
		}
		_tmp1_ = _tmp2_;
	}
	if (_tmp1_) {
		gboolean _tmp7_ = FALSE;
		if (node_is_within_node (self, x, y)) {
			_tmp7_ = TRUE;
		} else {
			_tmp7_ = node_is_within_fold_area (self, x, y);
		}
		_tmp0_ = _tmp7_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		Node* _tmp8_;
		_tmp8_ = _g_object_ref0 (self);
		result = _tmp8_;
		return result;
	} else {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_folded;
		if (!_tmp9_) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp10_ = FALSE;
					_tmp10_ = TRUE;
					while (TRUE) {
						GArray* _tmp12_;
						Node* tmp = NULL;
						GArray* _tmp13_;
						Node* _tmp14_;
						Node* _tmp15_;
						Node* _tmp16_;
						if (!_tmp10_) {
							gint _tmp11_;
							_tmp11_ = i;
							i = _tmp11_ + 1;
						}
						_tmp10_ = FALSE;
						_tmp12_ = self->_children;
						if (!(((guint) i) < _tmp12_->len)) {
							break;
						}
						_tmp13_ = self->_children;
						_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
						_tmp15_ = node_contains (_tmp14_, x, y, allow_selected);
						tmp = _tmp15_;
						_tmp16_ = tmp;
						if (_tmp16_ != NULL) {
							result = tmp;
							return result;
						}
						_g_object_unref0 (tmp);
					}
				}
			}
		}
	}
	result = NULL;
	return result;
}

Node*
node_contains (Node* self,
               gdouble x,
               gdouble y,
               gboolean allow_selected)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->contains) {
		return _klass_->contains (self, x, y, allow_selected);
	}
	return NULL;
}

static Callout*
node_real_contains_callout (Node* self,
                            gdouble x,
                            gdouble y)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Callout* _tmp2_;
	Callout* result;
	_tmp2_ = self->priv->_callout;
	if (_tmp2_ != NULL) {
		Callout* _tmp3_;
		CalloutMode _tmp4_;
		CalloutMode _tmp5_;
		_tmp3_ = self->priv->_callout;
		_tmp4_ = callout_get_mode (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = !callout_mode_is_disconnected (_tmp5_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		Callout* _tmp6_;
		_tmp6_ = self->priv->_callout;
		_tmp0_ = callout_contains (_tmp6_, x, y);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		Callout* _tmp7_;
		Callout* _tmp8_;
		_tmp7_ = self->priv->_callout;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		result = _tmp8_;
		return result;
	} else {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_folded;
		if (!_tmp9_) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp10_ = FALSE;
					_tmp10_ = TRUE;
					while (TRUE) {
						GArray* _tmp12_;
						Callout* tmp = NULL;
						GArray* _tmp13_;
						Node* _tmp14_;
						Callout* _tmp15_;
						Callout* _tmp16_;
						if (!_tmp10_) {
							gint _tmp11_;
							_tmp11_ = i;
							i = _tmp11_ + 1;
						}
						_tmp10_ = FALSE;
						_tmp12_ = self->_children;
						if (!(((guint) i) < _tmp12_->len)) {
							break;
						}
						_tmp13_ = self->_children;
						_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
						_tmp15_ = node_contains_callout (_tmp14_, x, y);
						tmp = _tmp15_;
						_tmp16_ = tmp;
						if (_tmp16_ != NULL) {
							result = tmp;
							return result;
						}
						_g_object_unref0 (tmp);
					}
				}
			}
		}
	}
	result = NULL;
	return result;
}

Callout*
node_contains_callout (Node* self,
                       gdouble x,
                       gdouble y)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->contains_callout) {
		return _klass_->contains_callout (self, x, y);
	}
	return NULL;
}

static gboolean
node_real_contains_node (Node* self,
                         Node* node)
{
	gboolean result;
	g_return_val_if_fail (node != NULL, FALSE);
	if (node == self) {
		result = TRUE;
		return result;
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					Node* _tmp4_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->_children;
					if (!(((guint) i) < _tmp2_->len)) {
						break;
					}
					_tmp3_ = self->_children;
					_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
					if (node_contains_node (_tmp4_, node)) {
						result = TRUE;
						return result;
					}
				}
			}
		}
		result = FALSE;
		return result;
	}
}

gboolean
node_contains_node (Node* self,
                    Node* node)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->contains_node) {
		return _klass_->contains_node (self, node);
	}
	return FALSE;
}

gboolean
node_intersects_with (Node* self,
                      GdkRectangle* box)
{
	gint int_x = 0;
	gdouble _tmp0_;
	gdouble _tmp1_;
	gint int_y = 0;
	gdouble _tmp2_;
	gdouble _tmp3_;
	gint int_w = 0;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gint int_h = 0;
	gdouble _tmp6_;
	gdouble _tmp7_;
	GdkRectangle node_box = {0};
	GdkRectangle _tmp8_ = {0};
	GdkRectangle _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (box != NULL, FALSE);
	_tmp0_ = node_get_posx (self);
	_tmp1_ = _tmp0_;
	int_x = (gint) _tmp1_;
	_tmp2_ = node_get_posy (self);
	_tmp3_ = _tmp2_;
	int_y = (gint) _tmp3_;
	_tmp4_ = node_get_width (self);
	_tmp5_ = _tmp4_;
	int_w = (gint) _tmp5_;
	_tmp6_ = node_get_height (self);
	_tmp7_ = _tmp6_;
	int_h = (gint) _tmp7_;
	_tmp8_.x = int_x;
	_tmp8_.y = int_y;
	_tmp8_.width = int_w;
	_tmp8_.height = int_h;
	node_box = _tmp8_;
	_tmp9_ = node_box;
	result = gdk_rectangle_intersect (box, &_tmp9_, NULL);
	return result;
}

void
node_get_nodes_within_box (Node* self,
                           GdkRectangle* box,
                           GArray* nodes)
{
	GdkRectangle _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (box != NULL);
	g_return_if_fail (nodes != NULL);
	_tmp0_ = *box;
	if (node_intersects_with (self, &_tmp0_)) {
		Node* _tmp1_;
		_tmp1_ = _g_object_ref0 (self);
		g_array_append_val (nodes, _tmp1_);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GArray* _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				GdkRectangle _tmp7_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = self->_children;
				if (!(((guint) i) < _tmp4_->len)) {
					break;
				}
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
				_tmp7_ = *box;
				node_get_nodes_within_box (_tmp6_, &_tmp7_, nodes);
			}
		}
	}
}

GArray*
node_children (Node* self)
{
	GArray* _tmp0_;
	GArray* _tmp1_;
	GArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_children;
	_tmp1_ = _g_array_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

Node*
node_get_root (Node* self)
{
	Node* n = NULL;
	Node* _tmp0_;
	Node* p = NULL;
	Node* _tmp1_;
	Node* _tmp2_;
	Node* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _g_object_ref0 (self);
	n = _tmp0_;
	_tmp1_ = self->priv->_parent;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	p = _tmp2_;
	while (TRUE) {
		Node* _tmp3_;
		Node* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		Node* _tmp7_;
		Node* _tmp8_;
		_tmp3_ = p;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = p;
		_tmp5_ = _g_object_ref0 (_tmp4_);
		_g_object_unref0 (n);
		n = _tmp5_;
		_tmp6_ = p;
		_tmp7_ = _tmp6_->priv->_parent;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (p);
		p = _tmp8_;
	}
	result = n;
	_g_object_unref0 (p);
	return result;
}

static gint
node_real_index (Node* self)
{
	gint result;
	if (!node_is_root (self)) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					Node* _tmp2_;
					GArray* _tmp3_;
					GArray* _tmp4_;
					gboolean _tmp5_;
					Node* _tmp6_;
					GArray* _tmp7_;
					GArray* _tmp8_;
					Node* _tmp9_;
					gboolean _tmp10_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->priv->_parent;
					_tmp3_ = node_children (_tmp2_);
					_tmp4_ = _tmp3_;
					_tmp5_ = !(((guint) i) < _tmp4_->len);
					_g_array_unref0 (_tmp4_);
					if (_tmp5_) {
						break;
					}
					_tmp6_ = self->priv->_parent;
					_tmp7_ = node_children (_tmp6_);
					_tmp8_ = _tmp7_;
					_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
					_tmp10_ = _tmp9_ == self;
					_g_array_unref0 (_tmp8_);
					if (_tmp10_) {
						result = i;
						return result;
					}
				}
			}
		}
	}
	result = -1;
	return result;
}

gint
node_index (Node* self)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, -1);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->index) {
		return _klass_->index (self);
	}
	return -1;
}

static gint
node_real_side_count (Node* self,
                      NodeSide side)
{
	gint count = 0;
	gint result;
	count = 0;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GArray* _tmp2_;
				GArray* _tmp3_;
				gboolean _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				NodeSide _tmp7_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = node_children (self);
				_tmp3_ = _tmp2_;
				_tmp4_ = !(((guint) i) < _tmp3_->len);
				_g_array_unref0 (_tmp3_);
				if (_tmp4_) {
					break;
				}
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
				_tmp7_ = _tmp6_->priv->_side;
				if (_tmp7_ == side) {
					gint _tmp8_;
					_tmp8_ = count;
					count = _tmp8_ + 1;
				}
			}
		}
	}
	result = count;
	return result;
}

gint
node_side_count (Node* self,
                 NodeSide side)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, -1);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->side_count) {
		return _klass_->side_count (self, side);
	}
	return -1;
}

NodeSide
node_relative_side (Node* self)
{
	NodeSide _tmp0_;
	NodeSide result;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_side;
	switch (_tmp0_) {
		case NODE_SIDE_LEFT:
		case NODE_SIDE_RIGHT:
		{
			NodeSide _tmp1_ = 0;
			gdouble _tmp2_;
			gdouble _tmp3_;
			Node* _tmp4_;
			gdouble _tmp5_;
			gdouble _tmp6_;
			_tmp2_ = node_get_posy (self);
			_tmp3_ = _tmp2_;
			_tmp4_ = self->priv->_parent;
			_tmp5_ = node_get_posy (_tmp4_);
			_tmp6_ = _tmp5_;
			if (_tmp3_ < _tmp6_) {
				_tmp1_ = NODE_SIDE_TOP;
			} else {
				_tmp1_ = NODE_SIDE_BOTTOM;
			}
			result = _tmp1_;
			return result;
		}
		default:
		{
			NodeSide _tmp7_ = 0;
			gdouble _tmp8_;
			gdouble _tmp9_;
			Node* _tmp10_;
			gdouble _tmp11_;
			gdouble _tmp12_;
			_tmp8_ = node_get_posx (self);
			_tmp9_ = _tmp8_;
			_tmp10_ = self->priv->_parent;
			_tmp11_ = node_get_posx (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp9_ < _tmp12_) {
				_tmp7_ = NODE_SIDE_LEFT;
			} else {
				_tmp7_ = NODE_SIDE_RIGHT;
			}
			result = _tmp7_;
			return result;
		}
	}
}

static Node*
node_real_get_node (Node* self,
                    gint id)
{
	Node* result;
	if (self->_id == id) {
		Node* _tmp0_;
		_tmp0_ = _g_object_ref0 (self);
		result = _tmp0_;
		return result;
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					GArray* _tmp4_;
					gboolean _tmp5_;
					Node* node = NULL;
					GArray* _tmp6_;
					GArray* _tmp7_;
					Node* _tmp8_;
					Node* _tmp9_;
					Node* _tmp10_;
					Node* _tmp11_;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = node_children (self);
					_tmp4_ = _tmp3_;
					_tmp5_ = !(((guint) i) < _tmp4_->len);
					_g_array_unref0 (_tmp4_);
					if (_tmp5_) {
						break;
					}
					_tmp6_ = node_children (self);
					_tmp7_ = _tmp6_;
					_tmp8_ = g_array_index (_tmp7_, Node*, (guint) i);
					_tmp9_ = node_get_node (_tmp8_, id);
					_tmp10_ = _tmp9_;
					_g_array_unref0 (_tmp7_);
					node = _tmp10_;
					_tmp11_ = node;
					if (_tmp11_ != NULL) {
						result = node;
						return result;
					}
					_g_object_unref0 (node);
				}
			}
		}
	}
	result = NULL;
	return result;
}

Node*
node_get_node (Node* self,
               gint id)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->get_node) {
		return _klass_->get_node (self, id);
	}
	return NULL;
}

static Node*
node_get_sibling (Node* self,
                  gint dir,
                  gboolean wrap)
{
	gint index = 0;
	Node* result;
	g_return_val_if_fail (self != NULL, NULL);
	index = node_index (self) + dir;
	if (index < 0) {
		Node* _tmp0_ = NULL;
		Node* _tmp8_;
		if (wrap) {
			Node* _tmp1_;
			GArray* _tmp2_;
			GArray* _tmp3_;
			Node* _tmp4_;
			GArray* _tmp5_;
			GArray* _tmp6_;
			Node* _tmp7_;
			_tmp1_ = self->priv->_parent;
			_tmp2_ = node_children (_tmp1_);
			_tmp3_ = _tmp2_;
			_tmp4_ = self->priv->_parent;
			_tmp5_ = node_children (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = g_array_index (_tmp3_, Node*, _tmp6_->len - 1);
			_tmp0_ = _tmp7_;
			_g_array_unref0 (_tmp6_);
			_g_array_unref0 (_tmp3_);
		} else {
			_tmp0_ = NULL;
		}
		_tmp8_ = _g_object_ref0 (_tmp0_);
		result = _tmp8_;
		return result;
	} else {
		Node* _tmp9_;
		GArray* _tmp10_;
		GArray* _tmp11_;
		gboolean _tmp12_;
		_tmp9_ = self->priv->_parent;
		_tmp10_ = node_children (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = ((guint) index) >= _tmp11_->len;
		_g_array_unref0 (_tmp11_);
		if (_tmp12_) {
			Node* _tmp13_ = NULL;
			Node* _tmp18_;
			if (wrap) {
				Node* _tmp14_;
				GArray* _tmp15_;
				GArray* _tmp16_;
				Node* _tmp17_;
				_tmp14_ = self->priv->_parent;
				_tmp15_ = node_children (_tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = g_array_index (_tmp16_, Node*, (guint) 0);
				_tmp13_ = _tmp17_;
				_g_array_unref0 (_tmp16_);
			} else {
				_tmp13_ = NULL;
			}
			_tmp18_ = _g_object_ref0 (_tmp13_);
			result = _tmp18_;
			return result;
		} else {
			Node* _tmp19_;
			GArray* _tmp20_;
			GArray* _tmp21_;
			Node* _tmp22_;
			Node* _tmp23_;
			Node* _tmp24_;
			_tmp19_ = self->priv->_parent;
			_tmp20_ = node_children (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_array_index (_tmp21_, Node*, (guint) index);
			_tmp23_ = _g_object_ref0 (_tmp22_);
			_tmp24_ = _tmp23_;
			_g_array_unref0 (_tmp21_);
			result = _tmp24_;
			return result;
		}
	}
}

Node*
node_previous_sibling (Node* self,
                       gboolean wrap)
{
	Node* _tmp0_;
	Node* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = node_get_sibling (self, -1, wrap);
	result = _tmp0_;
	return result;
}

Node*
node_next_sibling (Node* self,
                   gboolean wrap)
{
	Node* _tmp0_;
	Node* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = node_get_sibling (self, 1, wrap);
	result = _tmp0_;
	return result;
}

static void
node_load_name (Node* self,
                xmlNode* n)
{
	gboolean _tmp0_ = FALSE;
	xmlNode* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = n->children;
	if (_tmp1_ != NULL) {
		xmlNode* _tmp2_;
		_tmp2_ = n->children;
		_tmp0_ = _tmp2_->type == XML_TEXT_NODE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		CanvasText* _tmp3_;
		CanvasText* _tmp4_;
		FormattedText* _tmp5_;
		FormattedText* _tmp6_;
		xmlNode* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp3_ = node_get_name (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = canvas_text_get_text (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = n->children;
		_tmp8_ = (gchar*) xmlNodeGetContent (_tmp7_);
		_tmp9_ = _tmp8_;
		formatted_text_insert_text (_tmp6_, 0, _tmp9_);
		_g_free0 (_tmp9_);
	} else {
		CanvasText* _tmp10_;
		CanvasText* _tmp11_;
		_tmp10_ = node_get_name (self);
		_tmp11_ = _tmp10_;
		canvas_text_load (_tmp11_, n);
		node_position_text (self);
	}
}

static void
node_load_note (Node* self,
                xmlNode* n)
{
	gboolean _tmp0_ = FALSE;
	xmlNode* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = n->children;
	if (_tmp1_ != NULL) {
		xmlNode* _tmp2_;
		_tmp2_ = n->children;
		_tmp0_ = _tmp2_->type == XML_TEXT_NODE;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		xmlNode* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = n->children;
		_tmp4_ = (gchar*) xmlNodeGetContent (_tmp3_);
		_tmp5_ = _tmp4_;
		node_set_note (self, _tmp5_);
		_g_free0 (_tmp5_);
	}
}

static void
node_load_image (Node* self,
                 ImageManager* im,
                 xmlNode* n)
{
	Style* _tmp0_;
	Style* _tmp1_;
	gint* _tmp2_;
	gint* _tmp3_;
	NodeImage* _tmp4_;
	NodeImage* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (im != NULL);
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_node_width (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = node_image_new_from_xml (im, n, *_tmp3_);
	_node_image_unref0 (self->priv->_image);
	self->priv->_image = _tmp4_;
	_tmp5_ = self->priv->_image;
	_tmp6_ = node_image_get_valid (_tmp5_);
	_tmp7_ = _tmp6_;
	if (!_tmp7_) {
		_node_image_unref0 (self->priv->_image);
		self->priv->_image = NULL;
		node_update_size (self);
	}
}

static void
node_load_node_link (Node* self,
                     xmlNode* n)
{
	NodeLink* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_link_new_from_xml (n);
	_node_link_unref0 (self->priv->_linked_node);
	self->priv->_linked_node = _tmp0_;
}

static void
node_load_style (Node* self,
                 xmlNode* n)
{
	Style* _tmp0_;
	CanvasText* _tmp1_;
	Style* _tmp2_;
	PangoAlignment* _tmp3_;
	PangoAlignment* _tmp4_;
	CanvasText* _tmp5_;
	Style* _tmp6_;
	PangoFontDescription* _tmp7_;
	PangoFontDescription* _tmp8_;
	const gchar* _tmp9_;
	Style* _tmp10_;
	PangoFontDescription* _tmp11_;
	PangoFontDescription* _tmp12_;
	gint _tmp13_;
	SequenceNum* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_style;
	style_load_node (_tmp0_, n);
	_tmp1_ = self->priv->_name;
	_tmp2_ = self->priv->_style;
	_tmp3_ = style_get_node_text_align (_tmp2_);
	_tmp4_ = _tmp3_;
	canvas_text_set_text_alignment (_tmp1_, _tmp4_);
	_tmp5_ = self->priv->_name;
	_tmp6_ = self->priv->_style;
	_tmp7_ = style_get_node_font (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = pango_font_description_get_family (_tmp8_);
	_tmp10_ = self->priv->_style;
	_tmp11_ = style_get_node_font (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = pango_font_description_get_size (_tmp12_) / PANGO_SCALE;
	canvas_text_set_font (_tmp5_, _tmp9_, &_tmp13_, 1.0);
	_tmp14_ = self->priv->_sequence_num;
	if (_tmp14_ != NULL) {
		SequenceNum* _tmp15_;
		Style* _tmp16_;
		PangoFontDescription* _tmp17_;
		PangoFontDescription* _tmp18_;
		const gchar* _tmp19_;
		Style* _tmp20_;
		PangoFontDescription* _tmp21_;
		PangoFontDescription* _tmp22_;
		gint _tmp23_;
		_tmp15_ = self->priv->_sequence_num;
		_tmp16_ = self->priv->_style;
		_tmp17_ = style_get_node_font (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = pango_font_description_get_family (_tmp18_);
		_tmp20_ = self->priv->_style;
		_tmp21_ = style_get_node_font (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = pango_font_description_get_size (_tmp22_) / PANGO_SCALE;
		sequence_num_set_font (_tmp15_, _tmp19_, &_tmp23_, 1.0);
	}
}

static void
node_load_callout (Node* self,
                   xmlNode* n)
{
	Callout* _tmp0_;
	Callout* _tmp3_;
	Callout* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_callout;
	if (_tmp0_ == NULL) {
		Callout* _tmp1_;
		Callout* _tmp2_;
		_tmp1_ = callout_new (self);
		_tmp2_ = _tmp1_;
		node_set_callout (self, _tmp2_);
		_g_object_unref0 (_tmp2_);
	}
	_tmp3_ = node_get_callout (self);
	_tmp4_ = _tmp3_;
	callout_load (_tmp4_, n);
}

static gpointer*
vala_g_array_remove_range (GArray* self,
                           guint index,
                           guint length,
                           gint* result_length1)
{
	gpointer* ga = NULL;
	gpointer* _tmp0_;
	gint ga_length1;
	gint _ga_size_;
	gpointer* _tmp6_;
	gint _tmp6__length1;
	gpointer* result;
	g_return_val_if_fail (self != NULL, NULL);
	_vala_assert (self->len >= (index + length), "this.length >= index + length");
	_tmp0_ = g_new0 (gpointer, length);
	ga = _tmp0_;
	ga_length1 = length;
	_ga_size_ = ga_length1;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				gpointer* _tmp3_;
				gint _tmp3__length1;
				gpointer* _tmp4_;
				gint _tmp4__length1;
				gpointer _tmp5_;
				if (!_tmp1_) {
					guint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(i < length)) {
					break;
				}
				_tmp3_ = ga;
				_tmp3__length1 = ga_length1;
				_tmp4_ = self->data;
				_tmp4__length1 = self->len;
				_tmp5_ = _tmp4_[i + index];
				_tmp4_[i + index] = NULL;
				_tmp3_[i] = _tmp5_;
			}
		}
	}
	g_array_remove_range (self, index, length);
	_tmp6_ = ga;
	_tmp6__length1 = ga_length1;
	if (result_length1) {
		*result_length1 = _tmp6__length1;
	}
	result = _tmp6_;
	return result;
}

static void
node_load_nodes (Node* self,
                 xmlNode* n,
                 Node* sibling_parent,
                 GArray** siblings)
{
	GArray* nodes = NULL;
	GArray* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*siblings != NULL);
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_Node_free_function_content_of);
	nodes = _tmp0_;
	{
		xmlNode* it = NULL;
		xmlNode* _tmp1_;
		_tmp1_ = n->children;
		it = _tmp1_;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				xmlNode* _tmp5_;
				xmlNode* _tmp6_;
				if (!_tmp2_) {
					xmlNode* _tmp3_;
					xmlNode* _tmp4_;
					_tmp3_ = it;
					_tmp4_ = _tmp3_->next;
					it = _tmp4_;
				}
				_tmp2_ = FALSE;
				_tmp5_ = it;
				if (!(_tmp5_ != NULL)) {
					break;
				}
				_tmp6_ = it;
				if (_tmp6_->type == XML_ELEMENT_NODE) {
					xmlNode* _tmp7_;
					const gchar* _tmp8_;
					const gchar* _tmp9_;
					GQuark _tmp11_ = 0U;
					static GQuark _tmp10_label0 = 0;
					static GQuark _tmp10_label1 = 0;
					_tmp7_ = it;
					_tmp8_ = _tmp7_->name;
					_tmp9_ = _tmp8_;
					_tmp11_ = (NULL == _tmp9_) ? 0 : g_quark_from_string (_tmp9_);
					if (_tmp11_ == ((0 != _tmp10_label0) ? _tmp10_label0 : (_tmp10_label0 = g_quark_from_static_string ("node")))) {
						switch (0) {
							default:
							{
								Node* node = NULL;
								MindMap* _tmp12_;
								Layout* _tmp13_;
								xmlNode* _tmp14_;
								Node* _tmp15_;
								Node* _tmp16_;
								_tmp12_ = self->priv->_map;
								_tmp13_ = self->priv->_layout;
								_tmp14_ = it;
								_tmp15_ = node_new_from_xml (_tmp12_, _tmp13_, _tmp14_, FALSE, self, &nodes);
								node = _tmp15_;
								_tmp16_ = node;
								node_attach (_tmp16_, self, -1, NULL, TRUE);
								_g_object_unref0 (node);
								break;
							}
						}
					} else if (_tmp11_ == ((0 != _tmp10_label1) ? _tmp10_label1 : (_tmp10_label1 = g_quark_from_static_string ("summary-node")))) {
						switch (0) {
							default:
							{
								SummaryNode* node = NULL;
								MindMap* _tmp17_;
								Layout* _tmp18_;
								xmlNode* _tmp19_;
								SummaryNode* _tmp20_;
								SummaryNode* _tmp21_;
								gint _tmp22_ = 0;
								gpointer* _tmp23_;
								Node** _tmp24_;
								gint _tmp24__length1;
								_tmp17_ = self->priv->_map;
								_tmp18_ = self->priv->_layout;
								_tmp19_ = it;
								_tmp20_ = summary_node_new_from_xml (_tmp17_, _tmp18_, _tmp19_, &nodes);
								node = _tmp20_;
								_tmp21_ = node;
								summary_node_attach_nodes (_tmp21_, sibling_parent, *siblings, FALSE, NULL);
								_tmp23_ = vala_g_array_remove_range (*siblings, (guint) 0, (*siblings)->len, &_tmp22_);
								_tmp24_ = _tmp23_;
								_tmp24__length1 = _tmp22_;
								_tmp24_ = (_vala_array_free (_tmp24_, _tmp24__length1, (GDestroyNotify) g_object_unref), NULL);
								_g_object_unref0 (node);
								break;
							}
						}
					}
				}
			}
		}
	}
	_g_array_unref0 (nodes);
}

static gdouble
double_parse (const gchar* str)
{
	gdouble result;
	g_return_val_if_fail (str != NULL, -1.0);
	result = g_ascii_strtod (str, NULL);
	return result;
}

static gboolean
bool_parse (const gchar* str)
{
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	if (g_strcmp0 (str, "true") == 0) {
		result = TRUE;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static void
node_real_load (Node* self,
                MindMap* map,
                xmlNode* n,
                gboolean isroot,
                Node* sibling_parent,
                GArray** siblings)
{
	gchar* i = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* x = NULL;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* y = NULL;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* w = NULL;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* h = NULL;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* tc = NULL;
	gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* ln = NULL;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* s = NULL;
	gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* f = NULL;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* ts = NULL;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* c = NULL;
	gchar* _tmp31_;
	const gchar* _tmp32_;
	gchar* cr = NULL;
	gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* sk = NULL;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* g = NULL;
	gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* su = NULL;
	gchar* _tmp44_;
	gboolean _tmp45_ = FALSE;
	const gchar* _tmp46_;
	gboolean _tmp49_ = FALSE;
	const gchar* _tmp50_;
	gint _tmp59_ = 0;
	Style* _tmp60_;
	Style* _tmp61_;
	Styles* _tmp62_;
	Style* _tmp63_;
	Style* _tmp64_;
	gchar* srl = NULL;
	gchar* _tmp93_;
	const gchar* _tmp94_;
	gboolean _tmp96_ = FALSE;
	const gchar* _tmp97_;
	Layout* _tmp119_;
	Layout* _tmp120_;
	NodeBounds* _tmp121_;
	NodeBounds* _tmp122_;
	const gchar* _tmp123_;
	g_return_if_fail (map != NULL);
	g_return_if_fail (*siblings != NULL);
	self->priv->_loaded = FALSE;
	_tmp0_ = (gchar*) xmlGetProp (n, (xmlChar*) "id");
	i = _tmp0_;
	_tmp1_ = i;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = i;
		self->_id = atoi (_tmp2_);
		mind_map_set_next_node_id (map, self->_id);
	}
	_tmp3_ = (gchar*) xmlGetProp (n, (xmlChar*) "posx");
	x = _tmp3_;
	_tmp4_ = x;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_;
		_tmp5_ = x;
		self->priv->_posx = double_parse (_tmp5_);
	}
	_tmp6_ = (gchar*) xmlGetProp (n, (xmlChar*) "posy");
	y = _tmp6_;
	_tmp7_ = y;
	if (_tmp7_ != NULL) {
		const gchar* _tmp8_;
		_tmp8_ = y;
		self->priv->_posy = double_parse (_tmp8_);
	}
	_tmp9_ = (gchar*) xmlGetProp (n, (xmlChar*) "width");
	w = _tmp9_;
	_tmp10_ = w;
	if (_tmp10_ != NULL) {
		const gchar* _tmp11_;
		_tmp11_ = w;
		self->_width = double_parse (_tmp11_);
	}
	_tmp12_ = (gchar*) xmlGetProp (n, (xmlChar*) "height");
	h = _tmp12_;
	_tmp13_ = h;
	if (_tmp13_ != NULL) {
		const gchar* _tmp14_;
		_tmp14_ = h;
		self->_height = double_parse (_tmp14_);
	}
	_tmp15_ = (gchar*) xmlGetProp (n, (xmlChar*) "task");
	tc = _tmp15_;
	_tmp16_ = tc;
	if (_tmp16_ != NULL) {
		const gchar* _tmp17_;
		self->priv->_task_count = 1;
		_tmp17_ = tc;
		self->priv->_task_done = atoi (_tmp17_);
	}
	_tmp18_ = (gchar*) xmlGetProp (n, (xmlChar*) "link");
	ln = _tmp18_;
	_tmp19_ = ln;
	if (_tmp19_ != NULL) {
		const gchar* _tmp20_;
		NodeLink* _tmp21_;
		_tmp20_ = ln;
		_tmp21_ = node_link_new_for_local (atoi (_tmp20_));
		_node_link_unref0 (self->priv->_linked_node);
		self->priv->_linked_node = _tmp21_;
	}
	_tmp22_ = (gchar*) xmlGetProp (n, (xmlChar*) "side");
	s = _tmp22_;
	_tmp23_ = s;
	if (_tmp23_ != NULL) {
		const gchar* _tmp24_;
		_tmp24_ = s;
		node_set_side (self, node_side_parse (_tmp24_));
	}
	_tmp25_ = (gchar*) xmlGetProp (n, (xmlChar*) "fold");
	f = _tmp25_;
	_tmp26_ = f;
	if (_tmp26_ != NULL) {
		const gchar* _tmp27_;
		_tmp27_ = f;
		node_set_folded (self, bool_parse (_tmp27_));
	}
	_tmp28_ = (gchar*) xmlGetProp (n, (xmlChar*) "treesize");
	ts = _tmp28_;
	_tmp29_ = ts;
	if (_tmp29_ != NULL) {
		const gchar* _tmp30_;
		_tmp30_ = ts;
		node_set_tree_size (self, double_parse (_tmp30_));
	}
	_tmp31_ = (gchar*) xmlGetProp (n, (xmlChar*) "color");
	c = _tmp31_;
	_tmp32_ = c;
	if (_tmp32_ != NULL) {
		GdkRGBA* _tmp33_;
		const gchar* _tmp34_;
		_tmp33_ = self->priv->_link_color;
		_tmp34_ = c;
		gdk_rgba_parse (_tmp33_, _tmp34_);
		self->priv->_link_color_set = TRUE;
	}
	_tmp35_ = (gchar*) xmlGetProp (n, (xmlChar*) "colorroot");
	cr = _tmp35_;
	_tmp36_ = cr;
	if (_tmp36_ != NULL) {
		const gchar* _tmp37_;
		_tmp37_ = cr;
		self->priv->_link_color_root = bool_parse (_tmp37_);
	}
	_tmp38_ = (gchar*) xmlGetProp (n, (xmlChar*) "sticker");
	sk = _tmp38_;
	_tmp39_ = sk;
	if (_tmp39_ != NULL) {
		const gchar* _tmp40_;
		_tmp40_ = sk;
		node_set_sticker (self, _tmp40_);
	}
	_tmp41_ = (gchar*) xmlGetProp (n, (xmlChar*) "group");
	g = _tmp41_;
	_tmp42_ = g;
	if (_tmp42_ != NULL) {
		const gchar* _tmp43_;
		_tmp43_ = g;
		node_set_group (self, bool_parse (_tmp43_));
	}
	_tmp44_ = (gchar*) xmlGetProp (n, (xmlChar*) "summarized");
	su = _tmp44_;
	_tmp46_ = su;
	if (_tmp46_ != NULL) {
		const gchar* _tmp47_;
		_tmp47_ = su;
		_tmp45_ = bool_parse (_tmp47_);
	} else {
		_tmp45_ = FALSE;
	}
	if (_tmp45_) {
		Node* _tmp48_;
		_tmp48_ = _g_object_ref0 (self);
		g_array_append_val (*siblings, _tmp48_);
	}
	_tmp50_ = x;
	if (_tmp50_ == NULL) {
		const gchar* _tmp51_;
		_tmp51_ = y;
		_tmp49_ = _tmp51_ == NULL;
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		gchar* l = NULL;
		gchar* _tmp52_;
		const gchar* _tmp53_;
		_tmp52_ = (gchar*) xmlGetProp (n, (xmlChar*) "layout");
		l = _tmp52_;
		_tmp53_ = l;
		if (_tmp53_ != NULL) {
			Layouts* _tmp54_;
			Layouts* _tmp55_;
			const gchar* _tmp56_;
			Layout* _tmp57_;
			Layout* _tmp58_;
			_tmp54_ = mind_map_get_layouts (map);
			_tmp55_ = _tmp54_;
			_tmp56_ = l;
			_tmp57_ = layouts_get_layout (_tmp55_, _tmp56_);
			_tmp58_ = _tmp57_;
			node_set_layout (self, _tmp58_);
			_g_object_unref0 (_tmp58_);
		}
		self->priv->_loaded = TRUE;
		_g_free0 (l);
	}
	if (isroot) {
		_tmp59_ = 0;
	} else {
		_tmp59_ = 1;
	}
	_tmp60_ = node_get_style (self);
	_tmp61_ = _tmp60_;
	_tmp62_ = style_inspector_styles;
	_tmp63_ = styles_get_style_for_level (_tmp62_, (guint) _tmp59_, NULL);
	_tmp64_ = _tmp63_;
	style_copy (_tmp61_, _tmp64_);
	_style_unref0 (_tmp64_);
	{
		xmlNode* it = NULL;
		xmlNode* _tmp65_;
		_tmp65_ = n->children;
		it = _tmp65_;
		{
			gboolean _tmp66_ = FALSE;
			_tmp66_ = TRUE;
			while (TRUE) {
				xmlNode* _tmp69_;
				xmlNode* _tmp70_;
				if (!_tmp66_) {
					xmlNode* _tmp67_;
					xmlNode* _tmp68_;
					_tmp67_ = it;
					_tmp68_ = _tmp67_->next;
					it = _tmp68_;
				}
				_tmp66_ = FALSE;
				_tmp69_ = it;
				if (!(_tmp69_ != NULL)) {
					break;
				}
				_tmp70_ = it;
				if (_tmp70_->type == XML_ELEMENT_NODE) {
					xmlNode* _tmp71_;
					const gchar* _tmp72_;
					const gchar* _tmp73_;
					GQuark _tmp75_ = 0U;
					static GQuark _tmp74_label0 = 0;
					static GQuark _tmp74_label1 = 0;
					static GQuark _tmp74_label2 = 0;
					static GQuark _tmp74_label3 = 0;
					static GQuark _tmp74_label4 = 0;
					static GQuark _tmp74_label5 = 0;
					static GQuark _tmp74_label6 = 0;
					static GQuark _tmp74_label7 = 0;
					_tmp71_ = it;
					_tmp72_ = _tmp71_->name;
					_tmp73_ = _tmp72_;
					_tmp75_ = (NULL == _tmp73_) ? 0 : g_quark_from_string (_tmp73_);
					if (_tmp75_ == ((0 != _tmp74_label0) ? _tmp74_label0 : (_tmp74_label0 = g_quark_from_static_string ("nodename")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp76_;
								_tmp76_ = it;
								node_load_name (self, _tmp76_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label1) ? _tmp74_label1 : (_tmp74_label1 = g_quark_from_static_string ("nodenote")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp77_;
								_tmp77_ = it;
								node_load_note (self, _tmp77_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label2) ? _tmp74_label2 : (_tmp74_label2 = g_quark_from_static_string ("nodeimage")))) {
						switch (0) {
							default:
							{
								ImageManager* _tmp78_;
								ImageManager* _tmp79_;
								xmlNode* _tmp80_;
								_tmp78_ = mind_map_get_image_manager (map);
								_tmp79_ = _tmp78_;
								_tmp80_ = it;
								node_load_image (self, _tmp79_, _tmp80_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label3) ? _tmp74_label3 : (_tmp74_label3 = g_quark_from_static_string ("nodelink")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp81_;
								_tmp81_ = it;
								node_load_node_link (self, _tmp81_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label4) ? _tmp74_label4 : (_tmp74_label4 = g_quark_from_static_string ("taglist")))) {
						switch (0) {
							default:
							{
								Tags* _tmp82_;
								Tags* _tmp83_;
								xmlNode* _tmp84_;
								MindMap* _tmp85_;
								MapModel* _tmp86_;
								MapModel* _tmp87_;
								Tags* _tmp88_;
								Tags* _tmp89_;
								_tmp82_ = node_get_tags (self);
								_tmp83_ = _tmp82_;
								_tmp84_ = it;
								_tmp85_ = self->priv->_map;
								_tmp86_ = mind_map_get_model (_tmp85_);
								_tmp87_ = _tmp86_;
								_tmp88_ = map_model_get_tags (_tmp87_);
								_tmp89_ = _tmp88_;
								tags_load_indices (_tmp83_, _tmp84_, _tmp89_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label5) ? _tmp74_label5 : (_tmp74_label5 = g_quark_from_static_string ("style")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp90_;
								_tmp90_ = it;
								node_load_style (self, _tmp90_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label6) ? _tmp74_label6 : (_tmp74_label6 = g_quark_from_static_string ("callout")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp91_;
								_tmp91_ = it;
								node_load_callout (self, _tmp91_);
								break;
							}
						}
					} else if (_tmp75_ == ((0 != _tmp74_label7) ? _tmp74_label7 : (_tmp74_label7 = g_quark_from_static_string ("nodes")))) {
						switch (0) {
							default:
							{
								xmlNode* _tmp92_;
								_tmp92_ = it;
								node_load_nodes (self, _tmp92_, sibling_parent, siblings);
								break;
							}
						}
					}
				}
			}
		}
	}
	_tmp93_ = (gchar*) xmlGetProp (n, (xmlChar*) "sequence");
	srl = _tmp93_;
	_tmp94_ = srl;
	if (_tmp94_ != NULL) {
		const gchar* _tmp95_;
		_tmp95_ = srl;
		node_set_sequence (self, bool_parse (_tmp95_));
	}
	self->priv->_loaded = TRUE;
	node_update_total_size (self);
	node_update_size (self);
	_tmp97_ = x;
	if (_tmp97_ != NULL) {
		_tmp96_ = TRUE;
	} else {
		const gchar* _tmp98_;
		_tmp98_ = y;
		_tmp96_ = _tmp98_ != NULL;
	}
	if (_tmp96_) {
		gchar* l = NULL;
		gchar* _tmp99_;
		const gchar* _tmp100_;
		_tmp99_ = (gchar*) xmlGetProp (n, (xmlChar*) "layout");
		l = _tmp99_;
		_tmp100_ = l;
		if (_tmp100_ != NULL) {
			Layouts* _tmp101_;
			Layouts* _tmp102_;
			const gchar* _tmp103_;
			Layout* _tmp104_;
			Layout* _tmp105_;
			_tmp101_ = mind_map_get_layouts (map);
			_tmp102_ = _tmp101_;
			_tmp103_ = l;
			_tmp104_ = layouts_get_layout (_tmp102_, _tmp103_);
			_tmp105_ = _tmp104_;
			node_set_layout (self, _tmp105_);
			_g_object_unref0 (_tmp105_);
		}
		_g_free0 (l);
	}
	if (isroot) {
		{
			gint j = 0;
			j = 0;
			{
				gboolean _tmp106_ = FALSE;
				_tmp106_ = TRUE;
				while (TRUE) {
					GArray* _tmp108_;
					Node* child = NULL;
					GArray* _tmp109_;
					Node* _tmp110_;
					Node* _tmp111_;
					Node* _tmp112_;
					if (!_tmp106_) {
						gint _tmp107_;
						_tmp107_ = j;
						j = _tmp107_ + 1;
					}
					_tmp106_ = FALSE;
					_tmp108_ = self->_children;
					if (!(((guint) j) < _tmp108_->len)) {
						break;
					}
					_tmp109_ = self->_children;
					_tmp110_ = g_array_index (_tmp109_, Node*, (guint) j);
					_tmp111_ = _g_object_ref0 (_tmp110_);
					child = _tmp111_;
					_tmp112_ = child;
					if (!_tmp112_->priv->_link_color_set) {
						Node* _tmp113_;
						Theme* _tmp114_;
						Theme* _tmp115_;
						GdkRGBA* _tmp116_;
						GdkRGBA* _tmp117_;
						GdkRGBA _tmp118_;
						_tmp113_ = child;
						_tmp114_ = mind_map_get_theme (map);
						_tmp115_ = _tmp114_;
						_tmp116_ = theme_next_color (_tmp115_);
						_tmp117_ = _tmp116_;
						_tmp118_ = *_tmp117_;
						node_set_link_color_child (_tmp113_, &_tmp118_);
						__vala_GdkRGBA_free0 (_tmp117_);
						_g_object_unref0 (_tmp115_);
					}
					_g_object_unref0 (child);
				}
			}
		}
	}
	_tmp119_ = node_get_layout (self);
	_tmp120_ = _tmp119_;
	_tmp121_ = layout_bbox (_tmp120_, self, -1, "node.load");
	_tmp122_ = _tmp121_;
	node_set_tree_bbox (self, _tmp122_);
	_node_bounds_unref0 (_tmp122_);
	_tmp123_ = ts;
	if (_tmp123_ == NULL) {
		gdouble _tmp124_ = 0.0;
		NodeSide _tmp125_;
		_tmp125_ = self->priv->_side;
		if (node_side_horizontal (_tmp125_)) {
			NodeBounds* _tmp126_;
			NodeBounds* _tmp127_;
			gdouble _tmp128_;
			gdouble _tmp129_;
			_tmp126_ = node_get_tree_bbox (self);
			_tmp127_ = _tmp126_;
			_tmp128_ = node_bounds_get_height (_tmp127_);
			_tmp129_ = _tmp128_;
			_tmp124_ = _tmp129_;
		} else {
			NodeBounds* _tmp130_;
			NodeBounds* _tmp131_;
			gdouble _tmp132_;
			gdouble _tmp133_;
			_tmp130_ = node_get_tree_bbox (self);
			_tmp131_ = _tmp130_;
			_tmp132_ = node_bounds_get_width (_tmp131_);
			_tmp133_ = _tmp132_;
			_tmp124_ = _tmp133_;
		}
		node_set_tree_size (self, _tmp124_);
	}
	node_position_text (self);
	_g_free0 (srl);
	_g_free0 (su);
	_g_free0 (g);
	_g_free0 (sk);
	_g_free0 (cr);
	_g_free0 (c);
	_g_free0 (ts);
	_g_free0 (f);
	_g_free0 (s);
	_g_free0 (ln);
	_g_free0 (tc);
	_g_free0 (h);
	_g_free0 (w);
	_g_free0 (y);
	_g_free0 (x);
	_g_free0 (i);
}

void
node_load (Node* self,
           MindMap* map,
           xmlNode* n,
           gboolean isroot,
           Node* sibling_parent,
           GArray** siblings)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->load) {
		_klass_->load (self, map, n, isroot, sibling_parent, siblings);
	}
}

static void
node_real_save (Node* self,
                xmlNode* parent)
{
	xmlNode* _tmp0_;
	_tmp0_ = node_save_node (self);
	xmlAddChild (parent, _tmp0_);
}

void
node_save (Node* self,
           xmlNode* parent)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->save) {
		_klass_->save (self, parent);
	}
}

static gchar*
double_to_string (gdouble self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}

xmlNode*
node_save_node (Node* self)
{
	const gchar* _tmp0_ = NULL;
	xmlNode* node = NULL;
	xmlNode* _tmp1_;
	xmlNode* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	xmlNode* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	xmlNode* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	xmlNode* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	xmlNode* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	xmlNode* _tmp20_;
	NodeSide _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	xmlNode* _tmp24_;
	gboolean _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	xmlNode* _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	xmlNode* _tmp33_;
	gdouble _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	xmlNode* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	xmlNode* _tmp55_;
	Layout* _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	xmlNode* _tmp62_;
	gboolean _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	Style* _tmp66_;
	Style* _tmp67_;
	xmlNode* _tmp68_;
	NodeImage* _tmp69_;
	xmlNode* _tmp72_;
	CanvasText* _tmp73_;
	CanvasText* _tmp74_;
	xmlNode* _tmp75_;
	xmlNode* _tmp76_;
	const gchar* _tmp77_;
	const gchar* _tmp78_;
	xmlNode* _tmp79_;
	Tags* _tmp80_;
	Tags* _tmp81_;
	MindMap* _tmp82_;
	MapModel* _tmp83_;
	MapModel* _tmp84_;
	Tags* _tmp85_;
	Tags* _tmp86_;
	xmlNode* _tmp87_;
	NodeLink* _tmp88_;
	Callout* _tmp92_;
	gboolean _tmp96_ = FALSE;
	GArray* _tmp97_;
	xmlNode* _tmp107_;
	xmlNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (node_is_summary (self)) {
		_tmp0_ = "summary-node";
	} else {
		_tmp0_ = "node";
	}
	_tmp1_ = xmlNewNode (NULL, (xmlChar*) _tmp0_);
	node = _tmp1_;
	_tmp2_ = node;
	_tmp3_ = g_strdup_printf ("%i", self->_id);
	_tmp4_ = _tmp3_;
	xmlNewProp (_tmp2_, (xmlChar*) "id", (xmlChar*) _tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = node;
	_tmp6_ = double_to_string (self->priv->_posx);
	_tmp7_ = _tmp6_;
	xmlNewProp (_tmp5_, (xmlChar*) "posx", (xmlChar*) _tmp7_);
	_g_free0 (_tmp7_);
	_tmp8_ = node;
	_tmp9_ = double_to_string (self->priv->_posy);
	_tmp10_ = _tmp9_;
	xmlNewProp (_tmp8_, (xmlChar*) "posy", (xmlChar*) _tmp10_);
	_g_free0 (_tmp10_);
	_tmp11_ = node;
	_tmp12_ = double_to_string (self->_width);
	_tmp13_ = _tmp12_;
	xmlNewProp (_tmp11_, (xmlChar*) "width", (xmlChar*) _tmp13_);
	_g_free0 (_tmp13_);
	_tmp14_ = node;
	_tmp15_ = double_to_string (self->_height);
	_tmp16_ = _tmp15_;
	xmlNewProp (_tmp14_, (xmlChar*) "height", (xmlChar*) _tmp16_);
	_g_free0 (_tmp16_);
	if (node_is_task (self)) {
		xmlNode* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp17_ = node;
		_tmp18_ = g_strdup_printf ("%i", self->priv->_task_done);
		_tmp19_ = _tmp18_;
		xmlNewProp (_tmp17_, (xmlChar*) "task", (xmlChar*) _tmp19_);
		_g_free0 (_tmp19_);
	}
	_tmp20_ = node;
	_tmp21_ = self->priv->_side;
	_tmp22_ = node_side_to_string (_tmp21_);
	_tmp23_ = _tmp22_;
	xmlNewProp (_tmp20_, (xmlChar*) "side", (xmlChar*) _tmp23_);
	_g_free0 (_tmp23_);
	_tmp24_ = node;
	_tmp25_ = self->priv->_folded;
	_tmp26_ = bool_to_string (_tmp25_);
	_tmp27_ = _tmp26_;
	xmlNewProp (_tmp24_, (xmlChar*) "fold", (xmlChar*) _tmp27_);
	_g_free0 (_tmp27_);
	_tmp28_ = node;
	_tmp29_ = node_get_sequence (self);
	_tmp30_ = _tmp29_;
	_tmp31_ = bool_to_string (_tmp30_);
	_tmp32_ = _tmp31_;
	xmlNewProp (_tmp28_, (xmlChar*) "sequence", (xmlChar*) _tmp32_);
	_g_free0 (_tmp32_);
	_tmp33_ = node;
	_tmp34_ = self->priv->_tree_size;
	_tmp35_ = double_to_string (_tmp34_);
	_tmp36_ = _tmp35_;
	xmlNewProp (_tmp33_, (xmlChar*) "treesize", (xmlChar*) _tmp36_);
	_g_free0 (_tmp36_);
	if (node_is_root (self)) {
		if (self->priv->_link_color_set) {
			xmlNode* _tmp37_;
			GdkRGBA* _tmp38_;
			GdkRGBA _tmp39_;
			gchar* _tmp40_;
			gchar* _tmp41_;
			_tmp37_ = node;
			_tmp38_ = self->priv->_link_color;
			_tmp39_ = *_tmp38_;
			_tmp40_ = utils_color_from_rgba (&_tmp39_);
			_tmp41_ = _tmp40_;
			xmlNewProp (_tmp37_, (xmlChar*) "color", (xmlChar*) _tmp41_);
			_g_free0 (_tmp41_);
		}
	} else {
		xmlNode* _tmp42_;
		GdkRGBA* _tmp43_;
		GdkRGBA _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		xmlNode* _tmp47_;
		gboolean _tmp48_;
		gboolean _tmp49_;
		gchar* _tmp50_;
		gchar* _tmp51_;
		_tmp42_ = node;
		_tmp43_ = self->priv->_link_color;
		_tmp44_ = *_tmp43_;
		_tmp45_ = utils_color_from_rgba (&_tmp44_);
		_tmp46_ = _tmp45_;
		xmlNewProp (_tmp42_, (xmlChar*) "color", (xmlChar*) _tmp46_);
		_g_free0 (_tmp46_);
		_tmp47_ = node;
		_tmp48_ = node_get_link_color_root (self);
		_tmp49_ = _tmp48_;
		_tmp50_ = bool_to_string (_tmp49_);
		_tmp51_ = _tmp50_;
		xmlNewProp (_tmp47_, (xmlChar*) "colorroot", (xmlChar*) _tmp51_);
		_g_free0 (_tmp51_);
	}
	_tmp52_ = node;
	_tmp53_ = bool_to_string (node_is_summarized (self));
	_tmp54_ = _tmp53_;
	xmlNewProp (_tmp52_, (xmlChar*) "summarized", (xmlChar*) _tmp54_);
	_g_free0 (_tmp54_);
	_tmp55_ = node;
	_tmp56_ = self->priv->_layout;
	_tmp57_ = layout_get_name (_tmp56_);
	_tmp58_ = _tmp57_;
	xmlNewProp (_tmp55_, (xmlChar*) "layout", (xmlChar*) _tmp58_);
	_tmp59_ = self->priv->_sticker;
	if (_tmp59_ != NULL) {
		xmlNode* _tmp60_;
		const gchar* _tmp61_;
		_tmp60_ = node;
		_tmp61_ = self->priv->_sticker;
		xmlNewProp (_tmp60_, (xmlChar*) "sticker", (xmlChar*) _tmp61_);
	}
	_tmp62_ = node;
	_tmp63_ = self->priv->_group;
	_tmp64_ = bool_to_string (_tmp63_);
	_tmp65_ = _tmp64_;
	xmlNewProp (_tmp62_, (xmlChar*) "group", (xmlChar*) _tmp65_);
	_g_free0 (_tmp65_);
	_tmp66_ = node_get_style (self);
	_tmp67_ = _tmp66_;
	_tmp68_ = node;
	style_save_node (_tmp67_, _tmp68_);
	_tmp69_ = self->priv->_image;
	if (_tmp69_ != NULL) {
		NodeImage* _tmp70_;
		xmlNode* _tmp71_;
		_tmp70_ = self->priv->_image;
		_tmp71_ = node;
		node_image_save (_tmp70_, _tmp71_);
	}
	_tmp72_ = node;
	_tmp73_ = node_get_name (self);
	_tmp74_ = _tmp73_;
	_tmp75_ = canvas_text_save (_tmp74_, "nodename");
	xmlAddChild (_tmp72_, _tmp75_);
	_tmp76_ = node;
	_tmp77_ = node_get_note (self);
	_tmp78_ = _tmp77_;
	xmlNewTextChild (_tmp76_, NULL, (xmlChar*) "nodenote", (xmlChar*) _tmp78_);
	_tmp79_ = node;
	_tmp80_ = node_get_tags (self);
	_tmp81_ = _tmp80_;
	_tmp82_ = self->priv->_map;
	_tmp83_ = mind_map_get_model (_tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = map_model_get_tags (_tmp84_);
	_tmp86_ = _tmp85_;
	_tmp87_ = tags_save_indices (_tmp81_, _tmp86_);
	xmlAddChild (_tmp79_, _tmp87_);
	_tmp88_ = self->priv->_linked_node;
	if (_tmp88_ != NULL) {
		xmlNode* _tmp89_;
		NodeLink* _tmp90_;
		xmlNode* _tmp91_;
		_tmp89_ = node;
		_tmp90_ = self->priv->_linked_node;
		_tmp91_ = node_link_save (_tmp90_);
		xmlAddChild (_tmp89_, _tmp91_);
	}
	_tmp92_ = self->priv->_callout;
	if (_tmp92_ != NULL) {
		xmlNode* _tmp93_;
		Callout* _tmp94_;
		xmlNode* _tmp95_;
		_tmp93_ = node;
		_tmp94_ = self->priv->_callout;
		_tmp95_ = callout_save (_tmp94_);
		xmlAddChild (_tmp93_, _tmp95_);
	}
	_tmp97_ = self->_children;
	if (_tmp97_->len > ((guint) 0)) {
		_tmp96_ = node_traversable (self);
	} else {
		_tmp96_ = FALSE;
	}
	if (_tmp96_) {
		xmlNode* nodes = NULL;
		xmlNode* _tmp98_;
		xmlNode* _tmp105_;
		xmlNode* _tmp106_;
		_tmp98_ = xmlNewNode (NULL, (xmlChar*) "nodes");
		nodes = _tmp98_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp99_ = FALSE;
				_tmp99_ = TRUE;
				while (TRUE) {
					GArray* _tmp101_;
					GArray* _tmp102_;
					Node* _tmp103_;
					xmlNode* _tmp104_;
					if (!_tmp99_) {
						gint _tmp100_;
						_tmp100_ = i;
						i = _tmp100_ + 1;
					}
					_tmp99_ = FALSE;
					_tmp101_ = self->_children;
					if (!(((guint) i) < _tmp101_->len)) {
						break;
					}
					_tmp102_ = self->_children;
					_tmp103_ = g_array_index (_tmp102_, Node*, (guint) i);
					_tmp104_ = nodes;
					node_save (_tmp103_, _tmp104_);
				}
			}
		}
		_tmp105_ = node;
		_tmp106_ = nodes;
		xmlAddChild (_tmp105_, _tmp106_);
	}
	_tmp107_ = node;
	result = _tmp107_;
	return result;
}

gboolean
node_xml_find (xmlNode* n,
               gint id,
               gchar** name)
{
	gboolean found = FALSE;
	gchar* i = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	g_return_val_if_fail (*name != NULL, FALSE);
	found = FALSE;
	_tmp0_ = (gchar*) xmlGetProp (n, (xmlChar*) "id");
	i = _tmp0_;
	_tmp1_ = i;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_;
		_tmp2_ = i;
		found = atoi (_tmp2_) == id;
	}
	{
		xmlNode* it = NULL;
		xmlNode* _tmp3_;
		_tmp3_ = n->children;
		it = _tmp3_;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				xmlNode* _tmp7_;
				xmlNode* _tmp8_;
				if (!_tmp4_) {
					xmlNode* _tmp5_;
					xmlNode* _tmp6_;
					_tmp5_ = it;
					_tmp6_ = _tmp5_->next;
					it = _tmp6_;
				}
				_tmp4_ = FALSE;
				_tmp7_ = it;
				if (!(_tmp7_ != NULL)) {
					break;
				}
				_tmp8_ = it;
				if (_tmp8_->type == XML_ELEMENT_NODE) {
					xmlNode* _tmp9_;
					const gchar* _tmp10_;
					const gchar* _tmp11_;
					GQuark _tmp13_ = 0U;
					static GQuark _tmp12_label0 = 0;
					static GQuark _tmp12_label1 = 0;
					_tmp9_ = it;
					_tmp10_ = _tmp9_->name;
					_tmp11_ = _tmp10_;
					_tmp13_ = (NULL == _tmp11_) ? 0 : g_quark_from_string (_tmp11_);
					if (_tmp13_ == ((0 != _tmp12_label0) ? _tmp12_label0 : (_tmp12_label0 = g_quark_from_static_string ("nodename")))) {
						switch (0) {
							default:
							{
								gboolean _tmp14_ = FALSE;
								xmlNode* _tmp15_;
								xmlNode* _tmp16_;
								_tmp15_ = it;
								_tmp16_ = _tmp15_->children;
								if (_tmp16_ != NULL) {
									xmlNode* _tmp17_;
									xmlNode* _tmp18_;
									_tmp17_ = it;
									_tmp18_ = _tmp17_->children;
									_tmp14_ = _tmp18_->type == XML_TEXT_NODE;
								} else {
									_tmp14_ = FALSE;
								}
								if (_tmp14_) {
									xmlNode* _tmp19_;
									xmlNode* _tmp20_;
									gchar* _tmp21_;
									_tmp19_ = it;
									_tmp20_ = _tmp19_->children;
									_tmp21_ = (gchar*) xmlNodeGetContent (_tmp20_);
									_g_free0 (*name);
									*name = _tmp21_;
								} else {
									xmlNode* _tmp22_;
									gchar* _tmp23_;
									_tmp22_ = it;
									_tmp23_ = canvas_text_xml_text (_tmp22_);
									_g_free0 (*name);
									*name = _tmp23_;
								}
								break;
							}
						}
					} else if (_tmp13_ == ((0 != _tmp12_label1) ? _tmp12_label1 : (_tmp12_label1 = g_quark_from_static_string ("nodes")))) {
						switch (0) {
							default:
							{
								{
									xmlNode* it2 = NULL;
									xmlNode* _tmp24_;
									xmlNode* _tmp25_;
									_tmp24_ = it;
									_tmp25_ = _tmp24_->children;
									it2 = _tmp25_;
									{
										gboolean _tmp26_ = FALSE;
										_tmp26_ = TRUE;
										while (TRUE) {
											xmlNode* _tmp29_;
											gboolean _tmp30_ = FALSE;
											xmlNode* _tmp31_;
											if (!_tmp26_) {
												xmlNode* _tmp27_;
												xmlNode* _tmp28_;
												_tmp27_ = it2;
												_tmp28_ = _tmp27_->next;
												it2 = _tmp28_;
											}
											_tmp26_ = FALSE;
											_tmp29_ = it2;
											if (!(_tmp29_ != NULL)) {
												break;
											}
											_tmp31_ = it2;
											if (_tmp31_->type == XML_ELEMENT_NODE) {
												xmlNode* _tmp32_;
												const gchar* _tmp33_;
												_tmp32_ = it2;
												_tmp33_ = _tmp32_->name;
												_tmp30_ = g_strcmp0 (_tmp33_, "node") == 0;
											} else {
												_tmp30_ = FALSE;
											}
											if (_tmp30_) {
												xmlNode* _tmp34_;
												gboolean _tmp35_;
												_tmp34_ = it2;
												_tmp35_ = node_xml_find (_tmp34_, id, name);
												if (_tmp35_) {
													result = TRUE;
													_g_free0 (i);
													return result;
												}
											}
										}
									}
								}
								break;
							}
						}
					}
				}
			}
		}
	}
	result = found;
	_g_free0 (i);
	return result;
}

void
node_set_resizable (Node* self,
                    gboolean resizable)
{
	NodeImage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_image;
	if (_tmp0_ != NULL) {
		NodeImage* _tmp1_;
		_tmp1_ = self->priv->_image;
		node_image_set_resizable (_tmp1_, resizable);
	}
}

static void
node_real_resize (Node* self,
                  gdouble diff)
{
	gdouble _tmp0_ = 0.0;
	gint int_diff = 0;
	CanvasText* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	NodeImage* _tmp4_;
	CanvasText* _tmp34_;
	if (node_resizer_on_left (self)) {
		_tmp0_ = 0 - diff;
	} else {
		_tmp0_ = diff;
	}
	diff = _tmp0_;
	int_diff = (gint) diff;
	_tmp1_ = self->priv->_name;
	_tmp2_ = canvas_text_get_width (_tmp1_);
	_tmp3_ = _tmp2_;
	if ((_tmp3_ + diff) < node_tags_width (self)) {
		return;
	}
	_tmp4_ = self->priv->_image;
	if (_tmp4_ == NULL) {
		gboolean _tmp5_ = FALSE;
		Style* _tmp11_;
		Style* _tmp12_;
		Style* _tmp13_;
		Style* _tmp14_;
		gint* _tmp15_;
		gint* _tmp16_;
		gint _tmp17_;
		if (diff < ((gdouble) 0)) {
			Style* _tmp6_;
			Style* _tmp7_;
			gint* _tmp8_;
			gint* _tmp9_;
			_tmp6_ = node_get_style (self);
			_tmp7_ = _tmp6_;
			_tmp8_ = style_get_node_width (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp5_ = ((*_tmp9_) + diff) <= self->priv->_min_width;
		} else {
			CanvasText* _tmp10_;
			_tmp10_ = self->priv->_name;
			_tmp5_ = !canvas_text_is_wrapped (_tmp10_);
		}
		if (_tmp5_) {
			return;
		}
		_tmp11_ = node_get_style (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = node_get_style (self);
		_tmp14_ = _tmp13_;
		_tmp15_ = style_get_node_width (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = (*_tmp16_) + int_diff;
		style_set_node_width (_tmp14_, &_tmp17_);
	} else {
		Style* _tmp18_;
		Style* _tmp19_;
		gint* _tmp20_;
		gint* _tmp21_;
		Style* _tmp22_;
		Style* _tmp23_;
		Style* _tmp24_;
		Style* _tmp25_;
		gint* _tmp26_;
		gint* _tmp27_;
		gint _tmp28_;
		gint int_node_width = 0;
		Style* _tmp29_;
		Style* _tmp30_;
		gint* _tmp31_;
		gint* _tmp32_;
		NodeImage* _tmp33_;
		_tmp18_ = node_get_style (self);
		_tmp19_ = _tmp18_;
		_tmp20_ = style_get_node_width (_tmp19_);
		_tmp21_ = _tmp20_;
		if (((*_tmp21_) + diff) < self->priv->_min_width) {
			return;
		}
		_tmp22_ = node_get_style (self);
		_tmp23_ = _tmp22_;
		_tmp24_ = node_get_style (self);
		_tmp25_ = _tmp24_;
		_tmp26_ = style_get_node_width (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = (*_tmp27_) + int_diff;
		style_set_node_width (_tmp25_, &_tmp28_);
		_tmp29_ = node_get_style (self);
		_tmp30_ = _tmp29_;
		_tmp31_ = style_get_node_width (_tmp30_);
		_tmp32_ = _tmp31_;
		int_node_width = (gint) (*_tmp32_);
		_tmp33_ = self->priv->_image;
		node_image_set_width (_tmp33_, int_node_width);
	}
	_tmp34_ = self->priv->_name;
	canvas_text_resize (_tmp34_, diff);
}

void
node_resize (Node* self,
             gdouble diff)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->resize) {
		_klass_->resize (self, diff);
	}
}

static void
node_real_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gboolean _tmp0_ = FALSE;
	if (node_is_root (self)) {
		_tmp0_ = TRUE;
	} else {
		NodeSide _tmp1_;
		_tmp1_ = self->priv->_side;
		_tmp0_ = node_side_vertical (_tmp1_);
	}
	if (_tmp0_) {
		gdouble _tmp2_;
		gdouble _tmp3_;
		gdouble _tmp4_;
		gdouble _tmp5_;
		_tmp2_ = node_get_posx (self);
		_tmp3_ = _tmp2_;
		_vala_x = _tmp3_;
		_tmp4_ = node_get_posy (self);
		_tmp5_ = _tmp4_;
		_vala_y = _tmp5_;
		_vala_w = self->_total_width;
		_vala_h = self->_total_height;
	} else {
		gdouble _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		gdouble _tmp9_;
		_tmp6_ = node_get_posx (self);
		_tmp7_ = _tmp6_;
		_vala_x = _tmp7_;
		_tmp8_ = node_get_posy (self);
		_tmp9_ = _tmp8_;
		_vala_y = _tmp9_;
		_vala_w = self->_total_width;
		_vala_h = self->_total_height;
	}
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_bbox (Node* self,
           gdouble* x,
           gdouble* y,
           gdouble* w,
           gdouble* h)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->bbox) {
		_klass_->bbox (self, x, y, w, h);
	}
}

void
node_node_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gdouble _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_posx (self);
	_tmp1_ = _tmp0_;
	_vala_x = _tmp1_;
	_tmp2_ = node_get_posy (self);
	_tmp3_ = _tmp2_;
	_vala_y = _tmp3_;
	_vala_w = self->_width;
	_vala_h = self->_height;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_fold_bbox (Node* self,
                gdouble* x,
                gdouble* y,
                gdouble* w,
                gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gdouble bw = 0.0;
	gdouble bh = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	NodeSide _tmp4_;
	g_return_if_fail (self != NULL);
	node_node_bbox (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
	_vala_x = _tmp0_;
	_vala_y = _tmp1_;
	bw = _tmp2_;
	bh = _tmp3_;
	_vala_w = (gdouble) 16;
	_vala_h = (gdouble) 16;
	_tmp4_ = self->priv->_side;
	switch (_tmp4_) {
		case NODE_SIDE_RIGHT:
		{
			Style* _tmp5_;
			Style* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			_tmp5_ = node_get_style (self);
			_tmp6_ = _tmp5_;
			_tmp7_ = style_get_node_padding (_tmp6_);
			_tmp8_ = _tmp7_;
			_vala_x = _vala_x + (bw + _tmp8_);
			_vala_y = _vala_y + ((bh / 2) - (_vala_h / 2));
			break;
		}
		case NODE_SIDE_LEFT:
		{
			Style* _tmp9_;
			Style* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			_tmp9_ = node_get_style (self);
			_tmp10_ = _tmp9_;
			_tmp11_ = style_get_node_padding (_tmp10_);
			_tmp12_ = _tmp11_;
			_vala_x = _vala_x - (_tmp12_ + _vala_w);
			_vala_y = _vala_y + ((bh / 2) - (_vala_h / 2));
			break;
		}
		case NODE_SIDE_TOP:
		{
			Style* _tmp13_;
			Style* _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_vala_x = _vala_x + ((bw / 2) - (_vala_w / 2));
			_tmp13_ = node_get_style (self);
			_tmp14_ = _tmp13_;
			_tmp15_ = style_get_node_padding (_tmp14_);
			_tmp16_ = _tmp15_;
			_vala_y = _vala_y - (_tmp16_ + _vala_h);
			break;
		}
		case NODE_SIDE_BOTTOM:
		{
			Style* _tmp17_;
			Style* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			_vala_x = _vala_x + ((bw / 2) - (_vala_w / 2));
			_tmp17_ = node_get_style (self);
			_tmp18_ = _tmp17_;
			_tmp19_ = style_get_node_padding (_tmp18_);
			_tmp20_ = _tmp19_;
			_vala_y = _vala_y + (bh + _tmp20_);
			break;
		}
		default:
		break;
	}
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

void
node_set_fold (Node* self,
               gboolean value,
               gboolean deep,
               GArray* changed)
{
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	if (deep) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					Node* _tmp4_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->_children;
					if (!(((guint) i) < _tmp2_->len)) {
						break;
					}
					_tmp3_ = self->_children;
					_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
					node_set_fold (_tmp4_, value, deep, changed);
				}
			}
		}
	}
	_tmp5_ = self->priv->_folded;
	if (_tmp5_ != value) {
		Layout* _tmp7_;
		Layout* _tmp8_;
		node_set_folded (self, value);
		if (changed != NULL) {
			Node* _tmp6_;
			_tmp6_ = _g_object_ref0 (self);
			g_array_append_val (changed, _tmp6_);
		}
		_tmp7_ = node_get_layout (self);
		_tmp8_ = _tmp7_;
		layout_handle_update_by_fold (_tmp8_, self);
	}
}

void
node_set_fold_only (Node* self,
                    gboolean value)
{
	Layout* _tmp0_;
	Layout* _tmp1_;
	g_return_if_fail (self != NULL);
	node_set_folded (self, value);
	_tmp0_ = node_get_layout (self);
	_tmp1_ = _tmp0_;
	layout_handle_update_by_fold (_tmp1_, self);
}

gboolean
node_completed_tasks_foldable (Node* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_folded;
	if (!_tmp1_) {
		_tmp0_ = self->priv->_task_count > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		if (self->priv->_task_count == self->priv->_task_done) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp2_ = FALSE;
					_tmp2_ = TRUE;
					while (TRUE) {
						GArray* _tmp4_;
						gboolean _tmp5_ = FALSE;
						GArray* _tmp6_;
						Node* _tmp7_;
						if (!_tmp2_) {
							gint _tmp3_;
							_tmp3_ = i;
							i = _tmp3_ + 1;
						}
						_tmp2_ = FALSE;
						_tmp4_ = self->_children;
						if (!(((guint) i) < _tmp4_->len)) {
							break;
						}
						_tmp6_ = self->_children;
						_tmp7_ = g_array_index (_tmp6_, Node*, (guint) i);
						if (node_is_leaf (_tmp7_)) {
							GArray* _tmp8_;
							Node* _tmp9_;
							_tmp8_ = self->_children;
							_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
							_tmp5_ = _tmp9_->priv->_task_done == 1;
						} else {
							_tmp5_ = FALSE;
						}
						if (_tmp5_) {
							result = TRUE;
							return result;
						}
					}
				}
			}
		}
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp10_ = FALSE;
				_tmp10_ = TRUE;
				while (TRUE) {
					GArray* _tmp12_;
					GArray* _tmp13_;
					Node* _tmp14_;
					if (!_tmp10_) {
						gint _tmp11_;
						_tmp11_ = i;
						i = _tmp11_ + 1;
					}
					_tmp10_ = FALSE;
					_tmp12_ = self->_children;
					if (!(((guint) i) < _tmp12_->len)) {
						break;
					}
					_tmp13_ = self->_children;
					_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
					if (node_completed_tasks_foldable (_tmp14_)) {
						result = TRUE;
						return result;
					}
				}
			}
		}
	}
	result = FALSE;
	return result;
}

gboolean
node_unfoldable (Node* self)
{
	gboolean _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_folded;
	if (_tmp0_) {
		result = TRUE;
		return result;
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					GArray* _tmp4_;
					Node* _tmp5_;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = self->_children;
					if (!(((guint) i) < _tmp3_->len)) {
						break;
					}
					_tmp4_ = self->_children;
					_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
					if (node_unfoldable (_tmp5_)) {
						result = TRUE;
						return result;
					}
				}
			}
		}
	}
	result = FALSE;
	return result;
}

void
node_fold_completed_tasks (Node* self,
                           GArray* changed)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (changed != NULL);
	_tmp1_ = self->priv->_folded;
	if (!_tmp1_) {
		_tmp0_ = self->priv->_task_count > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		if (self->priv->_task_count == self->priv->_task_done) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp2_ = FALSE;
					_tmp2_ = TRUE;
					while (TRUE) {
						GArray* _tmp4_;
						gboolean _tmp5_ = FALSE;
						GArray* _tmp6_;
						Node* _tmp7_;
						if (!_tmp2_) {
							gint _tmp3_;
							_tmp3_ = i;
							i = _tmp3_ + 1;
						}
						_tmp2_ = FALSE;
						_tmp4_ = self->_children;
						if (!(((guint) i) < _tmp4_->len)) {
							break;
						}
						_tmp6_ = self->_children;
						_tmp7_ = g_array_index (_tmp6_, Node*, (guint) i);
						if (node_is_leaf (_tmp7_)) {
							GArray* _tmp8_;
							Node* _tmp9_;
							_tmp8_ = self->_children;
							_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
							_tmp5_ = _tmp9_->priv->_task_done == 1;
						} else {
							_tmp5_ = FALSE;
						}
						if (_tmp5_) {
							node_set_fold (self, TRUE, TRUE, changed);
							return;
						}
					}
				}
			}
		}
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp10_ = FALSE;
				_tmp10_ = TRUE;
				while (TRUE) {
					GArray* _tmp12_;
					GArray* _tmp13_;
					Node* _tmp14_;
					if (!_tmp10_) {
						gint _tmp11_;
						_tmp11_ = i;
						i = _tmp11_ + 1;
					}
					_tmp10_ = FALSE;
					_tmp12_ = self->_children;
					if (!(((guint) i) < _tmp12_->len)) {
						break;
					}
					_tmp13_ = self->_children;
					_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
					node_fold_completed_tasks (_tmp14_, changed);
				}
			}
		}
	}
}

gdouble
node_sticker_width (Node* self)
{
	gdouble _tmp0_ = 0.0;
	GdkPixbuf* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = self->priv->_sticker_buf;
	if (_tmp1_ != NULL) {
		GdkPixbuf* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_sticker_buf;
		_tmp3_ = gdk_pixbuf_get_width (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ + self->_ipadx;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_sticker_height (Node* self)
{
	gint _tmp0_ = 0;
	GdkPixbuf* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = self->priv->_sticker_buf;
	if (_tmp1_ != NULL) {
		GdkPixbuf* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_sticker_buf;
		_tmp3_ = gdk_pixbuf_get_height (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = 0;
	}
	result = (gdouble) _tmp0_;
	return result;
}

gdouble
node_sequence_width (Node* self)
{
	gdouble _tmp0_ = 0.0;
	SequenceNum* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = self->priv->_sequence_num;
	if (_tmp1_ != NULL) {
		SequenceNum* _tmp2_;
		gdouble _tmp3_;
		gdouble _tmp4_;
		_tmp2_ = self->priv->_sequence_num;
		_tmp3_ = sequence_num_get_width (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_sequence_height (Node* self)
{
	gdouble _tmp0_ = 0.0;
	SequenceNum* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = self->priv->_sequence_num;
	if (_tmp1_ != NULL) {
		SequenceNum* _tmp2_;
		gdouble _tmp3_;
		gdouble _tmp4_;
		_tmp2_ = self->priv->_sequence_num;
		_tmp3_ = sequence_num_get_height (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_task_width (Node* self)
{
	gdouble _tmp0_ = 0.0;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	if (self->priv->_task_count > 0) {
		_tmp0_ = (self->_task_radius * 2) + self->_ipadx;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_note_width (Node* self)
{
	gdouble _tmp0_ = 0.0;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = node_get_note (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ > 0) {
		_tmp0_ = 10 + self->_ipadx;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_linked_node_width (Node* self)
{
	gdouble _tmp0_ = 0.0;
	NodeLink* _tmp1_;
	NodeLink* _tmp2_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = node_get_linked_node (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		_tmp0_ = 10 + self->_ipadx;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gdouble
node_tags_width (Node* self)
{
	gint num_tags = 0;
	Tags* _tmp0_;
	gint _tmp1_ = 0;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_tags;
	num_tags = tags_size (_tmp0_);
	if (num_tags == 0) {
		_tmp1_ = 0;
	} else {
		_tmp1_ = (num_tags * 12) + ((num_tags - 1) * 5);
	}
	result = (gdouble) _tmp1_;
	return result;
}

gdouble
node_tags_height (Node* self)
{
	gdouble _tmp0_ = 0.0;
	Tags* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp1_ = self->priv->_tags;
	if (tags_size (_tmp1_) > 0) {
		_tmp0_ = 5 + self->_ipadx;
	} else {
		_tmp0_ = (gdouble) 0;
	}
	result = _tmp0_;
	return result;
}

gboolean
node_move_to_position (Node* self,
                       Node* child,
                       NodeSide side,
                       gdouble x,
                       gdouble y)
{
	gint idx = 0;
	Node* last_selected = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	Node* _tmp34_;
	gboolean _tmp35_ = FALSE;
	GArray* _tmp36_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (child != NULL, FALSE);
	idx = node_index (child);
	_tmp0_ = self->priv->_last_selected_child;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	last_selected = _tmp1_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GArray* _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				NodeSide _tmp7_;
				NodeSide _tmp8_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = self->_children;
				if (!(((guint) i) < _tmp4_->len)) {
					break;
				}
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
				_tmp7_ = _tmp6_->priv->_side;
				_tmp8_ = child->priv->_side;
				if (_tmp7_ == _tmp8_) {
					NodeSide _tmp9_;
					_tmp9_ = child->priv->_side;
					switch (_tmp9_) {
						case NODE_SIDE_LEFT:
						case NODE_SIDE_RIGHT:
						{
							GArray* _tmp10_;
							Node* _tmp11_;
							gdouble _tmp12_;
							gdouble _tmp13_;
							_tmp10_ = self->_children;
							_tmp11_ = g_array_index (_tmp10_, Node*, (guint) i);
							_tmp12_ = node_get_posy (_tmp11_);
							_tmp13_ = _tmp12_;
							if (y < _tmp13_) {
								gint _tmp14_ = 0;
								Node* _tmp15_;
								gboolean _tmp16_ = FALSE;
								node_detach (child, side);
								node_set_attached (child, TRUE);
								if (idx < i) {
									_tmp14_ = 1;
								} else {
									_tmp14_ = 0;
								}
								node_attach (child, self, i - _tmp14_, NULL, FALSE);
								_tmp15_ = last_selected;
								node_set_last_selected_child (self, _tmp15_);
								if (i != (idx + 1)) {
									_tmp16_ = TRUE;
								} else {
									NodeSide _tmp17_;
									_tmp17_ = child->priv->_side;
									_tmp16_ = _tmp17_ != side;
								}
								result = _tmp16_;
								_g_object_unref0 (last_selected);
								return result;
							}
							break;
						}
						case NODE_SIDE_TOP:
						case NODE_SIDE_BOTTOM:
						{
							GArray* _tmp18_;
							Node* _tmp19_;
							gdouble _tmp20_;
							gdouble _tmp21_;
							_tmp18_ = self->_children;
							_tmp19_ = g_array_index (_tmp18_, Node*, (guint) i);
							_tmp20_ = node_get_posx (_tmp19_);
							_tmp21_ = _tmp20_;
							if (x < _tmp21_) {
								gint _tmp22_ = 0;
								Node* _tmp23_;
								gboolean _tmp24_ = FALSE;
								node_detach (child, side);
								node_set_attached (child, TRUE);
								if (idx < i) {
									_tmp22_ = 1;
								} else {
									_tmp22_ = 0;
								}
								node_attach (child, self, i - _tmp22_, NULL, FALSE);
								_tmp23_ = last_selected;
								node_set_last_selected_child (self, _tmp23_);
								if (i != (idx + 1)) {
									_tmp24_ = TRUE;
								} else {
									NodeSide _tmp25_;
									_tmp25_ = child->priv->_side;
									_tmp24_ = _tmp25_ != side;
								}
								result = _tmp24_;
								_g_object_unref0 (last_selected);
								return result;
							}
							break;
						}
						default:
						break;
					}
				} else {
					GArray* _tmp26_;
					Node* _tmp27_;
					NodeSide _tmp28_;
					NodeSide _tmp29_;
					_tmp26_ = self->_children;
					_tmp27_ = g_array_index (_tmp26_, Node*, (guint) i);
					_tmp28_ = _tmp27_->priv->_side;
					_tmp29_ = child->priv->_side;
					if (_tmp28_ > _tmp29_) {
						gint _tmp30_ = 0;
						Node* _tmp31_;
						gboolean _tmp32_ = FALSE;
						node_detach (child, side);
						node_set_attached (child, TRUE);
						if (idx < i) {
							_tmp30_ = 1;
						} else {
							_tmp30_ = 0;
						}
						node_attach (child, self, i - _tmp30_, NULL, FALSE);
						_tmp31_ = last_selected;
						node_set_last_selected_child (self, _tmp31_);
						if (i != (idx + 1)) {
							_tmp32_ = TRUE;
						} else {
							NodeSide _tmp33_;
							_tmp33_ = child->priv->_side;
							_tmp32_ = _tmp33_ != side;
						}
						result = _tmp32_;
						_g_object_unref0 (last_selected);
						return result;
					}
				}
			}
		}
	}
	node_detach (child, side);
	node_set_attached (child, TRUE);
	node_attach (child, self, -1, NULL, FALSE);
	_tmp34_ = last_selected;
	node_set_last_selected_child (self, _tmp34_);
	_tmp36_ = self->_children;
	if (_tmp36_->len != ((guint) (idx + 1))) {
		_tmp35_ = TRUE;
	} else {
		NodeSide _tmp37_;
		_tmp37_ = child->priv->_side;
		_tmp35_ = _tmp37_ != side;
	}
	result = _tmp35_;
	_g_object_unref0 (last_selected);
	return result;
}

void
node_return_to_position (Node* self)
{
	Node* orig_parent = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	gint orig_index = 0;
	NodeSide _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	orig_parent = _tmp1_;
	orig_index = node_index (self);
	_tmp2_ = self->priv->_side;
	node_detach (self, _tmp2_);
	node_set_attached (self, TRUE);
	node_attach (self, orig_parent, orig_index, NULL, FALSE);
	_g_object_unref0 (orig_parent);
}

void
node_swap_with_previous_sibling (Node* self)
{
	Node* other = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	SummaryNode* other_summary = NULL;
	Node* _tmp2_;
	SummaryNode* _tmp3_;
	gint our_index = 0;
	SummaryNode* our_summary = NULL;
	SummaryNode* _tmp4_;
	NodeSide _tmp5_;
	SummaryNode* _tmp6_;
	Node* _tmp8_;
	Node* _tmp9_;
	Node* _tmp10_;
	SummaryNode* _tmp11_;
	Node* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_previous_sibling (self, FALSE);
	other = _tmp0_;
	_tmp1_ = other;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (other);
		return;
	}
	_tmp2_ = other;
	_tmp3_ = node_summary_node (_tmp2_);
	other_summary = _tmp3_;
	our_index = node_index (self);
	_tmp4_ = node_summary_node (self);
	our_summary = _tmp4_;
	_tmp5_ = self->priv->_side;
	node_detach (self, _tmp5_);
	_tmp6_ = our_summary;
	if (_tmp6_ != NULL) {
		SummaryNode* _tmp7_;
		_tmp7_ = our_summary;
		summary_node_remove_node (_tmp7_, self);
	}
	node_set_attached (self, TRUE);
	_tmp8_ = other;
	_tmp9_ = _tmp8_->priv->_parent;
	_tmp10_ = other;
	node_attach (self, _tmp9_, node_index (_tmp10_), NULL, FALSE);
	_tmp11_ = other_summary;
	if (_tmp11_ != NULL) {
		SummaryNode* _tmp12_;
		_tmp12_ = other_summary;
		summary_node_add_node (_tmp12_, self);
	}
	_tmp13_ = self->priv->_parent;
	node_set_last_selected_child (_tmp13_, self);
	_g_object_unref0 (our_summary);
	_g_object_unref0 (other_summary);
	_g_object_unref0 (other);
}

void
node_make_parent_sibling (Node* self)
{
	Node* grandparent = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	gint parent_idx = 0;
	Node* _tmp3_;
	NodeSide _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _tmp0_->priv->_parent;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	grandparent = _tmp2_;
	_tmp3_ = self->priv->_parent;
	parent_idx = node_index (_tmp3_);
	_tmp4_ = self->priv->_side;
	node_detach (self, _tmp4_);
	node_attach (self, grandparent, parent_idx, NULL, TRUE);
	_g_object_unref0 (grandparent);
}

void
node_make_children_siblings (Node* self)
{
	gint idx = 0;
	gint num_children = 0;
	GArray* _tmp0_;
	g_return_if_fail (self != NULL);
	idx = node_index (self);
	_tmp0_ = self->_children;
	num_children = (gint) _tmp0_->len;
	{
		gint i = 0;
		i = num_children - 1;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				Node* child = NULL;
				GArray* _tmp3_;
				Node* _tmp4_;
				Node* _tmp5_;
				Node* _tmp6_;
				Node* _tmp7_;
				NodeSide _tmp8_;
				Node* _tmp9_;
				Node* _tmp10_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ - 1;
				}
				_tmp1_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp3_ = self->_children;
				_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
				_tmp5_ = _g_object_ref0 (_tmp4_);
				child = _tmp5_;
				_tmp6_ = child;
				_tmp7_ = child;
				_tmp8_ = _tmp7_->priv->_side;
				node_detach (_tmp6_, _tmp8_);
				_tmp9_ = child;
				_tmp10_ = self->priv->_parent;
				node_attach (_tmp9_, _tmp10_, idx, NULL, TRUE);
				_g_object_unref0 (child);
			}
		}
	}
}

static void
node_position_text (Node* self)
{
	gdouble node_width = 0.0;
	gdouble node_height = 0.0;
	gdouble name_space = 0.0;
	gdouble _tmp0_ = 0.0;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gint margin = 0;
	Style* _tmp3_;
	Style* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint padding = 0;
	Style* _tmp7_;
	Style* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	gdouble stk_height = 0.0;
	gint _tmp11_ = 0;
	NodeImage* _tmp12_;
	gint img_height = 0;
	gdouble orig_posx = 0.0;
	CanvasText* _tmp16_;
	CanvasText* _tmp17_;
	gdouble _tmp18_;
	gdouble _tmp19_;
	gdouble orig_posy = 0.0;
	CanvasText* _tmp20_;
	CanvasText* _tmp21_;
	gdouble _tmp22_;
	gdouble _tmp23_;
	CanvasText* _tmp24_;
	CanvasText* _tmp25_;
	gdouble _tmp26_;
	gdouble _tmp27_;
	gdouble _tmp28_ = 0.0;
	CanvasText* _tmp29_;
	CanvasText* _tmp30_;
	gdouble _tmp31_;
	gdouble _tmp32_;
	CanvasText* _tmp37_;
	CanvasText* _tmp38_;
	gdouble _tmp39_;
	gdouble _tmp40_;
	Style* _tmp41_;
	Style* _tmp42_;
	PangoAlignment* _tmp43_;
	PangoAlignment* _tmp44_;
	gboolean _tmp61_ = FALSE;
	Callout* _tmp62_;
	g_return_if_fail (self != NULL);
	node_calculate_node_size (self, &_tmp0_, &_tmp1_, &_tmp2_);
	node_width = _tmp0_;
	node_height = _tmp1_;
	name_space = _tmp2_;
	_tmp3_ = node_get_style (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = style_get_node_margin (_tmp4_);
	_tmp6_ = _tmp5_;
	margin = _tmp6_;
	_tmp7_ = node_get_style (self);
	_tmp8_ = _tmp7_;
	_tmp9_ = style_get_node_padding (_tmp8_);
	_tmp10_ = _tmp9_;
	padding = _tmp10_;
	stk_height = node_sticker_height (self);
	_tmp12_ = self->priv->_image;
	if (_tmp12_ != NULL) {
		NodeImage* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp13_ = self->priv->_image;
		_tmp14_ = node_image_get_height (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp11_ = _tmp15_ + padding;
	} else {
		_tmp11_ = 0;
	}
	img_height = _tmp11_;
	_tmp16_ = node_get_name (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = canvas_text_get_posx (_tmp17_);
	_tmp19_ = _tmp18_;
	orig_posx = _tmp19_;
	_tmp20_ = node_get_name (self);
	_tmp21_ = _tmp20_;
	_tmp22_ = canvas_text_get_posy (_tmp21_);
	_tmp23_ = _tmp22_;
	orig_posy = _tmp23_;
	_tmp24_ = node_get_name (self);
	_tmp25_ = _tmp24_;
	_tmp26_ = node_get_posx (self);
	_tmp27_ = _tmp26_;
	canvas_text_set_posx (_tmp25_, ((((_tmp27_ + margin) + padding) + node_task_width (self)) + node_sticker_width (self)) + node_sequence_width (self));
	_tmp29_ = node_get_name (self);
	_tmp30_ = _tmp29_;
	_tmp31_ = canvas_text_get_height (_tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_ < stk_height) {
		CanvasText* _tmp33_;
		CanvasText* _tmp34_;
		gdouble _tmp35_;
		gdouble _tmp36_;
		_tmp33_ = node_get_name (self);
		_tmp34_ = _tmp33_;
		_tmp35_ = canvas_text_get_height (_tmp34_);
		_tmp36_ = _tmp35_;
		_tmp28_ = (stk_height - _tmp36_) / 2;
	} else {
		_tmp28_ = (gdouble) 0;
	}
	_tmp37_ = node_get_name (self);
	_tmp38_ = _tmp37_;
	_tmp39_ = node_get_posy (self);
	_tmp40_ = _tmp39_;
	canvas_text_set_posy (_tmp38_, (((_tmp40_ + margin) + padding) + img_height) + _tmp28_);
	_tmp41_ = node_get_style (self);
	_tmp42_ = _tmp41_;
	_tmp43_ = style_get_node_text_align (_tmp42_);
	_tmp44_ = _tmp43_;
	if (_tmp44_ != NULL) {
		Style* _tmp45_;
		Style* _tmp46_;
		PangoAlignment* _tmp47_;
		PangoAlignment* _tmp48_;
		_tmp45_ = node_get_style (self);
		_tmp46_ = _tmp45_;
		_tmp47_ = style_get_node_text_align (_tmp46_);
		_tmp48_ = _tmp47_;
		switch (*_tmp48_) {
			case PANGO_ALIGN_CENTER:
			{
				CanvasText* _tmp49_;
				CanvasText* _tmp50_;
				CanvasText* _tmp51_;
				CanvasText* _tmp52_;
				gdouble _tmp53_;
				gdouble _tmp54_;
				_tmp49_ = node_get_name (self);
				_tmp50_ = _tmp49_;
				_tmp51_ = node_get_name (self);
				_tmp52_ = _tmp51_;
				_tmp53_ = canvas_text_get_posx (_tmp52_);
				_tmp54_ = _tmp53_;
				canvas_text_set_posx (_tmp52_, _tmp54_ + (name_space / 2));
				break;
			}
			case PANGO_ALIGN_RIGHT:
			{
				CanvasText* _tmp55_;
				CanvasText* _tmp56_;
				CanvasText* _tmp57_;
				CanvasText* _tmp58_;
				gdouble _tmp59_;
				gdouble _tmp60_;
				_tmp55_ = node_get_name (self);
				_tmp56_ = _tmp55_;
				_tmp57_ = node_get_name (self);
				_tmp58_ = _tmp57_;
				_tmp59_ = canvas_text_get_posx (_tmp58_);
				_tmp60_ = _tmp59_;
				canvas_text_set_posx (_tmp58_, _tmp60_ + name_space);
				break;
			}
			default:
			break;
		}
	}
	_tmp62_ = self->priv->_callout;
	if (_tmp62_ != NULL) {
		gboolean _tmp63_ = FALSE;
		CanvasText* _tmp64_;
		CanvasText* _tmp65_;
		gdouble _tmp66_;
		gdouble _tmp67_;
		_tmp64_ = node_get_name (self);
		_tmp65_ = _tmp64_;
		_tmp66_ = canvas_text_get_posx (_tmp65_);
		_tmp67_ = _tmp66_;
		if (orig_posx != _tmp67_) {
			_tmp63_ = TRUE;
		} else {
			CanvasText* _tmp68_;
			CanvasText* _tmp69_;
			gdouble _tmp70_;
			gdouble _tmp71_;
			_tmp68_ = node_get_name (self);
			_tmp69_ = _tmp68_;
			_tmp70_ = canvas_text_get_posy (_tmp69_);
			_tmp71_ = _tmp70_;
			_tmp63_ = orig_posy != _tmp71_;
		}
		_tmp61_ = _tmp63_;
	} else {
		_tmp61_ = FALSE;
	}
	if (_tmp61_) {
		Callout* _tmp72_;
		_tmp72_ = self->priv->_callout;
		callout_position_text (_tmp72_, TRUE);
	}
}

void
node_parent_moved (Node* self,
                   Node* parent,
                   gdouble diffx,
                   gdouble diffy)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parent != NULL);
	self->priv->_posx = self->priv->_posx + diffx;
	self->priv->_posy = self->priv->_posy + diffy;
	node_update_tree_bbox (self, diffx, diffy);
	node_position_text (self);
	if (!node_is_summarized (self)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = node_last_summarized (self);
	}
	if (_tmp0_) {
		g_signal_emit (self, node_signals[NODE_MOVED_SIGNAL], 0, diffx, diffy);
	}
}

static gpointer
vala_g_array_remove_index (GArray* self,
                           guint index)
{
	gpointer g = NULL;
	gpointer* _tmp0_;
	gint _tmp0__length1;
	gpointer _tmp1_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	_vala_assert (self->len > index, "length > index");
	_tmp0_ = self->data;
	_tmp0__length1 = self->len;
	_tmp1_ = _tmp0_[index];
	_tmp0_[index] = NULL;
	g = _tmp1_;
	g_array_remove_index (self, index);
	result = g;
	return result;
}

static void
_node_parent_moved_node_moved (Node* _sender,
                               gdouble diffx,
                               gdouble diffy,
                               gpointer self)
{
	node_parent_moved ((Node*) self, _sender, diffx, diffy);
}

static void
node_real_detach (Node* self,
                  NodeSide side)
{
	Node* _tmp0_;
	_vala_assert (!node_is_summary (self), "!is_summary()");
	_tmp0_ = self->priv->_parent;
	if (_tmp0_ != NULL) {
		gint idx = 0;
		Node* _tmp1_;
		GArray* _tmp2_;
		GArray* _tmp3_;
		Node* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		guint _tmp7_;
		Node* _tmp8_;
		Node* _tmp9_;
		Node* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_;
		Layout* _tmp24_;
		Layout* _tmp25_;
		idx = node_index (self);
		node_propagate_task_info_up (self, 0 - self->priv->_task_count, 0 - self->priv->_task_done);
		_tmp1_ = self->priv->_parent;
		_tmp2_ = node_children (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = vala_g_array_remove_index (_tmp3_, (guint) idx);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp5_);
		_g_array_unref0 (_tmp3_);
		_tmp6_ = self->priv->_parent;
		g_signal_parse_name ("moved", TYPE_NODE, &_tmp7_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _node_parent_moved_node_moved, self);
		_tmp8_ = self->priv->_parent;
		_tmp9_ = _tmp8_->priv->_last_selected_child;
		if (_tmp9_ == self) {
			Node* _tmp10_;
			_tmp10_ = self->priv->_parent;
			node_set_last_selected_child (_tmp10_, NULL);
		}
		_tmp11_ = self->priv->_parent;
		_tmp12_ = node_get_sequence (_tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_) {
			{
				gint i = 0;
				i = idx;
				{
					gboolean _tmp14_ = FALSE;
					_tmp14_ = TRUE;
					while (TRUE) {
						Node* _tmp16_;
						GArray* _tmp17_;
						GArray* _tmp18_;
						gboolean _tmp19_;
						Node* _tmp20_;
						GArray* _tmp21_;
						GArray* _tmp22_;
						Node* _tmp23_;
						if (!_tmp14_) {
							gint _tmp15_;
							_tmp15_ = i;
							i = _tmp15_ + 1;
						}
						_tmp14_ = FALSE;
						_tmp16_ = self->priv->_parent;
						_tmp17_ = node_children (_tmp16_);
						_tmp18_ = _tmp17_;
						_tmp19_ = !(((guint) i) < _tmp18_->len);
						_g_array_unref0 (_tmp18_);
						if (_tmp19_) {
							break;
						}
						_tmp20_ = self->priv->_parent;
						_tmp21_ = node_children (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = g_array_index (_tmp22_, Node*, (guint) i);
						node_update_sequence_num (_tmp23_);
						_g_array_unref0 (_tmp22_);
					}
				}
			}
		}
		_sequence_num_unref0 (self->priv->_sequence_num);
		self->priv->_sequence_num = NULL;
		_tmp24_ = node_get_layout (self);
		_tmp25_ = _tmp24_;
		if (_tmp25_ != NULL) {
			Layout* _tmp26_;
			Layout* _tmp27_;
			Node* _tmp28_;
			gdouble _tmp29_;
			_tmp26_ = node_get_layout (self);
			_tmp27_ = _tmp26_;
			_tmp28_ = self->priv->_parent;
			_tmp29_ = self->priv->_tree_size;
			layout_handle_update_by_delete (_tmp27_, _tmp28_, idx, side, _tmp29_);
		}
		node_set_parent (self, NULL);
		node_set_attached (self, FALSE);
	}
}

void
node_detach (Node* self,
             NodeSide side)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->detach) {
		_klass_->detach (self, side);
	}
}

static void
node_real_delete (Node* self)
{
	NodeSide _tmp0_;
	_tmp0_ = self->priv->_side;
	node_detach (self, _tmp0_);
}

void
node_delete (Node* self)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->delete) {
		_klass_->delete (self);
	}
}

static void
node_real_delete_only (Node* self)
{
	Node* _tmp0_;
	_tmp0_ = self->priv->_parent;
	if (_tmp0_ == NULL) {
		MindMap* _tmp16_;
		MapModel* _tmp17_;
		MapModel* _tmp18_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					GArray* _tmp4_;
					Node* _tmp5_;
					GArray* _tmp6_;
					Node* _tmp7_;
					GArray* _tmp8_;
					Node* _tmp9_;
					MindMap* _tmp10_;
					GArray* _tmp11_;
					GArray* _tmp12_;
					GArray* _tmp13_;
					Node* _tmp14_;
					Node* _tmp15_;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = self->_children;
					if (!(((guint) i) < _tmp3_->len)) {
						break;
					}
					_tmp4_ = self->_children;
					_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
					node_set_parent (_tmp5_, NULL);
					_tmp6_ = self->_children;
					_tmp7_ = g_array_index (_tmp6_, Node*, (guint) i);
					node_set_attached (_tmp7_, FALSE);
					_tmp8_ = self->_children;
					_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
					_sequence_num_unref0 (_tmp9_->priv->_sequence_num);
					_tmp9_->priv->_sequence_num = NULL;
					_tmp10_ = self->priv->_map;
					_tmp11_ = mind_map_get_nodes (_tmp10_);
					_tmp12_ = _tmp11_;
					_tmp13_ = self->_children;
					_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
					_tmp15_ = _g_object_ref0 (_tmp14_);
					g_array_append_val (_tmp12_, _tmp15_);
					_g_array_unref0 (_tmp12_);
				}
			}
		}
		_tmp16_ = self->priv->_map;
		_tmp17_ = mind_map_get_model (_tmp16_);
		_tmp18_ = _tmp17_;
		map_model_remove_root_node (_tmp18_, self);
	} else {
		gint idx = 0;
		Node* _tmp19_;
		GArray* _tmp20_;
		GArray* _tmp21_;
		Node* _tmp22_;
		Node* _tmp23_;
		Node* _tmp24_;
		guint _tmp25_;
		Node* _tmp26_;
		Node* _tmp27_;
		Layout* _tmp29_;
		Layout* _tmp30_;
		idx = node_index (self);
		node_propagate_task_info_up (self, 0 - self->priv->_task_count, 0 - self->priv->_task_done);
		_tmp19_ = self->priv->_parent;
		_tmp20_ = node_children (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_g_array_remove_index (_tmp21_, (guint) idx);
		_tmp23_ = _tmp22_;
		_g_object_unref0 (_tmp23_);
		_g_array_unref0 (_tmp21_);
		_tmp24_ = self->priv->_parent;
		g_signal_parse_name ("moved", TYPE_NODE, &_tmp25_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp24_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp25_, 0, NULL, (GCallback) _node_parent_moved_node_moved, self);
		_tmp26_ = self->priv->_parent;
		_tmp27_ = _tmp26_->priv->_last_selected_child;
		if (_tmp27_ == self) {
			Node* _tmp28_;
			_tmp28_ = self->priv->_parent;
			node_set_last_selected_child (_tmp28_, NULL);
		}
		_tmp29_ = node_get_layout (self);
		_tmp30_ = _tmp29_;
		if (_tmp30_ != NULL) {
			Layout* _tmp31_;
			Layout* _tmp32_;
			Node* _tmp33_;
			NodeSide _tmp34_;
			gdouble _tmp35_;
			_tmp31_ = node_get_layout (self);
			_tmp32_ = _tmp31_;
			_tmp33_ = self->priv->_parent;
			_tmp34_ = self->priv->_side;
			_tmp35_ = self->priv->_tree_size;
			layout_handle_update_by_delete (_tmp32_, _tmp33_, idx, _tmp34_, _tmp35_);
		}
		node_set_attached (self, FALSE);
		{
			gint i = 0;
			GArray* _tmp36_;
			_tmp36_ = self->_children;
			i = (gint) (_tmp36_->len - 1);
			{
				gboolean _tmp37_ = FALSE;
				_tmp37_ = TRUE;
				while (TRUE) {
					GArray* _tmp39_;
					Node* _tmp40_;
					guint _tmp41_;
					GArray* _tmp42_;
					Node* _tmp43_;
					GArray* _tmp44_;
					Node* _tmp45_;
					Node* _tmp46_;
					if (!_tmp37_) {
						gint _tmp38_;
						_tmp38_ = i;
						i = _tmp38_ - 1;
					}
					_tmp37_ = FALSE;
					if (!(i >= 0)) {
						break;
					}
					_tmp39_ = self->_children;
					_tmp40_ = g_array_index (_tmp39_, Node*, (guint) i);
					g_signal_parse_name ("moved", TYPE_NODE, &_tmp41_, NULL, FALSE);
					g_signal_handlers_disconnect_matched (self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp41_, 0, NULL, (GCallback) _node_parent_moved_node_moved, _tmp40_);
					_tmp42_ = self->_children;
					_tmp43_ = g_array_index (_tmp42_, Node*, (guint) i);
					_sequence_num_unref0 (_tmp43_->priv->_sequence_num);
					_tmp43_->priv->_sequence_num = NULL;
					_tmp44_ = self->_children;
					_tmp45_ = g_array_index (_tmp44_, Node*, (guint) i);
					_tmp46_ = self->priv->_parent;
					node_attach (_tmp45_, _tmp46_, idx, NULL, FALSE);
				}
			}
		}
		node_set_parent (self, NULL);
	}
}

void
node_delete_only (Node* self)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->delete_only) {
		_klass_->delete_only (self);
	}
}

static void
node_real_attach_only (Node* self,
                       Node* prev_parent,
                       gint prev_index)
{
	GArray* temp = NULL;
	GArray* _tmp0_;
	GArray* _tmp22_;
	GArray* _tmp23_;
	GArray* _tmp24_;
	GArray* _tmp25_;
	gint _tmp26_ = 0;
	gpointer* _tmp27_;
	Node** _tmp28_;
	gint _tmp28__length1;
	_vala_assert (!node_is_summary (self), "!is_summary()");
	_tmp0_ = g_array_new (TRUE, TRUE, sizeof (Node*));
	g_array_set_clear_func (_tmp0_, (GDestroyNotify) _vala_Node_free_function_content_of);
	temp = _tmp0_;
	{
		gint i = 0;
		GArray* _tmp1_;
		GArray* _tmp2_;
		gint _tmp3_;
		_tmp1_ = node_children (self);
		_tmp2_ = _tmp1_;
		_tmp3_ = (gint) (_tmp2_->len - 1);
		_g_array_unref0 (_tmp2_);
		i = _tmp3_;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				Node* child = NULL;
				GArray* _tmp6_;
				GArray* _tmp7_;
				Node* _tmp8_;
				Node* _tmp9_;
				Node* _tmp10_;
				Node* _tmp11_;
				GArray* _tmp19_;
				Node* _tmp20_;
				Node* _tmp21_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ - 1;
				}
				_tmp4_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp6_ = node_children (self);
				_tmp7_ = _tmp6_;
				_tmp8_ = g_array_index (_tmp7_, Node*, (guint) i);
				_tmp9_ = _g_object_ref0 (_tmp8_);
				_tmp10_ = _tmp9_;
				_g_array_unref0 (_tmp7_);
				child = _tmp10_;
				_tmp11_ = child;
				if (node_is_root (_tmp11_)) {
					MindMap* _tmp12_;
					MapModel* _tmp13_;
					MapModel* _tmp14_;
					Node* _tmp15_;
					_tmp12_ = self->priv->_map;
					_tmp13_ = mind_map_get_model (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp15_ = child;
					map_model_remove_root_node (_tmp14_, _tmp15_);
				} else {
					Node* _tmp16_;
					Node* _tmp17_;
					NodeSide _tmp18_;
					_tmp16_ = child;
					_tmp17_ = child;
					_tmp18_ = _tmp17_->priv->_side;
					node_detach (_tmp16_, _tmp18_);
				}
				_tmp19_ = temp;
				_tmp20_ = child;
				_tmp21_ = _g_object_ref0 (_tmp20_);
				g_array_prepend_val (_tmp19_, _tmp21_);
				_g_object_unref0 (child);
			}
		}
	}
	_tmp22_ = node_children (self);
	_tmp23_ = _tmp22_;
	_tmp24_ = node_children (self);
	_tmp25_ = _tmp24_;
	_tmp27_ = vala_g_array_remove_range (_tmp23_, (guint) 0, _tmp25_->len, &_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp28__length1 = _tmp26_;
	_tmp28_ = (_vala_array_free (_tmp28_, _tmp28__length1, (GDestroyNotify) g_object_unref), NULL);
	_g_array_unref0 (_tmp25_);
	_g_array_unref0 (_tmp23_);
	if (node_index (self) == -1) {
		if (prev_parent == NULL) {
			MindMap* _tmp29_;
			MapModel* _tmp30_;
			MapModel* _tmp31_;
			MindMap* _tmp32_;
			MapModel* _tmp33_;
			MapModel* _tmp34_;
			_tmp29_ = self->priv->_map;
			_tmp30_ = mind_map_get_model (_tmp29_);
			_tmp31_ = _tmp30_;
			map_model_position_root_node (_tmp31_, self);
			_tmp32_ = self->priv->_map;
			_tmp33_ = mind_map_get_model (_tmp32_);
			_tmp34_ = _tmp33_;
			map_model_add_root (_tmp34_, self, prev_index);
		} else {
			node_attach_init (self, prev_parent, prev_index);
		}
	}
	node_set_attached (self, TRUE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp35_ = FALSE;
			_tmp35_ = TRUE;
			while (TRUE) {
				GArray* _tmp37_;
				Node* child = NULL;
				GArray* _tmp38_;
				Node* _tmp39_;
				Node* _tmp40_;
				Node* _tmp41_;
				if (!_tmp35_) {
					gint _tmp36_;
					_tmp36_ = i;
					i = _tmp36_ + 1;
				}
				_tmp35_ = FALSE;
				_tmp37_ = temp;
				if (!(((guint) i) < _tmp37_->len)) {
					break;
				}
				_tmp38_ = temp;
				_tmp39_ = g_array_index (_tmp38_, Node*, (guint) i);
				_tmp40_ = _g_object_ref0 (_tmp39_);
				child = _tmp40_;
				_tmp41_ = child;
				node_attach_init (_tmp41_, self, -1);
				_g_object_unref0 (child);
			}
		}
	}
	_g_array_unref0 (temp);
}

void
node_attach_only (Node* self,
                  Node* prev_parent,
                  gint prev_index)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->attach_only) {
		_klass_->attach_only (self, prev_parent, prev_index);
	}
}

static void
node_real_attach (Node* self,
                  Node* parent,
                  gint idx,
                  Theme* theme,
                  gboolean set_side)
{
	Layout* _tmp0_;
	Layout* _tmp1_;
	Layout* _tmp2_;
	Layout* _tmp3_;
	g_return_if_fail (parent != NULL);
	node_set_parent (self, parent);
	_tmp0_ = node_get_layout (parent);
	_tmp1_ = _tmp0_;
	node_set_layout (self, _tmp1_);
	_vala_assert (!node_is_summary (self), "!is_summary()");
	_tmp2_ = node_get_layout (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		Layout* _tmp20_;
		Layout* _tmp21_;
		if (set_side) {
			Layout* _tmp17_;
			Layout* _tmp18_;
			NodeSide _tmp19_;
			if (node_is_root (parent)) {
				GArray* _tmp4_;
				GArray* _tmp5_;
				gboolean _tmp6_;
				_tmp4_ = node_children (parent);
				_tmp5_ = _tmp4_;
				_tmp6_ = _tmp5_->len == ((guint) 0);
				_g_array_unref0 (_tmp5_);
				if (_tmp6_) {
					Layout* _tmp7_;
					Layout* _tmp8_;
					NodeSide _tmp9_;
					_tmp7_ = node_get_layout (self);
					_tmp8_ = _tmp7_;
					_tmp9_ = self->priv->_side;
					node_set_side (self, layout_side_mapping (_tmp8_, _tmp9_));
				} else {
					GArray* _tmp10_;
					GArray* _tmp11_;
					GArray* _tmp12_;
					GArray* _tmp13_;
					Node* _tmp14_;
					NodeSide _tmp15_;
					_tmp10_ = node_children (parent);
					_tmp11_ = _tmp10_;
					_tmp12_ = node_children (parent);
					_tmp13_ = _tmp12_;
					_tmp14_ = g_array_index (_tmp11_, Node*, _tmp13_->len - 1);
					_tmp15_ = _tmp14_->priv->_side;
					node_set_side (self, _tmp15_);
					_g_array_unref0 (_tmp13_);
					_g_array_unref0 (_tmp11_);
				}
			} else {
				NodeSide _tmp16_;
				_tmp16_ = parent->priv->_side;
				node_set_side (self, _tmp16_);
			}
			_tmp17_ = node_get_layout (self);
			_tmp18_ = _tmp17_;
			_tmp19_ = self->priv->_side;
			layout_propagate_side (_tmp18_, self, _tmp19_);
		}
		_tmp20_ = node_get_layout (self);
		_tmp21_ = _tmp20_;
		layout_initialize (_tmp21_, self);
	}
	node_attach_common (self, idx, theme);
}

void
node_attach (Node* self,
             Node* parent,
             gint idx,
             Theme* theme,
             gboolean set_side)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->attach) {
		_klass_->attach (self, parent, idx, theme, set_side);
	}
}

static void
node_real_attach_init (Node* self,
                       Node* parent,
                       gint index)
{
	Layout* _tmp0_;
	Layout* _tmp1_;
	g_return_if_fail (parent != NULL);
	_vala_assert (!node_is_summary (self), "!is_summary()");
	node_set_parent (self, parent);
	_tmp0_ = node_get_layout (parent);
	_tmp1_ = _tmp0_;
	node_set_layout (self, _tmp1_);
	node_attach_common (self, index, NULL);
}

void
node_attach_init (Node* self,
                  Node* parent,
                  gint index)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->attach_init) {
		_klass_->attach_init (self, parent, index);
	}
}

static void
node_real_attach_common (Node* self,
                         gint index,
                         Theme* theme)
{
	Node* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	Node* _tmp24_;
	Layout* _tmp25_;
	Layout* _tmp26_;
	if (index == -1) {
		Node* _tmp0_;
		GArray* _tmp1_;
		GArray* _tmp2_;
		Node* _tmp3_;
		GArray* _tmp4_;
		GArray* _tmp5_;
		Node* _tmp6_;
		_tmp0_ = self->priv->_parent;
		_tmp1_ = node_children (_tmp0_);
		_tmp2_ = _tmp1_;
		index = (gint) _tmp2_->len;
		_g_array_unref0 (_tmp2_);
		_tmp3_ = self->priv->_parent;
		_tmp4_ = node_children (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _g_object_ref0 (self);
		g_array_append_val (_tmp5_, _tmp6_);
		_g_array_unref0 (_tmp5_);
	} else {
		Node* _tmp7_;
		GArray* _tmp8_;
		GArray* _tmp9_;
		Node* _tmp10_;
		_tmp7_ = self->priv->_parent;
		_tmp8_ = node_children (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _g_object_ref0 (self);
		g_array_insert_val (_tmp9_, (guint) index, _tmp10_);
		_g_array_unref0 (_tmp9_);
	}
	node_propagate_task_info_up (self, self->priv->_task_count, self->priv->_task_done);
	_tmp11_ = self->priv->_parent;
	_tmp12_ = node_get_sequence (_tmp11_);
	_tmp13_ = _tmp12_;
	if (_tmp13_) {
		{
			gint i = 0;
			i = index;
			{
				gboolean _tmp14_ = FALSE;
				_tmp14_ = TRUE;
				while (TRUE) {
					Node* _tmp16_;
					GArray* _tmp17_;
					GArray* _tmp18_;
					gboolean _tmp19_;
					Node* _tmp20_;
					GArray* _tmp21_;
					GArray* _tmp22_;
					Node* _tmp23_;
					if (!_tmp14_) {
						gint _tmp15_;
						_tmp15_ = i;
						i = _tmp15_ + 1;
					}
					_tmp14_ = FALSE;
					_tmp16_ = self->priv->_parent;
					_tmp17_ = node_children (_tmp16_);
					_tmp18_ = _tmp17_;
					_tmp19_ = !(((guint) i) < _tmp18_->len);
					_g_array_unref0 (_tmp18_);
					if (_tmp19_) {
						break;
					}
					_tmp20_ = self->priv->_parent;
					_tmp21_ = node_children (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = g_array_index (_tmp22_, Node*, (guint) i);
					node_update_sequence_num (_tmp23_);
					_g_array_unref0 (_tmp22_);
				}
			}
		}
	}
	_tmp24_ = self->priv->_parent;
	g_signal_connect_object (_tmp24_, "moved", (GCallback) _node_parent_moved_node_moved, self, 0);
	_tmp25_ = node_get_layout (self);
	_tmp26_ = _tmp25_;
	if (_tmp26_ != NULL) {
		Layout* _tmp27_;
		Layout* _tmp28_;
		Node* _tmp29_;
		_tmp27_ = node_get_layout (self);
		_tmp28_ = _tmp27_;
		_tmp29_ = self->priv->_parent;
		layout_handle_update_by_insert (_tmp28_, _tmp29_, self, index);
	}
	if (theme != NULL) {
		GdkRGBA* _tmp30_ = NULL;
		GdkRGBA _tmp36_;
		if (node_main_branch (self)) {
			GdkRGBA* _tmp31_;
			_tmp31_ = theme_next_color (theme);
			__vala_GdkRGBA_free0 (_tmp30_);
			_tmp30_ = _tmp31_;
		} else {
			Node* _tmp32_;
			GdkRGBA* _tmp33_;
			GdkRGBA* _tmp34_;
			GdkRGBA* _tmp35_;
			_tmp32_ = self->priv->_parent;
			_tmp33_ = node_get_link_color (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp35_ = __vala_GdkRGBA_copy0 (_tmp34_);
			__vala_GdkRGBA_free0 (_tmp30_);
			_tmp30_ = _tmp35_;
		}
		_tmp36_ = *_tmp30_;
		node_set_link_color_child (self, &_tmp36_);
		__vala_GdkRGBA_free0 (_tmp30_);
	}
	node_set_attached (self, TRUE);
}

void
node_attach_common (Node* self,
                    gint index,
                    Theme* theme)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->attach_common) {
		_klass_->attach_common (self, index, theme);
	}
}

static gboolean
_node_side_equal (const NodeSide * s1,
                  const NodeSide * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return (*s1) == (*s2);
}

static Node*
node_real_first_child (Node* self,
                       NodeSide* side)
{
	gboolean _tmp0_;
	Node* result;
	_tmp0_ = self->priv->_folded;
	if (!_tmp0_) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					gboolean _tmp4_ = FALSE;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = self->_children;
					if (!(((guint) i) < _tmp3_->len)) {
						break;
					}
					if (side == NULL) {
						_tmp4_ = TRUE;
					} else {
						GArray* _tmp5_;
						Node* _tmp6_;
						NodeSide _tmp7_;
						_tmp5_ = self->_children;
						_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
						_tmp7_ = _tmp6_->priv->_side;
						_tmp4_ = _node_side_equal (&_tmp7_, side) == TRUE;
					}
					if (_tmp4_) {
						GArray* _tmp8_;
						Node* _tmp9_;
						Node* _tmp10_;
						_tmp8_ = self->_children;
						_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
						_tmp10_ = _g_object_ref0 (_tmp9_);
						result = _tmp10_;
						return result;
					}
				}
			}
		}
	}
	result = NULL;
	return result;
}

Node*
node_first_child (Node* self,
                  NodeSide* side)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->first_child) {
		return _klass_->first_child (self, side);
	}
	return NULL;
}

static Node*
node_real_last_child (Node* self,
                      NodeSide* side)
{
	gboolean _tmp0_;
	Node* result;
	_tmp0_ = self->priv->_folded;
	if (!_tmp0_) {
		{
			gint i = 0;
			GArray* _tmp1_;
			_tmp1_ = self->_children;
			i = ((gint) _tmp1_->len) - 1;
			{
				gboolean _tmp2_ = FALSE;
				_tmp2_ = TRUE;
				while (TRUE) {
					gboolean _tmp4_ = FALSE;
					if (!_tmp2_) {
						gint _tmp3_;
						_tmp3_ = i;
						i = _tmp3_ - 1;
					}
					_tmp2_ = FALSE;
					if (!(i >= 0)) {
						break;
					}
					if (side == NULL) {
						_tmp4_ = TRUE;
					} else {
						GArray* _tmp5_;
						Node* _tmp6_;
						NodeSide _tmp7_;
						_tmp5_ = self->_children;
						_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
						_tmp7_ = _tmp6_->priv->_side;
						_tmp4_ = _node_side_equal (&_tmp7_, side) == TRUE;
					}
					if (_tmp4_) {
						GArray* _tmp8_;
						Node* _tmp9_;
						Node* _tmp10_;
						_tmp8_ = self->_children;
						_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
						_tmp10_ = _g_object_ref0 (_tmp9_);
						result = _tmp10_;
						return result;
					}
				}
			}
		}
	}
	result = NULL;
	return result;
}

Node*
node_last_child (Node* self,
                 NodeSide* side)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->last_child) {
		return _klass_->last_child (self, side);
	}
	return NULL;
}

static Node*
node_real_next_child (Node* self,
                      Node* n,
                      gboolean wrap)
{
	gint idx = 0;
	Node* result;
	g_return_val_if_fail (n != NULL, NULL);
	idx = node_index (n);
	if (idx == -1) {
		result = NULL;
		return result;
	} else {
		GArray* _tmp0_;
		_tmp0_ = self->_children;
		if (((guint) (idx + 1)) < _tmp0_->len) {
			GArray* _tmp1_;
			Node* _tmp2_;
			Node* _tmp3_;
			_tmp1_ = self->_children;
			_tmp2_ = g_array_index (_tmp1_, Node*, (guint) (idx + 1));
			_tmp3_ = _g_object_ref0 (_tmp2_);
			result = _tmp3_;
			return result;
		} else {
			Node* _tmp4_ = NULL;
			Node* _tmp7_;
			if (wrap) {
				GArray* _tmp5_;
				Node* _tmp6_;
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) 0);
				_tmp4_ = _tmp6_;
			} else {
				_tmp4_ = NULL;
			}
			_tmp7_ = _g_object_ref0 (_tmp4_);
			result = _tmp7_;
			return result;
		}
	}
}

Node*
node_next_child (Node* self,
                 Node* n,
                 gboolean wrap)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->next_child) {
		return _klass_->next_child (self, n, wrap);
	}
	return NULL;
}

static Node*
node_real_prev_child (Node* self,
                      Node* n,
                      gboolean wrap)
{
	gint idx = 0;
	Node* result;
	g_return_val_if_fail (n != NULL, NULL);
	idx = node_index (n);
	if (idx == -1) {
		result = NULL;
		return result;
	} else {
		if (idx > 0) {
			GArray* _tmp0_;
			Node* _tmp1_;
			Node* _tmp2_;
			_tmp0_ = self->_children;
			_tmp1_ = g_array_index (_tmp0_, Node*, (guint) (idx - 1));
			_tmp2_ = _g_object_ref0 (_tmp1_);
			result = _tmp2_;
			return result;
		} else {
			Node* _tmp3_ = NULL;
			Node* _tmp7_;
			if (wrap) {
				GArray* _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				_tmp4_ = self->_children;
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp4_, Node*, _tmp5_->len - 1);
				_tmp3_ = _tmp6_;
			} else {
				_tmp3_ = NULL;
			}
			_tmp7_ = _g_object_ref0 (_tmp3_);
			result = _tmp7_;
			return result;
		}
	}
}

Node*
node_prev_child (Node* self,
                 Node* n,
                 gboolean wrap)
{
	NodeClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->prev_child) {
		return _klass_->prev_child (self, n, wrap);
	}
	return NULL;
}

static void
node_propagate_task_info_down (Node* self,
                               gboolean* enable,
                               gboolean* done)
{
	g_return_if_fail (self != NULL);
	if (node_is_leaf (self)) {
		if (enable != NULL) {
			gint _tmp0_ = 0;
			if (*enable) {
				_tmp0_ = 1;
			} else {
				_tmp0_ = 0;
			}
			self->priv->_task_count = _tmp0_;
		}
		if (self->priv->_task_count == 1) {
			if (done == NULL) {
				gint _tmp1_ = 0;
				gboolean _tmp2_ = FALSE;
				if (self->priv->_task_count == 0) {
					_tmp2_ = TRUE;
				} else {
					_tmp2_ = self->priv->_task_done == 0;
				}
				if (_tmp2_) {
					_tmp1_ = 0;
				} else {
					_tmp1_ = 1;
				}
				self->priv->_task_done = _tmp1_;
			} else {
				gint _tmp3_ = 0;
				if (*done) {
					_tmp3_ = 1;
				} else {
					_tmp3_ = 0;
				}
				self->priv->_task_done = _tmp3_;
			}
		} else {
			self->priv->_task_done = 0;
		}
	} else {
		self->priv->_task_count = 0;
		self->priv->_task_done = 0;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					GArray* _tmp6_;
					GArray* _tmp7_;
					gboolean _tmp8_;
					GArray* _tmp9_;
					GArray* _tmp10_;
					Node* _tmp11_;
					GArray* _tmp12_;
					GArray* _tmp13_;
					Node* _tmp14_;
					GArray* _tmp15_;
					GArray* _tmp16_;
					Node* _tmp17_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = i;
						i = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					_tmp6_ = node_children (self);
					_tmp7_ = _tmp6_;
					_tmp8_ = !(((guint) i) < _tmp7_->len);
					_g_array_unref0 (_tmp7_);
					if (_tmp8_) {
						break;
					}
					_tmp9_ = node_children (self);
					_tmp10_ = _tmp9_;
					_tmp11_ = g_array_index (_tmp10_, Node*, (guint) i);
					node_propagate_task_info_down (_tmp11_, enable, done);
					_g_array_unref0 (_tmp10_);
					_tmp12_ = node_children (self);
					_tmp13_ = _tmp12_;
					_tmp14_ = g_array_index (_tmp13_, Node*, (guint) i);
					self->priv->_task_count = self->priv->_task_count + _tmp14_->priv->_task_count;
					_g_array_unref0 (_tmp13_);
					_tmp15_ = node_children (self);
					_tmp16_ = _tmp15_;
					_tmp17_ = g_array_index (_tmp16_, Node*, (guint) i);
					self->priv->_task_done = self->priv->_task_done + _tmp17_->priv->_task_done;
					_g_array_unref0 (_tmp16_);
				}
			}
		}
	}
	if (enable != NULL) {
		node_position_text (self);
		node_update_size (self);
	}
}

static void
node_propagate_task_info_up (Node* self,
                             gint count_adjust,
                             gint done_adjust)
{
	Node* p = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	p = _tmp1_;
	while (TRUE) {
		Node* _tmp2_;
		Node* _tmp3_;
		Node* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		Node* _tmp7_;
		Node* _tmp8_;
		Node* _tmp9_;
		Node* _tmp10_;
		Node* _tmp11_;
		_tmp2_ = p;
		if (!(_tmp2_ != NULL)) {
			break;
		}
		_tmp3_ = p;
		_tmp4_ = p;
		_tmp4_->priv->_task_count = _tmp4_->priv->_task_count + count_adjust;
		_tmp5_ = p;
		_tmp6_ = p;
		_tmp6_->priv->_task_done = _tmp6_->priv->_task_done + done_adjust;
		_tmp7_ = p;
		node_position_text (_tmp7_);
		_tmp8_ = p;
		node_update_size (_tmp8_);
		_tmp9_ = p;
		_tmp10_ = _tmp9_->priv->_parent;
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_g_object_unref0 (p);
		p = _tmp11_;
	}
	_g_object_unref0 (p);
}

static void
node_propagate_task_info (Node* self,
                          gboolean* enable,
                          gboolean* done)
{
	gint task_count = 0;
	gint task_done = 0;
	g_return_if_fail (self != NULL);
	task_count = self->priv->_task_count;
	task_done = self->priv->_task_done;
	node_propagate_task_info_down (self, enable, done);
	node_propagate_task_info_up (self, self->priv->_task_count - task_count, self->priv->_task_done - task_done);
}

gboolean
node_task_enabled (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_task_count > 0;
	return result;
}

gboolean
node_task_done (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_task_count == self->priv->_task_done;
	return result;
}

void
node_enable_task (Node* self,
                  gboolean task)
{
	g_return_if_fail (self != NULL);
	node_propagate_task_info (self, &task, NULL);
}

void
node_set_task_done (Node* self,
                    gboolean done)
{
	g_return_if_fail (self != NULL);
	node_propagate_task_info (self, NULL, &done);
}

static gpointer
_node_task_info_dup0 (gpointer self)
{
	return self ? node_task_info_dup (self) : NULL;
}

void
node_toggle_task_done (Node* self,
                       GArray** changed)
{
	NodeTaskInfo change = {0};
	NodeTaskInfo _tmp0_;
	NodeTaskInfo _tmp1_;
	NodeTaskInfo* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*changed != NULL);
	node_task_info_init (&change, node_task_enabled (self), node_task_done (self), self);
	_tmp0_ = change;
	_tmp1_ = _tmp0_;
	_tmp2_ = _node_task_info_dup0 (&_tmp1_);
	g_array_append_val (*changed, _tmp2_);
	node_set_task_done (self, self->priv->_task_done == 0);
	node_task_info_destroy (&change);
}

gboolean
node_add_tag (Node* self,
              Tag* tag)
{
	gboolean added = FALSE;
	Tags* _tmp0_;
	Tags* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tag != NULL, FALSE);
	_tmp0_ = node_get_tags (self);
	_tmp1_ = _tmp0_;
	added = tags_add_tag (_tmp1_, tag, -1);
	node_update_size (self);
	result = added;
	return result;
}

gboolean
node_remove_tag (Node* self,
                 Tag* tag,
                 GArray* nodes)
{
	gint index = 0;
	Tags* _tmp0_;
	Tags* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tag != NULL, FALSE);
	_tmp0_ = node_get_tags (self);
	_tmp1_ = _tmp0_;
	index = tags_get_tag_index (_tmp1_, tag);
	if (index != -1) {
		Tags* _tmp2_;
		Tags* _tmp3_;
		_tmp2_ = node_get_tags (self);
		_tmp3_ = _tmp2_;
		tags_remove_tag (_tmp3_, index);
		node_update_size (self);
		if (nodes != NULL) {
			Node* _tmp4_;
			_tmp4_ = _g_object_ref0 (self);
			g_array_append_val (nodes, _tmp4_);
		} else {
			result = TRUE;
			return result;
		}
	}
	if (nodes != NULL) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GArray* _tmp7_;
					GArray* _tmp8_;
					Node* _tmp9_;
					if (!_tmp5_) {
						gint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					_tmp7_ = self->_children;
					if (!(((guint) i) < _tmp7_->len)) {
						break;
					}
					_tmp8_ = self->_children;
					_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
					node_remove_tag (_tmp9_, tag, nodes);
				}
			}
		}
	}
	result = FALSE;
	return result;
}

gboolean
node_highlightable (Node* self,
                    Tags* tags,
                    TagComboType combo_type)
{
	Tags* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tags != NULL, FALSE);
	_tmp0_ = self->priv->_tags;
	result = tag_combo_type_highlightable (combo_type, _tmp0_, tags);
	return result;
}

void
node_highlight_tags (Node* self,
                     Tags* tags,
                     TagComboType combo_type)
{
	Tags* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tags != NULL);
	_tmp0_ = self->priv->_tags;
	if (tag_combo_type_highlightable (combo_type, _tmp0_, tags)) {
		node_set_alpha_only (self, 1.0);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GArray* _tmp3_;
				GArray* _tmp4_;
				Node* _tmp5_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = self->_children;
				if (!(((guint) i) < _tmp3_->len)) {
					break;
				}
				_tmp4_ = self->_children;
				_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
				node_highlight_tags (_tmp5_, tags, combo_type);
			}
		}
	}
}

Node*
node_folded_ancestor (Node* self)
{
	Node* node = NULL;
	Node* _tmp0_;
	Node* _tmp1_;
	Node* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parent;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	node = _tmp1_;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		Node* _tmp3_;
		Node* _tmp6_;
		Node* _tmp7_;
		Node* _tmp8_;
		_tmp3_ = node;
		if (_tmp3_ != NULL) {
			Node* _tmp4_;
			gboolean _tmp5_;
			_tmp4_ = node;
			_tmp5_ = _tmp4_->priv->_folded;
			_tmp2_ = !_tmp5_;
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp6_ = node;
		_tmp7_ = _tmp6_->priv->_parent;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (node);
		node = _tmp8_;
	}
	result = node;
	return result;
}

void
node_get_match_items (Node* self,
                      const gchar* tabname,
                      const gchar* pattern,
                      gboolean* search_opts,
                      gint search_opts_length1,
                      GtkListStore** matches)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	gboolean _tmp60_ = FALSE;
	gboolean _tmp61_ = FALSE;
	Callout* _tmp62_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tabname != NULL);
	g_return_if_fail (pattern != NULL);
	g_return_if_fail (*matches != NULL);
	_tmp2_ = search_opts[SEARCH_OPTIONS_NODES];
	if (_tmp2_) {
		_tmp1_ = self->_alpha == 1.0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		if (self->priv->_task_count == 0) {
			_tmp6_ = TRUE;
		} else {
			_tmp6_ = !node_is_leaf (self);
		}
		if (_tmp6_) {
			gboolean _tmp7_;
			_tmp7_ = search_opts[SEARCH_OPTIONS_NONTASKS];
			_tmp5_ = _tmp7_;
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			_tmp4_ = TRUE;
		} else {
			gboolean _tmp8_ = FALSE;
			gboolean _tmp9_ = FALSE;
			if (self->priv->_task_count != 0) {
				_tmp9_ = node_is_leaf (self);
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				gboolean _tmp10_;
				_tmp10_ = search_opts[SEARCH_OPTIONS_TASKS];
				_tmp8_ = _tmp10_;
			} else {
				_tmp8_ = FALSE;
			}
			_tmp4_ = _tmp8_;
		}
		if (_tmp4_) {
			gboolean _tmp11_ = FALSE;
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			Node* _tmp14_;
			_tmp14_ = self->priv->_parent;
			if (_tmp14_ != NULL) {
				Node* _tmp15_;
				gboolean _tmp16_;
				_tmp15_ = self->priv->_parent;
				_tmp16_ = _tmp15_->priv->_folded;
				_tmp13_ = _tmp16_;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				gboolean _tmp17_;
				_tmp17_ = search_opts[SEARCH_OPTIONS_FOLDED];
				_tmp12_ = _tmp17_;
			} else {
				_tmp12_ = FALSE;
			}
			if (_tmp12_) {
				_tmp11_ = TRUE;
			} else {
				gboolean _tmp18_ = FALSE;
				gboolean _tmp19_ = FALSE;
				Node* _tmp20_;
				_tmp20_ = self->priv->_parent;
				if (_tmp20_ == NULL) {
					_tmp19_ = TRUE;
				} else {
					Node* _tmp21_;
					gboolean _tmp22_;
					_tmp21_ = self->priv->_parent;
					_tmp22_ = _tmp21_->priv->_folded;
					_tmp19_ = !_tmp22_;
				}
				if (_tmp19_) {
					gboolean _tmp23_;
					_tmp23_ = search_opts[SEARCH_OPTIONS_UNFOLDED];
					_tmp18_ = _tmp23_;
				} else {
					_tmp18_ = FALSE;
				}
				_tmp11_ = _tmp18_;
			}
			_tmp3_ = _tmp11_;
		} else {
			_tmp3_ = FALSE;
		}
		_tmp0_ = _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* tab = NULL;
		gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		gboolean _tmp30_;
		gboolean _tmp47_;
		_tmp24_ = utils_rootname (tabname);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_strconcat ("<i>", _tmp25_, NULL);
		_tmp27_ = _tmp26_;
		_tmp28_ = g_strconcat (_tmp27_, "</i>", NULL);
		_tmp29_ = _tmp28_;
		_g_free0 (_tmp27_);
		_g_free0 (_tmp25_);
		tab = _tmp29_;
		_tmp30_ = search_opts[SEARCH_OPTIONS_TITLES];
		if (_tmp30_) {
			gchar* str = NULL;
			CanvasText* _tmp31_;
			CanvasText* _tmp32_;
			FormattedText* _tmp33_;
			FormattedText* _tmp34_;
			const gchar* _tmp35_;
			const gchar* _tmp36_;
			gchar* _tmp37_;
			const gchar* _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			_tmp31_ = node_get_name (self);
			_tmp32_ = _tmp31_;
			_tmp33_ = canvas_text_get_text (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp35_ = formatted_text_get_text (_tmp34_);
			_tmp36_ = _tmp35_;
			_tmp37_ = utils_match_string (pattern, _tmp36_);
			str = _tmp37_;
			_tmp38_ = str;
			_tmp39_ = strlen (_tmp38_);
			_tmp40_ = _tmp39_;
			if (_tmp40_ > 0) {
				GtkTreeIter it = {0};
				GtkTreeIter _tmp41_ = {0};
				GtkTreeIter _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				const gchar* _tmp45_;
				const gchar* _tmp46_;
				gtk_list_store_append (*matches, &_tmp41_);
				it = _tmp41_;
				_tmp42_ = it;
				_tmp43_ = g_strdup_printf ("<b><i>%s:</i></b>", _ ("Node Title"));
				_tmp44_ = _tmp43_;
				_tmp45_ = str;
				_tmp46_ = tab;
				gtk_list_store_set (*matches, &_tmp42_, 0, _tmp44_, 1, _tmp45_, 2, self, 3, NULL, 4, NULL, 5, NULL, 6, tabname, 7, _tmp46_, -1, -1);
				_g_free0 (_tmp44_);
			}
			_g_free0 (str);
		}
		_tmp47_ = search_opts[SEARCH_OPTIONS_NOTES];
		if (_tmp47_) {
			gchar* str = NULL;
			const gchar* _tmp48_;
			const gchar* _tmp49_;
			gchar* _tmp50_;
			const gchar* _tmp51_;
			gint _tmp52_;
			gint _tmp53_;
			_tmp48_ = node_get_note (self);
			_tmp49_ = _tmp48_;
			_tmp50_ = utils_match_string (pattern, _tmp49_);
			str = _tmp50_;
			_tmp51_ = str;
			_tmp52_ = strlen (_tmp51_);
			_tmp53_ = _tmp52_;
			if (_tmp53_ > 0) {
				GtkTreeIter it = {0};
				GtkTreeIter _tmp54_ = {0};
				GtkTreeIter _tmp55_;
				gchar* _tmp56_;
				gchar* _tmp57_;
				const gchar* _tmp58_;
				const gchar* _tmp59_;
				gtk_list_store_append (*matches, &_tmp54_);
				it = _tmp54_;
				_tmp55_ = it;
				_tmp56_ = g_strdup_printf ("<b><i>%s:</i></b>", _ ("Node Note"));
				_tmp57_ = _tmp56_;
				_tmp58_ = str;
				_tmp59_ = tab;
				gtk_list_store_set (*matches, &_tmp55_, 0, _tmp57_, 1, _tmp58_, 2, self, 3, NULL, 4, NULL, 5, NULL, 6, tabname, 7, _tmp59_, -1, -1);
				_g_free0 (_tmp57_);
			}
			_g_free0 (str);
		}
		_g_free0 (tab);
	}
	_tmp62_ = self->priv->_callout;
	if (_tmp62_ != NULL) {
		gboolean _tmp63_;
		_tmp63_ = search_opts[SEARCH_OPTIONS_CALLOUTS];
		_tmp61_ = _tmp63_;
	} else {
		_tmp61_ = FALSE;
	}
	if (_tmp61_) {
		gboolean _tmp64_;
		_tmp64_ = search_opts[SEARCH_OPTIONS_TITLES];
		_tmp60_ = _tmp64_;
	} else {
		_tmp60_ = FALSE;
	}
	if (_tmp60_) {
		gchar* str = NULL;
		Callout* _tmp65_;
		CanvasText* _tmp66_;
		CanvasText* _tmp67_;
		FormattedText* _tmp68_;
		FormattedText* _tmp69_;
		const gchar* _tmp70_;
		const gchar* _tmp71_;
		gchar* _tmp72_;
		const gchar* _tmp73_;
		gint _tmp74_;
		gint _tmp75_;
		_tmp65_ = self->priv->_callout;
		_tmp66_ = callout_get_text (_tmp65_);
		_tmp67_ = _tmp66_;
		_tmp68_ = canvas_text_get_text (_tmp67_);
		_tmp69_ = _tmp68_;
		_tmp70_ = formatted_text_get_text (_tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = utils_match_string (pattern, _tmp71_);
		str = _tmp72_;
		_tmp73_ = str;
		_tmp74_ = strlen (_tmp73_);
		_tmp75_ = _tmp74_;
		if (_tmp75_ > 0) {
			GtkTreeIter it = {0};
			gchar* tab = NULL;
			gchar* _tmp76_;
			gchar* _tmp77_;
			gchar* _tmp78_;
			gchar* _tmp79_;
			gchar* _tmp80_;
			gchar* _tmp81_;
			GtkTreeIter _tmp82_ = {0};
			GtkTreeIter _tmp83_;
			gchar* _tmp84_;
			gchar* _tmp85_;
			const gchar* _tmp86_;
			Callout* _tmp87_;
			const gchar* _tmp88_;
			_tmp76_ = utils_rootname (tabname);
			_tmp77_ = _tmp76_;
			_tmp78_ = g_strconcat ("<i>", _tmp77_, NULL);
			_tmp79_ = _tmp78_;
			_tmp80_ = g_strconcat (_tmp79_, "</i>", NULL);
			_tmp81_ = _tmp80_;
			_g_free0 (_tmp79_);
			_g_free0 (_tmp77_);
			tab = _tmp81_;
			gtk_list_store_append (*matches, &_tmp82_);
			it = _tmp82_;
			_tmp83_ = it;
			_tmp84_ = g_strdup_printf ("<b><i>%s:</i></b>", _ ("Callout Text"));
			_tmp85_ = _tmp84_;
			_tmp86_ = str;
			_tmp87_ = self->priv->_callout;
			_tmp88_ = tab;
			gtk_list_store_set (*matches, &_tmp83_, 0, _tmp85_, 1, _tmp86_, 2, NULL, 3, NULL, 4, _tmp87_, 5, NULL, 6, tabname, 7, _tmp88_, -1, -1);
			_g_free0 (_tmp85_);
			_g_free0 (tab);
		}
		_g_free0 (str);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp89_ = FALSE;
			_tmp89_ = TRUE;
			while (TRUE) {
				GArray* _tmp91_;
				GArray* _tmp92_;
				Node* _tmp93_;
				if (!_tmp89_) {
					gint _tmp90_;
					_tmp90_ = i;
					i = _tmp90_ + 1;
				}
				_tmp89_ = FALSE;
				_tmp91_ = self->_children;
				if (!(((guint) i) < _tmp91_->len)) {
					break;
				}
				_tmp92_ = self->_children;
				_tmp93_ = g_array_index (_tmp92_, Node*, (guint) i);
				node_get_match_items (_tmp93_, tabname, pattern, search_opts, (gint) search_opts_length1, matches);
			}
		}
	}
}

void
node_update_theme_colors (Node* self,
                          Theme* old_theme,
                          Theme* new_theme)
{
	gint old_index = 0;
	GdkRGBA* _tmp0_;
	GdkRGBA _tmp1_;
	CanvasText* _tmp3_;
	CanvasText* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (old_theme != NULL);
	g_return_if_fail (new_theme != NULL);
	_tmp0_ = self->priv->_link_color;
	_tmp1_ = *_tmp0_;
	old_index = theme_get_color_index (old_theme, &_tmp1_);
	if (old_index != -1) {
		GdkRGBA _tmp2_ = {0};
		theme_link_color (new_theme, old_index, &_tmp2_);
		node_set_link_color_only (self, &_tmp2_);
	}
	_tmp3_ = node_get_name (self);
	_tmp4_ = _tmp3_;
	canvas_text_update_attributes (_tmp4_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				GArray* _tmp8_;
				Node* _tmp9_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = self->_children;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = self->_children;
				_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
				node_update_theme_colors (_tmp9_, old_theme, new_theme);
			}
		}
	}
}

static gpointer
_node_info_dup0 (gpointer self)
{
	return self ? node_info_dup (self) : NULL;
}

void
node_get_node_info (Node* self,
                    GArray** info)
{
	NodeSide _tmp0_;
	GdkRGBA* _tmp1_;
	NodeInfo _tmp2_ = {0};
	GdkRGBA _tmp3_;
	NodeInfo* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (*info != NULL);
	_tmp0_ = self->priv->_side;
	_tmp1_ = self->priv->_link_color;
	_tmp3_ = *_tmp1_;
	node_info_init (&_tmp2_, self->priv->_posx, self->priv->_posy, _tmp0_, &_tmp3_);
	_tmp4_ = _node_info_dup0 (&_tmp2_);
	g_array_append_val (*info, _tmp4_);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				GArray* _tmp8_;
				Node* _tmp9_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = self->_children;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = self->_children;
				_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
				node_get_node_info (_tmp9_, info);
			}
		}
	}
}

void
node_set_node_info (Node* self,
                    GArray* info,
                    gint* index)
{
	gdouble diffx = 0.0;
	gdouble diffy = 0.0;
	GdkRGBA _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (info != NULL);
	diffx = (*g_array_index (info, NodeInfo*, (guint) (*index))).posx - self->priv->_posx;
	diffy = (*g_array_index (info, NodeInfo*, (guint) (*index))).posy - self->priv->_posy;
	self->priv->_posx = (*g_array_index (info, NodeInfo*, (guint) (*index))).posx;
	self->priv->_posy = (*g_array_index (info, NodeInfo*, (guint) (*index))).posy;
	node_set_side (self, (*g_array_index (info, NodeInfo*, (guint) (*index))).side);
	_tmp0_ = (*g_array_index (info, NodeInfo*, (guint) (*index))).color;
	node_set_link_color_only (self, &_tmp0_);
	node_update_tree_bbox (self, diffx, diffy);
	node_position_text (self);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GArray* _tmp3_;
				gint _tmp4_;
				GArray* _tmp5_;
				Node* _tmp6_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = self->_children;
				if (!(((guint) i) < _tmp3_->len)) {
					break;
				}
				_tmp4_ = *index;
				*index = _tmp4_ + 1;
				_tmp5_ = self->_children;
				_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
				node_set_node_info (_tmp6_, info, index);
			}
		}
	}
}

static void
node_real_link_point (Node* self,
                      gdouble* x,
                      gdouble* y,
                      gboolean seq)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	if (node_is_root (self)) {
		gdouble _tmp0_;
		gdouble _tmp1_;
		gdouble _tmp2_;
		gdouble _tmp3_;
		_tmp0_ = node_get_posx (self);
		_tmp1_ = _tmp0_;
		_vala_x = _tmp1_ + (self->_width / 2);
		_tmp2_ = node_get_posy (self);
		_tmp3_ = _tmp2_;
		_vala_y = _tmp3_ + (self->_height / 2);
	} else {
		if (seq) {
			gint margin = 0;
			Style* _tmp4_;
			Style* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			gint padding = 0;
			Style* _tmp8_;
			Style* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			NodeSide _tmp12_;
			_tmp4_ = node_get_style (self);
			_tmp5_ = _tmp4_;
			_tmp6_ = style_get_node_margin (_tmp5_);
			_tmp7_ = _tmp6_;
			margin = _tmp7_;
			_tmp8_ = node_get_style (self);
			_tmp9_ = _tmp8_;
			_tmp10_ = style_get_node_padding (_tmp9_);
			_tmp11_ = _tmp10_;
			padding = _tmp11_;
			_tmp12_ = self->priv->_side;
			switch (_tmp12_) {
				case NODE_SIDE_LEFT:
				{
					gdouble _tmp13_;
					gdouble _tmp14_;
					gdouble _tmp15_;
					gdouble _tmp16_;
					_tmp13_ = node_get_posx (self);
					_tmp14_ = _tmp13_;
					_vala_x = ((_tmp14_ + self->_total_width) - margin) - padding;
					_tmp15_ = node_get_posy (self);
					_tmp16_ = _tmp15_;
					_vala_y = (_tmp16_ + self->_total_height) - margin;
					break;
				}
				case NODE_SIDE_RIGHT:
				{
					gdouble _tmp17_;
					gdouble _tmp18_;
					gdouble _tmp19_;
					gdouble _tmp20_;
					_tmp17_ = node_get_posx (self);
					_tmp18_ = _tmp17_;
					_vala_x = (_tmp18_ + margin) + padding;
					_tmp19_ = node_get_posy (self);
					_tmp20_ = _tmp19_;
					_vala_y = (_tmp20_ + self->_total_height) - margin;
					break;
				}
				default:
				{
					gboolean _tmp21_ = FALSE;
					NodeSide _tmp22_;
					_tmp22_ = self->priv->_side;
					if (_tmp22_ == NODE_SIDE_BOTTOM) {
						Style* _tmp23_;
						Style* _tmp24_;
						NodeBorder* _tmp25_;
						NodeBorder* _tmp26_;
						gchar* _tmp27_;
						gchar* _tmp28_;
						_tmp23_ = node_get_style (self);
						_tmp24_ = _tmp23_;
						_tmp25_ = style_get_node_border (_tmp24_);
						_tmp26_ = _tmp25_;
						_tmp27_ = node_border_name (_tmp26_);
						_tmp28_ = _tmp27_;
						_tmp21_ = g_strcmp0 (_tmp28_, "underlined") != 0;
						_g_free0 (_tmp28_);
					} else {
						_tmp21_ = FALSE;
					}
					if (_tmp21_) {
						gdouble _tmp29_;
						gdouble _tmp30_;
						gdouble _tmp31_;
						gdouble _tmp32_;
						_tmp29_ = node_get_posx (self);
						_tmp30_ = _tmp29_;
						_vala_x = (_tmp30_ + self->_total_width) - margin;
						_tmp31_ = node_get_posy (self);
						_tmp32_ = _tmp31_;
						_vala_y = (_tmp32_ + margin) + padding;
					} else {
						gdouble _tmp33_;
						gdouble _tmp34_;
						gdouble _tmp35_;
						gdouble _tmp36_;
						_tmp33_ = node_get_posx (self);
						_tmp34_ = _tmp33_;
						_vala_x = (_tmp34_ + self->_total_width) - margin;
						_tmp35_ = node_get_posy (self);
						_tmp36_ = _tmp35_;
						_vala_y = ((_tmp36_ + self->_total_height) - margin) - padding;
					}
					break;
				}
			}
		} else {
			gint margin = 0;
			Style* _tmp37_;
			Style* _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			gdouble _tmp41_ = 0.0;
			Style* _tmp42_;
			Style* _tmp43_;
			NodeBorder* _tmp44_;
			NodeBorder* _tmp45_;
			gchar* _tmp46_;
			gchar* _tmp47_;
			gboolean _tmp48_;
			gdouble height = 0.0;
			NodeSide _tmp49_;
			_tmp37_ = node_get_style (self);
			_tmp38_ = _tmp37_;
			_tmp39_ = style_get_node_margin (_tmp38_);
			_tmp40_ = _tmp39_;
			margin = _tmp40_;
			_tmp42_ = node_get_style (self);
			_tmp43_ = _tmp42_;
			_tmp44_ = style_get_node_border (_tmp43_);
			_tmp45_ = _tmp44_;
			_tmp46_ = node_border_name (_tmp45_);
			_tmp47_ = _tmp46_;
			_tmp48_ = g_strcmp0 (_tmp47_, "underlined") == 0;
			_g_free0 (_tmp47_);
			if (_tmp48_) {
				_tmp41_ = self->_height - margin;
			} else {
				_tmp41_ = self->_height / 2;
			}
			height = _tmp41_;
			_tmp49_ = self->priv->_side;
			switch (_tmp49_) {
				case NODE_SIDE_LEFT:
				{
					gdouble _tmp50_;
					gdouble _tmp51_;
					gdouble _tmp52_;
					gdouble _tmp53_;
					_tmp50_ = node_get_posx (self);
					_tmp51_ = _tmp50_;
					_vala_x = _tmp51_ + margin;
					_tmp52_ = node_get_posy (self);
					_tmp53_ = _tmp52_;
					_vala_y = _tmp53_ + height;
					break;
				}
				case NODE_SIDE_TOP:
				{
					gdouble _tmp54_;
					gdouble _tmp55_;
					gdouble _tmp56_;
					gdouble _tmp57_;
					_tmp54_ = node_get_posx (self);
					_tmp55_ = _tmp54_;
					_vala_x = _tmp55_ + (self->_width / 2);
					_tmp56_ = node_get_posy (self);
					_tmp57_ = _tmp56_;
					_vala_y = _tmp57_ + margin;
					break;
				}
				case NODE_SIDE_RIGHT:
				{
					gdouble _tmp58_;
					gdouble _tmp59_;
					gdouble _tmp60_;
					gdouble _tmp61_;
					_tmp58_ = node_get_posx (self);
					_tmp59_ = _tmp58_;
					_vala_x = (_tmp59_ + self->_total_width) - margin;
					_tmp60_ = node_get_posy (self);
					_tmp61_ = _tmp60_;
					_vala_y = _tmp61_ + height;
					break;
				}
				default:
				{
					gdouble _tmp62_;
					gdouble _tmp63_;
					gdouble _tmp64_;
					gdouble _tmp65_;
					_tmp62_ = node_get_posx (self);
					_tmp63_ = _tmp62_;
					_vala_x = _tmp63_ + (self->_width / 2);
					_tmp64_ = node_get_posy (self);
					_tmp65_ = _tmp64_;
					_vala_y = (_tmp65_ + self->_total_height) - margin;
					break;
				}
			}
		}
	}
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
}

void
node_link_point (Node* self,
                 gdouble* x,
                 gdouble* y,
                 gboolean seq)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->link_point) {
		_klass_->link_point (self, x, y, seq);
	}
}

void
node_draw_shape (Node* self,
                 cairo_t* ctx,
                 Theme* theme,
                 GdkRGBA* border_color,
                 gboolean exporting)
{
	gdouble x = 0.0;
	gdouble _tmp0_;
	gdouble _tmp1_;
	Style* _tmp2_;
	Style* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gdouble y = 0.0;
	gdouble _tmp6_;
	gdouble _tmp7_;
	Style* _tmp8_;
	Style* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gdouble w = 0.0;
	Style* _tmp12_;
	Style* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	gdouble h = 0.0;
	Style* _tmp16_;
	Style* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp27_ = FALSE;
	NodeMode _tmp28_;
	NodeMode _tmp29_;
	gboolean _tmp49_ = FALSE;
	gboolean _tmp60_ = FALSE;
	GArray* _tmp61_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	g_return_if_fail (border_color != NULL);
	_tmp0_ = node_get_posx (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = node_get_style (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = style_get_node_margin (_tmp3_);
	_tmp5_ = _tmp4_;
	x = _tmp1_ + _tmp5_;
	_tmp6_ = node_get_posy (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = node_get_style (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = style_get_node_margin (_tmp9_);
	_tmp11_ = _tmp10_;
	y = _tmp7_ + _tmp11_;
	_tmp12_ = node_get_style (self);
	_tmp13_ = _tmp12_;
	_tmp14_ = style_get_node_margin (_tmp13_);
	_tmp15_ = _tmp14_;
	w = self->_width - (_tmp15_ * 2);
	_tmp16_ = node_get_style (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = style_get_node_margin (_tmp17_);
	_tmp19_ = _tmp18_;
	h = self->_height - (_tmp19_ * 2);
	if (node_is_root (self)) {
		_tmp20_ = self->_alpha < 1.0;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		GdkRGBA* _tmp21_;
		GdkRGBA* _tmp22_;
		GdkRGBA _tmp23_;
		Style* _tmp24_;
		Style* _tmp25_;
		NodeSide _tmp26_;
		_tmp21_ = theme_get_color (theme, "background");
		_tmp22_ = _tmp21_;
		_tmp23_ = *_tmp22_;
		utils_set_context_color (ctx, &_tmp23_);
		__vala_GdkRGBA_free0 (_tmp22_);
		_tmp24_ = node_get_style (self);
		_tmp25_ = _tmp24_;
		_tmp26_ = self->priv->_side;
		style_draw_node_fill (_tmp25_, ctx, x, y, w, h, _tmp26_);
	}
	_tmp28_ = node_get_mode (self);
	_tmp29_ = _tmp28_;
	if (node_mode_is_selected (_tmp29_)) {
		_tmp27_ = !exporting;
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		GdkRGBA* _tmp30_;
		GdkRGBA* _tmp31_;
		GdkRGBA _tmp32_;
		Style* _tmp33_;
		Style* _tmp34_;
		NodeSide _tmp35_;
		_tmp30_ = theme_get_color (theme, "nodesel_background");
		_tmp31_ = _tmp30_;
		_tmp32_ = *_tmp31_;
		utils_set_context_color_with_alpha (ctx, &_tmp32_, self->_alpha);
		__vala_GdkRGBA_free0 (_tmp31_);
		_tmp33_ = node_get_style (self);
		_tmp34_ = _tmp33_;
		_tmp35_ = self->priv->_side;
		style_draw_node_fill (_tmp34_, ctx, x, y, w, h, _tmp35_);
	} else {
		gboolean _tmp36_ = FALSE;
		if (node_is_root (self)) {
			_tmp36_ = TRUE;
		} else {
			Style* _tmp37_;
			Style* _tmp38_;
			_tmp37_ = node_get_style (self);
			_tmp38_ = _tmp37_;
			_tmp36_ = style_is_fillable (_tmp38_);
		}
		if (_tmp36_) {
			GdkRGBA _tmp39_;
			Style* _tmp40_;
			Style* _tmp41_;
			NodeSide _tmp42_;
			_tmp39_ = *border_color;
			utils_set_context_color_with_alpha (ctx, &_tmp39_, self->_alpha);
			_tmp40_ = node_get_style (self);
			_tmp41_ = _tmp40_;
			_tmp42_ = self->priv->_side;
			style_draw_node_fill (_tmp41_, ctx, x, y, w, h, _tmp42_);
		} else {
			if (!node_is_grouped (self)) {
				GdkRGBA* _tmp43_;
				GdkRGBA* _tmp44_;
				GdkRGBA _tmp45_;
				Style* _tmp46_;
				Style* _tmp47_;
				NodeSide _tmp48_;
				_tmp43_ = theme_get_color (theme, "background");
				_tmp44_ = _tmp43_;
				_tmp45_ = *_tmp44_;
				utils_set_context_color_with_alpha (ctx, &_tmp45_, self->_alpha);
				__vala_GdkRGBA_free0 (_tmp44_);
				_tmp46_ = node_get_style (self);
				_tmp47_ = _tmp46_;
				_tmp48_ = self->priv->_side;
				style_draw_node_fill (_tmp47_, ctx, x, y, w, h, _tmp48_);
			}
		}
	}
	if (!node_is_root (self)) {
		_tmp49_ = TRUE;
	} else {
		Style* _tmp50_;
		Style* _tmp51_;
		_tmp50_ = node_get_style (self);
		_tmp51_ = _tmp50_;
		_tmp49_ = style_is_fillable (_tmp51_);
	}
	if (_tmp49_) {
		GdkRGBA _tmp52_;
		Style* _tmp53_;
		Style* _tmp54_;
		gint* _tmp55_;
		gint* _tmp56_;
		Style* _tmp57_;
		Style* _tmp58_;
		NodeSide _tmp59_;
		_tmp52_ = *border_color;
		utils_set_context_color_with_alpha (ctx, &_tmp52_, self->_alpha);
		_tmp53_ = node_get_style (self);
		_tmp54_ = _tmp53_;
		_tmp55_ = style_get_node_borderwidth (_tmp54_);
		_tmp56_ = _tmp55_;
		cairo_set_line_width (ctx, *_tmp56_);
		_tmp57_ = node_get_style (self);
		_tmp58_ = _tmp57_;
		_tmp59_ = self->priv->_side;
		style_draw_node_border (_tmp58_, ctx, x, y, w, h, _tmp59_);
	}
	_tmp61_ = self->_children;
	if (_tmp61_->len > ((guint) 0)) {
		_tmp60_ = !node_is_summarized (self);
	} else {
		_tmp60_ = FALSE;
	}
	if (_tmp60_) {
		gint max_width = 0;
		gboolean _tmp77_ = FALSE;
		NodeSide _tmp78_;
		max_width = 0;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp62_ = FALSE;
				_tmp62_ = TRUE;
				while (TRUE) {
					GArray* _tmp64_;
					GArray* _tmp65_;
					Node* _tmp66_;
					Style* _tmp67_;
					Style* _tmp68_;
					gint* _tmp69_;
					gint* _tmp70_;
					if (!_tmp62_) {
						gint _tmp63_;
						_tmp63_ = i;
						i = _tmp63_ + 1;
					}
					_tmp62_ = FALSE;
					_tmp64_ = self->_children;
					if (!(((guint) i) < _tmp64_->len)) {
						break;
					}
					_tmp65_ = self->_children;
					_tmp66_ = g_array_index (_tmp65_, Node*, (guint) i);
					_tmp67_ = node_get_style (_tmp66_);
					_tmp68_ = _tmp67_;
					_tmp69_ = style_get_link_width (_tmp68_);
					_tmp70_ = _tmp69_;
					if (max_width < (*_tmp70_)) {
						GArray* _tmp71_;
						Node* _tmp72_;
						Style* _tmp73_;
						Style* _tmp74_;
						gint* _tmp75_;
						gint* _tmp76_;
						_tmp71_ = self->_children;
						_tmp72_ = g_array_index (_tmp71_, Node*, (guint) i);
						_tmp73_ = node_get_style (_tmp72_);
						_tmp74_ = _tmp73_;
						_tmp75_ = style_get_link_width (_tmp74_);
						_tmp76_ = _tmp75_;
						max_width = *_tmp76_;
					}
				}
			}
		}
		_tmp78_ = self->priv->_side;
		if (_tmp78_ == NODE_SIDE_RIGHT) {
			_tmp77_ = self->_width < self->_total_width;
		} else {
			_tmp77_ = FALSE;
		}
		if (_tmp77_) {
			gdouble _tmp79_ = 0.0;
			gdouble _tmp80_ = 0.0;
			gdouble _tmp81_;
			gdouble _tmp82_;
			Style* _tmp83_;
			Style* _tmp84_;
			gint _tmp85_;
			gint _tmp86_;
			node_link_point (self, &_tmp79_, &_tmp80_, FALSE);
			x = _tmp79_;
			y = _tmp80_;
			cairo_set_line_width (ctx, (gdouble) max_width);
			_tmp81_ = node_get_posx (self);
			_tmp82_ = _tmp81_;
			_tmp83_ = node_get_style (self);
			_tmp84_ = _tmp83_;
			_tmp85_ = style_get_node_margin (_tmp84_);
			_tmp86_ = _tmp85_;
			cairo_move_to (ctx, (_tmp82_ + self->_width) - _tmp86_, y);
			cairo_line_to (ctx, x, y);
			cairo_stroke (ctx);
		} else {
			gboolean _tmp87_ = FALSE;
			NodeSide _tmp88_;
			_tmp88_ = self->priv->_side;
			if (_tmp88_ == NODE_SIDE_BOTTOM) {
				_tmp87_ = self->_height < self->_total_height;
			} else {
				_tmp87_ = FALSE;
			}
			if (_tmp87_) {
				gdouble _tmp89_ = 0.0;
				gdouble _tmp90_ = 0.0;
				gdouble _tmp91_;
				gdouble _tmp92_;
				Style* _tmp93_;
				Style* _tmp94_;
				gint _tmp95_;
				gint _tmp96_;
				node_link_point (self, &_tmp89_, &_tmp90_, FALSE);
				x = _tmp89_;
				y = _tmp90_;
				cairo_set_line_width (ctx, (gdouble) max_width);
				_tmp91_ = node_get_posy (self);
				_tmp92_ = _tmp91_;
				_tmp93_ = node_get_style (self);
				_tmp94_ = _tmp93_;
				_tmp95_ = style_get_node_margin (_tmp94_);
				_tmp96_ = _tmp95_;
				cairo_move_to (ctx, x, (_tmp92_ + self->_height) - _tmp96_);
				cairo_line_to (ctx, x, y);
				cairo_stroke (ctx);
			}
		}
	}
}

static void
node_real_draw_image (Node* self,
                      cairo_t* ctx,
                      Theme* theme)
{
	NodeImage* _tmp0_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp0_ = self->priv->_image;
	if (_tmp0_ != NULL) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gdouble _tmp4_ = 0.0;
		NodeImage* _tmp5_;
		node_image_bbox (self, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
		x = _tmp1_;
		y = _tmp2_;
		w = _tmp3_;
		h = _tmp4_;
		_tmp5_ = self->priv->_image;
		node_image_draw (_tmp5_, ctx, x, y, self->_alpha);
	}
}

void
node_draw_image (Node* self,
                 cairo_t* ctx,
                 Theme* theme)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_image) {
		_klass_->draw_image (self, ctx, theme);
	}
}

static void
node_real_draw_name (Node* self,
                     cairo_t* ctx,
                     Theme* theme,
                     gboolean exporting)
{
	gint hmargin = 0;
	gint vmargin = 0;
	gboolean _tmp0_ = FALSE;
	NodeMode _tmp1_;
	NodeMode _tmp2_;
	GdkRGBA* color = NULL;
	GdkRGBA* _tmp18_;
	gboolean _tmp19_ = FALSE;
	NodeMode _tmp20_;
	NodeMode _tmp21_;
	CanvasText* _tmp39_;
	CanvasText* _tmp40_;
	GdkRGBA* _tmp41_;
	GdkRGBA _tmp42_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	hmargin = 3;
	vmargin = 3;
	_tmp1_ = node_get_mode (self);
	_tmp2_ = _tmp1_;
	if (node_mode_is_selected (_tmp2_)) {
		_tmp0_ = !exporting;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint padding = 0;
		Style* _tmp3_;
		Style* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint margin = 0;
		Style* _tmp7_;
		Style* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		GdkRGBA* _tmp11_;
		GdkRGBA* _tmp12_;
		GdkRGBA _tmp13_;
		gdouble _tmp14_;
		gdouble _tmp15_;
		gdouble _tmp16_;
		gdouble _tmp17_;
		_tmp3_ = node_get_style (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = style_get_node_padding (_tmp4_);
		_tmp6_ = _tmp5_;
		padding = _tmp6_;
		_tmp7_ = node_get_style (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = style_get_node_margin (_tmp8_);
		_tmp10_ = _tmp9_;
		margin = _tmp10_;
		_tmp11_ = theme_get_color (theme, "nodesel_background");
		_tmp12_ = _tmp11_;
		_tmp13_ = *_tmp12_;
		utils_set_context_color_with_alpha (ctx, &_tmp13_, self->_alpha);
		__vala_GdkRGBA_free0 (_tmp12_);
		_tmp14_ = node_get_posx (self);
		_tmp15_ = _tmp14_;
		_tmp16_ = node_get_posy (self);
		_tmp17_ = _tmp16_;
		cairo_rectangle (ctx, ((_tmp15_ + padding) + margin) - hmargin, ((_tmp17_ + padding) + margin) - vmargin, ((self->_width - (padding * 2)) - (margin * 2)) + (hmargin * 2), ((self->_height - (padding * 2)) - (margin * 2)) + (vmargin * 2));
		cairo_fill (ctx);
	}
	_tmp18_ = theme_get_color (theme, "foreground");
	color = _tmp18_;
	_tmp20_ = node_get_mode (self);
	_tmp21_ = _tmp20_;
	if (node_mode_is_selected (_tmp21_)) {
		_tmp19_ = !exporting;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		GdkRGBA* _tmp22_;
		_tmp22_ = theme_get_color (theme, "nodesel_foreground");
		__vala_GdkRGBA_free0 (color);
		color = _tmp22_;
	} else {
		Node* _tmp23_;
		_tmp23_ = self->priv->_parent;
		if (_tmp23_ == NULL) {
			GdkRGBA _tmp24_ = {0};
			GdkRGBA* _tmp31_;
			if (self->priv->_link_color_set) {
				GdkRGBA* _tmp25_;
				GdkRGBA* _tmp26_;
				GdkRGBA _tmp27_;
				GdkRGBA _tmp28_ = {0};
				_tmp25_ = node_get_link_color (self);
				_tmp26_ = _tmp25_;
				_tmp27_ = *_tmp26_;
				granite_contrasting_foreground_color (&_tmp27_, &_tmp28_);
				_tmp24_ = _tmp28_;
			} else {
				GdkRGBA* _tmp29_;
				GdkRGBA* _tmp30_;
				_tmp29_ = theme_get_color (theme, "root_foreground");
				_tmp30_ = _tmp29_;
				_tmp24_ = *_tmp30_;
				__vala_GdkRGBA_free0 (_tmp30_);
			}
			_tmp31_ = __vala_GdkRGBA_copy0 (&_tmp24_);
			__vala_GdkRGBA_free0 (color);
			color = _tmp31_;
		} else {
			Style* _tmp32_;
			Style* _tmp33_;
			_tmp32_ = node_get_style (self);
			_tmp33_ = _tmp32_;
			if (style_is_fillable (_tmp33_)) {
				GdkRGBA* _tmp34_;
				GdkRGBA* _tmp35_;
				GdkRGBA _tmp36_;
				GdkRGBA _tmp37_ = {0};
				GdkRGBA* _tmp38_;
				_tmp34_ = node_get_link_color (self);
				_tmp35_ = _tmp34_;
				_tmp36_ = *_tmp35_;
				granite_contrasting_foreground_color (&_tmp36_, &_tmp37_);
				_tmp38_ = __vala_GdkRGBA_copy0 (&_tmp37_);
				__vala_GdkRGBA_free0 (color);
				color = _tmp38_;
			}
		}
	}
	_tmp39_ = node_get_name (self);
	_tmp40_ = _tmp39_;
	_tmp41_ = color;
	_tmp42_ = *_tmp41_;
	canvas_text_draw (_tmp40_, ctx, theme, &_tmp42_, self->_alpha, exporting);
	__vala_GdkRGBA_free0 (color);
}

void
node_draw_name (Node* self,
                cairo_t* ctx,
                Theme* theme,
                gboolean exporting)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_name) {
		_klass_->draw_name (self, ctx, theme, exporting);
	}
}

static void
node_real_draw_leaf_task (Node* self,
                          cairo_t* ctx,
                          GdkRGBA* color,
                          GdkRGBA* background)
{
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (color != NULL);
	if (self->priv->_task_count > 0) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		gdouble _tmp0_ = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp7_ = FALSE;
		Style* _tmp8_;
		Style* _tmp9_;
		node_task_bbox (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
		x = _tmp0_;
		y = _tmp1_;
		w = _tmp2_;
		h = _tmp3_;
		cairo_new_path (ctx);
		cairo_set_line_width (ctx, (gdouble) 2);
		cairo_arc (ctx, x + self->_task_radius, y + self->_task_radius, self->_task_radius, (gdouble) 0, 2 * G_PI);
		if (self->priv->_task_done == 0) {
			_tmp4_ = background != NULL;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GdkRGBA _tmp5_;
			_tmp5_ = *background;
			utils_set_context_color_with_alpha (ctx, &_tmp5_, self->_alpha);
		} else {
			GdkRGBA _tmp6_;
			_tmp6_ = *color;
			utils_set_context_color_with_alpha (ctx, &_tmp6_, self->_alpha);
		}
		cairo_fill_preserve (ctx);
		_tmp8_ = node_get_style (self);
		_tmp9_ = _tmp8_;
		if (style_is_fillable (_tmp9_)) {
			_tmp7_ = background != NULL;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GdkRGBA _tmp10_;
			_tmp10_ = *background;
			utils_set_context_color_with_alpha (ctx, &_tmp10_, self->_alpha);
		} else {
			GdkRGBA _tmp11_;
			_tmp11_ = *color;
			utils_set_context_color_with_alpha (ctx, &_tmp11_, self->_alpha);
		}
		cairo_stroke (ctx);
	}
}

void
node_draw_leaf_task (Node* self,
                     cairo_t* ctx,
                     GdkRGBA* color,
                     GdkRGBA* background)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_leaf_task) {
		_klass_->draw_leaf_task (self, ctx, color, background);
	}
}

static void
node_real_draw_acc_task (Node* self,
                         cairo_t* ctx,
                         GdkRGBA* color,
                         GdkRGBA* background)
{
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (color != NULL);
	if (self->priv->_task_count > 0) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		gdouble complete = 0.0;
		gdouble angle = 0.0;
		gdouble _tmp0_ = 0.0;
		gdouble _tmp1_ = 0.0;
		gdouble _tmp2_ = 0.0;
		gdouble _tmp3_ = 0.0;
		gboolean _tmp4_ = FALSE;
		Style* _tmp5_;
		Style* _tmp6_;
		complete = self->priv->_task_done / (self->priv->_task_count * 1.0);
		angle = ((complete * 360) + 270) * (G_PI / 180.0);
		node_task_bbox (self, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
		x = _tmp0_;
		y = _tmp1_;
		w = _tmp2_;
		h = _tmp3_;
		x += self->_task_radius;
		y += self->_task_radius;
		cairo_new_path (ctx);
		cairo_set_line_width (ctx, (gdouble) 2);
		cairo_arc (ctx, x, y, self->_task_radius, (gdouble) 0, 2 * G_PI);
		_tmp5_ = node_get_style (self);
		_tmp6_ = _tmp5_;
		if (style_is_fillable (_tmp6_)) {
			_tmp4_ = background != NULL;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GdkRGBA _tmp7_;
			_tmp7_ = *background;
			utils_set_context_color_with_alpha (ctx, &_tmp7_, self->_alpha);
			cairo_fill (ctx);
		} else {
			GdkRGBA _tmp8_;
			_tmp8_ = *color;
			utils_set_context_color_with_alpha (ctx, &_tmp8_, self->_alpha);
			cairo_stroke (ctx);
		}
		if (self->priv->_task_done > 0) {
			GdkRGBA _tmp9_;
			_tmp9_ = *color;
			utils_set_context_color_with_alpha (ctx, &_tmp9_, self->_alpha);
			cairo_new_path (ctx);
			cairo_set_line_width (ctx, (gdouble) 2);
			cairo_arc (ctx, x, y, self->_task_radius - 1, 1.5 * G_PI, angle);
			cairo_line_to (ctx, x, y);
			cairo_arc (ctx, x, y, self->_task_radius - 1, 1.5 * G_PI, 1.5 * G_PI);
			cairo_line_to (ctx, x, y);
			cairo_fill (ctx);
		}
	}
}

void
node_draw_acc_task (Node* self,
                    cairo_t* ctx,
                    GdkRGBA* color,
                    GdkRGBA* background)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_acc_task) {
		_klass_->draw_acc_task (self, ctx, color, background);
	}
}

static void
node_real_draw_sticker (Node* self,
                        cairo_t* ctx,
                        GdkRGBA* sel_color,
                        GdkRGBA* bg_color)
{
	GdkPixbuf* _tmp0_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (sel_color != NULL);
	g_return_if_fail (bg_color != NULL);
	_tmp0_ = self->priv->_sticker_buf;
	if (_tmp0_ != NULL) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		GdkRGBA _tmp1_ = {0};
		NodeMode _tmp2_;
		NodeMode _tmp3_;
		GdkRGBA color = {0};
		gdouble _tmp6_ = 0.0;
		gdouble _tmp7_ = 0.0;
		gdouble _tmp8_ = 0.0;
		gdouble _tmp9_ = 0.0;
		GdkPixbuf* _tmp11_;
		_tmp2_ = node_get_mode (self);
		_tmp3_ = _tmp2_;
		if (node_mode_is_selected (_tmp3_)) {
			GdkRGBA _tmp4_;
			_tmp4_ = *sel_color;
			_tmp1_ = _tmp4_;
		} else {
			GdkRGBA _tmp5_;
			_tmp5_ = *bg_color;
			_tmp1_ = _tmp5_;
		}
		color = _tmp1_;
		node_sticker_bbox (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
		x = _tmp6_;
		y = _tmp7_;
		w = _tmp8_;
		h = _tmp9_;
		if (self->priv->_mode == NODE_MODE_SELECTED) {
			GdkRGBA _tmp10_;
			_tmp10_ = color;
			utils_set_context_color_with_alpha (ctx, &_tmp10_, self->_alpha);
			cairo_move_to (ctx, x, y);
			cairo_rectangle (ctx, x, y, w, h);
			cairo_fill (ctx);
		}
		_tmp11_ = self->priv->_sticker_buf;
		gdk_cairo_set_source_pixbuf (ctx, _tmp11_, x, y);
		cairo_paint_with_alpha (ctx, self->_alpha);
	}
}

void
node_draw_sticker (Node* self,
                   cairo_t* ctx,
                   GdkRGBA* sel_color,
                   GdkRGBA* bg_color)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_sticker) {
		_klass_->draw_sticker (self, ctx, sel_color, bg_color);
	}
}

static void
node_real_draw_sequence_num (Node* self,
                             cairo_t* ctx,
                             GdkRGBA* sel_color,
                             GdkRGBA* fg_color)
{
	SequenceNum* _tmp0_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (sel_color != NULL);
	g_return_if_fail (fg_color != NULL);
	_tmp0_ = self->priv->_sequence_num;
	if (_tmp0_ != NULL) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		GdkRGBA _tmp1_ = {0};
		NodeMode _tmp2_;
		NodeMode _tmp3_;
		GdkRGBA color = {0};
		gdouble _tmp13_ = 0.0;
		gdouble _tmp14_ = 0.0;
		gdouble _tmp15_ = 0.0;
		gdouble _tmp16_ = 0.0;
		PangoRectangle ink_rect = {0};
		PangoRectangle log_rect = {0};
		SequenceNum* _tmp17_;
		PangoLayout* _tmp18_;
		PangoLayout* _tmp19_;
		PangoRectangle _tmp20_ = {0};
		PangoRectangle _tmp21_ = {0};
		PangoRectangle _tmp22_;
		GdkRGBA _tmp23_;
		SequenceNum* _tmp24_;
		PangoLayout* _tmp25_;
		PangoLayout* _tmp26_;
		_tmp2_ = node_get_mode (self);
		_tmp3_ = _tmp2_;
		if (node_mode_is_selected (_tmp3_)) {
			GdkRGBA _tmp4_;
			_tmp4_ = *sel_color;
			_tmp1_ = _tmp4_;
		} else {
			GdkRGBA _tmp5_ = {0};
			Style* _tmp6_;
			Style* _tmp7_;
			_tmp6_ = node_get_style (self);
			_tmp7_ = _tmp6_;
			if (style_is_fillable (_tmp7_)) {
				GdkRGBA* _tmp8_;
				GdkRGBA* _tmp9_;
				GdkRGBA _tmp10_;
				GdkRGBA _tmp11_ = {0};
				_tmp8_ = node_get_link_color (self);
				_tmp9_ = _tmp8_;
				_tmp10_ = *_tmp9_;
				granite_contrasting_foreground_color (&_tmp10_, &_tmp11_);
				_tmp5_ = _tmp11_;
			} else {
				GdkRGBA _tmp12_;
				_tmp12_ = *fg_color;
				_tmp5_ = _tmp12_;
			}
			_tmp1_ = _tmp5_;
		}
		color = _tmp1_;
		node_sequence_bbox (self, &_tmp13_, &_tmp14_, &_tmp15_, &_tmp16_);
		x = _tmp13_;
		y = _tmp14_;
		w = _tmp15_;
		h = _tmp16_;
		_tmp17_ = self->priv->_sequence_num;
		_tmp18_ = sequence_num_get_layout (_tmp17_);
		_tmp19_ = _tmp18_;
		pango_layout_get_extents (_tmp19_, &_tmp20_, &_tmp21_);
		ink_rect = _tmp20_;
		log_rect = _tmp21_;
		_tmp22_ = log_rect;
		cairo_move_to (ctx, x - (_tmp22_.x / PANGO_SCALE), y);
		_tmp23_ = color;
		utils_set_context_color_with_alpha (ctx, &_tmp23_, self->_alpha);
		_tmp24_ = self->priv->_sequence_num;
		_tmp25_ = sequence_num_get_layout (_tmp24_);
		_tmp26_ = _tmp25_;
		pango_cairo_show_layout (ctx, _tmp26_);
		cairo_new_path (ctx);
	}
}

void
node_draw_sequence_num (Node* self,
                        cairo_t* ctx,
                        GdkRGBA* sel_color,
                        GdkRGBA* fg_color)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_sequence_num) {
		_klass_->draw_sequence_num (self, ctx, sel_color, fg_color);
	}
}

static void
node_real_draw_common_note (Node* self,
                            cairo_t* ctx,
                            GdkRGBA* reg_color,
                            GdkRGBA* sel_color,
                            GdkRGBA* bg_color)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (reg_color != NULL);
	g_return_if_fail (sel_color != NULL);
	g_return_if_fail (bg_color != NULL);
	_tmp0_ = node_get_note (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		GdkRGBA _tmp4_ = {0};
		NodeMode _tmp5_;
		NodeMode _tmp6_;
		GdkRGBA color = {0};
		gdouble _tmp17_ = 0.0;
		gdouble _tmp18_ = 0.0;
		gdouble _tmp19_ = 0.0;
		gdouble _tmp20_ = 0.0;
		GdkRGBA _tmp21_;
		_tmp5_ = node_get_mode (self);
		_tmp6_ = _tmp5_;
		if (node_mode_is_selected (_tmp6_)) {
			GdkRGBA _tmp7_;
			_tmp7_ = *sel_color;
			_tmp4_ = _tmp7_;
		} else {
			GdkRGBA _tmp8_ = {0};
			gboolean _tmp9_ = FALSE;
			if (!node_is_root (self)) {
				Style* _tmp10_;
				Style* _tmp11_;
				_tmp10_ = node_get_style (self);
				_tmp11_ = _tmp10_;
				_tmp9_ = style_is_fillable (_tmp11_);
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				GdkRGBA* _tmp12_;
				GdkRGBA* _tmp13_;
				GdkRGBA _tmp14_;
				GdkRGBA _tmp15_ = {0};
				_tmp12_ = node_get_link_color (self);
				_tmp13_ = _tmp12_;
				_tmp14_ = *_tmp13_;
				granite_contrasting_foreground_color (&_tmp14_, &_tmp15_);
				_tmp8_ = _tmp15_;
			} else {
				GdkRGBA _tmp16_;
				_tmp16_ = *reg_color;
				_tmp8_ = _tmp16_;
			}
			_tmp4_ = _tmp8_;
		}
		color = _tmp4_;
		node_note_bbox (self, &_tmp17_, &_tmp18_, &_tmp19_, &_tmp20_);
		x = _tmp17_;
		y = _tmp18_;
		w = _tmp19_;
		h = _tmp20_;
		_tmp21_ = color;
		utils_set_context_color_with_alpha (ctx, &_tmp21_, self->_alpha);
		cairo_new_path (ctx);
		cairo_set_line_width (ctx, (gdouble) 1);
		cairo_move_to (ctx, x + 2, y);
		cairo_line_to (ctx, x + 10, y);
		cairo_stroke (ctx);
		cairo_move_to (ctx, x, y + 3);
		cairo_line_to (ctx, x + 10, y + 3);
		cairo_stroke (ctx);
		cairo_move_to (ctx, x, y + 6);
		cairo_line_to (ctx, x + 10, y + 6);
		cairo_stroke (ctx);
		cairo_move_to (ctx, x, y + 9);
		cairo_line_to (ctx, x + 10, y + 9);
		cairo_stroke (ctx);
	}
}

void
node_draw_common_note (Node* self,
                       cairo_t* ctx,
                       GdkRGBA* reg_color,
                       GdkRGBA* sel_color,
                       GdkRGBA* bg_color)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_common_note) {
		_klass_->draw_common_note (self, ctx, reg_color, sel_color, bg_color);
	}
}

static void
node_real_draw_link_node (Node* self,
                          cairo_t* ctx,
                          GdkRGBA* reg_color,
                          GdkRGBA* sel_color,
                          GdkRGBA* bg_color)
{
	NodeLink* _tmp0_;
	NodeLink* _tmp1_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (reg_color != NULL);
	g_return_if_fail (sel_color != NULL);
	g_return_if_fail (bg_color != NULL);
	_tmp0_ = node_get_linked_node (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		GdkRGBA _tmp2_ = {0};
		NodeMode _tmp3_;
		NodeMode _tmp4_;
		GdkRGBA color = {0};
		gdouble _tmp15_ = 0.0;
		gdouble _tmp16_ = 0.0;
		gdouble _tmp17_ = 0.0;
		gdouble _tmp18_ = 0.0;
		GdkRGBA _tmp19_;
		NodeLink* _tmp20_;
		NodeLink* _tmp21_;
		_tmp3_ = node_get_mode (self);
		_tmp4_ = _tmp3_;
		if (node_mode_is_selected (_tmp4_)) {
			GdkRGBA _tmp5_;
			_tmp5_ = *sel_color;
			_tmp2_ = _tmp5_;
		} else {
			GdkRGBA _tmp6_ = {0};
			gboolean _tmp7_ = FALSE;
			if (!node_is_root (self)) {
				Style* _tmp8_;
				Style* _tmp9_;
				_tmp8_ = node_get_style (self);
				_tmp9_ = _tmp8_;
				_tmp7_ = style_is_fillable (_tmp9_);
			} else {
				_tmp7_ = FALSE;
			}
			if (_tmp7_) {
				GdkRGBA* _tmp10_;
				GdkRGBA* _tmp11_;
				GdkRGBA _tmp12_;
				GdkRGBA _tmp13_ = {0};
				_tmp10_ = node_get_link_color (self);
				_tmp11_ = _tmp10_;
				_tmp12_ = *_tmp11_;
				granite_contrasting_foreground_color (&_tmp12_, &_tmp13_);
				_tmp6_ = _tmp13_;
			} else {
				GdkRGBA _tmp14_;
				_tmp14_ = *reg_color;
				_tmp6_ = _tmp14_;
			}
			_tmp2_ = _tmp6_;
		}
		color = _tmp2_;
		node_linked_node_bbox (self, &_tmp15_, &_tmp16_, &_tmp17_, &_tmp18_);
		x = _tmp15_;
		y = _tmp16_;
		w = _tmp17_;
		h = _tmp18_;
		_tmp19_ = color;
		utils_set_context_color_with_alpha (ctx, &_tmp19_, self->_alpha);
		cairo_new_path (ctx);
		cairo_set_line_width (ctx, (gdouble) 1);
		cairo_move_to (ctx, x, y + 3);
		cairo_line_to (ctx, x + 5, y + 3);
		cairo_line_to (ctx, x + 5, y + 1);
		cairo_line_to (ctx, x + 6, y + 1);
		cairo_line_to (ctx, x + 10, y + 4);
		cairo_line_to (ctx, x + 10, y + 5);
		cairo_line_to (ctx, x + 6, y + 8);
		cairo_line_to (ctx, x + 5, y + 8);
		cairo_line_to (ctx, x + 5, y + 6);
		cairo_line_to (ctx, x, y + 6);
		cairo_close_path (ctx);
		_tmp20_ = node_get_linked_node (self);
		_tmp21_ = _tmp20_;
		if (node_link_is_local (_tmp21_)) {
			cairo_fill (ctx);
		} else {
			cairo_stroke (ctx);
		}
	}
}

void
node_draw_link_node (Node* self,
                     cairo_t* ctx,
                     GdkRGBA* reg_color,
                     GdkRGBA* sel_color,
                     GdkRGBA* bg_color)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_link_node) {
		_klass_->draw_link_node (self, ctx, reg_color, sel_color, bg_color);
	}
}

static void
node_real_draw_common_fold (Node* self,
                            cairo_t* ctx,
                            GdkRGBA* bg_color,
                            GdkRGBA* fg_color)
{
	gboolean _tmp0_ = FALSE;
	GArray* _tmp1_;
	gdouble fx = 0.0;
	gdouble fy = 0.0;
	gdouble fw = 0.0;
	gdouble fh = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (bg_color != NULL);
	g_return_if_fail (fg_color != NULL);
	_tmp1_ = self->_children;
	if (_tmp1_->len == ((guint) 0)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = node_is_summarized (self);
	}
	if (_tmp0_) {
		return;
	}
	node_fold_bbox (self, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	fx = _tmp2_;
	fy = _tmp3_;
	fw = _tmp4_;
	fh = _tmp5_;
	_tmp6_ = self->priv->_folded;
	if (_tmp6_) {
		GdkRGBA _tmp7_;
		GdkRGBA _tmp8_;
		_tmp7_ = *bg_color;
		utils_set_context_color_with_alpha (ctx, &_tmp7_, self->_alpha);
		cairo_new_path (ctx);
		cairo_set_line_width (ctx, (gdouble) 1);
		cairo_rectangle (ctx, fx, fy, fw, fh);
		cairo_fill (ctx);
		_tmp8_ = *fg_color;
		utils_set_context_color_with_alpha (ctx, &_tmp8_, self->_alpha);
		cairo_new_path (ctx);
		cairo_arc (ctx, fx + (fw / 3), fy + (fh / 2), (gdouble) 2, (gdouble) 0, 2 * G_PI);
		cairo_fill (ctx);
		cairo_new_path (ctx);
		cairo_arc (ctx, fx + ((fw / 3) * 2), fy + (fh / 2), (gdouble) 2, (gdouble) 0, 2 * G_PI);
		cairo_fill (ctx);
	} else {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_show_fold;
		if (_tmp9_) {
			GdkRGBA _tmp10_;
			GdkRGBA _tmp11_;
			_tmp10_ = *fg_color;
			utils_set_context_color_with_alpha (ctx, &_tmp10_, self->_alpha);
			cairo_new_path (ctx);
			cairo_set_line_width (ctx, (gdouble) 2);
			cairo_rectangle (ctx, fx, fy, fw, fh);
			cairo_fill_preserve (ctx);
			_tmp11_ = *bg_color;
			utils_set_context_color_with_alpha (ctx, &_tmp11_, self->_alpha);
			cairo_stroke (ctx);
		}
	}
}

void
node_draw_common_fold (Node* self,
                       cairo_t* ctx,
                       GdkRGBA* bg_color,
                       GdkRGBA* fg_color)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_common_fold) {
		_klass_->draw_common_fold (self, ctx, bg_color, fg_color);
	}
}

static void
node_real_draw_attachable (Node* self,
                           cairo_t* ctx,
                           Theme* theme,
                           GdkRGBA* frost_background)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	NodeMode _tmp2_;
	NodeMode _tmp3_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp2_ = node_get_mode (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == NODE_MODE_ATTACHABLE) {
		_tmp1_ = TRUE;
	} else {
		NodeMode _tmp4_;
		NodeMode _tmp5_;
		_tmp4_ = node_get_mode (self);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ == NODE_MODE_DROPPABLE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		NodeMode _tmp6_;
		NodeMode _tmp7_;
		_tmp6_ = node_get_mode (self);
		_tmp7_ = _tmp6_;
		_tmp0_ = _tmp7_ == NODE_MODE_HIGHLIGHTED;
	}
	if (_tmp0_) {
		gdouble x = 0.0;
		gdouble y = 0.0;
		gdouble w = 0.0;
		gdouble h = 0.0;
		gdouble _tmp8_ = 0.0;
		gdouble _tmp9_ = 0.0;
		gdouble _tmp10_ = 0.0;
		gdouble _tmp11_ = 0.0;
		GdkRGBA* _tmp12_;
		GdkRGBA* _tmp13_;
		GdkRGBA _tmp14_;
		node_node_bbox (self, &_tmp8_, &_tmp9_, &_tmp10_, &_tmp11_);
		x = _tmp8_;
		y = _tmp9_;
		w = _tmp10_;
		h = _tmp11_;
		_tmp12_ = theme_get_color (theme, "attachable");
		_tmp13_ = _tmp12_;
		_tmp14_ = *_tmp13_;
		utils_set_context_color_with_alpha (ctx, &_tmp14_, self->_alpha);
		__vala_GdkRGBA_free0 (_tmp13_);
		cairo_set_line_width (ctx, (gdouble) 4);
		cairo_rectangle (ctx, x, y, w, h);
		cairo_stroke (ctx);
	}
}

void
node_draw_attachable (Node* self,
                      cairo_t* ctx,
                      Theme* theme,
                      GdkRGBA* frost_background)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_attachable) {
		_klass_->draw_attachable (self, ctx, theme, frost_background);
	}
}

static void
node_real_draw_link (Node* self,
                     cairo_t* ctx,
                     Theme* theme)
{
	gdouble parent_x = 0.0;
	gdouble parent_y = 0.0;
	gdouble _tmp0_ = 0.0;
	Style* _tmp1_;
	Style* _tmp2_;
	NodeBorder* _tmp3_;
	NodeBorder* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	gdouble height = 0.0;
	gdouble tailx = 0.0;
	gdouble taily = 0.0;
	gdouble tipx = 0.0;
	gdouble tipy = 0.0;
	gdouble child_x1 = 0.0;
	gdouble child_y1 = 0.0;
	gdouble child_x2 = 0.0;
	gdouble child_y2 = 0.0;
	gdouble* ext_x = NULL;
	gdouble* ext_y = NULL;
	gint margin = 0;
	Style* _tmp12_;
	Style* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	gint padding = 0;
	Style* _tmp16_;
	Style* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	Node* prev = NULL;
	Node* _tmp20_;
	gboolean _tmp21_ = FALSE;
	Node* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	gboolean link_sibling = FALSE;
	gdouble _tmp32_ = 0.0;
	Node* _tmp33_;
	gdouble _tmp34_;
	gdouble _tmp35_;
	GdkRGBA* _tmp39_;
	GdkRGBA _tmp40_;
	Style* _tmp101_;
	Style* _tmp102_;
	gboolean* _tmp103_;
	gboolean* _tmp104_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp1_ = node_get_style (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = style_get_node_border (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = node_border_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strcmp0 (_tmp6_, "underlined") == 0;
	_g_free0 (_tmp6_);
	if (_tmp7_) {
		Style* _tmp8_;
		Style* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp8_ = node_get_style (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = style_get_node_margin (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp0_ = self->_height - _tmp11_;
	} else {
		_tmp0_ = self->_height / 2;
	}
	height = _tmp0_;
	tailx = (gdouble) 0;
	taily = (gdouble) 0;
	tipx = (gdouble) 0;
	tipy = (gdouble) 0;
	child_x1 = (gdouble) 0;
	child_y1 = (gdouble) 0;
	child_x2 = (gdouble) 0;
	child_y2 = (gdouble) 0;
	_tmp12_ = node_get_style (self);
	_tmp13_ = _tmp12_;
	_tmp14_ = style_get_node_margin (_tmp13_);
	_tmp15_ = _tmp14_;
	margin = _tmp15_;
	_tmp16_ = node_get_style (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = style_get_node_padding (_tmp17_);
	_tmp19_ = _tmp18_;
	padding = _tmp19_;
	_tmp20_ = node_previous_sibling (self, FALSE);
	prev = _tmp20_;
	_tmp22_ = self->priv->_parent;
	_tmp23_ = node_get_sequence (_tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_) {
		Node* _tmp25_;
		_tmp25_ = prev;
		_tmp21_ = _tmp25_ != NULL;
	} else {
		_tmp21_ = FALSE;
	}
	link_sibling = _tmp21_;
	if (link_sibling) {
		Node* _tmp26_;
		gdouble _tmp27_ = 0.0;
		gdouble _tmp28_ = 0.0;
		_tmp26_ = prev;
		node_link_point (_tmp26_, &_tmp27_, &_tmp28_, TRUE);
		parent_x = _tmp27_;
		parent_y = _tmp28_;
	} else {
		Node* _tmp29_;
		gdouble _tmp30_ = 0.0;
		gdouble _tmp31_ = 0.0;
		_tmp29_ = self->priv->_parent;
		node_link_point (_tmp29_, &_tmp30_, &_tmp31_, FALSE);
		parent_x = _tmp30_;
		parent_y = _tmp31_;
	}
	_tmp33_ = self->priv->_parent;
	_tmp34_ = node_get_alpha (_tmp33_);
	_tmp35_ = _tmp34_;
	if (_tmp35_ != 1.0) {
		Node* _tmp36_;
		gdouble _tmp37_;
		gdouble _tmp38_;
		_tmp36_ = self->priv->_parent;
		_tmp37_ = node_get_alpha (_tmp36_);
		_tmp38_ = _tmp37_;
		_tmp32_ = _tmp38_;
	} else {
		_tmp32_ = self->_alpha;
	}
	_tmp39_ = self->priv->_link_color;
	_tmp40_ = *_tmp39_;
	utils_set_context_color_with_alpha (ctx, &_tmp40_, _tmp32_);
	cairo_set_line_cap (ctx, CAIRO_LINE_CAP_ROUND);
	if (link_sibling) {
		NodeSide _tmp41_;
		Style* _tmp66_;
		Style* _tmp67_;
		Node* _tmp68_;
		gdouble _tmp69_ = 0.0;
		gdouble _tmp70_ = 0.0;
		gdouble _tmp71_ = 0.0;
		gdouble _tmp72_ = 0.0;
		_tmp41_ = self->priv->_side;
		switch (_tmp41_) {
			case NODE_SIDE_LEFT:
			{
				gdouble _tmp42_;
				gdouble _tmp43_;
				gdouble _tmp44_;
				gdouble _tmp45_;
				_tmp42_ = node_get_posx (self);
				_tmp43_ = _tmp42_;
				child_x1 = ((_tmp43_ + self->_width) - margin) - padding;
				child_x2 = child_x1;
				_tmp44_ = node_get_posy (self);
				_tmp45_ = _tmp44_;
				child_y1 = _tmp45_ + margin;
				child_y2 = child_y1;
				break;
			}
			case NODE_SIDE_RIGHT:
			{
				gdouble _tmp46_;
				gdouble _tmp47_;
				gdouble _tmp48_;
				gdouble _tmp49_;
				_tmp46_ = node_get_posx (self);
				_tmp47_ = _tmp46_;
				child_x1 = (_tmp47_ + margin) + padding;
				child_x2 = child_x1;
				_tmp48_ = node_get_posy (self);
				_tmp49_ = _tmp48_;
				child_y1 = _tmp49_ + margin;
				child_y2 = child_y1;
				break;
			}
			default:
			{
				gboolean _tmp50_ = FALSE;
				NodeSide _tmp51_;
				_tmp51_ = self->priv->_side;
				if (_tmp51_ == NODE_SIDE_BOTTOM) {
					Style* _tmp52_;
					Style* _tmp53_;
					NodeBorder* _tmp54_;
					NodeBorder* _tmp55_;
					gchar* _tmp56_;
					gchar* _tmp57_;
					_tmp52_ = node_get_style (self);
					_tmp53_ = _tmp52_;
					_tmp54_ = style_get_node_border (_tmp53_);
					_tmp55_ = _tmp54_;
					_tmp56_ = node_border_name (_tmp55_);
					_tmp57_ = _tmp56_;
					_tmp50_ = g_strcmp0 (_tmp57_, "underlined") != 0;
					_g_free0 (_tmp57_);
				} else {
					_tmp50_ = FALSE;
				}
				if (_tmp50_) {
					gdouble _tmp58_;
					gdouble _tmp59_;
					gdouble _tmp60_;
					gdouble _tmp61_;
					_tmp58_ = node_get_posx (self);
					_tmp59_ = _tmp58_;
					child_x1 = _tmp59_ + margin;
					child_x2 = child_x1;
					_tmp60_ = node_get_posy (self);
					_tmp61_ = _tmp60_;
					child_y1 = (_tmp61_ + margin) + padding;
					child_y2 = child_y1;
				} else {
					gdouble _tmp62_;
					gdouble _tmp63_;
					gdouble _tmp64_;
					gdouble _tmp65_;
					_tmp62_ = node_get_posx (self);
					_tmp63_ = _tmp62_;
					child_x1 = _tmp63_ + margin;
					child_x2 = child_x1;
					_tmp64_ = node_get_posy (self);
					_tmp65_ = _tmp64_;
					child_y1 = ((_tmp65_ + self->_height) - margin) - padding;
					child_y2 = child_y1;
				}
				break;
			}
		}
		_tmp66_ = node_get_style (self);
		_tmp67_ = _tmp66_;
		_tmp68_ = self->priv->_parent;
		style_draw_link (_tmp67_, ctx, _tmp68_, self, TRUE, parent_x, parent_y, child_x1, child_y1, child_x2, child_y2, &_tmp69_, &_tmp70_, &_tmp71_, &_tmp72_);
		tailx = _tmp69_;
		taily = _tmp70_;
		tipx = _tmp71_;
		tipy = _tmp72_;
	} else {
		NodeSide _tmp73_;
		Style* _tmp94_;
		Style* _tmp95_;
		Node* _tmp96_;
		gdouble _tmp97_ = 0.0;
		gdouble _tmp98_ = 0.0;
		gdouble _tmp99_ = 0.0;
		gdouble _tmp100_ = 0.0;
		_tmp73_ = self->priv->_side;
		switch (_tmp73_) {
			case NODE_SIDE_LEFT:
			{
				gdouble _tmp74_;
				gdouble _tmp75_;
				gdouble _tmp76_;
				gdouble _tmp77_;
				gdouble _tmp78_;
				gdouble _tmp79_;
				_tmp74_ = node_get_posx (self);
				_tmp75_ = _tmp74_;
				child_x1 = (_tmp75_ + self->_total_width) - margin;
				_tmp76_ = node_get_posx (self);
				_tmp77_ = _tmp76_;
				child_x2 = (_tmp77_ + self->_width) - margin;
				_tmp78_ = node_get_posy (self);
				_tmp79_ = _tmp78_;
				child_y1 = _tmp79_ + height;
				child_y2 = child_y1;
				break;
			}
			case NODE_SIDE_RIGHT:
			{
				gdouble _tmp80_;
				gdouble _tmp81_;
				gdouble _tmp82_;
				gdouble _tmp83_;
				_tmp80_ = node_get_posx (self);
				_tmp81_ = _tmp80_;
				child_x1 = _tmp81_ + margin;
				child_x2 = child_x1;
				_tmp82_ = node_get_posy (self);
				_tmp83_ = _tmp82_;
				child_y1 = _tmp83_ + height;
				child_y2 = child_y1;
				break;
			}
			case NODE_SIDE_TOP:
			{
				gdouble _tmp84_;
				gdouble _tmp85_;
				gdouble _tmp86_;
				gdouble _tmp87_;
				gdouble _tmp88_;
				gdouble _tmp89_;
				_tmp84_ = node_get_posx (self);
				_tmp85_ = _tmp84_;
				child_x1 = _tmp85_ + (self->_width / 2);
				child_x2 = child_x1;
				_tmp86_ = node_get_posy (self);
				_tmp87_ = _tmp86_;
				child_y1 = (_tmp87_ + self->_total_height) - margin;
				_tmp88_ = node_get_posy (self);
				_tmp89_ = _tmp88_;
				child_y2 = (_tmp89_ + self->_height) - margin;
				break;
			}
			case NODE_SIDE_BOTTOM:
			{
				gdouble _tmp90_;
				gdouble _tmp91_;
				gdouble _tmp92_;
				gdouble _tmp93_;
				_tmp90_ = node_get_posx (self);
				_tmp91_ = _tmp90_;
				child_x1 = _tmp91_ + (self->_width / 2);
				child_x2 = child_x1;
				_tmp92_ = node_get_posy (self);
				_tmp93_ = _tmp92_;
				child_y1 = _tmp93_ + margin;
				child_y2 = child_y1;
				break;
			}
			default:
			break;
		}
		_tmp94_ = node_get_style (self);
		_tmp95_ = _tmp94_;
		_tmp96_ = self->priv->_parent;
		style_draw_link (_tmp95_, ctx, _tmp96_, self, FALSE, parent_x, parent_y, child_x1, child_y1, child_x2, child_y2, &_tmp97_, &_tmp98_, &_tmp99_, &_tmp100_);
		tailx = _tmp97_;
		taily = _tmp98_;
		tipx = _tmp99_;
		tipy = _tmp100_;
	}
	_tmp101_ = node_get_style (self);
	_tmp102_ = _tmp101_;
	_tmp103_ = style_get_link_arrow (_tmp102_);
	_tmp104_ = _tmp103_;
	if (*_tmp104_) {
		node_draw_link_arrow (self, ctx, theme, tailx, taily, tipx, tipy);
	}
	_g_object_unref0 (prev);
	_g_free0 (ext_y);
	_g_free0 (ext_x);
}

void
node_draw_link (Node* self,
                cairo_t* ctx,
                Theme* theme)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_link) {
		_klass_->draw_link (self, ctx, theme);
	}
}

static void
node_real_draw_link_arrow (Node* self,
                           cairo_t* ctx,
                           Theme* theme,
                           gdouble tailx,
                           gdouble taily,
                           gdouble tipx,
                           gdouble tipy)
{
	gdouble extlen[7] = {0};
	gdouble _tmp0_[7] = {0};
	gdouble arrowLength = 0.0;
	Style* _tmp1_;
	Style* _tmp2_;
	gint* _tmp3_;
	gint* _tmp4_;
	gdouble _tmp5_;
	Style* _tmp6_;
	Style* _tmp7_;
	gint* _tmp8_;
	gint* _tmp9_;
	gdouble dx = 0.0;
	gdouble dy = 0.0;
	gdouble theta = 0.0;
	gdouble rad = 0.0;
	gdouble x1 = 0.0;
	gdouble y1 = 0.0;
	gdouble phi2 = 0.0;
	gdouble x2 = 0.0;
	gdouble y2 = 0.0;
	GdkRGBA* _tmp10_;
	GdkRGBA _tmp11_;
	GdkRGBA* _tmp12_;
	GdkRGBA* _tmp13_;
	GdkRGBA _tmp14_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp0_[0] = (gdouble) 12;
	_tmp0_[1] = (gdouble) 12;
	_tmp0_[2] = (gdouble) 13;
	_tmp0_[3] = (gdouble) 14;
	_tmp0_[4] = (gdouble) 15;
	_tmp0_[5] = (gdouble) 16;
	_tmp0_[6] = (gdouble) 16;
	memcpy (extlen, _tmp0_, 7 * sizeof (gdouble));
	_tmp1_ = node_get_style (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = style_get_link_width (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = extlen[(*_tmp4_) - 2];
	_tmp6_ = node_get_style (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = style_get_link_arrow_size (_tmp7_);
	_tmp9_ = _tmp8_;
	arrowLength = _tmp5_ + ((*_tmp9_) * 3);
	dx = tipx - tailx;
	dy = tipy - taily;
	theta = atan2 (dy, dx);
	rad = 35 * (G_PI / 180);
	x1 = tipx - (arrowLength * cos (theta + rad));
	y1 = tipy - (arrowLength * sin (theta + rad));
	phi2 = -35 * (G_PI / 180);
	x2 = tipx - (arrowLength * cos (theta + phi2));
	y2 = tipy - (arrowLength * sin (theta + phi2));
	_tmp10_ = self->priv->_link_color;
	_tmp11_ = *_tmp10_;
	utils_set_context_color_with_alpha (ctx, &_tmp11_, self->_alpha);
	cairo_set_line_width (ctx, (gdouble) 1);
	cairo_move_to (ctx, tipx, tipy);
	cairo_line_to (ctx, x1, y1);
	cairo_line_to (ctx, x2, y2);
	cairo_close_path (ctx);
	cairo_fill_preserve (ctx);
	_tmp12_ = theme_get_color (theme, "background");
	_tmp13_ = _tmp12_;
	_tmp14_ = *_tmp13_;
	utils_set_context_color_with_alpha (ctx, &_tmp14_, self->_alpha);
	__vala_GdkRGBA_free0 (_tmp13_);
	cairo_set_line_width (ctx, (gdouble) 2);
	cairo_stroke (ctx);
}

void
node_draw_link_arrow (Node* self,
                      cairo_t* ctx,
                      Theme* theme,
                      gdouble tailx,
                      gdouble taily,
                      gdouble tipx,
                      gdouble tipy)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_link_arrow) {
		_klass_->draw_link_arrow (self, ctx, theme, tailx, taily, tipx, tipy);
	}
}

static void
node_real_draw_resizer (Node* self,
                        cairo_t* ctx,
                        Theme* theme,
                        gboolean exporting)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	NodeMode _tmp2_;
	NodeMode _tmp3_;
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	gdouble _tmp6_ = 0.0;
	gdouble _tmp7_ = 0.0;
	gdouble _tmp8_ = 0.0;
	gdouble _tmp9_ = 0.0;
	GdkRGBA* _tmp10_;
	GdkRGBA* _tmp11_;
	GdkRGBA _tmp12_;
	GdkRGBA* _tmp13_;
	GdkRGBA* _tmp14_;
	GdkRGBA _tmp15_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp2_ = node_get_mode (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NODE_MODE_CURRENT) {
		NodeMode _tmp4_;
		NodeMode _tmp5_;
		_tmp4_ = node_get_mode (self);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != NODE_MODE_HIGHLIGHTED;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = exporting;
	}
	if (_tmp0_) {
		return;
	}
	node_resizer_bbox (self, &_tmp6_, &_tmp7_, &_tmp8_, &_tmp9_);
	x = _tmp6_;
	y = _tmp7_;
	w = _tmp8_;
	h = _tmp9_;
	_tmp10_ = theme_get_color (theme, "background");
	_tmp11_ = _tmp10_;
	_tmp12_ = *_tmp11_;
	utils_set_context_color (ctx, &_tmp12_);
	__vala_GdkRGBA_free0 (_tmp11_);
	cairo_set_line_width (ctx, (gdouble) 1);
	cairo_rectangle (ctx, x, y, w, h);
	cairo_fill_preserve (ctx);
	_tmp13_ = theme_get_color (theme, "foreground");
	_tmp14_ = _tmp13_;
	_tmp15_ = *_tmp14_;
	utils_set_context_color_with_alpha (ctx, &_tmp15_, self->_alpha);
	__vala_GdkRGBA_free0 (_tmp14_);
	cairo_stroke (ctx);
}

void
node_draw_resizer (Node* self,
                   cairo_t* ctx,
                   Theme* theme,
                   gboolean exporting)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_resizer) {
		_klass_->draw_resizer (self, ctx, theme, exporting);
	}
}

static void
node_real_draw_tags (Node* self,
                     cairo_t* ctx,
                     Theme* theme,
                     gboolean exporting)
{
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				Tags* _tmp2_;
				Tag* tag = NULL;
				Tags* _tmp3_;
				Tag* _tmp4_;
				gdouble x = 0.0;
				gdouble y = 0.0;
				gdouble w = 0.0;
				gdouble h = 0.0;
				gdouble _tmp5_ = 0.0;
				gdouble _tmp6_ = 0.0;
				gdouble _tmp7_ = 0.0;
				gdouble _tmp8_ = 0.0;
				Tag* _tmp9_;
				GdkRGBA _tmp10_ = {0};
				GdkRGBA _tmp11_;
				GdkRGBA _tmp12_ = {0};
				gboolean _tmp13_ = FALSE;
				NodeMode _tmp14_;
				NodeMode _tmp15_;
				GdkRGBA color = {0};
				GdkRGBA _tmp22_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->_tags;
				if (!(i < tags_size (_tmp2_))) {
					break;
				}
				_tmp3_ = self->priv->_tags;
				_tmp4_ = tags_get_tag (_tmp3_, i);
				tag = _tmp4_;
				node_tag_bbox (self, i, &_tmp5_, &_tmp6_, &_tmp7_, &_tmp8_);
				x = _tmp5_;
				y = _tmp6_;
				w = _tmp7_;
				h = _tmp8_;
				_tmp9_ = tag;
				tag_get_color (_tmp9_, &_tmp10_);
				_tmp11_ = _tmp10_;
				utils_set_context_color_with_alpha (ctx, &_tmp11_, self->_alpha);
				cairo_rectangle (ctx, x, y, w, h);
				cairo_fill_preserve (ctx);
				_tmp14_ = node_get_mode (self);
				_tmp15_ = _tmp14_;
				if (node_mode_is_selected (_tmp15_)) {
					_tmp13_ = !exporting;
				} else {
					_tmp13_ = FALSE;
				}
				if (_tmp13_) {
					GdkRGBA* _tmp16_;
					GdkRGBA* _tmp17_;
					GdkRGBA _tmp18_;
					GdkRGBA _tmp19_ = {0};
					_tmp16_ = theme_get_color (theme, "nodesel_background");
					_tmp17_ = _tmp16_;
					_tmp18_ = *_tmp17_;
					granite_contrasting_foreground_color (&_tmp18_, &_tmp19_);
					_tmp12_ = _tmp19_;
					__vala_GdkRGBA_free0 (_tmp17_);
				} else {
					GdkRGBA* _tmp20_;
					GdkRGBA* _tmp21_;
					_tmp20_ = theme_get_color (theme, "background");
					_tmp21_ = _tmp20_;
					_tmp12_ = *_tmp21_;
					__vala_GdkRGBA_free0 (_tmp21_);
				}
				color = _tmp12_;
				_tmp22_ = color;
				utils_set_context_color_with_alpha (ctx, &_tmp22_, self->_alpha);
				cairo_set_line_width (ctx, (gdouble) 1);
				cairo_stroke (ctx);
				_g_object_unref0 (tag);
			}
		}
	}
}

void
node_draw_tags (Node* self,
                cairo_t* ctx,
                Theme* theme,
                gboolean exporting)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_tags) {
		_klass_->draw_tags (self, ctx, theme, exporting);
	}
}

static void
node_real_draw_callout (Node* self,
                        cairo_t* ctx,
                        Theme* theme,
                        gboolean exporting)
{
	Callout* _tmp0_;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp0_ = self->priv->_callout;
	if (_tmp0_ != NULL) {
		Callout* _tmp1_;
		_tmp1_ = self->priv->_callout;
		callout_draw (_tmp1_, ctx, theme, exporting);
	}
}

void
node_draw_callout (Node* self,
                   cairo_t* ctx,
                   Theme* theme,
                   gboolean exporting)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw_callout) {
		_klass_->draw_callout (self, ctx, theme, exporting);
	}
}

static void
node_real_draw (Node* self,
                cairo_t* ctx,
                Theme* theme,
                gboolean motion,
                gboolean exporting)
{
	GdkRGBA* nodesel_background = NULL;
	GdkRGBA* _tmp0_;
	GdkRGBA* nodesel_foreground = NULL;
	GdkRGBA* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp0_ = theme_get_color (theme, "nodesel_background");
	nodesel_background = _tmp0_;
	_tmp1_ = theme_get_color (theme, "nodesel_foreground");
	nodesel_foreground = _tmp1_;
	if (node_is_summarized (self)) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = node_is_summary (self);
	}
	if (_tmp2_) {
		GdkRGBA* _tmp3_;
		GdkRGBA _tmp4_;
		NodeBounds* _tmp5_;
		NodeBounds* _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		NodeBounds* _tmp9_;
		NodeBounds* _tmp10_;
		gdouble _tmp11_;
		gdouble _tmp12_;
		NodeBounds* _tmp13_;
		NodeBounds* _tmp14_;
		gdouble _tmp15_;
		gdouble _tmp16_;
		NodeBounds* _tmp17_;
		NodeBounds* _tmp18_;
		gdouble _tmp19_;
		gdouble _tmp20_;
		_tmp3_ = nodesel_background;
		_tmp4_ = *_tmp3_;
		utils_set_context_color_with_alpha (ctx, &_tmp4_, 0.1);
		_tmp5_ = node_get_tree_bbox (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = node_bounds_get_x (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = node_get_tree_bbox (self);
		_tmp10_ = _tmp9_;
		_tmp11_ = node_bounds_get_y (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = node_get_tree_bbox (self);
		_tmp14_ = _tmp13_;
		_tmp15_ = node_bounds_get_width (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = node_get_tree_bbox (self);
		_tmp18_ = _tmp17_;
		_tmp19_ = node_bounds_get_height (_tmp18_);
		_tmp20_ = _tmp19_;
		cairo_rectangle (ctx, _tmp8_, _tmp12_, _tmp16_, _tmp20_);
		cairo_fill (ctx);
	}
	if (node_is_root (self)) {
		GdkRGBA* background = NULL;
		GdkRGBA* _tmp21_;
		GdkRGBA* foreground = NULL;
		GdkRGBA* _tmp22_;
		GdkRGBA* _tmp29_;
		GdkRGBA _tmp30_;
		GdkRGBA* _tmp35_;
		GdkRGBA* _tmp36_;
		GdkRGBA _tmp37_;
		GdkRGBA _tmp38_;
		GdkRGBA* _tmp39_;
		GdkRGBA* _tmp40_;
		GdkRGBA* _tmp41_;
		GdkRGBA _tmp42_;
		GdkRGBA _tmp43_;
		GdkRGBA _tmp44_;
		GdkRGBA* _tmp45_;
		GdkRGBA* _tmp46_;
		GdkRGBA* _tmp47_;
		GdkRGBA _tmp48_;
		GdkRGBA _tmp49_;
		GdkRGBA _tmp50_;
		GdkRGBA* _tmp51_;
		GdkRGBA* _tmp52_;
		GdkRGBA _tmp53_;
		GdkRGBA _tmp54_;
		GdkRGBA* _tmp55_;
		_tmp21_ = theme_get_color (theme, "root_background");
		background = _tmp21_;
		_tmp22_ = theme_get_color (theme, "root_foreground");
		foreground = _tmp22_;
		if (self->priv->_link_color_set) {
			GdkRGBA* _tmp23_;
			GdkRGBA* _tmp24_;
			GdkRGBA* _tmp25_;
			GdkRGBA _tmp26_;
			GdkRGBA _tmp27_ = {0};
			GdkRGBA* _tmp28_;
			_tmp23_ = self->priv->_link_color;
			_tmp24_ = __vala_GdkRGBA_copy0 (_tmp23_);
			__vala_GdkRGBA_free0 (background);
			background = _tmp24_;
			_tmp25_ = background;
			_tmp26_ = *_tmp25_;
			granite_contrasting_foreground_color (&_tmp26_, &_tmp27_);
			_tmp28_ = __vala_GdkRGBA_copy0 (&_tmp27_);
			__vala_GdkRGBA_free0 (foreground);
			foreground = _tmp28_;
		}
		_tmp29_ = background;
		_tmp30_ = *_tmp29_;
		node_draw_shape (self, ctx, theme, &_tmp30_, exporting);
		node_draw_name (self, ctx, theme, exporting);
		node_draw_image (self, ctx, theme);
		if (node_is_leaf (self)) {
			GdkRGBA* _tmp31_;
			GdkRGBA _tmp32_;
			_tmp31_ = foreground;
			_tmp32_ = *_tmp31_;
			node_draw_leaf_task (self, ctx, &_tmp32_, NULL);
		} else {
			GdkRGBA* _tmp33_;
			GdkRGBA _tmp34_;
			_tmp33_ = foreground;
			_tmp34_ = *_tmp33_;
			node_draw_acc_task (self, ctx, &_tmp34_, NULL);
		}
		_tmp35_ = nodesel_background;
		_tmp36_ = background;
		_tmp37_ = *_tmp35_;
		_tmp38_ = *_tmp36_;
		node_draw_sticker (self, ctx, &_tmp37_, &_tmp38_);
		_tmp39_ = foreground;
		_tmp40_ = nodesel_foreground;
		_tmp41_ = foreground;
		_tmp42_ = *_tmp39_;
		_tmp43_ = *_tmp40_;
		_tmp44_ = *_tmp41_;
		node_draw_common_note (self, ctx, &_tmp42_, &_tmp43_, &_tmp44_);
		_tmp45_ = foreground;
		_tmp46_ = nodesel_foreground;
		_tmp47_ = foreground;
		_tmp48_ = *_tmp45_;
		_tmp49_ = *_tmp46_;
		_tmp50_ = *_tmp47_;
		node_draw_link_node (self, ctx, &_tmp48_, &_tmp49_, &_tmp50_);
		_tmp51_ = foreground;
		_tmp52_ = background;
		_tmp53_ = *_tmp51_;
		_tmp54_ = *_tmp52_;
		node_draw_common_fold (self, ctx, &_tmp53_, &_tmp54_);
		_tmp55_ = background;
		node_draw_attachable (self, ctx, theme, _tmp55_);
		node_draw_resizer (self, ctx, theme, exporting);
		node_draw_tags (self, ctx, theme, exporting);
		__vala_GdkRGBA_free0 (foreground);
		__vala_GdkRGBA_free0 (background);
	} else {
		GdkRGBA* background = NULL;
		GdkRGBA* _tmp56_;
		GdkRGBA* foreground = NULL;
		GdkRGBA* _tmp57_;
		GdkRGBA* _tmp58_;
		GdkRGBA _tmp59_;
		GdkRGBA* _tmp66_;
		GdkRGBA* _tmp67_;
		GdkRGBA _tmp68_;
		GdkRGBA _tmp69_;
		GdkRGBA* _tmp70_;
		GdkRGBA* _tmp71_;
		GdkRGBA _tmp72_;
		GdkRGBA _tmp73_;
		GdkRGBA* _tmp74_;
		GdkRGBA* _tmp75_;
		GdkRGBA* _tmp76_;
		GdkRGBA _tmp77_;
		GdkRGBA _tmp78_;
		GdkRGBA _tmp79_;
		GdkRGBA* _tmp80_;
		GdkRGBA* _tmp81_;
		GdkRGBA* _tmp82_;
		GdkRGBA _tmp83_;
		GdkRGBA _tmp84_;
		GdkRGBA _tmp85_;
		GdkRGBA* _tmp86_;
		GdkRGBA* _tmp87_;
		GdkRGBA _tmp88_;
		GdkRGBA _tmp89_;
		GdkRGBA* _tmp90_;
		_tmp56_ = theme_get_color (theme, "background");
		background = _tmp56_;
		_tmp57_ = theme_get_color (theme, "foreground");
		foreground = _tmp57_;
		_tmp58_ = self->priv->_link_color;
		_tmp59_ = *_tmp58_;
		node_draw_shape (self, ctx, theme, &_tmp59_, exporting);
		node_draw_name (self, ctx, theme, exporting);
		node_draw_image (self, ctx, theme);
		if (node_is_leaf (self)) {
			GdkRGBA* _tmp60_;
			GdkRGBA* _tmp61_;
			GdkRGBA _tmp62_;
			_tmp60_ = self->priv->_link_color;
			_tmp61_ = background;
			_tmp62_ = *_tmp60_;
			node_draw_leaf_task (self, ctx, &_tmp62_, _tmp61_);
		} else {
			GdkRGBA* _tmp63_;
			GdkRGBA* _tmp64_;
			GdkRGBA _tmp65_;
			_tmp63_ = self->priv->_link_color;
			_tmp64_ = background;
			_tmp65_ = *_tmp63_;
			node_draw_acc_task (self, ctx, &_tmp65_, _tmp64_);
		}
		_tmp66_ = nodesel_background;
		_tmp67_ = background;
		_tmp68_ = *_tmp66_;
		_tmp69_ = *_tmp67_;
		node_draw_sticker (self, ctx, &_tmp68_, &_tmp69_);
		_tmp70_ = nodesel_foreground;
		_tmp71_ = foreground;
		_tmp72_ = *_tmp70_;
		_tmp73_ = *_tmp71_;
		node_draw_sequence_num (self, ctx, &_tmp72_, &_tmp73_);
		_tmp74_ = foreground;
		_tmp75_ = nodesel_foreground;
		_tmp76_ = background;
		_tmp77_ = *_tmp74_;
		_tmp78_ = *_tmp75_;
		_tmp79_ = *_tmp76_;
		node_draw_common_note (self, ctx, &_tmp77_, &_tmp78_, &_tmp79_);
		_tmp80_ = foreground;
		_tmp81_ = nodesel_foreground;
		_tmp82_ = foreground;
		_tmp83_ = *_tmp80_;
		_tmp84_ = *_tmp81_;
		_tmp85_ = *_tmp82_;
		node_draw_link_node (self, ctx, &_tmp83_, &_tmp84_, &_tmp85_);
		_tmp86_ = self->priv->_link_color;
		_tmp87_ = background;
		_tmp88_ = *_tmp86_;
		_tmp89_ = *_tmp87_;
		node_draw_common_fold (self, ctx, &_tmp88_, &_tmp89_);
		_tmp90_ = background;
		node_draw_attachable (self, ctx, theme, _tmp90_);
		node_draw_resizer (self, ctx, theme, exporting);
		node_draw_tags (self, ctx, theme, exporting);
		__vala_GdkRGBA_free0 (foreground);
		__vala_GdkRGBA_free0 (background);
	}
	node_draw_callout (self, ctx, theme, exporting);
	__vala_GdkRGBA_free0 (nodesel_foreground);
	__vala_GdkRGBA_free0 (nodesel_background);
}

void
node_draw (Node* self,
           cairo_t* ctx,
           Theme* theme,
           gboolean motion,
           gboolean exporting)
{
	NodeClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = NODE_GET_CLASS (self);
	if (_klass_->draw) {
		_klass_->draw (self, ctx, theme, motion, exporting);
	}
}

static void
node_draw_side_links (Node* self,
                      cairo_t* ctx,
                      Theme* theme,
                      gint first,
                      gint last)
{
	NodeSide first_rside = 0;
	GArray* _tmp0_;
	Node* _tmp1_;
	gint mid = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	_tmp0_ = self->_children;
	_tmp1_ = g_array_index (_tmp0_, Node*, (guint) first);
	first_rside = node_relative_side (_tmp1_);
	mid = first + 1;
	while (TRUE) {
		gboolean _tmp2_ = FALSE;
		gint _tmp5_;
		if (mid < last) {
			GArray* _tmp3_;
			Node* _tmp4_;
			_tmp3_ = self->_children;
			_tmp4_ = g_array_index (_tmp3_, Node*, (guint) mid);
			_tmp2_ = node_relative_side (_tmp4_) == first_rside;
		} else {
			_tmp2_ = FALSE;
		}
		if (!_tmp2_) {
			break;
		}
		_tmp5_ = mid;
		mid = _tmp5_ + 1;
	}
	{
		gint i = 0;
		i = first;
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = TRUE;
			while (TRUE) {
				GArray* _tmp8_;
				Node* _tmp9_;
				if (!_tmp6_) {
					gint _tmp7_;
					_tmp7_ = i;
					i = _tmp7_ + 1;
				}
				_tmp6_ = FALSE;
				if (!(i < mid)) {
					break;
				}
				_tmp8_ = self->_children;
				_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
				node_draw_links (_tmp9_, ctx, theme);
			}
		}
	}
	{
		gint i = 0;
		i = last - 1;
		{
			gboolean _tmp10_ = FALSE;
			_tmp10_ = TRUE;
			while (TRUE) {
				GArray* _tmp12_;
				Node* _tmp13_;
				if (!_tmp10_) {
					gint _tmp11_;
					_tmp11_ = i;
					i = _tmp11_ - 1;
				}
				_tmp10_ = FALSE;
				if (!(i >= mid)) {
					break;
				}
				_tmp12_ = self->_children;
				_tmp13_ = g_array_index (_tmp12_, Node*, (guint) i);
				node_draw_links (_tmp13_, ctx, theme);
			}
		}
	}
}

void
node_draw_links (Node* self,
                 cairo_t* ctx,
                 Theme* theme)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	if (!node_is_root (self)) {
		node_draw_link (self, ctx, theme);
	}
	_tmp1_ = self->priv->_folded;
	if (!_tmp1_) {
		_tmp0_ = node_traversable (self);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint int_child_len = 0;
		GArray* _tmp2_;
		_tmp2_ = self->_children;
		int_child_len = (gint) _tmp2_->len;
		if (int_child_len > 0) {
			gint first_side = 0;
			GArray* _tmp3_;
			Node* _tmp4_;
			NodeSide _tmp5_;
			_tmp3_ = self->_children;
			_tmp4_ = g_array_index (_tmp3_, Node*, (guint) 0);
			_tmp5_ = _tmp4_->priv->_side;
			first_side = node_side_count (self, _tmp5_);
			node_draw_side_links (self, ctx, theme, 0, first_side);
			if (first_side < int_child_len) {
				node_draw_side_links (self, ctx, theme, first_side, int_child_len);
			}
		}
	}
}

void
node_draw_all (Node* self,
               cairo_t* ctx,
               Theme* theme,
               Node* current,
               gboolean motion,
               gboolean exporting)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	g_return_if_fail (theme != NULL);
	if (self != current) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		_tmp1_ = self->priv->_folded;
		if (!_tmp1_) {
			_tmp0_ = node_traversable (self);
		} else {
			_tmp0_ = FALSE;
		}
		if (_tmp0_) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp2_ = FALSE;
					_tmp2_ = TRUE;
					while (TRUE) {
						GArray* _tmp4_;
						GArray* _tmp5_;
						Node* _tmp6_;
						if (!_tmp2_) {
							gint _tmp3_;
							_tmp3_ = i;
							i = _tmp3_ + 1;
						}
						_tmp2_ = FALSE;
						_tmp4_ = self->_children;
						if (!(((guint) i) < _tmp4_->len)) {
							break;
						}
						_tmp5_ = self->_children;
						_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
						node_draw_all (_tmp6_, ctx, theme, current, motion, exporting);
					}
				}
			}
		}
		node_draw (self, ctx, theme, motion, exporting);
	}
}

void
node_display (Node* self,
              gboolean recursive,
              const gchar* prefix)
{
	const gchar* _tmp0_ = NULL;
	Layout* _tmp1_;
	Layout* _tmp2_;
	FILE* _tmp7_;
	CanvasText* _tmp8_;
	CanvasText* _tmp9_;
	FormattedText* _tmp10_;
	FormattedText* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gdouble _tmp14_;
	gdouble _tmp15_;
	gdouble _tmp16_;
	gdouble _tmp17_;
	NodeSide _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prefix != NULL);
	_tmp1_ = node_get_layout (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		_tmp0_ = "Unknown";
	} else {
		Layout* _tmp3_;
		Layout* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp3_ = node_get_layout (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = layout_get_name (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	}
	_tmp7_ = stdout;
	_tmp8_ = node_get_name (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = canvas_text_get_text (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = formatted_text_get_text (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = node_get_posx (self);
	_tmp15_ = _tmp14_;
	_tmp16_ = node_get_posy (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = self->priv->_side;
	_tmp19_ = node_side_to_string (_tmp18_);
	_tmp20_ = _tmp19_;
	fprintf (_tmp7_, "%sNode, name: %s, posx: %g, posy: %g, side: %s, layout: %s\n", prefix, _tmp13_, _tmp15_, _tmp17_, _tmp20_, _tmp0_);
	_g_free0 (_tmp20_);
	if (recursive) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp21_ = FALSE;
				_tmp21_ = TRUE;
				while (TRUE) {
					GArray* _tmp23_;
					GArray* _tmp24_;
					Node* _tmp25_;
					gchar* _tmp26_;
					gchar* _tmp27_;
					if (!_tmp21_) {
						gint _tmp22_;
						_tmp22_ = i;
						i = _tmp22_ + 1;
					}
					_tmp21_ = FALSE;
					_tmp23_ = self->_children;
					if (!(((guint) i) < _tmp23_->len)) {
						break;
					}
					_tmp24_ = self->_children;
					_tmp25_ = g_array_index (_tmp24_, Node*, (guint) i);
					_tmp26_ = g_strconcat (prefix, "  ", NULL);
					_tmp27_ = _tmp26_;
					node_display (_tmp25_, recursive, _tmp27_);
					_g_free0 (_tmp27_);
				}
			}
		}
	}
}

MindMap*
node_get_map (Node* self)
{
	MindMap* result;
	MindMap* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_map;
	result = _tmp0_;
	return result;
}

CanvasText*
node_get_name (Node* self)
{
	CanvasText* result;
	CanvasText* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
node_set_name (Node* self,
               CanvasText* value)
{
	CanvasText* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_name);
	self->priv->_name = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_NAME_PROPERTY]);
}

gdouble
node_get_posx (Node* self)
{
	gdouble result;
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_x (_tmp0_);
	_tmp2_ = _tmp1_;
	result = self->priv->_posx + _tmp2_;
	return result;
}

void
node_set_posx (Node* self,
               gdouble value)
{
	gdouble diff = 0.0;
	gdouble _tmp0_;
	gdouble _tmp1_;
	MindMap* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_posx (self);
	_tmp1_ = _tmp0_;
	diff = value - _tmp1_;
	_tmp2_ = self->priv->_map;
	_tmp3_ = mind_map_get_origin_x (_tmp2_);
	_tmp4_ = _tmp3_;
	self->priv->_posx = value - _tmp4_;
	node_update_tree_bbox (self, diff, (gdouble) 0);
	node_position_text (self);
	if (diff != ((gdouble) 0)) {
		g_signal_emit (self, node_signals[NODE_MOVED_SIGNAL], 0, diff, (gdouble) 0);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_POSX_PROPERTY]);
}

gdouble
node_get_posy (Node* self)
{
	gdouble result;
	MindMap* _tmp0_;
	gdouble _tmp1_;
	gdouble _tmp2_;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_origin_y (_tmp0_);
	_tmp2_ = _tmp1_;
	result = self->priv->_posy + _tmp2_;
	return result;
}

void
node_set_posy (Node* self,
               gdouble value)
{
	gdouble diff = 0.0;
	gdouble _tmp0_;
	gdouble _tmp1_;
	MindMap* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_posy (self);
	_tmp1_ = _tmp0_;
	diff = value - _tmp1_;
	_tmp2_ = self->priv->_map;
	_tmp3_ = mind_map_get_origin_y (_tmp2_);
	_tmp4_ = _tmp3_;
	self->priv->_posy = value - _tmp4_;
	node_update_tree_bbox (self, (gdouble) 0, diff);
	node_position_text (self);
	if (diff != ((gdouble) 0)) {
		g_signal_emit (self, node_signals[NODE_MOVED_SIGNAL], 0, (gdouble) 0, diff);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_POSY_PROPERTY]);
}

const gchar*
node_get_note (Node* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_note;
	result = _tmp0_;
	return result;
}

void
node_set_note (Node* self,
               const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_note;
	if (g_strcmp0 (_tmp0_, value) != 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (value);
		_g_free0 (self->priv->_note);
		self->priv->_note = _tmp1_;
		node_update_size (self);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_NOTE_PROPERTY]);
}

NodeMode
node_get_mode (Node* self)
{
	NodeMode result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_mode;
	return result;
}

void
node_set_mode (Node* self,
               NodeMode value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_mode != value) {
		if (self->priv->_mode == NODE_MODE_EDITABLE) {
			MindMap* _tmp0_;
			GSettings* _tmp1_;
			GSettings* _tmp2_;
			_tmp0_ = self->priv->_map;
			_tmp1_ = mind_map_get_settings (_tmp0_);
			_tmp2_ = _tmp1_;
			if (g_settings_get_boolean (_tmp2_, "auto-parse-embedded-urls")) {
			}
		}
		self->priv->_mode = value;
		if (self->priv->_mode == NODE_MODE_EDITABLE) {
			CanvasText* _tmp3_;
			CanvasText* _tmp4_;
			CanvasText* _tmp5_;
			CanvasText* _tmp6_;
			CanvasText* _tmp7_;
			CanvasText* _tmp8_;
			_tmp3_ = node_get_name (self);
			_tmp4_ = _tmp3_;
			canvas_text_set_edit (_tmp4_, TRUE);
			_tmp5_ = node_get_name (self);
			_tmp6_ = _tmp5_;
			canvas_text_set_node_selected (_tmp6_, FALSE);
			_tmp7_ = node_get_name (self);
			_tmp8_ = _tmp7_;
			canvas_text_set_cursor_all (_tmp8_, FALSE);
		} else {
			CanvasText* _tmp9_;
			CanvasText* _tmp10_;
			CanvasText* _tmp11_;
			CanvasText* _tmp12_;
			CanvasText* _tmp13_;
			CanvasText* _tmp14_;
			_tmp9_ = node_get_name (self);
			_tmp10_ = _tmp9_;
			canvas_text_set_edit (_tmp10_, FALSE);
			_tmp11_ = node_get_name (self);
			_tmp12_ = _tmp11_;
			canvas_text_set_node_selected (_tmp12_, node_mode_is_selected (self->priv->_mode));
			_tmp13_ = node_get_name (self);
			_tmp14_ = _tmp13_;
			canvas_text_clear_selection (_tmp14_, NULL);
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_MODE_PROPERTY]);
}

Node*
node_get_parent (Node* self)
{
	Node* result;
	Node* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parent;
	result = _tmp0_;
	return result;
}

void
node_set_parent (Node* self,
                 Node* value)
{
	Node* old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_parent (self);
	if (old_value != value) {
		Node* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_parent);
		self->priv->_parent = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_PARENT_PROPERTY]);
	}
}

NodeSide
node_get_side (Node* self)
{
	NodeSide result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_side;
	return result;
}

void
node_set_side (Node* self,
               NodeSide value)
{
	NodeSide old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_side (self);
	if (old_value != value) {
		self->priv->_side = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_SIDE_PROPERTY]);
	}
}

gboolean
node_get_folded (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_folded;
	return result;
}

void
node_set_folded (Node* self,
                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_folded (self);
	if (old_value != value) {
		self->priv->_folded = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_FOLDED_PROPERTY]);
	}
}

gboolean
node_get_show_fold (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_fold;
	return result;
}

void
node_set_show_fold (Node* self,
                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_show_fold (self);
	if (old_value != value) {
		self->priv->_show_fold = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_SHOW_FOLD_PROPERTY]);
	}
}

gdouble
node_get_tree_size (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_tree_size;
	return result;
}

void
node_set_tree_size (Node* self,
                    gdouble value)
{
	gdouble old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_tree_size (self);
	if (old_value != value) {
		self->priv->_tree_size = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_TREE_SIZE_PROPERTY]);
	}
}

gboolean
node_get_group (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_group;
	return result;
}

void
node_set_group (Node* self,
                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_group (self);
	if (old_value != value) {
		self->priv->_group = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_GROUP_PROPERTY]);
	}
}

GdkRGBA*
node_get_link_color (Node* self)
{
	GdkRGBA* result;
	GdkRGBA* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	g_return_val_if_fail (self != NULL, NULL);
	if (!node_is_root (self)) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = self->priv->_link_color_set;
	}
	if (_tmp1_) {
		GdkRGBA* _tmp2_;
		_tmp2_ = self->priv->_link_color;
		_tmp0_ = _tmp2_;
	} else {
		_tmp0_ = NULL;
	}
	result = _tmp0_;
	return result;
}

void
node_set_link_color (Node* self,
                     GdkRGBA* value)
{
	g_return_if_fail (self != NULL);
	if (node_is_root (self)) {
		if (value == NULL) {
			self->priv->_link_color_set = FALSE;
		} else {
			GdkRGBA* _tmp0_;
			_tmp0_ = __vala_GdkRGBA_copy0 (value);
			__vala_GdkRGBA_free0 (self->priv->_link_color);
			self->priv->_link_color = _tmp0_;
			self->priv->_link_color_set = TRUE;
		}
	} else {
		if (value != NULL) {
			GdkRGBA* _tmp1_;
			_tmp1_ = __vala_GdkRGBA_copy0 (value);
			__vala_GdkRGBA_free0 (self->priv->_link_color);
			self->priv->_link_color = _tmp1_;
			self->priv->_link_color_set = TRUE;
			self->priv->_link_color_root = TRUE;
			if (node_traversable (self)) {
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp2_ = FALSE;
						_tmp2_ = TRUE;
						while (TRUE) {
							GArray* _tmp4_;
							GArray* _tmp5_;
							Node* _tmp6_;
							GdkRGBA _tmp7_;
							if (!_tmp2_) {
								gint _tmp3_;
								_tmp3_ = i;
								i = _tmp3_ + 1;
							}
							_tmp2_ = FALSE;
							_tmp4_ = self->_children;
							if (!(((guint) i) < _tmp4_->len)) {
								break;
							}
							_tmp5_ = self->_children;
							_tmp6_ = g_array_index (_tmp5_, Node*, (guint) i);
							_tmp7_ = *value;
							node_set_link_color_child (_tmp6_, &_tmp7_);
						}
					}
				}
			}
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LINK_COLOR_PROPERTY]);
}

void
node_set_link_color_only (Node* self,
                          GdkRGBA * value)
{
	GdkRGBA _tmp0_;
	GdkRGBA* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = *value;
	_tmp1_ = __vala_GdkRGBA_copy0 (&_tmp0_);
	__vala_GdkRGBA_free0 (self->priv->_link_color);
	self->priv->_link_color = _tmp1_;
	self->priv->_link_color_set = TRUE;
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LINK_COLOR_ONLY_PROPERTY]);
}

void
node_set_link_color_child (Node* self,
                           GdkRGBA * value)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_link_color_root (self);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		GdkRGBA _tmp2_;
		GdkRGBA* _tmp3_;
		_tmp2_ = *value;
		_tmp3_ = __vala_GdkRGBA_copy0 (&_tmp2_);
		__vala_GdkRGBA_free0 (self->priv->_link_color);
		self->priv->_link_color = _tmp3_;
		self->priv->_link_color_set = TRUE;
		if (node_traversable (self)) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp4_ = FALSE;
					_tmp4_ = TRUE;
					while (TRUE) {
						GArray* _tmp6_;
						GArray* _tmp7_;
						Node* _tmp8_;
						GdkRGBA _tmp9_;
						if (!_tmp4_) {
							gint _tmp5_;
							_tmp5_ = i;
							i = _tmp5_ + 1;
						}
						_tmp4_ = FALSE;
						_tmp6_ = self->_children;
						if (!(((guint) i) < _tmp6_->len)) {
							break;
						}
						_tmp7_ = self->_children;
						_tmp8_ = g_array_index (_tmp7_, Node*, (guint) i);
						_tmp9_ = *value;
						node_set_link_color_child (_tmp8_, &_tmp9_);
					}
				}
			}
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LINK_COLOR_CHILD_PROPERTY]);
}

gboolean
node_get_link_color_root (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_link_color_root;
	return result;
}

void
node_set_link_color_root (Node* self,
                          gboolean value)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (self->priv->_link_color_root != value) {
		_tmp0_ = !node_is_root (self);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		self->priv->_link_color_root = value;
		if (!self->priv->_link_color_root) {
			Node* _tmp1_;
			GdkRGBA* _tmp2_;
			GdkRGBA* _tmp3_;
			GdkRGBA _tmp4_;
			_tmp1_ = self->priv->_parent;
			_tmp2_ = node_get_link_color (_tmp1_);
			_tmp3_ = _tmp2_;
			_tmp4_ = *_tmp3_;
			node_set_link_color_child (self, &_tmp4_);
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LINK_COLOR_ROOT_PROPERTY]);
}

gboolean
node_get_link_color_set (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_link_color_set;
	return result;
}

gboolean
node_get_attached (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_attached;
	return result;
}

void
node_set_attached (Node* self,
                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_attached (self);
	if (old_value != value) {
		self->priv->_attached = value;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_ATTACHED_PROPERTY]);
	}
}

Style*
node_get_style (Node* self)
{
	Style* result;
	Style* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_style;
	result = _tmp0_;
	return result;
}

static gint*
_int_dup (gint* self)
{
	gint* dup;
	dup = g_new0 (gint, 1);
	memcpy (dup, self, sizeof (gint));
	return dup;
}

static gpointer
__int_dup0 (gpointer self)
{
	return self ? _int_dup (self) : NULL;
}

void
node_set_style (Node* self,
                Style* value)
{
	gint* branch_margin = NULL;
	Style* _tmp0_;
	Style* _tmp1_;
	gint* _tmp2_;
	gint* _tmp3_;
	gint* _tmp4_;
	Style* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = node_get_style (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = style_get_branch_margin (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = __int_dup0 (_tmp3_);
	branch_margin = _tmp4_;
	_tmp5_ = self->priv->_style;
	if (style_copy (_tmp5_, value)) {
		CanvasText* _tmp6_;
		CanvasText* _tmp7_;
		Style* _tmp8_;
		PangoFontDescription* _tmp9_;
		PangoFontDescription* _tmp10_;
		const gchar* _tmp11_;
		Style* _tmp12_;
		PangoFontDescription* _tmp13_;
		PangoFontDescription* _tmp14_;
		gint _tmp15_;
		CanvasText* _tmp16_;
		CanvasText* _tmp17_;
		Style* _tmp18_;
		PangoAlignment* _tmp19_;
		PangoAlignment* _tmp20_;
		SequenceNum* _tmp21_;
		CanvasText* _tmp31_;
		CanvasText* _tmp32_;
		Style* _tmp33_;
		Style* _tmp34_;
		gint* _tmp35_;
		gint* _tmp36_;
		Callout* _tmp43_;
		_tmp6_ = node_get_name (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->priv->_style;
		_tmp9_ = style_get_node_font (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = pango_font_description_get_family (_tmp10_);
		_tmp12_ = self->priv->_style;
		_tmp13_ = style_get_node_font (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = pango_font_description_get_size (_tmp14_) / PANGO_SCALE;
		canvas_text_set_font (_tmp7_, _tmp11_, &_tmp15_, 1.0);
		_tmp16_ = node_get_name (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = self->priv->_style;
		_tmp19_ = style_get_node_text_align (_tmp18_);
		_tmp20_ = _tmp19_;
		canvas_text_set_text_alignment (_tmp17_, _tmp20_);
		_tmp21_ = self->priv->_sequence_num;
		if (_tmp21_ != NULL) {
			SequenceNum* _tmp22_;
			Style* _tmp23_;
			PangoFontDescription* _tmp24_;
			PangoFontDescription* _tmp25_;
			const gchar* _tmp26_;
			Style* _tmp27_;
			PangoFontDescription* _tmp28_;
			PangoFontDescription* _tmp29_;
			gint _tmp30_;
			_tmp22_ = self->priv->_sequence_num;
			_tmp23_ = self->priv->_style;
			_tmp24_ = style_get_node_font (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = pango_font_description_get_family (_tmp25_);
			_tmp27_ = self->priv->_style;
			_tmp28_ = style_get_node_font (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = pango_font_description_get_size (_tmp29_) / PANGO_SCALE;
			sequence_num_set_font (_tmp22_, _tmp26_, &_tmp30_, 1.0);
		}
		_tmp31_ = node_get_name (self);
		_tmp32_ = _tmp31_;
		_tmp33_ = node_get_style (self);
		_tmp34_ = _tmp33_;
		_tmp35_ = style_get_node_width (_tmp34_);
		_tmp36_ = _tmp35_;
		canvas_text_set_max_width (_tmp32_, *_tmp36_);
		if (node_traversable (self)) {
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp37_ = FALSE;
					_tmp37_ = TRUE;
					while (TRUE) {
						GArray* _tmp39_;
						Layout* _tmp40_;
						GArray* _tmp41_;
						Node* _tmp42_;
						if (!_tmp37_) {
							gint _tmp38_;
							_tmp38_ = i;
							i = _tmp38_ + 1;
						}
						_tmp37_ = FALSE;
						_tmp39_ = self->_children;
						if (!(((guint) i) < _tmp39_->len)) {
							break;
						}
						_tmp40_ = self->priv->_layout;
						_tmp41_ = self->_children;
						_tmp42_ = g_array_index (_tmp41_, Node*, (guint) i);
						layout_apply_margin (_tmp40_, _tmp42_);
					}
				}
			}
		}
		_tmp43_ = self->priv->_callout;
		if (_tmp43_ != NULL) {
			Callout* _tmp44_;
			_tmp44_ = self->priv->_callout;
			callout_position_text (_tmp44_, FALSE);
		}
		node_position_text_and_update_size (self);
	}
	_g_free0 (branch_margin);
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_STYLE_PROPERTY]);
}

Layout*
node_get_layout (Node* self)
{
	Layout* result;
	Layout* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_layout;
	result = _tmp0_;
	return result;
}

void
node_set_layout (Node* self,
                 Layout* value)
{
	Layout* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_layout);
	self->priv->_layout = _tmp0_;
	if (node_traversable (self)) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp1_ = FALSE;
				_tmp1_ = TRUE;
				while (TRUE) {
					GArray* _tmp3_;
					GArray* _tmp4_;
					Node* _tmp5_;
					if (!_tmp1_) {
						gint _tmp2_;
						_tmp2_ = i;
						i = _tmp2_ + 1;
					}
					_tmp1_ = FALSE;
					_tmp3_ = self->_children;
					if (!(((guint) i) < _tmp3_->len)) {
						break;
					}
					_tmp4_ = self->_children;
					_tmp5_ = g_array_index (_tmp4_, Node*, (guint) i);
					node_set_layout (_tmp5_, value);
				}
			}
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LAYOUT_PROPERTY]);
}

Node*
node_get_last_selected_child (Node* self)
{
	Node* result;
	Node* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_last_selected_child;
	result = _tmp0_;
	return result;
}

void
node_set_last_selected_child (Node* self,
                              Node* value)
{
	Node* old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_last_selected_child (self);
	if (old_value != value) {
		Node* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_last_selected_child);
		self->priv->_last_selected_child = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LAST_SELECTED_CHILD_PROPERTY]);
	}
}

Connection*
node_get_last_selected_connection (Node* self)
{
	Connection* result;
	Connection* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_last_selected_connection;
	result = _tmp0_;
	return result;
}

void
node_set_last_selected_connection (Node* self,
                                   Connection* value)
{
	Connection* old_value;
	g_return_if_fail (self != NULL);
	old_value = node_get_last_selected_connection (self);
	if (old_value != value) {
		Connection* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_last_selected_connection);
		self->priv->_last_selected_connection = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LAST_SELECTED_CONNECTION_PROPERTY]);
	}
}

gdouble
node_get_width (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->_width;
	return result;
}

gdouble
node_get_height (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->_height;
	return result;
}

NodeImage*
node_get_image (Node* self)
{
	NodeImage* result;
	NodeImage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_image;
	result = _tmp0_;
	return result;
}

gdouble
node_get_total_width (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->_total_width;
	return result;
}

gdouble
node_get_total_height (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->_total_height;
	return result;
}

gboolean
node_get_image_resizable (Node* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	NodeImage* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_image;
	if (_tmp1_ == NULL) {
		_tmp0_ = FALSE;
	} else {
		NodeImage* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->_image;
		_tmp3_ = node_image_get_resizable (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	}
	result = _tmp0_;
	return result;
}

void
node_set_image_resizable (Node* self,
                          gboolean value)
{
	NodeImage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_image;
	if (_tmp0_ != NULL) {
		NodeImage* _tmp1_;
		_tmp1_ = self->priv->_image;
		node_image_set_resizable (_tmp1_, value);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_IMAGE_RESIZABLE_PROPERTY]);
}

gdouble
node_get_alpha (Node* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->_alpha;
	return result;
}

void
node_set_alpha (Node* self,
                gdouble value)
{
	Callout* _tmp5_;
	g_return_if_fail (self != NULL);
	self->_alpha = value;
	if (node_traversable (self)) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					Node* _tmp4_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->_children;
					if (!(((guint) i) < _tmp2_->len)) {
						break;
					}
					_tmp3_ = self->_children;
					_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
					node_set_alpha (_tmp4_, value);
				}
			}
		}
	}
	_tmp5_ = self->priv->_callout;
	if (_tmp5_ != NULL) {
		Callout* _tmp6_;
		_tmp6_ = self->priv->_callout;
		callout_set_alpha (_tmp6_, self->_alpha);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_ALPHA_PROPERTY]);
}

NodeLink*
node_get_linked_node (Node* self)
{
	NodeLink* result;
	NodeLink* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_linked_node;
	result = _tmp0_;
	return result;
}

static gpointer
_node_link_ref0 (gpointer self)
{
	return self ? node_link_ref (self) : NULL;
}

void
node_set_linked_node (Node* self,
                      NodeLink* value)
{
	NodeLink* _tmp0_;
	NodeLink* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _node_link_ref0 (value);
	_node_link_unref0 (self->priv->_linked_node);
	self->priv->_linked_node = _tmp0_;
	_tmp1_ = self->priv->_linked_node;
	if (_tmp1_ != NULL) {
		NodeLink* _tmp2_;
		MindMap* _tmp3_;
		_tmp2_ = self->priv->_linked_node;
		_tmp3_ = self->priv->_map;
		node_link_normalize (_tmp2_, _tmp3_);
	}
	node_update_size (self);
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_LINKED_NODE_PROPERTY]);
}

NodeBounds*
node_get_tree_bbox (Node* self)
{
	NodeBounds* result;
	NodeBounds* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tree_bbox;
	result = _tmp0_;
	return result;
}

void
node_set_tree_bbox (Node* self,
                    NodeBounds* value)
{
	NodeBounds* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_tree_bbox;
	node_bounds_copy_from (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_TREE_BBOX_PROPERTY]);
}

gint
node_get_task_count (Node* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_task_count;
	return result;
}

gint
node_get_done_count (Node* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_task_done;
	return result;
}

const gchar*
node_get_sticker (Node* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_sticker;
	result = _tmp0_;
	return result;
}

void
node_set_sticker (Node* self,
                  const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_sticker;
	if (g_strcmp0 (_tmp0_, value) != 0) {
		gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = g_strdup (value);
		_g_free0 (self->priv->_sticker);
		self->priv->_sticker = _tmp1_;
		_tmp2_ = self->priv->_sticker;
		if (_tmp2_ != NULL) {
			const gchar* _tmp3_;
			GdkPixbuf* _tmp4_;
			_tmp3_ = self->priv->_sticker;
			_tmp4_ = sticker_set_make_pixbuf (_tmp3_, -1);
			_g_object_unref0 (self->priv->_sticker_buf);
			self->priv->_sticker_buf = _tmp4_;
		} else {
			_g_object_unref0 (self->priv->_sticker_buf);
			self->priv->_sticker_buf = NULL;
		}
		node_position_text_and_update_size (self);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_STICKER_PROPERTY]);
}

Callout*
node_get_callout (Node* self)
{
	Callout* result;
	Callout* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_callout;
	result = _tmp0_;
	return result;
}

static void
_node_position_text_and_update_size_callout_resized (Callout* _sender,
                                                     gpointer self)
{
	node_position_text_and_update_size ((Node*) self);
}

void
node_set_callout (Node* self,
                  Callout* value)
{
	Callout* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_callout;
	if (_tmp0_ != value) {
		Callout* _tmp3_;
		Callout* _tmp4_;
		if (value == NULL) {
			Callout* _tmp1_;
			guint _tmp2_;
			_tmp1_ = self->priv->_callout;
			g_signal_parse_name ("resized", TYPE_CALLOUT, &_tmp2_, NULL, FALSE);
			g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _node_position_text_and_update_size_callout_resized, self);
		}
		_tmp3_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_callout);
		self->priv->_callout = _tmp3_;
		_tmp4_ = self->priv->_callout;
		if (_tmp4_ != NULL) {
			Callout* _tmp5_;
			_tmp5_ = self->priv->_callout;
			g_signal_connect_object (_tmp5_, "resized", (GCallback) _node_position_text_and_update_size_callout_resized, self, 0);
		}
		node_position_text_and_update_size (self);
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_CALLOUT_PROPERTY]);
}

gboolean
node_get_sequence (Node* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_sequence;
	return result;
}

void
node_set_sequence (Node* self,
                   gboolean value)
{
	g_return_if_fail (self != NULL);
	if (self->priv->_sequence != value) {
		self->priv->_sequence = value;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					Node* _tmp4_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = self->_children;
					if (!(((guint) i) < _tmp2_->len)) {
						break;
					}
					_tmp3_ = self->_children;
					_tmp4_ = g_array_index (_tmp3_, Node*, (guint) i);
					node_update_sequence_num (_tmp4_);
				}
			}
		}
	}
	g_object_notify_by_pspec ((GObject *) self, node_properties[NODE_SEQUENCE_PROPERTY]);
}

Tags*
node_get_tags (Node* self)
{
	Tags* result;
	Tags* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tags;
	result = _tmp0_;
	return result;
}

static void
g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gpointer data2);
	register GMarshalFunc_VOID__DOUBLE_DOUBLE callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_double (param_values + 1), g_value_get_double (param_values + 2), data2);
}

static void
node_class_init (NodeClass * klass,
                 gpointer klass_data)
{
	node_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &Node_private_offset);
	((NodeClass *) klass)->clear_summary_extents = (void (*) (Node*)) node_real_clear_summary_extents;
	((NodeClass *) klass)->set_summary_extents = (void (*) (Node*)) node_real_set_summary_extents;
	((NodeClass *) klass)->is_summary = (gboolean (*) (Node*)) node_real_is_summary;
	((NodeClass *) klass)->is_summarized = (gboolean (*) (Node*)) node_real_is_summarized;
	((NodeClass *) klass)->first_summarized = (gboolean (*) (Node*)) node_real_first_summarized;
	((NodeClass *) klass)->last_summarized = (gboolean (*) (Node*)) node_real_last_summarized;
	((NodeClass *) klass)->is_within = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within;
	((NodeClass *) klass)->is_within_node = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_node;
	((NodeClass *) klass)->task_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_task_bbox;
	((NodeClass *) klass)->sticker_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_sticker_bbox;
	((NodeClass *) klass)->sequence_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_sequence_bbox;
	((NodeClass *) klass)->linked_node_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_linked_node_bbox;
	((NodeClass *) klass)->note_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_note_bbox;
	((NodeClass *) klass)->image_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_image_bbox;
	((NodeClass *) klass)->resizer_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_resizer_bbox;
	((NodeClass *) klass)->tag_bbox = (void (*) (Node*, gint, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_tag_bbox;
	((NodeClass *) klass)->tags_bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_tags_bbox;
	((NodeClass *) klass)->is_within_task = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_task;
	((NodeClass *) klass)->is_within_note = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_note;
	((NodeClass *) klass)->is_within_linked_node = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_linked_node;
	((NodeClass *) klass)->is_within_fold = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_fold;
	((NodeClass *) klass)->is_within_fold_area = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_fold_area;
	((NodeClass *) klass)->is_within_image = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_image;
	((NodeClass *) klass)->is_within_resizer = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_resizer;
	((NodeClass *) klass)->is_within_tags = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_tags;
	((NodeClass *) klass)->is_within_title = (gboolean (*) (Node*, gdouble, gdouble)) node_real_is_within_title;
	((NodeClass *) klass)->contains = (Node* (*) (Node*, gdouble, gdouble, gboolean)) node_real_contains;
	((NodeClass *) klass)->contains_callout = (Callout* (*) (Node*, gdouble, gdouble)) node_real_contains_callout;
	((NodeClass *) klass)->contains_node = (gboolean (*) (Node*, Node*)) node_real_contains_node;
	((NodeClass *) klass)->index = (gint (*) (Node*)) node_real_index;
	((NodeClass *) klass)->side_count = (gint (*) (Node*, NodeSide)) node_real_side_count;
	((NodeClass *) klass)->get_node = (Node* (*) (Node*, gint)) node_real_get_node;
	((NodeClass *) klass)->load = (void (*) (Node*, MindMap*, xmlNode*, gboolean, Node*, GArray**)) node_real_load;
	((NodeClass *) klass)->save = (void (*) (Node*, xmlNode*)) node_real_save;
	((NodeClass *) klass)->resize = (void (*) (Node*, gdouble)) node_real_resize;
	((NodeClass *) klass)->bbox = (void (*) (Node*, gdouble*, gdouble*, gdouble*, gdouble*)) node_real_bbox;
	((NodeClass *) klass)->detach = (void (*) (Node*, NodeSide)) node_real_detach;
	((NodeClass *) klass)->delete = (void (*) (Node*)) node_real_delete;
	((NodeClass *) klass)->delete_only = (void (*) (Node*)) node_real_delete_only;
	((NodeClass *) klass)->attach_only = (void (*) (Node*, Node*, gint)) node_real_attach_only;
	((NodeClass *) klass)->attach = (void (*) (Node*, Node*, gint, Theme*, gboolean)) node_real_attach;
	((NodeClass *) klass)->attach_init = (void (*) (Node*, Node*, gint)) node_real_attach_init;
	((NodeClass *) klass)->attach_common = (void (*) (Node*, gint, Theme*)) node_real_attach_common;
	((NodeClass *) klass)->first_child = (Node* (*) (Node*, NodeSide*)) node_real_first_child;
	((NodeClass *) klass)->last_child = (Node* (*) (Node*, NodeSide*)) node_real_last_child;
	((NodeClass *) klass)->next_child = (Node* (*) (Node*, Node*, gboolean)) node_real_next_child;
	((NodeClass *) klass)->prev_child = (Node* (*) (Node*, Node*, gboolean)) node_real_prev_child;
	((NodeClass *) klass)->link_point = (void (*) (Node*, gdouble*, gdouble*, gboolean)) node_real_link_point;
	((NodeClass *) klass)->draw_image = (void (*) (Node*, cairo_t*, Theme*)) node_real_draw_image;
	((NodeClass *) klass)->draw_name = (void (*) (Node*, cairo_t*, Theme*, gboolean)) node_real_draw_name;
	((NodeClass *) klass)->draw_leaf_task = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*)) node_real_draw_leaf_task;
	((NodeClass *) klass)->draw_acc_task = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*)) node_real_draw_acc_task;
	((NodeClass *) klass)->draw_sticker = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*)) node_real_draw_sticker;
	((NodeClass *) klass)->draw_sequence_num = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*)) node_real_draw_sequence_num;
	((NodeClass *) klass)->draw_common_note = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*, GdkRGBA*)) node_real_draw_common_note;
	((NodeClass *) klass)->draw_link_node = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*, GdkRGBA*)) node_real_draw_link_node;
	((NodeClass *) klass)->draw_common_fold = (void (*) (Node*, cairo_t*, GdkRGBA*, GdkRGBA*)) node_real_draw_common_fold;
	((NodeClass *) klass)->draw_attachable = (void (*) (Node*, cairo_t*, Theme*, GdkRGBA*)) node_real_draw_attachable;
	((NodeClass *) klass)->draw_link = (void (*) (Node*, cairo_t*, Theme*)) node_real_draw_link;
	((NodeClass *) klass)->draw_link_arrow = (void (*) (Node*, cairo_t*, Theme*, gdouble, gdouble, gdouble, gdouble)) node_real_draw_link_arrow;
	((NodeClass *) klass)->draw_resizer = (void (*) (Node*, cairo_t*, Theme*, gboolean)) node_real_draw_resizer;
	((NodeClass *) klass)->draw_tags = (void (*) (Node*, cairo_t*, Theme*, gboolean)) node_real_draw_tags;
	((NodeClass *) klass)->draw_callout = (void (*) (Node*, cairo_t*, Theme*, gboolean)) node_real_draw_callout;
	((NodeClass *) klass)->draw = (void (*) (Node*, cairo_t*, Theme*, gboolean, gboolean)) node_real_draw;
	G_OBJECT_CLASS (klass)->get_property = _vala_node_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_node_set_property;
	G_OBJECT_CLASS (klass)->finalize = node_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_MAP_PROPERTY, node_properties[NODE_MAP_PROPERTY] = param_spec_mind_map ("map", "map", "map", TYPE_MIND_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_NAME_PROPERTY, node_properties[NODE_NAME_PROPERTY] = g_param_spec_object ("name", "name", "name", TYPE_CANVAS_TEXT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_POSX_PROPERTY, node_properties[NODE_POSX_PROPERTY] = g_param_spec_double ("posx", "posx", "posx", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_POSY_PROPERTY, node_properties[NODE_POSY_PROPERTY] = g_param_spec_double ("posy", "posy", "posy", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_NOTE_PROPERTY, node_properties[NODE_NOTE_PROPERTY] = g_param_spec_string ("note", "note", "note", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_MODE_PROPERTY, node_properties[NODE_MODE_PROPERTY] = g_param_spec_enum ("mode", "mode", "mode", TYPE_NODE_MODE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_PARENT_PROPERTY, node_properties[NODE_PARENT_PROPERTY] = g_param_spec_object ("parent", "parent", "parent", TYPE_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_SIDE_PROPERTY, node_properties[NODE_SIDE_PROPERTY] = g_param_spec_enum ("side", "side", "side", TYPE_NODE_SIDE, NODE_SIDE_RIGHT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_FOLDED_PROPERTY, node_properties[NODE_FOLDED_PROPERTY] = g_param_spec_boolean ("folded", "folded", "folded", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_SHOW_FOLD_PROPERTY, node_properties[NODE_SHOW_FOLD_PROPERTY] = g_param_spec_boolean ("show-fold", "show-fold", "show-fold", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TREE_SIZE_PROPERTY, node_properties[NODE_TREE_SIZE_PROPERTY] = g_param_spec_double ("tree-size", "tree-size", "tree-size", -G_MAXDOUBLE, G_MAXDOUBLE, (gdouble) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_GROUP_PROPERTY, node_properties[NODE_GROUP_PROPERTY] = g_param_spec_boolean ("group", "group", "group", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINK_COLOR_PROPERTY, node_properties[NODE_LINK_COLOR_PROPERTY] = g_param_spec_boxed ("link-color", "link-color", "link-color", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINK_COLOR_ONLY_PROPERTY, node_properties[NODE_LINK_COLOR_ONLY_PROPERTY] = g_param_spec_boxed ("link-color-only", "link-color-only", "link-color-only", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINK_COLOR_CHILD_PROPERTY, node_properties[NODE_LINK_COLOR_CHILD_PROPERTY] = g_param_spec_boxed ("link-color-child", "link-color-child", "link-color-child", gdk_rgba_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINK_COLOR_ROOT_PROPERTY, node_properties[NODE_LINK_COLOR_ROOT_PROPERTY] = g_param_spec_boolean ("link-color-root", "link-color-root", "link-color-root", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINK_COLOR_SET_PROPERTY, node_properties[NODE_LINK_COLOR_SET_PROPERTY] = g_param_spec_boolean ("link-color-set", "link-color-set", "link-color-set", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_ATTACHED_PROPERTY, node_properties[NODE_ATTACHED_PROPERTY] = g_param_spec_boolean ("attached", "attached", "attached", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_STYLE_PROPERTY, node_properties[NODE_STYLE_PROPERTY] = param_spec_style ("style", "style", "style", TYPE_STYLE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LAYOUT_PROPERTY, node_properties[NODE_LAYOUT_PROPERTY] = g_param_spec_object ("layout", "layout", "layout", TYPE_LAYOUT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LAST_SELECTED_CHILD_PROPERTY, node_properties[NODE_LAST_SELECTED_CHILD_PROPERTY] = g_param_spec_object ("last-selected-child", "last-selected-child", "last-selected-child", TYPE_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LAST_SELECTED_CONNECTION_PROPERTY, node_properties[NODE_LAST_SELECTED_CONNECTION_PROPERTY] = g_param_spec_object ("last-selected-connection", "last-selected-connection", "last-selected-connection", TYPE_CONNECTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_WIDTH_PROPERTY, node_properties[NODE_WIDTH_PROPERTY] = g_param_spec_double ("width", "width", "width", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_HEIGHT_PROPERTY, node_properties[NODE_HEIGHT_PROPERTY] = g_param_spec_double ("height", "height", "height", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_IMAGE_PROPERTY, node_properties[NODE_IMAGE_PROPERTY] = param_spec_node_image ("image", "image", "image", TYPE_NODE_IMAGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TOTAL_WIDTH_PROPERTY, node_properties[NODE_TOTAL_WIDTH_PROPERTY] = g_param_spec_double ("total-width", "total-width", "total-width", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TOTAL_HEIGHT_PROPERTY, node_properties[NODE_TOTAL_HEIGHT_PROPERTY] = g_param_spec_double ("total-height", "total-height", "total-height", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_IMAGE_RESIZABLE_PROPERTY, node_properties[NODE_IMAGE_RESIZABLE_PROPERTY] = g_param_spec_boolean ("image-resizable", "image-resizable", "image-resizable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_ALPHA_PROPERTY, node_properties[NODE_ALPHA_PROPERTY] = g_param_spec_double ("alpha", "alpha", "alpha", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_LINKED_NODE_PROPERTY, node_properties[NODE_LINKED_NODE_PROPERTY] = param_spec_node_link ("linked-node", "linked-node", "linked-node", TYPE_NODE_LINK, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TREE_BBOX_PROPERTY, node_properties[NODE_TREE_BBOX_PROPERTY] = param_spec_node_bounds ("tree-bbox", "tree-bbox", "tree-bbox", TYPE_NODE_BOUNDS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TASK_COUNT_PROPERTY, node_properties[NODE_TASK_COUNT_PROPERTY] = g_param_spec_int ("task-count", "task-count", "task-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_DONE_COUNT_PROPERTY, node_properties[NODE_DONE_COUNT_PROPERTY] = g_param_spec_int ("done-count", "done-count", "done-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_STICKER_PROPERTY, node_properties[NODE_STICKER_PROPERTY] = g_param_spec_string ("sticker", "sticker", "sticker", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_CALLOUT_PROPERTY, node_properties[NODE_CALLOUT_PROPERTY] = g_param_spec_object ("callout", "callout", "callout", TYPE_CALLOUT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_SEQUENCE_PROPERTY, node_properties[NODE_SEQUENCE_PROPERTY] = g_param_spec_boolean ("sequence", "sequence", "sequence", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), NODE_TAGS_PROPERTY, node_properties[NODE_TAGS_PROPERTY] = param_spec_tags ("tags", "tags", "tags", TYPE_TAGS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	node_signals[NODE_MOVED_SIGNAL] = g_signal_new ("moved", TYPE_NODE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
	node_signals[NODE_RESIZED_SIGNAL] = g_signal_new ("resized", TYPE_NODE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE, G_TYPE_NONE, 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
}

static void
node_instance_init (Node * self,
                    gpointer klass)
{
	gchar* _tmp0_;
	GdkRGBA _tmp1_;
	GdkRGBA* _tmp2_;
	Style* _tmp3_;
	self->priv = node_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->_note = _tmp0_;
	self->_width = (gdouble) 0;
	self->_height = (gdouble) 0;
	self->_total_width = (gdouble) 0;
	self->_total_height = (gdouble) 0;
	self->_ipadx = (gdouble) 6;
	self->_ipady = (gdouble) 3;
	self->_task_radius = (gdouble) 7;
	self->_alpha = 1.0;
	self->priv->_mode = NODE_MODE_NONE;
	self->priv->_task_count = 0;
	self->priv->_task_done = 0;
	self->priv->_posx = (gdouble) 0;
	self->priv->_posy = (gdouble) 0;
	_tmp1_ = (GdkRGBA) {(gfloat) 1.0, (gfloat) 1.0, (gfloat) 1.0, (gfloat) 1.0};
	_tmp2_ = __vala_GdkRGBA_copy0 (&_tmp1_);
	self->priv->_link_color = _tmp2_;
	self->priv->_link_color_set = FALSE;
	self->priv->_link_color_root = FALSE;
	self->priv->_min_width = (gdouble) 50;
	self->priv->_image = NULL;
	self->priv->_layout = NULL;
	_tmp3_ = style_new ();
	self->priv->_style = _tmp3_;
	self->priv->_loaded = TRUE;
	self->priv->_linked_node = NULL;
	self->priv->_sticker = NULL;
	self->priv->_sticker_buf = NULL;
	self->priv->_sequence_num = NULL;
	self->priv->_callout = NULL;
	self->priv->_sequence = FALSE;
	self->priv->_parent = NULL;
	self->priv->_side = NODE_SIDE_RIGHT;
	self->priv->_folded = FALSE;
	self->priv->_show_fold = FALSE;
	self->priv->_tree_size = (gdouble) 0;
	self->priv->_group = FALSE;
	self->priv->_attached = FALSE;
	self->priv->_last_selected_child = NULL;
	self->priv->_last_selected_connection = NULL;
}

static void
node_finalize (GObject * obj)
{
	Node * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NODE, Node);
	_mind_map_unref0 (self->priv->_map);
	_g_object_unref0 (self->priv->_name);
	_g_free0 (self->priv->_note);
	_g_array_unref0 (self->_children);
	_node_bounds_unref0 (self->priv->_tree_bbox);
	__vala_GdkRGBA_free0 (self->priv->_link_color);
	_node_image_unref0 (self->priv->_image);
	_g_object_unref0 (self->priv->_layout);
	_style_unref0 (self->priv->_style);
	_node_link_unref0 (self->priv->_linked_node);
	_g_free0 (self->priv->_sticker);
	_g_object_unref0 (self->priv->_sticker_buf);
	_sequence_num_unref0 (self->priv->_sequence_num);
	_g_object_unref0 (self->priv->_callout);
	_tags_unref0 (self->priv->_tags);
	_g_object_unref0 (self->priv->_parent);
	_g_object_unref0 (self->priv->_last_selected_child);
	_g_object_unref0 (self->priv->_last_selected_connection);
	G_OBJECT_CLASS (node_parent_class)->finalize (obj);
}

static GType
node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Node), 0, (GInstanceInitFunc) node_instance_init, NULL };
	GType node_type_id;
	node_type_id = g_type_register_static (G_TYPE_OBJECT, "Node", &g_define_type_info, 0);
	Node_private_offset = g_type_add_instance_private (node_type_id, sizeof (NodePrivate));
	return node_type_id;
}

GType
node_get_type (void)
{
	static volatile gsize node_type_id__once = 0;
	if (g_once_init_enter (&node_type_id__once)) {
		GType node_type_id;
		node_type_id = node_get_type_once ();
		g_once_init_leave (&node_type_id__once, node_type_id);
	}
	return node_type_id__once;
}

static void
_vala_node_get_property (GObject * object,
                         guint property_id,
                         GValue * value,
                         GParamSpec * pspec)
{
	Node * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_NODE, Node);
	switch (property_id) {
		case NODE_MAP_PROPERTY:
		value_set_mind_map (value, node_get_map (self));
		break;
		case NODE_NAME_PROPERTY:
		g_value_set_object (value, node_get_name (self));
		break;
		case NODE_POSX_PROPERTY:
		g_value_set_double (value, node_get_posx (self));
		break;
		case NODE_POSY_PROPERTY:
		g_value_set_double (value, node_get_posy (self));
		break;
		case NODE_NOTE_PROPERTY:
		g_value_set_string (value, node_get_note (self));
		break;
		case NODE_MODE_PROPERTY:
		g_value_set_enum (value, node_get_mode (self));
		break;
		case NODE_PARENT_PROPERTY:
		g_value_set_object (value, node_get_parent (self));
		break;
		case NODE_SIDE_PROPERTY:
		g_value_set_enum (value, node_get_side (self));
		break;
		case NODE_FOLDED_PROPERTY:
		g_value_set_boolean (value, node_get_folded (self));
		break;
		case NODE_SHOW_FOLD_PROPERTY:
		g_value_set_boolean (value, node_get_show_fold (self));
		break;
		case NODE_TREE_SIZE_PROPERTY:
		g_value_set_double (value, node_get_tree_size (self));
		break;
		case NODE_GROUP_PROPERTY:
		g_value_set_boolean (value, node_get_group (self));
		break;
		case NODE_LINK_COLOR_PROPERTY:
		{
			GdkRGBA* boxed;
			boxed = node_get_link_color (self);
			g_value_set_boxed (value, boxed);
		}
		break;
		case NODE_LINK_COLOR_ROOT_PROPERTY:
		g_value_set_boolean (value, node_get_link_color_root (self));
		break;
		case NODE_LINK_COLOR_SET_PROPERTY:
		g_value_set_boolean (value, node_get_link_color_set (self));
		break;
		case NODE_ATTACHED_PROPERTY:
		g_value_set_boolean (value, node_get_attached (self));
		break;
		case NODE_STYLE_PROPERTY:
		value_set_style (value, node_get_style (self));
		break;
		case NODE_LAYOUT_PROPERTY:
		g_value_set_object (value, node_get_layout (self));
		break;
		case NODE_LAST_SELECTED_CHILD_PROPERTY:
		g_value_set_object (value, node_get_last_selected_child (self));
		break;
		case NODE_LAST_SELECTED_CONNECTION_PROPERTY:
		g_value_set_object (value, node_get_last_selected_connection (self));
		break;
		case NODE_WIDTH_PROPERTY:
		g_value_set_double (value, node_get_width (self));
		break;
		case NODE_HEIGHT_PROPERTY:
		g_value_set_double (value, node_get_height (self));
		break;
		case NODE_IMAGE_PROPERTY:
		value_set_node_image (value, node_get_image (self));
		break;
		case NODE_TOTAL_WIDTH_PROPERTY:
		g_value_set_double (value, node_get_total_width (self));
		break;
		case NODE_TOTAL_HEIGHT_PROPERTY:
		g_value_set_double (value, node_get_total_height (self));
		break;
		case NODE_IMAGE_RESIZABLE_PROPERTY:
		g_value_set_boolean (value, node_get_image_resizable (self));
		break;
		case NODE_ALPHA_PROPERTY:
		g_value_set_double (value, node_get_alpha (self));
		break;
		case NODE_LINKED_NODE_PROPERTY:
		value_set_node_link (value, node_get_linked_node (self));
		break;
		case NODE_TREE_BBOX_PROPERTY:
		value_set_node_bounds (value, node_get_tree_bbox (self));
		break;
		case NODE_TASK_COUNT_PROPERTY:
		g_value_set_int (value, node_get_task_count (self));
		break;
		case NODE_DONE_COUNT_PROPERTY:
		g_value_set_int (value, node_get_done_count (self));
		break;
		case NODE_STICKER_PROPERTY:
		g_value_set_string (value, node_get_sticker (self));
		break;
		case NODE_CALLOUT_PROPERTY:
		g_value_set_object (value, node_get_callout (self));
		break;
		case NODE_SEQUENCE_PROPERTY:
		g_value_set_boolean (value, node_get_sequence (self));
		break;
		case NODE_TAGS_PROPERTY:
		value_set_tags (value, node_get_tags (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_node_set_property (GObject * object,
                         guint property_id,
                         const GValue * value,
                         GParamSpec * pspec)
{
	Node * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_NODE, Node);
	switch (property_id) {
		case NODE_NAME_PROPERTY:
		node_set_name (self, g_value_get_object (value));
		break;
		case NODE_POSX_PROPERTY:
		node_set_posx (self, g_value_get_double (value));
		break;
		case NODE_POSY_PROPERTY:
		node_set_posy (self, g_value_get_double (value));
		break;
		case NODE_NOTE_PROPERTY:
		node_set_note (self, g_value_get_string (value));
		break;
		case NODE_MODE_PROPERTY:
		node_set_mode (self, g_value_get_enum (value));
		break;
		case NODE_PARENT_PROPERTY:
		node_set_parent (self, g_value_get_object (value));
		break;
		case NODE_SIDE_PROPERTY:
		node_set_side (self, g_value_get_enum (value));
		break;
		case NODE_FOLDED_PROPERTY:
		node_set_folded (self, g_value_get_boolean (value));
		break;
		case NODE_SHOW_FOLD_PROPERTY:
		node_set_show_fold (self, g_value_get_boolean (value));
		break;
		case NODE_TREE_SIZE_PROPERTY:
		node_set_tree_size (self, g_value_get_double (value));
		break;
		case NODE_GROUP_PROPERTY:
		node_set_group (self, g_value_get_boolean (value));
		break;
		case NODE_LINK_COLOR_PROPERTY:
		node_set_link_color (self, g_value_get_boxed (value));
		break;
		case NODE_LINK_COLOR_ONLY_PROPERTY:
		node_set_link_color_only (self, g_value_get_boxed (value));
		break;
		case NODE_LINK_COLOR_CHILD_PROPERTY:
		node_set_link_color_child (self, g_value_get_boxed (value));
		break;
		case NODE_LINK_COLOR_ROOT_PROPERTY:
		node_set_link_color_root (self, g_value_get_boolean (value));
		break;
		case NODE_ATTACHED_PROPERTY:
		node_set_attached (self, g_value_get_boolean (value));
		break;
		case NODE_STYLE_PROPERTY:
		node_set_style (self, value_get_style (value));
		break;
		case NODE_LAYOUT_PROPERTY:
		node_set_layout (self, g_value_get_object (value));
		break;
		case NODE_LAST_SELECTED_CHILD_PROPERTY:
		node_set_last_selected_child (self, g_value_get_object (value));
		break;
		case NODE_LAST_SELECTED_CONNECTION_PROPERTY:
		node_set_last_selected_connection (self, g_value_get_object (value));
		break;
		case NODE_IMAGE_RESIZABLE_PROPERTY:
		node_set_image_resizable (self, g_value_get_boolean (value));
		break;
		case NODE_ALPHA_PROPERTY:
		node_set_alpha (self, g_value_get_double (value));
		break;
		case NODE_LINKED_NODE_PROPERTY:
		node_set_linked_node (self, value_get_node_link (value));
		break;
		case NODE_TREE_BBOX_PROPERTY:
		node_set_tree_bbox (self, value_get_node_bounds (value));
		break;
		case NODE_STICKER_PROPERTY:
		node_set_sticker (self, g_value_get_string (value));
		break;
		case NODE_CALLOUT_PROPERTY:
		node_set_callout (self, g_value_get_object (value));
		break;
		case NODE_SEQUENCE_PROPERTY:
		node_set_sequence (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

