00001 /* 00002 * This file is part of connectionMgr. 00003 * 00004 * connectionMgr is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * connectionMgr is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00028 #ifndef __SETTING_ITEM_H__ 00029 #define __SETTING_ITEM_H__ 00030 00031 #include <gtk/gtk.h> 00032 #include <gdk/gdk.h> 00033 00034 #define SMALL_BUTTON_SPACING 15 00035 #define LARGE_BUTTON_SPACING 7 00036 #define SMALL_BUTTON_HEIGHT 27 00037 #define SMALL_BUTTON_WIDTH ((666 - (3*SMALL_BUTTON_SPACING))/4) 00038 #define LARGE_BUTTON_HEIGHT 27 00039 #define LARGE_BUTTON_WIDTH 170 00040 00041 #define SETTINGITEM_ITEM_SPACING 5 00042 #define SETTING_TITLE_MIN_WIDTH 666 00043 #define SETTING_TITLE_MIN_HEIGHT 27 00044 #define SETTING_INFO_MIN_HEIGHT 17 00045 00046 #define GTK_SETTINGITEM_TYPE (gtk_settingitem_get_type ()) 00047 #define GTK_SETTINGITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_SETTINGITEM_TYPE, GtkSettingItem)) 00048 #define GTK_SETTINGITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_SETTINGITEM_TYPE, GtkSettingItemClass)) 00049 #define IS_GTK_SETTINGITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_SETTINGITEM_TYPE)) 00050 #define IS_GTK_SETTINGITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_SETTINGITEM_TYPE)) 00051 00052 typedef struct _GtkSettingItem GtkSettingItem; 00053 typedef struct _GtkSettingItemClass GtkSettingItemClass; 00054 00055 struct _GtkSettingItem 00056 { 00057 GtkEventBox eventbox; 00058 GtkWidget* headerlabel; 00059 GtkWidget* infolabel; 00060 GtkWidget* clientArea; 00061 }; 00062 00063 struct _GtkSettingItemClass 00064 { 00065 GtkEventBoxClass parent_class; 00066 }; 00067 00068 #ifdef __cplusplus 00069 extern "C" { 00070 #endif /* __cplusplus */ 00071 00072 // creates a new GtkSettingItem widget 00073 GtkWidget* gtk_settingitem_new(gchar* headerlabel); 00074 00075 // set the info/help text associated with this "setting item" 00076 void gtk_settingitem_set_info_text(GtkSettingItem *settingitem, 00077 gchar* infotext); 00078 00079 // set the header label text 00080 void gtk_settingitem_set_header_text(GtkSettingItem *settingitem, 00081 gchar* headertext); 00082 00083 // Fill client Area of the the settings item with details 00084 void gtk_settingitem_add_details(GtkSettingItem *settingitem, 00085 GtkWidget* details); 00086 00087 // returns type of this widget 00088 GType gtk_settingitem_get_type (void); 00089 00090 #ifdef __cplusplus 00091 } 00092 #endif /* __cplusplus */ 00093 00094 #endif //__SETTING_ITEM_H__ 00095