/** * CS798 - Project : appwindow.hpp * April 21, 2006 * * Erika Harrison * */ #ifndef APPWINDOW_HPP #define APPWINDOW_HPP #include #include "viewer.hpp" #include "algebra.hpp" class NewWindow : public Gtk::Dialog { public: NewWindow(const Glib::ustring & title); int getTile(); void setNames(list n) { comboBox.set_popdown_strings(n); for(int i = 0; i < n.size(); i += 1) { names.push_back(n.front()); n.push_back(n.front()); n.pop_front(); } } private: Gtk::Label label; Gtk::Combo comboBox; int tile; vector names; }; class AppWindow : public Gtk::Window { public: AppWindow(); protected: private: // A "vertical box" which holds everything in our window Gtk::VBox m_vbox; Gtk::HBox m_pane; Gtk::HBox ABbox, CDbox, EFbox, GHbox, dBox; // The menubar, with all the menus at the top of the window Gtk::MenuBar m_menubar; // Each menu itself Gtk::Menu m_menu_app; Gtk::Menu m_menu_draw; Gtk::Menu m_submenu_view; Gtk::Menu m_submenu_render; Gtk::Menu m_submenu_math; Gtk::Menu m_menu_sel; Gtk::Menu m_menu_help; // advanced menu // The status bar Gtk::Label statusBar; // The main OpenGL area Viewer m_viewer; bool on_key_press_event(GdkEventKey* event); bool on_key_release_event(GdkEventKey* event); // displays a help dialog void help(); // displays an about dialog void about(); // setting fullscreen void setFullscreen(); bool isFullscreen; // loads a new tiling //void newTiling(); // border & fill colour selections void setFillColour(int i); void setBorderColour(); void setBorderWidth(); // building the tool bar // The left toolbar Gtk::ScrolledWindow m_toolpane; Gtk::VBox m_toolbar; Gtk::Label ALabel, BLabel, CLabel, DLabel, ELabel, FLabel, GLabel, HLabel; Gtk::HScale AScale, BScale, CScale, DScale, EScale, FScale, GScale, HScale, wScale; Gtk::Button bgButton, cButton; Gtk::Label tLabel, tIncLabel, bgLabel, cLabel, wLabel; Gtk::HScale tScale, tIncScale; void buildToolbar(); void resetToolbar(); // Gdk::Color getColor(); void updateA(); void updateB(); void updateC(); void updateD(); void updateE(); void updateF(); void updateG(); void updateH(); void updatet(); void updatetInc(); void updateBG(); void updateColour(); void updateWidth(); }; #endif