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

/*
Copyright (C) 2012 2013 2014 2015 Johan Mattsson

This library is free software; you can redistribute it and/or modify 
it under the terms of the GNU Lesser General Public License as 
published by the Free Software Foundation; either version 3 of the 
License, or (at your option) any later version.

This library 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 
Lesser General Public License for more details.
*/

#include "birdfont.h"
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.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

enum  {
	BIRD_FONT_DRAWING_TOOLS_0_PROPERTY,
	BIRD_FONT_DRAWING_TOOLS_NUM_PROPERTIES
};
static GParamSpec* bird_font_drawing_tools_properties[BIRD_FONT_DRAWING_TOOLS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block11Data Block11Data;
typedef struct _Block12Data Block12Data;
#define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
typedef struct _Block13Data Block13Data;
typedef struct _Block14Data Block14Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _BirdFontDrawingToolsPrivate {
	BirdFontGlyphCanvas* glyph_canvas;
	BirdFontTool* outline;
	BirdFontPointTool* point_tool;
	BirdFontTool* show_bg;
	BirdFontTool* bg_selection;
	BirdFontTool* high_contrast_background;
	BirdFontTool* auto_trace;
	BirdFontTool* delete_background;
	BirdFontTool* rectangle;
	BirdFontTool* circle;
	BirdFontSpinButton* x_coordinate;
	BirdFontSpinButton* y_coordinate;
	BirdFontSpinButton* rotation;
	BirdFontSpinButton* width;
	BirdFontSpinButton* height;
	BirdFontTool* tie_handles;
	BirdFontTool* reflect_handle;
	BirdFontTool* create_line;
	BirdFontTool* close_path_tool;
	BirdFontTool* delete_button;
	BirdFontTool* undo_tool;
	BirdFontTool* select_all_button;
	BirdFontOrientationTool* reverse_path_tool;
	BirdFontTool* move_layer;
	BirdFontTool* flip_vertical;
	BirdFontTool* flip_horizontal;
	BirdFontTool* full_height_tool;
	BirdFontText* backgrounds_headline;
	BirdFontText* control_points_headline;
	BirdFontText* object_tools_headline;
};

struct _Block11Data {
	int _ref_count_;
	BirdFontDrawingTools* self;
	gboolean insert_points;
};

struct _Block12Data {
	int _ref_count_;
	Block11Data * _data11_;
	BirdFontTool* test_case;
};

struct _Block13Data {
	int _ref_count_;
	BirdFontDrawingTools* self;
	BirdFontTool* current_tool;
};

struct _Block14Data {
	int _ref_count_;
	BirdFontSpinButton* grid_width;
};

static gint BirdFontDrawingTools_private_offset;
static gpointer bird_font_drawing_tools_parent_class = NULL;
static BirdFontExpander* bird_font_drawing_tools__draw_tools;
static BirdFontExpander* bird_font_drawing_tools__draw_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__grid_expander;
static BirdFontExpander* bird_font_drawing_tools__grid_expander = NULL;
static BirdFontExpander* bird_font_drawing_tools__shape_tools;
static BirdFontExpander* bird_font_drawing_tools__shape_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__draw_tool_modifiers;
static BirdFontExpander* bird_font_drawing_tools__draw_tool_modifiers = NULL;
static BirdFontExpander* bird_font_drawing_tools__layer_tools;
static BirdFontExpander* bird_font_drawing_tools__layer_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__layer_settings;
static BirdFontExpander* bird_font_drawing_tools__layer_settings = NULL;
static BirdFontExpander* bird_font_drawing_tools__stroke_expander;
static BirdFontExpander* bird_font_drawing_tools__stroke_expander = NULL;
static BirdFontExpander* bird_font_drawing_tools__zoombar_tool;
static BirdFontExpander* bird_font_drawing_tools__zoombar_tool = NULL;
static BirdFontExpander* bird_font_drawing_tools__guideline_tools;
static BirdFontExpander* bird_font_drawing_tools__guideline_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__font_name;
static BirdFontExpander* bird_font_drawing_tools__font_name = NULL;
static BirdFontExpander* bird_font_drawing_tools__key_tools;
static BirdFontExpander* bird_font_drawing_tools__key_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__test_tools;
static BirdFontExpander* bird_font_drawing_tools__test_tools = NULL;
static BirdFontExpander* bird_font_drawing_tools__grid;
static BirdFontExpander* bird_font_drawing_tools__grid = NULL;
BirdFontPointType bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_DOUBLE_CURVE;
static BirdFontTool* bird_font_drawing_tools__add_stroke;
static BirdFontTool* bird_font_drawing_tools__add_stroke = NULL;
BirdFontSpinButton* bird_font_drawing_tools_object_stroke = NULL;
static BirdFontMoveTool* bird_font_drawing_tools__move_tool;
static BirdFontMoveTool* bird_font_drawing_tools__move_tool = NULL;
BirdFontPenTool* bird_font_drawing_tools_pen_tool = NULL;
BirdFontBezierTool* bird_font_drawing_tools_bezier_tool = NULL;
BirdFontZoomTool* bird_font_drawing_tools_zoom_tool = NULL;
BirdFontResizeTool* bird_font_drawing_tools_resize_tool = NULL;
BirdFontTrackTool* bird_font_drawing_tools_track_tool = NULL;
BirdFontBackgroundTool* bird_font_drawing_tools_move_background = NULL;
BirdFontTool* bird_font_drawing_tools_move_canvas = NULL;
BirdFontTool* bird_font_drawing_tools_add_layer = NULL;
BirdFontTool* bird_font_drawing_tools_show_layers = NULL;
static BirdFontTool* bird_font_drawing_tools_quadratic_points;
static BirdFontTool* bird_font_drawing_tools_quadratic_points = NULL;
static BirdFontTool* bird_font_drawing_tools_cubic_points;
static BirdFontTool* bird_font_drawing_tools_cubic_points = NULL;
static BirdFontTool* bird_font_drawing_tools_double_points;
static BirdFontTool* bird_font_drawing_tools_double_points = NULL;
static BirdFontTool* bird_font_drawing_tools_convert_points;
static BirdFontTool* bird_font_drawing_tools_convert_points = NULL;
BirdFontCutBackgroundTool* bird_font_drawing_tools_cut_background = NULL;
BirdFontSpinButton* bird_font_drawing_tools_background_threshold = NULL;
BirdFontSpinButton* bird_font_drawing_tools_background_scale = NULL;
BirdFontSpinButton* bird_font_drawing_tools_auto_trace_resolution = NULL;
BirdFontSpinButton* bird_font_drawing_tools_auto_trace_simplify = NULL;
static BirdFontTool* bird_font_drawing_tools__help_lines;
static BirdFontTool* bird_font_drawing_tools__help_lines = NULL;
static BirdFontTool* bird_font_drawing_tools__xheight_help_lines;
static BirdFontTool* bird_font_drawing_tools__xheight_help_lines = NULL;
static BirdFontTool* bird_font_drawing_tools__background_help_lines;
static BirdFontTool* bird_font_drawing_tools__background_help_lines = NULL;
static BirdFontGridTool* bird_font_drawing_tools__show_grid;
static BirdFontGridTool* bird_font_drawing_tools__show_grid = NULL;
static BirdFontTool* bird_font_drawing_tools__lock_grid;
static BirdFontTool* bird_font_drawing_tools__lock_grid = NULL;
static BirdFontTool* bird_font_drawing_tools_line_cap_butt;
static BirdFontTool* bird_font_drawing_tools_line_cap_butt = NULL;
static BirdFontTool* bird_font_drawing_tools_line_cap_round;
static BirdFontTool* bird_font_drawing_tools_line_cap_round = NULL;
static BirdFontTool* bird_font_drawing_tools_line_cap_square;
static BirdFontTool* bird_font_drawing_tools_line_cap_square = NULL;

static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static void __lambda416_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda416__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda418_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda418__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda419_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda419__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda420_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda420__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda421_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda421__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda422_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda422__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda423_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda423__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda424_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda424__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda425_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda425__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda426_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda426__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda427_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda427__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda428_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda428__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda429_ (Block11Data* _data11_,
                   BirdFontTool* _self_);
static void ___lambda429__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda430_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void bird_font_drawing_tools_update_type_selection (BirdFontDrawingTools* self);
static void ___lambda430__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda432_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda432__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda433_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda433__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda434_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda434__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda435_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda435__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda436_ (BirdFontDrawingTools* self);
static void ___lambda436__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                      gpointer self);
static void __lambda437_ (BirdFontDrawingTools* self);
static void ___lambda437__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                          gpointer self);
static void __lambda438_ (BirdFontDrawingTools* self);
static void ___lambda438__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                           gpointer self);
static void __lambda439_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda439__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda440_ (BirdFontDrawingTools* self);
static void ___lambda440__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                      gpointer self);
static void __lambda441_ (BirdFontDrawingTools* self);
static void ___lambda441__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                          gpointer self);
static void __lambda442_ (BirdFontDrawingTools* self);
static void ___lambda442__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                           gpointer self);
static void __lambda443_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda443__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda444_ (BirdFontDrawingTools* self,
                   gdouble angle);
static void ___lambda444__bird_font_resize_tool_objects_rotated (BirdFontResizeTool* _sender,
                                                          gdouble angle,
                                                          gpointer self);
static void __lambda445_ (BirdFontDrawingTools* self);
static void ___lambda445__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                           gpointer self);
static void __lambda446_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda446__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda447_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda447__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda448_ (BirdFontDrawingTools* self,
                   gdouble w,
                   gdouble h);
static void ___lambda448__bird_font_resize_tool_objects_resized (BirdFontResizeTool* _sender,
                                                          gdouble width,
                                                          gdouble height,
                                                          gpointer self);
static void __lambda449_ (BirdFontDrawingTools* self);
static void ___lambda449__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                           gpointer self);
static void __lambda450_ (BirdFontDrawingTools* self);
static void ___lambda450__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                      gpointer self);
static void __lambda451_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda451__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda452_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda452__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda453_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda453__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda454_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda454__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda455_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda455__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda456_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda456__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda457_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda457__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda458_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda458__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda459_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda459__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda460_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda460__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda461_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda461__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda462_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda462__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda463_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda463__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda464_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda464__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda465_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
VALA_EXTERN void bird_font_background_tool_import_background_image (void);
static void ___lambda465__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda466_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda466__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda467_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda467__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda468_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda468__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda469_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda469__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda470_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void bird_font_drawing_tools_auto_trace_background (BirdFontDrawingTools* self);
static void _bird_font_drawing_tools_auto_trace_background_bird_font_task_runnable (gpointer self);
static void ___lambda470__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda471_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda471__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda472_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda472__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda473_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda473__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda474_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda474__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda475_ (BirdFontDrawingTools* self,
                   BirdFontSpinButton* _self_);
static void ___lambda475__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda476_ (BirdFontDrawingTools* self);
static void ___lambda476__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                          gpointer self);
static void __lambda477_ (BirdFontDrawingTools* self);
static void ___lambda477__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                      gpointer self);
static void __lambda478_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda478__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda479_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda479__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda480_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda480__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda481_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda481__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static void ___lambda482_ (BirdFontDrawingTools* self,
                    BirdFontTool* _self_);
VALA_EXTERN gboolean bird_font_test_bird_font_is_running (void);
VALA_EXTERN void bird_font_test_bird_font_pause (void);
VALA_EXTERN void bird_font_test_bird_font_continue (void);
static void ____lambda482__bird_font_tool_select_action (BirdFontTool* _sender,
                                                  BirdFontTool* selected,
                                                  gpointer self);
static void ___lambda483_ (BirdFontDrawingTools* self,
                    BirdFontTool* _self_);
VALA_EXTERN gboolean bird_font_test_bird_font_is_slow_test (void);
VALA_EXTERN void bird_font_test_bird_font_set_slow_test (gboolean s);
static void ____lambda483__bird_font_tool_select_action (BirdFontTool* _sender,
                                                  BirdFontTool* selected,
                                                  gpointer self);
VALA_EXTERN gchar* bird_font_bird_font_get_argument (const gchar* param);
static gboolean ____lambda484_ (Block12Data* _data12_);
static gboolean _____lambda484__gsource_func (gpointer self);
static void __lambda485_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda485__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda486_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda486__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda487_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda487__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda488_ (BirdFontDrawingTools* self);
static void ___lambda488__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda489_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda489__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda490_ (BirdFontDrawingTools* self,
                   gdouble z);
static void ___lambda490__bird_font_zoom_bar_new_zoom (BirdFontZoomBar* _sender,
                                                gdouble zoom_level,
                                                gpointer self);
static void __lambda491_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda491__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda492_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda492__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda493_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda493__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda494_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda494__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda495_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda495__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda496_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda496__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda497_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda497__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void __lambda501_ (BirdFontDrawingTools* self,
                   BirdFontTool* _self_);
static void ___lambda501__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static void bird_font_drawing_tools_add_expander (BirdFontDrawingTools* self,
                                           BirdFontExpander* e);
static gboolean __lambda502_ (BirdFontDrawingTools* self);
static gboolean ___lambda502__gsource_func (gpointer self);
static void __lambda504_ (BirdFontDrawingTools* self,
                   BirdFontTab* tab);
static void bird_font_drawing_tools_update_line_selection (BirdFontDrawingTools* self,
                                                    BirdFontGlyph* glyph);
static void ___lambda504__bird_font_tab_bar_signal_tab_selected (BirdFontTabBar* _sender,
                                                          BirdFontTab* selected_tab,
                                                          gpointer self);
static void bird_font_drawing_tools_hide_all_modifiers (BirdFontDrawingTools* self);
static void bird_font_drawing_tools_show_background_tool_modifiers (BirdFontDrawingTools* self);
static void bird_font_drawing_tools_show_point_tool_modifiers (BirdFontDrawingTools* self);
static void bird_font_drawing_tools_show_object_tool_modifiers (BirdFontDrawingTools* self);
static void bird_font_drawing_tools_real_reset_selection (BirdFontToolCollection* base,
                                                   BirdFontTool* current_tool);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static gboolean __lambda417_ (Block13Data* _data13_);
static gboolean ___lambda417__gsource_func (gpointer self);
static gboolean __lambda431_ (BirdFontDrawingTools* self);
static gboolean ___lambda431__gsource_func (gpointer self);
static GeeArrayList* bird_font_drawing_tools_real_get_expanders (BirdFontToolCollection* base);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static void __lambda291_ (Block14Data* _data14_,
                   BirdFontSpinButton* _self_);
static void ___lambda291__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                           BirdFontSpinButton* selected,
                                                           gpointer self);
static void __lambda292_ (BirdFontTool* _self_);
static void ___lambda292__bird_font_tool_select_action (BirdFontTool* _sender,
                                                 BirdFontTool* selected,
                                                 gpointer self);
static GeeArrayList* bird_font_drawing_tools_real_get_displays (BirdFontToolCollection* base);
static void bird_font_drawing_tools_finalize (GObject * obj);
static GType bird_font_drawing_tools_get_type_once (void);
static void _vala_bird_font_drawing_tools_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_bird_font_drawing_tools_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
bird_font_drawing_tools_get_instance_private (BirdFontDrawingTools* self)
{
	return G_STRUCT_MEMBER_P (self, BirdFontDrawingTools_private_offset);
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		BirdFontDrawingTools* self;
		self = _data11_->self;
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

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

static void
__lambda416_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda416__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda416_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda418_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda418__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda418_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda419_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda419__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda419_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda420_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda420__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda420_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda421_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda421__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda421_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda422_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda422__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda422_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda423_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda423__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda423_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda424_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda424__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda424_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda425_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda425__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda425_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda426_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_tab_content_key_press ((guint) BIRD_FONT_KEY_DEL);
}

static void
___lambda426__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda426_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda427_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	BirdFontPointTool* _tmp3_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp3_ = self->priv->point_tool;
	if (bird_font_tool_is_selected ((BirdFontTool*) _tmp3_)) {
		_tmp2_ = TRUE;
	} else {
		BirdFontPenTool* _tmp4_;
		_tmp4_ = bird_font_drawing_tools_pen_tool;
		_tmp2_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp4_);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		BirdFontTrackTool* _tmp5_;
		_tmp5_ = bird_font_drawing_tools_track_tool;
		_tmp1_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp5_);
	}
	if (_tmp1_) {
		BirdFontPenTool* _tmp6_;
		BirdFontGlyph* _tmp7_;
		_tmp6_ = bird_font_drawing_tools_pen_tool;
		bird_font_pen_tool_select_all_points (_tmp6_);
		_tmp7_ = g;
		bird_font_glyph_open_path (_tmp7_);
	} else {
		BirdFontMoveTool* _tmp8_;
		BirdFontMoveTool* _tmp9_;
		_tmp8_ = bird_font_drawing_tools_get_move_tool ();
		_tmp9_ = _tmp8_;
		bird_font_move_tool_select_all_paths (_tmp9_);
	}
	_g_object_unref0 (g);
}

static void
___lambda427__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda427_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda428_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_tab_content_undo ();
}

static void
___lambda428__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda428_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda429_ (Block11Data* _data11_,
              BirdFontTool* _self_)
{
	BirdFontDrawingTools* self;
	BirdFontTool* _tmp0_;
	self = _data11_->self;
	g_return_if_fail (_self_ != NULL);
	_data11_->insert_points = !_data11_->insert_points;
	_tmp0_ = self->insert_point_on_path_tool;
	bird_font_tool_set_selected (_tmp0_, _data11_->insert_points);
}

static void
___lambda429__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda429_ (self, selected);
}

static void
__lambda430_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_QUADRATIC;
	bird_font_preferences_set ("point_type", "quadratic_points");
	bird_font_drawing_tools_update_type_selection (self);
}

static void
___lambda430__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda430_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda432_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_CUBIC;
	bird_font_preferences_set ("point_type", "cubic_points");
	bird_font_drawing_tools_update_type_selection (self);
}

static void
___lambda432__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda432_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda433_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_DOUBLE_CURVE;
	bird_font_preferences_set ("point_type", "double_points");
	bird_font_drawing_tools_update_type_selection (self);
}

static void
___lambda433__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda433_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda434_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_pen_tool_convert_point_types ();
	bird_font_glyph_canvas_redraw ();
	bird_font_drawing_tools_update_type_selection (self);
	bird_font_pen_tool_reset_stroke ();
}

static void
___lambda434__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda434_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda435_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyph* _tmp0_;
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	gdouble delta = 0.0;
	BirdFontGlyph* _tmp1_;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	BirdFontSpinButton* _tmp6_;
	BirdFontGlyph* _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	glyph = _tmp0_;
	_tmp1_ = glyph;
	bird_font_glyph_selection_boundaries (_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	x = _tmp2_;
	y = _tmp3_;
	w = _tmp4_;
	h = _tmp5_;
	_tmp6_ = self->priv->x_coordinate;
	_tmp7_ = glyph;
	_tmp8_ = bird_font_glyph_get_left_limit (_tmp7_);
	_tmp9_ = _tmp8_;
	delta = (bird_font_spin_button_get_value (_tmp6_) - x) + _tmp9_;
	{
		GeeArrayList* _path_list = NULL;
		BirdFontGlyph* _tmp10_;
		GeeArrayList* _tmp11_;
		gint _path_size = 0;
		GeeArrayList* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		gint _path_index = 0;
		_tmp10_ = glyph;
		_tmp11_ = _tmp10_->active_paths;
		_path_list = _tmp11_;
		_tmp12_ = _path_list;
		_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
		_tmp14_ = _tmp13_;
		_path_size = _tmp14_;
		_path_index = -1;
		while (TRUE) {
			gint _tmp15_;
			gint _tmp16_;
			BirdFontPath* path = NULL;
			GeeArrayList* _tmp17_;
			gpointer _tmp18_;
			BirdFontPath* _tmp19_;
			_path_index = _path_index + 1;
			_tmp15_ = _path_index;
			_tmp16_ = _path_size;
			if (!(_tmp15_ < _tmp16_)) {
				break;
			}
			_tmp17_ = _path_list;
			_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _path_index);
			path = (BirdFontPath*) _tmp18_;
			_tmp19_ = path;
			bird_font_path_move (_tmp19_, delta, (gdouble) 0);
			_g_object_unref0 (path);
		}
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (glyph);
}

static void
___lambda435__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda435_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda436_ (BirdFontDrawingTools* self)
{
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	glyph = _tmp0_;
	_tmp1_ = self->priv->x_coordinate;
	_tmp2_ = bird_font_glyph_get_left_limit (glyph);
	_tmp3_ = _tmp2_;
	bird_font_spin_button_set_value_round (_tmp1_, (bird_font_move_tool_selection_box_center_x - (bird_font_move_tool_selection_box_width / 2)) - _tmp3_, TRUE, FALSE);
	_g_object_unref0 (glyph);
}

static void
___lambda436__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                 gpointer self)
{
	__lambda436_ ((BirdFontDrawingTools*) self);
}

static void
__lambda437_ (BirdFontDrawingTools* self)
{
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	gdouble _tmp2_;
	gdouble _tmp3_;
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	glyph = _tmp0_;
	_tmp1_ = self->priv->x_coordinate;
	_tmp2_ = bird_font_glyph_get_left_limit (glyph);
	_tmp3_ = _tmp2_;
	bird_font_spin_button_set_value_round (_tmp1_, (bird_font_move_tool_selection_box_center_x - (bird_font_move_tool_selection_box_width / 2)) - _tmp3_, TRUE, FALSE);
	_g_object_unref0 (glyph);
}

static void
___lambda437__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                     gpointer self)
{
	__lambda437_ ((BirdFontDrawingTools*) self);
}

static void
__lambda438_ (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = self->priv->x_coordinate;
	bird_font_spin_button_set_value_round (_tmp0_, (gdouble) 0, TRUE, FALSE);
	_tmp1_ = self->priv->x_coordinate;
	bird_font_spin_button_hide_value (_tmp1_);
}

static void
___lambda438__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                      gpointer self)
{
	__lambda438_ ((BirdFontDrawingTools*) self);
}

static void
__lambda439_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontFont* font = NULL;
	BirdFontFont* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	glyph = _tmp0_;
	_tmp1_ = bird_font_bird_font_get_current_font ();
	font = _tmp1_;
	_tmp2_ = glyph;
	bird_font_glyph_selection_boundaries (_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_);
	x = _tmp3_;
	y = _tmp4_;
	w = _tmp5_;
	h = _tmp6_;
	{
		GeeArrayList* _path_list = NULL;
		BirdFontGlyph* _tmp7_;
		GeeArrayList* _tmp8_;
		gint _path_size = 0;
		GeeArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _path_index = 0;
		_tmp7_ = glyph;
		_tmp8_ = _tmp7_->active_paths;
		_path_list = _tmp8_;
		_tmp9_ = _path_list;
		_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_path_size = _tmp11_;
		_path_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			BirdFontPath* path = NULL;
			GeeArrayList* _tmp14_;
			gpointer _tmp15_;
			BirdFontPath* _tmp16_;
			BirdFontSpinButton* _tmp17_;
			BirdFontFont* _tmp18_;
			_path_index = _path_index + 1;
			_tmp12_ = _path_index;
			_tmp13_ = _path_size;
			if (!(_tmp12_ < _tmp13_)) {
				break;
			}
			_tmp14_ = _path_list;
			_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _path_index);
			path = (BirdFontPath*) _tmp15_;
			_tmp16_ = path;
			_tmp17_ = self->priv->y_coordinate;
			_tmp18_ = font;
			bird_font_path_move (_tmp16_, (gdouble) 0, (bird_font_spin_button_get_value (_tmp17_) - (y - h)) - _tmp18_->base_line);
			_g_object_unref0 (path);
		}
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (font);
	_g_object_unref0 (glyph);
}

static void
___lambda439__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda439_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda440_ (BirdFontDrawingTools* self)
{
	BirdFontFont* font = NULL;
	BirdFontFont* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = bird_font_bird_font_get_current_font ();
	font = _tmp0_;
	_tmp1_ = self->priv->y_coordinate;
	bird_font_spin_button_set_value_round (_tmp1_, (bird_font_move_tool_selection_box_center_y - (bird_font_move_tool_selection_box_height / 2)) + font->base_line, TRUE, FALSE);
	_g_object_unref0 (font);
}

static void
___lambda440__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                 gpointer self)
{
	__lambda440_ ((BirdFontDrawingTools*) self);
}

static void
__lambda441_ (BirdFontDrawingTools* self)
{
	BirdFontFont* font = NULL;
	BirdFontFont* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = bird_font_bird_font_get_current_font ();
	font = _tmp0_;
	_tmp1_ = self->priv->y_coordinate;
	bird_font_spin_button_set_value_round (_tmp1_, (bird_font_move_tool_selection_box_center_y - (bird_font_move_tool_selection_box_height / 2)) + font->base_line, TRUE, FALSE);
	_g_object_unref0 (font);
}

static void
___lambda441__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                     gpointer self)
{
	__lambda441_ ((BirdFontDrawingTools*) self);
}

static void
__lambda442_ (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = self->priv->y_coordinate;
	bird_font_spin_button_set_value_round (_tmp0_, (gdouble) 0, TRUE, FALSE);
	_tmp1_ = self->priv->y_coordinate;
	bird_font_spin_button_hide_value (_tmp1_);
}

static void
___lambda442__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                      gpointer self)
{
	__lambda442_ ((BirdFontDrawingTools*) self);
}

static void
__lambda443_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyph* _tmp0_;
	gdouble angle = 0.0;
	BirdFontPath* last_path = NULL;
	BirdFontGlyph* _tmp1_;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	BirdFontGlyph* _tmp6_;
	GeeArrayList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	glyph = _tmp0_;
	angle = ((bird_font_spin_button_get_value (_self_) / 360) * 2) * G_PI;
	_tmp1_ = glyph;
	bird_font_glyph_selection_boundaries (_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	x = _tmp2_;
	y = _tmp3_;
	w = _tmp4_;
	h = _tmp5_;
	x += w / 2;
	y -= h / 2;
	_tmp6_ = glyph;
	_tmp7_ = _tmp6_->active_paths;
	_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ > 0) {
		BirdFontGlyph* _tmp10_;
		GeeArrayList* _tmp11_;
		BirdFontGlyph* _tmp12_;
		GeeArrayList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gpointer _tmp16_;
		BirdFontResizeTool* _tmp17_;
		BirdFontPath* _tmp18_;
		_tmp10_ = glyph;
		_tmp11_ = _tmp10_->active_paths;
		_tmp12_ = glyph;
		_tmp13_ = _tmp12_->active_paths;
		_tmp14_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp15_ - 1);
		_g_object_unref0 (last_path);
		last_path = (BirdFontPath*) _tmp16_;
		_tmp17_ = bird_font_drawing_tools_resize_tool;
		_tmp18_ = last_path;
		bird_font_resize_tool_rotate_selected_paths (_tmp17_, angle - _tmp18_->rotation, x, y);
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (last_path);
	_g_object_unref0 (glyph);
}

static void
___lambda443__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda443_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda444_ (BirdFontDrawingTools* self,
              gdouble angle)
{
	BirdFontSpinButton* _tmp0_;
	_tmp0_ = self->priv->rotation;
	bird_font_spin_button_set_value_round (_tmp0_, angle, TRUE, FALSE);
	bird_font_pen_tool_reset_stroke ();
}

static void
___lambda444__bird_font_resize_tool_objects_rotated (BirdFontResizeTool* _sender,
                                                     gdouble angle,
                                                     gpointer self)
{
	__lambda444_ ((BirdFontDrawingTools*) self, angle);
}

static void
__lambda445_ (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = self->priv->rotation;
	bird_font_spin_button_set_value_round (_tmp0_, (gdouble) 0, TRUE, FALSE);
	_tmp1_ = self->priv->rotation;
	bird_font_spin_button_hide_value (_tmp1_);
}

static void
___lambda445__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                      gpointer self)
{
	__lambda445_ ((BirdFontDrawingTools*) self);
}

static void
__lambda446_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	BirdFontGlyph* glyph = NULL;
	gdouble new_size = 0.0;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (glyph);
	glyph = _tmp0_;
	_tmp1_ = glyph;
	bird_font_glyph_selection_boundaries (_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	x = _tmp2_;
	y = _tmp3_;
	w = _tmp4_;
	h = _tmp5_;
	new_size = bird_font_spin_button_get_value (_self_) / w;
	if (bird_font_spin_button_get_value (_self_) > ((gdouble) 0)) {
		_tmp6_ = new_size != ((gdouble) 1);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		BirdFontResizeTool* _tmp7_;
		_tmp7_ = bird_font_drawing_tools_resize_tool;
		bird_font_resize_tool_resize_selected_paths (_tmp7_, new_size, new_size);
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (glyph);
}

static void
___lambda446__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda446_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda447_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble w = 0.0;
	gdouble h = 0.0;
	BirdFontGlyph* glyph = NULL;
	gdouble new_size = 0.0;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (glyph);
	glyph = _tmp0_;
	_tmp1_ = glyph;
	bird_font_glyph_selection_boundaries (_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_);
	x = _tmp2_;
	y = _tmp3_;
	w = _tmp4_;
	h = _tmp5_;
	new_size = bird_font_spin_button_get_value (_self_) / h;
	if (bird_font_spin_button_get_value (_self_) > ((gdouble) 0)) {
		_tmp6_ = new_size != ((gdouble) 1);
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		BirdFontResizeTool* _tmp7_;
		_tmp7_ = bird_font_drawing_tools_resize_tool;
		bird_font_resize_tool_resize_selected_paths (_tmp7_, new_size, new_size);
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (glyph);
}

static void
___lambda447__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda447_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda448_ (BirdFontDrawingTools* self,
              gdouble w,
              gdouble h)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = self->priv->height;
	bird_font_spin_button_set_value_round (_tmp0_, h, TRUE, FALSE);
	_tmp1_ = self->priv->width;
	bird_font_spin_button_set_value_round (_tmp1_, w, TRUE, FALSE);
}

static void
___lambda448__bird_font_resize_tool_objects_resized (BirdFontResizeTool* _sender,
                                                     gdouble width,
                                                     gdouble height,
                                                     gpointer self)
{
	__lambda448_ ((BirdFontDrawingTools*) self, width, height);
}

static void
__lambda449_ (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	BirdFontSpinButton* _tmp2_;
	BirdFontSpinButton* _tmp3_;
	_tmp0_ = self->priv->width;
	bird_font_spin_button_set_value_round (_tmp0_, (gdouble) 0, TRUE, FALSE);
	_tmp1_ = self->priv->width;
	bird_font_spin_button_hide_value (_tmp1_);
	_tmp2_ = self->priv->height;
	bird_font_spin_button_set_value_round (_tmp2_, (gdouble) 0, TRUE, FALSE);
	_tmp3_ = self->priv->height;
	bird_font_spin_button_hide_value (_tmp3_);
}

static void
___lambda449__bird_font_move_tool_objects_deselected (BirdFontMoveTool* _sender,
                                                      gpointer self)
{
	__lambda449_ ((BirdFontDrawingTools*) self);
}

static void
__lambda450_ (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	_tmp0_ = self->priv->width;
	bird_font_spin_button_set_value_round (_tmp0_, bird_font_move_tool_selection_box_width, TRUE, FALSE);
	_tmp1_ = self->priv->height;
	bird_font_spin_button_set_value_round (_tmp1_, bird_font_move_tool_selection_box_height, TRUE, FALSE);
}

static void
___lambda450__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                 gpointer self)
{
	__lambda450_ ((BirdFontDrawingTools*) self);
}

static void
__lambda451_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	gboolean tie = FALSE;
	gboolean end_point = FALSE;
	BirdFontEditPoint* p = NULL;
	BirdFontGlyph* _tmp70_;
	BirdFontGlyph* _tmp71_;
	g_return_if_fail (_self_ != NULL);
	if (bird_font_pen_tool_move_selected_handle) {
		BirdFontEditPointHandle* _tmp0_;
		BirdFontEditPoint* _tmp1_;
		BirdFontEditPoint* _tmp2_;
		BirdFontEditPoint* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		BirdFontEditPoint* _tmp30_;
		BirdFontPointSelection* _tmp31_;
		BirdFontPath* _tmp32_;
		_tmp0_ = bird_font_pen_tool_active_handle;
		_tmp1_ = _tmp0_->parent;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_g_object_unref0 (p);
		p = _tmp2_;
		_tmp3_ = p;
		_tmp4_ = bird_font_edit_point_get_tie_handles (_tmp3_);
		_tmp5_ = _tmp4_;
		tie = !_tmp5_;
		{
			GeeArrayList* _path_list = NULL;
			BirdFontGlyph* _tmp6_;
			BirdFontGlyph* _tmp7_;
			GeeArrayList* _tmp8_;
			GeeArrayList* _tmp9_;
			gint _path_size = 0;
			GeeArrayList* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gint _path_index = 0;
			_tmp6_ = bird_font_main_window_get_current_glyph ();
			_tmp7_ = _tmp6_;
			_tmp8_ = _tmp7_->active_paths;
			_tmp9_ = _tmp8_;
			_g_object_unref0 (_tmp7_);
			_path_list = _tmp9_;
			_tmp10_ = _path_list;
			_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
			_tmp12_ = _tmp11_;
			_path_size = _tmp12_;
			_path_index = -1;
			while (TRUE) {
				gint _tmp13_;
				gint _tmp14_;
				BirdFontPath* path = NULL;
				GeeArrayList* _tmp15_;
				gpointer _tmp16_;
				BirdFontPath* _tmp17_;
				_path_index = _path_index + 1;
				_tmp13_ = _path_index;
				_tmp14_ = _path_size;
				if (!(_tmp13_ < _tmp14_)) {
					break;
				}
				_tmp15_ = _path_list;
				_tmp16_ = gee_abstract_list_get ((GeeAbstractList*) _tmp15_, _path_index);
				path = (BirdFontPath*) _tmp16_;
				_tmp17_ = path;
				if (bird_font_path_is_open (_tmp17_)) {
					gboolean _tmp18_ = FALSE;
					BirdFontEditPoint* _tmp19_;
					BirdFontPath* _tmp20_;
					BirdFontEditPoint* _tmp21_;
					BirdFontEditPoint* _tmp22_;
					gboolean _tmp23_;
					_tmp19_ = p;
					_tmp20_ = path;
					_tmp21_ = bird_font_path_get_first_point (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = _tmp19_ == _tmp22_;
					_g_object_unref0 (_tmp22_);
					if (_tmp23_) {
						_tmp18_ = TRUE;
					} else {
						BirdFontEditPoint* _tmp24_;
						BirdFontPath* _tmp25_;
						BirdFontEditPoint* _tmp26_;
						BirdFontEditPoint* _tmp27_;
						_tmp24_ = p;
						_tmp25_ = path;
						_tmp26_ = bird_font_path_get_last_point (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp18_ = _tmp24_ == _tmp27_;
						_g_object_unref0 (_tmp27_);
					}
					if (_tmp18_) {
						tie = FALSE;
					}
				}
				_g_object_unref0 (path);
			}
		}
		if (tie) {
			BirdFontEditPoint* _tmp28_;
			BirdFontEditPoint* _tmp29_;
			_tmp28_ = p;
			bird_font_edit_point_process_tied_handle (_tmp28_);
			_tmp29_ = p;
			bird_font_edit_point_set_reflective_handles (_tmp29_, FALSE);
		}
		_tmp30_ = p;
		bird_font_edit_point_set_tie_handle (_tmp30_, tie);
		_tmp31_ = bird_font_pen_tool_handle_selection;
		_tmp32_ = _tmp31_->path;
		bird_font_path_update_region_boundaries (_tmp32_);
	} else {
		{
			GeeArrayList* _ep_list = NULL;
			GeeArrayList* _tmp33_;
			gint _ep_size = 0;
			GeeArrayList* _tmp34_;
			gint _tmp35_;
			gint _tmp36_;
			gint _ep_index = 0;
			_tmp33_ = bird_font_pen_tool_selected_points;
			_ep_list = _tmp33_;
			_tmp34_ = _ep_list;
			_tmp35_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp34_);
			_tmp36_ = _tmp35_;
			_ep_size = _tmp36_;
			_ep_index = -1;
			while (TRUE) {
				gint _tmp37_;
				gint _tmp38_;
				BirdFontPointSelection* ep = NULL;
				GeeArrayList* _tmp39_;
				gpointer _tmp40_;
				BirdFontPointSelection* _tmp41_;
				BirdFontEditPoint* _tmp42_;
				gboolean _tmp43_;
				gboolean _tmp44_;
				gboolean _tmp45_ = FALSE;
				BirdFontPointSelection* _tmp46_;
				BirdFontEditPoint* _tmp47_;
				BirdFontPointSelection* _tmp48_;
				BirdFontPath* _tmp49_;
				BirdFontEditPoint* _tmp50_;
				BirdFontEditPoint* _tmp51_;
				gboolean _tmp52_;
				gboolean _tmp59_ = FALSE;
				BirdFontPointSelection* _tmp60_;
				BirdFontPath* _tmp61_;
				_ep_index = _ep_index + 1;
				_tmp37_ = _ep_index;
				_tmp38_ = _ep_size;
				if (!(_tmp37_ < _tmp38_)) {
					break;
				}
				_tmp39_ = _ep_list;
				_tmp40_ = gee_abstract_list_get ((GeeAbstractList*) _tmp39_, _ep_index);
				ep = (BirdFontPointSelection*) _tmp40_;
				_tmp41_ = ep;
				_tmp42_ = _tmp41_->point;
				_tmp43_ = bird_font_edit_point_get_tie_handles (_tmp42_);
				_tmp44_ = _tmp43_;
				tie = !_tmp44_;
				_tmp46_ = ep;
				_tmp47_ = _tmp46_->point;
				_tmp48_ = ep;
				_tmp49_ = _tmp48_->path;
				_tmp50_ = bird_font_path_get_first_point (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = _tmp47_ == _tmp51_;
				_g_object_unref0 (_tmp51_);
				if (_tmp52_) {
					_tmp45_ = TRUE;
				} else {
					BirdFontPointSelection* _tmp53_;
					BirdFontEditPoint* _tmp54_;
					BirdFontPointSelection* _tmp55_;
					BirdFontPath* _tmp56_;
					BirdFontEditPoint* _tmp57_;
					BirdFontEditPoint* _tmp58_;
					_tmp53_ = ep;
					_tmp54_ = _tmp53_->point;
					_tmp55_ = ep;
					_tmp56_ = _tmp55_->path;
					_tmp57_ = bird_font_path_get_last_point (_tmp56_);
					_tmp58_ = _tmp57_;
					_tmp45_ = _tmp54_ == _tmp58_;
					_g_object_unref0 (_tmp58_);
				}
				end_point = _tmp45_;
				_tmp60_ = ep;
				_tmp61_ = _tmp60_->path;
				if (!bird_font_path_is_open (_tmp61_)) {
					_tmp59_ = TRUE;
				} else {
					_tmp59_ = !end_point;
				}
				if (_tmp59_) {
					BirdFontPointSelection* _tmp66_;
					BirdFontEditPoint* _tmp67_;
					BirdFontPointSelection* _tmp68_;
					BirdFontPath* _tmp69_;
					if (tie) {
						BirdFontPointSelection* _tmp62_;
						BirdFontEditPoint* _tmp63_;
						BirdFontPointSelection* _tmp64_;
						BirdFontEditPoint* _tmp65_;
						_tmp62_ = ep;
						_tmp63_ = _tmp62_->point;
						bird_font_edit_point_process_tied_handle (_tmp63_);
						_tmp64_ = ep;
						_tmp65_ = _tmp64_->point;
						bird_font_edit_point_set_reflective_handles (_tmp65_, FALSE);
					}
					_tmp66_ = ep;
					_tmp67_ = _tmp66_->point;
					bird_font_edit_point_set_tie_handle (_tmp67_, tie);
					_tmp68_ = ep;
					_tmp69_ = _tmp68_->path;
					bird_font_path_update_region_boundaries (_tmp69_);
				}
				_g_object_unref0 (ep);
			}
		}
	}
	_tmp70_ = bird_font_main_window_get_current_glyph ();
	_tmp71_ = _tmp70_;
	bird_font_glyph_update_view (_tmp71_);
	_g_object_unref0 (_tmp71_);
	bird_font_pen_tool_reset_stroke ();
	_g_object_unref0 (p);
}

static void
___lambda451__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda451_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda452_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	gboolean symmetrical = FALSE;
	gboolean end_point = FALSE;
	BirdFontPointSelection* ep = NULL;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_pen_tool_selected_points;
	_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		GeeArrayList* _tmp3_;
		gpointer _tmp4_;
		BirdFontPointSelection* _tmp5_;
		BirdFontEditPoint* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		BirdFontGlyph* _tmp43_;
		BirdFontGlyph* _tmp44_;
		_tmp3_ = bird_font_pen_tool_selected_points;
		_tmp4_ = gee_abstract_list_get ((GeeAbstractList*) _tmp3_, 0);
		_g_object_unref0 (ep);
		ep = (BirdFontPointSelection*) _tmp4_;
		_tmp5_ = ep;
		_tmp6_ = _tmp5_->point;
		_tmp7_ = bird_font_edit_point_get_reflective_point (_tmp6_);
		_tmp8_ = _tmp7_;
		symmetrical = _tmp8_;
		{
			GeeArrayList* _p_list = NULL;
			GeeArrayList* _tmp9_;
			gint _p_size = 0;
			GeeArrayList* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gint _p_index = 0;
			_tmp9_ = bird_font_pen_tool_selected_points;
			_p_list = _tmp9_;
			_tmp10_ = _p_list;
			_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
			_tmp12_ = _tmp11_;
			_p_size = _tmp12_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp13_;
				gint _tmp14_;
				BirdFontPointSelection* p = NULL;
				GeeArrayList* _tmp15_;
				gpointer _tmp16_;
				gboolean _tmp17_ = FALSE;
				BirdFontPointSelection* _tmp18_;
				BirdFontEditPoint* _tmp19_;
				BirdFontPointSelection* _tmp20_;
				BirdFontPath* _tmp21_;
				BirdFontEditPoint* _tmp22_;
				BirdFontEditPoint* _tmp23_;
				gboolean _tmp24_;
				gboolean _tmp31_ = FALSE;
				BirdFontPointSelection* _tmp32_;
				BirdFontPath* _tmp33_;
				_p_index = _p_index + 1;
				_tmp13_ = _p_index;
				_tmp14_ = _p_size;
				if (!(_tmp13_ < _tmp14_)) {
					break;
				}
				_tmp15_ = _p_list;
				_tmp16_ = gee_abstract_list_get ((GeeAbstractList*) _tmp15_, _p_index);
				p = (BirdFontPointSelection*) _tmp16_;
				_tmp18_ = p;
				_tmp19_ = _tmp18_->point;
				_tmp20_ = p;
				_tmp21_ = _tmp20_->path;
				_tmp22_ = bird_font_path_get_first_point (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = _tmp19_ == _tmp23_;
				_g_object_unref0 (_tmp23_);
				if (_tmp24_) {
					_tmp17_ = TRUE;
				} else {
					BirdFontPointSelection* _tmp25_;
					BirdFontEditPoint* _tmp26_;
					BirdFontPointSelection* _tmp27_;
					BirdFontPath* _tmp28_;
					BirdFontEditPoint* _tmp29_;
					BirdFontEditPoint* _tmp30_;
					_tmp25_ = p;
					_tmp26_ = _tmp25_->point;
					_tmp27_ = p;
					_tmp28_ = _tmp27_->path;
					_tmp29_ = bird_font_path_get_last_point (_tmp28_);
					_tmp30_ = _tmp29_;
					_tmp17_ = _tmp26_ == _tmp30_;
					_g_object_unref0 (_tmp30_);
				}
				end_point = _tmp17_;
				_tmp32_ = p;
				_tmp33_ = _tmp32_->path;
				if (!bird_font_path_is_open (_tmp33_)) {
					_tmp31_ = TRUE;
				} else {
					_tmp31_ = !end_point;
				}
				if (_tmp31_) {
					BirdFontPointSelection* _tmp34_;
					BirdFontEditPoint* _tmp35_;
					BirdFontPointSelection* _tmp36_;
					BirdFontEditPoint* _tmp37_;
					BirdFontEditPointHandle* _tmp38_;
					BirdFontPointSelection* _tmp41_;
					BirdFontPath* _tmp42_;
					_tmp34_ = p;
					_tmp35_ = _tmp34_->point;
					bird_font_edit_point_set_reflective_handles (_tmp35_, !symmetrical);
					_tmp36_ = p;
					_tmp37_ = _tmp36_->point;
					_tmp38_ = bird_font_edit_point_get_right_handle (_tmp37_);
					bird_font_edit_point_handle_process_symmetrical_handle (_tmp38_);
					if (symmetrical) {
						BirdFontPointSelection* _tmp39_;
						BirdFontEditPoint* _tmp40_;
						_tmp39_ = ep;
						_tmp40_ = _tmp39_->point;
						bird_font_edit_point_set_tie_handle (_tmp40_, FALSE);
					}
					_tmp41_ = p;
					_tmp42_ = _tmp41_->path;
					bird_font_path_update_region_boundaries (_tmp42_);
				}
				_g_object_unref0 (p);
			}
		}
		_tmp43_ = bird_font_main_window_get_current_glyph ();
		_tmp44_ = _tmp43_;
		bird_font_glyph_update_view (_tmp44_);
		_g_object_unref0 (_tmp44_);
	}
	bird_font_pen_tool_reset_stroke ();
	_g_object_unref0 (ep);
}

static void
___lambda452__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda452_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda453_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	bird_font_pen_tool_convert_segment_to_line ();
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_tmp1_ = _tmp0_;
	bird_font_glyph_update_view (_tmp1_);
	_g_object_unref0 (_tmp1_);
	bird_font_pen_tool_reset_stroke ();
}

static void
___lambda453__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda453_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda454_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontResizeTool* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_resize_tool;
	bird_font_resize_tool_full_height (_tmp0_);
	bird_font_glyph_canvas_redraw ();
}

static void
___lambda454__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda454_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda455_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontTool* current = NULL;
	BirdFontGlyph* g = NULL;
	BirdFontToolbox* _tmp0_;
	BirdFontToolbox* _tmp1_;
	BirdFontTool* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontGlyph* _tmp5_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_toolbox ();
	_tmp1_ = _tmp0_;
	_tmp2_ = bird_font_toolbox_get_current_tool (_tmp1_);
	_g_object_unref0 (current);
	current = _tmp2_;
	_g_object_unref0 (_tmp1_);
	_tmp3_ = current;
	if (BIRD_FONT_IS_BEZIER_TOOL (_tmp3_)) {
		BirdFontTool* _tmp4_;
		_tmp4_ = current;
		bird_font_bezier_tool_stop_drawing (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, BIRD_FONT_TYPE_BEZIER_TOOL, BirdFontBezierTool));
	}
	bird_font_pen_tool_reset_stroke ();
	_tmp5_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (g);
	g = _tmp5_;
	bird_font_glyph_close_path (g);
	bird_font_glyph_clear_active_paths (g);
	bird_font_tool_set_selected (_self_, FALSE);
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (g);
	_g_object_unref0 (current);
}

static void
___lambda455__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda455_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda456_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontLayer* layer = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontLayer* _tmp2_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	_tmp2_ = bird_font_glyph_get_current_layer (_tmp1_);
	layer = _tmp2_;
	{
		GeeArrayList* _p_list = NULL;
		BirdFontGlyph* _tmp3_;
		GeeArrayList* _tmp4_;
		gint _p_size = 0;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _p_index = 0;
		_tmp3_ = g;
		_tmp4_ = _tmp3_->active_paths;
		_p_list = _tmp4_;
		_tmp5_ = _p_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_p_size = _tmp7_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp10_;
			gpointer _tmp11_;
			BirdFontLayer* _tmp12_;
			BirdFontPathList* _tmp13_;
			BirdFontPath* _tmp14_;
			BirdFontLayer* _tmp15_;
			BirdFontPathList* _tmp16_;
			GeeArrayList* _tmp17_;
			BirdFontPath* _tmp18_;
			_p_index = _p_index + 1;
			_tmp8_ = _p_index;
			_tmp9_ = _p_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _p_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _p_index);
			p = (BirdFontPath*) _tmp11_;
			_tmp12_ = layer;
			_tmp13_ = _tmp12_->paths;
			_tmp14_ = p;
			bird_font_path_list_remove (_tmp13_, _tmp14_);
			_tmp15_ = layer;
			_tmp16_ = _tmp15_->paths;
			_tmp17_ = _tmp16_->paths;
			_tmp18_ = p;
			gee_abstract_list_insert ((GeeAbstractList*) _tmp17_, 0, _tmp18_);
			_g_object_unref0 (p);
		}
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (layer);
	_g_object_unref0 (g);
}

static void
___lambda456__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda456_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda457_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	bird_font_move_tool_flip_vertical ();
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_tmp1_ = _tmp0_;
	bird_font_glyph_update_view (_tmp1_);
	_g_object_unref0 (_tmp1_);
	bird_font_pen_tool_reset_stroke ();
}

static void
___lambda457__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda457_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda458_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	bird_font_move_tool_flip_horizontal ();
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_tmp1_ = _tmp0_;
	bird_font_glyph_update_view (_tmp1_);
	_g_object_unref0 (_tmp1_);
	bird_font_pen_tool_reset_stroke ();
}

static void
___lambda458__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda458_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda459_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontSpinButton* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_background_scale;
	g_signal_emit_by_name ((BirdFontTool*) _tmp0_, "select-action", (BirdFontTool*) _self_);
}

static void
___lambda459__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda459_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda460_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontSpinButton* sb = NULL;
	BirdFontSpinButton* _tmp0_;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* img = NULL;
	BirdFontGlyph* _tmp2_;
	BirdFontBackgroundImage* _tmp3_;
	gdouble s = 0.0;
	BirdFontSpinButton* _tmp4_;
	BirdFontBackgroundImage* i = NULL;
	gdouble xc = 0.0;
	gdouble yc = 0.0;
	BirdFontBackgroundImage* _tmp5_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_self_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
	sb = _tmp0_;
	_tmp1_ = bird_font_main_window_get_current_glyph ();
	g = _tmp1_;
	_tmp2_ = g;
	_tmp3_ = bird_font_glyph_get_background_image (_tmp2_);
	img = _tmp3_;
	_tmp4_ = sb;
	s = bird_font_spin_button_get_value (_tmp4_);
	_tmp5_ = img;
	if (_tmp5_ != NULL) {
		BirdFontBackgroundImage* _tmp6_;
		BirdFontBackgroundImage* _tmp7_;
		BirdFontBackgroundImage* _tmp8_;
		gdouble _tmp9_;
		gdouble _tmp10_;
		BirdFontBackgroundImage* _tmp11_;
		gdouble _tmp12_;
		gdouble _tmp13_;
		BirdFontBackgroundImage* _tmp14_;
		BirdFontBackgroundImage* _tmp15_;
		BirdFontBackgroundImage* _tmp16_;
		_tmp6_ = img;
		_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, BIRD_FONT_TYPE_BACKGROUND_IMAGE, BirdFontBackgroundImage));
		_g_object_unref0 (i);
		i = _tmp7_;
		_tmp8_ = i;
		_tmp9_ = bird_font_background_image_get_img_middle_x (_tmp8_);
		_tmp10_ = _tmp9_;
		xc = _tmp10_;
		_tmp11_ = i;
		_tmp12_ = bird_font_background_image_get_img_middle_y (_tmp11_);
		_tmp13_ = _tmp12_;
		yc = _tmp13_;
		_tmp14_ = i;
		bird_font_background_image_set_img_scale (_tmp14_, s, s);
		_tmp15_ = i;
		bird_font_background_image_set_img_middle_x (_tmp15_, xc);
		_tmp16_ = i;
		bird_font_background_image_set_img_middle_y (_tmp16_, yc);
	}
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (i);
	_g_object_unref0 (img);
	_g_object_unref0 (g);
	_g_object_unref0 (sb);
}

static void
___lambda460__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda460_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda461_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda461__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda461_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda462_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda462__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda462_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda463_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	bird_font_glyph_set_background_visible (g, !bird_font_glyph_get_background_visible (g));
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (g);
}

static void
___lambda463__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda463_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda464_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda464__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda464_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda465_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontFontDisplay* _tmp0_;
	BirdFontFontDisplay* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_display ();
	_tmp1_ = _tmp0_;
	_tmp2_ = BIRD_FONT_IS_GLYPH_TAB (_tmp1_);
	_g_object_unref0 (_tmp1_);
	if (_tmp2_) {
		bird_font_background_tool_import_background_image ();
	}
}

static void
___lambda465__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda465_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda466_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontBackgroundImage* bg = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* _tmp2_;
	BirdFontBackgroundImage* b = NULL;
	BirdFontBackgroundImage* _tmp3_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	_tmp2_ = bird_font_glyph_get_background_image (_tmp1_);
	bg = _tmp2_;
	_tmp3_ = bg;
	if (_tmp3_ != NULL) {
		BirdFontBackgroundImage* _tmp4_;
		BirdFontBackgroundImage* _tmp5_;
		BirdFontBackgroundImage* _tmp6_;
		BirdFontBackgroundImage* _tmp7_;
		BirdFontBackgroundImage* _tmp8_;
		_tmp4_ = bg;
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, BIRD_FONT_TYPE_BACKGROUND_IMAGE, BirdFontBackgroundImage));
		_g_object_unref0 (b);
		b = _tmp5_;
		_tmp6_ = b;
		_tmp7_ = b;
		bird_font_background_image_set_high_contrast (_tmp6_, !_tmp7_->high_contrast);
		_tmp8_ = b;
		bird_font_background_image_update_background (_tmp8_);
	}
	_g_object_unref0 (b);
	_g_object_unref0 (bg);
	_g_object_unref0 (g);
}

static void
___lambda466__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda466_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda467_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontBackgroundImage* bg = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* _tmp2_;
	BirdFontBackgroundImage* b = NULL;
	BirdFontBackgroundImage* _tmp3_;
	BirdFontFont* _tmp7_;
	BirdFontFont* _tmp8_;
	BirdFontFontSettings* _tmp9_;
	BirdFontSpinButton* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	_tmp2_ = bird_font_glyph_get_background_image (_tmp1_);
	bg = _tmp2_;
	_tmp3_ = bg;
	if (_tmp3_ != NULL) {
		BirdFontBackgroundImage* _tmp4_;
		BirdFontBackgroundImage* _tmp5_;
		BirdFontBackgroundImage* _tmp6_;
		_tmp4_ = bg;
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, BIRD_FONT_TYPE_BACKGROUND_IMAGE, BirdFontBackgroundImage));
		_g_object_unref0 (b);
		b = _tmp5_;
		_tmp6_ = b;
		bird_font_background_image_update_background (_tmp6_);
	}
	_tmp7_ = bird_font_bird_font_get_current_font ();
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_->settings;
	_tmp10_ = bird_font_drawing_tools_background_threshold;
	_tmp11_ = bird_font_spin_button_get_display_value (_tmp10_);
	_tmp12_ = _tmp11_;
	bird_font_font_settings_set_setting (_tmp9_, "autotrace_threshold", _tmp12_);
	_g_free0 (_tmp12_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (b);
	_g_object_unref0 (bg);
	_g_object_unref0 (g);
}

static void
___lambda467__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda467_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda468_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontBackgroundImage* bg = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* _tmp2_;
	BirdFontBackgroundImage* b = NULL;
	BirdFontBackgroundImage* _tmp3_;
	BirdFontFont* _tmp7_;
	BirdFontFont* _tmp8_;
	BirdFontFontSettings* _tmp9_;
	BirdFontSpinButton* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	_tmp2_ = bird_font_glyph_get_background_image (_tmp1_);
	bg = _tmp2_;
	_tmp3_ = bg;
	if (_tmp3_ != NULL) {
		BirdFontBackgroundImage* _tmp4_;
		BirdFontBackgroundImage* _tmp5_;
		BirdFontBackgroundImage* _tmp6_;
		_tmp4_ = bg;
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, BIRD_FONT_TYPE_BACKGROUND_IMAGE, BirdFontBackgroundImage));
		_g_object_unref0 (b);
		b = _tmp5_;
		_tmp6_ = b;
		bird_font_background_image_update_background (_tmp6_);
	}
	_tmp7_ = bird_font_bird_font_get_current_font ();
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_->settings;
	_tmp10_ = bird_font_drawing_tools_auto_trace_resolution;
	_tmp11_ = bird_font_spin_button_get_display_value (_tmp10_);
	_tmp12_ = _tmp11_;
	bird_font_font_settings_set_setting (_tmp9_, "autotrace_resolution", _tmp12_);
	_g_free0 (_tmp12_);
	_g_object_unref0 (_tmp8_);
	_g_object_unref0 (b);
	_g_object_unref0 (bg);
	_g_object_unref0 (g);
}

static void
___lambda468__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda468_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda469_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontFont* _tmp0_;
	BirdFontFont* _tmp1_;
	BirdFontFontSettings* _tmp2_;
	BirdFontSpinButton* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_bird_font_get_current_font ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = bird_font_drawing_tools_background_threshold;
	_tmp4_ = bird_font_spin_button_get_display_value (_tmp3_);
	_tmp5_ = _tmp4_;
	bird_font_font_settings_set_setting (_tmp2_, "autotrace_simplification", _tmp5_);
	_g_free0 (_tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda469__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda469_ ((BirdFontDrawingTools*) self, selected);
}

static void
_bird_font_drawing_tools_auto_trace_background_bird_font_task_runnable (gpointer self)
{
	bird_font_drawing_tools_auto_trace_background ((BirdFontDrawingTools*) self);
}

static void
__lambda470_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontTask* t = NULL;
	BirdFontTask* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_task_new (_bird_font_drawing_tools_auto_trace_background_bird_font_task_runnable, g_object_ref (self), g_object_unref, FALSE);
	t = _tmp0_;
	bird_font_main_window_run_blocking_task (t);
	_g_object_unref0 (t);
}

static void
___lambda470__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda470_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda471_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_tmp1_ = _tmp0_;
	bird_font_glyph_delete_background (_tmp1_);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda471__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda471_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda472_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontGlyph* _tmp2_;
	BirdFontGlyph* _tmp3_;
	BirdFontTool* _tmp4_;
	BirdFontTool* _tmp5_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp1_ = _tmp0_;
	_tmp1_->visible = TRUE;
	_tmp2_ = bird_font_main_window_get_current_glyph ();
	_tmp3_ = _tmp2_;
	bird_font_glyph_add_new_layer (_tmp3_);
	_g_object_unref0 (_tmp3_);
	bird_font_drawing_tools_update_layers ();
	_tmp4_ = bird_font_drawing_tools_show_layers;
	_tmp4_->selected = TRUE;
	_tmp5_ = bird_font_drawing_tools_add_layer;
	_tmp5_->selected = FALSE;
}

static void
___lambda472__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda472_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda473_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontExpander* _tmp2_;
	BirdFontExpander* _tmp3_;
	BirdFontToolbox* _tmp4_;
	BirdFontToolbox* _tmp5_;
	BirdFontTool* _tmp6_;
	BirdFontExpander* _tmp7_;
	BirdFontExpander* _tmp8_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp1_ = _tmp0_;
	_tmp2_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp3_ = _tmp2_;
	_tmp1_->visible = !_tmp3_->visible;
	_tmp4_ = bird_font_main_window_get_toolbox ();
	_tmp5_ = _tmp4_;
	bird_font_toolbox_update_expanders (_tmp5_);
	_g_object_unref0 (_tmp5_);
	bird_font_toolbox_redraw_tool_box ();
	_tmp6_ = bird_font_drawing_tools_show_layers;
	_tmp7_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp8_ = _tmp7_;
	_tmp6_->selected = _tmp8_->visible;
}

static void
___lambda473__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda473_ ((BirdFontDrawingTools*) self, selected);
}

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

static void
__lambda474_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontFont* f = NULL;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	BirdFontTool* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontGlyph* _tmp4_;
	BirdFontFont* _tmp26_;
	BirdFontFontSettings* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	BirdFontExpander* _tmp30_;
	BirdFontExpander* _tmp31_;
	BirdFontToolbox* _tmp32_;
	BirdFontToolbox* _tmp33_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	bird_font_stroke_tool_add_stroke = !bird_font_stroke_tool_add_stroke;
	_tmp1_ = bird_font_drawing_tools_object_stroke;
	bird_font_stroke_tool_stroke_width = bird_font_spin_button_get_value (_tmp1_);
	_tmp2_ = bird_font_drawing_tools_get_add_stroke ();
	_tmp3_ = _tmp2_;
	_tmp3_->selected = bird_font_stroke_tool_add_stroke;
	bird_font_drawing_tools_set_stroke_tool_visibility ();
	bird_font_glyph_canvas_redraw ();
	_tmp4_ = g;
	bird_font_glyph_store_undo_state (_tmp4_, FALSE);
	if (bird_font_stroke_tool_add_stroke) {
		{
			GeeArrayList* _p_list = NULL;
			BirdFontGlyph* _tmp5_;
			GeeArrayList* _tmp6_;
			gint _p_size = 0;
			GeeArrayList* _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			gint _p_index = 0;
			_tmp5_ = g;
			_tmp6_ = _tmp5_->active_paths;
			_p_list = _tmp6_;
			_tmp7_ = _p_list;
			_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
			_tmp9_ = _tmp8_;
			_p_size = _tmp9_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp10_;
				gint _tmp11_;
				BirdFontPath* p = NULL;
				GeeArrayList* _tmp12_;
				gpointer _tmp13_;
				BirdFontPath* _tmp14_;
				BirdFontPath* _tmp15_;
				_p_index = _p_index + 1;
				_tmp10_ = _p_index;
				_tmp11_ = _p_size;
				if (!(_tmp10_ < _tmp11_)) {
					break;
				}
				_tmp12_ = _p_list;
				_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _p_index);
				p = (BirdFontPath*) _tmp13_;
				_tmp14_ = p;
				bird_font_path_set_stroke (_tmp14_, bird_font_stroke_tool_stroke_width);
				_tmp15_ = p;
				_tmp15_->line_cap = bird_font_stroke_tool_line_cap;
				_g_object_unref0 (p);
			}
		}
	} else {
		{
			GeeArrayList* _p_list = NULL;
			BirdFontGlyph* _tmp16_;
			GeeArrayList* _tmp17_;
			gint _p_size = 0;
			GeeArrayList* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gint _p_index = 0;
			_tmp16_ = g;
			_tmp17_ = _tmp16_->active_paths;
			_p_list = _tmp17_;
			_tmp18_ = _p_list;
			_tmp19_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp18_);
			_tmp20_ = _tmp19_;
			_p_size = _tmp20_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp21_;
				gint _tmp22_;
				BirdFontPath* p = NULL;
				GeeArrayList* _tmp23_;
				gpointer _tmp24_;
				BirdFontPath* _tmp25_;
				_p_index = _p_index + 1;
				_tmp21_ = _p_index;
				_tmp22_ = _p_size;
				if (!(_tmp21_ < _tmp22_)) {
					break;
				}
				_tmp23_ = _p_list;
				_tmp24_ = gee_abstract_list_get ((GeeAbstractList*) _tmp23_, _p_index);
				p = (BirdFontPath*) _tmp24_;
				_tmp25_ = p;
				bird_font_path_set_stroke (_tmp25_, (gdouble) 0);
				_g_object_unref0 (p);
			}
		}
	}
	_tmp26_ = bird_font_bird_font_get_current_font ();
	_g_object_unref0 (f);
	f = _tmp26_;
	_tmp27_ = f->settings;
	_tmp28_ = bool_to_string (bird_font_stroke_tool_add_stroke);
	_tmp29_ = _tmp28_;
	bird_font_font_settings_set_setting (_tmp27_, "apply_stroke", _tmp29_);
	_g_free0 (_tmp29_);
	_tmp30_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp31_ = _tmp30_;
	bird_font_expander_redraw (_tmp31_);
	_tmp32_ = bird_font_main_window_get_toolbox ();
	_tmp33_ = _tmp32_;
	bird_font_toolbox_update_expanders (_tmp33_);
	_g_object_unref0 (_tmp33_);
	_g_object_unref0 (g);
	_g_object_unref0 (f);
}

static void
___lambda474__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda474_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda475_ (BirdFontDrawingTools* self,
              BirdFontSpinButton* _self_)
{
	BirdFontFont* f = NULL;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	BirdFontResizeTool* _tmp6_;
	gboolean tool = FALSE;
	BirdFontSpinButton* _tmp13_;
	gboolean _tmp14_ = FALSE;
	BirdFontFont* _tmp26_;
	BirdFontFontSettings* _tmp27_;
	BirdFontSpinButton* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp6_ = bird_font_drawing_tools_resize_tool;
	if (bird_font_tool_is_selected ((BirdFontTool*) _tmp6_)) {
		_tmp5_ = TRUE;
	} else {
		BirdFontMoveTool* _tmp7_;
		BirdFontMoveTool* _tmp8_;
		_tmp7_ = bird_font_drawing_tools_get_move_tool ();
		_tmp8_ = _tmp7_;
		_tmp5_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp8_);
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		BirdFontPenTool* _tmp9_;
		_tmp9_ = bird_font_drawing_tools_pen_tool;
		_tmp4_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp9_);
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		BirdFontTrackTool* _tmp10_;
		_tmp10_ = bird_font_drawing_tools_track_tool;
		_tmp3_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp10_);
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		BirdFontPointTool* _tmp11_;
		_tmp11_ = self->priv->point_tool;
		_tmp2_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp11_);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		BirdFontBezierTool* _tmp12_;
		_tmp12_ = bird_font_drawing_tools_bezier_tool;
		_tmp1_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp12_);
	}
	tool = _tmp1_;
	_tmp13_ = bird_font_drawing_tools_object_stroke;
	bird_font_stroke_tool_stroke_width = bird_font_spin_button_get_value (_tmp13_);
	if (tool) {
		_tmp14_ = bird_font_stroke_tool_add_stroke;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		{
			GeeArrayList* _p_list = NULL;
			BirdFontGlyph* _tmp15_;
			GeeArrayList* _tmp16_;
			gint _p_size = 0;
			GeeArrayList* _tmp17_;
			gint _tmp18_;
			gint _tmp19_;
			gint _p_index = 0;
			_tmp15_ = g;
			_tmp16_ = _tmp15_->active_paths;
			_p_list = _tmp16_;
			_tmp17_ = _p_list;
			_tmp18_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp17_);
			_tmp19_ = _tmp18_;
			_p_size = _tmp19_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp20_;
				gint _tmp21_;
				BirdFontPath* p = NULL;
				GeeArrayList* _tmp22_;
				gpointer _tmp23_;
				BirdFontPath* _tmp24_;
				BirdFontPath* _tmp25_;
				_p_index = _p_index + 1;
				_tmp20_ = _p_index;
				_tmp21_ = _p_size;
				if (!(_tmp20_ < _tmp21_)) {
					break;
				}
				_tmp22_ = _p_list;
				_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _tmp22_, _p_index);
				p = (BirdFontPath*) _tmp23_;
				_tmp24_ = p;
				bird_font_path_set_stroke (_tmp24_, bird_font_stroke_tool_stroke_width);
				_tmp25_ = p;
				bird_font_path_reset_stroke (_tmp25_);
				_g_object_unref0 (p);
			}
		}
	}
	_tmp26_ = bird_font_bird_font_get_current_font ();
	_g_object_unref0 (f);
	f = _tmp26_;
	_tmp27_ = f->settings;
	_tmp28_ = bird_font_drawing_tools_object_stroke;
	_tmp29_ = bird_font_spin_button_get_display_value (_tmp28_);
	_tmp30_ = _tmp29_;
	bird_font_font_settings_set_setting (_tmp27_, "stroke_width", _tmp30_);
	_g_free0 (_tmp30_);
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (g);
	_g_object_unref0 (f);
}

static void
___lambda475__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda475_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda476_ (BirdFontDrawingTools* self)
{
	bird_font_drawing_tools_update_stroke_settings ();
}

static void
___lambda476__bird_font_move_tool_selection_changed (BirdFontMoveTool* _sender,
                                                     gpointer self)
{
	__lambda476_ ((BirdFontDrawingTools*) self);
}

static void
__lambda477_ (BirdFontDrawingTools* self)
{
	bird_font_drawing_tools_update_stroke_settings ();
}

static void
___lambda477__bird_font_move_tool_objects_moved (BirdFontMoveTool* _sender,
                                                 gpointer self)
{
	__lambda477_ ((BirdFontDrawingTools*) self);
}

static void
__lambda478_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontStrokeTool* s = NULL;
	BirdFontStrokeTool* _tmp0_;
	BirdFontTool* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_stroke_tool_new ();
	s = _tmp0_;
	bird_font_stroke_tool_stroke_selected_paths (s);
	_tmp1_ = self->priv->outline;
	bird_font_tool_set_selected (_tmp1_, FALSE);
	_g_object_unref0 (s);
}

static void
___lambda478__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda478_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda479_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontFont* f = NULL;
	BirdFontFont* _tmp13_;
	BirdFontFontSettings* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (g);
	g = _tmp0_;
	_tmp1_ = g;
	bird_font_glyph_store_undo_state (_tmp1_, FALSE);
	{
		GeeArrayList* _p_list = NULL;
		BirdFontGlyph* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _p_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _p_index = 0;
		_tmp2_ = g;
		_tmp3_ = _tmp2_->active_paths;
		_p_list = _tmp3_;
		_tmp4_ = _p_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_p_size = _tmp6_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontPath* _tmp11_;
			BirdFontPath* _tmp12_;
			_p_index = _p_index + 1;
			_tmp7_ = _p_index;
			_tmp8_ = _p_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _p_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _p_index);
			p = (BirdFontPath*) _tmp10_;
			_tmp11_ = p;
			_tmp11_->line_cap = BIRD_FONT_LINE_CAP_BUTT;
			_tmp12_ = p;
			bird_font_path_reset_stroke (_tmp12_);
			_g_object_unref0 (p);
		}
	}
	bird_font_stroke_tool_line_cap = BIRD_FONT_LINE_CAP_BUTT;
	_tmp13_ = bird_font_bird_font_get_current_font ();
	f = _tmp13_;
	_tmp14_ = f->settings;
	bird_font_font_settings_set_setting (_tmp14_, "line_cap", "butt");
	_tmp15_ = bird_font_drawing_tools_line_cap_butt;
	_tmp15_->selected = TRUE;
	_tmp16_ = bird_font_drawing_tools_line_cap_round;
	_tmp16_->selected = FALSE;
	_tmp17_ = bird_font_drawing_tools_line_cap_square;
	_tmp17_->selected = FALSE;
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (f);
	_g_object_unref0 (g);
}

static void
___lambda479__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda479_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda480_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontFont* f = NULL;
	BirdFontFont* _tmp13_;
	BirdFontFontSettings* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (g);
	g = _tmp0_;
	_tmp1_ = g;
	bird_font_glyph_store_undo_state (_tmp1_, FALSE);
	{
		GeeArrayList* _p_list = NULL;
		BirdFontGlyph* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _p_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _p_index = 0;
		_tmp2_ = g;
		_tmp3_ = _tmp2_->active_paths;
		_p_list = _tmp3_;
		_tmp4_ = _p_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_p_size = _tmp6_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontPath* _tmp11_;
			BirdFontPath* _tmp12_;
			_p_index = _p_index + 1;
			_tmp7_ = _p_index;
			_tmp8_ = _p_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _p_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _p_index);
			p = (BirdFontPath*) _tmp10_;
			_tmp11_ = p;
			_tmp11_->line_cap = BIRD_FONT_LINE_CAP_ROUND;
			_tmp12_ = p;
			bird_font_path_reset_stroke (_tmp12_);
			_g_object_unref0 (p);
		}
	}
	bird_font_stroke_tool_line_cap = BIRD_FONT_LINE_CAP_ROUND;
	_tmp13_ = bird_font_bird_font_get_current_font ();
	f = _tmp13_;
	_tmp14_ = f->settings;
	bird_font_font_settings_set_setting (_tmp14_, "line_cap", "round");
	_tmp15_ = bird_font_drawing_tools_line_cap_butt;
	_tmp15_->selected = FALSE;
	_tmp16_ = bird_font_drawing_tools_line_cap_round;
	_tmp16_->selected = TRUE;
	_tmp17_ = bird_font_drawing_tools_line_cap_square;
	_tmp17_->selected = FALSE;
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (f);
	_g_object_unref0 (g);
}

static void
___lambda480__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda480_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda481_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontFont* f = NULL;
	BirdFontFont* _tmp13_;
	BirdFontFontSettings* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_g_object_unref0 (g);
	g = _tmp0_;
	_tmp1_ = g;
	bird_font_glyph_store_undo_state (_tmp1_, FALSE);
	{
		GeeArrayList* _p_list = NULL;
		BirdFontGlyph* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _p_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _p_index = 0;
		_tmp2_ = g;
		_tmp3_ = _tmp2_->active_paths;
		_p_list = _tmp3_;
		_tmp4_ = _p_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_p_size = _tmp6_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontPath* _tmp11_;
			BirdFontPath* _tmp12_;
			_p_index = _p_index + 1;
			_tmp7_ = _p_index;
			_tmp8_ = _p_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _p_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _p_index);
			p = (BirdFontPath*) _tmp10_;
			_tmp11_ = p;
			_tmp11_->line_cap = BIRD_FONT_LINE_CAP_SQUARE;
			_tmp12_ = p;
			bird_font_path_reset_stroke (_tmp12_);
			_g_object_unref0 (p);
		}
	}
	bird_font_stroke_tool_line_cap = BIRD_FONT_LINE_CAP_SQUARE;
	_tmp13_ = bird_font_bird_font_get_current_font ();
	f = _tmp13_;
	_tmp14_ = f->settings;
	bird_font_font_settings_set_setting (_tmp14_, "line_cap", "square");
	_tmp15_ = bird_font_drawing_tools_line_cap_butt;
	_tmp15_->selected = FALSE;
	_tmp16_ = bird_font_drawing_tools_line_cap_round;
	_tmp16_->selected = FALSE;
	_tmp17_ = bird_font_drawing_tools_line_cap_square;
	_tmp17_->selected = TRUE;
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (f);
	_g_object_unref0 (g);
}

static void
___lambda481__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda481_ ((BirdFontDrawingTools*) self, selected);
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		BirdFontDrawingTools* self;
		self = _data12_->_data11_->self;
		_g_object_unref0 (_data12_->test_case);
		block11_data_unref (_data12_->_data11_);
		_data12_->_data11_ = NULL;
		g_slice_free (Block12Data, _data12_);
	}
}

static void
___lambda482_ (BirdFontDrawingTools* self,
               BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	if (bird_font_tool_is_selected (_self_)) {
		if (bird_font_test_bird_font_is_running ()) {
			bird_font_test_bird_font_pause ();
		} else {
			bird_font_test_bird_font_continue ();
		}
	}
}

static void
____lambda482__bird_font_tool_select_action (BirdFontTool* _sender,
                                             BirdFontTool* selected,
                                             gpointer self)
{
	___lambda482_ ((BirdFontDrawingTools*) self, selected);
}

static void
___lambda483_ (BirdFontDrawingTools* self,
               BirdFontTool* _self_)
{
	gboolean s = FALSE;
	g_return_if_fail (_self_ != NULL);
	s = bird_font_test_bird_font_is_slow_test ();
	bird_font_test_bird_font_set_slow_test (!s);
	s = bird_font_test_bird_font_is_slow_test ();
	bird_font_tool_set_selected (_self_, s);
}

static void
____lambda483__bird_font_tool_select_action (BirdFontTool* _sender,
                                             BirdFontTool* selected,
                                             gpointer self)
{
	___lambda483_ ((BirdFontDrawingTools*) self, selected);
}

static gboolean
____lambda484_ (Block12Data* _data12_)
{
	Block11Data* _data11_;
	BirdFontDrawingTools* self;
	BirdFontToolbox* _tmp0_;
	BirdFontToolbox* _tmp1_;
	BirdFontTool* _tmp2_;
	gboolean result;
	_data11_ = _data12_->_data11_;
	self = _data11_->self;
	_tmp0_ = bird_font_main_window_get_toolbox ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _data12_->test_case;
	bird_font_toolbox_select_tool (_tmp1_, _tmp2_);
	_g_object_unref0 (_tmp1_);
	result = FALSE;
	return result;
}

static gboolean
_____lambda484__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda484_ (self);
	return result;
}

static void
__lambda485_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	gboolean h = FALSE;
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	BirdFontGlyph* _tmp3_;
	BirdFontGlyph* _tmp4_;
	BirdFontGlyph* _tmp5_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp1_ = _tmp0_;
	h = bird_font_glyph_get_show_help_lines (_tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp3_ = _tmp2_;
	bird_font_glyph_set_show_help_lines (_tmp3_, !h);
	_g_object_unref0 (_tmp3_);
	bird_font_tool_set_selected (_self_, !h);
	_tmp4_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp5_ = _tmp4_;
	bird_font_glyph_redraw_help_lines (_tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
___lambda485__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda485_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda486_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	gboolean v = FALSE;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	v = !bird_font_glyph_get_xheight_lines_visible (_tmp1_);
	_tmp2_ = g;
	bird_font_glyph_set_xheight_lines_visible (_tmp2_, v);
	bird_font_tool_set_selected (_self_, v);
	bird_font_glyph_canvas_redraw ();
	if (v) {
		BirdFontTool* _tmp4_;
		BirdFontTool* _tmp5_;
		_tmp4_ = bird_font_drawing_tools_get_help_lines ();
		_tmp5_ = _tmp4_;
		_tmp3_ = !bird_font_tool_is_selected (_tmp5_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		BirdFontToolbox* _tmp6_;
		BirdFontToolbox* _tmp7_;
		BirdFontTool* _tmp8_;
		BirdFontTool* _tmp9_;
		_tmp6_ = bird_font_main_window_get_toolbox ();
		_tmp7_ = _tmp6_;
		_tmp8_ = bird_font_drawing_tools_get_help_lines ();
		_tmp9_ = _tmp8_;
		bird_font_toolbox_select_tool (_tmp7_, _tmp9_);
		_g_object_unref0 (_tmp7_);
	}
	_g_object_unref0 (g);
}

static void
___lambda486__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda486_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda487_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	gboolean v = FALSE;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	v = !bird_font_glyph_get_margin_lines_visible (_tmp1_);
	_tmp2_ = g;
	bird_font_glyph_set_margin_lines_visible (_tmp2_, v);
	bird_font_tool_set_selected (_self_, v);
	bird_font_glyph_canvas_redraw ();
	if (v) {
		BirdFontTool* _tmp4_;
		BirdFontTool* _tmp5_;
		_tmp4_ = bird_font_drawing_tools_get_help_lines ();
		_tmp5_ = _tmp4_;
		_tmp3_ = !bird_font_tool_is_selected (_tmp5_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		BirdFontToolbox* _tmp6_;
		BirdFontToolbox* _tmp7_;
		BirdFontTool* _tmp8_;
		BirdFontTool* _tmp9_;
		_tmp6_ = bird_font_main_window_get_toolbox ();
		_tmp7_ = _tmp6_;
		_tmp8_ = bird_font_drawing_tools_get_help_lines ();
		_tmp9_ = _tmp8_;
		bird_font_toolbox_select_tool (_tmp7_, _tmp9_);
		_g_object_unref0 (_tmp7_);
	}
	_g_object_unref0 (g);
}

static void
___lambda487__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda487_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda488_ (BirdFontDrawingTools* self)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontGridTool* _tmp2_;
	BirdFontGridTool* _tmp3_;
	BirdFontToolbox* _tmp4_;
	BirdFontToolbox* _tmp5_;
	_tmp0_ = bird_font_drawing_tools_get_grid_expander ();
	_tmp1_ = _tmp0_;
	_tmp2_ = bird_font_drawing_tools_get_show_grid ();
	_tmp3_ = _tmp2_;
	_tmp1_->visible = ((BirdFontTool*) _tmp3_)->selected;
	_tmp4_ = bird_font_main_window_get_toolbox ();
	_tmp5_ = _tmp4_;
	bird_font_toolbox_update_expanders (_tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
___lambda488__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda488_ ((BirdFontDrawingTools*) self);
}

static void
__lambda489_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontSpinButton* sb = NULL;
	BirdFontFontSettings* fs = NULL;
	BirdFontTool* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontFont* _tmp16_;
	BirdFontFont* _tmp17_;
	BirdFontFontSettings* _tmp18_;
	BirdFontFontSettings* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	g_return_if_fail (_self_ != NULL);
	bird_font_grid_tool_lock_grid = !bird_font_grid_tool_lock_grid;
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp0_;
		BirdFontExpander* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _t_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _t_index = 0;
		_tmp0_ = bird_font_drawing_tools_get_grid ();
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_->tool;
		_t_list = _tmp2_;
		_tmp3_ = _t_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_t_size = _tmp5_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			BirdFontTool* _tmp10_;
			_t_index = _t_index + 1;
			_tmp6_ = _t_index;
			_tmp7_ = _t_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _t_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _t_index);
			t = (BirdFontTool*) _tmp9_;
			_tmp10_ = t;
			if (BIRD_FONT_IS_SPIN_BUTTON (_tmp10_)) {
				BirdFontTool* _tmp11_;
				BirdFontSpinButton* _tmp12_;
				BirdFontSpinButton* _tmp13_;
				_tmp11_ = t;
				_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
				_g_object_unref0 (sb);
				sb = _tmp12_;
				_tmp13_ = sb;
				_tmp13_->locked = bird_font_grid_tool_lock_grid;
			}
			_g_object_unref0 (t);
		}
	}
	_tmp14_ = bird_font_drawing_tools_get_lock_grid ();
	_tmp15_ = _tmp14_;
	_tmp15_->selected = bird_font_grid_tool_lock_grid;
	_tmp16_ = bird_font_bird_font_get_current_font ();
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_->settings;
	_tmp19_ = _g_object_ref0 (_tmp18_);
	_g_object_unref0 (fs);
	fs = _tmp19_;
	_g_object_unref0 (_tmp17_);
	_tmp20_ = bool_to_string (bird_font_grid_tool_lock_grid);
	_tmp21_ = _tmp20_;
	bird_font_font_settings_set_setting (fs, "lock_grid", _tmp21_);
	_g_free0 (_tmp21_);
	_g_object_unref0 (fs);
	_g_object_unref0 (sb);
}

static void
___lambda489__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda489_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda490_ (BirdFontDrawingTools* self,
              gdouble z)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	gdouble zoom = 0.0;
	gdouble xc = 0.0;
	gdouble yc = 0.0;
	gdouble nxc = 0.0;
	gdouble nyc = 0.0;
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	zoom = (20 * z) + 1;
	xc = bird_font_glyph_path_coordinate_x (bird_font_glyph_xc ());
	yc = bird_font_glyph_path_coordinate_y (bird_font_glyph_yc ());
	bird_font_glyph_set_zoom (g, zoom);
	nxc = bird_font_glyph_path_coordinate_x (bird_font_glyph_xc ());
	nyc = bird_font_glyph_path_coordinate_y (bird_font_glyph_yc ());
	g->view_offset_x = g->view_offset_x - (nxc - xc);
	g->view_offset_y = g->view_offset_y + (nyc - yc);
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (g);
}

static void
___lambda490__bird_font_zoom_bar_new_zoom (BirdFontZoomBar* _sender,
                                           gdouble zoom_level,
                                           gpointer self)
{
	__lambda490_ ((BirdFontDrawingTools*) self, zoom_level);
}

static void
__lambda491_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontZoomTool* _tmp0_;
	BirdFontGlyphCanvas* _tmp1_;
	BirdFontFontDisplay* _tmp2_;
	BirdFontFontDisplay* _tmp3_;
	BirdFontGlyphCanvas* _tmp4_;
	BirdFontWidgetAllocation* _tmp5_;
	BirdFontWidgetAllocation* _tmp6_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_store_current_view (_tmp0_);
	_tmp1_ = self->priv->glyph_canvas;
	_tmp2_ = bird_font_glyph_canvas_get_current_display (_tmp1_);
	_tmp3_ = _tmp2_;
	bird_font_font_display_reset_zoom (_tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->glyph_canvas;
	_tmp5_ = bird_font_glyph_canvas_allocation;
	_tmp6_ = bird_font_glyph_canvas_allocation;
	bird_font_glyph_canvas_redraw_area (_tmp4_, 0, 0, _tmp5_->width, _tmp6_->height);
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda491__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda491_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda492_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontZoomTool* _tmp0_;
	BirdFontZoomTool* _tmp1_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_store_current_view (_tmp0_);
	_tmp1_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_zoom_full_glyph (_tmp1_);
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda492__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda492_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda493_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontZoomTool* _tmp0_;
	BirdFontGlyphCanvas* _tmp1_;
	BirdFontFontDisplay* _tmp2_;
	BirdFontFontDisplay* _tmp3_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_store_current_view (_tmp0_);
	_tmp1_ = self->priv->glyph_canvas;
	_tmp2_ = bird_font_glyph_canvas_get_current_display (_tmp1_);
	_tmp3_ = _tmp2_;
	bird_font_font_display_zoom_max (_tmp3_);
	_g_object_unref0 (_tmp3_);
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda493__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda493_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda494_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontGlyph* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* _tmp2_;
	BirdFontBackgroundImage* _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	_tmp1_ = _tmp0_;
	_tmp2_ = bird_font_glyph_get_background_image (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ != NULL;
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	if (_tmp4_) {
		BirdFontZoomTool* _tmp5_;
		BirdFontGlyphCanvas* _tmp6_;
		BirdFontWidgetAllocation* _tmp7_;
		BirdFontWidgetAllocation* _tmp8_;
		_tmp5_ = bird_font_drawing_tools_zoom_tool;
		bird_font_zoom_tool_store_current_view (_tmp5_);
		bird_font_zoom_tool_zoom_full_background_image ();
		_tmp6_ = self->priv->glyph_canvas;
		_tmp7_ = bird_font_glyph_canvas_allocation;
		_tmp8_ = bird_font_glyph_canvas_allocation;
		bird_font_glyph_canvas_redraw_area (_tmp6_, 0, 0, _tmp7_->width, _tmp8_->height);
	}
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda494__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda494_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda495_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontZoomTool* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_previous_view (_tmp0_);
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda495__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda495_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda496_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	BirdFontZoomTool* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_drawing_tools_zoom_tool;
	bird_font_zoom_tool_next_view (_tmp0_);
	bird_font_tool_set_selected (_self_, FALSE);
}

static void
___lambda496__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda496_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda497_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda497__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda497_ ((BirdFontDrawingTools*) self, selected);
}

static void
__lambda501_ (BirdFontDrawingTools* self,
              BirdFontTool* _self_)
{
	g_return_if_fail (_self_ != NULL);
	bird_font_drawing_tools_update_drawing_and_background_tools (self, _self_);
}

static void
___lambda501__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda501_ ((BirdFontDrawingTools*) self, selected);
}

static gboolean
__lambda502_ (BirdFontDrawingTools* self)
{
	BirdFontToolbox* tb = NULL;
	BirdFontToolbox* _tmp0_;
	BirdFontToolbox* _tmp1_;
	BirdFontPointTool* _tmp2_;
	BirdFontToolbox* _tmp3_;
	BirdFontPointTool* _tmp4_;
	BirdFontToolbox* _tmp5_;
	BirdFontPointTool* _tmp6_;
	BirdFontGlyph* _tmp7_;
	BirdFontGlyph* _tmp8_;
	gboolean _tmp9_;
	BirdFontSpinButton* _tmp14_;
	BirdFontSpinButton* _tmp15_;
	BirdFontSpinButton* _tmp16_;
	BirdFontSpinButton* _tmp17_;
	BirdFontSpinButton* _tmp18_;
	BirdFontSpinButton* _tmp19_;
	BirdFontToolbox* _tmp20_;
	BirdFontToolbox* _tmp21_;
	gboolean result;
	_tmp0_ = bird_font_main_window_get_toolbox ();
	tb = _tmp0_;
	_tmp1_ = tb;
	bird_font_toolbox_reset_active_tool (_tmp1_);
	_tmp2_ = self->priv->point_tool;
	bird_font_drawing_tools_update_drawing_and_background_tools (self, (BirdFontTool*) _tmp2_);
	_tmp3_ = tb;
	_tmp4_ = self->priv->point_tool;
	bird_font_toolbox_select_tool (_tmp3_, (BirdFontTool*) _tmp4_);
	_tmp5_ = tb;
	_tmp6_ = self->priv->point_tool;
	bird_font_toolbox_set_current_tool (_tmp5_, (BirdFontTool*) _tmp6_);
	bird_font_drawing_tools_set_point_type_from_preferences ();
	_tmp7_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp8_ = _tmp7_;
	_tmp9_ = bird_font_glyph_get_show_help_lines (_tmp8_);
	_g_object_unref0 (_tmp8_);
	if (_tmp9_) {
		BirdFontTool* _tmp10_;
		BirdFontTool* _tmp11_;
		BirdFontTool* _tmp12_;
		BirdFontTool* _tmp13_;
		_tmp10_ = bird_font_drawing_tools_get_help_lines ();
		_tmp11_ = _tmp10_;
		bird_font_tool_set_selected (_tmp11_, TRUE);
		_tmp12_ = bird_font_drawing_tools_get_help_lines ();
		_tmp13_ = _tmp12_;
		bird_font_tool_set_active (_tmp13_, FALSE);
	}
	_tmp14_ = bird_font_drawing_tools_add_new_grid ((gdouble) 1, TRUE);
	_tmp15_ = _tmp14_;
	_g_object_unref0 (_tmp15_);
	_tmp16_ = bird_font_drawing_tools_add_new_grid ((gdouble) 2, TRUE);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp17_);
	_tmp18_ = bird_font_drawing_tools_add_new_grid ((gdouble) 4, TRUE);
	_tmp19_ = _tmp18_;
	_g_object_unref0 (_tmp19_);
	_tmp20_ = bird_font_main_window_get_toolbox ();
	_tmp21_ = _tmp20_;
	bird_font_toolbox_move (_tmp21_, (gdouble) 0, (gdouble) 0);
	_g_object_unref0 (_tmp21_);
	bird_font_drawing_tools_set_stroke_tool_visibility ();
	result = FALSE;
	_g_object_unref0 (tb);
	return result;
}

static gboolean
___lambda502__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda502_ ((BirdFontDrawingTools*) self);
	return result;
}

static void
__lambda504_ (BirdFontDrawingTools* self,
              BirdFontTab* tab)
{
	BirdFontGlyph* glyph = NULL;
	BirdFontGlyphTab* glyph_tab = NULL;
	BirdFontFontDisplay* _tmp0_;
	BirdFontFontDisplay* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (tab != NULL);
	_tmp0_ = bird_font_tab_get_display (tab);
	_tmp1_ = _tmp0_;
	_tmp2_ = BIRD_FONT_IS_GLYPH_TAB (_tmp1_);
	_g_object_unref0 (_tmp1_);
	if (_tmp2_) {
		BirdFontFontDisplay* _tmp3_;
		BirdFontGlyphTab* _tmp4_;
		BirdFontGlyphCollection* _tmp5_;
		BirdFontGlyph* _tmp6_;
		BirdFontTool* _tmp7_;
		BirdFontGlyph* _tmp8_;
		BirdFontGlyph* _tmp9_;
		_tmp3_ = bird_font_tab_get_display (tab);
		_g_object_unref0 (glyph_tab);
		glyph_tab = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, BIRD_FONT_TYPE_GLYPH_TAB, BirdFontGlyphTab);
		_tmp4_ = glyph_tab;
		_tmp5_ = _tmp4_->glyphs;
		_tmp6_ = bird_font_glyph_collection_get_current (_tmp5_);
		_g_object_unref0 (glyph);
		glyph = _tmp6_;
		_tmp7_ = self->priv->show_bg;
		_tmp8_ = glyph;
		bird_font_tool_set_selected (_tmp7_, bird_font_glyph_get_background_visible (_tmp8_));
		_tmp9_ = glyph;
		bird_font_drawing_tools_update_line_selection (self, _tmp9_);
	}
	_g_object_unref0 (glyph_tab);
	_g_object_unref0 (glyph);
}

static void
___lambda504__bird_font_tab_bar_signal_tab_selected (BirdFontTabBar* _sender,
                                                     BirdFontTab* selected_tab,
                                                     gpointer self)
{
	__lambda504_ ((BirdFontDrawingTools*) self, selected_tab);
}

BirdFontDrawingTools*
bird_font_drawing_tools_construct (GType object_type,
                                   BirdFontGlyphCanvas* main_glyph_canvas)
{
	BirdFontDrawingTools * self = NULL;
	Block11Data* _data11_;
	gboolean selected_line = FALSE;
	BirdFontGlyphCanvas* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	BirdFontExpander* _tmp4_;
	BirdFontExpander* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	BirdFontExpander* _tmp8_;
	BirdFontExpander* _tmp9_;
	BirdFontExpander* _tmp10_;
	BirdFontExpander* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	BirdFontExpander* _tmp14_;
	BirdFontExpander* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	BirdFontExpander* _tmp18_;
	BirdFontExpander* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	BirdFontExpander* _tmp22_;
	BirdFontExpander* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	BirdFontExpander* _tmp26_;
	BirdFontExpander* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	BirdFontExpander* _tmp30_;
	BirdFontExpander* _tmp31_;
	BirdFontExpander* _tmp32_;
	BirdFontExpander* _tmp33_;
	BirdFontExpander* _tmp34_;
	BirdFontExpander* _tmp35_;
	BirdFontExpander* _tmp36_;
	BirdFontExpander* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	BirdFontExpander* _tmp40_;
	BirdFontExpander* _tmp41_;
	BirdFontExpander* _tmp42_;
	BirdFontExpander* _tmp43_;
	BirdFontExpander* _tmp44_;
	BirdFontExpander* _tmp45_;
	BirdFontFontName* _tmp46_;
	BirdFontFontName* _tmp47_;
	BirdFontBezierTool* _tmp48_;
	BirdFontBezierTool* _tmp49_;
	BirdFontExpander* _tmp50_;
	BirdFontExpander* _tmp51_;
	BirdFontBezierTool* _tmp52_;
	BirdFontPenTool* _tmp53_;
	BirdFontPenTool* _tmp54_;
	BirdFontExpander* _tmp55_;
	BirdFontExpander* _tmp56_;
	BirdFontPenTool* _tmp57_;
	BirdFontPointTool* _tmp58_;
	BirdFontPointTool* _tmp59_;
	BirdFontExpander* _tmp60_;
	BirdFontExpander* _tmp61_;
	BirdFontPointTool* _tmp62_;
	BirdFontZoomTool* _tmp63_;
	BirdFontZoomTool* _tmp64_;
	BirdFontExpander* _tmp65_;
	BirdFontExpander* _tmp66_;
	BirdFontZoomTool* _tmp67_;
	BirdFontMoveTool* _tmp68_;
	BirdFontMoveTool* _tmp69_;
	BirdFontMoveTool* _tmp70_;
	BirdFontMoveTool* _tmp71_;
	BirdFontExpander* _tmp72_;
	BirdFontExpander* _tmp73_;
	BirdFontMoveTool* _tmp74_;
	BirdFontMoveTool* _tmp75_;
	BirdFontResizeTool* _tmp76_;
	BirdFontResizeTool* _tmp77_;
	BirdFontExpander* _tmp78_;
	BirdFontExpander* _tmp79_;
	BirdFontResizeTool* _tmp80_;
	BirdFontTrackTool* _tmp81_;
	BirdFontTrackTool* _tmp82_;
	BirdFontExpander* _tmp83_;
	BirdFontExpander* _tmp84_;
	BirdFontTrackTool* _tmp85_;
	BirdFontBackgroundTool* _tmp86_;
	BirdFontBackgroundTool* _tmp87_;
	BirdFontExpander* _tmp88_;
	BirdFontExpander* _tmp89_;
	BirdFontBackgroundTool* _tmp90_;
	gchar* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	gchar* _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar* _tmp104_;
	gchar* _tmp105_;
	gchar* _tmp106_;
	BirdFontTool* _tmp107_;
	BirdFontTool* _tmp108_;
	BirdFontExpander* _tmp109_;
	BirdFontExpander* _tmp110_;
	BirdFontTool* _tmp111_;
	gchar* _tmp112_;
	gchar* _tmp113_;
	BirdFontTool* _tmp114_;
	BirdFontTool* _tmp115_;
	BirdFontExpander* _tmp116_;
	BirdFontExpander* _tmp117_;
	BirdFontTool* _tmp118_;
	gchar* _tmp119_;
	gchar* _tmp120_;
	BirdFontTool* _tmp121_;
	BirdFontTool* _tmp122_;
	BirdFontExpander* _tmp123_;
	BirdFontExpander* _tmp124_;
	BirdFontTool* _tmp125_;
	gchar* _tmp126_;
	gchar* _tmp127_;
	BirdFontTool* _tmp128_;
	BirdFontTool* _tmp129_;
	BirdFontExpander* _tmp130_;
	BirdFontExpander* _tmp131_;
	BirdFontTool* _tmp132_;
	gchar* _tmp133_;
	gchar* _tmp134_;
	BirdFontTool* _tmp135_;
	BirdFontTool* _tmp136_;
	BirdFontTool* _tmp137_;
	BirdFontExpander* _tmp138_;
	BirdFontExpander* _tmp139_;
	BirdFontTool* _tmp140_;
	gchar* _tmp141_;
	gchar* _tmp142_;
	BirdFontTool* _tmp143_;
	BirdFontTool* _tmp144_;
	BirdFontExpander* _tmp145_;
	BirdFontExpander* _tmp146_;
	BirdFontTool* _tmp147_;
	gchar* _tmp148_;
	gchar* _tmp149_;
	BirdFontTool* _tmp150_;
	BirdFontTool* _tmp151_;
	BirdFontExpander* _tmp152_;
	BirdFontExpander* _tmp153_;
	BirdFontTool* _tmp154_;
	gchar* _tmp155_;
	gchar* _tmp156_;
	BirdFontTool* _tmp157_;
	BirdFontTool* _tmp158_;
	BirdFontExpander* _tmp159_;
	BirdFontExpander* _tmp160_;
	BirdFontTool* _tmp161_;
	gchar* _tmp162_;
	gchar* _tmp163_;
	BirdFontTool* _tmp164_;
	BirdFontTool* _tmp165_;
	BirdFontTool* _tmp166_;
	BirdFontExpander* _tmp167_;
	BirdFontExpander* _tmp168_;
	BirdFontTool* _tmp169_;
	gchar* _tmp170_;
	gchar* _tmp171_;
	BirdFontSpinButton* _tmp172_;
	BirdFontSpinButton* _tmp173_;
	BirdFontSpinButton* _tmp174_;
	BirdFontSpinButton* _tmp175_;
	BirdFontSpinButton* _tmp176_;
	BirdFontSpinButton* _tmp177_;
	BirdFontSpinButton* _tmp178_;
	BirdFontSpinButton* _tmp179_;
	BirdFontSpinButton* _tmp180_;
	BirdFontExpander* _tmp181_;
	BirdFontExpander* _tmp182_;
	BirdFontSpinButton* _tmp183_;
	BirdFontMoveTool* _tmp184_;
	BirdFontMoveTool* _tmp185_;
	BirdFontMoveTool* _tmp186_;
	BirdFontMoveTool* _tmp187_;
	BirdFontMoveTool* _tmp188_;
	BirdFontMoveTool* _tmp189_;
	gchar* _tmp190_;
	gchar* _tmp191_;
	BirdFontSpinButton* _tmp192_;
	BirdFontSpinButton* _tmp193_;
	BirdFontSpinButton* _tmp194_;
	BirdFontSpinButton* _tmp195_;
	BirdFontSpinButton* _tmp196_;
	BirdFontSpinButton* _tmp197_;
	BirdFontSpinButton* _tmp198_;
	BirdFontSpinButton* _tmp199_;
	BirdFontSpinButton* _tmp200_;
	BirdFontExpander* _tmp201_;
	BirdFontExpander* _tmp202_;
	BirdFontSpinButton* _tmp203_;
	BirdFontMoveTool* _tmp204_;
	BirdFontMoveTool* _tmp205_;
	BirdFontMoveTool* _tmp206_;
	BirdFontMoveTool* _tmp207_;
	BirdFontMoveTool* _tmp208_;
	BirdFontMoveTool* _tmp209_;
	gchar* _tmp210_;
	gchar* _tmp211_;
	BirdFontSpinButton* _tmp212_;
	BirdFontSpinButton* _tmp213_;
	BirdFontSpinButton* _tmp214_;
	BirdFontSpinButton* _tmp215_;
	BirdFontSpinButton* _tmp216_;
	BirdFontSpinButton* _tmp217_;
	BirdFontSpinButton* _tmp218_;
	BirdFontSpinButton* _tmp219_;
	BirdFontSpinButton* _tmp220_;
	BirdFontResizeTool* _tmp221_;
	BirdFontMoveTool* _tmp222_;
	BirdFontMoveTool* _tmp223_;
	BirdFontExpander* _tmp224_;
	BirdFontExpander* _tmp225_;
	BirdFontSpinButton* _tmp226_;
	gchar* _tmp227_;
	gchar* _tmp228_;
	BirdFontSpinButton* _tmp229_;
	BirdFontSpinButton* _tmp230_;
	BirdFontSpinButton* _tmp231_;
	BirdFontSpinButton* _tmp232_;
	BirdFontSpinButton* _tmp233_;
	BirdFontSpinButton* _tmp234_;
	BirdFontSpinButton* _tmp235_;
	BirdFontExpander* _tmp236_;
	BirdFontExpander* _tmp237_;
	BirdFontSpinButton* _tmp238_;
	gchar* _tmp239_;
	gchar* _tmp240_;
	BirdFontSpinButton* _tmp241_;
	BirdFontSpinButton* _tmp242_;
	BirdFontSpinButton* _tmp243_;
	BirdFontSpinButton* _tmp244_;
	BirdFontSpinButton* _tmp245_;
	BirdFontSpinButton* _tmp246_;
	BirdFontSpinButton* _tmp247_;
	BirdFontExpander* _tmp248_;
	BirdFontExpander* _tmp249_;
	BirdFontSpinButton* _tmp250_;
	BirdFontResizeTool* _tmp251_;
	BirdFontMoveTool* _tmp252_;
	BirdFontMoveTool* _tmp253_;
	BirdFontMoveTool* _tmp254_;
	BirdFontMoveTool* _tmp255_;
	gchar* _tmp256_;
	gchar* _tmp257_;
	BirdFontTool* _tmp258_;
	BirdFontTool* _tmp259_;
	BirdFontExpander* _tmp260_;
	BirdFontExpander* _tmp261_;
	BirdFontTool* _tmp262_;
	gchar* _tmp263_;
	gchar* _tmp264_;
	BirdFontTool* _tmp265_;
	BirdFontTool* _tmp266_;
	BirdFontExpander* _tmp267_;
	BirdFontExpander* _tmp268_;
	BirdFontTool* _tmp269_;
	gchar* _tmp270_;
	gchar* _tmp271_;
	BirdFontTool* _tmp272_;
	BirdFontTool* _tmp273_;
	BirdFontExpander* _tmp274_;
	BirdFontExpander* _tmp275_;
	BirdFontTool* _tmp276_;
	gchar* _tmp277_;
	gchar* _tmp278_;
	BirdFontOrientationTool* _tmp279_;
	BirdFontExpander* _tmp280_;
	BirdFontExpander* _tmp281_;
	BirdFontOrientationTool* _tmp282_;
	gchar* _tmp283_;
	gchar* _tmp284_;
	BirdFontTool* _tmp285_;
	BirdFontTool* _tmp286_;
	BirdFontExpander* _tmp287_;
	BirdFontExpander* _tmp288_;
	BirdFontTool* _tmp289_;
	gchar* _tmp290_;
	gchar* _tmp291_;
	BirdFontTool* _tmp292_;
	BirdFontTool* _tmp293_;
	BirdFontExpander* _tmp294_;
	BirdFontExpander* _tmp295_;
	BirdFontTool* _tmp296_;
	gchar* _tmp297_;
	gchar* _tmp298_;
	BirdFontTool* _tmp299_;
	BirdFontTool* _tmp300_;
	BirdFontExpander* _tmp301_;
	BirdFontExpander* _tmp302_;
	BirdFontTool* _tmp303_;
	gchar* _tmp304_;
	gchar* _tmp305_;
	BirdFontTool* _tmp306_;
	BirdFontTool* _tmp307_;
	BirdFontExpander* _tmp308_;
	BirdFontExpander* _tmp309_;
	BirdFontTool* _tmp310_;
	gchar* _tmp311_;
	gchar* _tmp312_;
	BirdFontTool* _tmp313_;
	BirdFontTool* _tmp314_;
	BirdFontExpander* _tmp315_;
	BirdFontExpander* _tmp316_;
	BirdFontTool* _tmp317_;
	gchar* _tmp318_;
	gchar* _tmp319_;
	BirdFontSpinButton* _tmp320_;
	BirdFontSpinButton* _tmp321_;
	BirdFontSpinButton* _tmp322_;
	BirdFontSpinButton* _tmp323_;
	BirdFontSpinButton* _tmp324_;
	BirdFontExpander* _tmp325_;
	BirdFontExpander* _tmp326_;
	BirdFontSpinButton* _tmp327_;
	BirdFontCutBackgroundTool* _tmp328_;
	BirdFontCutBackgroundTool* _tmp329_;
	BirdFontExpander* _tmp330_;
	BirdFontExpander* _tmp331_;
	BirdFontCutBackgroundTool* _tmp332_;
	gchar* _tmp333_;
	gchar* _tmp334_;
	BirdFontTool* _tmp335_;
	BirdFontTool* _tmp336_;
	BirdFontTool* _tmp337_;
	BirdFontExpander* _tmp338_;
	BirdFontExpander* _tmp339_;
	BirdFontTool* _tmp340_;
	gchar* _tmp341_;
	gchar* _tmp342_;
	BirdFontTool* _tmp343_;
	BirdFontTool* _tmp344_;
	BirdFontTool* _tmp345_;
	BirdFontTool* _tmp346_;
	BirdFontExpander* _tmp347_;
	BirdFontExpander* _tmp348_;
	BirdFontTool* _tmp349_;
	gchar* _tmp350_;
	gchar* _tmp351_;
	BirdFontTool* _tmp352_;
	BirdFontTool* _tmp353_;
	BirdFontExpander* _tmp354_;
	BirdFontExpander* _tmp355_;
	BirdFontTool* _tmp356_;
	gchar* _tmp357_;
	gchar* _tmp358_;
	BirdFontSpinButton* _tmp359_;
	BirdFontSpinButton* _tmp360_;
	BirdFontSpinButton* _tmp361_;
	BirdFontSpinButton* _tmp362_;
	BirdFontExpander* _tmp363_;
	BirdFontExpander* _tmp364_;
	BirdFontSpinButton* _tmp365_;
	gchar* _tmp366_;
	gchar* _tmp367_;
	BirdFontSpinButton* _tmp368_;
	BirdFontSpinButton* _tmp369_;
	BirdFontSpinButton* _tmp370_;
	BirdFontSpinButton* _tmp371_;
	BirdFontExpander* _tmp372_;
	BirdFontExpander* _tmp373_;
	BirdFontSpinButton* _tmp374_;
	gchar* _tmp375_;
	gchar* _tmp376_;
	BirdFontSpinButton* _tmp377_;
	BirdFontSpinButton* _tmp378_;
	BirdFontSpinButton* _tmp379_;
	BirdFontSpinButton* _tmp380_;
	BirdFontExpander* _tmp381_;
	BirdFontExpander* _tmp382_;
	BirdFontSpinButton* _tmp383_;
	gchar* _tmp384_;
	gchar* _tmp385_;
	BirdFontTool* _tmp386_;
	BirdFontTool* _tmp387_;
	BirdFontExpander* _tmp388_;
	BirdFontExpander* _tmp389_;
	BirdFontTool* _tmp390_;
	gchar* _tmp391_;
	gchar* _tmp392_;
	BirdFontTool* _tmp393_;
	BirdFontTool* _tmp394_;
	BirdFontExpander* _tmp395_;
	BirdFontExpander* _tmp396_;
	BirdFontTool* _tmp397_;
	gchar* _tmp398_;
	gchar* _tmp399_;
	BirdFontTool* _tmp400_;
	BirdFontTool* _tmp401_;
	BirdFontExpander* _tmp402_;
	BirdFontExpander* _tmp403_;
	BirdFontTool* _tmp404_;
	gchar* _tmp405_;
	gchar* _tmp406_;
	BirdFontTool* _tmp407_;
	BirdFontTool* _tmp408_;
	BirdFontExpander* _tmp409_;
	BirdFontExpander* _tmp410_;
	BirdFontTool* _tmp411_;
	gchar* _tmp412_;
	gchar* _tmp413_;
	BirdFontTool* _tmp414_;
	BirdFontTool* _tmp415_;
	BirdFontTool* _tmp416_;
	BirdFontTool* _tmp417_;
	BirdFontExpander* _tmp418_;
	BirdFontExpander* _tmp419_;
	BirdFontTool* _tmp420_;
	BirdFontTool* _tmp421_;
	BirdFontTool* _tmp422_;
	BirdFontTool* _tmp423_;
	gchar* _tmp424_;
	gchar* _tmp425_;
	BirdFontSpinButton* _tmp426_;
	BirdFontSpinButton* _tmp427_;
	BirdFontSpinButton* _tmp428_;
	BirdFontSpinButton* _tmp429_;
	BirdFontSpinButton* _tmp430_;
	BirdFontSpinButton* _tmp431_;
	BirdFontExpander* _tmp432_;
	BirdFontExpander* _tmp433_;
	BirdFontSpinButton* _tmp434_;
	BirdFontMoveTool* _tmp435_;
	BirdFontMoveTool* _tmp436_;
	BirdFontMoveTool* _tmp437_;
	BirdFontMoveTool* _tmp438_;
	gchar* _tmp439_;
	gchar* _tmp440_;
	BirdFontTool* _tmp441_;
	BirdFontTool* _tmp442_;
	BirdFontExpander* _tmp443_;
	BirdFontExpander* _tmp444_;
	BirdFontTool* _tmp445_;
	gchar* _tmp446_;
	gchar* _tmp447_;
	BirdFontTool* _tmp448_;
	BirdFontTool* _tmp449_;
	BirdFontExpander* _tmp450_;
	BirdFontExpander* _tmp451_;
	BirdFontTool* _tmp452_;
	gchar* _tmp453_;
	gchar* _tmp454_;
	BirdFontTool* _tmp455_;
	BirdFontTool* _tmp456_;
	BirdFontExpander* _tmp457_;
	BirdFontExpander* _tmp458_;
	BirdFontTool* _tmp459_;
	gchar* _tmp460_;
	gchar* _tmp461_;
	BirdFontTool* _tmp462_;
	BirdFontTool* _tmp463_;
	BirdFontExpander* _tmp464_;
	BirdFontExpander* _tmp465_;
	BirdFontTool* _tmp466_;
	gchar* _tmp487_;
	gchar* _tmp488_;
	BirdFontTool* _tmp489_;
	BirdFontTool* _tmp490_;
	BirdFontTool* _tmp491_;
	BirdFontTool* _tmp492_;
	BirdFontGlyph* _tmp493_;
	BirdFontGlyph* _tmp494_;
	BirdFontTool* _tmp495_;
	BirdFontTool* _tmp496_;
	BirdFontExpander* _tmp497_;
	BirdFontExpander* _tmp498_;
	BirdFontTool* _tmp499_;
	BirdFontTool* _tmp500_;
	gchar* _tmp501_;
	gchar* _tmp502_;
	BirdFontTool* _tmp503_;
	BirdFontTool* _tmp504_;
	BirdFontTool* _tmp505_;
	BirdFontTool* _tmp506_;
	BirdFontGlyph* _tmp507_;
	BirdFontGlyph* _tmp508_;
	BirdFontTool* _tmp509_;
	BirdFontTool* _tmp510_;
	BirdFontExpander* _tmp511_;
	BirdFontExpander* _tmp512_;
	BirdFontTool* _tmp513_;
	BirdFontTool* _tmp514_;
	gchar* _tmp515_;
	gchar* _tmp516_;
	BirdFontTool* _tmp517_;
	BirdFontTool* _tmp518_;
	BirdFontTool* _tmp519_;
	BirdFontTool* _tmp520_;
	BirdFontGlyph* _tmp521_;
	BirdFontGlyph* _tmp522_;
	BirdFontTool* _tmp523_;
	BirdFontTool* _tmp524_;
	BirdFontExpander* _tmp525_;
	BirdFontExpander* _tmp526_;
	BirdFontTool* _tmp527_;
	BirdFontTool* _tmp528_;
	BirdFontGridTool* _tmp529_;
	BirdFontGridTool* _tmp530_;
	BirdFontGridTool* _tmp531_;
	BirdFontGridTool* _tmp532_;
	BirdFontExpander* _tmp533_;
	BirdFontExpander* _tmp534_;
	BirdFontGridTool* _tmp535_;
	BirdFontGridTool* _tmp536_;
	BirdFontExpander* _tmp537_;
	BirdFontExpander* _tmp538_;
	gchar* _tmp539_;
	gchar* _tmp540_;
	BirdFontTool* _tmp541_;
	BirdFontTool* _tmp542_;
	BirdFontTool* _tmp543_;
	BirdFontTool* _tmp544_;
	BirdFontExpander* _tmp545_;
	BirdFontExpander* _tmp546_;
	BirdFontTool* _tmp547_;
	BirdFontTool* _tmp548_;
	BirdFontZoomBar* _tmp549_;
	BirdFontZoomBar* _tmp550_;
	BirdFontExpander* _tmp551_;
	BirdFontExpander* _tmp552_;
	BirdFontZoomBar* _tmp553_;
	BirdFontTool* reset_zoom = NULL;
	gchar* _tmp554_;
	gchar* _tmp555_;
	BirdFontTool* _tmp556_;
	BirdFontTool* _tmp557_;
	BirdFontTool* _tmp558_;
	BirdFontExpander* _tmp559_;
	BirdFontExpander* _tmp560_;
	BirdFontTool* _tmp561_;
	BirdFontTool* _tmp562_;
	BirdFontTool* full_glyph = NULL;
	gchar* _tmp563_;
	gchar* _tmp564_;
	BirdFontTool* _tmp565_;
	BirdFontTool* _tmp566_;
	BirdFontTool* _tmp567_;
	BirdFontExpander* _tmp568_;
	BirdFontExpander* _tmp569_;
	BirdFontTool* _tmp570_;
	BirdFontTool* zoom_boundaries = NULL;
	gchar* _tmp571_;
	gchar* _tmp572_;
	BirdFontTool* _tmp573_;
	BirdFontTool* _tmp574_;
	BirdFontTool* _tmp575_;
	BirdFontExpander* _tmp576_;
	BirdFontExpander* _tmp577_;
	BirdFontTool* _tmp578_;
	BirdFontTool* zoom_bg = NULL;
	gchar* _tmp579_;
	gchar* _tmp580_;
	BirdFontTool* _tmp581_;
	BirdFontTool* _tmp582_;
	BirdFontTool* _tmp583_;
	BirdFontExpander* _tmp584_;
	BirdFontExpander* _tmp585_;
	BirdFontTool* _tmp586_;
	BirdFontTool* zoom_prev = NULL;
	gchar* _tmp587_;
	gchar* _tmp588_;
	BirdFontTool* _tmp589_;
	BirdFontTool* _tmp590_;
	BirdFontTool* _tmp591_;
	BirdFontExpander* _tmp592_;
	BirdFontExpander* _tmp593_;
	BirdFontTool* _tmp594_;
	BirdFontTool* zoom_next = NULL;
	gchar* _tmp595_;
	gchar* _tmp596_;
	BirdFontTool* _tmp597_;
	BirdFontTool* _tmp598_;
	BirdFontTool* _tmp599_;
	BirdFontExpander* _tmp600_;
	BirdFontExpander* _tmp601_;
	BirdFontTool* _tmp602_;
	BirdFontTool* _tmp603_;
	BirdFontCircleTool* _tmp604_;
	BirdFontTool* _tmp605_;
	BirdFontExpander* _tmp606_;
	BirdFontExpander* _tmp607_;
	BirdFontTool* _tmp608_;
	BirdFontRectangleTool* _tmp609_;
	BirdFontTool* _tmp610_;
	BirdFontExpander* _tmp611_;
	BirdFontExpander* _tmp612_;
	BirdFontTool* _tmp613_;
	BirdFontExpander* _tmp614_;
	BirdFontExpander* _tmp615_;
	BirdFontExpander* _tmp616_;
	BirdFontExpander* _tmp617_;
	BirdFontExpander* _tmp620_;
	BirdFontExpander* _tmp621_;
	BirdFontExpander* _tmp622_;
	BirdFontExpander* _tmp623_;
	BirdFontExpander* _tmp624_;
	BirdFontExpander* _tmp625_;
	BirdFontExpander* _tmp626_;
	BirdFontExpander* _tmp627_;
	BirdFontExpander* _tmp628_;
	BirdFontExpander* _tmp629_;
	BirdFontExpander* _tmp630_;
	BirdFontExpander* _tmp631_;
	BirdFontExpander* _tmp632_;
	BirdFontExpander* _tmp633_;
	BirdFontExpander* _tmp634_;
	BirdFontExpander* _tmp635_;
	BirdFontExpander* _tmp638_;
	BirdFontExpander* _tmp639_;
	BirdFontExpander* _tmp640_;
	BirdFontExpander* _tmp641_;
	BirdFontExpander* _tmp642_;
	BirdFontExpander* _tmp643_;
	BirdFontExpander* _tmp644_;
	BirdFontExpander* _tmp645_;
	BirdFontExpander* _tmp646_;
	BirdFontExpander* _tmp647_;
	BirdFontExpander* _tmp648_;
	BirdFontExpander* _tmp649_;
	BirdFontExpander* _tmp650_;
	BirdFontExpander* _tmp651_;
	BirdFontExpander* _tmp652_;
	BirdFontExpander* _tmp653_;
	BirdFontExpander* _tmp654_;
	BirdFontExpander* _tmp655_;
	BirdFontExpander* _tmp656_;
	BirdFontExpander* _tmp657_;
	BirdFontExpander* _tmp658_;
	BirdFontExpander* _tmp659_;
	BirdFontExpander* _tmp660_;
	BirdFontExpander* _tmp661_;
	BirdFontExpander* _tmp662_;
	BirdFontExpander* _tmp663_;
	BirdFontExpander* _tmp664_;
	BirdFontExpander* _tmp665_;
	BirdFontExpander* _tmp666_;
	BirdFontExpander* _tmp667_;
	BirdFontExpander* _tmp668_;
	BirdFontExpander* _tmp669_;
	BirdFontExpander* _tmp670_;
	BirdFontExpander* _tmp671_;
	BirdFontBackgroundTool* _tmp695_;
	BirdFontCutBackgroundTool* _tmp696_;
	BirdFontTool* _tmp697_;
	BirdFontBackgroundTool* _tmp698_;
	BirdFontCutBackgroundTool* _tmp699_;
	BirdFontTool* _tmp700_;
	GSource* idle = NULL;
	GSource* _tmp701_;
	BirdFontTabBar* _tmp702_;
	BirdFontTabBar* _tmp703_;
	g_return_val_if_fail (main_glyph_canvas != NULL, NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	self = (BirdFontDrawingTools*) bird_font_tool_collection_construct (object_type);
	_data11_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (main_glyph_canvas);
	_g_object_unref0 (self->priv->glyph_canvas);
	self->priv->glyph_canvas = _tmp0_;
	_tmp1_ = bird_font_spin_button_new (NULL, "");
	_g_object_unref0 (bird_font_drawing_tools_background_scale);
	bird_font_drawing_tools_background_scale = _tmp1_;
	_tmp2_ = bird_font_t_ ("Drawing Tools");
	_tmp3_ = _tmp2_;
	_tmp4_ = bird_font_expander_new (_tmp3_);
	_tmp5_ = _tmp4_;
	bird_font_drawing_tools_set_draw_tools (_tmp5_);
	_g_object_unref0 (_tmp5_);
	_g_free0 (_tmp3_);
	_tmp6_ = bird_font_t_ ("Control Point");
	_tmp7_ = _tmp6_;
	_tmp8_ = bird_font_expander_new (_tmp7_);
	_tmp9_ = _tmp8_;
	bird_font_drawing_tools_set_draw_tool_modifiers (_tmp9_);
	_g_object_unref0 (_tmp9_);
	_g_free0 (_tmp7_);
	_tmp10_ = bird_font_expander_new (NULL);
	_tmp11_ = _tmp10_;
	bird_font_drawing_tools_set_layer_tools (_tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = bird_font_t_ ("Layers");
	_tmp13_ = _tmp12_;
	_tmp14_ = bird_font_expander_new (_tmp13_);
	_tmp15_ = _tmp14_;
	bird_font_drawing_tools_set_layer_settings (_tmp15_);
	_g_object_unref0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp16_ = bird_font_t_ ("Stroke");
	_tmp17_ = _tmp16_;
	_tmp18_ = bird_font_expander_new (_tmp17_);
	_tmp19_ = _tmp18_;
	bird_font_drawing_tools_set_stroke_expander (_tmp19_);
	_g_object_unref0 (_tmp19_);
	_g_free0 (_tmp17_);
	_tmp20_ = bird_font_t_ ("Geometrical Shapes");
	_tmp21_ = _tmp20_;
	_tmp22_ = bird_font_expander_new (_tmp21_);
	_tmp23_ = _tmp22_;
	bird_font_drawing_tools_set_shape_tools (_tmp23_);
	_g_object_unref0 (_tmp23_);
	_g_free0 (_tmp21_);
	_tmp24_ = bird_font_t_ ("Zoom");
	_tmp25_ = _tmp24_;
	_tmp26_ = bird_font_expander_new (_tmp25_);
	_tmp27_ = _tmp26_;
	bird_font_drawing_tools_set_zoombar_tool (_tmp27_);
	_g_object_unref0 (_tmp27_);
	_g_free0 (_tmp25_);
	_tmp28_ = bird_font_t_ ("Guidelines & Grid");
	_tmp29_ = _tmp28_;
	_tmp30_ = bird_font_expander_new (_tmp29_);
	_tmp31_ = _tmp30_;
	bird_font_drawing_tools_set_guideline_tools (_tmp31_);
	_g_object_unref0 (_tmp31_);
	_g_free0 (_tmp29_);
	_tmp32_ = bird_font_expander_new (NULL);
	_tmp33_ = _tmp32_;
	bird_font_drawing_tools_set_font_name (_tmp33_);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = bird_font_expander_new (NULL);
	_tmp35_ = _tmp34_;
	bird_font_drawing_tools_set_key_tools (_tmp35_);
	_g_object_unref0 (_tmp35_);
	_tmp36_ = bird_font_expander_new (NULL);
	_tmp37_ = _tmp36_;
	bird_font_drawing_tools_set_test_tools (_tmp37_);
	_g_object_unref0 (_tmp37_);
	_tmp38_ = bird_font_t_ ("Grid Size");
	_tmp39_ = _tmp38_;
	_tmp40_ = bird_font_expander_new (_tmp39_);
	_tmp41_ = _tmp40_;
	bird_font_drawing_tools_set_grid (_tmp41_);
	_g_object_unref0 (_tmp41_);
	_g_free0 (_tmp39_);
	_tmp42_ = bird_font_drawing_tools_get_grid ();
	_tmp43_ = _tmp42_;
	bird_font_drawing_tools_set_grid_expander (_tmp43_);
	_tmp44_ = bird_font_drawing_tools_get_font_name ();
	_tmp45_ = _tmp44_;
	_tmp46_ = bird_font_font_name_new (NULL, "");
	_tmp47_ = _tmp46_;
	bird_font_expander_add_tool (_tmp45_, (BirdFontTool*) _tmp47_, -1);
	_g_object_unref0 (_tmp47_);
	_tmp48_ = bird_font_bezier_tool_new ("bezier_tool");
	_g_object_unref0 (bird_font_drawing_tools_bezier_tool);
	bird_font_drawing_tools_bezier_tool = _tmp48_;
	_tmp49_ = bird_font_drawing_tools_bezier_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp49_, "select-action", (GCallback) ___lambda416__bird_font_tool_select_action, self, 0);
	_tmp50_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp51_ = _tmp50_;
	_tmp52_ = bird_font_drawing_tools_bezier_tool;
	bird_font_expander_add_tool (_tmp51_, (BirdFontTool*) _tmp52_, -1);
	_tmp53_ = bird_font_pen_tool_new ("pen_tool");
	_g_object_unref0 (bird_font_drawing_tools_pen_tool);
	bird_font_drawing_tools_pen_tool = _tmp53_;
	_tmp54_ = bird_font_drawing_tools_pen_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp54_, "select-action", (GCallback) ___lambda418__bird_font_tool_select_action, self, 0);
	_tmp55_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp56_ = _tmp55_;
	_tmp57_ = bird_font_drawing_tools_pen_tool;
	bird_font_expander_add_tool (_tmp56_, (BirdFontTool*) _tmp57_, -1);
	_tmp58_ = bird_font_point_tool_new ("point_tool");
	_g_object_unref0 (self->priv->point_tool);
	self->priv->point_tool = _tmp58_;
	_tmp59_ = self->priv->point_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp59_, "select-action", (GCallback) ___lambda419__bird_font_tool_select_action, self, 0);
	_tmp60_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp61_ = _tmp60_;
	_tmp62_ = self->priv->point_tool;
	bird_font_expander_add_tool (_tmp61_, (BirdFontTool*) _tmp62_, -1);
	_tmp63_ = bird_font_zoom_tool_new ("zoom_tool");
	_g_object_unref0 (bird_font_drawing_tools_zoom_tool);
	bird_font_drawing_tools_zoom_tool = _tmp63_;
	_tmp64_ = bird_font_drawing_tools_zoom_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp64_, "select-action", (GCallback) ___lambda420__bird_font_tool_select_action, self, 0);
	_tmp65_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp66_ = _tmp65_;
	_tmp67_ = bird_font_drawing_tools_zoom_tool;
	bird_font_expander_add_tool (_tmp66_, (BirdFontTool*) _tmp67_, -1);
	_tmp68_ = bird_font_move_tool_new ("move");
	_tmp69_ = _tmp68_;
	bird_font_drawing_tools_set_move_tool (_tmp69_);
	_g_object_unref0 (_tmp69_);
	_tmp70_ = bird_font_drawing_tools_get_move_tool ();
	_tmp71_ = _tmp70_;
	g_signal_connect_object ((BirdFontTool*) _tmp71_, "select-action", (GCallback) ___lambda421__bird_font_tool_select_action, self, 0);
	_tmp72_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp73_ = _tmp72_;
	_tmp74_ = bird_font_drawing_tools_get_move_tool ();
	_tmp75_ = _tmp74_;
	bird_font_expander_add_tool (_tmp73_, (BirdFontTool*) _tmp75_, -1);
	_tmp76_ = bird_font_resize_tool_new ("resize");
	_g_object_unref0 (bird_font_drawing_tools_resize_tool);
	bird_font_drawing_tools_resize_tool = _tmp76_;
	_tmp77_ = bird_font_drawing_tools_resize_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp77_, "select-action", (GCallback) ___lambda422__bird_font_tool_select_action, self, 0);
	_tmp78_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp79_ = _tmp78_;
	_tmp80_ = bird_font_drawing_tools_resize_tool;
	bird_font_expander_add_tool (_tmp79_, (BirdFontTool*) _tmp80_, -1);
	_tmp81_ = bird_font_track_tool_new ("track");
	_g_object_unref0 (bird_font_drawing_tools_track_tool);
	bird_font_drawing_tools_track_tool = _tmp81_;
	_tmp82_ = bird_font_drawing_tools_track_tool;
	g_signal_connect_object ((BirdFontTool*) _tmp82_, "select-action", (GCallback) ___lambda423__bird_font_tool_select_action, self, 0);
	_tmp83_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp84_ = _tmp83_;
	_tmp85_ = bird_font_drawing_tools_track_tool;
	bird_font_expander_add_tool (_tmp84_, (BirdFontTool*) _tmp85_, -1);
	_tmp86_ = bird_font_background_tool_new ("move_background");
	_g_object_unref0 (bird_font_drawing_tools_move_background);
	bird_font_drawing_tools_move_background = _tmp86_;
	_tmp87_ = bird_font_drawing_tools_move_background;
	g_signal_connect_object ((BirdFontTool*) _tmp87_, "select-action", (GCallback) ___lambda424__bird_font_tool_select_action, self, 0);
	_tmp88_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp89_ = _tmp88_;
	_tmp90_ = bird_font_drawing_tools_move_background;
	bird_font_expander_add_tool (_tmp89_, (BirdFontTool*) _tmp90_, -1);
	_tmp91_ = bird_font_t_ ("Move canvas");
	_tmp92_ = _tmp91_;
	_tmp93_ = g_strconcat (_tmp92_, "\n", NULL);
	_tmp94_ = _tmp93_;
	_tmp95_ = bird_font_t_ ("Ctrl + Shift + Click");
	_tmp96_ = _tmp95_;
	_tmp97_ = g_strconcat (_tmp94_, _tmp96_, NULL);
	_tmp98_ = _tmp97_;
	_tmp99_ = g_strconcat (_tmp98_, "\n", NULL);
	_tmp100_ = _tmp99_;
	_tmp101_ = bird_font_t_ ("Space + Click");
	_tmp102_ = _tmp101_;
	_tmp103_ = g_strconcat (_tmp100_, _tmp102_, NULL);
	_tmp104_ = _tmp103_;
	_tmp105_ = g_strconcat (_tmp104_, "\n", NULL);
	_tmp106_ = _tmp105_;
	_tmp107_ = bird_font_tool_new ("move_canvas", _tmp106_);
	_g_object_unref0 (bird_font_drawing_tools_move_canvas);
	bird_font_drawing_tools_move_canvas = _tmp107_;
	_g_free0 (_tmp106_);
	_g_free0 (_tmp104_);
	_g_free0 (_tmp102_);
	_g_free0 (_tmp100_);
	_g_free0 (_tmp98_);
	_g_free0 (_tmp96_);
	_g_free0 (_tmp94_);
	_g_free0 (_tmp92_);
	_tmp108_ = bird_font_drawing_tools_move_canvas;
	g_signal_connect_object (_tmp108_, "select-action", (GCallback) ___lambda425__bird_font_tool_select_action, self, 0);
	_tmp109_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp110_ = _tmp109_;
	_tmp111_ = bird_font_drawing_tools_move_canvas;
	bird_font_expander_add_tool (_tmp110_, _tmp111_, -1);
	_tmp112_ = bird_font_t_ ("Delete");
	_tmp113_ = _tmp112_;
	_tmp114_ = bird_font_tool_new ("delete_button", _tmp113_);
	_g_object_unref0 (self->priv->delete_button);
	self->priv->delete_button = _tmp114_;
	_g_free0 (_tmp113_);
	_tmp115_ = self->priv->delete_button;
	g_signal_connect_object (_tmp115_, "select-action", (GCallback) ___lambda426__bird_font_tool_select_action, self, 0);
	_tmp116_ = bird_font_drawing_tools_get_key_tools ();
	_tmp117_ = _tmp116_;
	_tmp118_ = self->priv->delete_button;
	bird_font_expander_add_tool (_tmp117_, _tmp118_, -1);
	_tmp119_ = bird_font_t_ ("Select all points or paths");
	_tmp120_ = _tmp119_;
	_tmp121_ = bird_font_tool_new ("select_all", _tmp120_);
	_g_object_unref0 (self->priv->select_all_button);
	self->priv->select_all_button = _tmp121_;
	_g_free0 (_tmp120_);
	_tmp122_ = self->priv->select_all_button;
	g_signal_connect_object (_tmp122_, "select-action", (GCallback) ___lambda427__bird_font_tool_select_action, self, 0);
	_tmp123_ = bird_font_drawing_tools_get_key_tools ();
	_tmp124_ = _tmp123_;
	_tmp125_ = self->priv->select_all_button;
	bird_font_expander_add_tool (_tmp124_, _tmp125_, -1);
	_tmp126_ = bird_font_t_ ("Undo");
	_tmp127_ = _tmp126_;
	_tmp128_ = bird_font_tool_new ("undo_tool", _tmp127_);
	_g_object_unref0 (self->priv->undo_tool);
	self->priv->undo_tool = _tmp128_;
	_g_free0 (_tmp127_);
	_tmp129_ = self->priv->undo_tool;
	g_signal_connect_object (_tmp129_, "select-action", (GCallback) ___lambda428__bird_font_tool_select_action, self, 0);
	_tmp130_ = bird_font_drawing_tools_get_key_tools ();
	_tmp131_ = _tmp130_;
	_tmp132_ = self->priv->undo_tool;
	bird_font_expander_add_tool (_tmp131_, _tmp132_, -1);
	_data11_->insert_points = FALSE;
	_tmp133_ = bird_font_t_ ("Insert new points on path");
	_tmp134_ = _tmp133_;
	_tmp135_ = bird_font_tool_new ("new_point_on_path", _tmp134_);
	_g_object_unref0 (self->insert_point_on_path_tool);
	self->insert_point_on_path_tool = _tmp135_;
	_g_free0 (_tmp134_);
	_tmp136_ = self->insert_point_on_path_tool;
	g_signal_connect_data (_tmp136_, "select-action", (GCallback) ___lambda429__bird_font_tool_select_action, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
	_tmp137_ = self->insert_point_on_path_tool;
	bird_font_tool_set_persistent (_tmp137_, TRUE);
	_tmp138_ = bird_font_drawing_tools_get_key_tools ();
	_tmp139_ = _tmp138_;
	_tmp140_ = self->insert_point_on_path_tool;
	bird_font_expander_add_tool (_tmp139_, _tmp140_, -1);
	_tmp141_ = bird_font_t_ ("Create quadratic Bézier curves");
	_tmp142_ = _tmp141_;
	_tmp143_ = bird_font_tool_new ("quadratic_points", _tmp142_);
	_g_object_unref0 (bird_font_drawing_tools_quadratic_points);
	bird_font_drawing_tools_quadratic_points = _tmp143_;
	_g_free0 (_tmp142_);
	_tmp144_ = bird_font_drawing_tools_quadratic_points;
	g_signal_connect_object (_tmp144_, "select-action", (GCallback) ___lambda430__bird_font_tool_select_action, self, 0);
	_tmp145_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp146_ = _tmp145_;
	_tmp147_ = bird_font_drawing_tools_quadratic_points;
	bird_font_expander_add_tool (_tmp146_, _tmp147_, -1);
	_tmp148_ = bird_font_t_ ("Create cubic Bézier curves");
	_tmp149_ = _tmp148_;
	_tmp150_ = bird_font_tool_new ("cubic_points", _tmp149_);
	_g_object_unref0 (bird_font_drawing_tools_cubic_points);
	bird_font_drawing_tools_cubic_points = _tmp150_;
	_g_free0 (_tmp149_);
	_tmp151_ = bird_font_drawing_tools_cubic_points;
	g_signal_connect_object (_tmp151_, "select-action", (GCallback) ___lambda432__bird_font_tool_select_action, self, 0);
	_tmp152_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp153_ = _tmp152_;
	_tmp154_ = bird_font_drawing_tools_cubic_points;
	bird_font_expander_add_tool (_tmp153_, _tmp154_, -1);
	_tmp155_ = bird_font_t_ ("Quadratic path with two line handles");
	_tmp156_ = _tmp155_;
	_tmp157_ = bird_font_tool_new ("double_points", _tmp156_);
	_g_object_unref0 (bird_font_drawing_tools_double_points);
	bird_font_drawing_tools_double_points = _tmp157_;
	_g_free0 (_tmp156_);
	_tmp158_ = bird_font_drawing_tools_double_points;
	g_signal_connect_object (_tmp158_, "select-action", (GCallback) ___lambda433__bird_font_tool_select_action, self, 0);
	_tmp159_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp160_ = _tmp159_;
	_tmp161_ = bird_font_drawing_tools_double_points;
	bird_font_expander_add_tool (_tmp160_, _tmp161_, -1);
	_tmp162_ = bird_font_t_ ("Convert selected points");
	_tmp163_ = _tmp162_;
	_tmp164_ = bird_font_tool_new ("convert_point", _tmp163_);
	_g_object_unref0 (bird_font_drawing_tools_convert_points);
	bird_font_drawing_tools_convert_points = _tmp164_;
	_g_free0 (_tmp163_);
	_tmp165_ = bird_font_drawing_tools_convert_points;
	g_signal_connect_object (_tmp165_, "select-action", (GCallback) ___lambda434__bird_font_tool_select_action, self, 0);
	_tmp166_ = bird_font_drawing_tools_convert_points;
	bird_font_tool_set_persistent (_tmp166_, FALSE);
	_tmp167_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp168_ = _tmp167_;
	_tmp169_ = bird_font_drawing_tools_convert_points;
	bird_font_expander_add_tool (_tmp168_, _tmp169_, -1);
	_tmp170_ = bird_font_t_ ("X coordinate");
	_tmp171_ = _tmp170_;
	_tmp172_ = bird_font_spin_button_new ("x_coordinate", _tmp171_);
	_g_object_unref0 (self->priv->x_coordinate);
	self->priv->x_coordinate = _tmp172_;
	_g_free0 (_tmp171_);
	_tmp173_ = self->priv->x_coordinate;
	bird_font_spin_button_set_big_number (_tmp173_, TRUE);
	_tmp174_ = self->priv->x_coordinate;
	bird_font_spin_button_set_int_value (_tmp174_, "0.000");
	_tmp175_ = self->priv->x_coordinate;
	bird_font_spin_button_set_int_step (_tmp175_, 0.1);
	_tmp176_ = self->priv->x_coordinate;
	bird_font_spin_button_set_min (_tmp176_, -999.99);
	_tmp177_ = self->priv->x_coordinate;
	bird_font_spin_button_set_max (_tmp177_, 999.99);
	_tmp178_ = self->priv->x_coordinate;
	bird_font_spin_button_show_icon (_tmp178_, TRUE);
	_tmp179_ = self->priv->x_coordinate;
	bird_font_tool_set_persistent ((BirdFontTool*) _tmp179_, FALSE);
	_tmp180_ = self->priv->x_coordinate;
	g_signal_connect_object (_tmp180_, "new-value-action", (GCallback) ___lambda435__bird_font_spin_button_new_value_action, self, 0);
	_tmp181_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp182_ = _tmp181_;
	_tmp183_ = self->priv->x_coordinate;
	bird_font_expander_add_tool (_tmp182_, (BirdFontTool*) _tmp183_, -1);
	_tmp184_ = bird_font_drawing_tools_get_move_tool ();
	_tmp185_ = _tmp184_;
	g_signal_connect_object (_tmp185_, "objects-moved", (GCallback) ___lambda436__bird_font_move_tool_objects_moved, self, 0);
	_tmp186_ = bird_font_drawing_tools_get_move_tool ();
	_tmp187_ = _tmp186_;
	g_signal_connect_object (_tmp187_, "selection-changed", (GCallback) ___lambda437__bird_font_move_tool_selection_changed, self, 0);
	_tmp188_ = bird_font_drawing_tools_get_move_tool ();
	_tmp189_ = _tmp188_;
	g_signal_connect_object (_tmp189_, "objects-deselected", (GCallback) ___lambda438__bird_font_move_tool_objects_deselected, self, 0);
	_tmp190_ = bird_font_t_ ("Y coordinate");
	_tmp191_ = _tmp190_;
	_tmp192_ = bird_font_spin_button_new ("y_coordinate", _tmp191_);
	_g_object_unref0 (self->priv->y_coordinate);
	self->priv->y_coordinate = _tmp192_;
	_g_free0 (_tmp191_);
	_tmp193_ = self->priv->y_coordinate;
	bird_font_spin_button_set_big_number (_tmp193_, TRUE);
	_tmp194_ = self->priv->y_coordinate;
	bird_font_spin_button_set_int_value (_tmp194_, "0.000");
	_tmp195_ = self->priv->y_coordinate;
	bird_font_spin_button_set_int_step (_tmp195_, 0.1);
	_tmp196_ = self->priv->y_coordinate;
	bird_font_spin_button_set_min (_tmp196_, -999.99);
	_tmp197_ = self->priv->y_coordinate;
	bird_font_spin_button_set_max (_tmp197_, 999.99);
	_tmp198_ = self->priv->y_coordinate;
	bird_font_spin_button_show_icon (_tmp198_, TRUE);
	_tmp199_ = self->priv->y_coordinate;
	bird_font_tool_set_persistent ((BirdFontTool*) _tmp199_, FALSE);
	_tmp200_ = self->priv->y_coordinate;
	g_signal_connect_object (_tmp200_, "new-value-action", (GCallback) ___lambda439__bird_font_spin_button_new_value_action, self, 0);
	_tmp201_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp202_ = _tmp201_;
	_tmp203_ = self->priv->y_coordinate;
	bird_font_expander_add_tool (_tmp202_, (BirdFontTool*) _tmp203_, -1);
	_tmp204_ = bird_font_drawing_tools_get_move_tool ();
	_tmp205_ = _tmp204_;
	g_signal_connect_object (_tmp205_, "objects-moved", (GCallback) ___lambda440__bird_font_move_tool_objects_moved, self, 0);
	_tmp206_ = bird_font_drawing_tools_get_move_tool ();
	_tmp207_ = _tmp206_;
	g_signal_connect_object (_tmp207_, "selection-changed", (GCallback) ___lambda441__bird_font_move_tool_selection_changed, self, 0);
	_tmp208_ = bird_font_drawing_tools_get_move_tool ();
	_tmp209_ = _tmp208_;
	g_signal_connect_object (_tmp209_, "objects-deselected", (GCallback) ___lambda442__bird_font_move_tool_objects_deselected, self, 0);
	_tmp210_ = bird_font_t_ ("Rotation");
	_tmp211_ = _tmp210_;
	_tmp212_ = bird_font_spin_button_new ("rotation", _tmp211_);
	_g_object_unref0 (self->priv->rotation);
	self->priv->rotation = _tmp212_;
	_g_free0 (_tmp211_);
	_tmp213_ = self->priv->rotation;
	bird_font_spin_button_set_big_number (_tmp213_, TRUE);
	_tmp214_ = self->priv->rotation;
	bird_font_spin_button_set_int_value (_tmp214_, "0.000");
	_tmp215_ = self->priv->rotation;
	bird_font_spin_button_set_int_step (_tmp215_, 0.1);
	_tmp216_ = self->priv->rotation;
	bird_font_spin_button_set_min (_tmp216_, (gdouble) -360);
	_tmp217_ = self->priv->rotation;
	bird_font_spin_button_set_max (_tmp217_, (gdouble) 360);
	_tmp218_ = self->priv->rotation;
	bird_font_spin_button_show_icon (_tmp218_, TRUE);
	_tmp219_ = self->priv->rotation;
	bird_font_tool_set_persistent ((BirdFontTool*) _tmp219_, FALSE);
	_tmp220_ = self->priv->rotation;
	g_signal_connect_object (_tmp220_, "new-value-action", (GCallback) ___lambda443__bird_font_spin_button_new_value_action, self, 0);
	_tmp221_ = bird_font_drawing_tools_resize_tool;
	g_signal_connect_object (_tmp221_, "objects-rotated", (GCallback) ___lambda444__bird_font_resize_tool_objects_rotated, self, 0);
	_tmp222_ = bird_font_drawing_tools_get_move_tool ();
	_tmp223_ = _tmp222_;
	g_signal_connect_object (_tmp223_, "objects-deselected", (GCallback) ___lambda445__bird_font_move_tool_objects_deselected, self, 0);
	_tmp224_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp225_ = _tmp224_;
	_tmp226_ = self->priv->rotation;
	bird_font_expander_add_tool (_tmp225_, (BirdFontTool*) _tmp226_, -1);
	_tmp227_ = bird_font_t_ ("Width");
	_tmp228_ = _tmp227_;
	_tmp229_ = bird_font_spin_button_new ("width", _tmp228_);
	_g_object_unref0 (self->priv->width);
	self->priv->width = _tmp229_;
	_g_free0 (_tmp228_);
	_tmp230_ = self->priv->width;
	bird_font_spin_button_set_big_number (_tmp230_, TRUE);
	_tmp231_ = self->priv->width;
	bird_font_spin_button_set_int_value (_tmp231_, "0.0000");
	_tmp232_ = self->priv->width;
	bird_font_spin_button_set_int_step (_tmp232_, 0.01);
	_tmp233_ = self->priv->width;
	bird_font_spin_button_show_icon (_tmp233_, TRUE);
	_tmp234_ = self->priv->width;
	bird_font_tool_set_persistent ((BirdFontTool*) _tmp234_, FALSE);
	_tmp235_ = self->priv->width;
	g_signal_connect_object (_tmp235_, "new-value-action", (GCallback) ___lambda446__bird_font_spin_button_new_value_action, self, 0);
	_tmp236_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp237_ = _tmp236_;
	_tmp238_ = self->priv->width;
	bird_font_expander_add_tool (_tmp237_, (BirdFontTool*) _tmp238_, -1);
	_tmp239_ = bird_font_t_ ("Height");
	_tmp240_ = _tmp239_;
	_tmp241_ = bird_font_spin_button_new ("height", _tmp240_);
	_g_object_unref0 (self->priv->height);
	self->priv->height = _tmp241_;
	_g_free0 (_tmp240_);
	_tmp242_ = self->priv->height;
	bird_font_spin_button_set_big_number (_tmp242_, TRUE);
	_tmp243_ = self->priv->height;
	bird_font_spin_button_set_int_value (_tmp243_, "0.0000");
	_tmp244_ = self->priv->height;
	bird_font_spin_button_set_int_step (_tmp244_, 0.01);
	_tmp245_ = self->priv->height;
	bird_font_spin_button_show_icon (_tmp245_, TRUE);
	_tmp246_ = self->priv->height;
	bird_font_tool_set_persistent ((BirdFontTool*) _tmp246_, FALSE);
	_tmp247_ = self->priv->height;
	g_signal_connect_object (_tmp247_, "new-value-action", (GCallback) ___lambda447__bird_font_spin_button_new_value_action, self, 0);
	_tmp248_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp249_ = _tmp248_;
	_tmp250_ = self->priv->height;
	bird_font_expander_add_tool (_tmp249_, (BirdFontTool*) _tmp250_, -1);
	_tmp251_ = bird_font_drawing_tools_resize_tool;
	g_signal_connect_object (_tmp251_, "objects-resized", (GCallback) ___lambda448__bird_font_resize_tool_objects_resized, self, 0);
	_tmp252_ = bird_font_drawing_tools_get_move_tool ();
	_tmp253_ = _tmp252_;
	g_signal_connect_object (_tmp253_, "objects-deselected", (GCallback) ___lambda449__bird_font_move_tool_objects_deselected, self, 0);
	_tmp254_ = bird_font_drawing_tools_get_move_tool ();
	_tmp255_ = _tmp254_;
	g_signal_connect_object (_tmp255_, "objects-moved", (GCallback) ___lambda450__bird_font_move_tool_objects_moved, self, 0);
	_tmp256_ = bird_font_t_ ("Tie curve handles for the selected edit point");
	_tmp257_ = _tmp256_;
	_tmp258_ = bird_font_tool_new ("tie_point", _tmp257_);
	_g_object_unref0 (self->priv->tie_handles);
	self->priv->tie_handles = _tmp258_;
	_g_free0 (_tmp257_);
	_tmp259_ = self->priv->tie_handles;
	g_signal_connect_object (_tmp259_, "select-action", (GCallback) ___lambda451__bird_font_tool_select_action, self, 0);
	_tmp260_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp261_ = _tmp260_;
	_tmp262_ = self->priv->tie_handles;
	bird_font_expander_add_tool (_tmp261_, _tmp262_, -1);
	_tmp263_ = bird_font_t_ ("Symmetrical handles");
	_tmp264_ = _tmp263_;
	_tmp265_ = bird_font_tool_new ("symmetric", _tmp264_);
	_g_object_unref0 (self->priv->reflect_handle);
	self->priv->reflect_handle = _tmp265_;
	_g_free0 (_tmp264_);
	_tmp266_ = self->priv->reflect_handle;
	g_signal_connect_object (_tmp266_, "select-action", (GCallback) ___lambda452__bird_font_tool_select_action, self, 0);
	_tmp267_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp268_ = _tmp267_;
	_tmp269_ = self->priv->reflect_handle;
	bird_font_expander_add_tool (_tmp268_, _tmp269_, -1);
	_tmp270_ = bird_font_t_ ("Convert segment to line.");
	_tmp271_ = _tmp270_;
	_tmp272_ = bird_font_tool_new ("create_line", _tmp271_);
	_g_object_unref0 (self->priv->create_line);
	self->priv->create_line = _tmp272_;
	_g_free0 (_tmp271_);
	_tmp273_ = self->priv->create_line;
	g_signal_connect_object (_tmp273_, "select-action", (GCallback) ___lambda453__bird_font_tool_select_action, self, 0);
	_tmp274_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp275_ = _tmp274_;
	_tmp276_ = self->priv->create_line;
	bird_font_expander_add_tool (_tmp275_, _tmp276_, -1);
	_tmp277_ = bird_font_t_ ("Create counter from outline");
	_tmp278_ = _tmp277_;
	_tmp279_ = bird_font_orientation_tool_new ("reverse_path", _tmp278_);
	_g_object_unref0 (self->priv->reverse_path_tool);
	self->priv->reverse_path_tool = _tmp279_;
	_g_free0 (_tmp278_);
	_tmp280_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp281_ = _tmp280_;
	_tmp282_ = self->priv->reverse_path_tool;
	bird_font_expander_add_tool (_tmp281_, (BirdFontTool*) _tmp282_, -1);
	_tmp283_ = bird_font_t_ ("Scale object to font top/baseline");
	_tmp284_ = _tmp283_;
	_tmp285_ = bird_font_tool_new ("full_height", _tmp284_);
	_g_object_unref0 (self->priv->full_height_tool);
	self->priv->full_height_tool = _tmp285_;
	_g_free0 (_tmp284_);
	_tmp286_ = self->priv->full_height_tool;
	g_signal_connect_object (_tmp286_, "select-action", (GCallback) ___lambda454__bird_font_tool_select_action, self, 0);
	_tmp287_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp288_ = _tmp287_;
	_tmp289_ = self->priv->full_height_tool;
	bird_font_expander_add_tool (_tmp288_, _tmp289_, -1);
	_tmp290_ = bird_font_t_ ("Close path");
	_tmp291_ = _tmp290_;
	_tmp292_ = bird_font_tool_new ("close_path", _tmp291_);
	_g_object_unref0 (self->priv->close_path_tool);
	self->priv->close_path_tool = _tmp292_;
	_g_free0 (_tmp291_);
	_tmp293_ = self->priv->close_path_tool;
	g_signal_connect_object (_tmp293_, "select-action", (GCallback) ___lambda455__bird_font_tool_select_action, self, 0);
	_tmp294_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp295_ = _tmp294_;
	_tmp296_ = self->priv->close_path_tool;
	bird_font_expander_add_tool (_tmp295_, _tmp296_, -1);
	_tmp297_ = bird_font_t_ ("Move to path to the bottom of the layer");
	_tmp298_ = _tmp297_;
	_tmp299_ = bird_font_tool_new ("move_layer", _tmp298_);
	_g_object_unref0 (self->priv->move_layer);
	self->priv->move_layer = _tmp299_;
	_g_free0 (_tmp298_);
	_tmp300_ = self->priv->move_layer;
	g_signal_connect_object (_tmp300_, "select-action", (GCallback) ___lambda456__bird_font_tool_select_action, self, 0);
	_tmp301_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp302_ = _tmp301_;
	_tmp303_ = self->priv->move_layer;
	bird_font_expander_add_tool (_tmp302_, _tmp303_, -1);
	_tmp304_ = bird_font_t_ ("Flip path vertically");
	_tmp305_ = _tmp304_;
	_tmp306_ = bird_font_tool_new ("flip_vertical", _tmp305_);
	_g_object_unref0 (self->priv->flip_vertical);
	self->priv->flip_vertical = _tmp306_;
	_g_free0 (_tmp305_);
	_tmp307_ = self->priv->flip_vertical;
	g_signal_connect_object (_tmp307_, "select-action", (GCallback) ___lambda457__bird_font_tool_select_action, self, 0);
	_tmp308_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp309_ = _tmp308_;
	_tmp310_ = self->priv->flip_vertical;
	bird_font_expander_add_tool (_tmp309_, _tmp310_, -1);
	_tmp311_ = bird_font_t_ ("Flip path horizontally");
	_tmp312_ = _tmp311_;
	_tmp313_ = bird_font_tool_new ("flip_horizontal", _tmp312_);
	_g_object_unref0 (self->priv->flip_horizontal);
	self->priv->flip_horizontal = _tmp313_;
	_g_free0 (_tmp312_);
	_tmp314_ = self->priv->flip_horizontal;
	g_signal_connect_object (_tmp314_, "select-action", (GCallback) ___lambda458__bird_font_tool_select_action, self, 0);
	_tmp315_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp316_ = _tmp315_;
	_tmp317_ = self->priv->flip_horizontal;
	bird_font_expander_add_tool (_tmp316_, _tmp317_, -1);
	_tmp318_ = bird_font_t_ ("Set size for background image");
	_tmp319_ = _tmp318_;
	_tmp320_ = bird_font_spin_button_new ("scale_background", _tmp319_);
	_g_object_unref0 (bird_font_drawing_tools_background_scale);
	bird_font_drawing_tools_background_scale = _tmp320_;
	_g_free0 (_tmp319_);
	_tmp321_ = bird_font_drawing_tools_background_scale;
	bird_font_spin_button_show_icon (_tmp321_, TRUE);
	_tmp322_ = bird_font_drawing_tools_background_scale;
	bird_font_spin_button_set_int_value (_tmp322_, "1.000");
	_tmp323_ = bird_font_drawing_tools_background_scale;
	g_signal_connect_object (_tmp323_, "new-value-action", (GCallback) ___lambda459__bird_font_spin_button_new_value_action, self, 0);
	_tmp324_ = bird_font_drawing_tools_background_scale;
	g_signal_connect_object ((BirdFontTool*) _tmp324_, "select-action", (GCallback) ___lambda460__bird_font_tool_select_action, self, 0);
	_tmp325_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp326_ = _tmp325_;
	_tmp327_ = bird_font_drawing_tools_background_scale;
	bird_font_expander_add_tool (_tmp326_, (BirdFontTool*) _tmp327_, -1);
	_tmp328_ = bird_font_cut_background_tool_new ("cut_background", NULL);
	_g_object_unref0 (bird_font_drawing_tools_cut_background);
	bird_font_drawing_tools_cut_background = _tmp328_;
	_tmp329_ = bird_font_drawing_tools_cut_background;
	g_signal_connect_object ((BirdFontTool*) _tmp329_, "select-action", (GCallback) ___lambda461__bird_font_tool_select_action, self, 0);
	_tmp330_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp331_ = _tmp330_;
	_tmp332_ = bird_font_drawing_tools_cut_background;
	bird_font_expander_add_tool (_tmp331_, (BirdFontTool*) _tmp332_, -1);
	_tmp333_ = bird_font_t_ ("Show/hide background image");
	_tmp334_ = _tmp333_;
	_tmp335_ = bird_font_tool_new ("show_background", _tmp334_);
	_g_object_unref0 (self->priv->show_bg);
	self->priv->show_bg = _tmp335_;
	_g_free0 (_tmp334_);
	_tmp336_ = self->priv->show_bg;
	g_signal_connect_object (_tmp336_, "select-action", (GCallback) ___lambda462__bird_font_tool_select_action, self, 0);
	_tmp337_ = self->priv->show_bg;
	g_signal_connect_object (_tmp337_, "select-action", (GCallback) ___lambda463__bird_font_tool_select_action, self, 0);
	_tmp338_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp339_ = _tmp338_;
	_tmp340_ = self->priv->show_bg;
	bird_font_expander_add_tool (_tmp339_, _tmp340_, -1);
	_tmp341_ = bird_font_t_ ("Insert a new background image");
	_tmp342_ = _tmp341_;
	_tmp343_ = bird_font_tool_new ("insert_background", _tmp342_);
	_g_object_unref0 (self->priv->bg_selection);
	self->priv->bg_selection = _tmp343_;
	_g_free0 (_tmp342_);
	_tmp344_ = self->priv->bg_selection;
	g_signal_connect_object (_tmp344_, "select-action", (GCallback) ___lambda464__bird_font_tool_select_action, self, 0);
	_tmp345_ = self->priv->bg_selection;
	g_signal_connect_object (_tmp345_, "select-action", (GCallback) ___lambda465__bird_font_tool_select_action, self, 0);
	_tmp346_ = self->priv->bg_selection;
	bird_font_tool_set_show_background (_tmp346_, TRUE);
	_tmp347_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp348_ = _tmp347_;
	_tmp349_ = self->priv->bg_selection;
	bird_font_expander_add_tool (_tmp348_, _tmp349_, -1);
	_tmp350_ = bird_font_t_ ("High contrast");
	_tmp351_ = _tmp350_;
	_tmp352_ = bird_font_tool_new ("high_contrast_background", _tmp351_);
	_g_object_unref0 (self->priv->high_contrast_background);
	self->priv->high_contrast_background = _tmp352_;
	_g_free0 (_tmp351_);
	_tmp353_ = self->priv->high_contrast_background;
	g_signal_connect_object (_tmp353_, "select-action", (GCallback) ___lambda466__bird_font_tool_select_action, self, 0);
	_tmp354_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp355_ = _tmp354_;
	_tmp356_ = self->priv->high_contrast_background;
	bird_font_expander_add_tool (_tmp355_, _tmp356_, -1);
	_tmp357_ = bird_font_t_ ("Set background threshold");
	_tmp358_ = _tmp357_;
	_tmp359_ = bird_font_spin_button_new ("contrast_threshold", _tmp358_);
	_g_object_unref0 (bird_font_drawing_tools_background_threshold);
	bird_font_drawing_tools_background_threshold = _tmp359_;
	_g_free0 (_tmp358_);
	_tmp360_ = bird_font_drawing_tools_background_threshold;
	bird_font_spin_button_show_icon (_tmp360_, TRUE);
	_tmp361_ = bird_font_drawing_tools_background_threshold;
	bird_font_spin_button_set_value_round (_tmp361_, (gdouble) 1, TRUE, TRUE);
	_tmp362_ = bird_font_drawing_tools_background_threshold;
	g_signal_connect_object (_tmp362_, "new-value-action", (GCallback) ___lambda467__bird_font_spin_button_new_value_action, self, 0);
	_tmp363_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp364_ = _tmp363_;
	_tmp365_ = bird_font_drawing_tools_background_threshold;
	bird_font_expander_add_tool (_tmp364_, (BirdFontTool*) _tmp365_, -1);
	_tmp366_ = bird_font_t_ ("Amount of autotrace details");
	_tmp367_ = _tmp366_;
	_tmp368_ = bird_font_spin_button_new ("auto_trace_resolution", _tmp367_);
	_g_object_unref0 (bird_font_drawing_tools_auto_trace_resolution);
	bird_font_drawing_tools_auto_trace_resolution = _tmp368_;
	_g_free0 (_tmp367_);
	_tmp369_ = bird_font_drawing_tools_auto_trace_resolution;
	bird_font_spin_button_set_value_round (_tmp369_, (gdouble) 1, TRUE, TRUE);
	_tmp370_ = bird_font_drawing_tools_auto_trace_resolution;
	bird_font_spin_button_show_icon (_tmp370_, TRUE);
	_tmp371_ = bird_font_drawing_tools_auto_trace_resolution;
	g_signal_connect_object (_tmp371_, "new-value-action", (GCallback) ___lambda468__bird_font_spin_button_new_value_action, self, 0);
	_tmp372_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp373_ = _tmp372_;
	_tmp374_ = bird_font_drawing_tools_auto_trace_resolution;
	bird_font_expander_add_tool (_tmp373_, (BirdFontTool*) _tmp374_, -1);
	_tmp375_ = bird_font_t_ ("Autotrace simplification");
	_tmp376_ = _tmp375_;
	_tmp377_ = bird_font_spin_button_new ("auto_trace_simplify", _tmp376_);
	_g_object_unref0 (bird_font_drawing_tools_auto_trace_simplify);
	bird_font_drawing_tools_auto_trace_simplify = _tmp377_;
	_g_free0 (_tmp376_);
	_tmp378_ = bird_font_drawing_tools_auto_trace_simplify;
	bird_font_spin_button_set_value_round (_tmp378_, 0.5, TRUE, TRUE);
	_tmp379_ = bird_font_drawing_tools_auto_trace_simplify;
	bird_font_spin_button_show_icon (_tmp379_, TRUE);
	_tmp380_ = bird_font_drawing_tools_auto_trace_simplify;
	g_signal_connect_object (_tmp380_, "new-value-action", (GCallback) ___lambda469__bird_font_spin_button_new_value_action, self, 0);
	_tmp381_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp382_ = _tmp381_;
	_tmp383_ = bird_font_drawing_tools_auto_trace_simplify;
	bird_font_expander_add_tool (_tmp382_, (BirdFontTool*) _tmp383_, -1);
	_tmp384_ = bird_font_t_ ("Autotrace background image");
	_tmp385_ = _tmp384_;
	_tmp386_ = bird_font_tool_new ("autotrace", _tmp385_);
	_g_object_unref0 (self->priv->auto_trace);
	self->priv->auto_trace = _tmp386_;
	_g_free0 (_tmp385_);
	_tmp387_ = self->priv->auto_trace;
	g_signal_connect_object (_tmp387_, "select-action", (GCallback) ___lambda470__bird_font_tool_select_action, self, 0);
	_tmp388_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp389_ = _tmp388_;
	_tmp390_ = self->priv->auto_trace;
	bird_font_expander_add_tool (_tmp389_, _tmp390_, -1);
	_tmp391_ = bird_font_t_ ("Delete background image");
	_tmp392_ = _tmp391_;
	_tmp393_ = bird_font_tool_new ("delete_background", _tmp392_);
	_g_object_unref0 (self->priv->delete_background);
	self->priv->delete_background = _tmp393_;
	_g_free0 (_tmp392_);
	_tmp394_ = self->priv->delete_background;
	g_signal_connect_object (_tmp394_, "select-action", (GCallback) ___lambda471__bird_font_tool_select_action, self, 0);
	_tmp395_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp396_ = _tmp395_;
	_tmp397_ = self->priv->delete_background;
	bird_font_expander_add_tool (_tmp396_, _tmp397_, -1);
	_tmp398_ = bird_font_t_ ("Add layer");
	_tmp399_ = _tmp398_;
	_tmp400_ = bird_font_tool_new ("add_layer", _tmp399_);
	_g_object_unref0 (bird_font_drawing_tools_add_layer);
	bird_font_drawing_tools_add_layer = _tmp400_;
	_g_free0 (_tmp399_);
	_tmp401_ = bird_font_drawing_tools_add_layer;
	g_signal_connect_object (_tmp401_, "select-action", (GCallback) ___lambda472__bird_font_tool_select_action, self, 0);
	_tmp402_ = bird_font_drawing_tools_get_layer_settings ();
	_tmp403_ = _tmp402_;
	_tmp404_ = bird_font_drawing_tools_add_layer;
	bird_font_expander_add_tool (_tmp403_, _tmp404_, -1);
	_tmp405_ = bird_font_t_ ("Show layers");
	_tmp406_ = _tmp405_;
	_tmp407_ = bird_font_tool_new ("show_layers", _tmp406_);
	_g_object_unref0 (bird_font_drawing_tools_show_layers);
	bird_font_drawing_tools_show_layers = _tmp407_;
	_g_free0 (_tmp406_);
	_tmp408_ = bird_font_drawing_tools_show_layers;
	g_signal_connect_object (_tmp408_, "select-action", (GCallback) ___lambda473__bird_font_tool_select_action, self, 0);
	_tmp409_ = bird_font_drawing_tools_get_layer_settings ();
	_tmp410_ = _tmp409_;
	_tmp411_ = bird_font_drawing_tools_show_layers;
	bird_font_expander_add_tool (_tmp410_, _tmp411_, -1);
	_tmp412_ = bird_font_t_ ("Apply stroke");
	_tmp413_ = _tmp412_;
	_tmp414_ = bird_font_tool_new ("apply_stroke", _tmp413_);
	_tmp415_ = _tmp414_;
	bird_font_drawing_tools_set_add_stroke (_tmp415_);
	_g_object_unref0 (_tmp415_);
	_g_free0 (_tmp413_);
	_tmp416_ = bird_font_drawing_tools_get_add_stroke ();
	_tmp417_ = _tmp416_;
	g_signal_connect_object (_tmp417_, "select-action", (GCallback) ___lambda474__bird_font_tool_select_action, self, 0);
	_tmp418_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp419_ = _tmp418_;
	_tmp420_ = bird_font_drawing_tools_get_add_stroke ();
	_tmp421_ = _tmp420_;
	bird_font_expander_add_tool (_tmp419_, _tmp421_, -1);
	_tmp422_ = bird_font_drawing_tools_get_add_stroke ();
	_tmp423_ = _tmp422_;
	_tmp423_->selected = bird_font_stroke_tool_add_stroke;
	_tmp424_ = bird_font_t_ ("Stroke width");
	_tmp425_ = _tmp424_;
	_tmp426_ = bird_font_spin_button_new ("object_stroke", _tmp425_);
	_g_object_unref0 (bird_font_drawing_tools_object_stroke);
	bird_font_drawing_tools_object_stroke = _tmp426_;
	_g_free0 (_tmp425_);
	_tmp427_ = bird_font_drawing_tools_object_stroke;
	bird_font_spin_button_set_big_number (_tmp427_, TRUE);
	_tmp428_ = bird_font_drawing_tools_object_stroke;
	bird_font_spin_button_set_value_round (_tmp428_, (gdouble) 2, TRUE, TRUE);
	_tmp429_ = bird_font_drawing_tools_object_stroke;
	bird_font_spin_button_set_max (_tmp429_, 0.01);
	_tmp430_ = bird_font_drawing_tools_object_stroke;
	bird_font_spin_button_set_max (_tmp430_, (gdouble) 50);
	_tmp431_ = bird_font_drawing_tools_object_stroke;
	g_signal_connect_object (_tmp431_, "new-value-action", (GCallback) ___lambda475__bird_font_spin_button_new_value_action, self, 0);
	_tmp432_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp433_ = _tmp432_;
	_tmp434_ = bird_font_drawing_tools_object_stroke;
	bird_font_expander_add_tool (_tmp433_, (BirdFontTool*) _tmp434_, -1);
	_tmp435_ = bird_font_drawing_tools_get_move_tool ();
	_tmp436_ = _tmp435_;
	g_signal_connect_object (_tmp436_, "selection-changed", (GCallback) ___lambda476__bird_font_move_tool_selection_changed, self, 0);
	_tmp437_ = bird_font_drawing_tools_get_move_tool ();
	_tmp438_ = _tmp437_;
	g_signal_connect_object (_tmp438_, "objects-moved", (GCallback) ___lambda477__bird_font_move_tool_objects_moved, self, 0);
	_tmp439_ = bird_font_t_ ("Create outline form stroke");
	_tmp440_ = _tmp439_;
	_tmp441_ = bird_font_tool_new ("stroke_to_outline", _tmp440_);
	_g_object_unref0 (self->priv->outline);
	self->priv->outline = _tmp441_;
	_g_free0 (_tmp440_);
	_tmp442_ = self->priv->outline;
	g_signal_connect_object (_tmp442_, "select-action", (GCallback) ___lambda478__bird_font_tool_select_action, self, 0);
	_tmp443_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp444_ = _tmp443_;
	_tmp445_ = self->priv->outline;
	bird_font_expander_add_tool (_tmp444_, _tmp445_, -1);
	_tmp446_ = bird_font_t_ ("Butt line cap");
	_tmp447_ = _tmp446_;
	_tmp448_ = bird_font_tool_new ("line_cap_butt", _tmp447_);
	_g_object_unref0 (bird_font_drawing_tools_line_cap_butt);
	bird_font_drawing_tools_line_cap_butt = _tmp448_;
	_g_free0 (_tmp447_);
	_tmp449_ = bird_font_drawing_tools_line_cap_butt;
	g_signal_connect_object (_tmp449_, "select-action", (GCallback) ___lambda479__bird_font_tool_select_action, self, 0);
	_tmp450_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp451_ = _tmp450_;
	_tmp452_ = bird_font_drawing_tools_line_cap_butt;
	bird_font_expander_add_tool (_tmp451_, _tmp452_, -1);
	_tmp453_ = bird_font_t_ ("Round line cap");
	_tmp454_ = _tmp453_;
	_tmp455_ = bird_font_tool_new ("line_cap_round", _tmp454_);
	_g_object_unref0 (bird_font_drawing_tools_line_cap_round);
	bird_font_drawing_tools_line_cap_round = _tmp455_;
	_g_free0 (_tmp454_);
	_tmp456_ = bird_font_drawing_tools_line_cap_round;
	g_signal_connect_object (_tmp456_, "select-action", (GCallback) ___lambda480__bird_font_tool_select_action, self, 0);
	_tmp457_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp458_ = _tmp457_;
	_tmp459_ = bird_font_drawing_tools_line_cap_round;
	bird_font_expander_add_tool (_tmp458_, _tmp459_, -1);
	_tmp460_ = bird_font_t_ ("Square line cap");
	_tmp461_ = _tmp460_;
	_tmp462_ = bird_font_tool_new ("line_cap_square", _tmp461_);
	_g_object_unref0 (bird_font_drawing_tools_line_cap_square);
	bird_font_drawing_tools_line_cap_square = _tmp462_;
	_g_free0 (_tmp461_);
	_tmp463_ = bird_font_drawing_tools_line_cap_square;
	g_signal_connect_object (_tmp463_, "select-action", (GCallback) ___lambda481__bird_font_tool_select_action, self, 0);
	_tmp464_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp465_ = _tmp464_;
	_tmp466_ = bird_font_drawing_tools_line_cap_square;
	bird_font_expander_add_tool (_tmp465_, _tmp466_, -1);
	if (bird_font_bird_font_has_argument ("--test")) {
		Block12Data* _data12_;
		BirdFontTool* _tmp467_;
		BirdFontTool* _tmp468_;
		BirdFontExpander* _tmp469_;
		BirdFontExpander* _tmp470_;
		BirdFontTool* _tmp471_;
		BirdFontTool* slow_test = NULL;
		BirdFontTool* _tmp472_;
		BirdFontTool* _tmp473_;
		BirdFontExpander* _tmp474_;
		BirdFontExpander* _tmp475_;
		BirdFontTool* _tmp476_;
		gchar* st = NULL;
		gchar* _tmp477_;
		gboolean _tmp478_ = FALSE;
		const gchar* _tmp479_;
		_data12_ = g_slice_new0 (Block12Data);
		_data12_->_ref_count_ = 1;
		_data12_->_data11_ = block11_data_ref (_data11_);
		_tmp467_ = bird_font_tool_new ("test_case", "");
		_data12_->test_case = _tmp467_;
		_tmp468_ = _data12_->test_case;
		g_signal_connect_object (_tmp468_, "select-action", (GCallback) ____lambda482__bird_font_tool_select_action, self, 0);
		_tmp469_ = bird_font_drawing_tools_get_test_tools ();
		_tmp470_ = _tmp469_;
		_tmp471_ = _data12_->test_case;
		bird_font_expander_add_tool (_tmp470_, _tmp471_, -1);
		_tmp472_ = bird_font_tool_new ("slow_test", "");
		slow_test = _tmp472_;
		_tmp473_ = slow_test;
		g_signal_connect_object (_tmp473_, "select-action", (GCallback) ____lambda483__bird_font_tool_select_action, self, 0);
		_tmp474_ = bird_font_drawing_tools_get_test_tools ();
		_tmp475_ = _tmp474_;
		_tmp476_ = slow_test;
		bird_font_expander_add_tool (_tmp475_, _tmp476_, -1);
		_tmp477_ = bird_font_bird_font_get_argument ("--test");
		st = _tmp477_;
		_tmp479_ = st;
		if (_tmp479_ != NULL) {
			const gchar* _tmp480_;
			_tmp480_ = st;
			_tmp478_ = g_utf8_strlen ((const gchar*) _tmp480_, (gssize) -1) > 0;
		} else {
			_tmp478_ = FALSE;
		}
		if (_tmp478_) {
			GSource* idle = NULL;
			GSource* _tmp481_;
			GSource* _tmp482_;
			GSource* _tmp483_;
			_tmp481_ = g_idle_source_new ();
			idle = _tmp481_;
			_tmp482_ = idle;
			g_source_set_callback (_tmp482_, _____lambda484__gsource_func, block12_data_ref (_data12_), block12_data_unref);
			_tmp483_ = idle;
			g_source_attach (_tmp483_, NULL);
			_g_source_unref0 (idle);
		}
		if (bird_font_bird_font_has_argument ("--slow")) {
			BirdFontToolbox* _tmp484_;
			BirdFontToolbox* _tmp485_;
			BirdFontTool* _tmp486_;
			_tmp484_ = bird_font_main_window_get_toolbox ();
			_tmp485_ = _tmp484_;
			_tmp486_ = slow_test;
			bird_font_toolbox_select_tool (_tmp485_, _tmp486_);
			_g_object_unref0 (_tmp485_);
		}
		_g_free0 (st);
		_g_object_unref0 (slow_test);
		block12_data_unref (_data12_);
		_data12_ = NULL;
	}
	_tmp487_ = bird_font_t_ ("Show guidelines");
	_tmp488_ = _tmp487_;
	_tmp489_ = bird_font_tool_new ("help_lines", _tmp488_);
	_tmp490_ = _tmp489_;
	bird_font_drawing_tools_set_help_lines (_tmp490_);
	_g_object_unref0 (_tmp490_);
	_g_free0 (_tmp488_);
	_tmp491_ = bird_font_drawing_tools_get_help_lines ();
	_tmp492_ = _tmp491_;
	g_signal_connect_object (_tmp492_, "select-action", (GCallback) ___lambda485__bird_font_tool_select_action, self, 0);
	_tmp493_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp494_ = _tmp493_;
	selected_line = bird_font_glyph_get_show_help_lines (_tmp494_);
	_g_object_unref0 (_tmp494_);
	_tmp495_ = bird_font_drawing_tools_get_help_lines ();
	_tmp496_ = _tmp495_;
	bird_font_tool_set_selected (_tmp496_, selected_line);
	_tmp497_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp498_ = _tmp497_;
	_tmp499_ = bird_font_drawing_tools_get_help_lines ();
	_tmp500_ = _tmp499_;
	bird_font_expander_add_tool (_tmp498_, _tmp500_, -1);
	_tmp501_ = bird_font_t_ ("Show more guidelines");
	_tmp502_ = _tmp501_;
	_tmp503_ = bird_font_tool_new ("show_xheight_helplines", _tmp502_);
	_tmp504_ = _tmp503_;
	bird_font_drawing_tools_set_xheight_help_lines (_tmp504_);
	_g_object_unref0 (_tmp504_);
	_g_free0 (_tmp502_);
	_tmp505_ = bird_font_drawing_tools_get_xheight_help_lines ();
	_tmp506_ = _tmp505_;
	g_signal_connect_object (_tmp506_, "select-action", (GCallback) ___lambda486__bird_font_tool_select_action, self, 0);
	_tmp507_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp508_ = _tmp507_;
	selected_line = bird_font_glyph_get_xheight_lines_visible (_tmp508_);
	_g_object_unref0 (_tmp508_);
	_tmp509_ = bird_font_drawing_tools_get_xheight_help_lines ();
	_tmp510_ = _tmp509_;
	bird_font_tool_set_selected (_tmp510_, selected_line);
	_tmp511_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp512_ = _tmp511_;
	_tmp513_ = bird_font_drawing_tools_get_xheight_help_lines ();
	_tmp514_ = _tmp513_;
	bird_font_expander_add_tool (_tmp512_, _tmp514_, -1);
	_tmp515_ = bird_font_t_ ("Show guidelines at top and bottom margin");
	_tmp516_ = _tmp515_;
	_tmp517_ = bird_font_tool_new ("background_help_lines", _tmp516_);
	_tmp518_ = _tmp517_;
	bird_font_drawing_tools_set_background_help_lines (_tmp518_);
	_g_object_unref0 (_tmp518_);
	_g_free0 (_tmp516_);
	_tmp519_ = bird_font_drawing_tools_get_background_help_lines ();
	_tmp520_ = _tmp519_;
	g_signal_connect_object (_tmp520_, "select-action", (GCallback) ___lambda487__bird_font_tool_select_action, self, 0);
	_tmp521_ = bird_font_glyph_canvas_get_current_glyph ();
	_tmp522_ = _tmp521_;
	selected_line = bird_font_glyph_get_margin_lines_visible (_tmp522_);
	_g_object_unref0 (_tmp522_);
	_tmp523_ = bird_font_drawing_tools_get_background_help_lines ();
	_tmp524_ = _tmp523_;
	bird_font_tool_set_selected (_tmp524_, selected_line);
	_tmp525_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp526_ = _tmp525_;
	_tmp527_ = bird_font_drawing_tools_get_background_help_lines ();
	_tmp528_ = _tmp527_;
	bird_font_expander_add_tool (_tmp526_, _tmp528_, -1);
	_tmp529_ = bird_font_grid_tool_new ("show_grid");
	_tmp530_ = _tmp529_;
	bird_font_drawing_tools_set_show_grid (_tmp530_);
	_g_object_unref0 (_tmp530_);
	_tmp531_ = bird_font_drawing_tools_get_show_grid ();
	_tmp532_ = _tmp531_;
	g_signal_connect_object ((BirdFontTool*) _tmp532_, "select-action", (GCallback) ___lambda488__bird_font_tool_select_action, self, 0);
	_tmp533_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp534_ = _tmp533_;
	_tmp535_ = bird_font_drawing_tools_get_show_grid ();
	_tmp536_ = _tmp535_;
	bird_font_expander_add_tool (_tmp534_, (BirdFontTool*) _tmp536_, -1);
	_tmp537_ = bird_font_drawing_tools_get_grid_expander ();
	_tmp538_ = _tmp537_;
	_tmp538_->visible = FALSE;
	_tmp539_ = bird_font_t_ ("Lock guides and grid");
	_tmp540_ = _tmp539_;
	_tmp541_ = bird_font_tool_new ("lock_grid", _tmp540_);
	_tmp542_ = _tmp541_;
	bird_font_drawing_tools_set_lock_grid (_tmp542_);
	_g_object_unref0 (_tmp542_);
	_g_free0 (_tmp540_);
	_tmp543_ = bird_font_drawing_tools_get_lock_grid ();
	_tmp544_ = _tmp543_;
	g_signal_connect_object (_tmp544_, "select-action", (GCallback) ___lambda489__bird_font_tool_select_action, self, 0);
	_tmp545_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp546_ = _tmp545_;
	_tmp547_ = bird_font_drawing_tools_get_lock_grid ();
	_tmp548_ = _tmp547_;
	bird_font_expander_add_tool (_tmp546_, _tmp548_, -1);
	_tmp549_ = bird_font_zoom_bar_new ();
	_g_object_unref0 (self->zoom_bar);
	self->zoom_bar = _tmp549_;
	_tmp550_ = self->zoom_bar;
	g_signal_connect_object (_tmp550_, "new-zoom", (GCallback) ___lambda490__bird_font_zoom_bar_new_zoom, self, 0);
	_tmp551_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp552_ = _tmp551_;
	_tmp553_ = self->zoom_bar;
	bird_font_expander_add_tool (_tmp552_, (BirdFontTool*) _tmp553_, -1);
	_tmp554_ = bird_font_t_ ("Zoom Out More");
	_tmp555_ = _tmp554_;
	_tmp556_ = bird_font_tool_new ("zoom_1_1", _tmp555_);
	_tmp557_ = _tmp556_;
	_g_free0 (_tmp555_);
	reset_zoom = _tmp557_;
	_tmp558_ = reset_zoom;
	g_signal_connect_object (_tmp558_, "select-action", (GCallback) ___lambda491__bird_font_tool_select_action, self, 0);
	_tmp559_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp560_ = _tmp559_;
	_tmp561_ = reset_zoom;
	bird_font_expander_add_tool (_tmp560_, _tmp561_, -1);
	_tmp562_ = reset_zoom;
	bird_font_tool_set_tool_visibility (_tmp562_, FALSE);
	_tmp563_ = bird_font_t_ ("Show full glyph");
	_tmp564_ = _tmp563_;
	_tmp565_ = bird_font_tool_new ("full_glyph", _tmp564_);
	_tmp566_ = _tmp565_;
	_g_free0 (_tmp564_);
	full_glyph = _tmp566_;
	_tmp567_ = full_glyph;
	g_signal_connect_object (_tmp567_, "select-action", (GCallback) ___lambda492__bird_font_tool_select_action, self, 0);
	_tmp568_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp569_ = _tmp568_;
	_tmp570_ = full_glyph;
	bird_font_expander_add_tool (_tmp569_, _tmp570_, -1);
	_tmp571_ = bird_font_t_ ("Fit in view");
	_tmp572_ = _tmp571_;
	_tmp573_ = bird_font_tool_new ("zoom_boundaries", _tmp572_);
	_tmp574_ = _tmp573_;
	_g_free0 (_tmp572_);
	zoom_boundaries = _tmp574_;
	_tmp575_ = zoom_boundaries;
	g_signal_connect_object (_tmp575_, "select-action", (GCallback) ___lambda493__bird_font_tool_select_action, self, 0);
	_tmp576_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp577_ = _tmp576_;
	_tmp578_ = zoom_boundaries;
	bird_font_expander_add_tool (_tmp577_, _tmp578_, -1);
	_tmp579_ = bird_font_t_ ("Zoom in on background image");
	_tmp580_ = _tmp579_;
	_tmp581_ = bird_font_tool_new ("zoom_background_image", _tmp580_);
	_tmp582_ = _tmp581_;
	_g_free0 (_tmp580_);
	zoom_bg = _tmp582_;
	_tmp583_ = zoom_bg;
	g_signal_connect_object (_tmp583_, "select-action", (GCallback) ___lambda494__bird_font_tool_select_action, self, 0);
	_tmp584_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp585_ = _tmp584_;
	_tmp586_ = zoom_bg;
	bird_font_expander_add_tool (_tmp585_, _tmp586_, -1);
	_tmp587_ = bird_font_t_ ("Previous view");
	_tmp588_ = _tmp587_;
	_tmp589_ = bird_font_tool_new ("prev", _tmp588_);
	_tmp590_ = _tmp589_;
	_g_free0 (_tmp588_);
	zoom_prev = _tmp590_;
	_tmp591_ = zoom_prev;
	g_signal_connect_object (_tmp591_, "select-action", (GCallback) ___lambda495__bird_font_tool_select_action, self, 0);
	_tmp592_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp593_ = _tmp592_;
	_tmp594_ = zoom_prev;
	bird_font_expander_add_tool (_tmp593_, _tmp594_, -1);
	_tmp595_ = bird_font_t_ ("Next view");
	_tmp596_ = _tmp595_;
	_tmp597_ = bird_font_tool_new ("next", _tmp596_);
	_tmp598_ = _tmp597_;
	_g_free0 (_tmp596_);
	zoom_next = _tmp598_;
	_tmp599_ = zoom_next;
	g_signal_connect_object (_tmp599_, "select-action", (GCallback) ___lambda496__bird_font_tool_select_action, self, 0);
	_tmp600_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp601_ = _tmp600_;
	_tmp602_ = zoom_next;
	bird_font_expander_add_tool (_tmp601_, _tmp602_, -1);
	_tmp603_ = zoom_next;
	bird_font_tool_set_tool_visibility (_tmp603_, FALSE);
	_tmp604_ = bird_font_circle_tool_new ("circle");
	_g_object_unref0 (self->priv->circle);
	self->priv->circle = (BirdFontTool*) _tmp604_;
	_tmp605_ = self->priv->circle;
	g_signal_connect_object (_tmp605_, "select-action", (GCallback) ___lambda497__bird_font_tool_select_action, self, 0);
	_tmp606_ = bird_font_drawing_tools_get_shape_tools ();
	_tmp607_ = _tmp606_;
	_tmp608_ = self->priv->circle;
	bird_font_expander_add_tool (_tmp607_, _tmp608_, -1);
	_tmp609_ = bird_font_rectangle_tool_new ("rectangle");
	_g_object_unref0 (self->priv->rectangle);
	self->priv->rectangle = (BirdFontTool*) _tmp609_;
	_tmp610_ = self->priv->rectangle;
	g_signal_connect_object (_tmp610_, "select-action", (GCallback) ___lambda501__bird_font_tool_select_action, self, 0);
	_tmp611_ = bird_font_drawing_tools_get_shape_tools ();
	_tmp612_ = _tmp611_;
	_tmp613_ = self->priv->rectangle;
	bird_font_expander_add_tool (_tmp612_, _tmp613_, -1);
	_tmp614_ = bird_font_drawing_tools_get_font_name ();
	_tmp615_ = _tmp614_;
	bird_font_drawing_tools_add_expander (self, _tmp615_);
	_tmp616_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp617_ = _tmp616_;
	bird_font_drawing_tools_add_expander (self, _tmp617_);
	if (bird_font_bird_font_android) {
		BirdFontExpander* _tmp618_;
		BirdFontExpander* _tmp619_;
		_tmp618_ = bird_font_drawing_tools_get_key_tools ();
		_tmp619_ = _tmp618_;
		bird_font_drawing_tools_add_expander (self, _tmp619_);
	}
	_tmp620_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp621_ = _tmp620_;
	bird_font_drawing_tools_add_expander (self, _tmp621_);
	_tmp622_ = bird_font_drawing_tools_get_layer_settings ();
	_tmp623_ = _tmp622_;
	bird_font_drawing_tools_add_expander (self, _tmp623_);
	_tmp624_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp625_ = _tmp624_;
	bird_font_drawing_tools_add_expander (self, _tmp625_);
	_tmp626_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp627_ = _tmp626_;
	bird_font_drawing_tools_add_expander (self, _tmp627_);
	_tmp628_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp629_ = _tmp628_;
	bird_font_drawing_tools_add_expander (self, _tmp629_);
	_tmp630_ = bird_font_drawing_tools_get_grid ();
	_tmp631_ = _tmp630_;
	bird_font_drawing_tools_add_expander (self, _tmp631_);
	_tmp632_ = bird_font_drawing_tools_get_zoombar_tool ();
	_tmp633_ = _tmp632_;
	bird_font_drawing_tools_add_expander (self, _tmp633_);
	_tmp634_ = bird_font_drawing_tools_get_shape_tools ();
	_tmp635_ = _tmp634_;
	bird_font_drawing_tools_add_expander (self, _tmp635_);
	if (bird_font_bird_font_has_argument ("--test")) {
		BirdFontExpander* _tmp636_;
		BirdFontExpander* _tmp637_;
		_tmp636_ = bird_font_drawing_tools_get_test_tools ();
		_tmp637_ = _tmp636_;
		bird_font_drawing_tools_add_expander (self, _tmp637_);
	}
	_tmp638_ = bird_font_drawing_tools_get_layer_settings ();
	_tmp639_ = _tmp638_;
	bird_font_expander_set_persistent (_tmp639_, TRUE);
	_tmp640_ = bird_font_drawing_tools_get_layer_settings ();
	_tmp641_ = _tmp640_;
	bird_font_expander_set_unique (_tmp641_, FALSE);
	_tmp642_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp643_ = _tmp642_;
	bird_font_expander_set_persistent (_tmp643_, TRUE);
	_tmp644_ = bird_font_drawing_tools_get_draw_tools ();
	_tmp645_ = _tmp644_;
	bird_font_expander_set_unique (_tmp645_, FALSE);
	_tmp646_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp647_ = _tmp646_;
	bird_font_expander_set_persistent (_tmp647_, TRUE);
	_tmp648_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp649_ = _tmp648_;
	bird_font_expander_set_unique (_tmp649_, FALSE);
	_tmp650_ = bird_font_drawing_tools_get_key_tools ();
	_tmp651_ = _tmp650_;
	bird_font_expander_set_persistent (_tmp651_, FALSE);
	_tmp652_ = bird_font_drawing_tools_get_key_tools ();
	_tmp653_ = _tmp652_;
	bird_font_expander_set_unique (_tmp653_, FALSE);
	_tmp654_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp655_ = _tmp654_;
	bird_font_expander_set_persistent (_tmp655_, TRUE);
	_tmp656_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp657_ = _tmp656_;
	bird_font_expander_set_unique (_tmp657_, FALSE);
	_tmp658_ = bird_font_drawing_tools_get_test_tools ();
	_tmp659_ = _tmp658_;
	bird_font_expander_set_persistent (_tmp659_, TRUE);
	_tmp660_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp661_ = _tmp660_;
	bird_font_expander_set_persistent (_tmp661_, TRUE);
	_tmp662_ = bird_font_drawing_tools_get_guideline_tools ();
	_tmp663_ = _tmp662_;
	bird_font_expander_set_unique (_tmp663_, FALSE);
	_tmp664_ = bird_font_drawing_tools_get_grid ();
	_tmp665_ = _tmp664_;
	bird_font_expander_set_persistent (_tmp665_, TRUE);
	_tmp666_ = bird_font_drawing_tools_get_grid ();
	_tmp667_ = _tmp666_;
	bird_font_expander_set_unique (_tmp667_, TRUE);
	_tmp668_ = bird_font_drawing_tools_get_shape_tools ();
	_tmp669_ = _tmp668_;
	bird_font_expander_set_persistent (_tmp669_, TRUE);
	_tmp670_ = bird_font_drawing_tools_get_shape_tools ();
	_tmp671_ = _tmp670_;
	bird_font_expander_set_unique (_tmp671_, TRUE);
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp672_;
		BirdFontExpander* _tmp673_;
		GeeArrayList* _tmp674_;
		gint _t_size = 0;
		GeeArrayList* _tmp675_;
		gint _tmp676_;
		gint _tmp677_;
		gint _t_index = 0;
		_tmp672_ = bird_font_drawing_tools_get_draw_tools ();
		_tmp673_ = _tmp672_;
		_tmp674_ = _tmp673_->tool;
		_t_list = _tmp674_;
		_tmp675_ = _t_list;
		_tmp676_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp675_);
		_tmp677_ = _tmp676_;
		_t_size = _tmp677_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp678_;
			gint _tmp679_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp680_;
			gpointer _tmp681_;
			BirdFontTool* _tmp682_;
			_t_index = _t_index + 1;
			_tmp678_ = _t_index;
			_tmp679_ = _t_size;
			if (!(_tmp678_ < _tmp679_)) {
				break;
			}
			_tmp680_ = _t_list;
			_tmp681_ = gee_abstract_list_get ((GeeAbstractList*) _tmp680_, _t_index);
			t = (BirdFontTool*) _tmp681_;
			_tmp682_ = t;
			_tmp682_->editor_events = TRUE;
			_g_object_unref0 (t);
		}
	}
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp683_;
		BirdFontExpander* _tmp684_;
		GeeArrayList* _tmp685_;
		gint _t_size = 0;
		GeeArrayList* _tmp686_;
		gint _tmp687_;
		gint _tmp688_;
		gint _t_index = 0;
		_tmp683_ = bird_font_drawing_tools_get_shape_tools ();
		_tmp684_ = _tmp683_;
		_tmp685_ = _tmp684_->tool;
		_t_list = _tmp685_;
		_tmp686_ = _t_list;
		_tmp687_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp686_);
		_tmp688_ = _tmp687_;
		_t_size = _tmp688_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp689_;
			gint _tmp690_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp691_;
			gpointer _tmp692_;
			BirdFontTool* _tmp693_;
			BirdFontTool* _tmp694_;
			_t_index = _t_index + 1;
			_tmp689_ = _t_index;
			_tmp690_ = _t_size;
			if (!(_tmp689_ < _tmp690_)) {
				break;
			}
			_tmp691_ = _t_list;
			_tmp692_ = gee_abstract_list_get ((GeeAbstractList*) _tmp691_, _t_index);
			t = (BirdFontTool*) _tmp692_;
			_tmp693_ = t;
			_tmp693_->editor_events = TRUE;
			_tmp694_ = t;
			_tmp694_->persistent = TRUE;
			_g_object_unref0 (t);
		}
	}
	_tmp695_ = bird_font_drawing_tools_move_background;
	((BirdFontTool*) _tmp695_)->editor_events = TRUE;
	_tmp696_ = bird_font_drawing_tools_cut_background;
	((BirdFontTool*) _tmp696_)->editor_events = TRUE;
	_tmp697_ = bird_font_drawing_tools_move_canvas;
	_tmp697_->editor_events = TRUE;
	_tmp698_ = bird_font_drawing_tools_move_background;
	((BirdFontTool*) _tmp698_)->persistent = TRUE;
	_tmp699_ = bird_font_drawing_tools_cut_background;
	((BirdFontTool*) _tmp699_)->persistent = TRUE;
	_tmp700_ = bird_font_drawing_tools_move_canvas;
	_tmp700_->persistent = TRUE;
	_tmp701_ = g_idle_source_new ();
	idle = _tmp701_;
	g_source_set_callback (idle, ___lambda502__gsource_func, g_object_ref (self), g_object_unref);
	g_source_attach (idle, NULL);
	_tmp702_ = bird_font_main_window_get_tab_bar ();
	_tmp703_ = _tmp702_;
	g_signal_connect_object (_tmp703_, "signal-tab-selected", (GCallback) ___lambda504__bird_font_tab_bar_signal_tab_selected, self, 0);
	_g_object_unref0 (_tmp703_);
	_g_source_unref0 (idle);
	_g_object_unref0 (zoom_next);
	_g_object_unref0 (zoom_prev);
	_g_object_unref0 (zoom_bg);
	_g_object_unref0 (zoom_boundaries);
	_g_object_unref0 (full_glyph);
	_g_object_unref0 (reset_zoom);
	block11_data_unref (_data11_);
	_data11_ = NULL;
	return self;
}

BirdFontDrawingTools*
bird_font_drawing_tools_new (BirdFontGlyphCanvas* main_glyph_canvas)
{
	return bird_font_drawing_tools_construct (BIRD_FONT_TYPE_DRAWING_TOOLS, main_glyph_canvas);
}

void
bird_font_drawing_tools_update_stroke_settings (void)
{
	gboolean stroke = FALSE;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontTool* _tmp13_;
	BirdFontTool* _tmp14_;
	stroke = FALSE;
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	{
		GeeArrayList* _p_list = NULL;
		BirdFontGlyph* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _p_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _p_index = 0;
		_tmp1_ = g;
		_tmp2_ = _tmp1_->active_paths;
		_p_list = _tmp2_;
		_tmp3_ = _p_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_p_size = _tmp5_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			BirdFontPath* _tmp10_;
			gdouble _tmp11_;
			gdouble _tmp12_;
			_p_index = _p_index + 1;
			_tmp6_ = _p_index;
			_tmp7_ = _p_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _p_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _p_index);
			p = (BirdFontPath*) _tmp9_;
			_tmp10_ = p;
			_tmp11_ = bird_font_path_get_stroke (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_ > ((gdouble) 0)) {
				stroke = TRUE;
			}
			_g_object_unref0 (p);
		}
	}
	_tmp13_ = bird_font_drawing_tools_get_add_stroke ();
	_tmp14_ = _tmp13_;
	_tmp14_->selected = stroke;
	bird_font_stroke_tool_add_stroke = stroke;
	bird_font_drawing_tools_set_stroke_tool_visibility ();
	_g_object_unref0 (g);
}

static void
bird_font_drawing_tools_auto_trace_background (BirdFontDrawingTools* self)
{
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontBackgroundImage* bg = NULL;
	BirdFontGlyph* _tmp1_;
	BirdFontBackgroundImage* _tmp2_;
	BirdFontBackgroundImage* b = NULL;
	BirdFontPathList* pl = NULL;
	BirdFontBackgroundImage* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	_tmp1_ = g;
	_tmp2_ = bird_font_glyph_get_background_image (_tmp1_);
	bg = _tmp2_;
	_tmp3_ = bg;
	if (_tmp3_ != NULL) {
		BirdFontBackgroundImage* _tmp4_;
		BirdFontBackgroundImage* _tmp5_;
		BirdFontBackgroundImage* _tmp6_;
		BirdFontPathList* _tmp7_;
		_tmp4_ = bg;
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, BIRD_FONT_TYPE_BACKGROUND_IMAGE, BirdFontBackgroundImage));
		_g_object_unref0 (b);
		b = _tmp5_;
		_tmp6_ = b;
		_tmp7_ = bird_font_background_image_autotrace (_tmp6_);
		_g_object_unref0 (pl);
		pl = _tmp7_;
		{
			GeeArrayList* _p_list = NULL;
			BirdFontPathList* _tmp8_;
			GeeArrayList* _tmp9_;
			gint _p_size = 0;
			GeeArrayList* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gint _p_index = 0;
			_tmp8_ = pl;
			_tmp9_ = _tmp8_->paths;
			_p_list = _tmp9_;
			_tmp10_ = _p_list;
			_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
			_tmp12_ = _tmp11_;
			_p_size = _tmp12_;
			_p_index = -1;
			while (TRUE) {
				gint _tmp13_;
				gint _tmp14_;
				BirdFontPath* p = NULL;
				GeeArrayList* _tmp15_;
				gpointer _tmp16_;
				BirdFontGlyph* _tmp17_;
				BirdFontPath* _tmp18_;
				_p_index = _p_index + 1;
				_tmp13_ = _p_index;
				_tmp14_ = _p_size;
				if (!(_tmp13_ < _tmp14_)) {
					break;
				}
				_tmp15_ = _p_list;
				_tmp16_ = gee_abstract_list_get ((GeeAbstractList*) _tmp15_, _p_index);
				p = (BirdFontPath*) _tmp16_;
				_tmp17_ = g;
				_tmp18_ = p;
				bird_font_glyph_add_path (_tmp17_, _tmp18_);
				_g_object_unref0 (p);
			}
		}
	}
	_g_object_unref0 (pl);
	_g_object_unref0 (b);
	_g_object_unref0 (bg);
	_g_object_unref0 (g);
}

static void
bird_font_drawing_tools_update_line_selection (BirdFontDrawingTools* self,
                                               BirdFontGlyph* glyph)
{
	BirdFontTool* _tmp0_;
	BirdFontTool* _tmp1_;
	BirdFontTool* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontTool* _tmp4_;
	BirdFontTool* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (glyph != NULL);
	_tmp0_ = bird_font_drawing_tools_get_help_lines ();
	_tmp1_ = _tmp0_;
	bird_font_tool_set_selected (_tmp1_, bird_font_glyph_get_show_help_lines (glyph));
	_tmp2_ = bird_font_drawing_tools_get_xheight_help_lines ();
	_tmp3_ = _tmp2_;
	bird_font_tool_set_selected (_tmp3_, bird_font_glyph_get_xheight_lines_visible (glyph));
	_tmp4_ = bird_font_drawing_tools_get_background_help_lines ();
	_tmp5_ = _tmp4_;
	bird_font_tool_set_selected (_tmp5_, bird_font_glyph_get_margin_lines_visible (glyph));
}

void
bird_font_drawing_tools_set_point_type_from_preferences (void)
{
	gchar* type = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp3_;
	_tmp0_ = bird_font_preferences_get ("point_type");
	type = _tmp0_;
	_tmp1_ = type;
	if (g_strcmp0 (_tmp1_, "double_points") == 0) {
		bird_font_toolbox_select_tool_by_name ("double_points");
	} else {
		const gchar* _tmp2_;
		_tmp2_ = type;
		if (g_strcmp0 (_tmp2_, "quadratic_points") == 0) {
			bird_font_toolbox_select_tool_by_name ("quadratic_points");
		}
	}
	_tmp3_ = type;
	if (g_strcmp0 (_tmp3_, "cubic_points") == 0) {
		bird_font_toolbox_select_tool_by_name ("cubic_points");
	}
	_g_free0 (type);
}

static void
bird_font_drawing_tools_hide_all_modifiers (BirdFontDrawingTools* self)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontSpinButton* _tmp1_;
	BirdFontSpinButton* _tmp2_;
	BirdFontSpinButton* _tmp3_;
	BirdFontSpinButton* _tmp4_;
	BirdFontOrientationTool* _tmp5_;
	BirdFontTool* _tmp6_;
	BirdFontTool* _tmp7_;
	BirdFontTool* _tmp8_;
	BirdFontTool* _tmp9_;
	BirdFontTool* _tmp10_;
	BirdFontTool* _tmp11_;
	BirdFontTool* _tmp12_;
	BirdFontTool* _tmp13_;
	BirdFontTool* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	BirdFontCutBackgroundTool* _tmp18_;
	BirdFontTool* _tmp19_;
	BirdFontTool* _tmp20_;
	BirdFontSpinButton* _tmp21_;
	BirdFontSpinButton* _tmp22_;
	BirdFontTool* _tmp23_;
	BirdFontSpinButton* _tmp24_;
	BirdFontTool* _tmp25_;
	BirdFontSpinButton* _tmp26_;
	BirdFontTool* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->x_coordinate;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp0_, FALSE);
	_tmp1_ = self->priv->y_coordinate;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp1_, FALSE);
	_tmp2_ = self->priv->rotation;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp2_, FALSE);
	_tmp3_ = self->priv->width;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp3_, FALSE);
	_tmp4_ = self->priv->height;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp4_, FALSE);
	_tmp5_ = self->priv->reverse_path_tool;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp5_, FALSE);
	_tmp6_ = self->priv->full_height_tool;
	bird_font_tool_set_tool_visibility (_tmp6_, FALSE);
	_tmp7_ = self->priv->move_layer;
	bird_font_tool_set_tool_visibility (_tmp7_, FALSE);
	_tmp8_ = self->priv->flip_vertical;
	bird_font_tool_set_tool_visibility (_tmp8_, FALSE);
	_tmp9_ = self->priv->flip_horizontal;
	bird_font_tool_set_tool_visibility (_tmp9_, FALSE);
	_tmp10_ = self->priv->tie_handles;
	bird_font_tool_set_tool_visibility (_tmp10_, FALSE);
	_tmp11_ = self->priv->reflect_handle;
	bird_font_tool_set_tool_visibility (_tmp11_, FALSE);
	_tmp12_ = self->priv->create_line;
	bird_font_tool_set_tool_visibility (_tmp12_, FALSE);
	_tmp13_ = self->priv->close_path_tool;
	bird_font_tool_set_tool_visibility (_tmp13_, FALSE);
	_tmp14_ = bird_font_drawing_tools_quadratic_points;
	bird_font_tool_set_tool_visibility (_tmp14_, FALSE);
	_tmp15_ = bird_font_drawing_tools_cubic_points;
	bird_font_tool_set_tool_visibility (_tmp15_, FALSE);
	_tmp16_ = bird_font_drawing_tools_double_points;
	bird_font_tool_set_tool_visibility (_tmp16_, FALSE);
	_tmp17_ = bird_font_drawing_tools_convert_points;
	bird_font_tool_set_tool_visibility (_tmp17_, FALSE);
	_tmp18_ = bird_font_drawing_tools_cut_background;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp18_, FALSE);
	_tmp19_ = self->priv->show_bg;
	bird_font_tool_set_tool_visibility (_tmp19_, FALSE);
	_tmp20_ = self->priv->bg_selection;
	bird_font_tool_set_tool_visibility (_tmp20_, FALSE);
	_tmp21_ = bird_font_drawing_tools_background_threshold;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp21_, FALSE);
	_tmp22_ = bird_font_drawing_tools_background_scale;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp22_, FALSE);
	_tmp23_ = self->priv->high_contrast_background;
	bird_font_tool_set_tool_visibility (_tmp23_, FALSE);
	_tmp24_ = bird_font_drawing_tools_auto_trace_resolution;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp24_, FALSE);
	_tmp25_ = self->priv->auto_trace;
	bird_font_tool_set_tool_visibility (_tmp25_, FALSE);
	_tmp26_ = bird_font_drawing_tools_auto_trace_simplify;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp26_, FALSE);
	_tmp27_ = self->priv->delete_background;
	bird_font_tool_set_tool_visibility (_tmp27_, FALSE);
}

static void
bird_font_drawing_tools_show_background_tool_modifiers (BirdFontDrawingTools* self)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontText* _tmp2_;
	BirdFontCutBackgroundTool* _tmp3_;
	BirdFontTool* _tmp4_;
	BirdFontTool* _tmp5_;
	BirdFontSpinButton* _tmp6_;
	BirdFontSpinButton* _tmp7_;
	BirdFontTool* _tmp8_;
	BirdFontSpinButton* _tmp9_;
	BirdFontTool* _tmp10_;
	BirdFontSpinButton* _tmp11_;
	BirdFontTool* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->backgrounds_headline;
	bird_font_expander_set_headline (_tmp1_, _tmp2_);
	_tmp3_ = bird_font_drawing_tools_cut_background;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp3_, TRUE);
	_tmp4_ = self->priv->show_bg;
	bird_font_tool_set_tool_visibility (_tmp4_, TRUE);
	_tmp5_ = self->priv->bg_selection;
	bird_font_tool_set_tool_visibility (_tmp5_, TRUE);
	_tmp6_ = bird_font_drawing_tools_background_threshold;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp6_, TRUE);
	_tmp7_ = bird_font_drawing_tools_background_scale;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp7_, TRUE);
	_tmp8_ = self->priv->high_contrast_background;
	bird_font_tool_set_tool_visibility (_tmp8_, TRUE);
	_tmp9_ = bird_font_drawing_tools_auto_trace_resolution;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp9_, TRUE);
	_tmp10_ = self->priv->auto_trace;
	bird_font_tool_set_tool_visibility (_tmp10_, TRUE);
	_tmp11_ = bird_font_drawing_tools_auto_trace_simplify;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp11_, TRUE);
	_tmp12_ = self->priv->delete_background;
	bird_font_tool_set_tool_visibility (_tmp12_, TRUE);
}

static void
bird_font_drawing_tools_show_point_tool_modifiers (BirdFontDrawingTools* self)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontText* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontTool* _tmp4_;
	BirdFontTool* _tmp5_;
	BirdFontTool* _tmp6_;
	BirdFontTool* _tmp7_;
	BirdFontTool* _tmp8_;
	BirdFontTool* _tmp9_;
	BirdFontTool* _tmp10_;
	BirdFontOrientationTool* _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->control_points_headline;
	bird_font_expander_set_headline (_tmp1_, _tmp2_);
	_tmp3_ = self->priv->tie_handles;
	bird_font_tool_set_tool_visibility (_tmp3_, TRUE);
	_tmp4_ = self->priv->reflect_handle;
	bird_font_tool_set_tool_visibility (_tmp4_, TRUE);
	_tmp5_ = self->priv->create_line;
	bird_font_tool_set_tool_visibility (_tmp5_, TRUE);
	_tmp6_ = self->priv->close_path_tool;
	bird_font_tool_set_tool_visibility (_tmp6_, TRUE);
	_tmp7_ = bird_font_drawing_tools_quadratic_points;
	bird_font_tool_set_tool_visibility (_tmp7_, TRUE);
	_tmp8_ = bird_font_drawing_tools_cubic_points;
	bird_font_tool_set_tool_visibility (_tmp8_, TRUE);
	_tmp9_ = bird_font_drawing_tools_double_points;
	bird_font_tool_set_tool_visibility (_tmp9_, TRUE);
	_tmp10_ = bird_font_drawing_tools_convert_points;
	bird_font_tool_set_tool_visibility (_tmp10_, TRUE);
	_tmp11_ = self->priv->reverse_path_tool;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp11_, TRUE);
}

static void
bird_font_drawing_tools_show_object_tool_modifiers (BirdFontDrawingTools* self)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontText* _tmp2_;
	BirdFontSpinButton* _tmp3_;
	BirdFontSpinButton* _tmp4_;
	BirdFontSpinButton* _tmp5_;
	BirdFontSpinButton* _tmp6_;
	BirdFontSpinButton* _tmp7_;
	BirdFontOrientationTool* _tmp8_;
	BirdFontTool* _tmp9_;
	BirdFontTool* _tmp10_;
	BirdFontTool* _tmp11_;
	BirdFontTool* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->object_tools_headline;
	bird_font_expander_set_headline (_tmp1_, _tmp2_);
	_tmp3_ = self->priv->x_coordinate;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp3_, TRUE);
	_tmp4_ = self->priv->y_coordinate;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp4_, TRUE);
	_tmp5_ = self->priv->rotation;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp5_, TRUE);
	_tmp6_ = self->priv->width;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp6_, TRUE);
	_tmp7_ = self->priv->height;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp7_, TRUE);
	_tmp8_ = self->priv->reverse_path_tool;
	bird_font_tool_set_tool_visibility ((BirdFontTool*) _tmp8_, TRUE);
	_tmp9_ = self->priv->move_layer;
	bird_font_tool_set_tool_visibility (_tmp9_, TRUE);
	_tmp10_ = self->priv->flip_vertical;
	bird_font_tool_set_tool_visibility (_tmp10_, TRUE);
	_tmp11_ = self->priv->flip_horizontal;
	bird_font_tool_set_tool_visibility (_tmp11_, TRUE);
	_tmp12_ = self->priv->full_height_tool;
	bird_font_tool_set_tool_visibility (_tmp12_, TRUE);
}

static void
bird_font_drawing_tools_real_reset_selection (BirdFontToolCollection* base,
                                              BirdFontTool* current_tool)
{
	BirdFontDrawingTools * self;
	self = (BirdFontDrawingTools*) base;
	g_return_if_fail (current_tool != NULL);
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp0_;
		BirdFontExpander* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _t_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _t_index = 0;
		_tmp0_ = bird_font_drawing_tools_get_draw_tools ();
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_->tool;
		_t_list = _tmp2_;
		_tmp3_ = _t_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_t_size = _tmp5_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			BirdFontTool* _tmp10_;
			_t_index = _t_index + 1;
			_tmp6_ = _t_index;
			_tmp7_ = _t_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _t_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _t_index);
			t = (BirdFontTool*) _tmp9_;
			_tmp10_ = t;
			if (_tmp10_ != current_tool) {
				BirdFontTool* _tmp11_;
				_tmp11_ = t;
				bird_font_tool_set_selected (_tmp11_, FALSE);
			}
			_g_object_unref0 (t);
		}
	}
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		BirdFontDrawingTools* self;
		self = _data13_->self;
		_g_object_unref0 (_data13_->current_tool);
		_g_object_unref0 (self);
		g_slice_free (Block13Data, _data13_);
	}
}

static gboolean
__lambda417_ (Block13Data* _data13_)
{
	BirdFontDrawingTools* self;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp0_;
	BirdFontFontDisplay* display = NULL;
	BirdFontFontDisplay* _tmp1_;
	BirdFontFontDisplay* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	BirdFontCutBackgroundTool* _tmp6_;
	BirdFontBezierTool* _tmp7_;
	BirdFontPenTool* _tmp8_;
	BirdFontPointTool* _tmp9_;
	BirdFontZoomTool* _tmp10_;
	BirdFontMoveTool* _tmp11_;
	BirdFontMoveTool* _tmp12_;
	BirdFontResizeTool* _tmp13_;
	BirdFontTrackTool* _tmp14_;
	BirdFontTool* _tmp15_;
	BirdFontTool* _tmp16_;
	BirdFontTool* _tmp17_;
	BirdFontGlyph* _tmp18_;
	BirdFontTool* _tmp19_;
	BirdFontTool* _tmp20_;
	BirdFontSpinButton* _tmp21_;
	BirdFontTool* _tmp22_;
	BirdFontTool* _tmp23_;
	BirdFontOrientationTool* _tmp24_;
	BirdFontTool* _tmp25_;
	BirdFontTool* _tmp26_;
	BirdFontTool* _tmp27_;
	gboolean _tmp28_ = FALSE;
	BirdFontResizeTool* _tmp29_;
	BirdFontToolbox* _tmp48_;
	BirdFontToolbox* _tmp49_;
	BirdFontExpander* _tmp50_;
	BirdFontExpander* _tmp51_;
	gboolean result;
	self = _data13_->self;
	_tmp0_ = bird_font_main_window_get_current_glyph ();
	g = _tmp0_;
	bird_font_tool_collection_reset_selection ((BirdFontToolCollection*) self, _data13_->current_tool);
	_tmp1_ = bird_font_main_window_get_current_display ();
	display = _tmp1_;
	_tmp2_ = display;
	_tmp3_ = bird_font_font_display_get_name (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strcmp0 (_tmp4_, "Backgrounds") == 0;
	_g_free0 (_tmp4_);
	if (_tmp5_) {
		result = FALSE;
		_g_object_unref0 (display);
		_g_object_unref0 (g);
		return result;
	}
	bird_font_drawing_tools_hide_all_modifiers (self);
	_tmp6_ = bird_font_drawing_tools_cut_background;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp6_, FALSE);
	_tmp7_ = bird_font_drawing_tools_bezier_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp7_, FALSE);
	_tmp8_ = bird_font_drawing_tools_pen_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp8_, FALSE);
	_tmp9_ = self->priv->point_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp9_, FALSE);
	_tmp10_ = bird_font_drawing_tools_zoom_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp10_, FALSE);
	_tmp11_ = bird_font_drawing_tools_get_move_tool ();
	_tmp12_ = _tmp11_;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp12_, FALSE);
	_tmp13_ = bird_font_drawing_tools_resize_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp13_, FALSE);
	_tmp14_ = bird_font_drawing_tools_track_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp14_, FALSE);
	_tmp15_ = bird_font_drawing_tools_move_canvas;
	bird_font_tool_set_selected (_tmp15_, FALSE);
	_tmp16_ = self->priv->delete_background;
	bird_font_tool_set_selected (_tmp16_, FALSE);
	_tmp17_ = self->priv->show_bg;
	_tmp18_ = g;
	bird_font_tool_set_selected (_tmp17_, bird_font_glyph_get_background_visible (_tmp18_));
	_tmp19_ = self->priv->show_bg;
	bird_font_tool_set_active (_tmp19_, FALSE);
	_tmp20_ = self->priv->bg_selection;
	bird_font_tool_set_selected (_tmp20_, FALSE);
	_tmp21_ = bird_font_drawing_tools_background_scale;
	bird_font_tool_set_active ((BirdFontTool*) _tmp21_, FALSE);
	_tmp22_ = self->priv->rectangle;
	bird_font_tool_set_selected (_tmp22_, FALSE);
	_tmp23_ = self->priv->circle;
	bird_font_tool_set_selected (_tmp23_, FALSE);
	_tmp24_ = self->priv->reverse_path_tool;
	bird_font_tool_set_selected ((BirdFontTool*) _tmp24_, FALSE);
	_tmp25_ = self->priv->move_layer;
	bird_font_tool_set_selected (_tmp25_, FALSE);
	_tmp26_ = self->priv->flip_vertical;
	bird_font_tool_set_selected (_tmp26_, FALSE);
	_tmp27_ = self->priv->flip_horizontal;
	bird_font_tool_set_selected (_tmp27_, FALSE);
	bird_font_tool_set_selected (_data13_->current_tool, TRUE);
	_tmp29_ = bird_font_drawing_tools_resize_tool;
	if (bird_font_tool_is_selected ((BirdFontTool*) _tmp29_)) {
		_tmp28_ = TRUE;
	} else {
		BirdFontMoveTool* _tmp30_;
		BirdFontMoveTool* _tmp31_;
		_tmp30_ = bird_font_drawing_tools_get_move_tool ();
		_tmp31_ = _tmp30_;
		_tmp28_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp31_);
	}
	if (_tmp28_) {
		bird_font_drawing_tools_show_object_tool_modifiers (self);
	} else {
		gboolean _tmp32_ = FALSE;
		gboolean _tmp33_ = FALSE;
		gboolean _tmp34_ = FALSE;
		BirdFontBezierTool* _tmp35_;
		_tmp35_ = bird_font_drawing_tools_bezier_tool;
		if (bird_font_tool_is_selected ((BirdFontTool*) _tmp35_)) {
			_tmp34_ = TRUE;
		} else {
			BirdFontPenTool* _tmp36_;
			_tmp36_ = bird_font_drawing_tools_pen_tool;
			_tmp34_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp36_);
		}
		if (_tmp34_) {
			_tmp33_ = TRUE;
		} else {
			BirdFontPointTool* _tmp37_;
			_tmp37_ = self->priv->point_tool;
			_tmp33_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp37_);
		}
		if (_tmp33_) {
			_tmp32_ = TRUE;
		} else {
			BirdFontTrackTool* _tmp38_;
			_tmp38_ = bird_font_drawing_tools_track_tool;
			_tmp32_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp38_);
		}
		if (_tmp32_) {
			bird_font_drawing_tools_show_point_tool_modifiers (self);
		} else {
			gboolean _tmp39_ = FALSE;
			gboolean _tmp40_ = FALSE;
			gboolean _tmp41_ = FALSE;
			gboolean _tmp42_ = FALSE;
			BirdFontBackgroundTool* _tmp43_;
			_tmp43_ = bird_font_drawing_tools_move_background;
			if (bird_font_tool_is_selected ((BirdFontTool*) _tmp43_)) {
				_tmp42_ = TRUE;
			} else {
				BirdFontCutBackgroundTool* _tmp44_;
				_tmp44_ = bird_font_drawing_tools_cut_background;
				_tmp42_ = bird_font_tool_is_selected ((BirdFontTool*) _tmp44_);
			}
			if (_tmp42_) {
				_tmp41_ = TRUE;
			} else {
				BirdFontTool* _tmp45_;
				_tmp45_ = self->priv->show_bg;
				_tmp41_ = bird_font_tool_is_selected (_tmp45_);
			}
			if (_tmp41_) {
				_tmp40_ = TRUE;
			} else {
				BirdFontTool* _tmp46_;
				_tmp46_ = self->priv->high_contrast_background;
				_tmp40_ = bird_font_tool_is_selected (_tmp46_);
			}
			if (_tmp40_) {
				_tmp39_ = TRUE;
			} else {
				BirdFontTool* _tmp47_;
				_tmp47_ = self->priv->auto_trace;
				_tmp39_ = bird_font_tool_is_selected (_tmp47_);
			}
			if (_tmp39_) {
				bird_font_drawing_tools_show_background_tool_modifiers (self);
			} else {
				bird_font_drawing_tools_show_point_tool_modifiers (self);
			}
		}
	}
	_tmp48_ = bird_font_main_window_get_toolbox ();
	_tmp49_ = _tmp48_;
	bird_font_toolbox_update_expanders (_tmp49_);
	_g_object_unref0 (_tmp49_);
	_tmp50_ = bird_font_drawing_tools_get_draw_tool_modifiers ();
	_tmp51_ = _tmp50_;
	bird_font_expander_redraw (_tmp51_);
	result = FALSE;
	_g_object_unref0 (display);
	_g_object_unref0 (g);
	return result;
}

static gboolean
___lambda417__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda417_ (self);
	return result;
}

void
bird_font_drawing_tools_update_drawing_and_background_tools (BirdFontDrawingTools* self,
                                                             BirdFontTool* current_tool)
{
	Block13Data* _data13_;
	BirdFontTool* _tmp0_;
	GSource* idle = NULL;
	GSource* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (current_tool != NULL);
	_data13_ = g_slice_new0 (Block13Data);
	_data13_->_ref_count_ = 1;
	_data13_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (current_tool);
	_g_object_unref0 (_data13_->current_tool);
	_data13_->current_tool = _tmp0_;
	_tmp1_ = g_idle_source_new ();
	idle = _tmp1_;
	g_source_set_callback (idle, ___lambda417__gsource_func, block13_data_ref (_data13_), block13_data_unref);
	g_source_attach (idle, NULL);
	_g_source_unref0 (idle);
	block13_data_unref (_data13_);
	_data13_ = NULL;
}

static gboolean
__lambda431_ (BirdFontDrawingTools* self)
{
	BirdFontFont* f = NULL;
	BirdFontFont* _tmp0_;
	BirdFontTool* _tmp1_;
	BirdFontTool* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontTool* _tmp13_;
	gboolean result;
	_tmp0_ = bird_font_bird_font_get_current_font ();
	f = _tmp0_;
	_tmp1_ = bird_font_drawing_tools_quadratic_points;
	bird_font_tool_set_selected (_tmp1_, FALSE);
	_tmp2_ = bird_font_drawing_tools_cubic_points;
	bird_font_tool_set_selected (_tmp2_, FALSE);
	_tmp3_ = bird_font_drawing_tools_double_points;
	bird_font_tool_set_selected (_tmp3_, FALSE);
	switch (bird_font_drawing_tools_point_type) {
		case BIRD_FONT_POINT_TYPE_QUADRATIC:
		{
			BirdFontTool* _tmp4_;
			BirdFontFont* _tmp5_;
			BirdFontFontSettings* _tmp6_;
			_tmp4_ = bird_font_drawing_tools_quadratic_points;
			bird_font_tool_set_selected (_tmp4_, TRUE);
			_tmp5_ = f;
			_tmp6_ = _tmp5_->settings;
			bird_font_font_settings_set_setting (_tmp6_, "point_type", "quadratic");
			break;
		}
		case BIRD_FONT_POINT_TYPE_CUBIC:
		{
			BirdFontTool* _tmp7_;
			BirdFontFont* _tmp8_;
			BirdFontFontSettings* _tmp9_;
			_tmp7_ = bird_font_drawing_tools_cubic_points;
			bird_font_tool_set_selected (_tmp7_, TRUE);
			_tmp8_ = f;
			_tmp9_ = _tmp8_->settings;
			bird_font_font_settings_set_setting (_tmp9_, "point_type", "cubic");
			break;
		}
		case BIRD_FONT_POINT_TYPE_DOUBLE_CURVE:
		{
			BirdFontTool* _tmp10_;
			BirdFontFont* _tmp11_;
			BirdFontFontSettings* _tmp12_;
			_tmp10_ = bird_font_drawing_tools_double_points;
			bird_font_tool_set_selected (_tmp10_, TRUE);
			_tmp11_ = f;
			_tmp12_ = _tmp11_->settings;
			bird_font_font_settings_set_setting (_tmp12_, "point_type", "double_curve");
			break;
		}
		default:
		break;
	}
	_tmp13_ = bird_font_drawing_tools_convert_points;
	bird_font_tool_set_selected (_tmp13_, FALSE);
	bird_font_toolbox_redraw_tool_box ();
	result = FALSE;
	_g_object_unref0 (f);
	return result;
}

static gboolean
___lambda431__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda431_ ((BirdFontDrawingTools*) self);
	return result;
}

static void
bird_font_drawing_tools_update_type_selection (BirdFontDrawingTools* self)
{
	GSource* idle = NULL;
	GSource* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_idle_source_new ();
	idle = _tmp0_;
	g_source_set_callback (idle, ___lambda431__gsource_func, g_object_ref (self), g_object_unref);
	g_source_attach (idle, NULL);
	_g_source_unref0 (idle);
}

void
bird_font_drawing_tools_set_default_point_type (const gchar* type)
{
	g_return_if_fail (type != NULL);
	if (g_strcmp0 (type, "quadratic") == 0) {
		BirdFontTool* _tmp0_;
		_tmp0_ = bird_font_drawing_tools_quadratic_points;
		bird_font_tool_set_selected (_tmp0_, TRUE);
		bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_QUADRATIC;
	} else {
		if (g_strcmp0 (type, "cubic") == 0) {
			BirdFontTool* _tmp1_;
			_tmp1_ = bird_font_drawing_tools_cubic_points;
			bird_font_tool_set_selected (_tmp1_, TRUE);
			bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_CUBIC;
		} else {
			if (g_strcmp0 (type, "double_curve") == 0) {
				BirdFontTool* _tmp2_;
				_tmp2_ = bird_font_drawing_tools_double_points;
				bird_font_tool_set_selected (_tmp2_, TRUE);
				bird_font_drawing_tools_point_type = BIRD_FONT_POINT_TYPE_DOUBLE_CURVE;
			}
		}
	}
}

static GeeArrayList*
bird_font_drawing_tools_real_get_expanders (BirdFontToolCollection* base)
{
	BirdFontDrawingTools * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* result;
	self = (BirdFontDrawingTools*) base;
	_tmp0_ = self->expanders;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

/** Insert new points of this type. */
BirdFontPointType
bird_font_drawing_tools_get_selected_point_type (void)
{
	BirdFontPointType result;
	result = bird_font_drawing_tools_point_type;
	return result;
}

void
bird_font_drawing_tools_remove_all_grid_buttons (BirdFontDrawingTools* self)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	BirdFontToolbox* _tmp4_;
	BirdFontToolbox* _tmp5_;
	BirdFontToolbox* _tmp6_;
	BirdFontToolbox* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_drawing_tools_get_grid_expander ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->tool;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp2_);
	_tmp3_ = bird_font_grid_tool_sizes;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp3_);
	_tmp4_ = bird_font_main_window_get_toolbox ();
	_tmp5_ = _tmp4_;
	bird_font_toolbox_update_expanders (_tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = bird_font_main_window_get_toolbox ();
	_tmp7_ = _tmp6_;
	g_signal_emit_by_name (_tmp7_, "redraw", 0, 0, bird_font_toolbox_allocation_width, bird_font_toolbox_allocation_height);
	_g_object_unref0 (_tmp7_);
}

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

void
bird_font_drawing_tools_parse_grid (BirdFontDrawingTools* self,
                                    const gchar* spin_button_value)
{
	BirdFontSpinButton* sb = NULL;
	BirdFontSpinButton* _tmp0_;
	BirdFontToolbox* _tmp1_;
	BirdFontToolbox* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (spin_button_value != NULL);
	_tmp0_ = bird_font_drawing_tools_add_new_grid (double_parse (spin_button_value), FALSE);
	sb = _tmp0_;
	_tmp1_ = bird_font_main_window_get_toolbox ();
	_tmp2_ = _tmp1_;
	bird_font_toolbox_select_tool (_tmp2_, (BirdFontTool*) sb);
	_g_object_unref0 (_tmp2_);
	_g_object_unref0 (sb);
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		_g_object_unref0 (_data14_->grid_width);
		g_slice_free (Block14Data, _data14_);
	}
}

static void
__lambda291_ (Block14Data* _data14_,
              BirdFontSpinButton* _self_)
{
	BirdFontFont* font = NULL;
	BirdFontFont* _tmp0_;
	BirdFontSpinButton* w = NULL;
	BirdFontSpinButton* _tmp1_;
	BirdFontSpinButton* _tmp2_;
	BirdFontFont* _tmp3_;
	GeeArrayList* _tmp4_;
	g_return_if_fail (_self_ != NULL);
	_tmp0_ = bird_font_bird_font_get_current_font ();
	font = _tmp0_;
	_tmp1_ = _data14_->grid_width;
	_tmp2_ = _data14_->grid_width;
	g_signal_emit_by_name ((BirdFontTool*) _tmp1_, "select-action", (BirdFontTool*) _tmp2_);
	_tmp3_ = font;
	_tmp4_ = _tmp3_->grid_width;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp4_);
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp5_;
		BirdFontExpander* _tmp6_;
		GeeArrayList* _tmp7_;
		gint _t_size = 0;
		GeeArrayList* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		gint _t_index = 0;
		_tmp5_ = bird_font_drawing_tools_get_grid_expander ();
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_->tool;
		_t_list = _tmp7_;
		_tmp8_ = _t_list;
		_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
		_tmp10_ = _tmp9_;
		_t_size = _tmp10_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp11_;
			gint _tmp12_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp13_;
			gpointer _tmp14_;
			BirdFontTool* _tmp15_;
			BirdFontTool* _tmp16_;
			BirdFontSpinButton* _tmp17_;
			BirdFontFont* _tmp18_;
			GeeArrayList* _tmp19_;
			BirdFontSpinButton* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			_t_index = _t_index + 1;
			_tmp11_ = _t_index;
			_tmp12_ = _t_size;
			if (!(_tmp11_ < _tmp12_)) {
				break;
			}
			_tmp13_ = _t_list;
			_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _t_index);
			t = (BirdFontTool*) _tmp14_;
			_tmp15_ = t;
			g_return_if_fail (BIRD_FONT_IS_SPIN_BUTTON (_tmp15_));
			_tmp16_ = t;
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
			_g_object_unref0 (w);
			w = _tmp17_;
			_tmp18_ = font;
			_tmp19_ = _tmp18_->grid_width;
			_tmp20_ = w;
			_tmp21_ = bird_font_spin_button_get_display_value (_tmp20_);
			_tmp22_ = _tmp21_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp22_);
			_g_free0 (_tmp22_);
			_g_object_unref0 (t);
		}
	}
	_g_object_unref0 (w);
	_g_object_unref0 (font);
}

static void
___lambda291__bird_font_spin_button_new_value_action (BirdFontSpinButton* _sender,
                                                      BirdFontSpinButton* selected,
                                                      gpointer self)
{
	__lambda291_ (self, selected);
}

static void
__lambda292_ (BirdFontTool* _self_)
{
	BirdFontSpinButton* sb = NULL;
	BirdFontSpinButton* _tmp0_;
	g_return_if_fail (_self_ != NULL);
	g_return_if_fail (BIRD_FONT_IS_SPIN_BUTTON (_self_));
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_self_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
	sb = _tmp0_;
	bird_font_grid_tool_set_grid_width (bird_font_spin_button_get_value (sb));
	bird_font_glyph_canvas_redraw ();
	_g_object_unref0 (sb);
}

static void
___lambda292__bird_font_tool_select_action (BirdFontTool* _sender,
                                            BirdFontTool* selected,
                                            gpointer self)
{
	__lambda292_ (selected);
}

BirdFontSpinButton*
bird_font_drawing_tools_add_new_grid (gdouble size,
                                      gboolean update_settings_in_font)
{
	Block14Data* _data14_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	BirdFontSpinButton* _tmp2_;
	BirdFontSpinButton* _tmp3_;
	BirdFontToolbox* tb = NULL;
	BirdFontToolbox* _tmp4_;
	BirdFontSpinButton* _tmp5_;
	BirdFontSpinButton* _tmp6_;
	BirdFontSpinButton* _tmp7_;
	BirdFontExpander* _tmp8_;
	BirdFontExpander* _tmp9_;
	BirdFontSpinButton* _tmp10_;
	BirdFontToolbox* _tmp11_;
	BirdFontToolbox* _tmp12_;
	BirdFontToolbox* _tmp13_;
	BirdFontSpinButton* _tmp14_;
	BirdFontSpinButton* _tmp15_;
	BirdFontSpinButton* _tmp36_;
	BirdFontSpinButton* _tmp37_;
	BirdFontSpinButton* result;
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_tmp0_ = bird_font_t_ ("Set size for grid");
	_tmp1_ = _tmp0_;
	_tmp2_ = bird_font_spin_button_new ("grid_width", _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	_data14_->grid_width = _tmp3_;
	_tmp4_ = bird_font_main_window_get_toolbox ();
	tb = _tmp4_;
	_tmp5_ = _data14_->grid_width;
	bird_font_spin_button_set_value_round (_tmp5_, size, TRUE, TRUE);
	_tmp6_ = _data14_->grid_width;
	g_signal_connect_data (_tmp6_, "new-value-action", (GCallback) ___lambda291__bird_font_spin_button_new_value_action, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_tmp7_ = _data14_->grid_width;
	g_signal_connect ((BirdFontTool*) _tmp7_, "select-action", (GCallback) ___lambda292__bird_font_tool_select_action, NULL);
	_tmp8_ = bird_font_drawing_tools_get_grid_expander ();
	_tmp9_ = _tmp8_;
	_tmp10_ = _data14_->grid_width;
	bird_font_expander_add_tool (_tmp9_, (BirdFontTool*) _tmp10_, -1);
	_tmp11_ = tb;
	bird_font_toolbox_update_expanders (_tmp11_);
	_tmp12_ = tb;
	g_signal_emit_by_name (_tmp12_, "redraw", 0, 0, bird_font_toolbox_allocation_width, bird_font_toolbox_allocation_height);
	_tmp13_ = tb;
	_tmp14_ = _data14_->grid_width;
	bird_font_toolbox_select_tool (_tmp13_, (BirdFontTool*) _tmp14_);
	_tmp15_ = _data14_->grid_width;
	bird_font_tool_set_active ((BirdFontTool*) _tmp15_, FALSE);
	if (update_settings_in_font) {
		GeeArrayList* _tmp16_;
		BirdFontSpinButton* _tmp17_;
		_tmp16_ = bird_font_grid_tool_sizes;
		_tmp17_ = _data14_->grid_width;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp17_);
		{
			GeeArrayList* _t_list = NULL;
			BirdFontExpander* _tmp18_;
			BirdFontExpander* _tmp19_;
			GeeArrayList* _tmp20_;
			gint _t_size = 0;
			GeeArrayList* _tmp21_;
			gint _tmp22_;
			gint _tmp23_;
			gint _t_index = 0;
			_tmp18_ = bird_font_drawing_tools_get_grid_expander ();
			_tmp19_ = _tmp18_;
			_tmp20_ = _tmp19_->tool;
			_t_list = _tmp20_;
			_tmp21_ = _t_list;
			_tmp22_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp21_);
			_tmp23_ = _tmp22_;
			_t_size = _tmp23_;
			_t_index = -1;
			while (TRUE) {
				gint _tmp24_;
				gint _tmp25_;
				BirdFontTool* t = NULL;
				GeeArrayList* _tmp26_;
				gpointer _tmp27_;
				BirdFontSpinButton* sb = NULL;
				BirdFontTool* _tmp28_;
				BirdFontSpinButton* _tmp29_;
				BirdFontFont* _tmp30_;
				BirdFontFont* _tmp31_;
				GeeArrayList* _tmp32_;
				BirdFontSpinButton* _tmp33_;
				gchar* _tmp34_;
				gchar* _tmp35_;
				_t_index = _t_index + 1;
				_tmp24_ = _t_index;
				_tmp25_ = _t_size;
				if (!(_tmp24_ < _tmp25_)) {
					break;
				}
				_tmp26_ = _t_list;
				_tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp26_, _t_index);
				t = (BirdFontTool*) _tmp27_;
				_tmp28_ = t;
				_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
				sb = _tmp29_;
				_tmp30_ = bird_font_bird_font_get_current_font ();
				_tmp31_ = _tmp30_;
				_tmp32_ = _tmp31_->grid_width;
				_tmp33_ = sb;
				_tmp34_ = bird_font_spin_button_get_display_value (_tmp33_);
				_tmp35_ = _tmp34_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp35_);
				_g_free0 (_tmp35_);
				_g_object_unref0 (_tmp31_);
				_g_object_unref0 (sb);
				_g_object_unref0 (t);
			}
		}
	}
	_tmp36_ = _data14_->grid_width;
	_tmp37_ = _g_object_ref0 (_tmp36_);
	result = _tmp37_;
	_g_object_unref0 (tb);
	block14_data_unref (_data14_);
	_data14_ = NULL;
	return result;
}

void
bird_font_drawing_tools_remove_current_grid (BirdFontDrawingTools* self)
{
	BirdFontTool* grid_width = NULL;
	BirdFontToolbox* tb = NULL;
	BirdFontToolbox* _tmp0_;
	BirdFontExpander* _tmp20_;
	BirdFontExpander* _tmp21_;
	GeeArrayList* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	BirdFontToolbox* _tmp37_;
	BirdFontToolbox* _tmp38_;
	BirdFontToolbox* _tmp39_;
	g_return_if_fail (self != NULL);
	_tmp0_ = bird_font_main_window_get_toolbox ();
	tb = _tmp0_;
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp1_;
		BirdFontExpander* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _t_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _t_index = 0;
		_tmp1_ = bird_font_drawing_tools_get_grid_expander ();
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_->tool;
		_t_list = _tmp3_;
		_tmp4_ = _t_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_t_size = _tmp6_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			gboolean _tmp11_ = FALSE;
			BirdFontTool* _tmp12_;
			_t_index = _t_index + 1;
			_tmp7_ = _t_index;
			_tmp8_ = _t_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _t_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _t_index);
			t = (BirdFontTool*) _tmp10_;
			_tmp12_ = t;
			if (bird_font_tool_is_selected (_tmp12_)) {
				BirdFontTool* _tmp13_;
				_tmp13_ = t;
				_tmp11_ = BIRD_FONT_IS_SPIN_BUTTON (_tmp13_);
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				GeeArrayList* _tmp14_;
				BirdFontTool* _tmp15_;
				BirdFontExpander* _tmp16_;
				BirdFontExpander* _tmp17_;
				GeeArrayList* _tmp18_;
				BirdFontTool* _tmp19_;
				_tmp14_ = bird_font_grid_tool_sizes;
				_tmp15_ = t;
				gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp14_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, BIRD_FONT_TYPE_SPIN_BUTTON, BirdFontSpinButton));
				_tmp16_ = bird_font_drawing_tools_get_grid_expander ();
				_tmp17_ = _tmp16_;
				_tmp18_ = _tmp17_->tool;
				_tmp19_ = t;
				gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp18_, _tmp19_);
				_g_object_unref0 (t);
				break;
			}
			_g_object_unref0 (t);
		}
	}
	_tmp20_ = bird_font_drawing_tools_get_grid_expander ();
	_tmp21_ = _tmp20_;
	_tmp22_ = _tmp21_->tool;
	_tmp23_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp22_);
	_tmp24_ = _tmp23_;
	if (_tmp24_ > 0) {
		BirdFontExpander* _tmp25_;
		BirdFontExpander* _tmp26_;
		GeeArrayList* _tmp27_;
		BirdFontExpander* _tmp28_;
		BirdFontExpander* _tmp29_;
		GeeArrayList* _tmp30_;
		gint _tmp31_;
		gint _tmp32_;
		gpointer _tmp33_;
		BirdFontToolbox* _tmp34_;
		BirdFontTool* _tmp35_;
		BirdFontTool* _tmp36_;
		_tmp25_ = bird_font_drawing_tools_get_grid_expander ();
		_tmp26_ = _tmp25_;
		_tmp27_ = _tmp26_->tool;
		_tmp28_ = bird_font_drawing_tools_get_grid_expander ();
		_tmp29_ = _tmp28_;
		_tmp30_ = _tmp29_->tool;
		_tmp31_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp27_, _tmp32_ - 1);
		_g_object_unref0 (grid_width);
		grid_width = (BirdFontTool*) _tmp33_;
		_tmp34_ = tb;
		_tmp35_ = grid_width;
		bird_font_toolbox_select_tool (_tmp34_, _tmp35_);
		_tmp36_ = grid_width;
		bird_font_tool_set_active (_tmp36_, FALSE);
	}
	_tmp37_ = bird_font_main_window_get_toolbox ();
	_tmp38_ = _tmp37_;
	bird_font_toolbox_update_expanders (_tmp38_);
	_g_object_unref0 (_tmp38_);
	_tmp39_ = tb;
	g_signal_emit_by_name (_tmp39_, "redraw", 0, 0, bird_font_toolbox_allocation_width, bird_font_toolbox_allocation_height);
	_g_object_unref0 (tb);
	_g_object_unref0 (grid_width);
}

static void
bird_font_drawing_tools_add_expander (BirdFontDrawingTools* self,
                                      BirdFontExpander* e)
{
	GeeArrayList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (e != NULL);
	_tmp0_ = self->expanders;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, e);
}

static GeeArrayList*
bird_font_drawing_tools_real_get_displays (BirdFontToolCollection* base)
{
	BirdFontDrawingTools * self;
	GeeArrayList* d = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
	self = (BirdFontDrawingTools*) base;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	d = _tmp0_;
	gee_abstract_collection_add ((GeeAbstractCollection*) d, "Glyph");
	result = d;
	return result;
}

void
bird_font_drawing_tools_update_layers (void)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontGlyph* g = NULL;
	BirdFontGlyph* _tmp2_;
	gint i = 0;
	BirdFontExpander* _tmp3_;
	BirdFontExpander* _tmp4_;
	GeeArrayList* _tmp5_;
	BirdFontToolbox* _tmp24_;
	BirdFontToolbox* _tmp25_;
	BirdFontExpander* _tmp26_;
	BirdFontExpander* _tmp27_;
	BirdFontExpander* _tmp28_;
	BirdFontExpander* _tmp29_;
	_tmp0_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (!bird_font_is_null (_tmp1_), "!is_null (layer_tools)");
	_tmp2_ = bird_font_main_window_get_current_glyph ();
	g = _tmp2_;
	i = 0;
	_tmp3_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_->tool;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp5_);
	{
		GeeArrayList* _layer_list = NULL;
		BirdFontGlyph* _tmp6_;
		BirdFontLayer* _tmp7_;
		GeeArrayList* _tmp8_;
		gint _layer_size = 0;
		GeeArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _layer_index = 0;
		_tmp6_ = g;
		_tmp7_ = _tmp6_->layers;
		_tmp8_ = _tmp7_->subgroups;
		_layer_list = _tmp8_;
		_tmp9_ = _layer_list;
		_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_layer_size = _tmp11_;
		_layer_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			BirdFontLayer* layer = NULL;
			GeeArrayList* _tmp14_;
			gpointer _tmp15_;
			BirdFontLayerLabel* label = NULL;
			BirdFontLayer* _tmp16_;
			BirdFontLayerLabel* _tmp17_;
			BirdFontExpander* _tmp18_;
			BirdFontExpander* _tmp19_;
			BirdFontLayerLabel* _tmp20_;
			BirdFontGlyph* _tmp21_;
			gint _tmp23_;
			_layer_index = _layer_index + 1;
			_tmp12_ = _layer_index;
			_tmp13_ = _layer_size;
			if (!(_tmp12_ < _tmp13_)) {
				break;
			}
			_tmp14_ = _layer_list;
			_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _layer_index);
			layer = (BirdFontLayer*) _tmp15_;
			_tmp16_ = layer;
			_tmp17_ = bird_font_layer_label_new (_tmp16_);
			label = _tmp17_;
			_tmp18_ = bird_font_drawing_tools_get_layer_tools ();
			_tmp19_ = _tmp18_;
			_tmp20_ = label;
			bird_font_expander_add_tool (_tmp19_, (BirdFontTool*) _tmp20_, 0);
			_tmp21_ = g;
			if (i == _tmp21_->current_layer) {
				BirdFontLayerLabel* _tmp22_;
				_tmp22_ = label;
				bird_font_layer_label_select_layer (_tmp22_);
			}
			_tmp23_ = i;
			i = _tmp23_ + 1;
			_g_object_unref0 (label);
			_g_object_unref0 (layer);
		}
	}
	_tmp24_ = bird_font_main_window_get_toolbox ();
	_tmp25_ = _tmp24_;
	bird_font_toolbox_update_expanders (_tmp25_);
	_g_object_unref0 (_tmp25_);
	_tmp26_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp27_ = _tmp26_;
	bird_font_expander_clear_cache (_tmp27_);
	_tmp28_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp29_ = _tmp28_;
	bird_font_expander_redraw (_tmp29_);
	bird_font_toolbox_redraw_tool_box ();
	_g_object_unref0 (g);
}

void
bird_font_drawing_tools_deselect_layers (void)
{
	BirdFontExpander* _tmp0_;
	BirdFontExpander* _tmp1_;
	BirdFontLayerLabel* l = NULL;
	_tmp0_ = bird_font_drawing_tools_get_layer_tools ();
	_tmp1_ = _tmp0_;
	_vala_return_if_fail (!bird_font_is_null (_tmp1_), "!is_null (layer_tools)");
	{
		GeeArrayList* _t_list = NULL;
		BirdFontExpander* _tmp2_;
		BirdFontExpander* _tmp3_;
		GeeArrayList* _tmp4_;
		gint _t_size = 0;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _t_index = 0;
		_tmp2_ = bird_font_drawing_tools_get_layer_tools ();
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_->tool;
		_t_list = _tmp4_;
		_tmp5_ = _t_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_t_size = _tmp7_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			BirdFontTool* t = NULL;
			GeeArrayList* _tmp10_;
			gpointer _tmp11_;
			BirdFontTool* _tmp12_;
			_t_index = _t_index + 1;
			_tmp8_ = _t_index;
			_tmp9_ = _t_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _t_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _t_index);
			t = (BirdFontTool*) _tmp11_;
			_tmp12_ = t;
			if (BIRD_FONT_IS_LAYER_LABEL (_tmp12_)) {
				BirdFontTool* _tmp13_;
				BirdFontLayerLabel* _tmp14_;
				BirdFontLayerLabel* _tmp15_;
				_tmp13_ = t;
				_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, BIRD_FONT_TYPE_LAYER_LABEL, BirdFontLayerLabel));
				_g_object_unref0 (l);
				l = _tmp14_;
				_tmp15_ = l;
				bird_font_layer_label_set_selected_layer (_tmp15_, FALSE);
			}
			_g_object_unref0 (t);
		}
	}
	_g_object_unref0 (l);
}

void
bird_font_drawing_tools_set_stroke_tool_visibility (void)
{
	BirdFontSpinButton* _tmp0_;
	BirdFontTool* _tmp1_;
	BirdFontTool* _tmp2_;
	BirdFontTool* _tmp3_;
	BirdFontExpander* _tmp4_;
	BirdFontExpander* _tmp5_;
	BirdFontExpander* _tmp6_;
	BirdFontExpander* _tmp7_;
	BirdFontToolbox* _tmp8_;
	BirdFontToolbox* _tmp9_;
	_tmp0_ = bird_font_drawing_tools_object_stroke;
	((BirdFontTool*) _tmp0_)->visible = bird_font_stroke_tool_add_stroke;
	_tmp1_ = bird_font_drawing_tools_line_cap_butt;
	_tmp1_->visible = bird_font_stroke_tool_add_stroke;
	_tmp2_ = bird_font_drawing_tools_line_cap_round;
	_tmp2_->visible = bird_font_stroke_tool_add_stroke;
	_tmp3_ = bird_font_drawing_tools_line_cap_square;
	_tmp3_->visible = bird_font_stroke_tool_add_stroke;
	_tmp4_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp5_ = _tmp4_;
	bird_font_expander_clear_cache (_tmp5_);
	_tmp6_ = bird_font_drawing_tools_get_stroke_expander ();
	_tmp7_ = _tmp6_;
	bird_font_expander_redraw (_tmp7_);
	_tmp8_ = bird_font_main_window_get_toolbox ();
	_tmp9_ = _tmp8_;
	bird_font_toolbox_update_expanders (_tmp9_);
	_g_object_unref0 (_tmp9_);
}

BirdFontExpander*
bird_font_drawing_tools_get_draw_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__draw_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_draw_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__draw_tools);
	bird_font_drawing_tools__draw_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_grid_expander (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__grid_expander;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_grid_expander (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__grid_expander);
	bird_font_drawing_tools__grid_expander = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_shape_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__shape_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_shape_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__shape_tools);
	bird_font_drawing_tools__shape_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_draw_tool_modifiers (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__draw_tool_modifiers;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_draw_tool_modifiers (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__draw_tool_modifiers);
	bird_font_drawing_tools__draw_tool_modifiers = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_layer_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__layer_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_layer_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__layer_tools);
	bird_font_drawing_tools__layer_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_layer_settings (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__layer_settings;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_layer_settings (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__layer_settings);
	bird_font_drawing_tools__layer_settings = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_stroke_expander (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__stroke_expander;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_stroke_expander (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__stroke_expander);
	bird_font_drawing_tools__stroke_expander = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_zoombar_tool (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__zoombar_tool;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_zoombar_tool (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__zoombar_tool);
	bird_font_drawing_tools__zoombar_tool = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_guideline_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__guideline_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_guideline_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__guideline_tools);
	bird_font_drawing_tools__guideline_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_font_name (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__font_name;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_font_name (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__font_name);
	bird_font_drawing_tools__font_name = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_key_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__key_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_key_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__key_tools);
	bird_font_drawing_tools__key_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_test_tools (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__test_tools;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_test_tools (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__test_tools);
	bird_font_drawing_tools__test_tools = _tmp0_;
}

BirdFontExpander*
bird_font_drawing_tools_get_grid (void)
{
	BirdFontExpander* result;
	BirdFontExpander* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__grid;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_grid (BirdFontExpander* value)
{
	BirdFontExpander* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__grid);
	bird_font_drawing_tools__grid = _tmp0_;
}

BirdFontTool*
bird_font_drawing_tools_get_add_stroke (void)
{
	BirdFontTool* result;
	BirdFontTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__add_stroke;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_add_stroke (BirdFontTool* value)
{
	BirdFontTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__add_stroke);
	bird_font_drawing_tools__add_stroke = _tmp0_;
}

BirdFontMoveTool*
bird_font_drawing_tools_get_move_tool (void)
{
	BirdFontMoveTool* result;
	BirdFontMoveTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__move_tool;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_move_tool (BirdFontMoveTool* value)
{
	BirdFontMoveTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__move_tool);
	bird_font_drawing_tools__move_tool = _tmp0_;
}

BirdFontTool*
bird_font_drawing_tools_get_help_lines (void)
{
	BirdFontTool* result;
	BirdFontTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__help_lines;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_help_lines (BirdFontTool* value)
{
	BirdFontTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__help_lines);
	bird_font_drawing_tools__help_lines = _tmp0_;
}

BirdFontTool*
bird_font_drawing_tools_get_xheight_help_lines (void)
{
	BirdFontTool* result;
	BirdFontTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__xheight_help_lines;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_xheight_help_lines (BirdFontTool* value)
{
	BirdFontTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__xheight_help_lines);
	bird_font_drawing_tools__xheight_help_lines = _tmp0_;
}

BirdFontTool*
bird_font_drawing_tools_get_background_help_lines (void)
{
	BirdFontTool* result;
	BirdFontTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__background_help_lines;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_background_help_lines (BirdFontTool* value)
{
	BirdFontTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__background_help_lines);
	bird_font_drawing_tools__background_help_lines = _tmp0_;
}

BirdFontGridTool*
bird_font_drawing_tools_get_show_grid (void)
{
	BirdFontGridTool* result;
	BirdFontGridTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__show_grid;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_show_grid (BirdFontGridTool* value)
{
	BirdFontGridTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__show_grid);
	bird_font_drawing_tools__show_grid = _tmp0_;
}

BirdFontTool*
bird_font_drawing_tools_get_lock_grid (void)
{
	BirdFontTool* result;
	BirdFontTool* _tmp0_;
	_tmp0_ = bird_font_drawing_tools__lock_grid;
	result = _tmp0_;
	return result;
}

void
bird_font_drawing_tools_set_lock_grid (BirdFontTool* value)
{
	BirdFontTool* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (bird_font_drawing_tools__lock_grid);
	bird_font_drawing_tools__lock_grid = _tmp0_;
}

static void
bird_font_drawing_tools_class_init (BirdFontDrawingToolsClass * klass,
                                    gpointer klass_data)
{
	bird_font_drawing_tools_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BirdFontDrawingTools_private_offset);
	((BirdFontToolCollectionClass *) klass)->reset_selection = (void (*) (BirdFontToolCollection*, BirdFontTool*)) bird_font_drawing_tools_real_reset_selection;
	((BirdFontToolCollectionClass *) klass)->get_expanders = (GeeArrayList* (*) (BirdFontToolCollection*)) bird_font_drawing_tools_real_get_expanders;
	((BirdFontToolCollectionClass *) klass)->get_displays = (GeeArrayList* (*) (BirdFontToolCollection*)) bird_font_drawing_tools_real_get_displays;
	G_OBJECT_CLASS (klass)->get_property = _vala_bird_font_drawing_tools_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_bird_font_drawing_tools_set_property;
	G_OBJECT_CLASS (klass)->finalize = bird_font_drawing_tools_finalize;
}

static void
bird_font_drawing_tools_instance_init (BirdFontDrawingTools * self,
                                       gpointer klass)
{
	GeeArrayList* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	BirdFontText* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	BirdFontText* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	BirdFontText* _tmp9_;
	self->priv = bird_font_drawing_tools_get_instance_private (self);
	_tmp0_ = gee_array_list_new (BIRD_FONT_TYPE_EXPANDER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->expanders = _tmp0_;
	_tmp1_ = bird_font_t_ ("Background Tools");
	_tmp2_ = _tmp1_;
	_tmp3_ = bird_font_text_new (_tmp2_, (gdouble) 17, (gdouble) 0);
	self->priv->backgrounds_headline = _tmp3_;
	_g_free0 (_tmp2_);
	_tmp4_ = bird_font_t_ ("Control Points");
	_tmp5_ = _tmp4_;
	_tmp6_ = bird_font_text_new (_tmp5_, (gdouble) 17, (gdouble) 0);
	self->priv->control_points_headline = _tmp6_;
	_g_free0 (_tmp5_);
	_tmp7_ = bird_font_t_ ("Object Tools");
	_tmp8_ = _tmp7_;
	_tmp9_ = bird_font_text_new (_tmp8_, (gdouble) 17, (gdouble) 0);
	self->priv->object_tools_headline = _tmp9_;
	_g_free0 (_tmp8_);
}

static void
bird_font_drawing_tools_finalize (GObject * obj)
{
	BirdFontDrawingTools * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_DRAWING_TOOLS, BirdFontDrawingTools);
	_g_object_unref0 (self->priv->glyph_canvas);
	_g_object_unref0 (self->expanders);
	_g_object_unref0 (self->priv->outline);
	_g_object_unref0 (self->priv->point_tool);
	_g_object_unref0 (self->priv->show_bg);
	_g_object_unref0 (self->priv->bg_selection);
	_g_object_unref0 (self->priv->high_contrast_background);
	_g_object_unref0 (self->priv->auto_trace);
	_g_object_unref0 (self->priv->delete_background);
	_g_object_unref0 (self->priv->rectangle);
	_g_object_unref0 (self->priv->circle);
	_g_object_unref0 (self->priv->x_coordinate);
	_g_object_unref0 (self->priv->y_coordinate);
	_g_object_unref0 (self->priv->rotation);
	_g_object_unref0 (self->priv->width);
	_g_object_unref0 (self->priv->height);
	_g_object_unref0 (self->priv->tie_handles);
	_g_object_unref0 (self->priv->reflect_handle);
	_g_object_unref0 (self->priv->create_line);
	_g_object_unref0 (self->priv->close_path_tool);
	_g_object_unref0 (self->priv->delete_button);
	_g_object_unref0 (self->insert_point_on_path_tool);
	_g_object_unref0 (self->priv->undo_tool);
	_g_object_unref0 (self->priv->select_all_button);
	_g_object_unref0 (self->priv->reverse_path_tool);
	_g_object_unref0 (self->priv->move_layer);
	_g_object_unref0 (self->priv->flip_vertical);
	_g_object_unref0 (self->priv->flip_horizontal);
	_g_object_unref0 (self->priv->full_height_tool);
	_g_object_unref0 (self->zoom_bar);
	_g_object_unref0 (self->priv->backgrounds_headline);
	_g_object_unref0 (self->priv->control_points_headline);
	_g_object_unref0 (self->priv->object_tools_headline);
	G_OBJECT_CLASS (bird_font_drawing_tools_parent_class)->finalize (obj);
}

static GType
bird_font_drawing_tools_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontDrawingToolsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_drawing_tools_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontDrawingTools), 0, (GInstanceInitFunc) bird_font_drawing_tools_instance_init, NULL };
	GType bird_font_drawing_tools_type_id;
	bird_font_drawing_tools_type_id = g_type_register_static (BIRD_FONT_TYPE_TOOL_COLLECTION, "BirdFontDrawingTools", &g_define_type_info, 0);
	BirdFontDrawingTools_private_offset = g_type_add_instance_private (bird_font_drawing_tools_type_id, sizeof (BirdFontDrawingToolsPrivate));
	return bird_font_drawing_tools_type_id;
}

GType
bird_font_drawing_tools_get_type (void)
{
	static volatile gsize bird_font_drawing_tools_type_id__once = 0;
	if (g_once_init_enter (&bird_font_drawing_tools_type_id__once)) {
		GType bird_font_drawing_tools_type_id;
		bird_font_drawing_tools_type_id = bird_font_drawing_tools_get_type_once ();
		g_once_init_leave (&bird_font_drawing_tools_type_id__once, bird_font_drawing_tools_type_id);
	}
	return bird_font_drawing_tools_type_id__once;
}

static void
_vala_bird_font_drawing_tools_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	BirdFontDrawingTools * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BIRD_FONT_TYPE_DRAWING_TOOLS, BirdFontDrawingTools);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_bird_font_drawing_tools_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	BirdFontDrawingTools * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BIRD_FONT_TYPE_DRAWING_TOOLS, BirdFontDrawingTools);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

