32 #import "CoreGTK/CGTKInfoBar.h"
36 -(void)addButtonTextResponseDictionary:(NSDictionary *)buttonTextDict
40 for(NSString *text in buttonTextDict)
42 wrapper = [buttonTextDict objectForKey:text];
44 [
self addButtonWithButtonText:text andResponseId:wrapper.gintValue];
48 -(id)initWithButtonTextResponseDictionary:(NSDictionary *)buttonTextDict
50 self = [
super initWithGObject:(GObject *)gtk_info_bar_new()];
56 for(NSString *text in buttonTextDict)
58 wrapper = [buttonTextDict objectForKey:text];
60 [
self addButtonWithButtonText:text andResponseId:wrapper.gintValue];
81 return GTK_INFO_BAR([
self GOBJECT]);
84 -(void)addActionWidgetWithChild:(
CGTKWidget*) child andResponseId:(gint) responseId
86 gtk_info_bar_add_action_widget(GTK_INFO_BAR([
self GOBJECT]), [child
WIDGET], responseId);
89 -(
CGTKWidget*)addButtonWithButtonText:(NSString*) buttonText andResponseId:(gint) responseId
91 return [[
CGTKWidget alloc] initWithGObject:(GObject *)gtk_info_bar_add_button(GTK_INFO_BAR([
self GOBJECT]), [buttonText UTF8String], responseId)];
96 return [[
CGTKWidget alloc] initWithGObject:(GObject *)gtk_info_bar_get_action_area(GTK_INFO_BAR([
self GOBJECT]))];
101 return [[
CGTKWidget alloc] initWithGObject:(GObject *)gtk_info_bar_get_content_area(GTK_INFO_BAR([
self GOBJECT]))];
106 return gtk_info_bar_get_message_type(GTK_INFO_BAR([
self GOBJECT]));
111 return (gtk_info_bar_get_show_close_button(GTK_INFO_BAR([
self GOBJECT])) ? YES : NO);
114 -(void)response:(gint) responseId
116 gtk_info_bar_response(GTK_INFO_BAR([
self GOBJECT]), responseId);
119 -(void)setDefaultResponse:(gint) responseId
121 gtk_info_bar_set_default_response(GTK_INFO_BAR([
self GOBJECT]), responseId);
124 -(void)setMessageType:(GtkMessageType) messageType
126 gtk_info_bar_set_message_type(GTK_INFO_BAR([
self GOBJECT]), messageType);
129 -(void)setResponseSensitiveWithResponseId:(gint) responseId andSetting:(BOOL) setting
131 gtk_info_bar_set_response_sensitive(GTK_INFO_BAR([
self GOBJECT]), responseId, (setting ? TRUE : FALSE));
134 -(void)setShowCloseButton:(BOOL) setting
136 gtk_info_bar_set_show_close_button(GTK_INFO_BAR([
self GOBJECT]), (setting ? TRUE : FALSE));
id initWithGObject:(GObject *obj)
CGTKWidget * getActionArea()
CGTKWidget * getContentArea()
BOOL getShowCloseButton()
GtkMessageType getMessageType()