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

CGTKRange.m
1 /*
2 * CGTKRange.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/CGTKRange.h"
33
34 @implementation CGTKRange
35
36 -(GtkRange*)RANGE
37 {
38 return GTK_RANGE([self GOBJECT]);
39 }
40
41 -(GtkAdjustment*)getAdjustment
42 {
43 return gtk_range_get_adjustment(GTK_RANGE([self GOBJECT]));
44 }
45
46 -(gdouble)getFillLevel
47 {
48 return gtk_range_get_fill_level(GTK_RANGE([self GOBJECT]));
49 }
50
51 -(BOOL)getFlippable
52 {
53 return (gtk_range_get_flippable(GTK_RANGE([self GOBJECT])) ? YES : NO);
54 }
55
56 -(BOOL)getInverted
57 {
58 return (gtk_range_get_inverted(GTK_RANGE([self GOBJECT])) ? YES : NO);
59 }
60
61 -(GtkSensitivityType)getLowerStepperSensitivity
62 {
63 return gtk_range_get_lower_stepper_sensitivity(GTK_RANGE([self GOBJECT]));
64 }
65
66 -(gint)getMinSliderSize
67 {
68 return gtk_range_get_min_slider_size(GTK_RANGE([self GOBJECT]));
69 }
70
71 -(void)getRangeRect:(GdkRectangle*) rangeRect
72 {
73 gtk_range_get_range_rect(GTK_RANGE([self GOBJECT]), rangeRect);
74 }
75
76 -(BOOL)getRestrictToFillLevel
77 {
78 return (gtk_range_get_restrict_to_fill_level(GTK_RANGE([self GOBJECT])) ? YES : NO);
79 }
80
81 -(gint)getRoundDigits
82 {
83 return gtk_range_get_round_digits(GTK_RANGE([self GOBJECT]));
84 }
85
86 -(BOOL)getShowFillLevel
87 {
88 return (gtk_range_get_show_fill_level(GTK_RANGE([self GOBJECT])) ? YES : NO);
89 }
90
91 -(void)getSliderRangeWithSliderStart:(gint*) sliderStart andSliderEnd:(gint*) sliderEnd
92 {
93 gtk_range_get_slider_range(GTK_RANGE([self GOBJECT]), sliderStart, sliderEnd);
94 }
95
96 -(BOOL)getSliderSizeFixed
97 {
98 return (gtk_range_get_slider_size_fixed(GTK_RANGE([self GOBJECT])) ? YES : NO);
99 }
100
101 -(GtkSensitivityType)getUpperStepperSensitivity
102 {
103 return gtk_range_get_upper_stepper_sensitivity(GTK_RANGE([self GOBJECT]));
104 }
105
106 -(gdouble)getValue
107 {
108 return gtk_range_get_value(GTK_RANGE([self GOBJECT]));
109 }
110
111 -(void)setAdjustment:(GtkAdjustment*) adjustment
112 {
113 gtk_range_set_adjustment(GTK_RANGE([self GOBJECT]), adjustment);
114 }
115
116 -(void)setFillLevel:(gdouble) fillLevel
117 {
118 gtk_range_set_fill_level(GTK_RANGE([self GOBJECT]), fillLevel);
119 }
120
121 -(void)setFlippable:(BOOL) flippable
122 {
123 gtk_range_set_flippable(GTK_RANGE([self GOBJECT]), (flippable ? TRUE : FALSE));
124 }
125
126 -(void)setIncrementsWithStep:(gdouble) step andPage:(gdouble) page
127 {
128 gtk_range_set_increments(GTK_RANGE([self GOBJECT]), step, page);
129 }
130
131 -(void)setInverted:(BOOL) setting
132 {
133 gtk_range_set_inverted(GTK_RANGE([self GOBJECT]), (setting ? TRUE : FALSE));
134 }
135
136 -(void)setLowerStepperSensitivity:(GtkSensitivityType) sensitivity
137 {
138 gtk_range_set_lower_stepper_sensitivity(GTK_RANGE([self GOBJECT]), sensitivity);
139 }
140
141 -(void)setMinSliderSize:(gint) minSize
142 {
143 gtk_range_set_min_slider_size(GTK_RANGE([self GOBJECT]), minSize);
144 }
145
146 -(void)setRangeWithMin:(gdouble) min andMax:(gdouble) max
147 {
148 gtk_range_set_range(GTK_RANGE([self GOBJECT]), min, max);
149 }
150
151 -(void)setRestrictToFillLevel:(BOOL) restrictToFillLevel
152 {
153 gtk_range_set_restrict_to_fill_level(GTK_RANGE([self GOBJECT]), (restrictToFillLevel ? TRUE : FALSE));
154 }
155
156 -(void)setRoundDigits:(gint) roundDigits
157 {
158 gtk_range_set_round_digits(GTK_RANGE([self GOBJECT]), roundDigits);
159 }
160
161 -(void)setShowFillLevel:(BOOL) showFillLevel
162 {
163 gtk_range_set_show_fill_level(GTK_RANGE([self GOBJECT]), (showFillLevel ? TRUE : FALSE));
164 }
165
166 -(void)setSliderSizeFixed:(BOOL) sizeFixed
167 {
168 gtk_range_set_slider_size_fixed(GTK_RANGE([self GOBJECT]), (sizeFixed ? TRUE : FALSE));
169 }
170
171 -(void)setUpperStepperSensitivity:(GtkSensitivityType) sensitivity
172 {
173 gtk_range_set_upper_stepper_sensitivity(GTK_RANGE([self GOBJECT]), sensitivity);
174 }
175
176 -(void)setValue:(gdouble) value
177 {
178 gtk_range_set_value(GTK_RANGE([self GOBJECT]), value);
179 }
180
181
182 @end
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKRange getFillLevel]
gdouble getFillLevel()
Definition: CGTKRange.m:46
-[CGTKRange getSliderSizeFixed]
BOOL getSliderSizeFixed()
Definition: CGTKRange.m:96
-[CGTKRange getLowerStepperSensitivity]
GtkSensitivityType getLowerStepperSensitivity()
Definition: CGTKRange.m:61
-[CGTKRange getAdjustment]
GtkAdjustment * getAdjustment()
Definition: CGTKRange.m:41
-[CGTKRange getMinSliderSize]
gint getMinSliderSize()
Definition: CGTKRange.m:66
-[CGTKRange getUpperStepperSensitivity]
GtkSensitivityType getUpperStepperSensitivity()
Definition: CGTKRange.m:101
-[CGTKRange getFlippable]
BOOL getFlippable()
Definition: CGTKRange.m:51
-[CGTKRange getInverted]
BOOL getInverted()
Definition: CGTKRange.m:56
-[CGTKRange getShowFillLevel]
BOOL getShowFillLevel()
Definition: CGTKRange.m:86
-[CGTKRange RANGE]
GtkRange * RANGE()
Definition: CGTKRange.m:36
CGTKRange
Definition: CGTKRange.h:34
-[CGTKRange getRestrictToFillLevel]
BOOL getRestrictToFillLevel()
Definition: CGTKRange.m:76
-[CGTKRange getRoundDigits]
gint getRoundDigits()
Definition: CGTKRange.m:81
-[CGTKRange getValue]
gdouble getValue()
Definition: CGTKRange.m:106