/* $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 **/ #if !defined( _CANTUSMAINWINDOW_H_ ) #define _CANTUSMAINWINDOW_H_ /* if we have a config.h, include it */ #ifdef HAVE_CONFIG_H # include #endif /* some headers we need */ #include #include #include #include #include #include #include /* define some macros which we need for localization */ #define _(String) gettext (String) #define gettext_noop(String) (String) #define N_(String) gettext_noop (String) /** * \brief * \author * \date */ class Mainwindow : public sigc::trackable { public: /** * \brief Default constructor. * \author * \date */ Mainwindow(); /** * \brief Destructor. * \author * \date */ ~Mainwindow(); SigC::Signal1 signalFileBrowserSelectionChanged; SigC::Signal0 signalMenuFileSaveActivate; SigC::Signal0 signalMenuEditPreferencesActivate; SigC::Signal1 signalPluginarea1VisibilityChanged; SigC::Signal1 signalPluginarea2VisibilityChanged; SigC::Signal1 signalPluginareaWidgetRemoved; /* Builds the complete mainwindow. */ Gtk::Window * create(void); /* Update the plugins to be shown in the pluginarea. */ void pluginareaUpdate(std::list *plugins); /* Updates the statusbar. */ void setStatus( std::string status ); /* Updates the progressbar. */ void setProgress( double percent ); /* Make the pluginarea visible or invisible. */ void pluginarea1SetActive(gboolean active); /* Make the pluginarea visible or invisible. */ void pluginarea2SetActive(gboolean active); FileBrowser * m_fileBrowser; private: void connectSignals(); void onMenuHelpContentsActivate(); void onMenuHelpAboutActivate(); void onMenuViewPluginarea1Activate(); void onMenuViewPluginarea2Activate(); /** * \brief Convert the content of a vector/list to a string. * \author Tim Huetz * \date 07/25/2007 * \param inputList A list which should be converted to a string. * \return The list represented as a single string. */ Glib::ustring listToString( const std::vector & inputList ); /* just some attributes of this window class */ Glib::RefPtr m_refXml; gboolean m_lockevents; Gtk::Window * m_pWindow; Gtk::Viewport * m_viewport; Gtk::Table * m_table; Gtk::Statusbar * m_statusbar; Gtk::ProgressBar * m_progressbar; Gtk::HPaned * m_hPaned; Gtk::Notebook * m_notebook; PluginArea * m_pluginArea1; PluginArea * m_pluginArea2; Gtk::Image * m_applicationLogo; Gtk::AboutDialog * m_aboutDialog; }; #endif