CoreGTK 3.18.0 CoreGTK is an Objective-C language binding for the GTK+ widget toolkit

- Main Page
- Classes
- Files

- File List

CGTKToolItem.m
1 /*
2 * CGTKToolItem.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2016 - Tyler Burton
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /*
23 * Modified by the CoreGTK Team, 2016. See the AUTHORS file for a
24 * list of people on the CoreGTK Team.
25 * See the ChangeLog files for a list of changes.
26 *
27 */
28
29 /*
30 * Objective-C imports
31 */
32 #import "CoreGTK/CGTKToolItem.h"
33
34 @implementation CGTKToolItem
35
36 -(id)init
37 {
38 self = [super initWithGObject:(GObject *)gtk_tool_item_new()];
39
40 if(self)
41 {
42 //Do nothing
43 }
44
45 return self;
46 }
47
48 -(GtkToolItem*)TOOLITEM
49 {
50 return GTK_TOOL_ITEM([self GOBJECT]);
51 }
52
53 -(PangoEllipsizeMode)getEllipsizeMode
54 {
55 return gtk_tool_item_get_ellipsize_mode(GTK_TOOL_ITEM([self GOBJECT]));
56 }
57
58 -(BOOL)getExpand
59 {
60 return (gtk_tool_item_get_expand(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
61 }
62
63 -(BOOL)getHomogeneous
64 {
65 return (gtk_tool_item_get_homogeneous(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
66 }
67
68 -(GtkIconSize)getIconSize
69 {
70 return gtk_tool_item_get_icon_size(GTK_TOOL_ITEM([self GOBJECT]));
71 }
72
73 -(BOOL)getIsImportant
74 {
75 return (gtk_tool_item_get_is_important(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
76 }
77
78 -(GtkOrientation)getOrientation
79 {
80 return gtk_tool_item_get_orientation(GTK_TOOL_ITEM([self GOBJECT]));
81 }
82
83 -(CGTKWidget*)getProxyMenuItem:(NSString*) menuItemId
84 {
85 return [[CGTKWidget alloc] initWithGObject:(GObject *)gtk_tool_item_get_proxy_menu_item(GTK_TOOL_ITEM([self GOBJECT]), [menuItemId UTF8String])];
86 }
87
88 -(GtkReliefStyle)getReliefStyle
89 {
90 return gtk_tool_item_get_relief_style(GTK_TOOL_ITEM([self GOBJECT]));
91 }
92
93 -(gfloat)getTextAlignment
94 {
95 return gtk_tool_item_get_text_alignment(GTK_TOOL_ITEM([self GOBJECT]));
96 }
97
98 -(GtkOrientation)getTextOrientation
99 {
100 return gtk_tool_item_get_text_orientation(GTK_TOOL_ITEM([self GOBJECT]));
101 }
102
103 -(GtkSizeGroup*)getTextSizeGroup
104 {
105 return gtk_tool_item_get_text_size_group(GTK_TOOL_ITEM([self GOBJECT]));
106 }
107
108 -(GtkToolbarStyle)getToolbarStyle
109 {
110 return gtk_tool_item_get_toolbar_style(GTK_TOOL_ITEM([self GOBJECT]));
111 }
112
113 -(BOOL)getUseDragWindow
114 {
115 return (gtk_tool_item_get_use_drag_window(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
116 }
117
118 -(BOOL)getVisibleHorizontal
119 {
120 return (gtk_tool_item_get_visible_horizontal(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
121 }
122
123 -(BOOL)getVisibleVertical
124 {
125 return (gtk_tool_item_get_visible_vertical(GTK_TOOL_ITEM([self GOBJECT])) ? YES : NO);
126 }
127
128 -(void)rebuildMenu
129 {
130 gtk_tool_item_rebuild_menu(GTK_TOOL_ITEM([self GOBJECT]));
131 }
132
133 -(CGTKWidget*)retrieveProxyMenuItem
134 {
135 return [[CGTKWidget alloc] initWithGObject:(GObject *)gtk_tool_item_retrieve_proxy_menu_item(GTK_TOOL_ITEM([self GOBJECT]))];
136 }
137
138 -(void)setExpand:(BOOL) expand
139 {
140 gtk_tool_item_set_expand(GTK_TOOL_ITEM([self GOBJECT]), (expand ? TRUE : FALSE));
141 }
142
143 -(void)setHomogeneous:(BOOL) homogeneous
144 {
145 gtk_tool_item_set_homogeneous(GTK_TOOL_ITEM([self GOBJECT]), (homogeneous ? TRUE : FALSE));
146 }
147
148 -(void)setIsImportant:(BOOL) isImportant
149 {
150 gtk_tool_item_set_is_important(GTK_TOOL_ITEM([self GOBJECT]), (isImportant ? TRUE : FALSE));
151 }
152
153 -(void)setProxyMenuItemWithMenuItemId:(NSString*) menuItemId andMenuItem:(CGTKWidget*) menuItem
154 {
155 gtk_tool_item_set_proxy_menu_item(GTK_TOOL_ITEM([self GOBJECT]), [menuItemId UTF8String], [menuItem WIDGET]);
156 }
157
158 -(void)setTooltipMarkup:(NSString*) markup
159 {
160 gtk_tool_item_set_tooltip_markup(GTK_TOOL_ITEM([self GOBJECT]), [markup UTF8String]);
161 }
162
163 -(void)setTooltipText:(NSString*) text
164 {
165 gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM([self GOBJECT]), [text UTF8String]);
166 }
167
168 -(void)setUseDragWindow:(BOOL) useDragWindow
169 {
170 gtk_tool_item_set_use_drag_window(GTK_TOOL_ITEM([self GOBJECT]), (useDragWindow ? TRUE : FALSE));
171 }
172
173 -(void)setVisibleHorizontal:(BOOL) visibleHorizontal
174 {
175 gtk_tool_item_set_visible_horizontal(GTK_TOOL_ITEM([self GOBJECT]), (visibleHorizontal ? TRUE : FALSE));
176 }
177
178 -(void)setVisibleVertical:(BOOL) visibleVertical
179 {
180 gtk_tool_item_set_visible_vertical(GTK_TOOL_ITEM([self GOBJECT]), (visibleVertical ? TRUE : FALSE));
181 }
182
183 -(void)toolbarReconfigured
184 {
185 gtk_tool_item_toolbar_reconfigured(GTK_TOOL_ITEM([self GOBJECT]));
186 }
187
188
189 @end
-[CGTKToolItem getUseDragWindow]
BOOL getUseDragWindow()
Definition: CGTKToolItem.m:113
-[CGTKToolItem getOrientation]
GtkOrientation getOrientation()
Definition: CGTKToolItem.m:78
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKToolItem getVisibleHorizontal]
BOOL getVisibleHorizontal()
Definition: CGTKToolItem.m:118
-[CGTKToolItem getTextOrientation]
GtkOrientation getTextOrientation()
Definition: CGTKToolItem.m:98
-[CGTKToolItem getToolbarStyle]
GtkToolbarStyle getToolbarStyle()
Definition: CGTKToolItem.m:108
-[CGTKBase initWithGObject:]
id initWithGObject:(GObject *obj)
Definition: CGTKBase.m:48
-[CGTKToolItem getIconSize]
GtkIconSize getIconSize()
Definition: CGTKToolItem.m:68
-[CGTKToolItem getVisibleVertical]
BOOL getVisibleVertical()
Definition: CGTKToolItem.m:123
-[CGTKToolItem getReliefStyle]
GtkReliefStyle getReliefStyle()
Definition: CGTKToolItem.m:88
-[CGTKToolItem toolbarReconfigured]
void toolbarReconfigured()
Definition: CGTKToolItem.m:183
-[CGTKWidget WIDGET]
GtkWidget * WIDGET()
Definition: CGTKWidget.m:61
CGTKToolItem
Definition: CGTKToolItem.h:34
-[CGTKToolItem rebuildMenu]
void rebuildMenu()
Definition: CGTKToolItem.m:128
-[CGTKToolItem getTextAlignment]
gfloat getTextAlignment()
Definition: CGTKToolItem.m:93
-[CGTKToolItem init]
id init()
Definition: CGTKToolItem.m:36
-[CGTKToolItem getExpand]
BOOL getExpand()
Definition: CGTKToolItem.m:58
-[CGTKToolItem TOOLITEM]
GtkToolItem * TOOLITEM()
Definition: CGTKToolItem.m:48
CGTKWidget
Definition: CGTKWidget.h:34
-[CGTKToolItem getIsImportant]
BOOL getIsImportant()
Definition: CGTKToolItem.m:73
-[CGTKToolItem getHomogeneous]
BOOL getHomogeneous()
Definition: CGTKToolItem.m:63
-[CGTKToolItem retrieveProxyMenuItem]
CGTKWidget * retrieveProxyMenuItem()
Definition: CGTKToolItem.m:133
-[CGTKToolItem getTextSizeGroup]
GtkSizeGroup * getTextSizeGroup()
Definition: CGTKToolItem.m:103
-[CGTKToolItem getEllipsizeMode]
PangoEllipsizeMode getEllipsizeMode()
Definition: CGTKToolItem.m:53