/* StyleInspector.c generated by valac 0.56.19, the Vala compiler
 * generated from StyleInspector.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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <granite-7.h>
#include <float.h>
#include <math.h>
#include <cairo-gobject.h>
#include <gdk/gdk.h>
#include <pango/pango.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  {
	STYLE_AFFECTS_ALL = 0,
	STYLE_AFFECTS_SELECTED_NODES,
	STYLE_AFFECTS_SELECTED_CONNECTIONS,
	STYLE_AFFECTS_SELECTED_CALLOUTS,
	STYLE_AFFECTS_NUM
} StyleAffects;

#define TYPE_STYLE_AFFECTS (style_affects_get_type ())

#define TYPE_STYLE_INSPECTOR (style_inspector_get_type ())
#define STYLE_INSPECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STYLE_INSPECTOR, StyleInspector))
#define STYLE_INSPECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STYLE_INSPECTOR, StyleInspectorClass))
#define IS_STYLE_INSPECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STYLE_INSPECTOR))
#define IS_STYLE_INSPECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STYLE_INSPECTOR))
#define STYLE_INSPECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STYLE_INSPECTOR, StyleInspectorClass))

typedef struct _StyleInspector StyleInspector;
typedef struct _StyleInspectorClass StyleInspectorClass;
typedef struct _StyleInspectorPrivate StyleInspectorPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;

#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 TYPE_MODE_BUTTONS (mode_buttons_get_type ())
#define MODE_BUTTONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MODE_BUTTONS, ModeButtons))
#define MODE_BUTTONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MODE_BUTTONS, ModeButtonsClass))
#define IS_MODE_BUTTONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MODE_BUTTONS))
#define IS_MODE_BUTTONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MODE_BUTTONS))
#define MODE_BUTTONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MODE_BUTTONS, ModeButtonsClass))

typedef struct _ModeButtons ModeButtons;
typedef struct _ModeButtonsClass ModeButtonsClass;

#define TYPE_IMAGE_MENU (image_menu_get_type ())
#define IMAGE_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMAGE_MENU, ImageMenu))
#define IMAGE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMAGE_MENU, ImageMenuClass))
#define IS_IMAGE_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMAGE_MENU))
#define IS_IMAGE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMAGE_MENU))
#define IMAGE_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMAGE_MENU, ImageMenuClass))

typedef struct _ImageMenu ImageMenu;
typedef struct _ImageMenuClass ImageMenuClass;

#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;
enum  {
	STYLE_INSPECTOR_0_PROPERTY,
	STYLE_INSPECTOR_NUM_PROPERTIES
};
static GParamSpec* style_inspector_properties[STYLE_INSPECTOR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _mind_map_unref0(var) ((var == NULL) ? NULL : (var = (mind_map_unref (var), NULL)))
#define _style_unref0(var) ((var == NULL) ? NULL : (var = (style_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

#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_TEMPLATES (templates_get_type ())
#define TEMPLATES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEMPLATES, Templates))
#define TEMPLATES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEMPLATES, TemplatesClass))
#define IS_TEMPLATES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEMPLATES))
#define IS_TEMPLATES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEMPLATES))
#define TEMPLATES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEMPLATES, TemplatesClass))

typedef struct _Templates Templates;
typedef struct _TemplatesClass TemplatesClass;
typedef enum  {
	TEMPLATE_TYPE_STYLE_GENERAL,
	TEMPLATE_TYPE_STYLE_NODE,
	TEMPLATE_TYPE_STYLE_CONNECTION,
	TEMPLATE_TYPE_STYLE_CALLOUT,
	TEMPLATE_TYPE_STYLE_OPTION_BRANCH,
	TEMPLATE_TYPE_STYLE_OPTION_LINK,
	TEMPLATE_TYPE_STYLE_OPTION_NODE,
	TEMPLATE_TYPE_STYLE_OPTION_CONNECTION,
	TEMPLATE_TYPE_STYLE_OPTION_CALLOUT,
	TEMPLATE_TYPE_NUM
} TemplateType;

#define TYPE_TEMPLATE_TYPE (template_type_get_type ())

#define TYPE_TEMPLATE (template_get_type ())
#define TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEMPLATE, Template))
#define TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEMPLATE, TemplateClass))
#define IS_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEMPLATE))
#define IS_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEMPLATE))
#define TEMPLATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEMPLATE, TemplateClass))

typedef struct _Template Template;
typedef struct _TemplateClass TemplateClass;
typedef void (*TemplateAddLoadFunc) (Template* template, gpointer user_data);
typedef void (*TemplateDeleteFunc) (gpointer user_data);

#define TYPE_STYLE_TEMPLATE (style_template_get_type ())
#define STYLE_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STYLE_TEMPLATE, StyleTemplate))
#define STYLE_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STYLE_TEMPLATE, StyleTemplateClass))
#define IS_STYLE_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STYLE_TEMPLATE))
#define IS_STYLE_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STYLE_TEMPLATE))
#define STYLE_TEMPLATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STYLE_TEMPLATE, StyleTemplateClass))

typedef struct _StyleTemplate StyleTemplate;
typedef struct _StyleTemplateClass StyleTemplateClass;
#define _template_unref0(var) ((var == NULL) ? NULL : (var = (template_unref (var), NULL)))

#define TYPE_TEMPLATE_GROUP (template_group_get_type ())
#define TEMPLATE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEMPLATE_GROUP, TemplateGroup))
#define TEMPLATE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEMPLATE_GROUP, TemplateGroupClass))
#define IS_TEMPLATE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEMPLATE_GROUP))
#define IS_TEMPLATE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEMPLATE_GROUP))
#define TEMPLATE_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEMPLATE_GROUP, TemplateGroupClass))

typedef struct _TemplateGroup TemplateGroup;
typedef struct _TemplateGroupClass TemplateGroupClass;
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))
#define _template_group_unref0(var) ((var == NULL) ? NULL : (var = (template_group_unref (var), NULL)))
typedef struct _Block65Data Block65Data;
typedef struct _Block66Data Block66Data;

#define TYPE_LINK_TYPE (link_type_get_type ())
#define LINK_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINK_TYPE, LinkType))
#define IS_LINK_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINK_TYPE))
#define LINK_TYPE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_LINK_TYPE, LinkTypeIface))

typedef struct _LinkType LinkType;
typedef struct _LinkTypeIface LinkTypeIface;

#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 TYPE_UNDO_BUFFER (undo_buffer_get_type ())
#define UNDO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_BUFFER, UndoBuffer))
#define UNDO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_BUFFER, UndoBufferClass))
#define IS_UNDO_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_BUFFER))
#define IS_UNDO_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_BUFFER))
#define UNDO_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_BUFFER, UndoBufferClass))

typedef struct _UndoBuffer UndoBuffer;
typedef struct _UndoBufferClass UndoBufferClass;

#define TYPE_UNDO_ITEM (undo_item_get_type ())
#define UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_ITEM, UndoItem))
#define UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_ITEM, UndoItemClass))
#define IS_UNDO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_ITEM))
#define IS_UNDO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_ITEM))
#define UNDO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_ITEM, UndoItemClass))

typedef struct _UndoItem UndoItem;
typedef struct _UndoItemClass UndoItemClass;

#define TYPE_UNDO_STYLE_CHANGE (undo_style_change_get_type ())
#define UNDO_STYLE_CHANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CHANGE, UndoStyleChange))
#define UNDO_STYLE_CHANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CHANGE, UndoStyleChangeClass))
#define IS_UNDO_STYLE_CHANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CHANGE))
#define IS_UNDO_STYLE_CHANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CHANGE))
#define UNDO_STYLE_CHANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CHANGE, UndoStyleChangeClass))

typedef struct _UndoStyleChange UndoStyleChange;
typedef struct _UndoStyleChangeClass UndoStyleChangeClass;

#define TYPE_UNDO_STYLE_LINK_TYPE (undo_style_link_type_get_type ())
#define UNDO_STYLE_LINK_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_TYPE, UndoStyleLinkType))
#define UNDO_STYLE_LINK_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_TYPE, UndoStyleLinkTypeClass))
#define IS_UNDO_STYLE_LINK_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_TYPE))
#define IS_UNDO_STYLE_LINK_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_TYPE))
#define UNDO_STYLE_LINK_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_TYPE, UndoStyleLinkTypeClass))

typedef struct _UndoStyleLinkType UndoStyleLinkType;
typedef struct _UndoStyleLinkTypeClass UndoStyleLinkTypeClass;

#define TYPE_UNDO_STYLE_BRANCH_RADIUS (undo_style_branch_radius_get_type ())
#define UNDO_STYLE_BRANCH_RADIUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_BRANCH_RADIUS, UndoStyleBranchRadius))
#define UNDO_STYLE_BRANCH_RADIUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_BRANCH_RADIUS, UndoStyleBranchRadiusClass))
#define IS_UNDO_STYLE_BRANCH_RADIUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_BRANCH_RADIUS))
#define IS_UNDO_STYLE_BRANCH_RADIUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_BRANCH_RADIUS))
#define UNDO_STYLE_BRANCH_RADIUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_BRANCH_RADIUS, UndoStyleBranchRadiusClass))

typedef struct _UndoStyleBranchRadius UndoStyleBranchRadius;
typedef struct _UndoStyleBranchRadiusClass UndoStyleBranchRadiusClass;

#define TYPE_UNDO_STYLE_BRANCH_MARGIN (undo_style_branch_margin_get_type ())
#define UNDO_STYLE_BRANCH_MARGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_BRANCH_MARGIN, UndoStyleBranchMargin))
#define UNDO_STYLE_BRANCH_MARGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_BRANCH_MARGIN, UndoStyleBranchMarginClass))
#define IS_UNDO_STYLE_BRANCH_MARGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_BRANCH_MARGIN))
#define IS_UNDO_STYLE_BRANCH_MARGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_BRANCH_MARGIN))
#define UNDO_STYLE_BRANCH_MARGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_BRANCH_MARGIN, UndoStyleBranchMarginClass))

typedef struct _UndoStyleBranchMargin UndoStyleBranchMargin;
typedef struct _UndoStyleBranchMarginClass UndoStyleBranchMarginClass;
typedef struct _Block67Data Block67Data;

#define TYPE_LINK_DASH (link_dash_get_type ())
#define LINK_DASH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LINK_DASH, LinkDash))
#define LINK_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LINK_DASH, LinkDashClass))
#define IS_LINK_DASH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LINK_DASH))
#define IS_LINK_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LINK_DASH))
#define LINK_DASH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LINK_DASH, LinkDashClass))

typedef struct _LinkDash LinkDash;
typedef struct _LinkDashClass LinkDashClass;
typedef struct _Block68Data Block68Data;

#define TYPE_UNDO_STYLE_LINK_DASH (undo_style_link_dash_get_type ())
#define UNDO_STYLE_LINK_DASH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_DASH, UndoStyleLinkDash))
#define UNDO_STYLE_LINK_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_DASH, UndoStyleLinkDashClass))
#define IS_UNDO_STYLE_LINK_DASH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_DASH))
#define IS_UNDO_STYLE_LINK_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_DASH))
#define UNDO_STYLE_LINK_DASH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_DASH, UndoStyleLinkDashClass))

typedef struct _UndoStyleLinkDash UndoStyleLinkDash;
typedef struct _UndoStyleLinkDashClass UndoStyleLinkDashClass;

#define TYPE_UNDO_STYLE_LINK_WIDTH (undo_style_link_width_get_type ())
#define UNDO_STYLE_LINK_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidth))
#define UNDO_STYLE_LINK_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidthClass))
#define IS_UNDO_STYLE_LINK_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_WIDTH))
#define IS_UNDO_STYLE_LINK_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_WIDTH))
#define UNDO_STYLE_LINK_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_WIDTH, UndoStyleLinkWidthClass))

typedef struct _UndoStyleLinkWidth UndoStyleLinkWidth;
typedef struct _UndoStyleLinkWidthClass UndoStyleLinkWidthClass;

#define TYPE_UNDO_STYLE_LINK_ARROW (undo_style_link_arrow_get_type ())
#define UNDO_STYLE_LINK_ARROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_ARROW, UndoStyleLinkArrow))
#define UNDO_STYLE_LINK_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_ARROW, UndoStyleLinkArrowClass))
#define IS_UNDO_STYLE_LINK_ARROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_ARROW))
#define IS_UNDO_STYLE_LINK_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_ARROW))
#define UNDO_STYLE_LINK_ARROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_ARROW, UndoStyleLinkArrowClass))

typedef struct _UndoStyleLinkArrow UndoStyleLinkArrow;
typedef struct _UndoStyleLinkArrowClass UndoStyleLinkArrowClass;

#define TYPE_UNDO_STYLE_LINK_ARROW_SIZE (undo_style_link_arrow_size_get_type ())
#define UNDO_STYLE_LINK_ARROW_SIZE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_LINK_ARROW_SIZE, UndoStyleLinkArrowSize))
#define UNDO_STYLE_LINK_ARROW_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_LINK_ARROW_SIZE, UndoStyleLinkArrowSizeClass))
#define IS_UNDO_STYLE_LINK_ARROW_SIZE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_LINK_ARROW_SIZE))
#define IS_UNDO_STYLE_LINK_ARROW_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_LINK_ARROW_SIZE))
#define UNDO_STYLE_LINK_ARROW_SIZE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_LINK_ARROW_SIZE, UndoStyleLinkArrowSizeClass))

typedef struct _UndoStyleLinkArrowSize UndoStyleLinkArrowSize;
typedef struct _UndoStyleLinkArrowSizeClass UndoStyleLinkArrowSizeClass;
typedef struct _Block69Data Block69Data;

#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;
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_UNDO_STYLE_NODE_BORDER (undo_style_node_border_get_type ())
#define UNDO_STYLE_NODE_BORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_BORDER, UndoStyleNodeBorder))
#define UNDO_STYLE_NODE_BORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_BORDER, UndoStyleNodeBorderClass))
#define IS_UNDO_STYLE_NODE_BORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_BORDER))
#define IS_UNDO_STYLE_NODE_BORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_BORDER))
#define UNDO_STYLE_NODE_BORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_BORDER, UndoStyleNodeBorderClass))

typedef struct _UndoStyleNodeBorder UndoStyleNodeBorder;
typedef struct _UndoStyleNodeBorderClass UndoStyleNodeBorderClass;

#define TYPE_UNDO_STYLE_NODE_BORDERWIDTH (undo_style_node_borderwidth_get_type ())
#define UNDO_STYLE_NODE_BORDERWIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_BORDERWIDTH, UndoStyleNodeBorderwidth))
#define UNDO_STYLE_NODE_BORDERWIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_BORDERWIDTH, UndoStyleNodeBorderwidthClass))
#define IS_UNDO_STYLE_NODE_BORDERWIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_BORDERWIDTH))
#define IS_UNDO_STYLE_NODE_BORDERWIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_BORDERWIDTH))
#define UNDO_STYLE_NODE_BORDERWIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_BORDERWIDTH, UndoStyleNodeBorderwidthClass))

typedef struct _UndoStyleNodeBorderwidth UndoStyleNodeBorderwidth;
typedef struct _UndoStyleNodeBorderwidthClass UndoStyleNodeBorderwidthClass;

#define TYPE_UNDO_STYLE_NODE_FILL (undo_style_node_fill_get_type ())
#define UNDO_STYLE_NODE_FILL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_FILL, UndoStyleNodeFill))
#define UNDO_STYLE_NODE_FILL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_FILL, UndoStyleNodeFillClass))
#define IS_UNDO_STYLE_NODE_FILL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_FILL))
#define IS_UNDO_STYLE_NODE_FILL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_FILL))
#define UNDO_STYLE_NODE_FILL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_FILL, UndoStyleNodeFillClass))

typedef struct _UndoStyleNodeFill UndoStyleNodeFill;
typedef struct _UndoStyleNodeFillClass UndoStyleNodeFillClass;

#define TYPE_UNDO_STYLE_NODE_MARGIN (undo_style_node_margin_get_type ())
#define UNDO_STYLE_NODE_MARGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_MARGIN, UndoStyleNodeMargin))
#define UNDO_STYLE_NODE_MARGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_MARGIN, UndoStyleNodeMarginClass))
#define IS_UNDO_STYLE_NODE_MARGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_MARGIN))
#define IS_UNDO_STYLE_NODE_MARGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_MARGIN))
#define UNDO_STYLE_NODE_MARGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_MARGIN, UndoStyleNodeMarginClass))

typedef struct _UndoStyleNodeMargin UndoStyleNodeMargin;
typedef struct _UndoStyleNodeMarginClass UndoStyleNodeMarginClass;

#define TYPE_UNDO_STYLE_NODE_PADDING (undo_style_node_padding_get_type ())
#define UNDO_STYLE_NODE_PADDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_PADDING, UndoStyleNodePadding))
#define UNDO_STYLE_NODE_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_PADDING, UndoStyleNodePaddingClass))
#define IS_UNDO_STYLE_NODE_PADDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_PADDING))
#define IS_UNDO_STYLE_NODE_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_PADDING))
#define UNDO_STYLE_NODE_PADDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_PADDING, UndoStyleNodePaddingClass))

typedef struct _UndoStyleNodePadding UndoStyleNodePadding;
typedef struct _UndoStyleNodePaddingClass UndoStyleNodePaddingClass;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

#define TYPE_UNDO_STYLE_NODE_FONT (undo_style_node_font_get_type ())
#define UNDO_STYLE_NODE_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_FONT, UndoStyleNodeFont))
#define UNDO_STYLE_NODE_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_FONT, UndoStyleNodeFontClass))
#define IS_UNDO_STYLE_NODE_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_FONT))
#define IS_UNDO_STYLE_NODE_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_FONT))
#define UNDO_STYLE_NODE_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_FONT, UndoStyleNodeFontClass))

typedef struct _UndoStyleNodeFont UndoStyleNodeFont;
typedef struct _UndoStyleNodeFontClass UndoStyleNodeFontClass;

#define TYPE_UNDO_STYLE_NODE_TEXT_ALIGN (undo_style_node_text_align_get_type ())
#define UNDO_STYLE_NODE_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_TEXT_ALIGN, UndoStyleNodeTextAlign))
#define UNDO_STYLE_NODE_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_TEXT_ALIGN, UndoStyleNodeTextAlignClass))
#define IS_UNDO_STYLE_NODE_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_TEXT_ALIGN))
#define IS_UNDO_STYLE_NODE_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_TEXT_ALIGN))
#define UNDO_STYLE_NODE_TEXT_ALIGN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_TEXT_ALIGN, UndoStyleNodeTextAlignClass))

typedef struct _UndoStyleNodeTextAlign UndoStyleNodeTextAlign;
typedef struct _UndoStyleNodeTextAlignClass UndoStyleNodeTextAlignClass;

#define TYPE_UNDO_STYLE_NODE_WIDTH (undo_style_node_width_get_type ())
#define UNDO_STYLE_NODE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_WIDTH, UndoStyleNodeWidth))
#define UNDO_STYLE_NODE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_WIDTH, UndoStyleNodeWidthClass))
#define IS_UNDO_STYLE_NODE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_WIDTH))
#define IS_UNDO_STYLE_NODE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_WIDTH))
#define UNDO_STYLE_NODE_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_WIDTH, UndoStyleNodeWidthClass))

typedef struct _UndoStyleNodeWidth UndoStyleNodeWidth;
typedef struct _UndoStyleNodeWidthClass UndoStyleNodeWidthClass;

#define TYPE_UNDO_STYLE_NODE_MARKUP (undo_style_node_markup_get_type ())
#define UNDO_STYLE_NODE_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_NODE_MARKUP, UndoStyleNodeMarkup))
#define UNDO_STYLE_NODE_MARKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_NODE_MARKUP, UndoStyleNodeMarkupClass))
#define IS_UNDO_STYLE_NODE_MARKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_NODE_MARKUP))
#define IS_UNDO_STYLE_NODE_MARKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_NODE_MARKUP))
#define UNDO_STYLE_NODE_MARKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_NODE_MARKUP, UndoStyleNodeMarkupClass))

typedef struct _UndoStyleNodeMarkup UndoStyleNodeMarkup;
typedef struct _UndoStyleNodeMarkupClass UndoStyleNodeMarkupClass;
typedef struct _Block70Data Block70Data;

#define TYPE_UNDO_STYLE_CONNECTION_DASH (undo_style_connection_dash_get_type ())
#define UNDO_STYLE_CONNECTION_DASH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_DASH, UndoStyleConnectionDash))
#define UNDO_STYLE_CONNECTION_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_DASH, UndoStyleConnectionDashClass))
#define IS_UNDO_STYLE_CONNECTION_DASH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_DASH))
#define IS_UNDO_STYLE_CONNECTION_DASH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_DASH))
#define UNDO_STYLE_CONNECTION_DASH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_DASH, UndoStyleConnectionDashClass))

typedef struct _UndoStyleConnectionDash UndoStyleConnectionDash;
typedef struct _UndoStyleConnectionDashClass UndoStyleConnectionDashClass;
typedef struct _Block71Data Block71Data;

#define TYPE_UNDO_STYLE_CONNECTION_ARROW (undo_style_connection_arrow_get_type ())
#define UNDO_STYLE_CONNECTION_ARROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW, UndoStyleConnectionArrow))
#define UNDO_STYLE_CONNECTION_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_ARROW, UndoStyleConnectionArrowClass))
#define IS_UNDO_STYLE_CONNECTION_ARROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW))
#define IS_UNDO_STYLE_CONNECTION_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_ARROW))
#define UNDO_STYLE_CONNECTION_ARROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW, UndoStyleConnectionArrowClass))

typedef struct _UndoStyleConnectionArrow UndoStyleConnectionArrow;
typedef struct _UndoStyleConnectionArrowClass UndoStyleConnectionArrowClass;

#define TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE (undo_style_connection_arrow_size_get_type ())
#define UNDO_STYLE_CONNECTION_ARROW_SIZE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE, UndoStyleConnectionArrowSize))
#define UNDO_STYLE_CONNECTION_ARROW_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE, UndoStyleConnectionArrowSizeClass))
#define IS_UNDO_STYLE_CONNECTION_ARROW_SIZE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE))
#define IS_UNDO_STYLE_CONNECTION_ARROW_SIZE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE))
#define UNDO_STYLE_CONNECTION_ARROW_SIZE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_ARROW_SIZE, UndoStyleConnectionArrowSizeClass))

typedef struct _UndoStyleConnectionArrowSize UndoStyleConnectionArrowSize;
typedef struct _UndoStyleConnectionArrowSizeClass UndoStyleConnectionArrowSizeClass;

#define TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH (undo_style_connection_line_width_get_type ())
#define UNDO_STYLE_CONNECTION_LINE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH, UndoStyleConnectionLineWidth))
#define UNDO_STYLE_CONNECTION_LINE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH, UndoStyleConnectionLineWidthClass))
#define IS_UNDO_STYLE_CONNECTION_LINE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH))
#define IS_UNDO_STYLE_CONNECTION_LINE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH))
#define UNDO_STYLE_CONNECTION_LINE_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_LINE_WIDTH, UndoStyleConnectionLineWidthClass))

typedef struct _UndoStyleConnectionLineWidth UndoStyleConnectionLineWidth;
typedef struct _UndoStyleConnectionLineWidthClass UndoStyleConnectionLineWidthClass;

#define TYPE_UNDO_STYLE_CONNECTION_PADDING (undo_style_connection_padding_get_type ())
#define UNDO_STYLE_CONNECTION_PADDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_PADDING, UndoStyleConnectionPadding))
#define UNDO_STYLE_CONNECTION_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_PADDING, UndoStyleConnectionPaddingClass))
#define IS_UNDO_STYLE_CONNECTION_PADDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_PADDING))
#define IS_UNDO_STYLE_CONNECTION_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_PADDING))
#define UNDO_STYLE_CONNECTION_PADDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_PADDING, UndoStyleConnectionPaddingClass))

typedef struct _UndoStyleConnectionPadding UndoStyleConnectionPadding;
typedef struct _UndoStyleConnectionPaddingClass UndoStyleConnectionPaddingClass;

#define TYPE_UNDO_STYLE_CONNECTION_FONT (undo_style_connection_font_get_type ())
#define UNDO_STYLE_CONNECTION_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_FONT, UndoStyleConnectionFont))
#define UNDO_STYLE_CONNECTION_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_FONT, UndoStyleConnectionFontClass))
#define IS_UNDO_STYLE_CONNECTION_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_FONT))
#define IS_UNDO_STYLE_CONNECTION_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_FONT))
#define UNDO_STYLE_CONNECTION_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_FONT, UndoStyleConnectionFontClass))

typedef struct _UndoStyleConnectionFont UndoStyleConnectionFont;
typedef struct _UndoStyleConnectionFontClass UndoStyleConnectionFontClass;

#define TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN (undo_style_connection_text_align_get_type ())
#define UNDO_STYLE_CONNECTION_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN, UndoStyleConnectionTextAlign))
#define UNDO_STYLE_CONNECTION_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN, UndoStyleConnectionTextAlignClass))
#define IS_UNDO_STYLE_CONNECTION_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN))
#define IS_UNDO_STYLE_CONNECTION_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN))
#define UNDO_STYLE_CONNECTION_TEXT_ALIGN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_TEXT_ALIGN, UndoStyleConnectionTextAlignClass))

typedef struct _UndoStyleConnectionTextAlign UndoStyleConnectionTextAlign;
typedef struct _UndoStyleConnectionTextAlignClass UndoStyleConnectionTextAlignClass;

#define TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH (undo_style_connection_title_width_get_type ())
#define UNDO_STYLE_CONNECTION_TITLE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH, UndoStyleConnectionTitleWidth))
#define UNDO_STYLE_CONNECTION_TITLE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH, UndoStyleConnectionTitleWidthClass))
#define IS_UNDO_STYLE_CONNECTION_TITLE_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH))
#define IS_UNDO_STYLE_CONNECTION_TITLE_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH))
#define UNDO_STYLE_CONNECTION_TITLE_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CONNECTION_TITLE_WIDTH, UndoStyleConnectionTitleWidthClass))

typedef struct _UndoStyleConnectionTitleWidth UndoStyleConnectionTitleWidth;
typedef struct _UndoStyleConnectionTitleWidthClass UndoStyleConnectionTitleWidthClass;

#define TYPE_UNDO_STYLE_CALLOUT_FONT (undo_style_callout_font_get_type ())
#define UNDO_STYLE_CALLOUT_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CALLOUT_FONT, UndoStyleCalloutFont))
#define UNDO_STYLE_CALLOUT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CALLOUT_FONT, UndoStyleCalloutFontClass))
#define IS_UNDO_STYLE_CALLOUT_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CALLOUT_FONT))
#define IS_UNDO_STYLE_CALLOUT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CALLOUT_FONT))
#define UNDO_STYLE_CALLOUT_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CALLOUT_FONT, UndoStyleCalloutFontClass))

typedef struct _UndoStyleCalloutFont UndoStyleCalloutFont;
typedef struct _UndoStyleCalloutFontClass UndoStyleCalloutFontClass;

#define TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN (undo_style_callout_text_align_get_type ())
#define UNDO_STYLE_CALLOUT_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN, UndoStyleCalloutTextAlign))
#define UNDO_STYLE_CALLOUT_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN, UndoStyleCalloutTextAlignClass))
#define IS_UNDO_STYLE_CALLOUT_TEXT_ALIGN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN))
#define IS_UNDO_STYLE_CALLOUT_TEXT_ALIGN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN))
#define UNDO_STYLE_CALLOUT_TEXT_ALIGN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CALLOUT_TEXT_ALIGN, UndoStyleCalloutTextAlignClass))

typedef struct _UndoStyleCalloutTextAlign UndoStyleCalloutTextAlign;
typedef struct _UndoStyleCalloutTextAlignClass UndoStyleCalloutTextAlignClass;

#define TYPE_UNDO_STYLE_CALLOUT_PADDING (undo_style_callout_padding_get_type ())
#define UNDO_STYLE_CALLOUT_PADDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CALLOUT_PADDING, UndoStyleCalloutPadding))
#define UNDO_STYLE_CALLOUT_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CALLOUT_PADDING, UndoStyleCalloutPaddingClass))
#define IS_UNDO_STYLE_CALLOUT_PADDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CALLOUT_PADDING))
#define IS_UNDO_STYLE_CALLOUT_PADDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CALLOUT_PADDING))
#define UNDO_STYLE_CALLOUT_PADDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CALLOUT_PADDING, UndoStyleCalloutPaddingClass))

typedef struct _UndoStyleCalloutPadding UndoStyleCalloutPadding;
typedef struct _UndoStyleCalloutPaddingClass UndoStyleCalloutPaddingClass;

#define TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH (undo_style_callout_pointer_width_get_type ())
#define UNDO_STYLE_CALLOUT_POINTER_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH, UndoStyleCalloutPointerWidth))
#define UNDO_STYLE_CALLOUT_POINTER_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH, UndoStyleCalloutPointerWidthClass))
#define IS_UNDO_STYLE_CALLOUT_POINTER_WIDTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH))
#define IS_UNDO_STYLE_CALLOUT_POINTER_WIDTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH))
#define UNDO_STYLE_CALLOUT_POINTER_WIDTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_WIDTH, UndoStyleCalloutPointerWidthClass))

typedef struct _UndoStyleCalloutPointerWidth UndoStyleCalloutPointerWidth;
typedef struct _UndoStyleCalloutPointerWidthClass UndoStyleCalloutPointerWidthClass;

#define TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH (undo_style_callout_pointer_length_get_type ())
#define UNDO_STYLE_CALLOUT_POINTER_LENGTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH, UndoStyleCalloutPointerLength))
#define UNDO_STYLE_CALLOUT_POINTER_LENGTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH, UndoStyleCalloutPointerLengthClass))
#define IS_UNDO_STYLE_CALLOUT_POINTER_LENGTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH))
#define IS_UNDO_STYLE_CALLOUT_POINTER_LENGTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH))
#define UNDO_STYLE_CALLOUT_POINTER_LENGTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNDO_STYLE_CALLOUT_POINTER_LENGTH, UndoStyleCalloutPointerLengthClass))

typedef struct _UndoStyleCalloutPointerLength UndoStyleCalloutPointerLength;
typedef struct _UndoStyleCalloutPointerLengthClass UndoStyleCalloutPointerLengthClass;

#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;

#define TYPE_CONNECTIONS (connections_get_type ())
#define CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONNECTIONS, Connections))
#define CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONNECTIONS, ConnectionsClass))
#define IS_CONNECTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONNECTIONS))
#define IS_CONNECTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONNECTIONS))
#define CONNECTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONNECTIONS, ConnectionsClass))

typedef struct _Connections Connections;
typedef struct _ConnectionsClass ConnectionsClass;

#define TYPE_SELECTION (selection_get_type ())
#define SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SELECTION, Selection))
#define SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SELECTION, SelectionClass))
#define IS_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SELECTION))
#define IS_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SELECTION))
#define SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SELECTION, SelectionClass))

typedef struct _Selection Selection;
typedef struct _SelectionClass SelectionClass;

#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 _selection_unref0(var) ((var == NULL) ? NULL : (var = (selection_unref (var), NULL)))
typedef struct _LinkDashPrivate LinkDashPrivate;
enum  {
	STYLE_INSPECTOR_UPDATE_ICONS_SIGNAL,
	STYLE_INSPECTOR_EDITABLE_CHANGED_SIGNAL,
	STYLE_INSPECTOR_NUM_SIGNALS
};
static guint style_inspector_signals[STYLE_INSPECTOR_NUM_SIGNALS] = {0};

struct _StyleInspector {
	GtkBox parent_instance;
	StyleInspectorPrivate * priv;
};

struct _StyleInspectorClass {
	GtkBoxClass parent_class;
};

struct _StyleInspectorPrivate {
	MainWindow* _win;
	MindMap* _map;
	GSettings* _settings;
	GtkScale* _branch_radius;
	GtkBox* _branch_radius_box;
	GtkScale* _branch_margin;
	ModeButtons* _link_types;
	GtkScale* _link_width;
	GtkSwitch* _link_arrow;
	GtkScale* _link_arrow_size;
	ImageMenu* _link_dash;
	ModeButtons* _node_borders;
	GtkScale* _node_borderwidth;
	GtkSwitch* _node_fill;
	GtkScale* _node_margin;
	GtkScale* _node_padding;
	GtkFontDialogButton* _node_font;
	ModeButtons* _node_text_align;
	GtkSpinButton* _node_width;
	GtkSwitch* _node_markup;
	ImageMenu* _conn_dash;
	ImageMenu* _conn_arrow;
	GtkScale* _conn_arrow_size;
	GtkScale* _conn_lwidth;
	GtkScale* _conn_padding;
	GtkFontDialogButton* _conn_font;
	ModeButtons* _conn_text_align;
	GtkSpinButton* _conn_twidth;
	GtkFontDialogButton* _callout_font;
	ModeButtons* _callout_text_align;
	GtkScale* _callout_padding;
	GtkScale* _callout_ptr_width;
	GtkScale* _callout_ptr_length;
	StyleAffects _affects;
	GtkLabel* _affects_label;
	GtkBox* _branch_group;
	GtkBox* _link_group;
	GtkBox* _node_group;
	GtkBox* _conn_group;
	GtkBox* _callout_group;
	GtkExpander* _conn_exp;
	GtkExpander* _callout_exp;
	gboolean _change_add;
	gboolean _ignore;
	Style* _curr_style;
	GtkButton* _paste_btn;
	GtkMenuButton* _template_btn;
	Style* _clipboard_style;
	StyleAffects* _clipboard_affect;
};

struct _Block65Data {
	int _ref_count_;
	StyleInspector* self;
	GraniteMessageDialog* dialog;
};

struct _Block66Data {
	int _ref_count_;
	StyleInspector* self;
	GtkExpander* exp;
};

struct _LinkTypeIface {
	GTypeInterface parent_iface;
	gchar* (*name) (LinkType* self);
	gchar* (*display_name) (LinkType* self);
	gchar* (*light_icon_name) (LinkType* self);
	gchar* (*dark_icon_name) (LinkType* self);
	void (*draw) (LinkType* self, cairo_t* ctx, Node* from_node, Node* to_node, gdouble from_x, gdouble from_y, gdouble to_x, gdouble to_y, gdouble* fx, gdouble* fy, gdouble* tx, gdouble* ty);
};

struct _Block67Data {
	int _ref_count_;
	StyleInspector* self;
	GtkExpander* exp;
};

struct _Block68Data {
	int _ref_count_;
	StyleInspector* self;
	GArray* dashes;
};

struct _Block69Data {
	int _ref_count_;
	StyleInspector* self;
	GtkExpander* exp;
};

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);
};

struct _Block70Data {
	int _ref_count_;
	StyleInspector* self;
	GArray* dashes;
};

struct _Block71Data {
	int _ref_count_;
	StyleInspector* self;
	gchar* arrows[4];
};

struct _LinkDash {
	GObject parent_instance;
	LinkDashPrivate * priv;
	gchar* name;
	gchar* display_name;
	gdouble* pattern;
	gint pattern_length1;
};

struct _LinkDashClass {
	GObjectClass parent_class;
};

static gint StyleInspector_private_offset;
static gpointer style_inspector_parent_class = NULL;
VALA_EXTERN Styles* style_inspector_styles;
Styles* style_inspector_styles = NULL;
VALA_EXTERN Style* style_inspector_last_global_style;
Style* style_inspector_last_global_style = NULL;
VALA_EXTERN GSettings* minder_settings;

VALA_EXTERN GType style_affects_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* style_affects_label (StyleAffects self);
VALA_EXTERN GType style_inspector_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (StyleInspector, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_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 GType mode_buttons_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModeButtons, g_object_unref)
VALA_EXTERN GType image_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ImageMenu, 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 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 Styles* styles_new (void);
VALA_EXTERN Styles* styles_construct (GType object_type);
VALA_EXTERN StyleInspector* style_inspector_new (MainWindow* win,
                                     GSettings* settings);
VALA_EXTERN StyleInspector* style_inspector_construct (GType object_type,
                                           MainWindow* win,
                                           GSettings* settings);
static GtkBox* style_inspector_create_affect_ui (StyleInspector* self);
static GtkBox* style_inspector_create_branch_ui (StyleInspector* self);
static GtkBox* style_inspector_create_link_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_ui (StyleInspector* self);
static GtkBox* style_inspector_create_callout_ui (StyleInspector* self);
static void style_inspector_tab_changed (StyleInspector* self,
                                  MindMap* map);
static void _style_inspector_tab_changed_main_window_canvas_changed (MainWindow* _sender,
                                                              MindMap* map,
                                                              gpointer self);
static void style_inspector_handle_current_changed (StyleInspector* self);
static void _style_inspector_handle_current_changed_style_inspector_editable_changed (StyleInspector* _sender,
                                                                               gpointer self);
VALA_EXTERN gpointer templates_ref (gpointer instance);
VALA_EXTERN void templates_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_templates (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_templates (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_templates (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_templates (const GValue* value);
VALA_EXTERN GType templates_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Templates, templates_unref)
VALA_EXTERN Templates* main_window_get_templates (MainWindow* self);
VALA_EXTERN GType template_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gpointer template_ref (gpointer instance);
VALA_EXTERN void template_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_template (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
VALA_EXTERN void value_set_template (GValue* value,
                         gpointer v_object);
VALA_EXTERN void value_take_template (GValue* value,
                          gpointer v_object);
VALA_EXTERN gpointer value_get_template (const GValue* value);
VALA_EXTERN GType template_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Template, template_unref)
VALA_EXTERN void templates_add_menus (Templates* self,
                          TemplateType ttype,
                          GtkWidget* w,
                          MainWindow* win,
                          TemplateAddLoadFunc add_func,
                          gpointer add_func_target,
                          TemplateAddLoadFunc load_func,
                          gpointer load_func_target,
                          TemplateDeleteFunc del_func,
                          gpointer del_func_target);
static void style_inspector_add_style_template (StyleInspector* self,
                                         Template* template);
static void _style_inspector_add_style_template_template_add_load_func (Template* template,
                                                                 gpointer self);
static void style_inspector_load_style_template (StyleInspector* self,
                                          Template* template);
static void _style_inspector_load_style_template_template_add_load_func (Template* template,
                                                                  gpointer self);
static void style_inspector_delete_style_template (StyleInspector* self);
static void _style_inspector_delete_style_template_template_delete_func (gpointer self);
static void _style_inspector_handle_current_changed_mind_map_current_changed (MindMap* _sender,
                                                                       MindMap* map,
                                                                       gpointer self);
static void style_inspector_handle_ui_changed (StyleInspector* self);
VALA_EXTERN GType style_template_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (StyleTemplate, template_unref)
VALA_EXTERN void style_template_update_from_style (StyleTemplate* self,
                                       Style* s);
VALA_EXTERN TemplateType template_get_ttype (Template* self);
VALA_EXTERN const gchar* template_get_name (Template* self);
VALA_EXTERN StyleTemplate* style_template_new (TemplateType ttype,
                                   const gchar* name);
VALA_EXTERN StyleTemplate* style_template_construct (GType object_type,
                                         TemplateType ttype,
                                         const gchar* name);
VALA_EXTERN Style* style_template_get_style (StyleTemplate* self);
VALA_EXTERN void templates_add_template (Templates* self,
                             Template* template);
static void style_inspector_update_from_style (StyleInspector* self,
                                        Style* style);
VALA_EXTERN gpointer template_group_ref (gpointer instance);
VALA_EXTERN void template_group_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_template_group (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
VALA_EXTERN void value_set_template_group (GValue* value,
                               gpointer v_object);
VALA_EXTERN void value_take_template_group (GValue* value,
                                gpointer v_object);
VALA_EXTERN gpointer value_get_template_group (const GValue* value);
VALA_EXTERN GType template_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TemplateGroup, template_group_unref)
VALA_EXTERN TemplateGroup* templates_get_template_group (Templates* self,
                                             TemplateType ttype);
VALA_EXTERN GArray* template_group_get_names (TemplateGroup* self);
static void style_inspector_show_global_style_dialog (StyleInspector* self,
                                               const gchar* name);
static Block65Data* block65_data_ref (Block65Data* _data65_);
static void block65_data_unref (void * _userdata_);
static void __lambda228_ (Block65Data* _data65_,
                   gint id);
static void ___lambda228__gtk_dialog_response (GtkDialog* _sender,
                                        gint response_id,
                                        gpointer self);
static void __lambda204_ (StyleInspector* self);
VALA_EXTERN Style* style_new (void);
VALA_EXTERN Style* style_construct (GType object_type);
VALA_EXTERN gboolean style_copy (Style* self,
                     Style* s);
static StyleAffects* _style_affects_dup (StyleAffects* self);
static void ___lambda204__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda205_ (StyleInspector* self);
static void ___lambda205__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static Block66Data* block66_data_ref (Block66Data* _data66_);
static void block66_data_unref (void * _userdata_);
static GtkBox* style_inspector_create_branch_type_ui (StyleInspector* self);
static GtkBox* style_inspector_create_branch_radius_ui (StyleInspector* self);
static GtkBox* style_inspector_create_branch_margin_ui (StyleInspector* self);
static void __lambda208_ (Block66Data* _data66_);
static void ___lambda208__gtk_expander_activate (GtkExpander* _sender,
                                          gpointer self);
VALA_EXTERN ModeButtons* mode_buttons_new (void);
VALA_EXTERN ModeButtons* mode_buttons_construct (GType object_type);
static void style_inspector_action_set_link_type (StyleInspector* self,
                                           gint index);
static void _style_inspector_action_set_link_type_mode_buttons_changed (ModeButtons* _sender,
                                                                 gint index,
                                                                 gpointer self);
static void __lambda206_ (StyleInspector* self);
static void ___lambda206__style_inspector_update_icons (StyleInspector* _sender,
                                                 gpointer self);
VALA_EXTERN GType node_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Node, g_object_unref)
VALA_EXTERN GType link_type_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LinkType, g_object_unref)
VALA_EXTERN GArray* styles_get_link_types (Styles* self);
VALA_EXTERN void mode_buttons_add_button (ModeButtons* self,
                              const gchar* light_icon_name,
                              const gchar* dark_icon_name,
                              const gchar* tooltip);
VALA_EXTERN gchar* link_type_light_icon_name (LinkType* self);
VALA_EXTERN gchar* link_type_dark_icon_name (LinkType* self);
VALA_EXTERN gchar* link_type_display_name (LinkType* self);
VALA_EXTERN gint mode_buttons_get_selected (ModeButtons* self);
VALA_EXTERN void style_set_link_type (Style* self,
                          LinkType* value);
VALA_EXTERN GType undo_buffer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoBuffer, g_object_unref)
VALA_EXTERN UndoBuffer* mind_map_get_undo_buffer (MindMap* self);
VALA_EXTERN GType undo_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoItem, g_object_unref)
VALA_EXTERN void undo_buffer_add_item (UndoBuffer* self,
                           UndoItem* item);
VALA_EXTERN UndoStyleLinkType* undo_style_link_type_new (StyleAffects affects,
                                             LinkType* link_type,
                                             MindMap* map);
VALA_EXTERN UndoStyleLinkType* undo_style_link_type_construct (GType object_type,
                                                   StyleAffects affects,
                                                   LinkType* link_type,
                                                   MindMap* map);
VALA_EXTERN GType undo_style_change_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleChange, g_object_unref)
VALA_EXTERN GType undo_style_link_type_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkType, g_object_unref)
static void style_inspector_ignore_scroll (StyleInspector* self,
                                    GtkWidget* w);
static gboolean __lambda207_ (StyleInspector* self,
                       gdouble dx,
                       gdouble dy);
static gboolean ___lambda207__gtk_event_controller_scroll_scroll (GtkEventControllerScroll* _sender,
                                                           gdouble dx,
                                                           gdouble dy,
                                                           gpointer self);
static gboolean style_inspector_branch_radius_changed (StyleInspector* self,
                                                GtkScrollType scroll,
                                                gdouble value);
static gboolean _style_inspector_branch_radius_changed_gtk_range_change_value (GtkRange* _sender,
                                                                        GtkScrollType scroll,
                                                                        gdouble new_value,
                                                                        gpointer self);
VALA_EXTERN GType undo_style_branch_radius_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleBranchRadius, g_object_unref)
VALA_EXTERN UndoStyleBranchRadius* undo_style_branch_radius_new (StyleAffects affects,
                                                     gint branch_radius,
                                                     MindMap* map);
VALA_EXTERN UndoStyleBranchRadius* undo_style_branch_radius_construct (GType object_type,
                                                           StyleAffects affects,
                                                           gint branch_radius,
                                                           MindMap* map);
VALA_EXTERN void style_set_branch_radius (Style* self,
                              gint* value);
VALA_EXTERN void undo_buffer_replace_item (UndoBuffer* self,
                               UndoItem* item);
static gboolean style_inspector_branch_margin_changed (StyleInspector* self,
                                                GtkScrollType scroll,
                                                gdouble value);
static gboolean _style_inspector_branch_margin_changed_gtk_range_change_value (GtkRange* _sender,
                                                                        GtkScrollType scroll,
                                                                        gdouble new_value,
                                                                        gpointer self);
VALA_EXTERN GType undo_style_branch_margin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleBranchMargin, g_object_unref)
VALA_EXTERN UndoStyleBranchMargin* undo_style_branch_margin_new (StyleAffects affects,
                                                     gint branch_margin,
                                                     MindMap* map);
VALA_EXTERN UndoStyleBranchMargin* undo_style_branch_margin_construct (GType object_type,
                                                           StyleAffects affects,
                                                           gint branch_margin,
                                                           MindMap* map);
VALA_EXTERN void style_set_branch_margin (Style* self,
                              gint* value);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
static GtkBox* style_inspector_create_link_dash_ui (StyleInspector* self);
static GtkBox* style_inspector_create_link_width_ui (StyleInspector* self);
static GtkBox* style_inspector_create_link_arrow_ui (StyleInspector* self);
static GtkBox* style_inspector_create_link_arrow_size_ui (StyleInspector* self);
static void __lambda211_ (Block67Data* _data67_);
static void ___lambda211__gtk_expander_activate (GtkExpander* _sender,
                                          gpointer self);
VALA_EXTERN GType link_dash_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LinkDash, g_object_unref)
static Block68Data* block68_data_ref (Block68Data* _data68_);
static void block68_data_unref (void * _userdata_);
VALA_EXTERN GArray* styles_get_link_dashes (Styles* self);
VALA_EXTERN ImageMenu* image_menu_new (void);
VALA_EXTERN ImageMenu* image_menu_construct (GType object_type);
static void __lambda209_ (Block68Data* _data68_,
                   gint index);
VALA_EXTERN void style_set_link_dash (Style* self,
                          LinkDash* value);
VALA_EXTERN UndoStyleLinkDash* undo_style_link_dash_new (StyleAffects affects,
                                             LinkDash* link_dash,
                                             MindMap* map);
VALA_EXTERN UndoStyleLinkDash* undo_style_link_dash_construct (GType object_type,
                                                   StyleAffects affects,
                                                   LinkDash* link_dash,
                                                   MindMap* map);
VALA_EXTERN GType undo_style_link_dash_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkDash, g_object_unref)
static void ___lambda209__image_menu_changed (ImageMenu* _sender,
                                       gint index,
                                       gpointer self);
static void __lambda210_ (StyleInspector* self);
static void ___lambda210__style_inspector_update_icons (StyleInspector* _sender,
                                                 gpointer self);
VALA_EXTERN void image_menu_add_image (ImageMenu* self,
                           GdkPaintable* light_image,
                           GdkPaintable* dark_image);
VALA_EXTERN GdkPaintable* link_dash_make_icon (LinkDash* self,
                                   gboolean dark);
static gboolean style_inspector_link_width_changed (StyleInspector* self,
                                             GtkScrollType scroll,
                                             gdouble value);
static gboolean _style_inspector_link_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                                     GtkScrollType scroll,
                                                                     gdouble new_value,
                                                                     gpointer self);
VALA_EXTERN GType undo_style_link_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkWidth, g_object_unref)
VALA_EXTERN UndoStyleLinkWidth* undo_style_link_width_new (StyleAffects affects,
                                               gint link_width,
                                               MindMap* map);
VALA_EXTERN UndoStyleLinkWidth* undo_style_link_width_construct (GType object_type,
                                                     StyleAffects affects,
                                                     gint link_width,
                                                     MindMap* map);
VALA_EXTERN void style_set_link_width (Style* self,
                           gint* value);
static void style_inspector_link_arrow_changed (StyleInspector* self);
static void _style_inspector_link_arrow_changed_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
VALA_EXTERN void style_set_link_arrow (Style* self,
                           gboolean* value);
VALA_EXTERN UndoStyleLinkArrow* undo_style_link_arrow_new (StyleAffects affects,
                                               gboolean link_arrow,
                                               MindMap* map);
VALA_EXTERN UndoStyleLinkArrow* undo_style_link_arrow_construct (GType object_type,
                                                     StyleAffects affects,
                                                     gboolean link_arrow,
                                                     MindMap* map);
VALA_EXTERN GType undo_style_link_arrow_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkArrow, g_object_unref)
static gboolean style_inspector_link_arrow_size_changed (StyleInspector* self,
                                                  GtkScrollType scroll,
                                                  gdouble value);
static gboolean _style_inspector_link_arrow_size_changed_gtk_range_change_value (GtkRange* _sender,
                                                                          GtkScrollType scroll,
                                                                          gdouble new_value,
                                                                          gpointer self);
VALA_EXTERN GType undo_style_link_arrow_size_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleLinkArrowSize, g_object_unref)
VALA_EXTERN UndoStyleLinkArrowSize* undo_style_link_arrow_size_new (StyleAffects affects,
                                                        gint link_arrow_size,
                                                        MindMap* map);
VALA_EXTERN UndoStyleLinkArrowSize* undo_style_link_arrow_size_construct (GType object_type,
                                                              StyleAffects affects,
                                                              gint link_arrow_size,
                                                              MindMap* map);
VALA_EXTERN void style_set_link_arrow_size (Style* self,
                                gint* value);
static Block69Data* block69_data_ref (Block69Data* _data69_);
static void block69_data_unref (void * _userdata_);
static GtkBox* style_inspector_create_node_border_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_borderwidth_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_fill_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_margin_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_padding_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_font_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_text_align_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_width_ui (StyleInspector* self);
static GtkBox* style_inspector_create_node_markup_ui (StyleInspector* self);
static void __lambda216_ (Block69Data* _data69_);
static void ___lambda216__gtk_expander_activate (GtkExpander* _sender,
                                          gpointer self);
static void style_inspector_set_node_border (StyleInspector* self,
                                      gint index);
static void _style_inspector_set_node_border_mode_buttons_changed (ModeButtons* _sender,
                                                            gint index,
                                                            gpointer self);
static void __lambda212_ (StyleInspector* self);
static void ___lambda212__style_inspector_update_icons (StyleInspector* _sender,
                                                 gpointer self);
VALA_EXTERN GType node_side_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType node_border_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (NodeBorder, g_object_unref)
VALA_EXTERN GArray* styles_get_node_borders (Styles* self);
VALA_EXTERN gchar* node_border_light_icon_name (NodeBorder* self);
VALA_EXTERN gchar* node_border_dark_icon_name (NodeBorder* self);
VALA_EXTERN gchar* node_border_display_name (NodeBorder* self);
VALA_EXTERN void style_set_node_border (Style* self,
                            NodeBorder* value);
VALA_EXTERN UndoStyleNodeBorder* undo_style_node_border_new (StyleAffects affects,
                                                 NodeBorder* node_border,
                                                 MindMap* map);
VALA_EXTERN UndoStyleNodeBorder* undo_style_node_border_construct (GType object_type,
                                                       StyleAffects affects,
                                                       NodeBorder* node_border,
                                                       MindMap* map);
VALA_EXTERN GType undo_style_node_border_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeBorder, g_object_unref)
static gboolean style_inspector_node_borderwidth_changed (StyleInspector* self,
                                                   GtkScrollType scroll,
                                                   gdouble value);
static gboolean _style_inspector_node_borderwidth_changed_gtk_range_change_value (GtkRange* _sender,
                                                                           GtkScrollType scroll,
                                                                           gdouble new_value,
                                                                           gpointer self);
VALA_EXTERN GType undo_style_node_borderwidth_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeBorderwidth, g_object_unref)
VALA_EXTERN UndoStyleNodeBorderwidth* undo_style_node_borderwidth_new (StyleAffects affects,
                                                           gint node_borderwidth,
                                                           MindMap* map);
VALA_EXTERN UndoStyleNodeBorderwidth* undo_style_node_borderwidth_construct (GType object_type,
                                                                 StyleAffects affects,
                                                                 gint node_borderwidth,
                                                                 MindMap* map);
VALA_EXTERN void style_set_node_borderwidth (Style* self,
                                 gint* value);
static void style_inspector_node_fill_changed (StyleInspector* self);
static void _style_inspector_node_fill_changed_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
VALA_EXTERN void style_set_node_fill (Style* self,
                          gboolean* value);
VALA_EXTERN UndoStyleNodeFill* undo_style_node_fill_new (StyleAffects affects,
                                             gboolean node_fill,
                                             MindMap* map);
VALA_EXTERN UndoStyleNodeFill* undo_style_node_fill_construct (GType object_type,
                                                   StyleAffects affects,
                                                   gboolean node_fill,
                                                   MindMap* map);
VALA_EXTERN GType undo_style_node_fill_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeFill, g_object_unref)
static gboolean style_inspector_node_margin_changed (StyleInspector* self,
                                              GtkScrollType scroll,
                                              gdouble value);
static gboolean _style_inspector_node_margin_changed_gtk_range_change_value (GtkRange* _sender,
                                                                      GtkScrollType scroll,
                                                                      gdouble new_value,
                                                                      gpointer self);
VALA_EXTERN GType undo_style_node_margin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeMargin, g_object_unref)
VALA_EXTERN UndoStyleNodeMargin* undo_style_node_margin_new (StyleAffects affects,
                                                 gint node_margin,
                                                 MindMap* map);
VALA_EXTERN UndoStyleNodeMargin* undo_style_node_margin_construct (GType object_type,
                                                       StyleAffects affects,
                                                       gint node_margin,
                                                       MindMap* map);
VALA_EXTERN void style_set_node_margin (Style* self,
                            gint value);
static gboolean style_inspector_node_padding_changed (StyleInspector* self,
                                               GtkScrollType scroll,
                                               gdouble value);
static gboolean _style_inspector_node_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                                       GtkScrollType scroll,
                                                                       gdouble new_value,
                                                                       gpointer self);
VALA_EXTERN GType undo_style_node_padding_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodePadding, g_object_unref)
VALA_EXTERN UndoStyleNodePadding* undo_style_node_padding_new (StyleAffects affects,
                                                   gint node_padding,
                                                   MindMap* map);
VALA_EXTERN UndoStyleNodePadding* undo_style_node_padding_construct (GType object_type,
                                                         StyleAffects affects,
                                                         gint node_padding,
                                                         MindMap* map);
VALA_EXTERN void style_set_node_padding (Style* self,
                             gint value);
static gboolean __lambda213_ (StyleInspector* self,
                       GObject* obj);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static gboolean ___lambda213__gtk_custom_filter_func (GObject* item,
                                               gpointer self);
static void __lambda214_ (StyleInspector* self);
VALA_EXTERN void style_set_node_font (Style* self,
                          PangoFontDescription* value);
VALA_EXTERN UndoStyleNodeFont* undo_style_node_font_new (StyleAffects affects,
                                             const gchar* family,
                                             gint size,
                                             MindMap* map);
VALA_EXTERN UndoStyleNodeFont* undo_style_node_font_construct (GType object_type,
                                                   StyleAffects affects,
                                                   const gchar* family,
                                                   gint size,
                                                   MindMap* map);
VALA_EXTERN GType undo_style_node_font_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeFont, g_object_unref)
static void ___lambda214__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void style_inspector_set_node_text_align (StyleInspector* self,
                                          gint index);
static void _style_inspector_set_node_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                                gint index,
                                                                gpointer self);
static PangoAlignment* _pango_alignment_dup (PangoAlignment* self);
VALA_EXTERN void style_set_node_text_align (Style* self,
                                PangoAlignment* value);
VALA_EXTERN UndoStyleNodeTextAlign* undo_style_node_text_align_new (StyleAffects affects,
                                                        PangoAlignment node_text_align,
                                                        MindMap* map);
VALA_EXTERN UndoStyleNodeTextAlign* undo_style_node_text_align_construct (GType object_type,
                                                              StyleAffects affects,
                                                              PangoAlignment node_text_align,
                                                              MindMap* map);
VALA_EXTERN GType undo_style_node_text_align_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeTextAlign, g_object_unref)
static void __lambda215_ (StyleInspector* self);
VALA_EXTERN void style_set_node_width (Style* self,
                           gint* value);
VALA_EXTERN UndoStyleNodeWidth* undo_style_node_width_new (StyleAffects affects,
                                               gint node_width,
                                               MindMap* map);
VALA_EXTERN UndoStyleNodeWidth* undo_style_node_width_construct (GType object_type,
                                                     StyleAffects affects,
                                                     gint node_width,
                                                     MindMap* map);
VALA_EXTERN GType undo_style_node_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeWidth, g_object_unref)
static void ___lambda215__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                  gpointer self);
static void style_inspector_node_markup_changed (StyleInspector* self);
static void _style_inspector_node_markup_changed_g_object_notify (GObject* _sender,
                                                           GParamSpec* pspec,
                                                           gpointer self);
VALA_EXTERN UndoStyleNodeMarkup* undo_style_node_markup_new (StyleAffects affects,
                                                 gboolean node_markup,
                                                 MindMap* map);
VALA_EXTERN UndoStyleNodeMarkup* undo_style_node_markup_construct (GType object_type,
                                                       StyleAffects affects,
                                                       gboolean node_markup,
                                                       MindMap* map);
VALA_EXTERN GType undo_style_node_markup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleNodeMarkup, g_object_unref)
static GtkBox* style_inspector_create_connection_dash_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_arrow_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_arrow_size_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_line_width_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_padding_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_font_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_text_align_ui (StyleInspector* self);
static GtkBox* style_inspector_create_connection_title_width_ui (StyleInspector* self);
static void __lambda224_ (StyleInspector* self);
static void ___lambda224__gtk_expander_activate (GtkExpander* _sender,
                                          gpointer self);
static Block70Data* block70_data_ref (Block70Data* _data70_);
static void block70_data_unref (void * _userdata_);
static void __lambda217_ (Block70Data* _data70_,
                   gint index);
VALA_EXTERN void style_set_connection_dash (Style* self,
                                LinkDash* value);
VALA_EXTERN UndoStyleConnectionDash* undo_style_connection_dash_new (StyleAffects affects,
                                                         LinkDash* connection_dash,
                                                         MindMap* map);
VALA_EXTERN UndoStyleConnectionDash* undo_style_connection_dash_construct (GType object_type,
                                                               StyleAffects affects,
                                                               LinkDash* connection_dash,
                                                               MindMap* map);
VALA_EXTERN GType undo_style_connection_dash_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionDash, g_object_unref)
static void ___lambda217__image_menu_changed (ImageMenu* _sender,
                                       gint index,
                                       gpointer self);
static void __lambda218_ (StyleInspector* self);
static void ___lambda218__style_inspector_update_icons (StyleInspector* _sender,
                                                 gpointer self);
static Block71Data* block71_data_ref (Block71Data* _data71_);
static void block71_data_unref (void * _userdata_);
static void __lambda219_ (Block71Data* _data71_,
                   gint index);
VALA_EXTERN void style_set_connection_arrow (Style* self,
                                 const gchar* value);
VALA_EXTERN UndoStyleConnectionArrow* undo_style_connection_arrow_new (StyleAffects affects,
                                                           const gchar* connection_arrow,
                                                           MindMap* map);
VALA_EXTERN UndoStyleConnectionArrow* undo_style_connection_arrow_construct (GType object_type,
                                                                 StyleAffects affects,
                                                                 const gchar* connection_arrow,
                                                                 MindMap* map);
VALA_EXTERN GType undo_style_connection_arrow_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionArrow, g_object_unref)
static void ___lambda219__image_menu_changed (ImageMenu* _sender,
                                       gint index,
                                       gpointer self);
static void __lambda220_ (StyleInspector* self);
static void ___lambda220__style_inspector_update_icons (StyleInspector* _sender,
                                                 gpointer self);
VALA_EXTERN GdkPaintable* connection_make_arrow_icon (const gchar* type,
                                          gboolean dark);
static gboolean style_inspector_connection_arrow_size_changed (StyleInspector* self,
                                                        GtkScrollType scroll,
                                                        gdouble value);
static gboolean _style_inspector_connection_arrow_size_changed_gtk_range_change_value (GtkRange* _sender,
                                                                                GtkScrollType scroll,
                                                                                gdouble new_value,
                                                                                gpointer self);
VALA_EXTERN GType undo_style_connection_arrow_size_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionArrowSize, g_object_unref)
VALA_EXTERN UndoStyleConnectionArrowSize* undo_style_connection_arrow_size_new (StyleAffects affects,
                                                                    gint connection_arrow_size,
                                                                    MindMap* map);
VALA_EXTERN UndoStyleConnectionArrowSize* undo_style_connection_arrow_size_construct (GType object_type,
                                                                          StyleAffects affects,
                                                                          gint connection_arrow_size,
                                                                          MindMap* map);
VALA_EXTERN void style_set_connection_arrow_size (Style* self,
                                      gint* value);
static gboolean style_inspector_connection_line_width_changed (StyleInspector* self,
                                                        GtkScrollType scroll,
                                                        gdouble value);
static gboolean _style_inspector_connection_line_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                                                GtkScrollType scroll,
                                                                                gdouble new_value,
                                                                                gpointer self);
VALA_EXTERN GType undo_style_connection_line_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionLineWidth, g_object_unref)
VALA_EXTERN UndoStyleConnectionLineWidth* undo_style_connection_line_width_new (StyleAffects affects,
                                                                    gint line_width,
                                                                    MindMap* map);
VALA_EXTERN UndoStyleConnectionLineWidth* undo_style_connection_line_width_construct (GType object_type,
                                                                          StyleAffects affects,
                                                                          gint line_width,
                                                                          MindMap* map);
VALA_EXTERN void style_set_connection_line_width (Style* self,
                                      gint* value);
static gboolean style_inspector_connection_padding_changed (StyleInspector* self,
                                                     GtkScrollType scroll,
                                                     gdouble value);
static gboolean _style_inspector_connection_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                                             GtkScrollType scroll,
                                                                             gdouble new_value,
                                                                             gpointer self);
VALA_EXTERN GType undo_style_connection_padding_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionPadding, g_object_unref)
VALA_EXTERN UndoStyleConnectionPadding* undo_style_connection_padding_new (StyleAffects affects,
                                                               gint padding,
                                                               MindMap* map);
VALA_EXTERN UndoStyleConnectionPadding* undo_style_connection_padding_construct (GType object_type,
                                                                     StyleAffects affects,
                                                                     gint padding,
                                                                     MindMap* map);
VALA_EXTERN void style_set_connection_padding (Style* self,
                                   gint* value);
static gboolean __lambda221_ (StyleInspector* self,
                       GObject* obj);
static gboolean ___lambda221__gtk_custom_filter_func (GObject* item,
                                               gpointer self);
static void __lambda222_ (StyleInspector* self);
VALA_EXTERN void style_set_connection_font (Style* self,
                                PangoFontDescription* value);
VALA_EXTERN UndoStyleConnectionFont* undo_style_connection_font_new (StyleAffects affects,
                                                         const gchar* family,
                                                         gint size,
                                                         MindMap* map);
VALA_EXTERN UndoStyleConnectionFont* undo_style_connection_font_construct (GType object_type,
                                                               StyleAffects affects,
                                                               const gchar* family,
                                                               gint size,
                                                               MindMap* map);
VALA_EXTERN GType undo_style_connection_font_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionFont, g_object_unref)
static void ___lambda222__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void style_inspector_set_connection_text_align (StyleInspector* self,
                                                gint index);
static void _style_inspector_set_connection_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                                      gint index,
                                                                      gpointer self);
VALA_EXTERN void style_set_connection_text_align (Style* self,
                                      PangoAlignment* value);
VALA_EXTERN UndoStyleConnectionTextAlign* undo_style_connection_text_align_new (StyleAffects affects,
                                                                    PangoAlignment text_align,
                                                                    MindMap* map);
VALA_EXTERN UndoStyleConnectionTextAlign* undo_style_connection_text_align_construct (GType object_type,
                                                                          StyleAffects affects,
                                                                          PangoAlignment text_align,
                                                                          MindMap* map);
VALA_EXTERN GType undo_style_connection_text_align_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionTextAlign, g_object_unref)
static void __lambda223_ (StyleInspector* self);
VALA_EXTERN void style_set_connection_title_width (Style* self,
                                       gint* value);
VALA_EXTERN UndoStyleConnectionTitleWidth* undo_style_connection_title_width_new (StyleAffects affects,
                                                                      gint title_width,
                                                                      MindMap* map);
VALA_EXTERN UndoStyleConnectionTitleWidth* undo_style_connection_title_width_construct (GType object_type,
                                                                            StyleAffects affects,
                                                                            gint title_width,
                                                                            MindMap* map);
VALA_EXTERN GType undo_style_connection_title_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleConnectionTitleWidth, g_object_unref)
static void ___lambda223__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                                  gpointer self);
static GtkBox* style_inspector_create_callout_font_ui (StyleInspector* self);
static GtkBox* style_inspector_create_callout_text_align_ui (StyleInspector* self);
static GtkBox* style_inspector_create_callout_padding_ui (StyleInspector* self);
static GtkBox* style_inspector_create_callout_pointer_width_ui (StyleInspector* self);
static GtkBox* style_inspector_create_callout_pointer_length_ui (StyleInspector* self);
static void __lambda227_ (StyleInspector* self);
static void ___lambda227__gtk_expander_activate (GtkExpander* _sender,
                                          gpointer self);
static gboolean __lambda225_ (StyleInspector* self,
                       GObject* obj);
static gboolean ___lambda225__gtk_custom_filter_func (GObject* item,
                                               gpointer self);
static void __lambda226_ (StyleInspector* self);
VALA_EXTERN void style_set_callout_font (Style* self,
                             PangoFontDescription* value);
VALA_EXTERN void mind_map_add_undo (MindMap* self,
                        UndoItem* item);
VALA_EXTERN UndoStyleCalloutFont* undo_style_callout_font_new (StyleAffects affects,
                                                   const gchar* family,
                                                   gint size,
                                                   MindMap* map);
VALA_EXTERN UndoStyleCalloutFont* undo_style_callout_font_construct (GType object_type,
                                                         StyleAffects affects,
                                                         const gchar* family,
                                                         gint size,
                                                         MindMap* map);
VALA_EXTERN GType undo_style_callout_font_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleCalloutFont, g_object_unref)
static void ___lambda226__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void style_inspector_set_callout_text_align (StyleInspector* self,
                                             gint index);
static void _style_inspector_set_callout_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                                   gint index,
                                                                   gpointer self);
VALA_EXTERN void style_set_callout_text_align (Style* self,
                                   PangoAlignment* value);
VALA_EXTERN UndoStyleCalloutTextAlign* undo_style_callout_text_align_new (StyleAffects affects,
                                                              PangoAlignment text_align,
                                                              MindMap* map);
VALA_EXTERN UndoStyleCalloutTextAlign* undo_style_callout_text_align_construct (GType object_type,
                                                                    StyleAffects affects,
                                                                    PangoAlignment text_align,
                                                                    MindMap* map);
VALA_EXTERN GType undo_style_callout_text_align_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleCalloutTextAlign, g_object_unref)
static gboolean style_inspector_callout_padding_changed (StyleInspector* self,
                                                  GtkScrollType scroll,
                                                  gdouble value);
static gboolean _style_inspector_callout_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                                          GtkScrollType scroll,
                                                                          gdouble new_value,
                                                                          gpointer self);
VALA_EXTERN GType undo_style_callout_padding_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleCalloutPadding, g_object_unref)
VALA_EXTERN UndoStyleCalloutPadding* undo_style_callout_padding_new (StyleAffects affects,
                                                         gint padding,
                                                         MindMap* map);
VALA_EXTERN UndoStyleCalloutPadding* undo_style_callout_padding_construct (GType object_type,
                                                               StyleAffects affects,
                                                               gint padding,
                                                               MindMap* map);
VALA_EXTERN void style_set_callout_padding (Style* self,
                                gint* value);
static gboolean style_inspector_callout_pointer_width_changed (StyleInspector* self,
                                                        GtkScrollType scroll,
                                                        gdouble value);
static gboolean _style_inspector_callout_pointer_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                                                GtkScrollType scroll,
                                                                                gdouble new_value,
                                                                                gpointer self);
VALA_EXTERN GType undo_style_callout_pointer_width_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleCalloutPointerWidth, g_object_unref)
VALA_EXTERN UndoStyleCalloutPointerWidth* undo_style_callout_pointer_width_new (StyleAffects affects,
                                                                    gint pwidth,
                                                                    MindMap* map);
VALA_EXTERN UndoStyleCalloutPointerWidth* undo_style_callout_pointer_width_construct (GType object_type,
                                                                          StyleAffects affects,
                                                                          gint pwidth,
                                                                          MindMap* map);
VALA_EXTERN void style_set_callout_ptr_width (Style* self,
                                  gint* value);
static gboolean style_inspector_callout_pointer_length_changed (StyleInspector* self,
                                                         GtkScrollType scroll,
                                                         gdouble value);
static gboolean _style_inspector_callout_pointer_length_changed_gtk_range_change_value (GtkRange* _sender,
                                                                                 GtkScrollType scroll,
                                                                                 gdouble new_value,
                                                                                 gpointer self);
VALA_EXTERN GType undo_style_callout_pointer_length_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UndoStyleCalloutPointerLength, g_object_unref)
VALA_EXTERN UndoStyleCalloutPointerLength* undo_style_callout_pointer_length_new (StyleAffects affects,
                                                                      gint plength,
                                                                      MindMap* map);
VALA_EXTERN UndoStyleCalloutPointerLength* undo_style_callout_pointer_length_construct (GType object_type,
                                                                            StyleAffects affects,
                                                                            gint plength,
                                                                            MindMap* map);
VALA_EXTERN void style_set_callout_ptr_length (Style* self,
                                   gint* value);
VALA_EXTERN GArray* mind_map_get_nodes (MindMap* self);
VALA_EXTERN GType connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Connection, g_object_unref)
VALA_EXTERN gpointer connections_ref (gpointer instance);
VALA_EXTERN void connections_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_connections (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_connections (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_connections (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_connections (const GValue* value);
VALA_EXTERN GType connections_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Connections, connections_unref)
VALA_EXTERN Connections* mind_map_get_connections (MindMap* self);
VALA_EXTERN GArray* connections_get_connections (Connections* self);
VALA_EXTERN void node_set_style_for_tree (Node* self,
                              Style* s);
VALA_EXTERN void connection_set_style (Connection* self,
                           Style* value);
VALA_EXTERN gpointer selection_ref (gpointer instance);
VALA_EXTERN void selection_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_selection (const gchar* name,
                                  const gchar* nick,
                                  const gchar* blurb,
                                  GType object_type,
                                  GParamFlags flags);
VALA_EXTERN void value_set_selection (GValue* value,
                          gpointer v_object);
VALA_EXTERN void value_take_selection (GValue* value,
                           gpointer v_object);
VALA_EXTERN gpointer value_get_selection (const GValue* value);
VALA_EXTERN GType selection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Selection, selection_unref)
VALA_EXTERN Selection* mind_map_get_selected (MindMap* self);
VALA_EXTERN GArray* selection_nodes (Selection* self);
VALA_EXTERN void node_set_style (Node* self,
                     Style* value);
VALA_EXTERN GArray* selection_connections (Selection* self);
VALA_EXTERN GType callout_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Callout, g_object_unref)
VALA_EXTERN GArray* selection_callouts (Selection* self);
VALA_EXTERN void callout_set_style (Callout* self,
                        Style* value);
static void style_inspector_update_ui_with_style (StyleInspector* self,
                                           Style* style);
VALA_EXTERN void mind_map_queue_draw (MindMap* self);
VALA_EXTERN void mind_map_auto_save (MindMap* self);
static void style_inspector_set_affects (StyleInspector* self,
                                  StyleAffects affects);
static gboolean _style_affects_equal (const StyleAffects * s1,
                               const StyleAffects * s2);
VALA_EXTERN Style* mind_map_get_global_style (MindMap* self);
VALA_EXTERN GtkPopoverMenu* templates_get_template_group_menu (Templates* self,
                                                   TemplateType ttype);
VALA_EXTERN Style* node_get_style (Node* self);
VALA_EXTERN Style* connection_get_style (Connection* self);
VALA_EXTERN Style* callout_get_style (Callout* self);
static gboolean style_inspector_check_level_for_branches (StyleInspector* self,
                                                   Node* node,
                                                   gint levels,
                                                   gint level);
VALA_EXTERN gboolean node_is_leaf (Node* self);
VALA_EXTERN GArray* node_children (Node* self);
static void style_inspector_update_link_types_state (StyleInspector* self);
VALA_EXTERN GArray* mind_map_get_selected_nodes (MindMap* self);
VALA_EXTERN gboolean mind_map_get_editable (MindMap* self);
static void style_inspector_update_link_types_with_style (StyleInspector* self,
                                                   Style* style);
VALA_EXTERN LinkType* style_get_link_type (Style* self);
VALA_EXTERN gchar* link_type_name (LinkType* self);
VALA_EXTERN void mode_buttons_set_selected (ModeButtons* self,
                                gint value);
static void style_inspector_update_link_dashes_with_style (StyleInspector* self,
                                                    Style* style);
VALA_EXTERN LinkDash* style_get_link_dash (Style* self);
VALA_EXTERN void image_menu_set_selected (ImageMenu* self,
                              gint value);
static void style_inspector_update_node_borders_with_style (StyleInspector* self,
                                                     Style* style);
VALA_EXTERN NodeBorder* style_get_node_border (Style* self);
VALA_EXTERN gchar* node_border_name (NodeBorder* self);
static void style_inspector_update_node_text_align_with_style (StyleInspector* self,
                                                        Style* style);
VALA_EXTERN PangoAlignment* style_get_node_text_align (Style* self);
static void style_inspector_update_conn_dashes_with_style (StyleInspector* self,
                                                    Style* style);
VALA_EXTERN LinkDash* style_get_connection_dash (Style* self);
static void style_inspector_update_conn_arrows_with_style (StyleInspector* self,
                                                    Style* style);
VALA_EXTERN const gchar* style_get_connection_arrow (Style* self);
static void style_inspector_update_conn_text_align_with_style (StyleInspector* self,
                                                        Style* style);
VALA_EXTERN PangoAlignment* style_get_connection_text_align (Style* self);
static void style_inspector_update_callout_text_align_with_style (StyleInspector* self,
                                                           Style* style);
VALA_EXTERN PangoAlignment* style_get_callout_text_align (Style* self);
VALA_EXTERN gint* style_get_branch_margin (Style* self);
static gint* _int_dup (gint* self);
VALA_EXTERN gint* style_get_branch_radius (Style* self);
VALA_EXTERN gint* style_get_link_width (Style* self);
VALA_EXTERN gboolean* style_get_link_arrow (Style* self);
static gboolean* _bool_dup (gboolean* self);
VALA_EXTERN gint* style_get_link_arrow_size (Style* self);
VALA_EXTERN gint* style_get_node_borderwidth (Style* self);
VALA_EXTERN gboolean* style_get_node_fill (Style* self);
VALA_EXTERN gint style_get_node_margin (Style* self);
VALA_EXTERN gint style_get_node_padding (Style* self);
VALA_EXTERN gint* style_get_node_width (Style* self);
VALA_EXTERN gboolean* style_get_node_markup (Style* self);
VALA_EXTERN gint* style_get_connection_arrow_size (Style* self);
VALA_EXTERN gint* style_get_connection_line_width (Style* self);
VALA_EXTERN gint* style_get_connection_padding (Style* self);
VALA_EXTERN gint* style_get_callout_padding (Style* self);
VALA_EXTERN gint* style_get_callout_ptr_width (Style* self);
VALA_EXTERN gint* style_get_callout_ptr_length (Style* self);
VALA_EXTERN PangoFontDescription* style_get_node_font (Style* self);
VALA_EXTERN PangoFontDescription* style_get_connection_font (Style* self);
VALA_EXTERN gint* style_get_connection_title_width (Style* self);
VALA_EXTERN PangoFontDescription* style_get_callout_font (Style* self);
VALA_EXTERN gboolean node_border_is_fillable (NodeBorder* self);
VALA_EXTERN Node* mind_map_get_current_node (MindMap* self);
VALA_EXTERN Connection* mind_map_get_current_connection (MindMap* self);
VALA_EXTERN Callout* mind_map_get_current_callout (MindMap* self);
VALA_EXTERN gint selection_num_nodes (Selection* self);
VALA_EXTERN gint selection_num_connections (Selection* self);
VALA_EXTERN gint selection_num_callouts (Selection* self);
VALA_EXTERN void style_inspector_grab_first (StyleInspector* self);
static void style_inspector_finalize (GObject * obj);
static GType style_inspector_get_type_once (void);
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);

gchar*
style_affects_label (StyleAffects self)
{
	gchar* _tmp4_;
	gchar* result;
	switch (self) {
		case STYLE_AFFECTS_ALL:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (_ ("All"));
			result = _tmp0_;
			return result;
		}
		case STYLE_AFFECTS_SELECTED_NODES:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (_ ("Selected Nodes"));
			result = _tmp1_;
			return result;
		}
		case STYLE_AFFECTS_SELECTED_CONNECTIONS:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (_ ("Selected Connections"));
			result = _tmp2_;
			return result;
		}
		case STYLE_AFFECTS_SELECTED_CALLOUTS:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (_ ("Selected Callouts"));
			result = _tmp3_;
			return result;
		}
		default:
		break;
	}
	_tmp4_ = g_strdup (_ ("Unknown"));
	result = _tmp4_;
	return result;
}

static GType
style_affects_get_type_once (void)
{
	static const GEnumValue values[] = {{STYLE_AFFECTS_ALL, "STYLE_AFFECTS_ALL", "all"}, {STYLE_AFFECTS_SELECTED_NODES, "STYLE_AFFECTS_SELECTED_NODES", "selected-nodes"}, {STYLE_AFFECTS_SELECTED_CONNECTIONS, "STYLE_AFFECTS_SELECTED_CONNECTIONS", "selected-connections"}, {STYLE_AFFECTS_SELECTED_CALLOUTS, "STYLE_AFFECTS_SELECTED_CALLOUTS", "selected-callouts"}, {STYLE_AFFECTS_NUM, "STYLE_AFFECTS_NUM", "num"}, {0, NULL, NULL}};
	GType style_affects_type_id;
	style_affects_type_id = g_enum_register_static ("StyleAffects", values);
	return style_affects_type_id;
}

GType
style_affects_get_type (void)
{
	static volatile gsize style_affects_type_id__once = 0;
	if (g_once_init_enter (&style_affects_type_id__once)) {
		GType style_affects_type_id;
		style_affects_type_id = style_affects_get_type_once ();
		g_once_init_leave (&style_affects_type_id__once, style_affects_type_id);
	}
	return style_affects_type_id__once;
}

static inline gpointer
style_inspector_get_instance_private (StyleInspector* self)
{
	return G_STRUCT_MEMBER_P (self, StyleInspector_private_offset);
}

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

static void
_style_inspector_tab_changed_main_window_canvas_changed (MainWindow* _sender,
                                                         MindMap* map,
                                                         gpointer self)
{
	style_inspector_tab_changed ((StyleInspector*) self, map);
}

static void
_style_inspector_handle_current_changed_style_inspector_editable_changed (StyleInspector* _sender,
                                                                          gpointer self)
{
	style_inspector_handle_current_changed ((StyleInspector*) self);
}

static void
_style_inspector_add_style_template_template_add_load_func (Template* template,
                                                            gpointer self)
{
	style_inspector_add_style_template ((StyleInspector*) self, template);
}

static void
_style_inspector_load_style_template_template_add_load_func (Template* template,
                                                             gpointer self)
{
	style_inspector_load_style_template ((StyleInspector*) self, template);
}

static void
_style_inspector_delete_style_template_template_delete_func (gpointer self)
{
	style_inspector_delete_style_template ((StyleInspector*) self);
}

StyleInspector*
style_inspector_construct (GType object_type,
                           MainWindow* win,
                           GSettings* settings)
{
	StyleInspector * self = NULL;
	MainWindow* _tmp0_;
	GSettings* _tmp1_;
	GtkBox* affect = NULL;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* box = NULL;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkScrolledWindow* sw = NULL;
	GtkWidget* _tmp14_;
	GtkScrolledWindow* _tmp15_ = NULL;
	MainWindow* _tmp16_;
	Templates* _tmp17_;
	Templates* _tmp18_;
	MainWindow* _tmp19_;
	Templates* _tmp20_;
	Templates* _tmp21_;
	MainWindow* _tmp22_;
	Templates* _tmp23_;
	Templates* _tmp24_;
	MainWindow* _tmp25_;
	Templates* _tmp26_;
	Templates* _tmp27_;
	g_return_val_if_fail (win != NULL, NULL);
	g_return_val_if_fail (settings != NULL, NULL);
	self = (StyleInspector*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 20, NULL);
	_tmp0_ = _g_object_ref0 (win);
	_g_object_unref0 (self->priv->_win);
	self->priv->_win = _tmp0_;
	_tmp1_ = _g_object_ref0 (settings);
	_g_object_unref0 (self->priv->_settings);
	self->priv->_settings = _tmp1_;
	self->priv->_affects = STYLE_AFFECTS_ALL;
	_tmp2_ = style_inspector_create_affect_ui (self);
	affect = _tmp2_;
	_tmp3_ = style_inspector_create_branch_ui (self);
	_g_object_unref0 (self->priv->_branch_group);
	self->priv->_branch_group = _tmp3_;
	_tmp4_ = style_inspector_create_link_ui (self);
	_g_object_unref0 (self->priv->_link_group);
	self->priv->_link_group = _tmp4_;
	_tmp5_ = style_inspector_create_node_ui (self);
	_g_object_unref0 (self->priv->_node_group);
	self->priv->_node_group = _tmp5_;
	_tmp6_ = style_inspector_create_connection_ui (self);
	_g_object_unref0 (self->priv->_conn_group);
	self->priv->_conn_group = _tmp6_;
	_tmp7_ = style_inspector_create_callout_ui (self);
	_g_object_unref0 (self->priv->_callout_group);
	self->priv->_callout_group = _tmp7_;
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	g_object_ref_sink (_tmp8_);
	box = _tmp8_;
	_tmp9_ = self->priv->_branch_group;
	gtk_box_append (box, (GtkWidget*) _tmp9_);
	_tmp10_ = self->priv->_link_group;
	gtk_box_append (box, (GtkWidget*) _tmp10_);
	_tmp11_ = self->priv->_node_group;
	gtk_box_append (box, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->_conn_group;
	gtk_box_append (box, (GtkWidget*) _tmp12_);
	_tmp13_ = self->priv->_callout_group;
	gtk_box_append (box, (GtkWidget*) _tmp13_);
	_tmp14_ = _g_object_ref0 ((GtkWidget*) box);
	_tmp15_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp15_, TRUE);
	gtk_scrolled_window_set_child (_tmp15_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	sw = _tmp15_;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) affect);
	gtk_box_append ((GtkBox*) self, (GtkWidget*) sw);
	g_signal_connect_object (win, "canvas-changed", (GCallback) _style_inspector_tab_changed_main_window_canvas_changed, self, 0);
	g_signal_connect_object (self, "editable-changed", (GCallback) _style_inspector_handle_current_changed_style_inspector_editable_changed, self, 0);
	_tmp16_ = self->priv->_win;
	_tmp17_ = main_window_get_templates (_tmp16_);
	_tmp18_ = _tmp17_;
	templates_add_menus (_tmp18_, TEMPLATE_TYPE_STYLE_GENERAL, (GtkWidget*) self, win, _style_inspector_add_style_template_template_add_load_func, self, _style_inspector_load_style_template_template_add_load_func, self, _style_inspector_delete_style_template_template_delete_func, self);
	_tmp19_ = self->priv->_win;
	_tmp20_ = main_window_get_templates (_tmp19_);
	_tmp21_ = _tmp20_;
	templates_add_menus (_tmp21_, TEMPLATE_TYPE_STYLE_NODE, (GtkWidget*) self, win, _style_inspector_add_style_template_template_add_load_func, self, _style_inspector_load_style_template_template_add_load_func, self, _style_inspector_delete_style_template_template_delete_func, self);
	_tmp22_ = self->priv->_win;
	_tmp23_ = main_window_get_templates (_tmp22_);
	_tmp24_ = _tmp23_;
	templates_add_menus (_tmp24_, TEMPLATE_TYPE_STYLE_CONNECTION, (GtkWidget*) self, win, _style_inspector_add_style_template_template_add_load_func, self, _style_inspector_load_style_template_template_add_load_func, self, _style_inspector_delete_style_template_template_delete_func, self);
	_tmp25_ = self->priv->_win;
	_tmp26_ = main_window_get_templates (_tmp25_);
	_tmp27_ = _tmp26_;
	templates_add_menus (_tmp27_, TEMPLATE_TYPE_STYLE_CALLOUT, (GtkWidget*) self, win, _style_inspector_add_style_template_template_add_load_func, self, _style_inspector_load_style_template_template_add_load_func, self, _style_inspector_delete_style_template_template_delete_func, self);
	_g_object_unref0 (sw);
	_g_object_unref0 (box);
	_g_object_unref0 (affect);
	return self;
}

StyleInspector*
style_inspector_new (MainWindow* win,
                     GSettings* settings)
{
	return style_inspector_construct (TYPE_STYLE_INSPECTOR, win, settings);
}

static void
_style_inspector_handle_current_changed_mind_map_current_changed (MindMap* _sender,
                                                                  MindMap* map,
                                                                  gpointer self)
{
	style_inspector_handle_current_changed ((StyleInspector*) self);
}

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

static void
style_inspector_tab_changed (StyleInspector* self,
                             MindMap* map)
{
	MindMap* _tmp0_;
	MindMap* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	if (_tmp0_ != NULL) {
		MindMap* _tmp1_;
		guint _tmp2_;
		_tmp1_ = self->priv->_map;
		g_signal_parse_name ("current-changed", TYPE_MIND_MAP, &_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) _style_inspector_handle_current_changed_mind_map_current_changed, self);
	}
	if (map != NULL) {
		g_signal_connect_object (map, "current-changed", (GCallback) _style_inspector_handle_current_changed_mind_map_current_changed, self, 0);
	}
	_tmp3_ = _mind_map_ref0 (map);
	_mind_map_unref0 (self->priv->_map);
	self->priv->_map = _tmp3_;
	style_inspector_handle_ui_changed (self);
}

static gpointer
_template_ref0 (gpointer self)
{
	return self ? template_ref (self) : NULL;
}

static void
style_inspector_add_style_template (StyleInspector* self,
                                    Template* template)
{
	StyleTemplate* style_template = NULL;
	StyleTemplate* _tmp0_;
	StyleTemplate* _tmp1_;
	Style* _tmp2_;
	StyleTemplate* _tmp3_;
	TemplateType _tmp4_;
	TemplateType _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (template != NULL);
	_tmp0_ = _template_ref0 (G_TYPE_CHECK_INSTANCE_CAST (template, TYPE_STYLE_TEMPLATE, StyleTemplate));
	style_template = _tmp0_;
	_tmp1_ = style_template;
	_tmp2_ = self->priv->_curr_style;
	style_template_update_from_style (_tmp1_, _tmp2_);
	_tmp3_ = style_template;
	_tmp4_ = template_get_ttype ((Template*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == TEMPLATE_TYPE_STYLE_GENERAL) {
		StyleTemplate* node_style = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		StyleTemplate* _tmp8_;
		StyleTemplate* _tmp9_;
		StyleTemplate* _tmp10_;
		Style* _tmp11_;
		Style* _tmp12_;
		MainWindow* _tmp13_;
		Templates* _tmp14_;
		Templates* _tmp15_;
		StyleTemplate* _tmp16_;
		StyleTemplate* conn_style = NULL;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		StyleTemplate* _tmp19_;
		StyleTemplate* _tmp20_;
		StyleTemplate* _tmp21_;
		Style* _tmp22_;
		Style* _tmp23_;
		MainWindow* _tmp24_;
		Templates* _tmp25_;
		Templates* _tmp26_;
		StyleTemplate* _tmp27_;
		StyleTemplate* call_style = NULL;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		StyleTemplate* _tmp30_;
		StyleTemplate* _tmp31_;
		StyleTemplate* _tmp32_;
		Style* _tmp33_;
		Style* _tmp34_;
		MainWindow* _tmp35_;
		Templates* _tmp36_;
		Templates* _tmp37_;
		StyleTemplate* _tmp38_;
		_tmp6_ = template_get_name (template);
		_tmp7_ = _tmp6_;
		_tmp8_ = style_template_new (TEMPLATE_TYPE_STYLE_NODE, _tmp7_);
		node_style = _tmp8_;
		_tmp9_ = node_style;
		_tmp10_ = style_template;
		_tmp11_ = style_template_get_style (_tmp10_);
		_tmp12_ = _tmp11_;
		style_template_update_from_style (_tmp9_, _tmp12_);
		_tmp13_ = self->priv->_win;
		_tmp14_ = main_window_get_templates (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = node_style;
		templates_add_template (_tmp15_, (Template*) _tmp16_);
		_tmp17_ = template_get_name (template);
		_tmp18_ = _tmp17_;
		_tmp19_ = style_template_new (TEMPLATE_TYPE_STYLE_CONNECTION, _tmp18_);
		conn_style = _tmp19_;
		_tmp20_ = conn_style;
		_tmp21_ = style_template;
		_tmp22_ = style_template_get_style (_tmp21_);
		_tmp23_ = _tmp22_;
		style_template_update_from_style (_tmp20_, _tmp23_);
		_tmp24_ = self->priv->_win;
		_tmp25_ = main_window_get_templates (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = conn_style;
		templates_add_template (_tmp26_, (Template*) _tmp27_);
		_tmp28_ = template_get_name (template);
		_tmp29_ = _tmp28_;
		_tmp30_ = style_template_new (TEMPLATE_TYPE_STYLE_CALLOUT, _tmp29_);
		call_style = _tmp30_;
		_tmp31_ = call_style;
		_tmp32_ = style_template;
		_tmp33_ = style_template_get_style (_tmp32_);
		_tmp34_ = _tmp33_;
		style_template_update_from_style (_tmp31_, _tmp34_);
		_tmp35_ = self->priv->_win;
		_tmp36_ = main_window_get_templates (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = call_style;
		templates_add_template (_tmp37_, (Template*) _tmp38_);
		_template_unref0 (call_style);
		_template_unref0 (conn_style);
		_template_unref0 (node_style);
	}
	_template_unref0 (style_template);
}

static void
style_inspector_load_style_template (StyleInspector* self,
                                     Template* template)
{
	StyleTemplate* style_template = NULL;
	StyleTemplate* _tmp0_;
	Style* _tmp1_;
	Style* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (template != NULL);
	_tmp0_ = _template_ref0 (G_TYPE_CHECK_INSTANCE_CAST (template, TYPE_STYLE_TEMPLATE, StyleTemplate));
	style_template = _tmp0_;
	_tmp1_ = style_template_get_style (style_template);
	_tmp2_ = _tmp1_;
	style_inspector_update_from_style (self, _tmp2_);
	_template_unref0 (style_template);
}

static void
style_inspector_delete_style_template (StyleInspector* self)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (self->priv->_affects == STYLE_AFFECTS_ALL) {
		GSettings* _tmp1_;
		_tmp1_ = minder_settings;
		_tmp0_ = g_settings_get_int (_tmp1_, "default-global-style") == 2;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* name = NULL;
		GSettings* _tmp2_;
		gchar* _tmp3_;
		TemplateGroup* group = NULL;
		MainWindow* _tmp4_;
		Templates* _tmp5_;
		Templates* _tmp6_;
		TemplateGroup* _tmp7_;
		GArray* names = NULL;
		TemplateGroup* _tmp8_;
		GArray* _tmp9_;
		GSettings* _tmp16_;
		GSettings* _tmp17_;
		const gchar* _tmp18_;
		_tmp2_ = minder_settings;
		_tmp3_ = g_settings_get_string (_tmp2_, "default-global-style-name");
		name = _tmp3_;
		_tmp4_ = self->priv->_win;
		_tmp5_ = main_window_get_templates (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = templates_get_template_group (_tmp6_, TEMPLATE_TYPE_STYLE_GENERAL);
		group = _tmp7_;
		_tmp8_ = group;
		_tmp9_ = template_group_get_names (_tmp8_);
		names = _tmp9_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp10_ = FALSE;
				_tmp10_ = TRUE;
				while (TRUE) {
					GArray* _tmp12_;
					GArray* _tmp13_;
					const gchar* _tmp14_;
					const gchar* _tmp15_;
					if (!_tmp10_) {
						gint _tmp11_;
						_tmp11_ = i;
						i = _tmp11_ + 1;
					}
					_tmp10_ = FALSE;
					_tmp12_ = names;
					if (!(((guint) i) < _tmp12_->len)) {
						break;
					}
					_tmp13_ = names;
					_tmp14_ = g_array_index (_tmp13_, gchar*, (guint) i);
					_tmp15_ = name;
					if (g_strcmp0 (_tmp14_, _tmp15_) == 0) {
						_g_array_unref0 (names);
						_template_group_unref0 (group);
						_g_free0 (name);
						return;
					}
				}
			}
		}
		_tmp16_ = minder_settings;
		g_settings_set_int (_tmp16_, "default-global-style", 0);
		_tmp17_ = minder_settings;
		g_settings_set_string (_tmp17_, "default-global-style-name", "");
		_tmp18_ = name;
		style_inspector_show_global_style_dialog (self, _tmp18_);
		_g_array_unref0 (names);
		_template_group_unref0 (group);
		_g_free0 (name);
	}
}

static Block65Data*
block65_data_ref (Block65Data* _data65_)
{
	g_atomic_int_inc (&_data65_->_ref_count_);
	return _data65_;
}

static void
block65_data_unref (void * _userdata_)
{
	Block65Data* _data65_;
	_data65_ = (Block65Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data65_->_ref_count_)) {
		StyleInspector* self;
		self = _data65_->self;
		_g_object_unref0 (_data65_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block65Data, _data65_);
	}
}

static void
__lambda228_ (Block65Data* _data65_,
              gint id)
{
	StyleInspector* self;
	self = _data65_->self;
	g_signal_emit_by_name ((GtkDialog*) _data65_->dialog, "close");
}

static void
___lambda228__gtk_dialog_response (GtkDialog* _sender,
                                   gint response_id,
                                   gpointer self)
{
	__lambda228_ (self, response_id);
}

static void
style_inspector_show_global_style_dialog (StyleInspector* self,
                                          const gchar* name)
{
	Block65Data* _data65_;
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	MainWindow* _tmp3_;
	GtkWindow* _tmp4_;
	gchar* _tmp5_;
	GraniteMessageDialog* _tmp6_ = NULL;
	GraniteMessageDialog* _tmp7_;
	GtkButton* close = NULL;
	GtkButton* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_data65_ = g_slice_new0 (Block65Data);
	_data65_->_ref_count_ = 1;
	_data65_->self = g_object_ref (self);
	_tmp0_ = minder_settings;
	g_settings_set_int (_tmp0_, "default-global-style", 0);
	_tmp1_ = g_strdup_printf (_ ("The default global style '%s' was deleted.  Setting default global sty" \
"le in preferences to use the default Minder global style."), name);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_win;
	_tmp4_ = _g_object_ref0 ((GtkWindow*) _tmp3_);
	_tmp5_ = g_strdup ("");
	_tmp6_ = granite_message_dialog_new_with_image_from_icon_name (_ ("Deleted preferences default global style"), _tmp2_, "dialog-warning", GTK_BUTTONS_NONE);
	gtk_window_set_transient_for ((GtkWindow*) _tmp6_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	gtk_window_set_title ((GtkWindow*) _tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp2_);
	_data65_->dialog = _tmp7_;
	gtk_dialog_set_default_response ((GtkDialog*) _data65_->dialog, (gint) GTK_RESPONSE_CLOSE);
	_tmp8_ = (GtkButton*) gtk_button_new_with_label (_ ("Close"));
	g_object_ref_sink (_tmp8_);
	close = _tmp8_;
	gtk_widget_add_css_class ((GtkWidget*) close, GRANITE_STYLE_CLASS_SUGGESTED_ACTION);
	gtk_dialog_add_action_widget ((GtkDialog*) _data65_->dialog, (GtkWidget*) close, (gint) GTK_RESPONSE_CLOSE);
	g_signal_connect_data ((GtkDialog*) _data65_->dialog, "response", (GCallback) ___lambda228__gtk_dialog_response, block65_data_ref (_data65_), (GClosureNotify) block65_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data65_->dialog);
	_g_object_unref0 (close);
	block65_data_unref (_data65_);
	_data65_ = NULL;
}

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

static gpointer
__style_affects_dup0 (gpointer self)
{
	return self ? _style_affects_dup (self) : NULL;
}

static void
__lambda204_ (StyleInspector* self)
{
	Style* _tmp0_;
	Style* _tmp1_;
	Style* _tmp2_;
	StyleAffects* _tmp3_;
	GtkButton* _tmp4_;
	_tmp0_ = style_new ();
	_style_unref0 (self->priv->_clipboard_style);
	self->priv->_clipboard_style = _tmp0_;
	_tmp1_ = self->priv->_clipboard_style;
	_tmp2_ = self->priv->_curr_style;
	style_copy (_tmp1_, _tmp2_);
	_tmp3_ = __style_affects_dup0 (&self->priv->_affects);
	_g_free0 (self->priv->_clipboard_affect);
	self->priv->_clipboard_affect = _tmp3_;
	_tmp4_ = self->priv->_paste_btn;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, TRUE);
}

static void
___lambda204__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda204_ ((StyleInspector*) self);
}

static void
__lambda205_ (StyleInspector* self)
{
	Style* _tmp0_;
	_tmp0_ = self->priv->_clipboard_style;
	style_inspector_update_from_style (self, _tmp0_);
}

static void
___lambda205__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda205_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_affect_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkButton* copy_btn = NULL;
	gchar* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	gchar* _tmp4_;
	GtkButton* _tmp5_ = NULL;
	GtkButton* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkMenuButton* _tmp9_ = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp10_;
	GtkLabel* _tmp11_;
	GtkButton* _tmp12_;
	GtkMenuButton* _tmp13_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Changes affect:"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) lbl, "titled");
	_tmp1_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_affects_label);
	self->priv->_affects_label = _tmp1_;
	_tmp2_ = g_strdup (_ ("Copy current style"));
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-copy-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_END);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	copy_btn = _tmp3_;
	g_signal_connect_object (copy_btn, "clicked", (GCallback) ___lambda204__gtk_button_clicked, self, 0);
	_tmp4_ = g_strdup (_ ("Paste copied style"));
	_tmp5_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-paste-symbolic");
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_END);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->_paste_btn);
	self->priv->_paste_btn = _tmp5_;
	_tmp6_ = self->priv->_paste_btn;
	g_signal_connect_object (_tmp6_, "clicked", (GCallback) ___lambda205__gtk_button_clicked, self, 0);
	_tmp7_ = g_strdup ("folder-templates-symbolic");
	_tmp8_ = g_strdup (_ ("Style Templates"));
	_tmp9_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp9_, GTK_ALIGN_END);
	gtk_menu_button_set_icon_name (_tmp9_, _tmp7_);
	_g_free0 (_tmp7_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp9_, _tmp8_);
	_g_free0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->_template_btn);
	self->priv->_template_btn = _tmp9_;
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp10_);
	box = _tmp10_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp11_ = self->priv->_affects_label;
	gtk_box_append (box, (GtkWidget*) _tmp11_);
	gtk_box_append (box, (GtkWidget*) copy_btn);
	_tmp12_ = self->priv->_paste_btn;
	gtk_box_append (box, (GtkWidget*) _tmp12_);
	_tmp13_ = self->priv->_template_btn;
	gtk_box_append (box, (GtkWidget*) _tmp13_);
	result = box;
	_g_object_unref0 (copy_btn);
	_g_object_unref0 (lbl);
	return result;
}

static Block66Data*
block66_data_ref (Block66Data* _data66_)
{
	g_atomic_int_inc (&_data66_->_ref_count_);
	return _data66_;
}

static void
block66_data_unref (void * _userdata_)
{
	Block66Data* _data66_;
	_data66_ = (Block66Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data66_->_ref_count_)) {
		StyleInspector* self;
		self = _data66_->self;
		_g_object_unref0 (_data66_->exp);
		_g_object_unref0 (self);
		g_slice_free (Block66Data, _data66_);
	}
}

static void
__lambda208_ (Block66Data* _data66_)
{
	StyleInspector* self;
	GSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data66_->self;
	_tmp0_ = self->priv->_settings;
	_tmp1_ = gtk_expander_get_expanded (_data66_->exp);
	_tmp2_ = _tmp1_;
	g_settings_set_boolean (_tmp0_, "style-branch-options-expanded", !_tmp2_);
}

static void
___lambda208__gtk_expander_activate (GtkExpander* _sender,
                                     gpointer self)
{
	__lambda208_ (self);
}

static GtkBox*
style_inspector_create_branch_ui (StyleInspector* self)
{
	Block66Data* _data66_;
	GtkBox* branch_type = NULL;
	GtkBox* _tmp0_;
	GtkBox* branch_radius = NULL;
	GtkBox* _tmp1_;
	GtkBox* branch_margin = NULL;
	GtkBox* _tmp2_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GSettings* _tmp6_;
	GtkWidget* _tmp7_;
	GtkExpander* _tmp8_ = NULL;
	GtkExpander* _tmp9_;
	GtkSeparator* sep = NULL;
	GtkSeparator* _tmp10_;
	GtkBox* box = NULL;
	GtkBox* _tmp11_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data66_ = g_slice_new0 (Block66Data);
	_data66_->_ref_count_ = 1;
	_data66_->self = g_object_ref (self);
	_tmp0_ = style_inspector_create_branch_type_ui (self);
	branch_type = _tmp0_;
	_tmp1_ = style_inspector_create_branch_radius_ui (self);
	branch_radius = _tmp1_;
	_tmp2_ = style_inspector_create_branch_margin_ui (self);
	branch_margin = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_box_set_homogeneous (_tmp3_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp3_, 10);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp3_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 10);
	g_object_ref_sink (_tmp3_);
	cbox = _tmp3_;
	gtk_box_append (cbox, (GtkWidget*) branch_type);
	gtk_box_append (cbox, (GtkWidget*) branch_radius);
	gtk_box_append (cbox, (GtkWidget*) branch_margin);
	_tmp4_ = g_strconcat ("  ", _ ("Branch Options"), NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->_settings;
	_tmp7_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp8_ = (GtkExpander*) gtk_expander_new (_tmp5_);
	gtk_expander_set_expanded (_tmp8_, g_settings_get_boolean (_tmp6_, "style-branch-options-expanded"));
	gtk_expander_set_child (_tmp8_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	_g_free0 (_tmp5_);
	_data66_->exp = _tmp9_;
	gtk_widget_add_css_class ((GtkWidget*) _data66_->exp, "titled");
	g_signal_connect_data (_data66_->exp, "activate", (GCallback) ___lambda208__gtk_expander_activate, block66_data_ref (_data66_), (GClosureNotify) block66_data_unref, 0);
	_tmp10_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp10_);
	sep = _tmp10_;
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	g_object_ref_sink (_tmp11_);
	box = _tmp11_;
	gtk_box_append (box, (GtkWidget*) _data66_->exp);
	gtk_box_append (box, (GtkWidget*) sep);
	result = box;
	_g_object_unref0 (sep);
	_g_object_unref0 (cbox);
	_g_object_unref0 (branch_margin);
	_g_object_unref0 (branch_radius);
	_g_object_unref0 (branch_type);
	block66_data_unref (_data66_);
	_data66_ = NULL;
	return result;
}

static void
_style_inspector_action_set_link_type_mode_buttons_changed (ModeButtons* _sender,
                                                            gint index,
                                                            gpointer self)
{
	style_inspector_action_set_link_type ((StyleInspector*) self, index);
}

static void
__lambda206_ (StyleInspector* self)
{
	ModeButtons* _tmp0_;
	_tmp0_ = self->priv->_link_types;
	g_signal_emit_by_name (_tmp0_, "update-icons");
}

static void
___lambda206__style_inspector_update_icons (StyleInspector* _sender,
                                            gpointer self)
{
	__lambda206_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_branch_type_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	ModeButtons* _tmp1_ = NULL;
	ModeButtons* _tmp2_;
	GArray* link_types = NULL;
	Styles* _tmp3_;
	GArray* _tmp4_;
	GtkBox* box = NULL;
	GtkBox* _tmp21_ = NULL;
	GtkLabel* _tmp22_;
	ModeButtons* _tmp23_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Style"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = mode_buttons_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_link_types);
	self->priv->_link_types = _tmp1_;
	_tmp2_ = self->priv->_link_types;
	g_signal_connect_object (_tmp2_, "changed", (GCallback) _style_inspector_action_set_link_type_mode_buttons_changed, self, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda206__style_inspector_update_icons, self, 0);
	_tmp3_ = style_inspector_styles;
	_tmp4_ = styles_get_link_types (_tmp3_);
	link_types = _tmp4_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				LinkType* link_type = NULL;
				GArray* _tmp8_;
				LinkType* _tmp9_;
				LinkType* _tmp10_;
				ModeButtons* _tmp11_;
				LinkType* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				LinkType* _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				LinkType* _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = link_types;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = link_types;
				_tmp9_ = g_array_index (_tmp8_, LinkType*, (guint) i);
				_tmp10_ = _g_object_ref0 (_tmp9_);
				link_type = _tmp10_;
				_tmp11_ = self->priv->_link_types;
				_tmp12_ = link_type;
				_tmp13_ = link_type_light_icon_name (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = link_type;
				_tmp16_ = link_type_dark_icon_name (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = link_type;
				_tmp19_ = link_type_display_name (_tmp18_);
				_tmp20_ = _tmp19_;
				mode_buttons_add_button (_tmp11_, _tmp14_, _tmp17_, _tmp20_);
				_g_free0 (_tmp20_);
				_g_free0 (_tmp17_);
				_g_free0 (_tmp14_);
				_g_object_unref0 (link_type);
			}
		}
	}
	_tmp21_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	gtk_box_set_homogeneous (_tmp21_, TRUE);
	g_object_ref_sink (_tmp21_);
	box = _tmp21_;
	_tmp22_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp22_);
	_tmp23_ = self->priv->_link_types;
	gtk_box_append (box, (GtkWidget*) _tmp23_);
	result = box;
	_g_array_unref0 (link_types);
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_action_set_link_type (StyleInspector* self,
                                      gint index)
{
	GArray* link_types = NULL;
	Styles* _tmp0_;
	GArray* _tmp1_;
	GArray* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = style_inspector_styles;
	_tmp1_ = styles_get_link_types (_tmp0_);
	link_types = _tmp1_;
	_tmp2_ = link_types;
	if (((guint) index) < _tmp2_->len) {
		LinkType* link_type = NULL;
		GArray* _tmp3_;
		ModeButtons* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		LinkType* _tmp7_;
		LinkType* _tmp8_;
		Style* _tmp9_;
		LinkType* _tmp10_;
		MindMap* _tmp11_;
		UndoBuffer* _tmp12_;
		UndoBuffer* _tmp13_;
		LinkType* _tmp14_;
		MindMap* _tmp15_;
		UndoStyleLinkType* _tmp16_;
		UndoStyleLinkType* _tmp17_;
		_tmp3_ = link_types;
		_tmp4_ = self->priv->_link_types;
		_tmp5_ = mode_buttons_get_selected (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_array_index (_tmp3_, LinkType*, (guint) _tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		link_type = _tmp8_;
		_tmp9_ = self->priv->_curr_style;
		_tmp10_ = link_type;
		style_set_link_type (_tmp9_, _tmp10_);
		_tmp11_ = self->priv->_map;
		_tmp12_ = mind_map_get_undo_buffer (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = link_type;
		_tmp15_ = self->priv->_map;
		_tmp16_ = undo_style_link_type_new (self->priv->_affects, _tmp14_, _tmp15_);
		_tmp17_ = _tmp16_;
		undo_buffer_add_item (_tmp13_, (UndoItem*) _tmp17_);
		_g_object_unref0 (_tmp17_);
		_g_object_unref0 (link_type);
	}
	_g_array_unref0 (link_types);
}

static gboolean
__lambda207_ (StyleInspector* self,
              gdouble dx,
              gdouble dy)
{
	gboolean result;
	result = TRUE;
	return result;
}

static gboolean
___lambda207__gtk_event_controller_scroll_scroll (GtkEventControllerScroll* _sender,
                                                  gdouble dx,
                                                  gdouble dy,
                                                  gpointer self)
{
	gboolean result;
	result = __lambda207_ ((StyleInspector*) self, dx, dy);
	return result;
}

static void
style_inspector_ignore_scroll (StyleInspector* self,
                               GtkWidget* w)
{
	GtkEventControllerScroll* scroller = NULL;
	GtkEventControllerScroll* _tmp0_;
	GtkEventController* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (w != NULL);
	_tmp0_ = (GtkEventControllerScroll*) gtk_event_controller_scroll_new (GTK_EVENT_CONTROLLER_SCROLL_VERTICAL | GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL);
	scroller = _tmp0_;
	_tmp1_ = _g_object_ref0 ((GtkEventController*) scroller);
	gtk_widget_add_controller (w, _tmp1_);
	g_signal_connect_object (scroller, "scroll", (GCallback) ___lambda207__gtk_event_controller_scroll_scroll, self, 0);
	_g_object_unref0 (scroller);
}

static gboolean
_style_inspector_branch_radius_changed_gtk_range_change_value (GtkRange* _sender,
                                                               GtkScrollType scroll,
                                                               gdouble new_value,
                                                               gpointer self)
{
	gboolean result;
	result = style_inspector_branch_radius_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_branch_radius_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	GtkScale* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Corner Radius"));
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 10, (gdouble) 40, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_branch_radius);
	self->priv->_branch_radius = _tmp1_;
	_tmp2_ = self->priv->_branch_radius;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_branch_radius;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_branch_radius_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, FALSE);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->_branch_radius_box);
	self->priv->_branch_radius_box = _tmp4_;
	_tmp5_ = self->priv->_branch_radius_box;
	gtk_box_append (_tmp5_, (GtkWidget*) lbl);
	_tmp6_ = self->priv->_branch_radius_box;
	_tmp7_ = self->priv->_branch_radius;
	gtk_box_append (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = self->priv->_branch_radius_box;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	result = _tmp9_;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_branch_radius_changed (StyleInspector* self,
                                       GtkScrollType scroll,
                                       gdouble value)
{
	gint intval = 0;
	UndoStyleBranchRadius* margin = NULL;
	MindMap* _tmp0_;
	UndoStyleBranchRadius* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 40) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_branch_radius_new (self->priv->_affects, intval, _tmp0_);
	margin = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_branch_radius (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleBranchRadius* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = margin;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleBranchRadius* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = margin;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (margin);
	return result;
}

static gboolean
_style_inspector_branch_margin_changed_gtk_range_change_value (GtkRange* _sender,
                                                               GtkScrollType scroll,
                                                               gdouble new_value,
                                                               gpointer self)
{
	gboolean result;
	result = style_inspector_branch_margin_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_branch_margin_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Margin"));
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 20, (gdouble) 150, (gdouble) 10);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_branch_margin);
	self->priv->_branch_margin = _tmp1_;
	_tmp2_ = self->priv->_branch_margin;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_branch_margin;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_branch_margin_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_branch_margin;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_branch_margin_changed (StyleInspector* self,
                                       GtkScrollType scroll,
                                       gdouble value)
{
	gint intval = 0;
	UndoStyleBranchMargin* margin = NULL;
	MindMap* _tmp0_;
	UndoStyleBranchMargin* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 150) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_branch_margin_new (self->priv->_affects, intval, _tmp0_);
	margin = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_branch_margin (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleBranchMargin* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = margin;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleBranchMargin* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = margin;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (margin);
	return result;
}

static Block67Data*
block67_data_ref (Block67Data* _data67_)
{
	g_atomic_int_inc (&_data67_->_ref_count_);
	return _data67_;
}

static void
block67_data_unref (void * _userdata_)
{
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
		StyleInspector* self;
		self = _data67_->self;
		_g_object_unref0 (_data67_->exp);
		_g_object_unref0 (self);
		g_slice_free (Block67Data, _data67_);
	}
}

static void
__lambda211_ (Block67Data* _data67_)
{
	StyleInspector* self;
	GSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data67_->self;
	_tmp0_ = self->priv->_settings;
	_tmp1_ = gtk_expander_get_expanded (_data67_->exp);
	_tmp2_ = _tmp1_;
	g_settings_set_boolean (_tmp0_, "style-link-options-expanded", !_tmp2_);
}

static void
___lambda211__gtk_expander_activate (GtkExpander* _sender,
                                     gpointer self)
{
	__lambda211_ (self);
}

static GtkBox*
style_inspector_create_link_ui (StyleInspector* self)
{
	Block67Data* _data67_;
	GtkBox* link_dash = NULL;
	GtkBox* _tmp0_;
	GtkBox* link_width = NULL;
	GtkBox* _tmp1_;
	GtkBox* link_arrow = NULL;
	GtkBox* _tmp2_;
	GtkBox* link_arrow_size = NULL;
	GtkBox* _tmp3_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GSettings* _tmp7_;
	GtkWidget* _tmp8_;
	GtkExpander* _tmp9_ = NULL;
	GtkExpander* _tmp10_;
	GtkSeparator* sep = NULL;
	GtkSeparator* _tmp11_;
	GtkBox* box = NULL;
	GtkBox* _tmp12_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data67_ = g_slice_new0 (Block67Data);
	_data67_->_ref_count_ = 1;
	_data67_->self = g_object_ref (self);
	_tmp0_ = style_inspector_create_link_dash_ui (self);
	link_dash = _tmp0_;
	_tmp1_ = style_inspector_create_link_width_ui (self);
	link_width = _tmp1_;
	_tmp2_ = style_inspector_create_link_arrow_ui (self);
	link_arrow = _tmp2_;
	_tmp3_ = style_inspector_create_link_arrow_size_ui (self);
	link_arrow_size = _tmp3_;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp4_, 10);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp4_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 10);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp4_, 10);
	g_object_ref_sink (_tmp4_);
	cbox = _tmp4_;
	gtk_box_append (cbox, (GtkWidget*) link_dash);
	gtk_box_append (cbox, (GtkWidget*) link_width);
	gtk_box_append (cbox, (GtkWidget*) link_arrow);
	gtk_box_append (cbox, (GtkWidget*) link_arrow_size);
	_tmp5_ = g_strconcat ("  ", _ ("Link Options"), NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->_settings;
	_tmp8_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp9_ = (GtkExpander*) gtk_expander_new (_tmp6_);
	gtk_expander_set_expanded (_tmp9_, g_settings_get_boolean (_tmp7_, "style-link-options-expanded"));
	gtk_expander_set_child (_tmp9_, _tmp8_);
	_g_object_unref0 (_tmp8_);
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp6_);
	_data67_->exp = _tmp10_;
	gtk_widget_add_css_class ((GtkWidget*) _data67_->exp, "titled");
	g_signal_connect_data (_data67_->exp, "activate", (GCallback) ___lambda211__gtk_expander_activate, block67_data_ref (_data67_), (GClosureNotify) block67_data_unref, 0);
	_tmp11_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp11_);
	sep = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp12_);
	box = _tmp12_;
	gtk_box_append (box, (GtkWidget*) _data67_->exp);
	gtk_box_append (box, (GtkWidget*) sep);
	result = box;
	_g_object_unref0 (sep);
	_g_object_unref0 (cbox);
	_g_object_unref0 (link_arrow_size);
	_g_object_unref0 (link_arrow);
	_g_object_unref0 (link_width);
	_g_object_unref0 (link_dash);
	block67_data_unref (_data67_);
	_data67_ = NULL;
	return result;
}

static Block68Data*
block68_data_ref (Block68Data* _data68_)
{
	g_atomic_int_inc (&_data68_->_ref_count_);
	return _data68_;
}

static void
block68_data_unref (void * _userdata_)
{
	Block68Data* _data68_;
	_data68_ = (Block68Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data68_->_ref_count_)) {
		StyleInspector* self;
		self = _data68_->self;
		_g_array_unref0 (_data68_->dashes);
		_g_object_unref0 (self);
		g_slice_free (Block68Data, _data68_);
	}
}

static void
__lambda209_ (Block68Data* _data68_,
              gint index)
{
	StyleInspector* self;
	Style* _tmp0_;
	GArray* _tmp1_;
	LinkDash* _tmp2_;
	MindMap* _tmp3_;
	UndoBuffer* _tmp4_;
	UndoBuffer* _tmp5_;
	GArray* _tmp6_;
	LinkDash* _tmp7_;
	MindMap* _tmp8_;
	UndoStyleLinkDash* _tmp9_;
	UndoStyleLinkDash* _tmp10_;
	self = _data68_->self;
	_tmp0_ = self->priv->_curr_style;
	_tmp1_ = _data68_->dashes;
	_tmp2_ = g_array_index (_tmp1_, LinkDash*, (guint) index);
	style_set_link_dash (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_map;
	_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _data68_->dashes;
	_tmp7_ = g_array_index (_tmp6_, LinkDash*, (guint) index);
	_tmp8_ = self->priv->_map;
	_tmp9_ = undo_style_link_dash_new (self->priv->_affects, _tmp7_, _tmp8_);
	_tmp10_ = _tmp9_;
	undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp10_);
	_g_object_unref0 (_tmp10_);
}

static void
___lambda209__image_menu_changed (ImageMenu* _sender,
                                  gint index,
                                  gpointer self)
{
	__lambda209_ (self, index);
}

static void
__lambda210_ (StyleInspector* self)
{
	ImageMenu* _tmp0_;
	_tmp0_ = self->priv->_link_dash;
	g_signal_emit_by_name (_tmp0_, "update-icons");
}

static void
___lambda210__style_inspector_update_icons (StyleInspector* _sender,
                                            gpointer self)
{
	__lambda210_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_link_dash_ui (StyleInspector* self)
{
	Block68Data* _data68_;
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	Styles* _tmp1_;
	GArray* _tmp2_;
	ImageMenu* _tmp3_ = NULL;
	ImageMenu* _tmp4_;
	GtkBox* box = NULL;
	GtkBox* _tmp18_ = NULL;
	GtkLabel* _tmp19_;
	ImageMenu* _tmp20_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data68_ = g_slice_new0 (Block68Data);
	_data68_->_ref_count_ = 1;
	_data68_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Line Dash"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = style_inspector_styles;
	_tmp2_ = styles_get_link_dashes (_tmp1_);
	_data68_->dashes = _tmp2_;
	_tmp3_ = image_menu_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_link_dash);
	self->priv->_link_dash = _tmp3_;
	_tmp4_ = self->priv->_link_dash;
	g_signal_connect_data (_tmp4_, "changed", (GCallback) ___lambda209__image_menu_changed, block68_data_ref (_data68_), (GClosureNotify) block68_data_unref, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda210__style_inspector_update_icons, self, 0);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				LinkDash* dash = NULL;
				GArray* _tmp8_;
				LinkDash* _tmp9_;
				LinkDash* _tmp10_;
				ImageMenu* _tmp11_;
				LinkDash* _tmp12_;
				GdkPaintable* _tmp13_;
				GdkPaintable* _tmp14_;
				LinkDash* _tmp15_;
				GdkPaintable* _tmp16_;
				GdkPaintable* _tmp17_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = _data68_->dashes;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = _data68_->dashes;
				_tmp9_ = g_array_index (_tmp8_, LinkDash*, (guint) i);
				_tmp10_ = _g_object_ref0 (_tmp9_);
				dash = _tmp10_;
				_tmp11_ = self->priv->_link_dash;
				_tmp12_ = dash;
				_tmp13_ = link_dash_make_icon (_tmp12_, FALSE);
				_tmp14_ = _tmp13_;
				_tmp15_ = dash;
				_tmp16_ = link_dash_make_icon (_tmp15_, TRUE);
				_tmp17_ = _tmp16_;
				image_menu_add_image (_tmp11_, _tmp14_, _tmp17_);
				_g_object_unref0 (_tmp17_);
				_g_object_unref0 (_tmp14_);
				_g_object_unref0 (dash);
			}
		}
	}
	_tmp18_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp18_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp18_, TRUE);
	g_object_ref_sink (_tmp18_);
	box = _tmp18_;
	_tmp19_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->_link_dash;
	gtk_box_append (box, (GtkWidget*) _tmp20_);
	result = box;
	_g_object_unref0 (lbl);
	block68_data_unref (_data68_);
	_data68_ = NULL;
	return result;
}

static gboolean
_style_inspector_link_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                            GtkScrollType scroll,
                                                            gdouble new_value,
                                                            gpointer self)
{
	gboolean result;
	result = style_inspector_link_width_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_link_width_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp9_;
	GtkBox* box = NULL;
	GtkBox* _tmp10_ = NULL;
	GtkLabel* _tmp11_;
	GtkScale* _tmp12_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Line Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 2, (gdouble) 8, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_link_width);
	self->priv->_link_width = _tmp1_;
	_tmp2_ = self->priv->_link_width;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	{
		gint i = 0;
		i = 2;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(i <= 8)) {
					break;
				}
				if ((i % 2) == 0) {
					GtkScale* _tmp5_;
					gchar* _tmp6_;
					gchar* _tmp7_;
					_tmp5_ = self->priv->_link_width;
					_tmp6_ = g_strdup_printf ("%d", i);
					_tmp7_ = _tmp6_;
					gtk_scale_add_mark (_tmp5_, (gdouble) i, GTK_POS_BOTTOM, _tmp7_);
					_g_free0 (_tmp7_);
				} else {
					GtkScale* _tmp8_;
					_tmp8_ = self->priv->_link_width;
					gtk_scale_add_mark (_tmp8_, (gdouble) i, GTK_POS_BOTTOM, NULL);
				}
			}
		}
	}
	_tmp9_ = self->priv->_link_width;
	g_signal_connect_object ((GtkRange*) _tmp9_, "change-value", (GCallback) _style_inspector_link_width_changed_gtk_range_change_value, self, 0);
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp10_, TRUE);
	g_object_ref_sink (_tmp10_);
	box = _tmp10_;
	_tmp11_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->_link_width;
	gtk_box_append (box, (GtkWidget*) _tmp12_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_link_width_changed (StyleInspector* self,
                                    GtkScrollType scroll,
                                    gdouble value)
{
	gint int_value = 0;
	UndoStyleLinkWidth* link_width = NULL;
	MindMap* _tmp0_;
	UndoStyleLinkWidth* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (value > ((gdouble) 8)) {
		value = (gdouble) 8;
	}
	int_value = (gint) value;
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_link_width_new (self->priv->_affects, int_value, _tmp0_);
	link_width = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_link_width (_tmp2_, &int_value);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleLinkWidth* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = link_width;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleLinkWidth* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = link_width;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (link_width);
	return result;
}

static void
_style_inspector_link_arrow_changed_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	style_inspector_link_arrow_changed ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_link_arrow_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	GtkSwitch* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_;
	GtkSwitch* _tmp4_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Link Arrow"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	gtk_switch_set_active (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_link_arrow);
	self->priv->_link_arrow = _tmp1_;
	_tmp2_ = self->priv->_link_arrow;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _style_inspector_link_arrow_changed_g_object_notify, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp4_ = self->priv->_link_arrow;
	gtk_box_append (box, (GtkWidget*) _tmp4_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_link_arrow_changed (StyleInspector* self)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->_ignore) {
		gboolean val = FALSE;
		GtkSwitch* _tmp0_;
		Style* _tmp1_;
		MindMap* _tmp2_;
		UndoBuffer* _tmp3_;
		UndoBuffer* _tmp4_;
		MindMap* _tmp5_;
		UndoStyleLinkArrow* _tmp6_;
		UndoStyleLinkArrow* _tmp7_;
		_tmp0_ = self->priv->_link_arrow;
		val = gtk_switch_get_active (_tmp0_);
		_tmp1_ = self->priv->_curr_style;
		style_set_link_arrow (_tmp1_, &val);
		_tmp2_ = self->priv->_map;
		_tmp3_ = mind_map_get_undo_buffer (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_map;
		_tmp6_ = undo_style_link_arrow_new (self->priv->_affects, val, _tmp5_);
		_tmp7_ = _tmp6_;
		undo_buffer_add_item (_tmp4_, (UndoItem*) _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static gboolean
_style_inspector_link_arrow_size_changed_gtk_range_change_value (GtkRange* _sender,
                                                                 GtkScrollType scroll,
                                                                 gdouble new_value,
                                                                 gpointer self)
{
	gboolean result;
	result = style_inspector_link_arrow_size_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_link_arrow_size_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkScale* _tmp4_;
	GtkScale* _tmp5_;
	GtkScale* _tmp6_;
	GtkScale* _tmp7_;
	GtkBox* box = NULL;
	GtkBox* _tmp8_ = NULL;
	GtkScale* _tmp9_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Link Arrow Size"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 0, (gdouble) 3, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_link_arrow_size);
	self->priv->_link_arrow_size = _tmp1_;
	_tmp2_ = self->priv->_link_arrow_size;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_link_arrow_size;
	gtk_scale_add_mark (_tmp3_, (gdouble) 0, GTK_POS_BOTTOM, "S");
	_tmp4_ = self->priv->_link_arrow_size;
	gtk_scale_add_mark (_tmp4_, (gdouble) 1, GTK_POS_BOTTOM, "M");
	_tmp5_ = self->priv->_link_arrow_size;
	gtk_scale_add_mark (_tmp5_, (gdouble) 2, GTK_POS_BOTTOM, "L");
	_tmp6_ = self->priv->_link_arrow_size;
	gtk_scale_add_mark (_tmp6_, (gdouble) 3, GTK_POS_BOTTOM, "XL");
	_tmp7_ = self->priv->_link_arrow_size;
	g_signal_connect_object ((GtkRange*) _tmp7_, "change-value", (GCallback) _style_inspector_link_arrow_size_changed_gtk_range_change_value, self, 0);
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp8_, TRUE);
	g_object_ref_sink (_tmp8_);
	box = _tmp8_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp9_ = self->priv->_link_arrow_size;
	gtk_box_append (box, (GtkWidget*) _tmp9_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_link_arrow_size_changed (StyleInspector* self,
                                         GtkScrollType scroll,
                                         gdouble value)
{
	gint int_value = 0;
	UndoStyleLinkArrowSize* link_arrow_size = NULL;
	MindMap* _tmp0_;
	UndoStyleLinkArrowSize* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (value > ((gdouble) 3)) {
		value = (gdouble) 3;
	}
	int_value = (gint) value;
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_link_arrow_size_new (self->priv->_affects, int_value, _tmp0_);
	link_arrow_size = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_link_arrow_size (_tmp2_, &int_value);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleLinkArrowSize* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = link_arrow_size;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleLinkArrowSize* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = link_arrow_size;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (link_arrow_size);
	return result;
}

static Block69Data*
block69_data_ref (Block69Data* _data69_)
{
	g_atomic_int_inc (&_data69_->_ref_count_);
	return _data69_;
}

static void
block69_data_unref (void * _userdata_)
{
	Block69Data* _data69_;
	_data69_ = (Block69Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data69_->_ref_count_)) {
		StyleInspector* self;
		self = _data69_->self;
		_g_object_unref0 (_data69_->exp);
		_g_object_unref0 (self);
		g_slice_free (Block69Data, _data69_);
	}
}

static void
__lambda216_ (Block69Data* _data69_)
{
	StyleInspector* self;
	GSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data69_->self;
	_tmp0_ = self->priv->_settings;
	_tmp1_ = gtk_expander_get_expanded (_data69_->exp);
	_tmp2_ = _tmp1_;
	g_settings_set_boolean (_tmp0_, "style-node-options-expanded", !_tmp2_);
}

static void
___lambda216__gtk_expander_activate (GtkExpander* _sender,
                                     gpointer self)
{
	__lambda216_ (self);
}

static GtkBox*
style_inspector_create_node_ui (StyleInspector* self)
{
	Block69Data* _data69_;
	GtkBox* node_border = NULL;
	GtkBox* _tmp0_;
	GtkBox* node_borderwidth = NULL;
	GtkBox* _tmp1_;
	GtkBox* node_fill = NULL;
	GtkBox* _tmp2_;
	GtkBox* node_margin = NULL;
	GtkBox* _tmp3_;
	GtkBox* node_padding = NULL;
	GtkBox* _tmp4_;
	GtkBox* node_font = NULL;
	GtkBox* _tmp5_;
	GtkBox* node_text_align = NULL;
	GtkBox* _tmp6_;
	GtkBox* node_width = NULL;
	GtkBox* _tmp7_;
	GtkBox* node_markup = NULL;
	GtkBox* _tmp8_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp9_ = NULL;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GSettings* _tmp12_;
	GtkWidget* _tmp13_;
	GtkExpander* _tmp14_ = NULL;
	GtkExpander* _tmp15_;
	GtkSeparator* sep = NULL;
	GtkSeparator* _tmp16_;
	GtkBox* box = NULL;
	GtkBox* _tmp17_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data69_ = g_slice_new0 (Block69Data);
	_data69_->_ref_count_ = 1;
	_data69_->self = g_object_ref (self);
	_tmp0_ = style_inspector_create_node_border_ui (self);
	node_border = _tmp0_;
	_tmp1_ = style_inspector_create_node_borderwidth_ui (self);
	node_borderwidth = _tmp1_;
	_tmp2_ = style_inspector_create_node_fill_ui (self);
	node_fill = _tmp2_;
	_tmp3_ = style_inspector_create_node_margin_ui (self);
	node_margin = _tmp3_;
	_tmp4_ = style_inspector_create_node_padding_ui (self);
	node_padding = _tmp4_;
	_tmp5_ = style_inspector_create_node_font_ui (self);
	node_font = _tmp5_;
	_tmp6_ = style_inspector_create_node_text_align_ui (self);
	node_text_align = _tmp6_;
	_tmp7_ = style_inspector_create_node_width_ui (self);
	node_width = _tmp7_;
	_tmp8_ = style_inspector_create_node_markup_ui (self);
	node_markup = _tmp8_;
	_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_box_set_homogeneous (_tmp9_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp9_, 10);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp9_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, 10);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp9_, 10);
	g_object_ref_sink (_tmp9_);
	cbox = _tmp9_;
	gtk_box_append (cbox, (GtkWidget*) node_border);
	gtk_box_append (cbox, (GtkWidget*) node_borderwidth);
	gtk_box_append (cbox, (GtkWidget*) node_fill);
	gtk_box_append (cbox, (GtkWidget*) node_margin);
	gtk_box_append (cbox, (GtkWidget*) node_padding);
	gtk_box_append (cbox, (GtkWidget*) node_font);
	gtk_box_append (cbox, (GtkWidget*) node_text_align);
	gtk_box_append (cbox, (GtkWidget*) node_width);
	gtk_box_append (cbox, (GtkWidget*) node_markup);
	_tmp10_ = g_strconcat ("  ", _ ("Node Options"), NULL);
	_tmp11_ = _tmp10_;
	_tmp12_ = self->priv->_settings;
	_tmp13_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp14_ = (GtkExpander*) gtk_expander_new (_tmp11_);
	gtk_expander_set_expanded (_tmp14_, g_settings_get_boolean (_tmp12_, "style-node-options-expanded"));
	gtk_expander_set_child (_tmp14_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	_g_free0 (_tmp11_);
	_data69_->exp = _tmp15_;
	gtk_widget_add_css_class ((GtkWidget*) _data69_->exp, "titled");
	g_signal_connect_data (_data69_->exp, "activate", (GCallback) ___lambda216__gtk_expander_activate, block69_data_ref (_data69_), (GClosureNotify) block69_data_unref, 0);
	_tmp16_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp16_);
	sep = _tmp16_;
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	g_object_ref_sink (_tmp17_);
	box = _tmp17_;
	gtk_box_append (box, (GtkWidget*) _data69_->exp);
	gtk_box_append (box, (GtkWidget*) sep);
	result = box;
	_g_object_unref0 (sep);
	_g_object_unref0 (cbox);
	_g_object_unref0 (node_markup);
	_g_object_unref0 (node_width);
	_g_object_unref0 (node_text_align);
	_g_object_unref0 (node_font);
	_g_object_unref0 (node_padding);
	_g_object_unref0 (node_margin);
	_g_object_unref0 (node_fill);
	_g_object_unref0 (node_borderwidth);
	_g_object_unref0 (node_border);
	block69_data_unref (_data69_);
	_data69_ = NULL;
	return result;
}

static void
_style_inspector_set_node_border_mode_buttons_changed (ModeButtons* _sender,
                                                       gint index,
                                                       gpointer self)
{
	style_inspector_set_node_border ((StyleInspector*) self, index);
}

static void
__lambda212_ (StyleInspector* self)
{
	ModeButtons* _tmp0_;
	_tmp0_ = self->priv->_node_borders;
	g_signal_emit_by_name (_tmp0_, "update-icons");
}

static void
___lambda212__style_inspector_update_icons (StyleInspector* _sender,
                                            gpointer self)
{
	__lambda212_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_node_border_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	ModeButtons* _tmp1_ = NULL;
	ModeButtons* _tmp2_;
	GArray* node_borders = NULL;
	Styles* _tmp3_;
	GArray* _tmp4_;
	GtkBox* box = NULL;
	GtkBox* _tmp21_;
	GtkLabel* _tmp22_;
	ModeButtons* _tmp23_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Border Style"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = mode_buttons_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_borders);
	self->priv->_node_borders = _tmp1_;
	_tmp2_ = self->priv->_node_borders;
	g_signal_connect_object (_tmp2_, "changed", (GCallback) _style_inspector_set_node_border_mode_buttons_changed, self, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda212__style_inspector_update_icons, self, 0);
	_tmp3_ = style_inspector_styles;
	_tmp4_ = styles_get_node_borders (_tmp3_);
	node_borders = _tmp4_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				NodeBorder* node_border = NULL;
				GArray* _tmp8_;
				NodeBorder* _tmp9_;
				NodeBorder* _tmp10_;
				ModeButtons* _tmp11_;
				NodeBorder* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				NodeBorder* _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				NodeBorder* _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = node_borders;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = node_borders;
				_tmp9_ = g_array_index (_tmp8_, NodeBorder*, (guint) i);
				_tmp10_ = _g_object_ref0 (_tmp9_);
				node_border = _tmp10_;
				_tmp11_ = self->priv->_node_borders;
				_tmp12_ = node_border;
				_tmp13_ = node_border_light_icon_name (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = node_border;
				_tmp16_ = node_border_dark_icon_name (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = node_border;
				_tmp19_ = node_border_display_name (_tmp18_);
				_tmp20_ = _tmp19_;
				mode_buttons_add_button (_tmp11_, _tmp14_, _tmp17_, _tmp20_);
				_g_free0 (_tmp20_);
				_g_free0 (_tmp17_);
				_g_free0 (_tmp14_);
				_g_object_unref0 (node_border);
			}
		}
	}
	_tmp21_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp21_);
	box = _tmp21_;
	_tmp22_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp22_);
	_tmp23_ = self->priv->_node_borders;
	gtk_box_append (box, (GtkWidget*) _tmp23_);
	result = box;
	_g_array_unref0 (node_borders);
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_set_node_border (StyleInspector* self,
                                 gint index)
{
	GArray* node_borders = NULL;
	Styles* _tmp0_;
	GArray* _tmp1_;
	GArray* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = style_inspector_styles;
	_tmp1_ = styles_get_node_borders (_tmp0_);
	node_borders = _tmp1_;
	_tmp2_ = node_borders;
	if (((guint) index) < _tmp2_->len) {
		Style* _tmp3_;
		GArray* _tmp4_;
		NodeBorder* _tmp5_;
		MindMap* _tmp6_;
		UndoBuffer* _tmp7_;
		UndoBuffer* _tmp8_;
		GArray* _tmp9_;
		NodeBorder* _tmp10_;
		MindMap* _tmp11_;
		UndoStyleNodeBorder* _tmp12_;
		UndoStyleNodeBorder* _tmp13_;
		_tmp3_ = self->priv->_curr_style;
		_tmp4_ = node_borders;
		_tmp5_ = g_array_index (_tmp4_, NodeBorder*, (guint) index);
		style_set_node_border (_tmp3_, _tmp5_);
		_tmp6_ = self->priv->_map;
		_tmp7_ = mind_map_get_undo_buffer (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = node_borders;
		_tmp10_ = g_array_index (_tmp9_, NodeBorder*, (guint) index);
		_tmp11_ = self->priv->_map;
		_tmp12_ = undo_style_node_border_new (self->priv->_affects, _tmp10_, _tmp11_);
		_tmp13_ = _tmp12_;
		undo_buffer_add_item (_tmp8_, (UndoItem*) _tmp13_);
		_g_object_unref0 (_tmp13_);
	}
	_g_array_unref0 (node_borders);
}

static gboolean
_style_inspector_node_borderwidth_changed_gtk_range_change_value (GtkRange* _sender,
                                                                  GtkScrollType scroll,
                                                                  gdouble new_value,
                                                                  gpointer self)
{
	gboolean result;
	result = style_inspector_node_borderwidth_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_node_borderwidth_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp9_;
	GtkBox* box = NULL;
	GtkBox* _tmp10_ = NULL;
	GtkLabel* _tmp11_;
	GtkScale* _tmp12_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Border Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 2, (gdouble) 8, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_borderwidth);
	self->priv->_node_borderwidth = _tmp1_;
	_tmp2_ = self->priv->_node_borderwidth;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	{
		gint i = 0;
		i = 2;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(i <= 8)) {
					break;
				}
				if ((i % 2) == 0) {
					GtkScale* _tmp5_;
					gchar* _tmp6_;
					gchar* _tmp7_;
					_tmp5_ = self->priv->_node_borderwidth;
					_tmp6_ = g_strdup_printf ("%d", i);
					_tmp7_ = _tmp6_;
					gtk_scale_add_mark (_tmp5_, (gdouble) i, GTK_POS_BOTTOM, _tmp7_);
					_g_free0 (_tmp7_);
				} else {
					GtkScale* _tmp8_;
					_tmp8_ = self->priv->_node_borderwidth;
					gtk_scale_add_mark (_tmp8_, (gdouble) i, GTK_POS_BOTTOM, NULL);
				}
			}
		}
	}
	_tmp9_ = self->priv->_node_borderwidth;
	g_signal_connect_object ((GtkRange*) _tmp9_, "change-value", (GCallback) _style_inspector_node_borderwidth_changed_gtk_range_change_value, self, 0);
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp10_, TRUE);
	g_object_ref_sink (_tmp10_);
	box = _tmp10_;
	_tmp11_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->_node_borderwidth;
	gtk_box_append (box, (GtkWidget*) _tmp12_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_node_borderwidth_changed (StyleInspector* self,
                                          GtkScrollType scroll,
                                          gdouble value)
{
	gint intval = 0;
	UndoStyleNodeBorderwidth* borderwidth = NULL;
	MindMap* _tmp0_;
	UndoStyleNodeBorderwidth* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_node_borderwidth_new (self->priv->_affects, intval, _tmp0_);
	borderwidth = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_node_borderwidth (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleNodeBorderwidth* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = borderwidth;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleNodeBorderwidth* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = borderwidth;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (borderwidth);
	return result;
}

static void
_style_inspector_node_fill_changed_g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	style_inspector_node_fill_changed ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_node_fill_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	gchar* _tmp1_;
	GtkSwitch* _tmp2_ = NULL;
	GtkSwitch* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_;
	GtkSwitch* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Color Fill"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = g_strdup (_ ("Fills the node with color when the node\n" \
"border is square, rounded or pill-shaped"));
	_tmp2_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->_node_fill);
	self->priv->_node_fill = _tmp2_;
	_tmp3_ = self->priv->_node_fill;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::active", (GCallback) _style_inspector_node_fill_changed_g_object_notify, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_node_fill;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_node_fill_changed (StyleInspector* self)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->_ignore) {
		gboolean val = FALSE;
		GtkSwitch* _tmp0_;
		Style* _tmp1_;
		MindMap* _tmp2_;
		UndoBuffer* _tmp3_;
		UndoBuffer* _tmp4_;
		MindMap* _tmp5_;
		UndoStyleNodeFill* _tmp6_;
		UndoStyleNodeFill* _tmp7_;
		_tmp0_ = self->priv->_node_fill;
		val = gtk_switch_get_active (_tmp0_);
		_tmp1_ = self->priv->_curr_style;
		style_set_node_fill (_tmp1_, &val);
		_tmp2_ = self->priv->_map;
		_tmp3_ = mind_map_get_undo_buffer (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_map;
		_tmp6_ = undo_style_node_fill_new (self->priv->_affects, val, _tmp5_);
		_tmp7_ = _tmp6_;
		undo_buffer_add_item (_tmp4_, (UndoItem*) _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static gboolean
_style_inspector_node_margin_changed_gtk_range_change_value (GtkRange* _sender,
                                                             GtkScrollType scroll,
                                                             gdouble new_value,
                                                             gpointer self)
{
	gboolean result;
	result = style_inspector_node_margin_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_node_margin_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Margin"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 1, (gdouble) 20, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_margin);
	self->priv->_node_margin = _tmp1_;
	_tmp2_ = self->priv->_node_margin;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_node_margin;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_node_margin_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_node_margin;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_node_margin_changed (StyleInspector* self,
                                     GtkScrollType scroll,
                                     gdouble value)
{
	gint intval = 0;
	UndoStyleNodeMargin* margin = NULL;
	MindMap* _tmp0_;
	UndoStyleNodeMargin* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 20) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_node_margin_new (self->priv->_affects, intval, _tmp0_);
	margin = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_node_margin (_tmp2_, intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleNodeMargin* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = margin;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleNodeMargin* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = margin;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (margin);
	return result;
}

static gboolean
_style_inspector_node_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                              GtkScrollType scroll,
                                                              gdouble new_value,
                                                              gpointer self)
{
	gboolean result;
	result = style_inspector_node_padding_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_node_padding_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Padding"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 5, (gdouble) 20, (gdouble) 2);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_padding);
	self->priv->_node_padding = _tmp1_;
	_tmp2_ = self->priv->_node_padding;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_node_padding;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_node_padding_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_node_padding;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_node_padding_changed (StyleInspector* self,
                                      GtkScrollType scroll,
                                      gdouble value)
{
	gint intval = 0;
	UndoStyleNodePadding* padding = NULL;
	MindMap* _tmp0_;
	UndoStyleNodePadding* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 20) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_node_padding_new (self->priv->_affects, intval, _tmp0_);
	padding = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_node_padding (_tmp2_, intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleNodePadding* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = padding;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleNodePadding* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = padding;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (padding);
	return result;
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

static gboolean
__lambda213_ (StyleInspector* self,
              GObject* obj)
{
	PangoFontFace* font_face = NULL;
	PangoFontFace* _tmp0_;
	PangoFontFace* _tmp1_;
	gboolean result;
	g_return_val_if_fail (obj != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (obj, pango_font_face_get_type ()) ? ((PangoFontFace*) obj) : NULL);
	font_face = _tmp0_;
	_tmp1_ = font_face;
	if (_tmp1_ != NULL) {
		PangoFontDescription* fd = NULL;
		PangoFontFace* _tmp2_;
		PangoFontDescription* _tmp3_;
		PangoWeight weight = 0;
		PangoFontDescription* _tmp4_;
		PangoStyle style = 0;
		PangoFontDescription* _tmp5_;
		gboolean _tmp6_ = FALSE;
		_tmp2_ = font_face;
		_tmp3_ = pango_font_face_describe (_tmp2_);
		fd = _tmp3_;
		_tmp4_ = fd;
		weight = pango_font_description_get_weight (_tmp4_);
		_tmp5_ = fd;
		style = pango_font_description_get_style (_tmp5_);
		if (weight == PANGO_WEIGHT_NORMAL) {
			_tmp6_ = style == PANGO_STYLE_NORMAL;
		} else {
			_tmp6_ = FALSE;
		}
		result = _tmp6_;
		__vala_PangoFontDescription_free0 (fd);
		_g_object_unref0 (font_face);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (font_face);
	return result;
}

static gboolean
___lambda213__gtk_custom_filter_func (GObject* item,
                                      gpointer self)
{
	gboolean result;
	result = __lambda213_ ((StyleInspector*) self, item);
	return result;
}

static void
__lambda214_ (StyleInspector* self)
{
	if (!self->priv->_ignore) {
		gchar* family = NULL;
		GtkFontDialogButton* _tmp0_;
		PangoFontDescription* _tmp1_;
		PangoFontDescription* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gint size = 0;
		GtkFontDialogButton* _tmp5_;
		PangoFontDescription* _tmp6_;
		PangoFontDescription* _tmp7_;
		Style* _tmp8_;
		GtkFontDialogButton* _tmp9_;
		PangoFontDescription* _tmp10_;
		PangoFontDescription* _tmp11_;
		PangoFontDescription* _tmp12_;
		PangoFontDescription* _tmp13_;
		MindMap* _tmp14_;
		UndoBuffer* _tmp15_;
		UndoBuffer* _tmp16_;
		const gchar* _tmp17_;
		MindMap* _tmp18_;
		UndoStyleNodeFont* _tmp19_;
		UndoStyleNodeFont* _tmp20_;
		_tmp0_ = self->priv->_node_font;
		_tmp1_ = gtk_font_dialog_button_get_font_desc (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = pango_font_description_get_family (_tmp2_);
		_tmp4_ = g_strdup (_tmp3_);
		family = _tmp4_;
		_tmp5_ = self->priv->_node_font;
		_tmp6_ = gtk_font_dialog_button_get_font_desc (_tmp5_);
		_tmp7_ = _tmp6_;
		size = pango_font_description_get_size (_tmp7_);
		_tmp8_ = self->priv->_curr_style;
		_tmp9_ = self->priv->_node_font;
		_tmp10_ = gtk_font_dialog_button_get_font_desc (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = pango_font_description_copy (_tmp11_);
		_tmp13_ = _tmp12_;
		style_set_node_font (_tmp8_, _tmp13_);
		__vala_PangoFontDescription_free0 (_tmp13_);
		_tmp14_ = self->priv->_map;
		_tmp15_ = mind_map_get_undo_buffer (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = family;
		_tmp18_ = self->priv->_map;
		_tmp19_ = undo_style_node_font_new (self->priv->_affects, _tmp17_, size, _tmp18_);
		_tmp20_ = _tmp19_;
		undo_buffer_add_item (_tmp16_, (UndoItem*) _tmp20_);
		_g_object_unref0 (_tmp20_);
		_g_free0 (family);
	}
}

static void
___lambda214__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda214_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_node_font_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkFontDialog* font_dialog = NULL;
	GtkFontDialog* _tmp1_;
	GtkFontDialog* _tmp2_;
	GtkFontDialogButton* _tmp3_ = NULL;
	GtkCustomFilter* font_filter = NULL;
	GtkCustomFilter* _tmp4_;
	GtkFontDialogButton* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkFontDialogButton* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Font"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = gtk_font_dialog_new ();
	font_dialog = _tmp1_;
	_tmp2_ = _g_object_ref0 (font_dialog);
	_tmp3_ = (GtkFontDialogButton*) gtk_font_dialog_button_new (_tmp2_);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_font_dialog_button_set_use_font (_tmp3_, TRUE);
	gtk_font_dialog_button_set_use_size (_tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_node_font);
	self->priv->_node_font = _tmp3_;
	_tmp4_ = gtk_custom_filter_new (___lambda213__gtk_custom_filter_func, g_object_ref (self), g_object_unref);
	font_filter = _tmp4_;
	gtk_font_dialog_set_filter (font_dialog, (GtkFilter*) font_filter);
	_tmp5_ = self->priv->_node_font;
	g_signal_connect_object ((GObject*) _tmp5_, "notify::font-desc", (GCallback) ___lambda214__g_object_notify, self, 0);
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_node_font;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (font_filter);
	_g_object_unref0 (font_dialog);
	_g_object_unref0 (lbl);
	return result;
}

static void
_style_inspector_set_node_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                           gint index,
                                                           gpointer self)
{
	style_inspector_set_node_text_align ((StyleInspector*) self, index);
}

static GtkBox*
style_inspector_create_node_text_align_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	ModeButtons* _tmp1_ = NULL;
	ModeButtons* _tmp2_;
	ModeButtons* _tmp3_;
	ModeButtons* _tmp4_;
	ModeButtons* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_;
	ModeButtons* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Text Alignment"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = mode_buttons_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_text_align);
	self->priv->_node_text_align = _tmp1_;
	_tmp2_ = self->priv->_node_text_align;
	g_signal_connect_object (_tmp2_, "changed", (GCallback) _style_inspector_set_node_text_align_mode_buttons_changed, self, 0);
	_tmp3_ = self->priv->_node_text_align;
	mode_buttons_add_button (_tmp3_, "format-justify-left-symbolic", NULL, _ ("Left"));
	_tmp4_ = self->priv->_node_text_align;
	mode_buttons_add_button (_tmp4_, "format-justify-center-symbolic", NULL, _ ("Center"));
	_tmp5_ = self->priv->_node_text_align;
	mode_buttons_add_button (_tmp5_, "format-justify-right-symbolic", NULL, _ ("Right"));
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_node_text_align;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

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

static gpointer
__pango_alignment_dup0 (gpointer self)
{
	return self ? _pango_alignment_dup (self) : NULL;
}

static void
style_inspector_set_node_text_align (StyleInspector* self,
                                     gint index)
{
	PangoAlignment* align = NULL;
	PangoAlignment* _tmp6_;
	g_return_if_fail (self != NULL);
	align = NULL;
	switch (index) {
		case 0:
		{
			PangoAlignment _tmp0_;
			PangoAlignment* _tmp1_;
			_tmp0_ = PANGO_ALIGN_LEFT;
			_tmp1_ = __pango_alignment_dup0 (&_tmp0_);
			_g_free0 (align);
			align = _tmp1_;
			break;
		}
		case 1:
		{
			PangoAlignment _tmp2_;
			PangoAlignment* _tmp3_;
			_tmp2_ = PANGO_ALIGN_CENTER;
			_tmp3_ = __pango_alignment_dup0 (&_tmp2_);
			_g_free0 (align);
			align = _tmp3_;
			break;
		}
		case 2:
		{
			PangoAlignment _tmp4_;
			PangoAlignment* _tmp5_;
			_tmp4_ = PANGO_ALIGN_RIGHT;
			_tmp5_ = __pango_alignment_dup0 (&_tmp4_);
			_g_free0 (align);
			align = _tmp5_;
			break;
		}
		default:
		break;
	}
	_tmp6_ = align;
	if (_tmp6_ != NULL) {
		Style* _tmp7_;
		PangoAlignment* _tmp8_;
		MindMap* _tmp9_;
		UndoBuffer* _tmp10_;
		UndoBuffer* _tmp11_;
		PangoAlignment* _tmp12_;
		MindMap* _tmp13_;
		UndoStyleNodeTextAlign* _tmp14_;
		UndoStyleNodeTextAlign* _tmp15_;
		_tmp7_ = self->priv->_curr_style;
		_tmp8_ = align;
		style_set_node_text_align (_tmp7_, _tmp8_);
		_tmp9_ = self->priv->_map;
		_tmp10_ = mind_map_get_undo_buffer (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = align;
		_tmp13_ = self->priv->_map;
		_tmp14_ = undo_style_node_text_align_new (self->priv->_affects, *_tmp12_, _tmp13_);
		_tmp15_ = _tmp14_;
		undo_buffer_add_item (_tmp11_, (UndoItem*) _tmp15_);
		_g_object_unref0 (_tmp15_);
	}
	_g_free0 (align);
}

static void
__lambda215_ (StyleInspector* self)
{
	if (!self->priv->_ignore) {
		gint width = 0;
		GtkSpinButton* _tmp0_;
		Style* _tmp1_;
		MindMap* _tmp2_;
		UndoBuffer* _tmp3_;
		UndoBuffer* _tmp4_;
		MindMap* _tmp5_;
		UndoStyleNodeWidth* _tmp6_;
		UndoStyleNodeWidth* _tmp7_;
		_tmp0_ = self->priv->_node_width;
		width = (gint) gtk_spin_button_get_value (_tmp0_);
		_tmp1_ = self->priv->_curr_style;
		style_set_node_width (_tmp1_, &width);
		_tmp2_ = self->priv->_map;
		_tmp3_ = mind_map_get_undo_buffer (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_map;
		_tmp6_ = undo_style_node_width_new (self->priv->_affects, width, _tmp5_);
		_tmp7_ = _tmp6_;
		undo_buffer_replace_item (_tmp4_, (UndoItem*) _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static void
___lambda215__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                             gpointer self)
{
	__lambda215_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_node_width_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSpinButton* _tmp1_ = NULL;
	GtkSpinButton* _tmp2_;
	GtkSpinButton* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkSpinButton* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 200, (gdouble) 1000, (gdouble) 100);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_width);
	self->priv->_node_width = _tmp1_;
	_tmp2_ = self->priv->_node_width;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_node_width;
	g_signal_connect_object (_tmp3_, "value-changed", (GCallback) ___lambda215__gtk_spin_button_value_changed, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_node_width;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
_style_inspector_node_markup_changed_g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self)
{
	style_inspector_node_markup_changed ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_node_markup_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSwitch* _tmp1_ = NULL;
	GtkSwitch* _tmp2_;
	GtkBox* box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkSwitch* _tmp4_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Enable Markup"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_node_markup);
	self->priv->_node_markup = _tmp1_;
	_tmp2_ = self->priv->_node_markup;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::active", (GCallback) _style_inspector_node_markup_changed_g_object_notify, self, 0);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp4_ = self->priv->_node_markup;
	gtk_box_append (box, (GtkWidget*) _tmp4_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_node_markup_changed (StyleInspector* self)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->_ignore) {
		gboolean val = FALSE;
		GtkSwitch* _tmp0_;
		MindMap* _tmp1_;
		UndoBuffer* _tmp2_;
		UndoBuffer* _tmp3_;
		MindMap* _tmp4_;
		UndoStyleNodeMarkup* _tmp5_;
		UndoStyleNodeMarkup* _tmp6_;
		_tmp0_ = self->priv->_node_markup;
		val = gtk_switch_get_active (_tmp0_);
		_tmp1_ = self->priv->_map;
		_tmp2_ = mind_map_get_undo_buffer (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = self->priv->_map;
		_tmp5_ = undo_style_node_markup_new (self->priv->_affects, val, _tmp4_);
		_tmp6_ = _tmp5_;
		undo_buffer_add_item (_tmp3_, (UndoItem*) _tmp6_);
		_g_object_unref0 (_tmp6_);
	}
}

static void
__lambda224_ (StyleInspector* self)
{
	GSettings* _tmp0_;
	GtkExpander* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->_settings;
	_tmp1_ = self->priv->_conn_exp;
	_tmp2_ = gtk_expander_get_expanded (_tmp1_);
	_tmp3_ = _tmp2_;
	g_settings_set_boolean (_tmp0_, "style-connection-options-expanded", !_tmp3_);
}

static void
___lambda224__gtk_expander_activate (GtkExpander* _sender,
                                     gpointer self)
{
	__lambda224_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_connection_ui (StyleInspector* self)
{
	GtkBox* conn_dash = NULL;
	GtkBox* _tmp0_;
	GtkBox* conn_arrow = NULL;
	GtkBox* _tmp1_;
	GtkBox* conn_arrow_size = NULL;
	GtkBox* _tmp2_;
	GtkBox* conn_lwidth = NULL;
	GtkBox* _tmp3_;
	GtkBox* conn_padding = NULL;
	GtkBox* _tmp4_;
	GtkBox* conn_font = NULL;
	GtkBox* _tmp5_;
	GtkBox* conn_text_align = NULL;
	GtkBox* _tmp6_;
	GtkBox* conn_twidth = NULL;
	GtkBox* _tmp7_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp8_ = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	GSettings* _tmp11_;
	GtkWidget* _tmp12_;
	GtkExpander* _tmp13_ = NULL;
	GtkExpander* _tmp14_;
	GtkExpander* _tmp15_;
	GtkSeparator* sep = NULL;
	GtkSeparator* _tmp16_;
	GtkBox* box = NULL;
	GtkBox* _tmp17_;
	GtkExpander* _tmp18_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = style_inspector_create_connection_dash_ui (self);
	conn_dash = _tmp0_;
	_tmp1_ = style_inspector_create_connection_arrow_ui (self);
	conn_arrow = _tmp1_;
	_tmp2_ = style_inspector_create_connection_arrow_size_ui (self);
	conn_arrow_size = _tmp2_;
	_tmp3_ = style_inspector_create_connection_line_width_ui (self);
	conn_lwidth = _tmp3_;
	_tmp4_ = style_inspector_create_connection_padding_ui (self);
	conn_padding = _tmp4_;
	_tmp5_ = style_inspector_create_connection_font_ui (self);
	conn_font = _tmp5_;
	_tmp6_ = style_inspector_create_connection_text_align_ui (self);
	conn_text_align = _tmp6_;
	_tmp7_ = style_inspector_create_connection_title_width_ui (self);
	conn_twidth = _tmp7_;
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_box_set_homogeneous (_tmp8_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp8_, 10);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp8_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 10);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, 10);
	g_object_ref_sink (_tmp8_);
	cbox = _tmp8_;
	gtk_box_append (cbox, (GtkWidget*) conn_dash);
	gtk_box_append (cbox, (GtkWidget*) conn_arrow);
	gtk_box_append (cbox, (GtkWidget*) conn_arrow_size);
	gtk_box_append (cbox, (GtkWidget*) conn_lwidth);
	gtk_box_append (cbox, (GtkWidget*) conn_padding);
	gtk_box_append (cbox, (GtkWidget*) conn_font);
	gtk_box_append (cbox, (GtkWidget*) conn_text_align);
	gtk_box_append (cbox, (GtkWidget*) conn_twidth);
	_tmp9_ = g_strconcat ("  ", _ ("Connection Options"), NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = self->priv->_settings;
	_tmp12_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp13_ = (GtkExpander*) gtk_expander_new (_tmp10_);
	gtk_expander_set_expanded (_tmp13_, g_settings_get_boolean (_tmp11_, "style-connection-options-expanded"));
	gtk_expander_set_child (_tmp13_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->_conn_exp);
	self->priv->_conn_exp = _tmp13_;
	_g_free0 (_tmp10_);
	_tmp14_ = self->priv->_conn_exp;
	gtk_widget_add_css_class ((GtkWidget*) _tmp14_, "titled");
	_tmp15_ = self->priv->_conn_exp;
	g_signal_connect_object (_tmp15_, "activate", (GCallback) ___lambda224__gtk_expander_activate, self, 0);
	_tmp16_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp16_);
	sep = _tmp16_;
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	g_object_ref_sink (_tmp17_);
	box = _tmp17_;
	_tmp18_ = self->priv->_conn_exp;
	gtk_box_append (box, (GtkWidget*) _tmp18_);
	gtk_box_append (box, (GtkWidget*) sep);
	result = box;
	_g_object_unref0 (sep);
	_g_object_unref0 (cbox);
	_g_object_unref0 (conn_twidth);
	_g_object_unref0 (conn_text_align);
	_g_object_unref0 (conn_font);
	_g_object_unref0 (conn_padding);
	_g_object_unref0 (conn_lwidth);
	_g_object_unref0 (conn_arrow_size);
	_g_object_unref0 (conn_arrow);
	_g_object_unref0 (conn_dash);
	return result;
}

static Block70Data*
block70_data_ref (Block70Data* _data70_)
{
	g_atomic_int_inc (&_data70_->_ref_count_);
	return _data70_;
}

static void
block70_data_unref (void * _userdata_)
{
	Block70Data* _data70_;
	_data70_ = (Block70Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data70_->_ref_count_)) {
		StyleInspector* self;
		self = _data70_->self;
		_g_array_unref0 (_data70_->dashes);
		_g_object_unref0 (self);
		g_slice_free (Block70Data, _data70_);
	}
}

static void
__lambda217_ (Block70Data* _data70_,
              gint index)
{
	StyleInspector* self;
	Style* _tmp0_;
	GArray* _tmp1_;
	LinkDash* _tmp2_;
	MindMap* _tmp3_;
	UndoBuffer* _tmp4_;
	UndoBuffer* _tmp5_;
	GArray* _tmp6_;
	LinkDash* _tmp7_;
	MindMap* _tmp8_;
	UndoStyleConnectionDash* _tmp9_;
	UndoStyleConnectionDash* _tmp10_;
	self = _data70_->self;
	_tmp0_ = self->priv->_curr_style;
	_tmp1_ = _data70_->dashes;
	_tmp2_ = g_array_index (_tmp1_, LinkDash*, (guint) index);
	style_set_connection_dash (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_map;
	_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _data70_->dashes;
	_tmp7_ = g_array_index (_tmp6_, LinkDash*, (guint) index);
	_tmp8_ = self->priv->_map;
	_tmp9_ = undo_style_connection_dash_new (self->priv->_affects, _tmp7_, _tmp8_);
	_tmp10_ = _tmp9_;
	undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp10_);
	_g_object_unref0 (_tmp10_);
}

static void
___lambda217__image_menu_changed (ImageMenu* _sender,
                                  gint index,
                                  gpointer self)
{
	__lambda217_ (self, index);
}

static void
__lambda218_ (StyleInspector* self)
{
	ImageMenu* _tmp0_;
	_tmp0_ = self->priv->_conn_dash;
	g_signal_emit_by_name (_tmp0_, "update-icons");
}

static void
___lambda218__style_inspector_update_icons (StyleInspector* _sender,
                                            gpointer self)
{
	__lambda218_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_connection_dash_ui (StyleInspector* self)
{
	Block70Data* _data70_;
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	Styles* _tmp1_;
	GArray* _tmp2_;
	ImageMenu* _tmp3_ = NULL;
	ImageMenu* _tmp4_;
	GtkBox* box = NULL;
	GtkBox* _tmp18_ = NULL;
	GtkLabel* _tmp19_;
	ImageMenu* _tmp20_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data70_ = g_slice_new0 (Block70Data);
	_data70_->_ref_count_ = 1;
	_data70_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Line Dash"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = style_inspector_styles;
	_tmp2_ = styles_get_link_dashes (_tmp1_);
	_data70_->dashes = _tmp2_;
	_tmp3_ = image_menu_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_conn_dash);
	self->priv->_conn_dash = _tmp3_;
	_tmp4_ = self->priv->_conn_dash;
	g_signal_connect_data (_tmp4_, "changed", (GCallback) ___lambda217__image_menu_changed, block70_data_ref (_data70_), (GClosureNotify) block70_data_unref, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda218__style_inspector_update_icons, self, 0);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GArray* _tmp7_;
				LinkDash* dash = NULL;
				GArray* _tmp8_;
				LinkDash* _tmp9_;
				LinkDash* _tmp10_;
				ImageMenu* _tmp11_;
				LinkDash* _tmp12_;
				GdkPaintable* _tmp13_;
				GdkPaintable* _tmp14_;
				LinkDash* _tmp15_;
				GdkPaintable* _tmp16_;
				GdkPaintable* _tmp17_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = _data70_->dashes;
				if (!(((guint) i) < _tmp7_->len)) {
					break;
				}
				_tmp8_ = _data70_->dashes;
				_tmp9_ = g_array_index (_tmp8_, LinkDash*, (guint) i);
				_tmp10_ = _g_object_ref0 (_tmp9_);
				dash = _tmp10_;
				_tmp11_ = self->priv->_conn_dash;
				_tmp12_ = dash;
				_tmp13_ = link_dash_make_icon (_tmp12_, FALSE);
				_tmp14_ = _tmp13_;
				_tmp15_ = dash;
				_tmp16_ = link_dash_make_icon (_tmp15_, TRUE);
				_tmp17_ = _tmp16_;
				image_menu_add_image (_tmp11_, _tmp14_, _tmp17_);
				_g_object_unref0 (_tmp17_);
				_g_object_unref0 (_tmp14_);
				_g_object_unref0 (dash);
			}
		}
	}
	_tmp18_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp18_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp18_, TRUE);
	g_object_ref_sink (_tmp18_);
	box = _tmp18_;
	_tmp19_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->_conn_dash;
	gtk_box_append (box, (GtkWidget*) _tmp20_);
	result = box;
	_g_object_unref0 (lbl);
	block70_data_unref (_data70_);
	_data70_ = NULL;
	return result;
}

static Block71Data*
block71_data_ref (Block71Data* _data71_)
{
	g_atomic_int_inc (&_data71_->_ref_count_);
	return _data71_;
}

static void
block71_data_unref (void * _userdata_)
{
	Block71Data* _data71_;
	_data71_ = (Block71Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data71_->_ref_count_)) {
		StyleInspector* self;
		self = _data71_->self;
		_vala_array_destroy (_data71_->arrows, 4, (GDestroyNotify) g_free);
		_g_object_unref0 (self);
		g_slice_free (Block71Data, _data71_);
	}
}

static void
__lambda219_ (Block71Data* _data71_,
              gint index)
{
	StyleInspector* self;
	Style* _tmp0_;
	const gchar* _tmp1_;
	MindMap* _tmp2_;
	UndoBuffer* _tmp3_;
	UndoBuffer* _tmp4_;
	const gchar* _tmp5_;
	MindMap* _tmp6_;
	UndoStyleConnectionArrow* _tmp7_;
	UndoStyleConnectionArrow* _tmp8_;
	self = _data71_->self;
	_tmp0_ = self->priv->_curr_style;
	_tmp1_ = _data71_->arrows[index];
	style_set_connection_arrow (_tmp0_, _tmp1_);
	_tmp2_ = self->priv->_map;
	_tmp3_ = mind_map_get_undo_buffer (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _data71_->arrows[index];
	_tmp6_ = self->priv->_map;
	_tmp7_ = undo_style_connection_arrow_new (self->priv->_affects, _tmp5_, _tmp6_);
	_tmp8_ = _tmp7_;
	undo_buffer_add_item (_tmp4_, (UndoItem*) _tmp8_);
	_g_object_unref0 (_tmp8_);
}

static void
___lambda219__image_menu_changed (ImageMenu* _sender,
                                  gint index,
                                  gpointer self)
{
	__lambda219_ (self, index);
}

static void
__lambda220_ (StyleInspector* self)
{
	ImageMenu* _tmp0_;
	_tmp0_ = self->priv->_conn_arrow;
	g_signal_emit_by_name (_tmp0_, "update-icons");
}

static void
___lambda220__style_inspector_update_icons (StyleInspector* _sender,
                                            gpointer self)
{
	__lambda220_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_connection_arrow_ui (StyleInspector* self)
{
	Block71Data* _data71_;
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_[4] = {0};
	ImageMenu* _tmp6_ = NULL;
	ImageMenu* _tmp7_;
	GtkBox* box = NULL;
	GtkBox* _tmp16_ = NULL;
	GtkLabel* _tmp17_;
	ImageMenu* _tmp18_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data71_ = g_slice_new0 (Block71Data);
	_data71_->_ref_count_ = 1;
	_data71_->self = g_object_ref (self);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Arrows"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = g_strdup ("none");
	_tmp2_ = g_strdup ("fromto");
	_tmp3_ = g_strdup ("tofrom");
	_tmp4_ = g_strdup ("both");
	_tmp5_[0] = _tmp1_;
	_tmp5_[1] = _tmp2_;
	_tmp5_[2] = _tmp3_;
	_tmp5_[3] = _tmp4_;
	memcpy (_data71_->arrows, _tmp5_, 4 * sizeof (gchar*));
	_tmp6_ = image_menu_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->_conn_arrow);
	self->priv->_conn_arrow = _tmp6_;
	_tmp7_ = self->priv->_conn_arrow;
	g_signal_connect_data (_tmp7_, "changed", (GCallback) ___lambda219__image_menu_changed, block71_data_ref (_data71_), (GClosureNotify) block71_data_unref, 0);
	g_signal_connect_object (self, "update-icons", (GCallback) ___lambda220__style_inspector_update_icons, self, 0);
	{
		gchar** arrow_collection = NULL;
		gint arrow_collection_length1 = 0;
		gint _arrow_collection_size_ = 0;
		gint arrow_it = 0;
		arrow_collection = _data71_->arrows;
		arrow_collection_length1 = 4;
		for (arrow_it = 0; arrow_it < arrow_collection_length1; arrow_it = arrow_it + 1) {
			gchar* _tmp8_;
			gchar* arrow = NULL;
			_tmp8_ = g_strdup (arrow_collection[arrow_it]);
			arrow = _tmp8_;
			{
				ImageMenu* _tmp9_;
				const gchar* _tmp10_;
				GdkPaintable* _tmp11_;
				GdkPaintable* _tmp12_;
				const gchar* _tmp13_;
				GdkPaintable* _tmp14_;
				GdkPaintable* _tmp15_;
				_tmp9_ = self->priv->_conn_arrow;
				_tmp10_ = arrow;
				_tmp11_ = connection_make_arrow_icon (_tmp10_, FALSE);
				_tmp12_ = _tmp11_;
				_tmp13_ = arrow;
				_tmp14_ = connection_make_arrow_icon (_tmp13_, TRUE);
				_tmp15_ = _tmp14_;
				image_menu_add_image (_tmp9_, _tmp12_, _tmp15_);
				_g_object_unref0 (_tmp15_);
				_g_object_unref0 (_tmp12_);
				_g_free0 (arrow);
			}
		}
	}
	_tmp16_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp16_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp16_, TRUE);
	g_object_ref_sink (_tmp16_);
	box = _tmp16_;
	_tmp17_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->_conn_arrow;
	gtk_box_append (box, (GtkWidget*) _tmp18_);
	result = box;
	_g_object_unref0 (lbl);
	block71_data_unref (_data71_);
	_data71_ = NULL;
	return result;
}

static gboolean
_style_inspector_connection_arrow_size_changed_gtk_range_change_value (GtkRange* _sender,
                                                                       GtkScrollType scroll,
                                                                       gdouble new_value,
                                                                       gpointer self)
{
	gboolean result;
	result = style_inspector_connection_arrow_size_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_connection_arrow_size_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkScale* _tmp4_;
	GtkScale* _tmp5_;
	GtkScale* _tmp6_;
	GtkScale* _tmp7_;
	GtkBox* box = NULL;
	GtkBox* _tmp8_ = NULL;
	GtkScale* _tmp9_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Arrow Size"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 0, (gdouble) 3, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_conn_arrow_size);
	self->priv->_conn_arrow_size = _tmp1_;
	_tmp2_ = self->priv->_conn_arrow_size;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_conn_arrow_size;
	gtk_scale_add_mark (_tmp3_, (gdouble) 0, GTK_POS_BOTTOM, "S");
	_tmp4_ = self->priv->_conn_arrow_size;
	gtk_scale_add_mark (_tmp4_, (gdouble) 1, GTK_POS_BOTTOM, "M");
	_tmp5_ = self->priv->_conn_arrow_size;
	gtk_scale_add_mark (_tmp5_, (gdouble) 2, GTK_POS_BOTTOM, "L");
	_tmp6_ = self->priv->_conn_arrow_size;
	gtk_scale_add_mark (_tmp6_, (gdouble) 3, GTK_POS_BOTTOM, "XL");
	_tmp7_ = self->priv->_conn_arrow_size;
	g_signal_connect_object ((GtkRange*) _tmp7_, "change-value", (GCallback) _style_inspector_connection_arrow_size_changed_gtk_range_change_value, self, 0);
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_box_set_homogeneous (_tmp8_, TRUE);
	g_object_ref_sink (_tmp8_);
	box = _tmp8_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp9_ = self->priv->_conn_arrow_size;
	gtk_box_append (box, (GtkWidget*) _tmp9_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_connection_arrow_size_changed (StyleInspector* self,
                                               GtkScrollType scroll,
                                               gdouble value)
{
	gint int_value = 0;
	UndoStyleConnectionArrowSize* conn_arrow_size = NULL;
	MindMap* _tmp0_;
	UndoStyleConnectionArrowSize* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (value > ((gdouble) 3)) {
		value = (gdouble) 3;
	}
	int_value = (gint) value;
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_connection_arrow_size_new (self->priv->_affects, int_value, _tmp0_);
	conn_arrow_size = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_connection_arrow_size (_tmp2_, &int_value);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleConnectionArrowSize* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = conn_arrow_size;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleConnectionArrowSize* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = conn_arrow_size;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (conn_arrow_size);
	return result;
}

static gboolean
_style_inspector_connection_line_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                                       GtkScrollType scroll,
                                                                       gdouble new_value,
                                                                       gpointer self)
{
	gboolean result;
	result = style_inspector_connection_line_width_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_connection_line_width_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp9_;
	GtkBox* box = NULL;
	GtkBox* _tmp10_ = NULL;
	GtkLabel* _tmp11_;
	GtkScale* _tmp12_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Line Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 1, (gdouble) 8, (gdouble) 1);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, FALSE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_conn_lwidth);
	self->priv->_conn_lwidth = _tmp1_;
	_tmp2_ = self->priv->_conn_lwidth;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	{
		gint i = 0;
		i = 2;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(i <= 8)) {
					break;
				}
				if ((i % 2) == 0) {
					GtkScale* _tmp5_;
					gchar* _tmp6_;
					gchar* _tmp7_;
					_tmp5_ = self->priv->_conn_lwidth;
					_tmp6_ = g_strdup_printf ("%d", i);
					_tmp7_ = _tmp6_;
					gtk_scale_add_mark (_tmp5_, (gdouble) i, GTK_POS_BOTTOM, _tmp7_);
					_g_free0 (_tmp7_);
				} else {
					GtkScale* _tmp8_;
					_tmp8_ = self->priv->_conn_lwidth;
					gtk_scale_add_mark (_tmp8_, (gdouble) i, GTK_POS_BOTTOM, NULL);
				}
			}
		}
	}
	_tmp9_ = self->priv->_conn_lwidth;
	g_signal_connect_object ((GtkRange*) _tmp9_, "change-value", (GCallback) _style_inspector_connection_line_width_changed_gtk_range_change_value, self, 0);
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp10_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp10_, TRUE);
	g_object_ref_sink (_tmp10_);
	box = _tmp10_;
	_tmp11_ = lbl;
	gtk_box_append (box, (GtkWidget*) _tmp11_);
	_tmp12_ = self->priv->_conn_lwidth;
	gtk_box_append (box, (GtkWidget*) _tmp12_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_connection_line_width_changed (StyleInspector* self,
                                               GtkScrollType scroll,
                                               gdouble value)
{
	gint intval = 0;
	UndoStyleConnectionLineWidth* width = NULL;
	MindMap* _tmp0_;
	UndoStyleConnectionLineWidth* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 8) {
		intval = 8;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_connection_line_width_new (self->priv->_affects, intval, _tmp0_);
	width = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_connection_line_width (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleConnectionLineWidth* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = width;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleConnectionLineWidth* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = width;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (width);
	return result;
}

static gboolean
_style_inspector_connection_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                                    GtkScrollType scroll,
                                                                    gdouble new_value,
                                                                    gpointer self)
{
	gboolean result;
	result = style_inspector_connection_padding_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_connection_padding_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Padding"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 2, (gdouble) 10, (gdouble) 2);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_conn_padding);
	self->priv->_conn_padding = _tmp1_;
	_tmp2_ = self->priv->_conn_padding;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_conn_padding;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_connection_padding_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_conn_padding;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_connection_padding_changed (StyleInspector* self,
                                            GtkScrollType scroll,
                                            gdouble value)
{
	gint intval = 0;
	UndoStyleConnectionPadding* padding = NULL;
	MindMap* _tmp0_;
	UndoStyleConnectionPadding* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 20) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_connection_padding_new (self->priv->_affects, intval, _tmp0_);
	padding = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_connection_padding (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleConnectionPadding* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = padding;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleConnectionPadding* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = padding;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (padding);
	return result;
}

static gboolean
__lambda221_ (StyleInspector* self,
              GObject* obj)
{
	PangoFontFace* font_face = NULL;
	PangoFontFace* _tmp0_;
	PangoFontFace* _tmp1_;
	gboolean result;
	g_return_val_if_fail (obj != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (obj, pango_font_face_get_type ()) ? ((PangoFontFace*) obj) : NULL);
	font_face = _tmp0_;
	_tmp1_ = font_face;
	if (_tmp1_ != NULL) {
		PangoFontDescription* fd = NULL;
		PangoFontFace* _tmp2_;
		PangoFontDescription* _tmp3_;
		PangoWeight weight = 0;
		PangoFontDescription* _tmp4_;
		PangoStyle style = 0;
		PangoFontDescription* _tmp5_;
		gboolean _tmp6_ = FALSE;
		_tmp2_ = font_face;
		_tmp3_ = pango_font_face_describe (_tmp2_);
		fd = _tmp3_;
		_tmp4_ = fd;
		weight = pango_font_description_get_weight (_tmp4_);
		_tmp5_ = fd;
		style = pango_font_description_get_style (_tmp5_);
		if (weight == PANGO_WEIGHT_NORMAL) {
			_tmp6_ = style == PANGO_STYLE_NORMAL;
		} else {
			_tmp6_ = FALSE;
		}
		result = _tmp6_;
		__vala_PangoFontDescription_free0 (fd);
		_g_object_unref0 (font_face);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (font_face);
	return result;
}

static gboolean
___lambda221__gtk_custom_filter_func (GObject* item,
                                      gpointer self)
{
	gboolean result;
	result = __lambda221_ ((StyleInspector*) self, item);
	return result;
}

static void
__lambda222_ (StyleInspector* self)
{
	if (!self->priv->_ignore) {
		gchar* family = NULL;
		GtkFontDialogButton* _tmp0_;
		PangoFontDescription* _tmp1_;
		PangoFontDescription* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gint size = 0;
		GtkFontDialogButton* _tmp5_;
		PangoFontDescription* _tmp6_;
		PangoFontDescription* _tmp7_;
		Style* _tmp8_;
		GtkFontDialogButton* _tmp9_;
		PangoFontDescription* _tmp10_;
		PangoFontDescription* _tmp11_;
		PangoFontDescription* _tmp12_;
		PangoFontDescription* _tmp13_;
		MindMap* _tmp14_;
		UndoBuffer* _tmp15_;
		UndoBuffer* _tmp16_;
		const gchar* _tmp17_;
		MindMap* _tmp18_;
		UndoStyleConnectionFont* _tmp19_;
		UndoStyleConnectionFont* _tmp20_;
		_tmp0_ = self->priv->_conn_font;
		_tmp1_ = gtk_font_dialog_button_get_font_desc (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = pango_font_description_get_family (_tmp2_);
		_tmp4_ = g_strdup (_tmp3_);
		family = _tmp4_;
		_tmp5_ = self->priv->_conn_font;
		_tmp6_ = gtk_font_dialog_button_get_font_desc (_tmp5_);
		_tmp7_ = _tmp6_;
		size = pango_font_description_get_size (_tmp7_);
		_tmp8_ = self->priv->_curr_style;
		_tmp9_ = self->priv->_conn_font;
		_tmp10_ = gtk_font_dialog_button_get_font_desc (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = pango_font_description_copy (_tmp11_);
		_tmp13_ = _tmp12_;
		style_set_connection_font (_tmp8_, _tmp13_);
		__vala_PangoFontDescription_free0 (_tmp13_);
		_tmp14_ = self->priv->_map;
		_tmp15_ = mind_map_get_undo_buffer (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = family;
		_tmp18_ = self->priv->_map;
		_tmp19_ = undo_style_connection_font_new (self->priv->_affects, _tmp17_, size, _tmp18_);
		_tmp20_ = _tmp19_;
		undo_buffer_add_item (_tmp16_, (UndoItem*) _tmp20_);
		_g_object_unref0 (_tmp20_);
		_g_free0 (family);
	}
}

static void
___lambda222__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda222_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_connection_font_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkFontDialog* font_dialog = NULL;
	GtkFontDialog* _tmp1_;
	GtkFontDialog* _tmp2_;
	GtkFontDialogButton* _tmp3_ = NULL;
	GtkCustomFilter* font_filter = NULL;
	GtkCustomFilter* _tmp4_;
	GtkFontDialogButton* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkFontDialogButton* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Title Font"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = gtk_font_dialog_new ();
	font_dialog = _tmp1_;
	_tmp2_ = _g_object_ref0 (font_dialog);
	_tmp3_ = (GtkFontDialogButton*) gtk_font_dialog_button_new (_tmp2_);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_font_dialog_button_set_use_font (_tmp3_, TRUE);
	gtk_font_dialog_button_set_use_size (_tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_conn_font);
	self->priv->_conn_font = _tmp3_;
	_tmp4_ = gtk_custom_filter_new (___lambda221__gtk_custom_filter_func, g_object_ref (self), g_object_unref);
	font_filter = _tmp4_;
	gtk_font_dialog_set_filter (font_dialog, (GtkFilter*) font_filter);
	_tmp5_ = self->priv->_conn_font;
	g_signal_connect_object ((GObject*) _tmp5_, "notify::font-desc", (GCallback) ___lambda222__g_object_notify, self, 0);
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_conn_font;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (font_filter);
	_g_object_unref0 (font_dialog);
	_g_object_unref0 (lbl);
	return result;
}

static void
_style_inspector_set_connection_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                                 gint index,
                                                                 gpointer self)
{
	style_inspector_set_connection_text_align ((StyleInspector*) self, index);
}

static GtkBox*
style_inspector_create_connection_text_align_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	ModeButtons* _tmp1_ = NULL;
	ModeButtons* _tmp2_;
	ModeButtons* _tmp3_;
	ModeButtons* _tmp4_;
	ModeButtons* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_;
	ModeButtons* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Text Alignment"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = mode_buttons_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_conn_text_align);
	self->priv->_conn_text_align = _tmp1_;
	_tmp2_ = self->priv->_conn_text_align;
	g_signal_connect_object (_tmp2_, "changed", (GCallback) _style_inspector_set_connection_text_align_mode_buttons_changed, self, 0);
	_tmp3_ = self->priv->_conn_text_align;
	mode_buttons_add_button (_tmp3_, "format-justify-left-symbolic", NULL, _ ("Left"));
	_tmp4_ = self->priv->_conn_text_align;
	mode_buttons_add_button (_tmp4_, "format-justify-center-symbolic", NULL, _ ("Center"));
	_tmp5_ = self->priv->_conn_text_align;
	mode_buttons_add_button (_tmp5_, "format-justify-right-symbolic", NULL, _ ("Right"));
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_conn_text_align;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_set_connection_text_align (StyleInspector* self,
                                           gint index)
{
	PangoAlignment* align = NULL;
	PangoAlignment* _tmp6_;
	g_return_if_fail (self != NULL);
	align = NULL;
	switch (index) {
		case 0:
		{
			PangoAlignment _tmp0_;
			PangoAlignment* _tmp1_;
			_tmp0_ = PANGO_ALIGN_LEFT;
			_tmp1_ = __pango_alignment_dup0 (&_tmp0_);
			_g_free0 (align);
			align = _tmp1_;
			break;
		}
		case 1:
		{
			PangoAlignment _tmp2_;
			PangoAlignment* _tmp3_;
			_tmp2_ = PANGO_ALIGN_CENTER;
			_tmp3_ = __pango_alignment_dup0 (&_tmp2_);
			_g_free0 (align);
			align = _tmp3_;
			break;
		}
		case 2:
		{
			PangoAlignment _tmp4_;
			PangoAlignment* _tmp5_;
			_tmp4_ = PANGO_ALIGN_RIGHT;
			_tmp5_ = __pango_alignment_dup0 (&_tmp4_);
			_g_free0 (align);
			align = _tmp5_;
			break;
		}
		default:
		break;
	}
	_tmp6_ = align;
	if (_tmp6_ != NULL) {
		Style* _tmp7_;
		PangoAlignment* _tmp8_;
		MindMap* _tmp9_;
		UndoBuffer* _tmp10_;
		UndoBuffer* _tmp11_;
		PangoAlignment* _tmp12_;
		MindMap* _tmp13_;
		UndoStyleConnectionTextAlign* _tmp14_;
		UndoStyleConnectionTextAlign* _tmp15_;
		_tmp7_ = self->priv->_curr_style;
		_tmp8_ = align;
		style_set_connection_text_align (_tmp7_, _tmp8_);
		_tmp9_ = self->priv->_map;
		_tmp10_ = mind_map_get_undo_buffer (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = align;
		_tmp13_ = self->priv->_map;
		_tmp14_ = undo_style_connection_text_align_new (self->priv->_affects, *_tmp12_, _tmp13_);
		_tmp15_ = _tmp14_;
		undo_buffer_add_item (_tmp11_, (UndoItem*) _tmp15_);
		_g_object_unref0 (_tmp15_);
	}
	_g_free0 (align);
}

static void
__lambda223_ (StyleInspector* self)
{
	if (!self->priv->_ignore) {
		gint width = 0;
		GtkSpinButton* _tmp0_;
		Style* _tmp1_;
		MindMap* _tmp2_;
		UndoBuffer* _tmp3_;
		UndoBuffer* _tmp4_;
		MindMap* _tmp5_;
		UndoStyleConnectionTitleWidth* _tmp6_;
		UndoStyleConnectionTitleWidth* _tmp7_;
		_tmp0_ = self->priv->_conn_twidth;
		width = (gint) gtk_spin_button_get_value (_tmp0_);
		_tmp1_ = self->priv->_curr_style;
		style_set_connection_title_width (_tmp1_, &width);
		_tmp2_ = self->priv->_map;
		_tmp3_ = mind_map_get_undo_buffer (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_map;
		_tmp6_ = undo_style_connection_title_width_new (self->priv->_affects, width, _tmp5_);
		_tmp7_ = _tmp6_;
		undo_buffer_replace_item (_tmp4_, (UndoItem*) _tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static void
___lambda223__gtk_spin_button_value_changed (GtkSpinButton* _sender,
                                             gpointer self)
{
	__lambda223_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_connection_title_width_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkSpinButton* _tmp1_ = NULL;
	GtkSpinButton* _tmp2_;
	GtkSpinButton* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkSpinButton* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Title Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 100, (gdouble) 400, (gdouble) 50);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_conn_twidth);
	self->priv->_conn_twidth = _tmp1_;
	_tmp2_ = self->priv->_conn_twidth;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_conn_twidth;
	g_signal_connect_object (_tmp3_, "value-changed", (GCallback) ___lambda223__gtk_spin_button_value_changed, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_conn_twidth;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
__lambda227_ (StyleInspector* self)
{
	GSettings* _tmp0_;
	GtkExpander* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->_settings;
	_tmp1_ = self->priv->_callout_exp;
	_tmp2_ = gtk_expander_get_expanded (_tmp1_);
	_tmp3_ = _tmp2_;
	g_settings_set_boolean (_tmp0_, "style-callout-options-expanded", !_tmp3_);
}

static void
___lambda227__gtk_expander_activate (GtkExpander* _sender,
                                     gpointer self)
{
	__lambda227_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_callout_ui (StyleInspector* self)
{
	GtkBox* callout_font = NULL;
	GtkBox* _tmp0_;
	GtkBox* callout_text_align = NULL;
	GtkBox* _tmp1_;
	GtkBox* callout_padding = NULL;
	GtkBox* _tmp2_;
	GtkBox* callout_pwidth = NULL;
	GtkBox* _tmp3_;
	GtkBox* callout_plength = NULL;
	GtkBox* _tmp4_;
	GtkBox* cbox = NULL;
	GtkBox* _tmp5_ = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GSettings* _tmp8_;
	GtkWidget* _tmp9_;
	GtkExpander* _tmp10_ = NULL;
	GtkExpander* _tmp11_;
	GtkExpander* _tmp12_;
	GtkSeparator* sep = NULL;
	GtkSeparator* _tmp13_;
	GtkBox* box = NULL;
	GtkBox* _tmp14_;
	GtkExpander* _tmp15_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = style_inspector_create_callout_font_ui (self);
	callout_font = _tmp0_;
	_tmp1_ = style_inspector_create_callout_text_align_ui (self);
	callout_text_align = _tmp1_;
	_tmp2_ = style_inspector_create_callout_padding_ui (self);
	callout_padding = _tmp2_;
	_tmp3_ = style_inspector_create_callout_pointer_width_ui (self);
	callout_pwidth = _tmp3_;
	_tmp4_ = style_inspector_create_callout_pointer_length_ui (self);
	callout_plength = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_box_set_homogeneous (_tmp5_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp5_, 10);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp5_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp5_, 10);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp5_, 10);
	g_object_ref_sink (_tmp5_);
	cbox = _tmp5_;
	gtk_box_append (cbox, (GtkWidget*) callout_font);
	gtk_box_append (cbox, (GtkWidget*) callout_text_align);
	gtk_box_append (cbox, (GtkWidget*) callout_padding);
	gtk_box_append (cbox, (GtkWidget*) callout_pwidth);
	gtk_box_append (cbox, (GtkWidget*) callout_plength);
	_tmp6_ = g_strconcat ("  ", _ ("Callout Options"), NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_settings;
	_tmp9_ = _g_object_ref0 ((GtkWidget*) cbox);
	_tmp10_ = (GtkExpander*) gtk_expander_new (_tmp7_);
	gtk_expander_set_use_markup (_tmp10_, TRUE);
	gtk_expander_set_expanded (_tmp10_, g_settings_get_boolean (_tmp8_, "style-callout-options-expanded"));
	gtk_expander_set_child (_tmp10_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->_callout_exp);
	self->priv->_callout_exp = _tmp10_;
	_g_free0 (_tmp7_);
	_tmp11_ = self->priv->_callout_exp;
	gtk_widget_add_css_class ((GtkWidget*) _tmp11_, "titled");
	_tmp12_ = self->priv->_callout_exp;
	g_signal_connect_object (_tmp12_, "activate", (GCallback) ___lambda227__gtk_expander_activate, self, 0);
	_tmp13_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp13_);
	sep = _tmp13_;
	_tmp14_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
	g_object_ref_sink (_tmp14_);
	box = _tmp14_;
	_tmp15_ = self->priv->_callout_exp;
	gtk_box_append (box, (GtkWidget*) _tmp15_);
	gtk_box_append (box, (GtkWidget*) sep);
	result = box;
	_g_object_unref0 (sep);
	_g_object_unref0 (cbox);
	_g_object_unref0 (callout_plength);
	_g_object_unref0 (callout_pwidth);
	_g_object_unref0 (callout_padding);
	_g_object_unref0 (callout_text_align);
	_g_object_unref0 (callout_font);
	return result;
}

static gboolean
__lambda225_ (StyleInspector* self,
              GObject* obj)
{
	PangoFontFace* font_face = NULL;
	PangoFontFace* _tmp0_;
	PangoFontFace* _tmp1_;
	gboolean result;
	g_return_val_if_fail (obj != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (obj, pango_font_face_get_type ()) ? ((PangoFontFace*) obj) : NULL);
	font_face = _tmp0_;
	_tmp1_ = font_face;
	if (_tmp1_ != NULL) {
		PangoFontDescription* fd = NULL;
		PangoFontFace* _tmp2_;
		PangoFontDescription* _tmp3_;
		PangoWeight weight = 0;
		PangoFontDescription* _tmp4_;
		PangoStyle style = 0;
		PangoFontDescription* _tmp5_;
		gboolean _tmp6_ = FALSE;
		_tmp2_ = font_face;
		_tmp3_ = pango_font_face_describe (_tmp2_);
		fd = _tmp3_;
		_tmp4_ = fd;
		weight = pango_font_description_get_weight (_tmp4_);
		_tmp5_ = fd;
		style = pango_font_description_get_style (_tmp5_);
		if (weight == PANGO_WEIGHT_NORMAL) {
			_tmp6_ = style == PANGO_STYLE_NORMAL;
		} else {
			_tmp6_ = FALSE;
		}
		result = _tmp6_;
		__vala_PangoFontDescription_free0 (fd);
		_g_object_unref0 (font_face);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (font_face);
	return result;
}

static gboolean
___lambda225__gtk_custom_filter_func (GObject* item,
                                      gpointer self)
{
	gboolean result;
	result = __lambda225_ ((StyleInspector*) self, item);
	return result;
}

static void
__lambda226_ (StyleInspector* self)
{
	if (!self->priv->_ignore) {
		gchar* family = NULL;
		GtkFontDialogButton* _tmp0_;
		PangoFontDescription* _tmp1_;
		PangoFontDescription* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gint size = 0;
		GtkFontDialogButton* _tmp5_;
		PangoFontDescription* _tmp6_;
		PangoFontDescription* _tmp7_;
		Style* _tmp8_;
		GtkFontDialogButton* _tmp9_;
		PangoFontDescription* _tmp10_;
		PangoFontDescription* _tmp11_;
		PangoFontDescription* _tmp12_;
		PangoFontDescription* _tmp13_;
		MindMap* _tmp14_;
		const gchar* _tmp15_;
		MindMap* _tmp16_;
		UndoStyleCalloutFont* _tmp17_;
		UndoStyleCalloutFont* _tmp18_;
		_tmp0_ = self->priv->_callout_font;
		_tmp1_ = gtk_font_dialog_button_get_font_desc (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = pango_font_description_get_family (_tmp2_);
		_tmp4_ = g_strdup (_tmp3_);
		family = _tmp4_;
		_tmp5_ = self->priv->_callout_font;
		_tmp6_ = gtk_font_dialog_button_get_font_desc (_tmp5_);
		_tmp7_ = _tmp6_;
		size = pango_font_description_get_size (_tmp7_);
		_tmp8_ = self->priv->_curr_style;
		_tmp9_ = self->priv->_callout_font;
		_tmp10_ = gtk_font_dialog_button_get_font_desc (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = pango_font_description_copy (_tmp11_);
		_tmp13_ = _tmp12_;
		style_set_callout_font (_tmp8_, _tmp13_);
		__vala_PangoFontDescription_free0 (_tmp13_);
		_tmp14_ = self->priv->_map;
		_tmp15_ = family;
		_tmp16_ = self->priv->_map;
		_tmp17_ = undo_style_callout_font_new (self->priv->_affects, _tmp15_, size, _tmp16_);
		_tmp18_ = _tmp17_;
		mind_map_add_undo (_tmp14_, (UndoItem*) _tmp18_);
		_g_object_unref0 (_tmp18_);
		_g_free0 (family);
	}
}

static void
___lambda226__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda226_ ((StyleInspector*) self);
}

static GtkBox*
style_inspector_create_callout_font_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkFontDialog* font_dialog = NULL;
	GtkFontDialog* _tmp1_;
	GtkFontDialog* _tmp2_;
	GtkFontDialogButton* _tmp3_ = NULL;
	GtkCustomFilter* font_filter = NULL;
	GtkCustomFilter* _tmp4_;
	GtkFontDialogButton* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_ = NULL;
	GtkFontDialogButton* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Text Font"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = gtk_font_dialog_new ();
	font_dialog = _tmp1_;
	_tmp2_ = _g_object_ref0 (font_dialog);
	_tmp3_ = (GtkFontDialogButton*) gtk_font_dialog_button_new (_tmp2_);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_font_dialog_button_set_use_font (_tmp3_, TRUE);
	gtk_font_dialog_button_set_use_size (_tmp3_, FALSE);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->_callout_font);
	self->priv->_callout_font = _tmp3_;
	_tmp4_ = gtk_custom_filter_new (___lambda225__gtk_custom_filter_func, g_object_ref (self), g_object_unref);
	font_filter = _tmp4_;
	gtk_font_dialog_set_filter (font_dialog, (GtkFilter*) font_filter);
	_tmp5_ = self->priv->_callout_font;
	g_signal_connect_object ((GObject*) _tmp5_, "notify::font-desc", (GCallback) ___lambda226__g_object_notify, self, 0);
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_FILL);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_callout_font;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (font_filter);
	_g_object_unref0 (font_dialog);
	_g_object_unref0 (lbl);
	return result;
}

static void
_style_inspector_set_callout_text_align_mode_buttons_changed (ModeButtons* _sender,
                                                              gint index,
                                                              gpointer self)
{
	style_inspector_set_callout_text_align ((StyleInspector*) self, index);
}

static GtkBox*
style_inspector_create_callout_text_align_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	ModeButtons* _tmp1_ = NULL;
	ModeButtons* _tmp2_;
	ModeButtons* _tmp3_;
	ModeButtons* _tmp4_;
	ModeButtons* _tmp5_;
	GtkBox* box = NULL;
	GtkBox* _tmp6_;
	ModeButtons* _tmp7_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Text Alignment"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = mode_buttons_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_END);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_callout_text_align);
	self->priv->_callout_text_align = _tmp1_;
	_tmp2_ = self->priv->_callout_text_align;
	g_signal_connect_object (_tmp2_, "changed", (GCallback) _style_inspector_set_callout_text_align_mode_buttons_changed, self, 0);
	_tmp3_ = self->priv->_callout_text_align;
	mode_buttons_add_button (_tmp3_, "format-justify-left-symbolic", NULL, _ ("Left"));
	_tmp4_ = self->priv->_callout_text_align;
	mode_buttons_add_button (_tmp4_, "format-justify-center-symbolic", NULL, _ ("Center"));
	_tmp5_ = self->priv->_callout_text_align;
	mode_buttons_add_button (_tmp5_, "format-justify-right-symbolic", NULL, _ ("Right"));
	_tmp6_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp6_);
	box = _tmp6_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp7_ = self->priv->_callout_text_align;
	gtk_box_append (box, (GtkWidget*) _tmp7_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static void
style_inspector_set_callout_text_align (StyleInspector* self,
                                        gint index)
{
	PangoAlignment* align = NULL;
	PangoAlignment* _tmp6_;
	g_return_if_fail (self != NULL);
	align = NULL;
	switch (index) {
		case 0:
		{
			PangoAlignment _tmp0_;
			PangoAlignment* _tmp1_;
			_tmp0_ = PANGO_ALIGN_LEFT;
			_tmp1_ = __pango_alignment_dup0 (&_tmp0_);
			_g_free0 (align);
			align = _tmp1_;
			break;
		}
		case 1:
		{
			PangoAlignment _tmp2_;
			PangoAlignment* _tmp3_;
			_tmp2_ = PANGO_ALIGN_CENTER;
			_tmp3_ = __pango_alignment_dup0 (&_tmp2_);
			_g_free0 (align);
			align = _tmp3_;
			break;
		}
		case 2:
		{
			PangoAlignment _tmp4_;
			PangoAlignment* _tmp5_;
			_tmp4_ = PANGO_ALIGN_RIGHT;
			_tmp5_ = __pango_alignment_dup0 (&_tmp4_);
			_g_free0 (align);
			align = _tmp5_;
			break;
		}
		default:
		break;
	}
	_tmp6_ = align;
	if (_tmp6_ != NULL) {
		Style* _tmp7_;
		PangoAlignment* _tmp8_;
		MindMap* _tmp9_;
		UndoBuffer* _tmp10_;
		UndoBuffer* _tmp11_;
		PangoAlignment* _tmp12_;
		MindMap* _tmp13_;
		UndoStyleCalloutTextAlign* _tmp14_;
		UndoStyleCalloutTextAlign* _tmp15_;
		_tmp7_ = self->priv->_curr_style;
		_tmp8_ = align;
		style_set_callout_text_align (_tmp7_, _tmp8_);
		_tmp9_ = self->priv->_map;
		_tmp10_ = mind_map_get_undo_buffer (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = align;
		_tmp13_ = self->priv->_map;
		_tmp14_ = undo_style_callout_text_align_new (self->priv->_affects, *_tmp12_, _tmp13_);
		_tmp15_ = _tmp14_;
		undo_buffer_add_item (_tmp11_, (UndoItem*) _tmp15_);
		_g_object_unref0 (_tmp15_);
	}
	_g_free0 (align);
}

static gboolean
_style_inspector_callout_padding_changed_gtk_range_change_value (GtkRange* _sender,
                                                                 GtkScrollType scroll,
                                                                 gdouble new_value,
                                                                 gpointer self)
{
	gboolean result;
	result = style_inspector_callout_padding_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_callout_padding_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Padding"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 4, (gdouble) 20, (gdouble) 2);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_callout_padding);
	self->priv->_callout_padding = _tmp1_;
	_tmp2_ = self->priv->_callout_padding;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_callout_padding;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_callout_padding_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_callout_padding;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_callout_padding_changed (StyleInspector* self,
                                         GtkScrollType scroll,
                                         gdouble value)
{
	gint intval = 0;
	UndoStyleCalloutPadding* padding = NULL;
	MindMap* _tmp0_;
	UndoStyleCalloutPadding* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 20) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_callout_padding_new (self->priv->_affects, intval, _tmp0_);
	padding = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_callout_padding (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleCalloutPadding* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = padding;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleCalloutPadding* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = padding;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (padding);
	return result;
}

static gboolean
_style_inspector_callout_pointer_width_changed_gtk_range_change_value (GtkRange* _sender,
                                                                       GtkScrollType scroll,
                                                                       gdouble new_value,
                                                                       gpointer self)
{
	gboolean result;
	result = style_inspector_callout_pointer_width_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_callout_pointer_width_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Pointer Width"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 10, (gdouble) 30, (gdouble) 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_callout_ptr_width);
	self->priv->_callout_ptr_width = _tmp1_;
	_tmp2_ = self->priv->_callout_ptr_width;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_callout_ptr_width;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_callout_pointer_width_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_callout_ptr_width;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_callout_pointer_width_changed (StyleInspector* self,
                                               GtkScrollType scroll,
                                               gdouble value)
{
	gint intval = 0;
	UndoStyleCalloutPointerWidth* pwidth = NULL;
	MindMap* _tmp0_;
	UndoStyleCalloutPointerWidth* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 30) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_callout_pointer_width_new (self->priv->_affects, intval, _tmp0_);
	pwidth = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_callout_ptr_width (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleCalloutPointerWidth* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = pwidth;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleCalloutPointerWidth* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = pwidth;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (pwidth);
	return result;
}

static gboolean
_style_inspector_callout_pointer_length_changed_gtk_range_change_value (GtkRange* _sender,
                                                                        GtkScrollType scroll,
                                                                        gdouble new_value,
                                                                        gpointer self)
{
	gboolean result;
	result = style_inspector_callout_pointer_length_changed ((StyleInspector*) self, scroll, new_value);
	return result;
}

static GtkBox*
style_inspector_create_callout_pointer_length_ui (StyleInspector* self)
{
	GtkLabel* lbl = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkScale* _tmp1_ = NULL;
	GtkScale* _tmp2_;
	GtkScale* _tmp3_;
	GtkBox* box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkScale* _tmp5_;
	GtkBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Pointer Length"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	g_object_ref_sink (_tmp0_);
	lbl = _tmp0_;
	_tmp1_ = (GtkScale*) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, (gdouble) 10, (gdouble) 100, (gdouble) 5);
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_FILL);
	gtk_scale_set_draw_value (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_callout_ptr_length);
	self->priv->_callout_ptr_length = _tmp1_;
	_tmp2_ = self->priv->_callout_ptr_length;
	style_inspector_ignore_scroll (self, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->_callout_ptr_length;
	g_signal_connect_object ((GtkRange*) _tmp3_, "change-value", (GCallback) _style_inspector_callout_pointer_length_changed_gtk_range_change_value, self, 0);
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_FILL);
	gtk_box_set_homogeneous (_tmp4_, TRUE);
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_box_append (box, (GtkWidget*) lbl);
	_tmp5_ = self->priv->_callout_ptr_length;
	gtk_box_append (box, (GtkWidget*) _tmp5_);
	result = box;
	_g_object_unref0 (lbl);
	return result;
}

static gboolean
style_inspector_callout_pointer_length_changed (StyleInspector* self,
                                                GtkScrollType scroll,
                                                gdouble value)
{
	gint intval = 0;
	UndoStyleCalloutPointerLength* plength = NULL;
	MindMap* _tmp0_;
	UndoStyleCalloutPointerLength* _tmp1_;
	Style* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	intval = (gint) round (value);
	if (intval > 100) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_map;
	_tmp1_ = undo_style_callout_pointer_length_new (self->priv->_affects, intval, _tmp0_);
	plength = _tmp1_;
	_tmp2_ = self->priv->_curr_style;
	style_set_callout_ptr_length (_tmp2_, &intval);
	if (self->priv->_change_add) {
		MindMap* _tmp3_;
		UndoBuffer* _tmp4_;
		UndoBuffer* _tmp5_;
		UndoStyleCalloutPointerLength* _tmp6_;
		_tmp3_ = self->priv->_map;
		_tmp4_ = mind_map_get_undo_buffer (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = plength;
		undo_buffer_add_item (_tmp5_, (UndoItem*) _tmp6_);
		self->priv->_change_add = FALSE;
	} else {
		MindMap* _tmp7_;
		UndoBuffer* _tmp8_;
		UndoBuffer* _tmp9_;
		UndoStyleCalloutPointerLength* _tmp10_;
		_tmp7_ = self->priv->_map;
		_tmp8_ = mind_map_get_undo_buffer (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = plength;
		undo_buffer_replace_item (_tmp9_, (UndoItem*) _tmp10_);
	}
	result = FALSE;
	_g_object_unref0 (plength);
	return result;
}

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

static void
style_inspector_update_from_style (StyleInspector* self,
                                   Style* style)
{
	MindMap* _tmp45_;
	MindMap* _tmp46_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	switch (self->priv->_affects) {
		case STYLE_AFFECTS_ALL:
		{
			GArray* nodes = NULL;
			MindMap* _tmp0_;
			GArray* _tmp1_;
			GArray* conns = NULL;
			MindMap* _tmp2_;
			Connections* _tmp3_;
			Connections* _tmp4_;
			GArray* _tmp5_;
			GArray* _tmp6_;
			GArray* _tmp7_;
			_tmp0_ = self->priv->_map;
			_tmp1_ = mind_map_get_nodes (_tmp0_);
			nodes = _tmp1_;
			_tmp2_ = self->priv->_map;
			_tmp3_ = mind_map_get_connections (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = connections_get_connections (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = _g_array_ref0 (_tmp6_);
			conns = _tmp7_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp8_ = FALSE;
					_tmp8_ = TRUE;
					while (TRUE) {
						GArray* _tmp10_;
						GArray* _tmp11_;
						Node* _tmp12_;
						if (!_tmp8_) {
							gint _tmp9_;
							_tmp9_ = i;
							i = _tmp9_ + 1;
						}
						_tmp8_ = FALSE;
						_tmp10_ = nodes;
						if (!(((guint) i) < _tmp10_->len)) {
							break;
						}
						_tmp11_ = nodes;
						_tmp12_ = g_array_index (_tmp11_, Node*, (guint) i);
						node_set_style_for_tree (_tmp12_, style);
					}
				}
			}
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp13_ = FALSE;
					_tmp13_ = TRUE;
					while (TRUE) {
						GArray* _tmp15_;
						GArray* _tmp16_;
						Connection* _tmp17_;
						if (!_tmp13_) {
							gint _tmp14_;
							_tmp14_ = i;
							i = _tmp14_ + 1;
						}
						_tmp13_ = FALSE;
						_tmp15_ = conns;
						if (!(((guint) i) < _tmp15_->len)) {
							break;
						}
						_tmp16_ = conns;
						_tmp17_ = g_array_index (_tmp16_, Connection*, (guint) i);
						connection_set_style (_tmp17_, style);
					}
				}
			}
			_g_array_unref0 (conns);
			_g_array_unref0 (nodes);
			break;
		}
		case STYLE_AFFECTS_SELECTED_NODES:
		{
			GArray* nodes = NULL;
			MindMap* _tmp18_;
			Selection* _tmp19_;
			Selection* _tmp20_;
			GArray* _tmp21_;
			_tmp18_ = self->priv->_map;
			_tmp19_ = mind_map_get_selected (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = selection_nodes (_tmp20_);
			nodes = _tmp21_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp22_ = FALSE;
					_tmp22_ = TRUE;
					while (TRUE) {
						GArray* _tmp24_;
						GArray* _tmp25_;
						Node* _tmp26_;
						if (!_tmp22_) {
							gint _tmp23_;
							_tmp23_ = i;
							i = _tmp23_ + 1;
						}
						_tmp22_ = FALSE;
						_tmp24_ = nodes;
						if (!(((guint) i) < _tmp24_->len)) {
							break;
						}
						_tmp25_ = nodes;
						_tmp26_ = g_array_index (_tmp25_, Node*, (guint) i);
						node_set_style (_tmp26_, style);
					}
				}
			}
			_g_array_unref0 (nodes);
			break;
		}
		case STYLE_AFFECTS_SELECTED_CONNECTIONS:
		{
			GArray* conns = NULL;
			MindMap* _tmp27_;
			Selection* _tmp28_;
			Selection* _tmp29_;
			GArray* _tmp30_;
			_tmp27_ = self->priv->_map;
			_tmp28_ = mind_map_get_selected (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = selection_connections (_tmp29_);
			conns = _tmp30_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp31_ = FALSE;
					_tmp31_ = TRUE;
					while (TRUE) {
						GArray* _tmp33_;
						GArray* _tmp34_;
						Connection* _tmp35_;
						if (!_tmp31_) {
							gint _tmp32_;
							_tmp32_ = i;
							i = _tmp32_ + 1;
						}
						_tmp31_ = FALSE;
						_tmp33_ = conns;
						if (!(((guint) i) < _tmp33_->len)) {
							break;
						}
						_tmp34_ = conns;
						_tmp35_ = g_array_index (_tmp34_, Connection*, (guint) i);
						connection_set_style (_tmp35_, style);
					}
				}
			}
			_g_array_unref0 (conns);
			break;
		}
		case STYLE_AFFECTS_SELECTED_CALLOUTS:
		{
			GArray* callouts = NULL;
			MindMap* _tmp36_;
			Selection* _tmp37_;
			Selection* _tmp38_;
			GArray* _tmp39_;
			_tmp36_ = self->priv->_map;
			_tmp37_ = mind_map_get_selected (_tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = selection_callouts (_tmp38_);
			callouts = _tmp39_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp40_ = FALSE;
					_tmp40_ = TRUE;
					while (TRUE) {
						GArray* _tmp42_;
						GArray* _tmp43_;
						Callout* _tmp44_;
						if (!_tmp40_) {
							gint _tmp41_;
							_tmp41_ = i;
							i = _tmp41_ + 1;
						}
						_tmp40_ = FALSE;
						_tmp42_ = callouts;
						if (!(((guint) i) < _tmp42_->len)) {
							break;
						}
						_tmp43_ = callouts;
						_tmp44_ = g_array_index (_tmp43_, Callout*, (guint) i);
						callout_set_style (_tmp44_, style);
					}
				}
			}
			_g_array_unref0 (callouts);
			break;
		}
		default:
		break;
	}
	style_inspector_update_ui_with_style (self, style);
	_tmp45_ = self->priv->_map;
	mind_map_queue_draw (_tmp45_);
	_tmp46_ = self->priv->_map;
	mind_map_auto_save (_tmp46_);
}

static gpointer
_selection_ref0 (gpointer self)
{
	return self ? selection_ref (self) : NULL;
}

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

static gpointer
_style_ref0 (gpointer self)
{
	return self ? style_ref (self) : NULL;
}

static void
style_inspector_set_affects (StyleInspector* self,
                             StyleAffects affects)
{
	Selection* selected = NULL;
	MindMap* _tmp0_;
	Selection* _tmp1_;
	Selection* _tmp2_;
	Selection* _tmp3_;
	StyleAffects* _tmp4_;
	GtkLabel* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	Style* _tmp93_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _selection_ref0 (_tmp2_);
	selected = _tmp3_;
	_tmp4_ = self->priv->_clipboard_affect;
	if (_tmp4_ != NULL) {
		gboolean _tmp5_ = FALSE;
		StyleAffects* _tmp6_;
		GtkButton* _tmp9_;
		_tmp6_ = self->priv->_clipboard_affect;
		if (_style_affects_equal (_tmp6_, &affects) == TRUE) {
			_tmp5_ = TRUE;
		} else {
			StyleAffects* _tmp7_;
			StyleAffects _tmp8_;
			_tmp7_ = self->priv->_clipboard_affect;
			_tmp8_ = STYLE_AFFECTS_ALL;
			_tmp5_ = _style_affects_equal (_tmp7_, &_tmp8_) == TRUE;
		}
		_tmp9_ = self->priv->_paste_btn;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, _tmp5_);
	}
	self->priv->_affects = affects;
	_tmp10_ = self->priv->_affects_label;
	_tmp11_ = style_affects_label (affects);
	_tmp12_ = _tmp11_;
	gtk_label_set_label (_tmp10_, _tmp12_);
	_g_free0 (_tmp12_);
	switch (self->priv->_affects) {
		case STYLE_AFFECTS_ALL:
		{
			MindMap* _tmp13_;
			Style* _tmp14_;
			Style* _tmp15_;
			Style* _tmp16_;
			Style* _tmp17_;
			Style* _tmp18_;
			GtkBox* _tmp19_;
			GtkBox* _tmp20_;
			GtkBox* _tmp21_;
			GtkBox* _tmp22_;
			GtkBox* _tmp23_;
			GtkExpander* _tmp24_;
			GSettings* _tmp25_;
			GtkExpander* _tmp26_;
			GSettings* _tmp27_;
			GtkMenuButton* _tmp28_;
			MainWindow* _tmp29_;
			Templates* _tmp30_;
			Templates* _tmp31_;
			GtkPopoverMenu* _tmp32_;
			GtkPopoverMenu* _tmp33_;
			_tmp13_ = self->priv->_map;
			_tmp14_ = mind_map_get_global_style (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = _style_ref0 (_tmp15_);
			_style_unref0 (self->priv->_curr_style);
			self->priv->_curr_style = _tmp16_;
			_tmp17_ = self->priv->_curr_style;
			_tmp18_ = _style_ref0 (_tmp17_);
			_style_unref0 (style_inspector_last_global_style);
			style_inspector_last_global_style = _tmp18_;
			_tmp19_ = self->priv->_branch_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp19_, TRUE);
			_tmp20_ = self->priv->_link_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp20_, TRUE);
			_tmp21_ = self->priv->_node_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp21_, TRUE);
			_tmp22_ = self->priv->_conn_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp22_, TRUE);
			_tmp23_ = self->priv->_callout_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE);
			_tmp24_ = self->priv->_conn_exp;
			_tmp25_ = self->priv->_settings;
			gtk_expander_set_expanded (_tmp24_, g_settings_get_boolean (_tmp25_, "style-connection-options-expanded"));
			_tmp26_ = self->priv->_callout_exp;
			_tmp27_ = self->priv->_settings;
			gtk_expander_set_expanded (_tmp26_, g_settings_get_boolean (_tmp27_, "style-callout-options-expanded"));
			_tmp28_ = self->priv->_template_btn;
			_tmp29_ = self->priv->_win;
			_tmp30_ = main_window_get_templates (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = templates_get_template_group_menu (_tmp31_, TEMPLATE_TYPE_STYLE_GENERAL);
			_tmp33_ = _tmp32_;
			gtk_menu_button_set_popover (_tmp28_, (GtkPopover*) _tmp33_);
			_g_object_unref0 (_tmp33_);
			break;
		}
		case STYLE_AFFECTS_SELECTED_NODES:
		{
			Style* _tmp34_;
			Style* _tmp35_;
			Selection* _tmp36_;
			GArray* _tmp37_;
			GArray* _tmp38_;
			Node* _tmp39_;
			Style* _tmp40_;
			Style* _tmp41_;
			GtkBox* _tmp42_;
			GtkBox* _tmp43_;
			GtkBox* _tmp44_;
			GtkBox* _tmp45_;
			GtkBox* _tmp46_;
			GtkMenuButton* _tmp47_;
			MainWindow* _tmp48_;
			Templates* _tmp49_;
			Templates* _tmp50_;
			GtkPopoverMenu* _tmp51_;
			GtkPopoverMenu* _tmp52_;
			_tmp34_ = style_new ();
			_style_unref0 (self->priv->_curr_style);
			self->priv->_curr_style = _tmp34_;
			_tmp35_ = self->priv->_curr_style;
			_tmp36_ = selected;
			_tmp37_ = selection_nodes (_tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = g_array_index (_tmp38_, Node*, (guint) 0);
			_tmp40_ = node_get_style (_tmp39_);
			_tmp41_ = _tmp40_;
			style_copy (_tmp35_, _tmp41_);
			_g_array_unref0 (_tmp38_);
			_tmp42_ = self->priv->_branch_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp42_, TRUE);
			_tmp43_ = self->priv->_link_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp43_, TRUE);
			_tmp44_ = self->priv->_node_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp44_, TRUE);
			_tmp45_ = self->priv->_conn_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp45_, FALSE);
			_tmp46_ = self->priv->_callout_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
			_tmp47_ = self->priv->_template_btn;
			_tmp48_ = self->priv->_win;
			_tmp49_ = main_window_get_templates (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = templates_get_template_group_menu (_tmp50_, TEMPLATE_TYPE_STYLE_NODE);
			_tmp52_ = _tmp51_;
			gtk_menu_button_set_popover (_tmp47_, (GtkPopover*) _tmp52_);
			_g_object_unref0 (_tmp52_);
			break;
		}
		case STYLE_AFFECTS_SELECTED_CONNECTIONS:
		{
			Style* _tmp53_;
			Style* _tmp54_;
			Selection* _tmp55_;
			GArray* _tmp56_;
			GArray* _tmp57_;
			Connection* _tmp58_;
			Style* _tmp59_;
			Style* _tmp60_;
			GtkBox* _tmp61_;
			GtkBox* _tmp62_;
			GtkBox* _tmp63_;
			GtkBox* _tmp64_;
			GtkBox* _tmp65_;
			GtkExpander* _tmp66_;
			GtkMenuButton* _tmp67_;
			MainWindow* _tmp68_;
			Templates* _tmp69_;
			Templates* _tmp70_;
			GtkPopoverMenu* _tmp71_;
			GtkPopoverMenu* _tmp72_;
			_tmp53_ = style_new ();
			_style_unref0 (self->priv->_curr_style);
			self->priv->_curr_style = _tmp53_;
			_tmp54_ = self->priv->_curr_style;
			_tmp55_ = selected;
			_tmp56_ = selection_connections (_tmp55_);
			_tmp57_ = _tmp56_;
			_tmp58_ = g_array_index (_tmp57_, Connection*, (guint) 0);
			_tmp59_ = connection_get_style (_tmp58_);
			_tmp60_ = _tmp59_;
			style_copy (_tmp54_, _tmp60_);
			_g_array_unref0 (_tmp57_);
			_tmp61_ = self->priv->_branch_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp61_, FALSE);
			_tmp62_ = self->priv->_link_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp62_, FALSE);
			_tmp63_ = self->priv->_node_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp63_, FALSE);
			_tmp64_ = self->priv->_conn_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp64_, TRUE);
			_tmp65_ = self->priv->_callout_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp65_, FALSE);
			_tmp66_ = self->priv->_conn_exp;
			gtk_expander_set_expanded (_tmp66_, TRUE);
			_tmp67_ = self->priv->_template_btn;
			_tmp68_ = self->priv->_win;
			_tmp69_ = main_window_get_templates (_tmp68_);
			_tmp70_ = _tmp69_;
			_tmp71_ = templates_get_template_group_menu (_tmp70_, TEMPLATE_TYPE_STYLE_CONNECTION);
			_tmp72_ = _tmp71_;
			gtk_menu_button_set_popover (_tmp67_, (GtkPopover*) _tmp72_);
			_g_object_unref0 (_tmp72_);
			break;
		}
		case STYLE_AFFECTS_SELECTED_CALLOUTS:
		{
			Style* _tmp73_;
			Style* _tmp74_;
			Selection* _tmp75_;
			GArray* _tmp76_;
			GArray* _tmp77_;
			Callout* _tmp78_;
			Style* _tmp79_;
			Style* _tmp80_;
			GtkBox* _tmp81_;
			GtkBox* _tmp82_;
			GtkBox* _tmp83_;
			GtkBox* _tmp84_;
			GtkBox* _tmp85_;
			GtkExpander* _tmp86_;
			GtkMenuButton* _tmp87_;
			MainWindow* _tmp88_;
			Templates* _tmp89_;
			Templates* _tmp90_;
			GtkPopoverMenu* _tmp91_;
			GtkPopoverMenu* _tmp92_;
			_tmp73_ = style_new ();
			_style_unref0 (self->priv->_curr_style);
			self->priv->_curr_style = _tmp73_;
			_tmp74_ = self->priv->_curr_style;
			_tmp75_ = selected;
			_tmp76_ = selection_callouts (_tmp75_);
			_tmp77_ = _tmp76_;
			_tmp78_ = g_array_index (_tmp77_, Callout*, (guint) 0);
			_tmp79_ = callout_get_style (_tmp78_);
			_tmp80_ = _tmp79_;
			style_copy (_tmp74_, _tmp80_);
			_g_array_unref0 (_tmp77_);
			_tmp81_ = self->priv->_branch_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp81_, FALSE);
			_tmp82_ = self->priv->_link_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp82_, FALSE);
			_tmp83_ = self->priv->_node_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp83_, FALSE);
			_tmp84_ = self->priv->_conn_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp84_, FALSE);
			_tmp85_ = self->priv->_callout_group;
			gtk_widget_set_visible ((GtkWidget*) _tmp85_, TRUE);
			_tmp86_ = self->priv->_callout_exp;
			gtk_expander_set_expanded (_tmp86_, TRUE);
			_tmp87_ = self->priv->_template_btn;
			_tmp88_ = self->priv->_win;
			_tmp89_ = main_window_get_templates (_tmp88_);
			_tmp90_ = _tmp89_;
			_tmp91_ = templates_get_template_group_menu (_tmp90_, TEMPLATE_TYPE_STYLE_CALLOUT);
			_tmp92_ = _tmp91_;
			gtk_menu_button_set_popover (_tmp87_, (GtkPopover*) _tmp92_);
			_g_object_unref0 (_tmp92_);
			break;
		}
		default:
		break;
	}
	_tmp93_ = self->priv->_curr_style;
	style_inspector_update_ui_with_style (self, _tmp93_);
	_selection_unref0 (selected);
}

static gboolean
style_inspector_check_level_for_branches (StyleInspector* self,
                                          Node* node,
                                          gint levels,
                                          gint level)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (node != NULL, FALSE);
	if ((levels & (1 << level)) != 0) {
		result = !node_is_leaf (node);
		return result;
	} else {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp0_ = FALSE;
				_tmp0_ = TRUE;
				while (TRUE) {
					GArray* _tmp2_;
					GArray* _tmp3_;
					gboolean _tmp4_;
					gint _tmp5_ = 0;
					GArray* _tmp6_;
					GArray* _tmp7_;
					Node* _tmp8_;
					gboolean _tmp9_;
					if (!_tmp0_) {
						gint _tmp1_;
						_tmp1_ = i;
						i = _tmp1_ + 1;
					}
					_tmp0_ = FALSE;
					_tmp2_ = node_children (node);
					_tmp3_ = _tmp2_;
					_tmp4_ = !(((guint) i) < _tmp3_->len);
					_g_array_unref0 (_tmp3_);
					if (_tmp4_) {
						break;
					}
					if (level == 9) {
						_tmp5_ = 9;
					} else {
						_tmp5_ = level + 1;
					}
					_tmp6_ = node_children (node);
					_tmp7_ = _tmp6_;
					_tmp8_ = g_array_index (_tmp7_, Node*, (guint) i);
					_tmp9_ = style_inspector_check_level_for_branches (self, _tmp8_, levels, _tmp5_);
					_g_array_unref0 (_tmp7_);
					if (_tmp9_) {
						result = TRUE;
						return result;
					}
				}
			}
		}
		result = FALSE;
		return result;
	}
}

static void
style_inspector_update_link_types_state (StyleInspector* self)
{
	gboolean sensitive = FALSE;
	gboolean _tmp24_ = FALSE;
	ModeButtons* _tmp28_;
	g_return_if_fail (self != NULL);
	sensitive = FALSE;
	switch (self->priv->_affects) {
		case STYLE_AFFECTS_ALL:
		{
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp0_ = FALSE;
					_tmp0_ = TRUE;
					while (TRUE) {
						MindMap* _tmp2_;
						GArray* _tmp3_;
						GArray* _tmp4_;
						gboolean _tmp5_;
						MindMap* _tmp6_;
						GArray* _tmp7_;
						GArray* _tmp8_;
						Node* _tmp9_;
						gboolean _tmp10_;
						if (!_tmp0_) {
							gint _tmp1_;
							_tmp1_ = i;
							i = _tmp1_ + 1;
						}
						_tmp0_ = FALSE;
						_tmp2_ = self->priv->_map;
						_tmp3_ = mind_map_get_nodes (_tmp2_);
						_tmp4_ = _tmp3_;
						_tmp5_ = !(((guint) i) < _tmp4_->len);
						_g_array_unref0 (_tmp4_);
						if (_tmp5_) {
							break;
						}
						_tmp6_ = self->priv->_map;
						_tmp7_ = mind_map_get_nodes (_tmp6_);
						_tmp8_ = _tmp7_;
						_tmp9_ = g_array_index (_tmp8_, Node*, (guint) i);
						_tmp10_ = !node_is_leaf (_tmp9_);
						_g_array_unref0 (_tmp8_);
						if (_tmp10_) {
							sensitive = TRUE;
							break;
						}
					}
				}
			}
			break;
		}
		case STYLE_AFFECTS_SELECTED_NODES:
		{
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp11_ = FALSE;
					_tmp11_ = TRUE;
					while (TRUE) {
						MindMap* _tmp13_;
						GArray* _tmp14_;
						GArray* _tmp15_;
						gboolean _tmp16_;
						MindMap* _tmp17_;
						GArray* _tmp18_;
						GArray* _tmp19_;
						Node* _tmp20_;
						GArray* _tmp21_;
						GArray* _tmp22_;
						gboolean _tmp23_;
						if (!_tmp11_) {
							gint _tmp12_;
							_tmp12_ = i;
							i = _tmp12_ + 1;
						}
						_tmp11_ = FALSE;
						_tmp13_ = self->priv->_map;
						_tmp14_ = mind_map_get_selected_nodes (_tmp13_);
						_tmp15_ = _tmp14_;
						_tmp16_ = !(((guint) i) < _tmp15_->len);
						_g_array_unref0 (_tmp15_);
						if (_tmp16_) {
							break;
						}
						_tmp17_ = self->priv->_map;
						_tmp18_ = mind_map_get_selected_nodes (_tmp17_);
						_tmp19_ = _tmp18_;
						_tmp20_ = g_array_index (_tmp19_, Node*, (guint) i);
						_tmp21_ = node_children (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = _tmp22_->len > ((guint) 0);
						_g_array_unref0 (_tmp22_);
						_g_array_unref0 (_tmp19_);
						if (_tmp23_) {
							sensitive = TRUE;
							break;
						}
					}
				}
			}
			break;
		}
		default:
		break;
	}
	if (sensitive) {
		MindMap* _tmp25_;
		gboolean _tmp26_;
		gboolean _tmp27_;
		_tmp25_ = self->priv->_map;
		_tmp26_ = mind_map_get_editable (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp24_ = _tmp27_;
	} else {
		_tmp24_ = FALSE;
	}
	_tmp28_ = self->priv->_link_types;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp28_, _tmp24_);
}

static void
style_inspector_update_link_types_with_style (StyleInspector* self,
                                              Style* style)
{
	LinkType* _tmp0_;
	LinkType* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	style_inspector_update_link_types_state (self);
	_tmp0_ = style_get_link_type (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GArray* link_types = NULL;
		Styles* _tmp2_;
		GArray* _tmp3_;
		gboolean _tmp17_ = FALSE;
		LinkType* _tmp18_;
		LinkType* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gboolean _tmp22_;
		GtkBox* _tmp24_;
		_tmp2_ = style_inspector_styles;
		_tmp3_ = styles_get_link_types (_tmp2_);
		link_types = _tmp3_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					GArray* _tmp6_;
					GArray* _tmp7_;
					LinkType* _tmp8_;
					gchar* _tmp9_;
					gchar* _tmp10_;
					LinkType* _tmp11_;
					LinkType* _tmp12_;
					gchar* _tmp13_;
					gchar* _tmp14_;
					gboolean _tmp15_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = i;
						i = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					_tmp6_ = link_types;
					if (!(((guint) i) < _tmp6_->len)) {
						break;
					}
					_tmp7_ = link_types;
					_tmp8_ = g_array_index (_tmp7_, LinkType*, (guint) i);
					_tmp9_ = link_type_name (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp11_ = style_get_link_type (style);
					_tmp12_ = _tmp11_;
					_tmp13_ = link_type_name (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp15_ = g_strcmp0 (_tmp10_, _tmp14_) == 0;
					_g_free0 (_tmp14_);
					_g_free0 (_tmp10_);
					if (_tmp15_) {
						ModeButtons* _tmp16_;
						_tmp16_ = self->priv->_link_types;
						mode_buttons_set_selected (_tmp16_, i);
						break;
					}
				}
			}
		}
		_tmp18_ = style_get_link_type (style);
		_tmp19_ = _tmp18_;
		_tmp20_ = link_type_name (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strcmp0 (_tmp21_, "rounded") == 0;
		_g_free0 (_tmp21_);
		if (_tmp22_) {
			ModeButtons* _tmp23_;
			_tmp23_ = self->priv->_link_types;
			_tmp17_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp23_);
		} else {
			_tmp17_ = FALSE;
		}
		_tmp24_ = self->priv->_branch_radius_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp24_, _tmp17_);
		_g_array_unref0 (link_types);
	}
}

static void
style_inspector_update_link_dashes_with_style (StyleInspector* self,
                                               Style* style)
{
	LinkDash* _tmp0_;
	LinkDash* _tmp1_;
	ImageMenu* _tmp14_;
	MindMap* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_link_dash (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GArray* link_dashes = NULL;
		Styles* _tmp2_;
		GArray* _tmp3_;
		_tmp2_ = style_inspector_styles;
		_tmp3_ = styles_get_link_dashes (_tmp2_);
		link_dashes = _tmp3_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					GArray* _tmp6_;
					GArray* _tmp7_;
					LinkDash* _tmp8_;
					const gchar* _tmp9_;
					LinkDash* _tmp10_;
					LinkDash* _tmp11_;
					const gchar* _tmp12_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = i;
						i = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					_tmp6_ = link_dashes;
					if (!(((guint) i) < _tmp6_->len)) {
						break;
					}
					_tmp7_ = link_dashes;
					_tmp8_ = g_array_index (_tmp7_, LinkDash*, (guint) i);
					_tmp9_ = _tmp8_->name;
					_tmp10_ = style_get_link_dash (style);
					_tmp11_ = _tmp10_;
					_tmp12_ = _tmp11_->name;
					if (g_strcmp0 (_tmp9_, _tmp12_) == 0) {
						ImageMenu* _tmp13_;
						_tmp13_ = self->priv->_link_dash;
						image_menu_set_selected (_tmp13_, i);
						break;
					}
				}
			}
		}
		_g_array_unref0 (link_dashes);
	}
	_tmp14_ = self->priv->_link_dash;
	_tmp15_ = self->priv->_map;
	_tmp16_ = mind_map_get_editable (_tmp15_);
	_tmp17_ = _tmp16_;
	g_signal_emit_by_name (_tmp14_, "editable-changed", _tmp17_);
}

static void
style_inspector_update_node_borders_with_style (StyleInspector* self,
                                                Style* style)
{
	NodeBorder* _tmp0_;
	NodeBorder* _tmp1_;
	ModeButtons* _tmp17_;
	MindMap* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_node_border (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GArray* node_borders = NULL;
		Styles* _tmp2_;
		GArray* _tmp3_;
		_tmp2_ = style_inspector_styles;
		_tmp3_ = styles_get_node_borders (_tmp2_);
		node_borders = _tmp3_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					GArray* _tmp6_;
					GArray* _tmp7_;
					NodeBorder* _tmp8_;
					gchar* _tmp9_;
					gchar* _tmp10_;
					NodeBorder* _tmp11_;
					NodeBorder* _tmp12_;
					gchar* _tmp13_;
					gchar* _tmp14_;
					gboolean _tmp15_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = i;
						i = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					_tmp6_ = node_borders;
					if (!(((guint) i) < _tmp6_->len)) {
						break;
					}
					_tmp7_ = node_borders;
					_tmp8_ = g_array_index (_tmp7_, NodeBorder*, (guint) i);
					_tmp9_ = node_border_name (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp11_ = style_get_node_border (style);
					_tmp12_ = _tmp11_;
					_tmp13_ = node_border_name (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp15_ = g_strcmp0 (_tmp10_, _tmp14_) == 0;
					_g_free0 (_tmp14_);
					_g_free0 (_tmp10_);
					if (_tmp15_) {
						ModeButtons* _tmp16_;
						_tmp16_ = self->priv->_node_borders;
						mode_buttons_set_selected (_tmp16_, i);
						break;
					}
				}
			}
		}
		_g_array_unref0 (node_borders);
	}
	_tmp17_ = self->priv->_node_borders;
	_tmp18_ = self->priv->_map;
	_tmp19_ = mind_map_get_editable (_tmp18_);
	_tmp20_ = _tmp19_;
	g_signal_emit_by_name (_tmp17_, "editable-changed", _tmp20_);
}

static void
style_inspector_update_node_text_align_with_style (StyleInspector* self,
                                                   Style* style)
{
	PangoAlignment* _tmp0_;
	PangoAlignment* _tmp1_;
	ModeButtons* _tmp7_;
	MindMap* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_node_text_align (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		PangoAlignment* _tmp2_;
		PangoAlignment* _tmp3_;
		_tmp2_ = style_get_node_text_align (style);
		_tmp3_ = _tmp2_;
		switch (*_tmp3_) {
			case PANGO_ALIGN_LEFT:
			{
				ModeButtons* _tmp4_;
				_tmp4_ = self->priv->_node_text_align;
				mode_buttons_set_selected (_tmp4_, 0);
				break;
			}
			case PANGO_ALIGN_CENTER:
			{
				ModeButtons* _tmp5_;
				_tmp5_ = self->priv->_node_text_align;
				mode_buttons_set_selected (_tmp5_, 1);
				break;
			}
			case PANGO_ALIGN_RIGHT:
			{
				ModeButtons* _tmp6_;
				_tmp6_ = self->priv->_node_text_align;
				mode_buttons_set_selected (_tmp6_, 2);
				break;
			}
			default:
			break;
		}
	}
	_tmp7_ = self->priv->_node_text_align;
	_tmp8_ = self->priv->_map;
	_tmp9_ = mind_map_get_editable (_tmp8_);
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp7_, "editable-changed", _tmp10_);
}

static void
style_inspector_update_conn_dashes_with_style (StyleInspector* self,
                                               Style* style)
{
	LinkDash* _tmp0_;
	LinkDash* _tmp1_;
	ImageMenu* _tmp14_;
	MindMap* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_connection_dash (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GArray* link_dashes = NULL;
		Styles* _tmp2_;
		GArray* _tmp3_;
		_tmp2_ = style_inspector_styles;
		_tmp3_ = styles_get_link_dashes (_tmp2_);
		link_dashes = _tmp3_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					GArray* _tmp6_;
					GArray* _tmp7_;
					LinkDash* _tmp8_;
					const gchar* _tmp9_;
					LinkDash* _tmp10_;
					LinkDash* _tmp11_;
					const gchar* _tmp12_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = i;
						i = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					_tmp6_ = link_dashes;
					if (!(((guint) i) < _tmp6_->len)) {
						break;
					}
					_tmp7_ = link_dashes;
					_tmp8_ = g_array_index (_tmp7_, LinkDash*, (guint) i);
					_tmp9_ = _tmp8_->name;
					_tmp10_ = style_get_connection_dash (style);
					_tmp11_ = _tmp10_;
					_tmp12_ = _tmp11_->name;
					if (g_strcmp0 (_tmp9_, _tmp12_) == 0) {
						ImageMenu* _tmp13_;
						_tmp13_ = self->priv->_conn_dash;
						image_menu_set_selected (_tmp13_, i);
						break;
					}
				}
			}
		}
		_g_array_unref0 (link_dashes);
	}
	_tmp14_ = self->priv->_conn_dash;
	_tmp15_ = self->priv->_map;
	_tmp16_ = mind_map_get_editable (_tmp15_);
	_tmp17_ = _tmp16_;
	g_signal_emit_by_name (_tmp14_, "editable-changed", _tmp17_);
}

static void
style_inspector_update_conn_arrows_with_style (StyleInspector* self,
                                               Style* style)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	ImageMenu* _tmp13_;
	MindMap* _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_connection_arrow (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gchar* arrows[4] = {0};
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_[4] = {0};
		gint i = 0;
		_tmp2_ = g_strdup ("none");
		_tmp3_ = g_strdup ("fromto");
		_tmp4_ = g_strdup ("tofrom");
		_tmp5_ = g_strdup ("both");
		_tmp6_[0] = _tmp2_;
		_tmp6_[1] = _tmp3_;
		_tmp6_[2] = _tmp4_;
		_tmp6_[3] = _tmp5_;
		memcpy (arrows, _tmp6_, 4 * sizeof (gchar*));
		i = 0;
		{
			gchar** arrow_collection = NULL;
			gint arrow_collection_length1 = 0;
			gint _arrow_collection_size_ = 0;
			gint arrow_it = 0;
			arrow_collection = arrows;
			arrow_collection_length1 = 4;
			for (arrow_it = 0; arrow_it < arrow_collection_length1; arrow_it = arrow_it + 1) {
				gchar* _tmp7_;
				gchar* arrow = NULL;
				_tmp7_ = g_strdup (arrow_collection[arrow_it]);
				arrow = _tmp7_;
				{
					const gchar* _tmp8_;
					const gchar* _tmp9_;
					const gchar* _tmp10_;
					gint _tmp12_;
					_tmp8_ = arrow;
					_tmp9_ = style_get_connection_arrow (style);
					_tmp10_ = _tmp9_;
					if (g_strcmp0 (_tmp8_, _tmp10_) == 0) {
						ImageMenu* _tmp11_;
						_tmp11_ = self->priv->_conn_arrow;
						image_menu_set_selected (_tmp11_, i);
						_g_free0 (arrow);
						break;
					}
					_tmp12_ = i;
					i = _tmp12_ + 1;
					_g_free0 (arrow);
				}
			}
		}
		_vala_array_destroy (arrows, 4, (GDestroyNotify) g_free);
	}
	_tmp13_ = self->priv->_conn_arrow;
	_tmp14_ = self->priv->_map;
	_tmp15_ = mind_map_get_editable (_tmp14_);
	_tmp16_ = _tmp15_;
	g_signal_emit_by_name (_tmp13_, "editable-changed", _tmp16_);
}

static void
style_inspector_update_conn_text_align_with_style (StyleInspector* self,
                                                   Style* style)
{
	PangoAlignment* _tmp0_;
	PangoAlignment* _tmp1_;
	ModeButtons* _tmp7_;
	MindMap* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_connection_text_align (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		PangoAlignment* _tmp2_;
		PangoAlignment* _tmp3_;
		_tmp2_ = style_get_connection_text_align (style);
		_tmp3_ = _tmp2_;
		switch (*_tmp3_) {
			case PANGO_ALIGN_LEFT:
			{
				ModeButtons* _tmp4_;
				_tmp4_ = self->priv->_conn_text_align;
				mode_buttons_set_selected (_tmp4_, 0);
				break;
			}
			case PANGO_ALIGN_CENTER:
			{
				ModeButtons* _tmp5_;
				_tmp5_ = self->priv->_conn_text_align;
				mode_buttons_set_selected (_tmp5_, 1);
				break;
			}
			case PANGO_ALIGN_RIGHT:
			{
				ModeButtons* _tmp6_;
				_tmp6_ = self->priv->_conn_text_align;
				mode_buttons_set_selected (_tmp6_, 2);
				break;
			}
			default:
			break;
		}
	}
	_tmp7_ = self->priv->_conn_text_align;
	_tmp8_ = self->priv->_map;
	_tmp9_ = mind_map_get_editable (_tmp8_);
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp7_, "editable-changed", _tmp10_);
}

static void
style_inspector_update_callout_text_align_with_style (StyleInspector* self,
                                                      Style* style)
{
	PangoAlignment* _tmp0_;
	PangoAlignment* _tmp1_;
	ModeButtons* _tmp7_;
	MindMap* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_callout_text_align (style);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		PangoAlignment* _tmp2_;
		PangoAlignment* _tmp3_;
		_tmp2_ = style_get_callout_text_align (style);
		_tmp3_ = _tmp2_;
		switch (*_tmp3_) {
			case PANGO_ALIGN_LEFT:
			{
				ModeButtons* _tmp4_;
				_tmp4_ = self->priv->_callout_text_align;
				mode_buttons_set_selected (_tmp4_, 0);
				break;
			}
			case PANGO_ALIGN_CENTER:
			{
				ModeButtons* _tmp5_;
				_tmp5_ = self->priv->_callout_text_align;
				mode_buttons_set_selected (_tmp5_, 1);
				break;
			}
			case PANGO_ALIGN_RIGHT:
			{
				ModeButtons* _tmp6_;
				_tmp6_ = self->priv->_callout_text_align;
				mode_buttons_set_selected (_tmp6_, 2);
				break;
			}
			default:
			break;
		}
	}
	_tmp7_ = self->priv->_callout_text_align;
	_tmp8_ = self->priv->_map;
	_tmp9_ = mind_map_get_editable (_tmp8_);
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp7_, "editable-changed", _tmp10_);
}

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;
}

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

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

static void
style_inspector_update_ui_with_style (StyleInspector* self,
                                      Style* style)
{
	gint* branch_margin = NULL;
	gint* _tmp0_;
	gint* _tmp1_;
	gint* _tmp2_;
	gint* branch_radius = NULL;
	gint* _tmp3_;
	gint* _tmp4_;
	gint* _tmp5_;
	gint* link_width = NULL;
	gint* _tmp6_;
	gint* _tmp7_;
	gint* _tmp8_;
	gboolean* link_arrow = NULL;
	gboolean* _tmp9_;
	gboolean* _tmp10_;
	gboolean* _tmp11_;
	gint* link_arrow_size = NULL;
	gint* _tmp12_;
	gint* _tmp13_;
	gint* _tmp14_;
	gint* node_bw = NULL;
	gint* _tmp15_;
	gint* _tmp16_;
	gint* _tmp17_;
	gboolean* node_fill = NULL;
	gboolean* _tmp18_;
	gboolean* _tmp19_;
	gboolean* _tmp20_;
	gint node_margin = 0;
	gint _tmp21_;
	gint _tmp22_;
	gint node_padding = 0;
	gint _tmp23_;
	gint _tmp24_;
	gint* node_width = NULL;
	gint* _tmp25_;
	gint* _tmp26_;
	gint* _tmp27_;
	gboolean* node_markup = NULL;
	gboolean* _tmp28_;
	gboolean* _tmp29_;
	gboolean* _tmp30_;
	gint* conn_arrow_size = NULL;
	gint* _tmp31_;
	gint* _tmp32_;
	gint* _tmp33_;
	gint* conn_line_width = NULL;
	gint* _tmp34_;
	gint* _tmp35_;
	gint* _tmp36_;
	gint* conn_padding = NULL;
	gint* _tmp37_;
	gint* _tmp38_;
	gint* _tmp39_;
	gint* callout_padding = NULL;
	gint* _tmp40_;
	gint* _tmp41_;
	gint* _tmp42_;
	gint* callout_pwidth = NULL;
	gint* _tmp43_;
	gint* _tmp44_;
	gint* _tmp45_;
	gint* callout_plength = NULL;
	gint* _tmp46_;
	gint* _tmp47_;
	gint* _tmp48_;
	gboolean _tmp49_ = FALSE;
	gboolean _tmp84_ = FALSE;
	gboolean _tmp104_ = FALSE;
	GtkScale* _tmp119_;
	MindMap* _tmp120_;
	gboolean _tmp121_;
	gboolean _tmp122_;
	GtkScale* _tmp123_;
	MindMap* _tmp124_;
	gboolean _tmp125_;
	gboolean _tmp126_;
	GtkScale* _tmp127_;
	MindMap* _tmp128_;
	gboolean _tmp129_;
	gboolean _tmp130_;
	GtkSwitch* _tmp131_;
	MindMap* _tmp132_;
	gboolean _tmp133_;
	gboolean _tmp134_;
	GtkScale* _tmp135_;
	MindMap* _tmp136_;
	gboolean _tmp137_;
	gboolean _tmp138_;
	GtkScale* _tmp139_;
	MindMap* _tmp140_;
	gboolean _tmp141_;
	gboolean _tmp142_;
	gboolean _tmp143_ = FALSE;
	gboolean _tmp144_ = FALSE;
	NodeBorder* _tmp145_;
	NodeBorder* _tmp146_;
	GtkSwitch* _tmp152_;
	GtkScale* _tmp153_;
	MindMap* _tmp154_;
	gboolean _tmp155_;
	gboolean _tmp156_;
	GtkScale* _tmp157_;
	MindMap* _tmp158_;
	gboolean _tmp159_;
	gboolean _tmp160_;
	GtkFontDialogButton* _tmp161_;
	MindMap* _tmp162_;
	gboolean _tmp163_;
	gboolean _tmp164_;
	GtkSpinButton* _tmp165_;
	MindMap* _tmp166_;
	gboolean _tmp167_;
	gboolean _tmp168_;
	GtkSwitch* _tmp169_;
	MindMap* _tmp170_;
	gboolean _tmp171_;
	gboolean _tmp172_;
	GtkScale* _tmp173_;
	MindMap* _tmp174_;
	gboolean _tmp175_;
	gboolean _tmp176_;
	GtkFontDialogButton* _tmp177_;
	MindMap* _tmp178_;
	gboolean _tmp179_;
	gboolean _tmp180_;
	GtkSpinButton* _tmp181_;
	MindMap* _tmp182_;
	gboolean _tmp183_;
	gboolean _tmp184_;
	GtkScale* _tmp185_;
	MindMap* _tmp186_;
	gboolean _tmp187_;
	gboolean _tmp188_;
	GtkFontDialogButton* _tmp189_;
	MindMap* _tmp190_;
	gboolean _tmp191_;
	gboolean _tmp192_;
	GtkScale* _tmp193_;
	MindMap* _tmp194_;
	gboolean _tmp195_;
	gboolean _tmp196_;
	GtkScale* _tmp197_;
	MindMap* _tmp198_;
	gboolean _tmp199_;
	gboolean _tmp200_;
	GtkScale* _tmp201_;
	MindMap* _tmp202_;
	gboolean _tmp203_;
	gboolean _tmp204_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (style != NULL);
	_tmp0_ = style_get_branch_margin (style);
	_tmp1_ = _tmp0_;
	_tmp2_ = __int_dup0 (_tmp1_);
	branch_margin = _tmp2_;
	_tmp3_ = style_get_branch_radius (style);
	_tmp4_ = _tmp3_;
	_tmp5_ = __int_dup0 (_tmp4_);
	branch_radius = _tmp5_;
	_tmp6_ = style_get_link_width (style);
	_tmp7_ = _tmp6_;
	_tmp8_ = __int_dup0 (_tmp7_);
	link_width = _tmp8_;
	_tmp9_ = style_get_link_arrow (style);
	_tmp10_ = _tmp9_;
	_tmp11_ = __bool_dup0 (_tmp10_);
	link_arrow = _tmp11_;
	_tmp12_ = style_get_link_arrow_size (style);
	_tmp13_ = _tmp12_;
	_tmp14_ = __int_dup0 (_tmp13_);
	link_arrow_size = _tmp14_;
	_tmp15_ = style_get_node_borderwidth (style);
	_tmp16_ = _tmp15_;
	_tmp17_ = __int_dup0 (_tmp16_);
	node_bw = _tmp17_;
	_tmp18_ = style_get_node_fill (style);
	_tmp19_ = _tmp18_;
	_tmp20_ = __bool_dup0 (_tmp19_);
	node_fill = _tmp20_;
	_tmp21_ = style_get_node_margin (style);
	_tmp22_ = _tmp21_;
	node_margin = _tmp22_;
	_tmp23_ = style_get_node_padding (style);
	_tmp24_ = _tmp23_;
	node_padding = _tmp24_;
	_tmp25_ = style_get_node_width (style);
	_tmp26_ = _tmp25_;
	_tmp27_ = __int_dup0 (_tmp26_);
	node_width = _tmp27_;
	_tmp28_ = style_get_node_markup (style);
	_tmp29_ = _tmp28_;
	_tmp30_ = __bool_dup0 (_tmp29_);
	node_markup = _tmp30_;
	_tmp31_ = style_get_connection_arrow_size (style);
	_tmp32_ = _tmp31_;
	_tmp33_ = __int_dup0 (_tmp32_);
	conn_arrow_size = _tmp33_;
	_tmp34_ = style_get_connection_line_width (style);
	_tmp35_ = _tmp34_;
	_tmp36_ = __int_dup0 (_tmp35_);
	conn_line_width = _tmp36_;
	_tmp37_ = style_get_connection_padding (style);
	_tmp38_ = _tmp37_;
	_tmp39_ = __int_dup0 (_tmp38_);
	conn_padding = _tmp39_;
	_tmp40_ = style_get_callout_padding (style);
	_tmp41_ = _tmp40_;
	_tmp42_ = __int_dup0 (_tmp41_);
	callout_padding = _tmp42_;
	_tmp43_ = style_get_callout_ptr_width (style);
	_tmp44_ = _tmp43_;
	_tmp45_ = __int_dup0 (_tmp44_);
	callout_pwidth = _tmp45_;
	_tmp46_ = style_get_callout_ptr_length (style);
	_tmp47_ = _tmp46_;
	_tmp48_ = __int_dup0 (_tmp47_);
	callout_plength = _tmp48_;
	self->priv->_ignore = TRUE;
	if (self->priv->_affects == STYLE_AFFECTS_ALL) {
		_tmp49_ = TRUE;
	} else {
		_tmp49_ = self->priv->_affects == STYLE_AFFECTS_SELECTED_NODES;
	}
	if (_tmp49_) {
		gint* _tmp50_;
		gint* _tmp53_;
		gint* _tmp56_;
		gboolean* _tmp59_;
		gint* _tmp62_;
		gint* _tmp65_;
		gboolean* _tmp68_;
		PangoFontDescription* _tmp73_;
		PangoFontDescription* _tmp74_;
		gint* _tmp78_;
		gboolean* _tmp81_;
		_tmp50_ = branch_margin;
		if (_tmp50_ != NULL) {
			GtkScale* _tmp51_;
			gint* _tmp52_;
			_tmp51_ = self->priv->_branch_margin;
			_tmp52_ = branch_margin;
			gtk_range_set_value ((GtkRange*) _tmp51_, (gdouble) (*_tmp52_));
		}
		_tmp53_ = branch_radius;
		if (_tmp53_ != NULL) {
			GtkScale* _tmp54_;
			gint* _tmp55_;
			_tmp54_ = self->priv->_branch_radius;
			_tmp55_ = branch_radius;
			gtk_range_set_value ((GtkRange*) _tmp54_, (gdouble) (*_tmp55_));
		}
		_tmp56_ = link_width;
		if (_tmp56_ != NULL) {
			GtkScale* _tmp57_;
			gint* _tmp58_;
			_tmp57_ = self->priv->_link_width;
			_tmp58_ = link_width;
			gtk_range_set_value ((GtkRange*) _tmp57_, (gdouble) (*_tmp58_));
		}
		_tmp59_ = link_arrow;
		if (_tmp59_ != NULL) {
			GtkSwitch* _tmp60_;
			gboolean* _tmp61_;
			_tmp60_ = self->priv->_link_arrow;
			_tmp61_ = link_arrow;
			gtk_switch_set_active (_tmp60_, (gboolean) (*_tmp61_));
		}
		_tmp62_ = link_arrow_size;
		if (_tmp62_ != NULL) {
			GtkScale* _tmp63_;
			gint* _tmp64_;
			_tmp63_ = self->priv->_link_arrow_size;
			_tmp64_ = link_arrow_size;
			gtk_range_set_value ((GtkRange*) _tmp63_, (gdouble) (*_tmp64_));
		}
		style_inspector_update_link_types_with_style (self, style);
		style_inspector_update_link_dashes_with_style (self, style);
		_tmp65_ = node_bw;
		if (_tmp65_ != NULL) {
			GtkScale* _tmp66_;
			gint* _tmp67_;
			_tmp66_ = self->priv->_node_borderwidth;
			_tmp67_ = node_bw;
			gtk_range_set_value ((GtkRange*) _tmp66_, (gdouble) (*_tmp67_));
		}
		_tmp68_ = node_fill;
		if (_tmp68_ != NULL) {
			GtkSwitch* _tmp69_;
			gboolean* _tmp70_;
			_tmp69_ = self->priv->_node_fill;
			_tmp70_ = node_fill;
			gtk_switch_set_active (_tmp69_, (gboolean) (*_tmp70_));
		}
		if (node_margin != 0) {
			GtkScale* _tmp71_;
			_tmp71_ = self->priv->_node_margin;
			gtk_range_set_value ((GtkRange*) _tmp71_, (gdouble) node_margin);
		}
		if (node_padding != 0) {
			GtkScale* _tmp72_;
			_tmp72_ = self->priv->_node_padding;
			gtk_range_set_value ((GtkRange*) _tmp72_, (gdouble) node_padding);
		}
		_tmp73_ = style_get_node_font (style);
		_tmp74_ = _tmp73_;
		if (_tmp74_ != NULL) {
			GtkFontDialogButton* _tmp75_;
			PangoFontDescription* _tmp76_;
			PangoFontDescription* _tmp77_;
			_tmp75_ = self->priv->_node_font;
			_tmp76_ = style_get_node_font (style);
			_tmp77_ = _tmp76_;
			gtk_font_dialog_button_set_font_desc (_tmp75_, _tmp77_);
		}
		_tmp78_ = node_width;
		if (_tmp78_ != NULL) {
			GtkSpinButton* _tmp79_;
			gint* _tmp80_;
			_tmp79_ = self->priv->_node_width;
			_tmp80_ = node_width;
			gtk_spin_button_set_value (_tmp79_, (gdouble) ((gfloat) (*_tmp80_)));
		}
		_tmp81_ = node_markup;
		if (_tmp81_ != NULL) {
			GtkSwitch* _tmp82_;
			gboolean* _tmp83_;
			_tmp82_ = self->priv->_node_markup;
			_tmp83_ = node_markup;
			gtk_switch_set_active (_tmp82_, (gboolean) (*_tmp83_));
		}
		style_inspector_update_node_borders_with_style (self, style);
		style_inspector_update_node_text_align_with_style (self, style);
	}
	if (self->priv->_affects == STYLE_AFFECTS_ALL) {
		_tmp84_ = TRUE;
	} else {
		_tmp84_ = self->priv->_affects == STYLE_AFFECTS_SELECTED_CONNECTIONS;
	}
	if (_tmp84_) {
		gint* _tmp85_;
		gint* _tmp88_;
		PangoFontDescription* _tmp91_;
		PangoFontDescription* _tmp92_;
		gint* _tmp96_;
		gint* _tmp97_;
		gint* _tmp101_;
		style_inspector_update_conn_dashes_with_style (self, style);
		style_inspector_update_conn_arrows_with_style (self, style);
		style_inspector_update_conn_text_align_with_style (self, style);
		_tmp85_ = conn_arrow_size;
		if (_tmp85_ != NULL) {
			GtkScale* _tmp86_;
			gint* _tmp87_;
			_tmp86_ = self->priv->_conn_arrow_size;
			_tmp87_ = conn_arrow_size;
			gtk_range_set_value ((GtkRange*) _tmp86_, (gdouble) (*_tmp87_));
		}
		_tmp88_ = conn_line_width;
		if (_tmp88_ != NULL) {
			GtkScale* _tmp89_;
			gint* _tmp90_;
			_tmp89_ = self->priv->_conn_lwidth;
			_tmp90_ = conn_line_width;
			gtk_range_set_value ((GtkRange*) _tmp89_, (gdouble) (*_tmp90_));
		}
		_tmp91_ = style_get_connection_font (style);
		_tmp92_ = _tmp91_;
		if (_tmp92_ != NULL) {
			GtkFontDialogButton* _tmp93_;
			PangoFontDescription* _tmp94_;
			PangoFontDescription* _tmp95_;
			_tmp93_ = self->priv->_conn_font;
			_tmp94_ = style_get_connection_font (style);
			_tmp95_ = _tmp94_;
			gtk_font_dialog_button_set_font_desc (_tmp93_, _tmp95_);
		}
		_tmp96_ = style_get_connection_title_width (style);
		_tmp97_ = _tmp96_;
		if (_tmp97_ != NULL) {
			GtkSpinButton* _tmp98_;
			gint* _tmp99_;
			gint* _tmp100_;
			_tmp98_ = self->priv->_conn_twidth;
			_tmp99_ = style_get_connection_title_width (style);
			_tmp100_ = _tmp99_;
			gtk_spin_button_set_value (_tmp98_, *_tmp100_);
		}
		_tmp101_ = conn_padding;
		if (_tmp101_ != NULL) {
			GtkScale* _tmp102_;
			gint* _tmp103_;
			_tmp102_ = self->priv->_conn_padding;
			_tmp103_ = conn_padding;
			gtk_range_set_value ((GtkRange*) _tmp102_, (gdouble) (*_tmp103_));
		}
	}
	if (self->priv->_affects == STYLE_AFFECTS_ALL) {
		_tmp104_ = TRUE;
	} else {
		_tmp104_ = self->priv->_affects == STYLE_AFFECTS_SELECTED_CALLOUTS;
	}
	if (_tmp104_) {
		PangoFontDescription* _tmp105_;
		PangoFontDescription* _tmp106_;
		gint* _tmp110_;
		gint* _tmp113_;
		gint* _tmp116_;
		style_inspector_update_callout_text_align_with_style (self, style);
		_tmp105_ = style_get_callout_font (style);
		_tmp106_ = _tmp105_;
		if (_tmp106_ != NULL) {
			GtkFontDialogButton* _tmp107_;
			PangoFontDescription* _tmp108_;
			PangoFontDescription* _tmp109_;
			_tmp107_ = self->priv->_callout_font;
			_tmp108_ = style_get_callout_font (style);
			_tmp109_ = _tmp108_;
			gtk_font_dialog_button_set_font_desc (_tmp107_, _tmp109_);
		}
		_tmp110_ = callout_padding;
		if (_tmp110_ != NULL) {
			GtkScale* _tmp111_;
			gint* _tmp112_;
			_tmp111_ = self->priv->_callout_padding;
			_tmp112_ = callout_padding;
			gtk_range_set_value ((GtkRange*) _tmp111_, (gdouble) (*_tmp112_));
		}
		_tmp113_ = callout_pwidth;
		if (_tmp113_ != NULL) {
			GtkScale* _tmp114_;
			gint* _tmp115_;
			_tmp114_ = self->priv->_callout_ptr_width;
			_tmp115_ = callout_pwidth;
			gtk_range_set_value ((GtkRange*) _tmp114_, (gdouble) (*_tmp115_));
		}
		_tmp116_ = callout_plength;
		if (_tmp116_ != NULL) {
			GtkScale* _tmp117_;
			gint* _tmp118_;
			_tmp117_ = self->priv->_callout_ptr_length;
			_tmp118_ = callout_plength;
			gtk_range_set_value ((GtkRange*) _tmp117_, (gdouble) (*_tmp118_));
		}
	}
	self->priv->_ignore = FALSE;
	_tmp119_ = self->priv->_branch_margin;
	_tmp120_ = self->priv->_map;
	_tmp121_ = mind_map_get_editable (_tmp120_);
	_tmp122_ = _tmp121_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp119_, _tmp122_);
	_tmp123_ = self->priv->_branch_radius;
	_tmp124_ = self->priv->_map;
	_tmp125_ = mind_map_get_editable (_tmp124_);
	_tmp126_ = _tmp125_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp123_, _tmp126_);
	_tmp127_ = self->priv->_link_width;
	_tmp128_ = self->priv->_map;
	_tmp129_ = mind_map_get_editable (_tmp128_);
	_tmp130_ = _tmp129_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp127_, _tmp130_);
	_tmp131_ = self->priv->_link_arrow;
	_tmp132_ = self->priv->_map;
	_tmp133_ = mind_map_get_editable (_tmp132_);
	_tmp134_ = _tmp133_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp131_, _tmp134_);
	_tmp135_ = self->priv->_link_arrow_size;
	_tmp136_ = self->priv->_map;
	_tmp137_ = mind_map_get_editable (_tmp136_);
	_tmp138_ = _tmp137_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp135_, _tmp138_);
	_tmp139_ = self->priv->_node_borderwidth;
	_tmp140_ = self->priv->_map;
	_tmp141_ = mind_map_get_editable (_tmp140_);
	_tmp142_ = _tmp141_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp139_, _tmp142_);
	_tmp145_ = style_get_node_border (style);
	_tmp146_ = _tmp145_;
	if (_tmp146_ != NULL) {
		NodeBorder* _tmp147_;
		NodeBorder* _tmp148_;
		_tmp147_ = style_get_node_border (style);
		_tmp148_ = _tmp147_;
		_tmp144_ = node_border_is_fillable (_tmp148_);
	} else {
		_tmp144_ = FALSE;
	}
	if (_tmp144_) {
		MindMap* _tmp149_;
		gboolean _tmp150_;
		gboolean _tmp151_;
		_tmp149_ = self->priv->_map;
		_tmp150_ = mind_map_get_editable (_tmp149_);
		_tmp151_ = _tmp150_;
		_tmp143_ = _tmp151_;
	} else {
		_tmp143_ = FALSE;
	}
	_tmp152_ = self->priv->_node_fill;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp152_, _tmp143_);
	_tmp153_ = self->priv->_node_margin;
	_tmp154_ = self->priv->_map;
	_tmp155_ = mind_map_get_editable (_tmp154_);
	_tmp156_ = _tmp155_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp153_, _tmp156_);
	_tmp157_ = self->priv->_node_padding;
	_tmp158_ = self->priv->_map;
	_tmp159_ = mind_map_get_editable (_tmp158_);
	_tmp160_ = _tmp159_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp157_, _tmp160_);
	_tmp161_ = self->priv->_node_font;
	_tmp162_ = self->priv->_map;
	_tmp163_ = mind_map_get_editable (_tmp162_);
	_tmp164_ = _tmp163_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp161_, _tmp164_);
	_tmp165_ = self->priv->_node_width;
	_tmp166_ = self->priv->_map;
	_tmp167_ = mind_map_get_editable (_tmp166_);
	_tmp168_ = _tmp167_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp165_, _tmp168_);
	_tmp169_ = self->priv->_node_markup;
	_tmp170_ = self->priv->_map;
	_tmp171_ = mind_map_get_editable (_tmp170_);
	_tmp172_ = _tmp171_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp169_, _tmp172_);
	_tmp173_ = self->priv->_conn_lwidth;
	_tmp174_ = self->priv->_map;
	_tmp175_ = mind_map_get_editable (_tmp174_);
	_tmp176_ = _tmp175_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp173_, _tmp176_);
	_tmp177_ = self->priv->_conn_font;
	_tmp178_ = self->priv->_map;
	_tmp179_ = mind_map_get_editable (_tmp178_);
	_tmp180_ = _tmp179_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp177_, _tmp180_);
	_tmp181_ = self->priv->_conn_twidth;
	_tmp182_ = self->priv->_map;
	_tmp183_ = mind_map_get_editable (_tmp182_);
	_tmp184_ = _tmp183_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp181_, _tmp184_);
	_tmp185_ = self->priv->_conn_padding;
	_tmp186_ = self->priv->_map;
	_tmp187_ = mind_map_get_editable (_tmp186_);
	_tmp188_ = _tmp187_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp185_, _tmp188_);
	_tmp189_ = self->priv->_callout_font;
	_tmp190_ = self->priv->_map;
	_tmp191_ = mind_map_get_editable (_tmp190_);
	_tmp192_ = _tmp191_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp189_, _tmp192_);
	_tmp193_ = self->priv->_callout_padding;
	_tmp194_ = self->priv->_map;
	_tmp195_ = mind_map_get_editable (_tmp194_);
	_tmp196_ = _tmp195_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp193_, _tmp196_);
	_tmp197_ = self->priv->_callout_ptr_width;
	_tmp198_ = self->priv->_map;
	_tmp199_ = mind_map_get_editable (_tmp198_);
	_tmp200_ = _tmp199_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp197_, _tmp200_);
	_tmp201_ = self->priv->_callout_ptr_length;
	_tmp202_ = self->priv->_map;
	_tmp203_ = mind_map_get_editable (_tmp202_);
	_tmp204_ = _tmp203_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp201_, _tmp204_);
	_g_free0 (callout_plength);
	_g_free0 (callout_pwidth);
	_g_free0 (callout_padding);
	_g_free0 (conn_padding);
	_g_free0 (conn_line_width);
	_g_free0 (conn_arrow_size);
	_g_free0 (node_markup);
	_g_free0 (node_width);
	_g_free0 (node_fill);
	_g_free0 (node_bw);
	_g_free0 (link_arrow_size);
	_g_free0 (link_arrow);
	_g_free0 (link_width);
	_g_free0 (branch_radius);
	_g_free0 (branch_margin);
}

static void
style_inspector_handle_current_changed (StyleInspector* self)
{
	MindMap* _tmp0_;
	Node* _tmp1_;
	Node* _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_current_node (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_object_unref0 (_tmp2_);
	if (_tmp3_) {
		MindMap* _tmp4_;
		Node* _tmp5_;
		Node* _tmp6_;
		Style* _tmp7_;
		Style* _tmp8_;
		_tmp4_ = self->priv->_map;
		_tmp5_ = mind_map_get_current_node (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = node_get_style (_tmp6_);
		_tmp8_ = _tmp7_;
		style_inspector_update_ui_with_style (self, _tmp8_);
		_g_object_unref0 (_tmp6_);
	} else {
		MindMap* _tmp9_;
		Connection* _tmp10_;
		Connection* _tmp11_;
		gboolean _tmp12_;
		_tmp9_ = self->priv->_map;
		_tmp10_ = mind_map_get_current_connection (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_ != NULL;
		_g_object_unref0 (_tmp11_);
		if (_tmp12_) {
			MindMap* _tmp13_;
			Connection* _tmp14_;
			Connection* _tmp15_;
			Style* _tmp16_;
			Style* _tmp17_;
			_tmp13_ = self->priv->_map;
			_tmp14_ = mind_map_get_current_connection (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = connection_get_style (_tmp15_);
			_tmp17_ = _tmp16_;
			style_inspector_update_ui_with_style (self, _tmp17_);
			_g_object_unref0 (_tmp15_);
		} else {
			MindMap* _tmp18_;
			Callout* _tmp19_;
			Callout* _tmp20_;
			gboolean _tmp21_;
			_tmp18_ = self->priv->_map;
			_tmp19_ = mind_map_get_current_callout (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = _tmp20_ != NULL;
			_g_object_unref0 (_tmp20_);
			if (_tmp21_) {
				MindMap* _tmp22_;
				Callout* _tmp23_;
				Callout* _tmp24_;
				Style* _tmp25_;
				Style* _tmp26_;
				_tmp22_ = self->priv->_map;
				_tmp23_ = mind_map_get_current_callout (_tmp22_);
				_tmp24_ = _tmp23_;
				_tmp25_ = callout_get_style (_tmp24_);
				_tmp26_ = _tmp25_;
				style_inspector_update_ui_with_style (self, _tmp26_);
				_g_object_unref0 (_tmp24_);
			}
		}
	}
	style_inspector_handle_ui_changed (self);
}

static void
style_inspector_handle_ui_changed (StyleInspector* self)
{
	Selection* selected = NULL;
	MindMap* _tmp0_;
	Selection* _tmp1_;
	Selection* _tmp2_;
	Selection* _tmp3_;
	Selection* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_map;
	_tmp1_ = mind_map_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _selection_ref0 (_tmp2_);
	selected = _tmp3_;
	_tmp4_ = selected;
	if (selection_num_nodes (_tmp4_) > 0) {
		style_inspector_set_affects (self, STYLE_AFFECTS_SELECTED_NODES);
	} else {
		Selection* _tmp5_;
		_tmp5_ = selected;
		if (selection_num_connections (_tmp5_) > 0) {
			style_inspector_set_affects (self, STYLE_AFFECTS_SELECTED_CONNECTIONS);
		} else {
			Selection* _tmp6_;
			_tmp6_ = selected;
			if (selection_num_callouts (_tmp6_) > 0) {
				style_inspector_set_affects (self, STYLE_AFFECTS_SELECTED_CALLOUTS);
			} else {
				style_inspector_set_affects (self, STYLE_AFFECTS_ALL);
			}
		}
	}
	_selection_unref0 (selected);
}

void
style_inspector_grab_first (StyleInspector* self)
{
	ModeButtons* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_link_types;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
}

static void
style_inspector_class_init (StyleInspectorClass * klass,
                            gpointer klass_data)
{
	Styles* _tmp0_;
	style_inspector_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &StyleInspector_private_offset);
	G_OBJECT_CLASS (klass)->finalize = style_inspector_finalize;
	style_inspector_signals[STYLE_INSPECTOR_UPDATE_ICONS_SIGNAL] = g_signal_new ("update-icons", TYPE_STYLE_INSPECTOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	style_inspector_signals[STYLE_INSPECTOR_EDITABLE_CHANGED_SIGNAL] = g_signal_new ("editable-changed", TYPE_STYLE_INSPECTOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	_tmp0_ = styles_new ();
	style_inspector_styles = _tmp0_;
}

static void
style_inspector_instance_init (StyleInspector * self,
                               gpointer klass)
{
	self->priv = style_inspector_get_instance_private (self);
	self->priv->_map = NULL;
	self->priv->_change_add = TRUE;
	self->priv->_ignore = FALSE;
	self->priv->_curr_style = NULL;
	self->priv->_clipboard_style = NULL;
	self->priv->_clipboard_affect = NULL;
}

static void
style_inspector_finalize (GObject * obj)
{
	StyleInspector * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_STYLE_INSPECTOR, StyleInspector);
	_g_object_unref0 (self->priv->_win);
	_mind_map_unref0 (self->priv->_map);
	_g_object_unref0 (self->priv->_settings);
	_g_object_unref0 (self->priv->_branch_radius);
	_g_object_unref0 (self->priv->_branch_radius_box);
	_g_object_unref0 (self->priv->_branch_margin);
	_g_object_unref0 (self->priv->_link_types);
	_g_object_unref0 (self->priv->_link_width);
	_g_object_unref0 (self->priv->_link_arrow);
	_g_object_unref0 (self->priv->_link_arrow_size);
	_g_object_unref0 (self->priv->_link_dash);
	_g_object_unref0 (self->priv->_node_borders);
	_g_object_unref0 (self->priv->_node_borderwidth);
	_g_object_unref0 (self->priv->_node_fill);
	_g_object_unref0 (self->priv->_node_margin);
	_g_object_unref0 (self->priv->_node_padding);
	_g_object_unref0 (self->priv->_node_font);
	_g_object_unref0 (self->priv->_node_text_align);
	_g_object_unref0 (self->priv->_node_width);
	_g_object_unref0 (self->priv->_node_markup);
	_g_object_unref0 (self->priv->_conn_dash);
	_g_object_unref0 (self->priv->_conn_arrow);
	_g_object_unref0 (self->priv->_conn_arrow_size);
	_g_object_unref0 (self->priv->_conn_lwidth);
	_g_object_unref0 (self->priv->_conn_padding);
	_g_object_unref0 (self->priv->_conn_font);
	_g_object_unref0 (self->priv->_conn_text_align);
	_g_object_unref0 (self->priv->_conn_twidth);
	_g_object_unref0 (self->priv->_callout_font);
	_g_object_unref0 (self->priv->_callout_text_align);
	_g_object_unref0 (self->priv->_callout_padding);
	_g_object_unref0 (self->priv->_callout_ptr_width);
	_g_object_unref0 (self->priv->_callout_ptr_length);
	_g_object_unref0 (self->priv->_affects_label);
	_g_object_unref0 (self->priv->_branch_group);
	_g_object_unref0 (self->priv->_link_group);
	_g_object_unref0 (self->priv->_node_group);
	_g_object_unref0 (self->priv->_conn_group);
	_g_object_unref0 (self->priv->_callout_group);
	_g_object_unref0 (self->priv->_conn_exp);
	_g_object_unref0 (self->priv->_callout_exp);
	_style_unref0 (self->priv->_curr_style);
	_g_object_unref0 (self->priv->_paste_btn);
	_g_object_unref0 (self->priv->_template_btn);
	_style_unref0 (self->priv->_clipboard_style);
	_g_free0 (self->priv->_clipboard_affect);
	G_OBJECT_CLASS (style_inspector_parent_class)->finalize (obj);
}

static GType
style_inspector_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (StyleInspectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) style_inspector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (StyleInspector), 0, (GInstanceInitFunc) style_inspector_instance_init, NULL };
	GType style_inspector_type_id;
	style_inspector_type_id = g_type_register_static (gtk_box_get_type (), "StyleInspector", &g_define_type_info, 0);
	StyleInspector_private_offset = g_type_add_instance_private (style_inspector_type_id, sizeof (StyleInspectorPrivate));
	return style_inspector_type_id;
}

GType
style_inspector_get_type (void)
{
	static volatile gsize style_inspector_type_id__once = 0;
	if (g_once_init_enter (&style_inspector_type_id__once)) {
		GType style_inspector_type_id;
		style_inspector_type_id = style_inspector_get_type_once ();
		g_once_init_leave (&style_inspector_type_id__once, style_inspector_type_id);
	}
	return style_inspector_type_id__once;
}

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;
}

