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

- Main Page
- Classes
- Files

- File List

CGTKScrolledWindow.m
1 /*
2 * CGTKScrolledWindow.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/CGTKScrolledWindow.h"
33
34 @implementation CGTKScrolledWindow
35
36 -(id)initWithHadjustment:(GtkAdjustment*) hadjustment andVadjustment:(GtkAdjustment*) vadjustment
37 {
38 self = [super initWithGObject:(GObject *)gtk_scrolled_window_new(hadjustment, vadjustment)];
39
40 if(self)
41 {
42 //Do nothing
43 }
44
45 return self;
46 }
47
48 -(GtkScrolledWindow*)SCROLLEDWINDOW
49 {
50 return GTK_SCROLLED_WINDOW([self GOBJECT]);
51 }
52
53 -(void)addWithViewport:(CGTKWidget*) child
54 {
55 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW([self GOBJECT]), [child WIDGET]);
56 }
57
58 -(BOOL)getCaptureButtonPress
59 {
60 return (gtk_scrolled_window_get_capture_button_press(GTK_SCROLLED_WINDOW([self GOBJECT])) ? YES : NO);
61 }
62
63 -(GtkAdjustment*)getHadjustment
64 {
65 return gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]));
66 }
67
68 -(CGTKWidget*)getHscrollbar
69 {
70 return [[CGTKWidget alloc] initWithGObject:(GObject *)gtk_scrolled_window_get_hscrollbar(GTK_SCROLLED_WINDOW([self GOBJECT]))];
71 }
72
73 -(BOOL)getKineticScrolling
74 {
75 return (gtk_scrolled_window_get_kinetic_scrolling(GTK_SCROLLED_WINDOW([self GOBJECT])) ? YES : NO);
76 }
77
78 -(gint)getMinContentHeight
79 {
80 return gtk_scrolled_window_get_min_content_height(GTK_SCROLLED_WINDOW([self GOBJECT]));
81 }
82
83 -(gint)getMinContentWidth
84 {
85 return gtk_scrolled_window_get_min_content_width(GTK_SCROLLED_WINDOW([self GOBJECT]));
86 }
87
88 -(BOOL)getOverlayScrolling
89 {
90 return (gtk_scrolled_window_get_overlay_scrolling(GTK_SCROLLED_WINDOW([self GOBJECT])) ? YES : NO);
91 }
92
93 -(GtkCornerType)getPlacement
94 {
95 return gtk_scrolled_window_get_placement(GTK_SCROLLED_WINDOW([self GOBJECT]));
96 }
97
98 -(void)getPolicyWithHscrollbarPolicy:(GtkPolicyType*) hscrollbarPolicy andVscrollbarPolicy:(GtkPolicyType*) vscrollbarPolicy
99 {
100 gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW([self GOBJECT]), hscrollbarPolicy, vscrollbarPolicy);
101 }
102
103 -(GtkShadowType)getShadowType
104 {
105 return gtk_scrolled_window_get_shadow_type(GTK_SCROLLED_WINDOW([self GOBJECT]));
106 }
107
108 -(GtkAdjustment*)getVadjustment
109 {
110 return gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]));
111 }
112
113 -(CGTKWidget*)getVscrollbar
114 {
115 return [[CGTKWidget alloc] initWithGObject:(GObject *)gtk_scrolled_window_get_vscrollbar(GTK_SCROLLED_WINDOW([self GOBJECT]))];
116 }
117
118 -(void)setCaptureButtonPress:(BOOL) captureButtonPress
119 {
120 gtk_scrolled_window_set_capture_button_press(GTK_SCROLLED_WINDOW([self GOBJECT]), (captureButtonPress ? TRUE : FALSE));
121 }
122
123 -(void)setHadjustment:(GtkAdjustment*) hadjustment
124 {
125 gtk_scrolled_window_set_hadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]), hadjustment);
126 }
127
128 -(void)setKineticScrolling:(BOOL) kineticScrolling
129 {
130 gtk_scrolled_window_set_kinetic_scrolling(GTK_SCROLLED_WINDOW([self GOBJECT]), (kineticScrolling ? TRUE : FALSE));
131 }
132
133 -(void)setMinContentHeight:(gint) height
134 {
135 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW([self GOBJECT]), height);
136 }
137
138 -(void)setMinContentWidth:(gint) width
139 {
140 gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW([self GOBJECT]), width);
141 }
142
143 -(void)setOverlayScrolling:(BOOL) overlayScrolling
144 {
145 gtk_scrolled_window_set_overlay_scrolling(GTK_SCROLLED_WINDOW([self GOBJECT]), (overlayScrolling ? TRUE : FALSE));
146 }
147
148 -(void)setPlacement:(GtkCornerType) windowPlacement
149 {
150 gtk_scrolled_window_set_placement(GTK_SCROLLED_WINDOW([self GOBJECT]), windowPlacement);
151 }
152
153 -(void)setPolicyWithHscrollbarPolicy:(GtkPolicyType) hscrollbarPolicy andVscrollbarPolicy:(GtkPolicyType) vscrollbarPolicy
154 {
155 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW([self GOBJECT]), hscrollbarPolicy, vscrollbarPolicy);
156 }
157
158 -(void)setShadowType:(GtkShadowType) type
159 {
160 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW([self GOBJECT]), type);
161 }
162
163 -(void)setVadjustment:(GtkAdjustment*) vadjustment
164 {
165 gtk_scrolled_window_set_vadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]), vadjustment);
166 }
167
168 -(void)unsetPlacement
169 {
170 gtk_scrolled_window_unset_placement(GTK_SCROLLED_WINDOW([self GOBJECT]));
171 }
172
173
174 @end
-[CGTKScrolledWindow SCROLLEDWINDOW]
GtkScrolledWindow * SCROLLEDWINDOW()
Definition: CGTKScrolledWindow.m:48
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKScrolledWindow getKineticScrolling]
BOOL getKineticScrolling()
Definition: CGTKScrolledWindow.m:73
-[CGTKScrolledWindow getShadowType]
GtkShadowType getShadowType()
Definition: CGTKScrolledWindow.m:103
-[CGTKScrolledWindow getVscrollbar]
CGTKWidget * getVscrollbar()
Definition: CGTKScrolledWindow.m:113
-[CGTKBase initWithGObject:]
id initWithGObject:(GObject *obj)
Definition: CGTKBase.m:48
-[CGTKScrolledWindow getHadjustment]
GtkAdjustment * getHadjustment()
Definition: CGTKScrolledWindow.m:63
CGTKScrolledWindow
Definition: CGTKScrolledWindow.h:34
-[CGTKWidget WIDGET]
GtkWidget * WIDGET()
Definition: CGTKWidget.m:61
-[CGTKScrolledWindow getOverlayScrolling]
BOOL getOverlayScrolling()
Definition: CGTKScrolledWindow.m:88
-[CGTKScrolledWindow getHscrollbar]
CGTKWidget * getHscrollbar()
Definition: CGTKScrolledWindow.m:68
-[CGTKScrolledWindow getPlacement]
GtkCornerType getPlacement()
Definition: CGTKScrolledWindow.m:93
CGTKWidget
Definition: CGTKWidget.h:34
-[CGTKScrolledWindow getVadjustment]
GtkAdjustment * getVadjustment()
Definition: CGTKScrolledWindow.m:108
-[CGTKScrolledWindow getCaptureButtonPress]
BOOL getCaptureButtonPress()
Definition: CGTKScrolledWindow.m:58
-[CGTKScrolledWindow unsetPlacement]
void unsetPlacement()
Definition: CGTKScrolledWindow.m:168
-[CGTKScrolledWindow getMinContentHeight]
gint getMinContentHeight()
Definition: CGTKScrolledWindow.m:78
-[CGTKScrolledWindow getMinContentWidth]
gint getMinContentWidth()
Definition: CGTKScrolledWindow.m:83