1 /* 2 * Copyright (C) 2002 2003 2004 2005, Magnus Hjorth 3 * 4 * This file is part of mhWaveEdit. 5 * 6 * mhWaveEdit 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 2 of the License, or 9 * (at your option) any later version. 10 * 11 * mhWaveEdit 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 mhWaveEdit; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 22 /* Document selection widget for the effect browser */ 23 24 #ifndef DOCUMENTLIST_H_INCLUDED 25 #define DOCUMENTLIST_H_INCLUDED 26 27 #include "combo.h" 28 #include "document.h" 29 #include "listobject.h" 30 31 #define DOCUMENT_LIST(obj) GTK_CHECK_CAST(obj,document_list_get_type(),DocumentList) 32 #define DOCUMENT_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST(klass,document_list_get_type(),DocumentListClass) 33 #define IS_DOCUMENT_LIST(obj) GTK_CHECK_TYPE(obj,document_list_get_type()) 34 typedef struct { 35 Combo combo; 36 Document *selected; 37 /* Format of the selected document's chunk. The reason to keep track of 38 * this separately is that it makes it easier to handle the special case 39 * where there are no windows (selected==NULL) */ 40 Dataformat format; 41 } DocumentList; 42 43 typedef struct { 44 ComboClass comboclass; 45 /* The current mainwindow has changed, either by the user or the 46 * selected mainwindow was closed, or the chunk in the current 47 * mainwindow has changed. . */ 48 void (*document_changed)(DocumentList *dl); 49 } DocumentListClass; 50 51 GtkType document_list_get_type(void); 52 GtkWidget *document_list_new(Document *chosen); 53 void document_list_setup(DocumentList *mwl, Document *chosen); 54 55 #endif 56