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

CGTKToolbar.m
1 /*
2 * CGTKToolbar.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2017 - 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, 2017. 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/CGTKToolbar.h"
33
34 @implementation CGTKToolbar
35
36 -(id)init
37 {
38 self = [super initWithGObject:(GObject *)gtk_toolbar_new()];
39
40 if(self)
41 {
42 //Do nothing
43 }
44
45 return self;
46 }
47
48 -(GtkToolbar*)TOOLBAR
49 {
50 return GTK_TOOLBAR([self GOBJECT]);
51 }
52
53 -(gint)getDropIndexWithX:(gint) x andY:(gint) y
54 {
55 return gtk_toolbar_get_drop_index(GTK_TOOLBAR([self GOBJECT]), x, y);
56 }
57
58 -(GtkIconSize)getIconSize
59 {
60 return gtk_toolbar_get_icon_size(GTK_TOOLBAR([self GOBJECT]));
61 }
62
63 -(gint)getItemIndex:(GtkToolItem*) item
64 {
65 return gtk_toolbar_get_item_index(GTK_TOOLBAR([self GOBJECT]), item);
66 }
67
68 -(gint)getNitems
69 {
70 return gtk_toolbar_get_n_items(GTK_TOOLBAR([self GOBJECT]));
71 }
72
73 -(GtkToolItem*)getNthItem:(gint) n
74 {
75 return gtk_toolbar_get_nth_item(GTK_TOOLBAR([self GOBJECT]), n);
76 }
77
78 -(GtkReliefStyle)getReliefStyle
79 {
80 return gtk_toolbar_get_relief_style(GTK_TOOLBAR([self GOBJECT]));
81 }
82
83 -(BOOL)getShowArrow
84 {
85 return (gtk_toolbar_get_show_arrow(GTK_TOOLBAR([self GOBJECT])) ? YES : NO);
86 }
87
88 -(GtkToolbarStyle)getStyle
89 {
90 return gtk_toolbar_get_style(GTK_TOOLBAR([self GOBJECT]));
91 }
92
93 -(void)insertWithItem:(GtkToolItem*) item andPos:(gint) pos
94 {
95 gtk_toolbar_insert(GTK_TOOLBAR([self GOBJECT]), item, pos);
96 }
97
98 -(void)setDropHighlightItemWithToolItem:(GtkToolItem*) toolItem andIndex:(gint) index
99 {
100 gtk_toolbar_set_drop_highlight_item(GTK_TOOLBAR([self GOBJECT]), toolItem, index);
101 }
102
103 -(void)setIconSize:(GtkIconSize) iconSize
104 {
105 gtk_toolbar_set_icon_size(GTK_TOOLBAR([self GOBJECT]), iconSize);
106 }
107
108 -(void)setShowArrow:(BOOL) showArrow
109 {
110 gtk_toolbar_set_show_arrow(GTK_TOOLBAR([self GOBJECT]), (showArrow ? TRUE : FALSE));
111 }
112
113 -(void)setStyle:(GtkToolbarStyle) style
114 {
115 gtk_toolbar_set_style(GTK_TOOLBAR([self GOBJECT]), style);
116 }
117
118 -(void)unsetIconSize
119 {
120 gtk_toolbar_unset_icon_size(GTK_TOOLBAR([self GOBJECT]));
121 }
122
123 -(void)unsetStyle
124 {
125 gtk_toolbar_unset_style(GTK_TOOLBAR([self GOBJECT]));
126 }
127
128
129 @end
-[CGTKToolbar getShowArrow]
BOOL getShowArrow()
Definition: CGTKToolbar.m:83
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKToolbar unsetIconSize]
void unsetIconSize()
Definition: CGTKToolbar.m:118
-[CGTKBase initWithGObject:]
id initWithGObject:(GObject *obj)
Definition: CGTKBase.m:48
CGTKToolbar
Definition: CGTKToolbar.h:34
-[CGTKToolbar getNitems]
gint getNitems()
Definition: CGTKToolbar.m:68
-[CGTKToolbar getReliefStyle]
GtkReliefStyle getReliefStyle()
Definition: CGTKToolbar.m:78
-[CGTKToolbar getIconSize]
GtkIconSize getIconSize()
Definition: CGTKToolbar.m:58
-[CGTKToolbar unsetStyle]
void unsetStyle()
Definition: CGTKToolbar.m:123
-[CGTKToolbar getStyle]
GtkToolbarStyle getStyle()
Definition: CGTKToolbar.m:88
-[CGTKToolbar TOOLBAR]
GtkToolbar * TOOLBAR()
Definition: CGTKToolbar.m:48
-[CGTKToolbar init]
id init()
Definition: CGTKToolbar.m:36