/src/wrappers/gtk/library/gtk_viewport.e
Specman e | 187 lines | 66 code | 48 blank | 73 comment | 2 complexity | 6db256b5d40dadf6bd66e3b6b9e7fbee MD5 | raw file
1indexing 2 description: "GtkViewport, An adapter which makes widgets scrollable." 3 copyright: "[ 4 Copyright (C) 2007 $EWLC_developer, $original_copyright_holder 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 22class GTK_VIEWPORT 23 -- GtkViewport — An adapter which makes widgets scrollable 24 25inherit GTK_BIN 26 -- TODO: GtkViewport implements AtkImplementorIface. 27 28insert GTK_ADJUSTMENT_EXTERNALS -- Needed by dummy_gobject 29 30creation dummy, make, from_external_pointer 31 32feature {} -- Creation 33 make (an_orizontal_adjustment, a_vertical_adjustment: GTK_ADJUSTMENT) is 34 -- Creates a new GtkViewport with the given adjustments. 35 require 36 orizontal_adjustment_not_void: an_orizontal_adjustment /= Void 37 vertical_adjustment_not_void: a_vertical_adjustment /= Void 38 do 39 from_external_pointer(gtk_viewport_new(an_orizontal_adjustment.handle, 40 a_vertical_adjustment.handle)) 41 end 42 43 -- hadjustment : horizontal adjustment. 44 -- vadjustment : vertical adjustment. 45 -- Returns : a new GtkViewport. 46 -- gtk_viewport_get_hadjustment () 47 48 -- GtkAdjustment* gtk_viewport_get_hadjustment (GtkViewport *viewport); 49 50 -- Returns the horizontal adjustment of the viewport. 51 52 -- viewport : a GtkViewport. 53 -- Returns : the horizontal adjustment of viewport. 54 -- gtk_viewport_get_vadjustment () 55 56 -- GtkAdjustment* gtk_viewport_get_vadjustment (GtkViewport *viewport); 57 58 -- Returns the vertical adjustment of the viewport. 59 60 -- viewport : a GtkViewport. 61 -- Returns : the vertical adjustment of viewport. 62 -- gtk_viewport_set_hadjustment () 63 64 -- void gtk_viewport_set_hadjustment (GtkViewport *viewport, 65 -- GtkAdjustment *adjustment); 66 67 -- Sets the horizontal adjustment of the viewport. 68 69 -- viewport : a GtkViewport. 70 -- adjustment : a GtkAdjustment. 71 -- gtk_viewport_set_vadjustment () 72 73 -- void gtk_viewport_set_vadjustment (GtkViewport *viewport, 74 -- GtkAdjustment *adjustment); 75 76 -- Sets the vertical adjustment of the viewport. 77 78 -- viewport : a GtkViewport. 79 -- adjustment : a GtkAdjustment. 80 -- gtk_viewport_set_shadow_type () 81 82 -- void gtk_viewport_set_shadow_type (GtkViewport *viewport, 83 -- GtkShadowType type); 84 85 -- Sets the shadow type of the viewport. 86 87 -- viewport : a GtkViewport. 88 -- type : the new shadow type. 89 -- gtk_viewport_get_shadow_type () 90 91 -- GtkShadowType gtk_viewport_get_shadow_type (GtkViewport *viewport); 92 93 -- Gets the shadow type of the GtkViewport. See gtk_viewport_set_shadow_type(). 94 95 -- viewport : a GtkViewport 96 -- Returns : the shadow type 97 -- Properties 98 99 -- "hadjustment" GtkAdjustment : Read / Write / Construct 100 -- "shadow-type" GtkShadowType : Read / Write 101 -- "vadjustment" GtkAdjustment : Read / Write / Construct 102 103 -- Property Details 104 -- The "hadjustment" property 105 106 -- "hadjustment" GtkAdjustment : Read / Write / Construct 107 108 -- The GtkAdjustment that determines the values of the horizontal position for this viewport. 109 -- The "shadow-type" property 110 111 -- "shadow-type" GtkShadowType : Read / Write 112 113 -- Determines how the shadowed box around the viewport is drawn. 114 115 -- Default value: GTK_SHADOW_IN 116 -- The "vadjustment" property 117 118 -- "vadjustment" GtkAdjustment : Read / Write / Construct 119 120 -- The GtkAdjustment that determines the values of the vertical position for this viewport. 121 -- Signals 122 123 -- "set-scroll-adjustments" : Run Last / Action 124 125 126 -- Signal Details 127 -- The "set-scroll-adjustments" signal 128 129 -- void user_function (GtkViewport *viewport, 130 -- GtkAdjustment *arg1, 131 -- GtkAdjustment *arg2, 132 -- gpointer user_data) : Run Last / Action 133 134 -- viewport : the object which received the signal. 135 -- arg1 : 136 -- arg2 : 137 -- user_data : user data set when the signal handler was connected. 138feature {} -- External calls 139 gtk_viewport_new (a_hadjustment, a_vadjustment: POINTER): POINTER is 140 -- GtkWidget* gtk_viewport_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); 141 external "C use <gtk/gtk.h>" 142 end 143 144 gtk_viewport_get_hadjustment (a_viewport: POINTER): POINTER is 145 -- GtkAdjustment* gtk_viewport_get_hadjustment (GtkViewport *viewport); 146 external "C use <gtk/gtk.h>" 147 end 148 149 gtk_viewport_get_vadjustment (a_viewport: POINTER): POINTER is 150 -- GtkAdjustment* gtk_viewport_get_vadjustment (GtkViewport *viewport); 151 external "C use <gtk/gtk.h>" 152 end 153 154 gtk_viewport_set_hadjustment (a_viewport, a_adjustment: POINTER) is 155 -- void gtk_viewport_set_hadjustment (GtkViewport *viewport, GtkAdjustment *adjustment); 156 external "C use <gtk/gtk.h>" 157 end 158 159 gtk_viewport_set_vadjustment (a_viewport, a_adjustment: POINTER) is 160 -- void gtk_viewport_set_vadjustment (GtkViewport *viewport, GtkAdjustment *adjustment); 161 external "C use <gtk/gtk.h>" 162 end 163 164 gtk_viewport_set_shadow_type (a_viewport: POINTER; a_gtkshadowtype: INTEGER) is 165 -- void gtk_viewport_set_shadow_type (GtkViewport *viewport, GtkShadowType type); 166 external "C use <gtk/gtk.h>" 167 end 168 169 gtk_viewport_get_shadow_type (a_viewport: POINTER): INTEGER is 170 -- GtkShadowType gtk_viewport_get_shadow_type (GtkViewport *viewport); 171 external "C use <gtk/gtk.h>" 172 end 173 174feature -- size 175 struct_size: INTEGER is 176 external "C inline use <gtk/gtk.h>" 177 alias "sizeof(GtkViewport)" 178 end 179 dummy_gobject: POINTER is 180 do 181 Result:=(gtk_viewport_new 182 (gtk_adjustment_new 183 (0.1, 0.0, 1.0, 0.05, 0.1, 0.2), 184 gtk_adjustment_new 185 (0.1, 0.0, 1.0, 0.05, 0.1, 0.2))) 186 end 187end -- class GTK_VIEWPORT