1 /* 2 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert 3 * Copyright (C) 2011 Pete Shorthose 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 * -------------------------------------------------------------------------- 19 */ 20 21 /* ------- This is the GUI namespace ------- */ 22 23 #pragma once 24 25 #ifndef SRC_HEADERS_GX_GUI_HELPERS_H_ 26 #define SRC_HEADERS_GX_GUI_HELPERS_H_ 27 28 namespace gx_gui { 29 30 class WaitCursor { 31 private: 32 Glib::RefPtr<Gdk::Window> gdk_window; 33 public: 34 WaitCursor(Gtk::Window *window); 35 ~WaitCursor(); 36 }; 37 38 gint gx_nchoice_dialog_without_entry( 39 const char* window_title, 40 const char* msg, 41 const guint nchoice, 42 const char* label[], 43 const gint resp[], 44 const gint default_response, 45 Glib::RefPtr<Gdk::Pixbuf> gw_ib 46 ); 47 48 /* extra GUI helpers */ 49 int gx_message_popup(const char*); 50 void show_error_msg(const string& msg); 51 void child_set_property(Gtk::Container& container, Gtk::Widget& child, const char *property_name, bool value); 52 Glib::ustring logarithmic_format_value(double v, int prec); 53 int logarithmic_input_value(gpointer obj, gpointer nv); 54 55 /* -------------------------------------------------------------------------- */ 56 } /* end of gx_gui namespace */ 57 #endif // SRC_HEADERS_GX_GUI_HELPERS_H_ 58 59