# OgreSDLConfig_gtk.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2005 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025
    00026 #ifndef __GTKCONFIGDIALOG_H__
    00027 #define __GTKCONFIGDIALOG_H__
    00028
    00029 #include "OgreConfigDialog.h"
    00030 #include "OgreRoot.h"
    00031 #include "OgreRenderSystem.h"
    00032
    00033 #include <gtkmm/menu.h>
    00034 #include <gtkmm/treeview.h>
    00035 #include <gtkmm/liststore.h>
    00036 #include <gtkmm/label.h>
    00037 #include <gtkmm/optionmenu.h>
    00038
    00039 #include <iostream>
    00040
    00041 namespace Ogre {
    00043     class SDLConfig : public ConfigDialog, public SigC::Object
    00044     {
    00045     public:
    00046         SDLConfig()
    00047         { }
    00048
    00053         bool display(void);
    00054
    00055     protected:
    00056         class ModelColumns : public Gtk::TreeModel::ColumnRecord
    00057         {
    00058         public:
    00059           ModelColumns()
    00060             { add(col_name); add(col_value); }
    00061
    00062           Gtk::TreeModelColumn<Glib::ustring> col_name;
    00063           Gtk::TreeModelColumn<Glib::ustring> col_value;
    00064         };
    00065
    00066         bool on_window_delete(GdkEventAny* event);
    00067         void on_option_changed();
    00068         void on_renderer_changed();
    00069         void on_value_changed();
    00070         void on_btn_ok();
    00071         void on_btn_cancel();
    00072     private:
    00073         Gtk::Window* _winConfig;
    00074         ModelColumns _columns;
    00075         Glib::RefPtr<Gtk::ListStore> _list_store;
    00076         Gtk::TreeView* _lstOptions;
    00077         Glib::RefPtr<Gtk::TreeSelection> _option_selection;
    00078         int _cur_index;
    00079         Glib::ustring _cur_name;
    00080         Gtk::OptionMenu* _optRenderer;
    00081         Gtk::Label* _lblOptName;
    00082         Gtk::OptionMenu* _optOptValues;
    00083         Gtk::Menu* _opt_menu;
    00084         ConfigOptionMap _options;
    00085         RenderSystemList* _renderers;
    00086         RenderSystem* _selected_renderer;
    00087
    00088         void update_option_list();
    00089     };
    00090 }
    00091
    00092 #endif

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:36:06 2005