00001 /* 00002 * This file is part of settings. 00003 * 00004 * settings 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 * settings 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 00031 #ifndef __SETTING_ITEM_H__ 00032 #define __SETTING_ITEM_H__ 00033 00034 #include <gtk/gtk.h> 00035 #include <gdk/gdk.h> 00036 00037 #define SMALL_BUTTON_SPACING 15 00038 #define LARGE_BUTTON_SPACING 7 00039 #define SMALL_BUTTON_HEIGHT 27 00040 #define SMALL_BUTTON_WIDTH ((666 - (3*SMALL_BUTTON_SPACING))/4) 00041 #define LARGE_BUTTON_HEIGHT 27 00042 #define LARGE_BUTTON_WIDTH 170 00043 00044 #define SETTINGITEM_ITEM_SPACING 5 00045 #define SETTING_TITLE_MIN_WIDTH 666 00046 #define SETTING_TITLE_MIN_HEIGHT 27 00047 #define SETTING_INFO_MIN_HEIGHT 17 00048 00049 #ifdef __cplusplus 00050 extern "C" { 00051 #endif /* __cplusplus */ 00052 00053 #define GTK_SETTINGITEM_TYPE (gtk_settingitem_get_type ()) 00054 #define GTK_SETTINGITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_SETTINGITEM_TYPE, GtkSettingItem)) 00055 #define GTK_SETTINGITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_SETTINGITEM_TYPE, GtkSettingItemClass)) 00056 #define IS_GTK_SETTINGITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_SETTINGITEM_TYPE)) 00057 #define IS_GTK_SETTINGITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_SETTINGITEM_TYPE)) 00058 00059 typedef struct _GtkSettingItem GtkSettingItem; 00060 typedef struct _GtkSettingItemClass GtkSettingItemClass; 00061 00062 struct _GtkSettingItem 00063 { 00064 GtkEventBox eventbox; 00065 GtkWidget* headerlabel; 00066 GtkWidget* infolabel; 00067 GtkWidget* clientArea; 00068 }; 00069 00070 struct _GtkSettingItemClass 00071 { 00072 GtkEventBoxClass parent_class; 00073 }; 00074 00075 // creates a new GtkSettingItem widget 00076 GtkWidget* gtk_settingitem_new(gchar* headerlabel); 00077 00078 // set the info/help text associated with this "setting item" 00079 void gtk_settingitem_set_info_text(GtkSettingItem *settingitem, gchar* infotext); 00080 00081 // set the header label text 00082 void gtk_settingitem_set_header_text(GtkSettingItem *settingitem, gchar* headertext); 00083 00084 // Fill client Area of the the settings item with details 00085 void gtk_settingitem_add_details(GtkSettingItem *settingitem, GtkWidget* details); 00086 00087 // returns type of this widget 00088 GType gtk_settingitem_get_type (void); 00089 00090 00091 #ifdef __cplusplus 00092 } 00093 #endif /* __cplusplus */ 00094 00095 #endif //__SETTING_ITEM_H__
1.5.6