/* $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 #define _(String) gettext (String) #define gettext_noop(String) (String) #define N_(String) gettext_noop (String) using namespace std; using namespace Gtk; enum COPY_DIRECTION { DIRECTION_V1TOV2, DIRECTION_V2TOV1 }; class Editarea : public sigc::trackable { public: Editarea(); ~Editarea(); /* Triggered whenever the save button has been clicked. */ SigC::Signal0 signal_button_save_clicked; /* Triggered whenever the copy direction has been changed. */ SigC::Signal0 signal_direction_changed; GtkWidget* build(bool vertical); GtkWidget* build_horizontal(void); GtkWidget* build_vertical(void); void set_active(bool active); Widget* get_widget(string widgetname); void set_label_text(string widgetname, string str); bool get_check_active(string widgetname); int get_direction(void); private: HBox* build_selector(void); Table* build_form(void); Table* build_commentbox(void); void build_buttonbox(bool vertical); std::list listenerids; // The ids of the eventbus listeners. std::list focuschain; // A list holding the focus order. std::map widgets; // Widgetname <-> Widget. Gtk::Box* parent; // The table holding all widgets. Gtk::Box* buttonbox; // The box holding all buttons. }; #endif