1 /* GSequencer - Advanced GTK Sequencer
2 * Copyright (C) 2005-2015 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/X/ags_line_editor_callbacks.h>
21
22 #include <ags/libags.h>
23 #include <ags/libags-audio.h>
24
25 #include <ags/X/ags_pad_editor.h>
26 #include <ags/X/ags_machine_editor.h>
27
28 void
ags_line_editor_parent_set_callback(GtkWidget * widget,GtkWidget * old_parent,AgsLineEditor * line_editor)29 ags_line_editor_parent_set_callback(GtkWidget *widget, GtkWidget *old_parent, AgsLineEditor *line_editor)
30 {
31 if(old_parent != NULL){
32 return;
33 }
34
35 if(line_editor->link_editor != NULL){
36 gtk_box_pack_start((GtkBox *) line_editor,
37 (GtkWidget *) line_editor->link_editor,
38 FALSE, FALSE,
39 0);
40 }
41
42 if(line_editor->output_editor != NULL){
43 gtk_box_pack_start((GtkBox *) line_editor,
44 (GtkWidget *) line_editor->output_editor,
45 FALSE, FALSE,
46 0);
47 }
48
49 if(line_editor->input_editor != NULL){
50 gtk_box_pack_start((GtkBox *) line_editor,
51 (GtkWidget *) line_editor->input_editor,
52 FALSE, FALSE,
53 0);
54 }
55 }
56
57 int
ags_line_editor_show_callback(GtkWidget * widget,AgsLineEditor * line_editor)58 ags_line_editor_show_callback(GtkWidget *widget, AgsLineEditor *line_editor)
59 {
60 if(line_editor->link_editor != NULL){
61 gtk_widget_show((GtkWidget *) line_editor->link_editor);
62 }
63
64 if(line_editor->output_editor != NULL){
65 gtk_widget_show((GtkWidget *) line_editor->output_editor);
66 }
67
68 if(line_editor->input_editor != NULL){
69 gtk_widget_show((GtkWidget *) line_editor->input_editor);
70 }
71
72 if(line_editor->member_editor != NULL){
73 gtk_widget_show((GtkWidget *) line_editor->member_editor);
74 }
75
76 return(0);
77 }
78