1 /* GSequencer - Advanced GTK Sequencer
2 * Copyright (C) 2005-2017 Joël Krähemann
3 *
4 * This file is part of GSequencer.
5 *
6 * GSequencer is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * GSequencer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <ags/widget/ags_hscale_box.h>
21
22 void ags_hscale_box_class_init(AgsHScaleBoxClass *hscale_box);
23 void ags_hscale_box_init(AgsHScaleBox *hscale_box);
24
25 /**
26 * SECTION:ags_hscale_box
27 * @short_description: horizontal box widget
28 * @title: AgsHScaleBox
29 * @section_id:
30 * @include: ags/widget/ags_hscale_box.h
31 *
32 * The #AgsHScaleBox is an horizontal box widget containing #AgsScale.
33 */
34
35 static gpointer ags_hscale_box_parent_class = NULL;
36
37 GType
ags_hscale_box_get_type(void)38 ags_hscale_box_get_type(void)
39 {
40 static volatile gsize g_define_type_id__volatile = 0;
41
42 if(g_once_init_enter (&g_define_type_id__volatile)){
43 GType ags_type_hscale_box = 0;
44
45 static const GTypeInfo ags_hscale_box_info = {
46 sizeof (AgsHScaleBoxClass),
47 NULL, /* base_init */
48 NULL, /* base_finalize */
49 (GClassInitFunc) ags_hscale_box_class_init,
50 NULL, /* class_finalize */
51 NULL, /* class_data */
52 sizeof (AgsHScaleBox),
53 0, /* n_preallocs */
54 (GInstanceInitFunc) ags_hscale_box_init,
55 };
56
57 ags_type_hscale_box = g_type_register_static(AGS_TYPE_SCALE_BOX,
58 "AgsHScaleBox", &ags_hscale_box_info,
59 0);
60
61 g_once_init_leave(&g_define_type_id__volatile, ags_type_hscale_box);
62 }
63
64 return g_define_type_id__volatile;
65 }
66
67 void
ags_hscale_box_class_init(AgsHScaleBoxClass * hscale_box)68 ags_hscale_box_class_init(AgsHScaleBoxClass *hscale_box)
69 {
70 }
71
72 void
ags_hscale_box_init(AgsHScaleBox * hscale_box)73 ags_hscale_box_init(AgsHScaleBox *hscale_box)
74 {
75 gtk_orientable_set_orientation(GTK_ORIENTABLE(hscale_box),
76 GTK_ORIENTATION_HORIZONTAL);
77 }
78
79 /**
80 * ags_hscale_box_new:
81 *
82 * Create a new instance of #AgsHScaleBox.
83 *
84 * Returns: the new #AgsHScaleBox instance
85 *
86 * Since: 3.0.0
87 */
88 AgsHScaleBox*
ags_hscale_box_new()89 ags_hscale_box_new()
90 {
91 AgsHScaleBox *hscale_box;
92
93 hscale_box = (AgsHScaleBox *) g_object_new(AGS_TYPE_HSCALE_BOX,
94 NULL);
95
96 return(hscale_box);
97 }
98