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

/* SPDX-License-Identifier: GPL-3.0-or-later*/

#include <gtk/gtk.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "graphs.h"
#include <adwaita.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <gio/gio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	GRAPHS_STYLE_EDITOR_BOX_0_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_STYLE_NAME_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_FONT_CHOOSER_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TITLESIZE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_LABELSIZE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_LINESTYLE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_LINEWIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MARKERS_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MARKERSIZE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_AXIS_WIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_DRAW_FRAME_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_DIRECTION_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MINOR_TICKS_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_WIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_WIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_LENGTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_LENGTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_LABELS_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_BOTTOM_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_LEFT_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_RIGHT_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_TOP_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_SHOW_GRID_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_GRID_LINEWIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_GRID_OPACITY_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_VALUE_PADDING_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_LABEL_PADDING_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TITLE_PADDING_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TEXT_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_TICK_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_AXIS_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_GRID_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_BACKGROUND_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_OUTLINE_COLOR_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPSIZE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPTHICK_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_LINEWIDTH_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_BARSABOVE_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY,
	GRAPHS_STYLE_EDITOR_BOX_NUM_PROPERTIES
};
static GParamSpec* graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_GdkRGBA_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkRGBA_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GraphsStyleEditorBoxAddColorData GraphsStyleEditorBoxAddColorData;
typedef struct _GraphsStyleEditorBoxAddErrbarColorData GraphsStyleEditorBoxAddErrbarColorData;
enum  {
	GRAPHS_STYLE_EDITOR_BOX_PARAMS_CHANGED_SIGNAL,
	GRAPHS_STYLE_EDITOR_BOX_NUM_SIGNALS
};
static guint graphs_style_editor_box_signals[GRAPHS_STYLE_EDITOR_BOX_NUM_SIGNALS] = {0};

struct _GraphsStyleEditorBoxPrivate {
	AdwEntryRow* _style_name;
	GtkFontDialogButton* _font_chooser;
	GtkScale* _titlesize;
	GtkScale* _labelsize;
	AdwComboRow* _linestyle;
	GtkScale* _linewidth;
	AdwComboRow* _markers;
	GtkScale* _markersize;
	GtkScale* _axis_width;
	AdwSwitchRow* _draw_frame;
	AdwComboRow* _tick_direction;
	AdwSwitchRow* _minor_ticks;
	GtkScale* _major_tick_width;
	GtkScale* _minor_tick_width;
	GtkScale* _major_tick_length;
	GtkScale* _minor_tick_length;
	AdwSwitchRow* _tick_labels;
	AdwSwitchRow* _tick_bottom;
	AdwSwitchRow* _tick_left;
	AdwSwitchRow* _tick_right;
	AdwSwitchRow* _tick_top;
	AdwSwitchRow* _show_grid;
	GtkScale* _grid_linewidth;
	GtkScale* _grid_opacity;
	GtkScale* _value_padding;
	GtkScale* _label_padding;
	GtkScale* _title_padding;
	GraphsStyleColorRow* _text_color;
	GraphsStyleColorRow* _tick_color;
	GraphsStyleColorRow* _axis_color;
	GraphsStyleColorRow* _grid_color;
	GraphsStyleColorRow* _background_color;
	GraphsStyleColorRow* _outline_color;
	GtkListBox* _line_colors_box;
	GtkListBox* _errbar_line_colors_box;
	GtkBox* _poor_contrast_warning;
	GtkScale* _errorbar_capsize;
	GtkScale* _errorbar_capthick;
	GtkScale* _errorbar_linewidth;
	AdwSwitchRow* _errorbar_barsabove;
	GraphsStyleColorManager* _color_manager;
	GraphsStyleColorManager* _errbar_color_manager;
	GtkWindow* _window;
};

struct _GraphsStyleEditorBoxAddColorData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GraphsStyleEditorBox* self;
	GtkColorDialog* dialog;
	GtkColorDialog* _tmp0_;
	GdkRGBA color;
	GtkWindow* _tmp1_;
	GdkRGBA* _tmp2_;
	GdkRGBA* _tmp3_;
	GdkRGBA _tmp4_;
	gchar* hex;
	GdkRGBA _tmp5_;
	gchar* _tmp6_;
	GraphsStyleColorManager* _tmp7_;
	const gchar* _tmp8_;
	GError* _inner_error0_;
};

struct _GraphsStyleEditorBoxAddErrbarColorData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GraphsStyleEditorBox* self;
	GtkColorDialog* dialog;
	GtkColorDialog* _tmp0_;
	GdkRGBA color;
	GtkWindow* _tmp1_;
	GdkRGBA* _tmp2_;
	GdkRGBA* _tmp3_;
	GdkRGBA _tmp4_;
	gchar* hex;
	GdkRGBA _tmp5_;
	gchar* _tmp6_;
	GraphsStyleColorManager* _tmp7_;
	const gchar* _tmp8_;
	GError* _inner_error0_;
};

static gint GraphsStyleEditorBox_private_offset;
static gpointer graphs_style_editor_box_parent_class = NULL;

VALA_EXTERN gchar* graphs_title_format_function (GtkScale* scale,
                                     gdouble value);
static GtkBox* graphs_style_editor_box_get_poor_contrast_warning (GraphsStyleEditorBox* self);
static void graphs_style_editor_box_on_linestyle (GraphsStyleEditorBox* self);
static void _graphs_style_editor_box_on_linestyle_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void graphs_style_editor_box_on_markers (GraphsStyleEditorBox* self);
static void _graphs_style_editor_box_on_markers_g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self);
static void graphs_style_editor_box_add_color_data_free (gpointer _data);
static void graphs_style_editor_box_add_color (GraphsStyleEditorBox* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
static void graphs_style_editor_box_add_color_finish (GraphsStyleEditorBox* self,
                                               GAsyncResult* _res_);
static gboolean graphs_style_editor_box_add_color_co (GraphsStyleEditorBoxAddColorData* _data_);
static void graphs_style_editor_box_add_color_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_);
static void _vala_GdkRGBA_free (GdkRGBA* self);
static void _graphs_style_editor_box_add_color_gtk_button_clicked (GtkButton* _sender,
                                                            gpointer self);
static void graphs_style_editor_box_add_errbar_color_data_free (gpointer _data);
static void graphs_style_editor_box_add_errbar_color (GraphsStyleEditorBox* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void graphs_style_editor_box_add_errbar_color_finish (GraphsStyleEditorBox* self,
                                                      GAsyncResult* _res_);
static gboolean graphs_style_editor_box_add_errbar_color_co (GraphsStyleEditorBoxAddErrbarColorData* _data_);
static void graphs_style_editor_box_add_errbar_color_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void _graphs_style_editor_box_add_errbar_color_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self);
static GtkListBox* graphs_style_editor_box_get_line_colors_box (GraphsStyleEditorBox* self);
static GtkListBox* graphs_style_editor_box_get_errbar_line_colors_box (GraphsStyleEditorBox* self);
static GObject * graphs_style_editor_box_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
static gchar* _graphs_title_format_function_gtk_scale_format_value_func (GtkScale* scale,
                                                                  gdouble value,
                                                                  gpointer self);
static void graphs_style_editor_box_finalize (GObject * obj);
static GType graphs_style_editor_box_get_type_once (void);
static void _vala_graphs_style_editor_box_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_graphs_style_editor_box_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gchar*
graphs_title_format_function (GtkScale* scale,
                              gdouble value)
{
	gdouble percentage = 0.0;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (scale != NULL, NULL);
	percentage = (value / 2.0) * 100.0;
	_tmp0_ = g_strdup_printf ("%d%%", (gint) percentage);
	result = _tmp0_;
	return result;
}

static inline gpointer
graphs_style_editor_box_get_instance_private (GraphsStyleEditorBox* self)
{
	return G_STRUCT_MEMBER_P (self, GraphsStyleEditorBox_private_offset);
}

void
graphs_style_editor_box_check_contrast (GraphsStyleEditorBox* self)
{
	gdouble contrast = 0.0;
	GraphsStyleColorRow* _tmp0_;
	GdkRGBA _tmp1_ = {0};
	GdkRGBA _tmp2_;
	GraphsStyleColorRow* _tmp3_;
	GdkRGBA _tmp4_ = {0};
	GdkRGBA _tmp5_;
	GtkBox* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_outline_color;
	graphs_style_color_row_get_color (_tmp0_, &_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_text_color;
	graphs_style_color_row_get_color (_tmp3_, &_tmp4_);
	_tmp5_ = _tmp4_;
	contrast = graphs_tools_get_contrast (&_tmp2_, &_tmp5_);
	_tmp6_ = self->priv->_poor_contrast_warning;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, contrast < 4.5);
}

static void
graphs_style_editor_box_on_linestyle (GraphsStyleEditorBox* self)
{
	GtkScale* _tmp0_;
	AdwComboRow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_linewidth;
	_tmp1_ = self->priv->_linestyle;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, adw_combo_row_get_selected (_tmp1_) != ((guint) 0));
}

static void
_graphs_style_editor_box_on_linestyle_g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	graphs_style_editor_box_on_linestyle ((GraphsStyleEditorBox*) self);
}

static void
graphs_style_editor_box_on_markers (GraphsStyleEditorBox* self)
{
	GtkScale* _tmp0_;
	AdwComboRow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_markersize;
	_tmp1_ = self->priv->_markers;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, adw_combo_row_get_selected (_tmp1_) != ((guint) 0));
}

static void
_graphs_style_editor_box_on_markers_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self)
{
	graphs_style_editor_box_on_markers ((GraphsStyleEditorBox*) self);
}

static void
graphs_style_editor_box_add_color_data_free (gpointer _data)
{
	GraphsStyleEditorBoxAddColorData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (GraphsStyleEditorBoxAddColorData, _data_);
}

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

static void
graphs_style_editor_box_add_color (GraphsStyleEditorBox* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	GraphsStyleEditorBoxAddColorData* _data_;
	GraphsStyleEditorBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (GraphsStyleEditorBoxAddColorData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, graphs_style_editor_box_add_color_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	graphs_style_editor_box_add_color_co (_data_);
}

static void
graphs_style_editor_box_add_color_finish (GraphsStyleEditorBox* self,
                                          GAsyncResult* _res_)
{
	GraphsStyleEditorBoxAddColorData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
graphs_style_editor_box_add_color_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_)
{
	GraphsStyleEditorBoxAddColorData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	graphs_style_editor_box_add_color_co (_data_);
}

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

static gboolean
graphs_style_editor_box_add_color_co (GraphsStyleEditorBoxAddColorData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gtk_color_dialog_new ();
	gtk_color_dialog_set_with_alpha (_data_->_tmp0_, FALSE);
	_data_->dialog = _data_->_tmp0_;
	{
		_data_->_tmp1_ = _data_->self->priv->_window;
		_data_->_state_ = 1;
		gtk_color_dialog_choose_rgba (_data_->dialog, _data_->_tmp1_, NULL, NULL, graphs_style_editor_box_add_color_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp2_ = gtk_color_dialog_choose_rgba_finish (_data_->dialog, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = *_data_->_tmp3_;
		__vala_GdkRGBA_free0 (_data_->_tmp3_);
		_data_->color = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->color;
		_data_->_tmp6_ = graphs_tools_rgba_to_hex (&_data_->_tmp5_);
		_data_->hex = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->self->priv->_color_manager;
		_data_->_tmp8_ = _data_->hex;
		graphs_style_color_manager_add_color (_data_->_tmp7_, _data_->_tmp8_);
		_g_free0 (_data_->hex);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->dialog);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->dialog);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_graphs_style_editor_box_add_color_gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self)
{
	graphs_style_editor_box_add_color ((GraphsStyleEditorBox*) self, NULL, NULL);
}

static void
graphs_style_editor_box_add_errbar_color_data_free (gpointer _data)
{
	GraphsStyleEditorBoxAddErrbarColorData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (GraphsStyleEditorBoxAddErrbarColorData, _data_);
}

static void
graphs_style_editor_box_add_errbar_color (GraphsStyleEditorBox* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	GraphsStyleEditorBoxAddErrbarColorData* _data_;
	GraphsStyleEditorBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (GraphsStyleEditorBoxAddErrbarColorData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, graphs_style_editor_box_add_errbar_color_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	graphs_style_editor_box_add_errbar_color_co (_data_);
}

static void
graphs_style_editor_box_add_errbar_color_finish (GraphsStyleEditorBox* self,
                                                 GAsyncResult* _res_)
{
	GraphsStyleEditorBoxAddErrbarColorData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
graphs_style_editor_box_add_errbar_color_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	GraphsStyleEditorBoxAddErrbarColorData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	graphs_style_editor_box_add_errbar_color_co (_data_);
}

static gboolean
graphs_style_editor_box_add_errbar_color_co (GraphsStyleEditorBoxAddErrbarColorData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gtk_color_dialog_new ();
	gtk_color_dialog_set_with_alpha (_data_->_tmp0_, FALSE);
	_data_->dialog = _data_->_tmp0_;
	{
		_data_->_tmp1_ = _data_->self->priv->_window;
		_data_->_state_ = 1;
		gtk_color_dialog_choose_rgba (_data_->dialog, _data_->_tmp1_, NULL, NULL, graphs_style_editor_box_add_errbar_color_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp2_ = gtk_color_dialog_choose_rgba_finish (_data_->dialog, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = *_data_->_tmp3_;
		__vala_GdkRGBA_free0 (_data_->_tmp3_);
		_data_->color = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->color;
		_data_->_tmp6_ = graphs_tools_rgba_to_hex (&_data_->_tmp5_);
		_data_->hex = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->self->priv->_errbar_color_manager;
		_data_->_tmp8_ = _data_->hex;
		graphs_style_color_manager_add_color (_data_->_tmp7_, _data_->_tmp8_);
		_g_free0 (_data_->hex);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->dialog);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->dialog);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_graphs_style_editor_box_add_errbar_color_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self)
{
	graphs_style_editor_box_add_errbar_color ((GraphsStyleEditorBox*) self, NULL, NULL);
}

GraphsStyleEditorBox*
graphs_style_editor_box_construct (GType object_type)
{
	GraphsStyleEditorBox * self = NULL;
	self = (GraphsStyleEditorBox*) g_object_new (object_type, NULL);
	return self;
}

GraphsStyleEditorBox*
graphs_style_editor_box_new (void)
{
	return graphs_style_editor_box_construct (GRAPHS_TYPE_STYLE_EDITOR_BOX);
}

AdwEntryRow*
graphs_style_editor_box_get_style_name (GraphsStyleEditorBox* self)
{
	AdwEntryRow* result;
	AdwEntryRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_style_name;
	result = _tmp0_;
	return result;
}

GtkFontDialogButton*
graphs_style_editor_box_get_font_chooser (GraphsStyleEditorBox* self)
{
	GtkFontDialogButton* result;
	GtkFontDialogButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_font_chooser;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_titlesize (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_titlesize;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_labelsize (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_labelsize;
	result = _tmp0_;
	return result;
}

AdwComboRow*
graphs_style_editor_box_get_linestyle (GraphsStyleEditorBox* self)
{
	AdwComboRow* result;
	AdwComboRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_linestyle;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_linewidth (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_linewidth;
	result = _tmp0_;
	return result;
}

AdwComboRow*
graphs_style_editor_box_get_markers (GraphsStyleEditorBox* self)
{
	AdwComboRow* result;
	AdwComboRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_markers;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_markersize (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_markersize;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_axis_width (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_axis_width;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_draw_frame (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_draw_frame;
	result = _tmp0_;
	return result;
}

AdwComboRow*
graphs_style_editor_box_get_tick_direction (GraphsStyleEditorBox* self)
{
	AdwComboRow* result;
	AdwComboRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_direction;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_minor_ticks (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_minor_ticks;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_major_tick_width (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_major_tick_width;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_minor_tick_width (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_minor_tick_width;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_major_tick_length (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_major_tick_length;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_minor_tick_length (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_minor_tick_length;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_tick_labels (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_labels;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_tick_bottom (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_bottom;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_tick_left (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_left;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_tick_right (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_right;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_tick_top (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_top;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_show_grid (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_show_grid;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_grid_linewidth (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_grid_linewidth;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_grid_opacity (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_grid_opacity;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_value_padding (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value_padding;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_label_padding (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label_padding;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_title_padding (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title_padding;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_text_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text_color;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_tick_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tick_color;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_axis_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_axis_color;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_grid_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_grid_color;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_background_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_background_color;
	result = _tmp0_;
	return result;
}

GraphsStyleColorRow*
graphs_style_editor_box_get_outline_color (GraphsStyleEditorBox* self)
{
	GraphsStyleColorRow* result;
	GraphsStyleColorRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_outline_color;
	result = _tmp0_;
	return result;
}

static GtkListBox*
graphs_style_editor_box_get_line_colors_box (GraphsStyleEditorBox* self)
{
	GtkListBox* result;
	GtkListBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_line_colors_box;
	result = _tmp0_;
	return result;
}

static GtkListBox*
graphs_style_editor_box_get_errbar_line_colors_box (GraphsStyleEditorBox* self)
{
	GtkListBox* result;
	GtkListBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errbar_line_colors_box;
	result = _tmp0_;
	return result;
}

static GtkBox*
graphs_style_editor_box_get_poor_contrast_warning (GraphsStyleEditorBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_poor_contrast_warning;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_errorbar_capsize (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errorbar_capsize;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_errorbar_capthick (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errorbar_capthick;
	result = _tmp0_;
	return result;
}

GtkScale*
graphs_style_editor_box_get_errorbar_linewidth (GraphsStyleEditorBox* self)
{
	GtkScale* result;
	GtkScale* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errorbar_linewidth;
	result = _tmp0_;
	return result;
}

AdwSwitchRow*
graphs_style_editor_box_get_errorbar_barsabove (GraphsStyleEditorBox* self)
{
	AdwSwitchRow* result;
	AdwSwitchRow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errorbar_barsabove;
	result = _tmp0_;
	return result;
}

GraphsStyleColorManager*
graphs_style_editor_box_get_color_manager (GraphsStyleEditorBox* self)
{
	GraphsStyleColorManager* result;
	GraphsStyleColorManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_color_manager;
	result = _tmp0_;
	return result;
}

void
graphs_style_editor_box_set_color_manager (GraphsStyleEditorBox* self,
                                           GraphsStyleColorManager* value)
{
	GraphsStyleColorManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_style_editor_box_get_color_manager (self);
	if (old_value != value) {
		GraphsStyleColorManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_color_manager);
		self->priv->_color_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY]);
	}
}

GraphsStyleColorManager*
graphs_style_editor_box_get_errbar_color_manager (GraphsStyleEditorBox* self)
{
	GraphsStyleColorManager* result;
	GraphsStyleColorManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_errbar_color_manager;
	result = _tmp0_;
	return result;
}

void
graphs_style_editor_box_set_errbar_color_manager (GraphsStyleEditorBox* self,
                                                  GraphsStyleColorManager* value)
{
	GraphsStyleColorManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_style_editor_box_get_errbar_color_manager (self);
	if (old_value != value) {
		GraphsStyleColorManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_errbar_color_manager);
		self->priv->_errbar_color_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY]);
	}
}

GtkWindow*
graphs_style_editor_box_get_window (GraphsStyleEditorBox* self)
{
	GtkWindow* result;
	GtkWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_window;
	result = _tmp0_;
	return result;
}

void
graphs_style_editor_box_set_window (GraphsStyleEditorBox* self,
                                    GtkWindow* value)
{
	GtkWindow* old_value;
	g_return_if_fail (self != NULL);
	old_value = graphs_style_editor_box_get_window (self);
	if (old_value != value) {
		GtkWindow* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_window);
		self->priv->_window = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY]);
	}
}

static gchar*
_graphs_title_format_function_gtk_scale_format_value_func (GtkScale* scale,
                                                           gdouble value,
                                                           gpointer self)
{
	gchar* result;
	result = graphs_title_format_function (scale, value);
	return result;
}

static GObject *
graphs_style_editor_box_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GraphsStyleEditorBox * self;
	GtkListBox* _tmp0_;
	GraphsStyleColorManager* _tmp1_;
	GraphsStyleColorManager* _tmp2_;
	GtkListBox* _tmp3_;
	GraphsStyleColorManager* _tmp4_;
	GraphsStyleColorManager* _tmp5_;
	GtkScale* _tmp6_;
	GtkScale* _tmp7_;
	parent_class = G_OBJECT_CLASS (graphs_style_editor_box_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_STYLE_EDITOR_BOX, GraphsStyleEditorBox);
	_tmp0_ = self->priv->_line_colors_box;
	_tmp1_ = graphs_style_color_manager_new (_tmp0_);
	_tmp2_ = _tmp1_;
	graphs_style_editor_box_set_color_manager (self, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = self->priv->_errbar_line_colors_box;
	_tmp4_ = graphs_style_color_manager_new (_tmp3_);
	_tmp5_ = _tmp4_;
	graphs_style_editor_box_set_errbar_color_manager (self, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = self->priv->_titlesize;
	gtk_scale_set_format_value_func (_tmp6_, _graphs_title_format_function_gtk_scale_format_value_func, NULL, NULL);
	_tmp7_ = self->priv->_labelsize;
	gtk_scale_set_format_value_func (_tmp7_, _graphs_title_format_function_gtk_scale_format_value_func, NULL, NULL);
	return obj;
}

static void
graphs_style_editor_box_class_init (GraphsStyleEditorBoxClass * klass,
                                    gpointer klass_data)
{
	graphs_style_editor_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GraphsStyleEditorBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_graphs_style_editor_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_graphs_style_editor_box_set_property;
	G_OBJECT_CLASS (klass)->constructor = graphs_style_editor_box_constructor;
	G_OBJECT_CLASS (klass)->finalize = graphs_style_editor_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_STYLE_NAME_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_STYLE_NAME_PROPERTY] = g_param_spec_object ("style-name", "style-name", "style-name", adw_entry_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_FONT_CHOOSER_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_FONT_CHOOSER_PROPERTY] = g_param_spec_object ("font-chooser", "font-chooser", "font-chooser", gtk_font_dialog_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TITLESIZE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TITLESIZE_PROPERTY] = g_param_spec_object ("titlesize", "titlesize", "titlesize", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_LABELSIZE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_LABELSIZE_PROPERTY] = g_param_spec_object ("labelsize", "labelsize", "labelsize", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_LINESTYLE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_LINESTYLE_PROPERTY] = g_param_spec_object ("linestyle", "linestyle", "linestyle", adw_combo_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_LINEWIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_LINEWIDTH_PROPERTY] = g_param_spec_object ("linewidth", "linewidth", "linewidth", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MARKERS_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MARKERS_PROPERTY] = g_param_spec_object ("markers", "markers", "markers", adw_combo_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MARKERSIZE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MARKERSIZE_PROPERTY] = g_param_spec_object ("markersize", "markersize", "markersize", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_AXIS_WIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_AXIS_WIDTH_PROPERTY] = g_param_spec_object ("axis-width", "axis-width", "axis-width", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_DRAW_FRAME_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_DRAW_FRAME_PROPERTY] = g_param_spec_object ("draw-frame", "draw-frame", "draw-frame", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_DIRECTION_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_DIRECTION_PROPERTY] = g_param_spec_object ("tick-direction", "tick-direction", "tick-direction", adw_combo_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MINOR_TICKS_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MINOR_TICKS_PROPERTY] = g_param_spec_object ("minor-ticks", "minor-ticks", "minor-ticks", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_WIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_WIDTH_PROPERTY] = g_param_spec_object ("major-tick-width", "major-tick-width", "major-tick-width", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_WIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_WIDTH_PROPERTY] = g_param_spec_object ("minor-tick-width", "minor-tick-width", "minor-tick-width", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_LENGTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_LENGTH_PROPERTY] = g_param_spec_object ("major-tick-length", "major-tick-length", "major-tick-length", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_LENGTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_LENGTH_PROPERTY] = g_param_spec_object ("minor-tick-length", "minor-tick-length", "minor-tick-length", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_LABELS_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_LABELS_PROPERTY] = g_param_spec_object ("tick-labels", "tick-labels", "tick-labels", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_BOTTOM_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_BOTTOM_PROPERTY] = g_param_spec_object ("tick-bottom", "tick-bottom", "tick-bottom", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_LEFT_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_LEFT_PROPERTY] = g_param_spec_object ("tick-left", "tick-left", "tick-left", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_RIGHT_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_RIGHT_PROPERTY] = g_param_spec_object ("tick-right", "tick-right", "tick-right", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_TOP_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_TOP_PROPERTY] = g_param_spec_object ("tick-top", "tick-top", "tick-top", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_SHOW_GRID_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_SHOW_GRID_PROPERTY] = g_param_spec_object ("show-grid", "show-grid", "show-grid", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_GRID_LINEWIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_GRID_LINEWIDTH_PROPERTY] = g_param_spec_object ("grid-linewidth", "grid-linewidth", "grid-linewidth", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_GRID_OPACITY_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_GRID_OPACITY_PROPERTY] = g_param_spec_object ("grid-opacity", "grid-opacity", "grid-opacity", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_VALUE_PADDING_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_VALUE_PADDING_PROPERTY] = g_param_spec_object ("value-padding", "value-padding", "value-padding", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_LABEL_PADDING_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_LABEL_PADDING_PROPERTY] = g_param_spec_object ("label-padding", "label-padding", "label-padding", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TITLE_PADDING_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TITLE_PADDING_PROPERTY] = g_param_spec_object ("title-padding", "title-padding", "title-padding", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TEXT_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TEXT_COLOR_PROPERTY] = g_param_spec_object ("text-color", "text-color", "text-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_TICK_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_TICK_COLOR_PROPERTY] = g_param_spec_object ("tick-color", "tick-color", "tick-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_AXIS_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_AXIS_COLOR_PROPERTY] = g_param_spec_object ("axis-color", "axis-color", "axis-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_GRID_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_GRID_COLOR_PROPERTY] = g_param_spec_object ("grid-color", "grid-color", "grid-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_BACKGROUND_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_BACKGROUND_COLOR_PROPERTY] = g_param_spec_object ("background-color", "background-color", "background-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_OUTLINE_COLOR_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_OUTLINE_COLOR_PROPERTY] = g_param_spec_object ("outline-color", "outline-color", "outline-color", GRAPHS_TYPE_STYLE_COLOR_ROW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPSIZE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPSIZE_PROPERTY] = g_param_spec_object ("errorbar-capsize", "errorbar-capsize", "errorbar-capsize", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPTHICK_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPTHICK_PROPERTY] = g_param_spec_object ("errorbar-capthick", "errorbar-capthick", "errorbar-capthick", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_LINEWIDTH_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_LINEWIDTH_PROPERTY] = g_param_spec_object ("errorbar-linewidth", "errorbar-linewidth", "errorbar-linewidth", gtk_scale_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_BARSABOVE_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_BARSABOVE_PROPERTY] = g_param_spec_object ("errorbar-barsabove", "errorbar-barsabove", "errorbar-barsabove", adw_switch_row_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY] = g_param_spec_object ("color-manager", "color-manager", "color-manager", GRAPHS_TYPE_STYLE_COLOR_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY] = g_param_spec_object ("errbar-color-manager", "errbar-color-manager", "errbar-color-manager", GRAPHS_TYPE_STYLE_COLOR_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY, graphs_style_editor_box_properties[GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", gtk_window_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/se/sjoerd/Graphs/ui/style-editor/editor-box.ui");
	graphs_style_editor_box_signals[GRAPHS_STYLE_EDITOR_BOX_PARAMS_CHANGED_SIGNAL] = g_signal_new ("params-changed", GRAPHS_TYPE_STYLE_EDITOR_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "style_name", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _style_name));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "font_chooser", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _font_chooser));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "titlesize", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _titlesize));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "labelsize", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _labelsize));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "linestyle", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _linestyle));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "linewidth", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _linewidth));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "markers", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _markers));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "markersize", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _markersize));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "axis_width", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _axis_width));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "draw_frame", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _draw_frame));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_direction", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_direction));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "minor_ticks", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _minor_ticks));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "major_tick_width", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _major_tick_width));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "minor_tick_width", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _minor_tick_width));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "major_tick_length", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _major_tick_length));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "minor_tick_length", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _minor_tick_length));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_labels", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_labels));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_bottom", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_bottom));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_left", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_left));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_right", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_right));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_top", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_top));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "show_grid", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _show_grid));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid_linewidth", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _grid_linewidth));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid_opacity", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _grid_opacity));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "value_padding", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _value_padding));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "label_padding", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _label_padding));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "title_padding", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _title_padding));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _text_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "tick_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _tick_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "axis_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _axis_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _grid_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "background_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _background_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "outline_color", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _outline_color));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "line_colors_box", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _line_colors_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "errbar_line_colors_box", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _errbar_line_colors_box));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "poor_contrast_warning", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _poor_contrast_warning));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "errorbar_capsize", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _errorbar_capsize));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "errorbar_capthick", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _errorbar_capthick));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "errorbar_linewidth", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _errorbar_linewidth));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "errorbar_barsabove", FALSE, GraphsStyleEditorBox_private_offset + G_STRUCT_OFFSET (GraphsStyleEditorBoxPrivate, _errorbar_barsabove));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_linestyle", G_CALLBACK(_graphs_style_editor_box_on_linestyle_g_object_notify));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_markers", G_CALLBACK(_graphs_style_editor_box_on_markers_g_object_notify));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "add_color", G_CALLBACK(_graphs_style_editor_box_add_color_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "add_errbar_color", G_CALLBACK(_graphs_style_editor_box_add_errbar_color_gtk_button_clicked));
}

static void
graphs_style_editor_box_instance_init (GraphsStyleEditorBox * self,
                                       gpointer klass)
{
	self->priv = graphs_style_editor_box_get_instance_private (self);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	g_type_ensure (GRAPHS_TYPE_STYLE_COLOR_ROW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
graphs_style_editor_box_finalize (GObject * obj)
{
	GraphsStyleEditorBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GRAPHS_TYPE_STYLE_EDITOR_BOX, GraphsStyleEditorBox);
	_g_object_unref0 (self->priv->_color_manager);
	_g_object_unref0 (self->priv->_errbar_color_manager);
	_g_object_unref0 (self->priv->_window);
	G_OBJECT_CLASS (graphs_style_editor_box_parent_class)->finalize (obj);
}

static GType
graphs_style_editor_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraphsStyleEditorBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) graphs_style_editor_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GraphsStyleEditorBox), 0, (GInstanceInitFunc) graphs_style_editor_box_instance_init, NULL };
	GType graphs_style_editor_box_type_id;
	graphs_style_editor_box_type_id = g_type_register_static (gtk_box_get_type (), "GraphsStyleEditorBox", &g_define_type_info, 0);
	GraphsStyleEditorBox_private_offset = g_type_add_instance_private (graphs_style_editor_box_type_id, sizeof (GraphsStyleEditorBoxPrivate));
	return graphs_style_editor_box_type_id;
}

GType
graphs_style_editor_box_get_type (void)
{
	static volatile gsize graphs_style_editor_box_type_id__once = 0;
	if (g_once_init_enter (&graphs_style_editor_box_type_id__once)) {
		GType graphs_style_editor_box_type_id;
		graphs_style_editor_box_type_id = graphs_style_editor_box_get_type_once ();
		g_once_init_leave (&graphs_style_editor_box_type_id__once, graphs_style_editor_box_type_id);
	}
	return graphs_style_editor_box_type_id__once;
}

static void
_vala_graphs_style_editor_box_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	GraphsStyleEditorBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_STYLE_EDITOR_BOX, GraphsStyleEditorBox);
	switch (property_id) {
		case GRAPHS_STYLE_EDITOR_BOX_STYLE_NAME_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_style_name (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_FONT_CHOOSER_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_font_chooser (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TITLESIZE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_titlesize (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_LABELSIZE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_labelsize (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_LINESTYLE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_linestyle (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_LINEWIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_linewidth (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MARKERS_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_markers (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MARKERSIZE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_markersize (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_AXIS_WIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_axis_width (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_DRAW_FRAME_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_draw_frame (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_DIRECTION_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_direction (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MINOR_TICKS_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_minor_ticks (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_WIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_major_tick_width (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_WIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_minor_tick_width (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MAJOR_TICK_LENGTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_major_tick_length (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_MINOR_TICK_LENGTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_minor_tick_length (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_LABELS_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_labels (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_BOTTOM_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_bottom (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_LEFT_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_left (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_RIGHT_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_right (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_TOP_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_top (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_SHOW_GRID_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_show_grid (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_GRID_LINEWIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_grid_linewidth (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_GRID_OPACITY_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_grid_opacity (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_VALUE_PADDING_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_value_padding (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_LABEL_PADDING_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_label_padding (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TITLE_PADDING_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_title_padding (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TEXT_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_text_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_TICK_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_tick_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_AXIS_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_axis_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_GRID_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_grid_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_BACKGROUND_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_background_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_OUTLINE_COLOR_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_outline_color (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPSIZE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_errorbar_capsize (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_CAPTHICK_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_errorbar_capthick (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_LINEWIDTH_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_errorbar_linewidth (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRORBAR_BARSABOVE_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_errorbar_barsabove (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_color_manager (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_errbar_color_manager (self));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY:
		g_value_set_object (value, graphs_style_editor_box_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_graphs_style_editor_box_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	GraphsStyleEditorBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GRAPHS_TYPE_STYLE_EDITOR_BOX, GraphsStyleEditorBox);
	switch (property_id) {
		case GRAPHS_STYLE_EDITOR_BOX_COLOR_MANAGER_PROPERTY:
		graphs_style_editor_box_set_color_manager (self, g_value_get_object (value));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_ERRBAR_COLOR_MANAGER_PROPERTY:
		graphs_style_editor_box_set_errbar_color_manager (self, g_value_get_object (value));
		break;
		case GRAPHS_STYLE_EDITOR_BOX_WINDOW_PROPERTY:
		graphs_style_editor_box_set_window (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

