NewForm.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009, 2010 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 #ifndef NEWFORM_H_
00012 #define NEWFORM_H_
00013 
00014 #include <gtkmm/box.h>
00015 #include <gtkmm/button.h>
00016 #include <gtkmm/iconview.h>
00017 #include <gtkmm/liststore.h>
00018 #include <gtkmm/label.h>
00019 #include <gtkmm/scrolledwindow.h>
00020 #include <giomm/file.h>
00021 
00024 class NewForm : public Gtk::VBox
00025 {
00026 public:
00031     NewForm(Gtk::Window & window);
00032     virtual ~NewForm();
00041     sigc::signal<void, std::string> signal_theme_picked();
00042     
00049     void find_themes();
00050     
00053     void grab_focus();
00054 protected:
00056     Gtk::Window & window;
00058     Gtk::Label caption;
00060     Gtk::IconView theme_icon_view;
00062     Gtk::Button create_button;
00064     Gtk::ScrolledWindow m_scrolled_window;
00065     
00066     
00068     class ThemeModelColumns : public Gtk::TreeModel::ColumnRecord
00069     {
00070     public:
00072         Gtk::TreeModelColumn<Glib::ustring>                name;
00073         
00077         Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> >  thumbnail;
00078         
00080         Gtk::TreeModelColumn<std::string>                  file;
00081         ThemeModelColumns()
00082         {
00083             add(name);
00084             add(thumbnail);
00085             add(file);
00086         }
00087     } theme_model_columns;
00088     
00090     Glib::RefPtr<Gtk::ListStore> list_model_ptr;
00091     
00093     std::vector<Glib::RefPtr<Gio::FileMonitor> > dir_mon;
00094     
00096     sigc::signal<void, std::string> m_signal_theme_picked;
00097     
00099     bool m_loading;
00100     
00106     void set_themes();
00107     
00114     void add_themes_from(std::string filename);
00115     
00120     void on_dir_changed(const Glib::RefPtr<Gio::File>& file,
00121                         const Glib::RefPtr<Gio::File>& other_file,
00122                         Gio::FileMonitorEvent event_type,
00123                         std::string path);
00124     
00127     void test_themes_avaliable();
00128     
00131     void on_new_button_clicked();
00132     
00135     void on_item_activated(const Gtk::TreeModel::Path & path);
00136     
00145     bool add_file(Glib::RefPtr<Gio::FileInfo> file_info, std::string path);
00146 };
00147 
00148 #endif /*NEWFORM_H_*/

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:13 2010 by Doxygen version 1.4.7 for Racer version svn335.