source: OGRE/trunk/ogrenew/PlatformManagers/SDL/include/OgreSDLConfig_gtk.h @ 692

Revision 692, 2.9 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25
26#ifndef __GTKCONFIGDIALOG_H__
27#define __GTKCONFIGDIALOG_H__
28
29#include "OgreConfigDialog.h"
30#include "OgreRoot.h"
31#include "OgreRenderSystem.h"
32
33#include <gtkmm/menu.h>
34#include <gtkmm/treeview.h>
35#include <gtkmm/liststore.h>
36#include <gtkmm/label.h>
37#include <gtkmm/optionmenu.h>
38
39#include <iostream>
40
41namespace Ogre {
42    /** GTK+ config */
43    class SDLConfig : public ConfigDialog, public SigC::Object
44    {
45    public:
46        SDLConfig()
47        { }
48
49        /**
50         * Displays a message about reading the config and then attempts to
51         * read it from a config file
52         */
53        bool display(void);
54
55    protected:
56        class ModelColumns : public Gtk::TreeModel::ColumnRecord
57        {
58        public:
59          ModelColumns()
60            { add(col_name); add(col_value); }
61
62          Gtk::TreeModelColumn<Glib::ustring> col_name;
63          Gtk::TreeModelColumn<Glib::ustring> col_value;
64        };
65
66        bool on_window_delete(GdkEventAny* event);
67        void on_option_changed();
68        void on_renderer_changed();
69        void on_value_changed();
70        void on_btn_ok();
71        void on_btn_cancel();
72    private:
73        Gtk::Window* _winConfig;
74        ModelColumns _columns;
75        Glib::RefPtr<Gtk::ListStore> _list_store;
76        Gtk::TreeView* _lstOptions;
77        Glib::RefPtr<Gtk::TreeSelection> _option_selection;
78        int _cur_index;
79        Glib::ustring _cur_name;
80        Gtk::OptionMenu* _optRenderer;
81        Gtk::Label* _lblOptName;
82        Gtk::OptionMenu* _optOptValues;
83        Gtk::Menu* _opt_menu;
84        ConfigOptionMap _options;
85        RenderSystemList* _renderers;
86        RenderSystem* _selected_renderer;
87
88        void update_option_list();
89    };
90}
91
92#endif
Note: See TracBrowser for help on using the repository browser.