lrc / src / gui / MainWindow.hxx

/*
 * MainWindow.hxx
 *
 * Copyright 2012 Andreas Tscharner <andy@vis.ethz.ch>
 *
 * 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 2 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */


/*! \file MainWindow.hxx
 *
 * This file contains the declaration of the MainWindow class. This class
 * is responsible for all stuff of the main window.
 * It may delegate some tasks (like the menu or the list view) to separate
 * classes
 *
 * \author Andreas Tscharner
 * \date 2012-09-01
 */


#ifndef __MAINWINDOW_HXX__
#define __MAINWINDOW_HXX__


// Include files
#include <gtkmm/builder.h>
#include <gtkmm/window.h>
#include <gtkmm/liststore.h>
#include "AddRemoveHandlers.hxx"
#include "ResColumnModel.hxx"
#include "ListHandler.hxx"


/*! \class MainWindow
 *  \brief Class to handle the main window
 *
 * This class handles all the stuff of the main window. It uses other
 * classes to handle some special tasks (like the menu or the list view)
 */
class MainWindow
{
	private:
		Gtk::Window *m_mainWindow;     //!< Reference to main window class
		Glib::RefPtr<Gtk::Builder> m_refBuilder;     //!< Reference to builder that created the UI from XML
		Glib::RefPtr<Gtk::ListStore> m_listResFiles; //!< Reference to list store for the main list view
		Glib::RefPtr<Gtk::ListStore> m_listCompTypes;//!< Reference to list store for the compression types combo
		Glib::RefPtr<Gtk::ListStore> m_listEncTypes; //!< Reference to list store for the encryption types combo

		AddRemoveHandlers *m_addRemove;//!< Class instance to handle the "Add" and "Remove" button
		ResColumnModel *m_resColModel; //!< Class that defines the column model for the list store
		ListHandler *m_listHandler;    //!< Class for handling the list in the view

	public:
		/*! \brief Constructor
		 *
		 * The constructor for the MainWindow class. It needs a pointer to
		 * the window and a reference pointer to the glade file as parameters
		 *
		 * \param[in] p_mainWin Pointer to GTK window
		 * \param[in] p_refBuilder Reference pointer to builder that loaded
		 *                         the glade file
		 */
		MainWindow(Gtk::Window *, Glib::RefPtr<Gtk::Builder>);
		/*! \brief Destructor
		 *
		 * The destructor cleans up any used memory from this class
		 */
		~MainWindow();
};


#endif /* __MAINWINDOW_HXX__ */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.