gtkmisc.h

Go to the documentation of this file.
00001 /*
00002  Copyright (c) 2001, Loki software, inc.
00003  All rights reserved.
00004 
00005  Redistribution and use in source and binary forms, with or without modification,
00006  are permitted provided that the following conditions are met:
00007 
00008  Redistributions of source code must retain the above copyright notice, this list
00009  of conditions and the following disclaimer.
00010 
00011  Redistributions in binary form must reproduce the above copyright notice, this
00012  list of conditions and the following disclaimer in the documentation and/or
00013  other materials provided with the distribution.
00014 
00015  Neither the name of Loki software nor the names of its contributors may be used
00016  to endorse or promote products derived from this software without specific prior
00017  written permission.
00018 
00019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00020  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00022  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
00023  DIRECT,INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00024  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00025  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00026  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00027  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  */
00030 
00031 #if !defined(INCLUDED_GTKMISC_H)
00032 #define INCLUDED_GTKMISC_H
00033 
00034 #include <string>
00035 #include <gtk/gtkmain.h>
00036 #include "radiant_i18n.h"
00037 
00038 inline void process_gui ()
00039 {
00040     while (gtk_events_pending()) {
00041         gtk_main_iteration();
00042     }
00043 }
00044 
00045 void command_connect_accelerator (const std::string& commandName);
00046 void command_disconnect_accelerator (const std::string& commandName);
00047 void toggle_add_accelerator (const std::string& commandName);
00048 void toggle_remove_accelerator (const std::string& name);
00049 
00050 typedef struct _GtkMenu GtkMenu;
00051 typedef struct _GtkMenuItem GtkMenuItem;
00052 typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
00053 
00054 // this also sets up the shortcut using command_connect_accelerator
00055 GtkMenuItem
00056         * create_menu_item_with_mnemonic (GtkMenu *menu, const std::string& mnemonic, const std::string& commandName, const std::string& icon = "");
00057 // this also sets up the shortcut using command_connect_accelerator
00058 GtkCheckMenuItem* create_check_menu_item_with_mnemonic (GtkMenu* menu, const std::string& mnemonic,
00059         const std::string& commandName, const std::string& icon = "");
00060 
00061 typedef struct _GtkButton GtkButton;
00062 typedef struct _GtkToggleButton GtkToggleButton;
00063 typedef struct _GtkToolbar GtkToolbar;
00064 
00065 // this DOES NOT set up the shortcut using command_connect_accelerator
00066 GtkButton* toolbar_append_button (GtkToolbar* toolbar, const std::string& description, const std::string& icon,
00067         const std::string& commandName);
00068 // this DOES NOT set up the shortcut using command_connect_accelerator
00069 GtkToggleButton* toolbar_append_toggle_button (GtkToolbar* toolbar, const std::string& description,
00070         const std::string& icon, const std::string& commandName);
00071 
00072 template<typename Element> class BasicVector3;
00073 typedef BasicVector3<float> Vector3;
00074 bool color_dialog (GtkWidget *parent, Vector3& color, const std::string& title = _("Choose Color"));
00075 
00076 typedef struct _GtkEntry GtkEntry;
00077 void button_clicked_entry_browse_file (GtkWidget* widget, GtkEntry* entry);
00078 void button_clicked_entry_browse_directory (GtkWidget* widget, GtkEntry* entry);
00079 
00080 #endif

Generated by  doxygen 1.6.2