Move the TreeModel to the MainWindow object again
[moonshot-ui.git] / src / moonshot-custom-vbox.vala
1 using Gtk;
2
3 class CustomVBox : VBox
4 {
5     public IdCardWidget current_idcard { get; set; default = null; }
6
7     public CustomVBox (bool homogeneous, int spacing)
8     {
9         this.set_homogeneous (homogeneous);
10         this.set_spacing (spacing);
11     }
12
13     public void receive_expanded_event (IdCardWidget id_card_widget)
14     {
15         var list = this.get_children ();
16         foreach (Widget id_card in list)
17         {
18             if (id_card != id_card_widget)
19                 ((IdCardWidget) id_card).collapse ();
20         }
21     }
22
23     public void add_id_card_widget (IdCardWidget id_card_widget)
24     {
25         this.pack_start (id_card_widget, false, false);
26     }
27
28     public void remove_id_card_widget (IdCardWidget id_card_widget)
29     {
30         this.remove (id_card_widget);
31     }
32 }