/* $Id$ */ /* * Cantus Tag Editor * Copyright © 2002-2004 by Samuel Abels * Copyright © 2007 by Tim Huetz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see **/ #ifdef HAVE_CONFIG_H # include #endif #ifndef HAVE_EDITAREA_H #define HAVE_EDITAREA_H #include #include #include #include #include #include #define _(String) gettext (String) #define gettext_noop(String) (String) #define N_(String) gettext_noop (String) class Editarea : public sigc::trackable { public: Editarea(bool allow_multiple_genres = TRUE); ~Editarea(); /* Triggered whenever the save button has been clicked. */ SigC::Signal0 signal_button_save_clicked; GtkWidget *build(bool vertical); GtkWidget *build_horizontal(void); GtkWidget *build_vertical(void); void set_active(bool active); Gtk::Widget *get_widget(const gchar *widgetname); void set_entry_text(const gchar *widgetname, const gchar *str); Glib::ustring get_entry_text(const gchar *widgetname); void set_textview_text(const gchar *widgetname, const gchar *str); Glib::ustring get_textview_text(const gchar *widgetname); void set_check_active(const gchar *widgetname, bool active); bool get_check_active(const gchar *widgetname); private: Gtk::Table* build_editarea(void); Gtk::Table* build_commentbox(void); void build_buttonbox(bool vertical); void get_children_recursive(Gtk::Container *container, std::list *children); void on_button_clear_clicked(void); void on_button_genre_clicked(void); void on_entry_genre_changed(void); void on_genreselector_close_clicked(void); void on_genreselector_selection_changed(std::list sel); // A hashtable holding all widgetnames. std::map widgets; std::list focuschain; // A list holding the focus order. std::list listenerids; // The ids of the eventbus listeners. Gtk::Box *parent; // The table holding all widgets. Gtk::Box *buttonbox; // The box holding all buttons. GenreSelector *genreselector; // The Genre selector window. bool multiple_genres; }; #endif