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

- Main Page
- Classes
- Files

- File List

All Classes Functions Variables
CGTKScrolledWindow.m
1 /*
2 * CGTKScrolledWindow.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2015 - 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, 2015. 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 -(GtkCornerType)getPlacement
89 {
90 return gtk_scrolled_window_get_placement(GTK_SCROLLED_WINDOW([self GOBJECT]));
91 }
92
93 -(void)getPolicyWithHscrollbarPolicy:(GtkPolicyType*) hscrollbarPolicy andVscrollbarPolicy:(GtkPolicyType*) vscrollbarPolicy
94 {
95 gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW([self GOBJECT]), hscrollbarPolicy, vscrollbarPolicy);
96 }
97
98 -(GtkShadowType)getShadowType
99 {
100 return gtk_scrolled_window_get_shadow_type(GTK_SCROLLED_WINDOW([self GOBJECT]));
101 }
102
103 -(GtkAdjustment*)getVadjustment
104 {
105 return gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]));
106 }
107
108 -(CGTKWidget*)getVscrollbar
109 {
110 return [[CGTKWidget alloc] initWithGObject:(GObject *)gtk_scrolled_window_get_vscrollbar(GTK_SCROLLED_WINDOW([self GOBJECT]))];
111 }
112
113 -(void)setCaptureButtonPress:(BOOL) captureButtonPress
114 {
115 gtk_scrolled_window_set_capture_button_press(GTK_SCROLLED_WINDOW([self GOBJECT]), (captureButtonPress ? TRUE : FALSE));
116 }
117
118 -(void)setHadjustment:(GtkAdjustment*) hadjustment
119 {
120 gtk_scrolled_window_set_hadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]), hadjustment);
121 }
122
123 -(void)setKineticScrolling:(BOOL) kineticScrolling
124 {
125 gtk_scrolled_window_set_kinetic_scrolling(GTK_SCROLLED_WINDOW([self GOBJECT]), (kineticScrolling ? TRUE : FALSE));
126 }
127
128 -(void)setMinContentHeight:(gint) height
129 {
130 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW([self GOBJECT]), height);
131 }
132
133 -(void)setMinContentWidth:(gint) width
134 {
135 gtk_scrolled_window_set_min_content_width(GTK_SCROLLED_WINDOW([self GOBJECT]), width);
136 }
137
138 -(void)setPlacement:(GtkCornerType) windowPlacement
139 {
140 gtk_scrolled_window_set_placement(GTK_SCROLLED_WINDOW([self GOBJECT]), windowPlacement);
141 }
142
143 -(void)setPolicyWithHscrollbarPolicy:(GtkPolicyType) hscrollbarPolicy andVscrollbarPolicy:(GtkPolicyType) vscrollbarPolicy
144 {
145 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW([self GOBJECT]), hscrollbarPolicy, vscrollbarPolicy);
146 }
147
148 -(void)setShadowType:(GtkShadowType) type
149 {
150 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW([self GOBJECT]), type);
151 }
152
153 -(void)setVadjustment:(GtkAdjustment*) vadjustment
154 {
155 gtk_scrolled_window_set_vadjustment(GTK_SCROLLED_WINDOW([self GOBJECT]), vadjustment);
156 }
157
158 -(void)unsetPlacement
159 {
160 gtk_scrolled_window_unset_placement(GTK_SCROLLED_WINDOW([self GOBJECT]));
161 }
162
163
164 @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:98
-[CGTKScrolledWindow getVscrollbar]
CGTKWidget * getVscrollbar()
Definition: CGTKScrolledWindow.m:108
-[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 getHscrollbar]
CGTKWidget * getHscrollbar()
Definition: CGTKScrolledWindow.m:68
-[CGTKScrolledWindow getPlacement]
GtkCornerType getPlacement()
Definition: CGTKScrolledWindow.m:88
CGTKWidget
Definition: CGTKWidget.h:34
-[CGTKScrolledWindow getVadjustment]
GtkAdjustment * getVadjustment()
Definition: CGTKScrolledWindow.m:103
-[CGTKScrolledWindow getCaptureButtonPress]
BOOL getCaptureButtonPress()
Definition: CGTKScrolledWindow.m:58
-[CGTKScrolledWindow unsetPlacement]
void unsetPlacement()
Definition: CGTKScrolledWindow.m:158
-[CGTKScrolledWindow getMinContentHeight]
gint getMinContentHeight()
Definition: CGTKScrolledWindow.m:78
-[CGTKScrolledWindow getMinContentWidth]
gint getMinContentWidth()
Definition: CGTKScrolledWindow.m:83