1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gtk.CellArea; 26 27 private import cairo.Context; 28 private import gdk.Event; 29 private import glib.ListG; 30 private import glib.Str; 31 private import gobject.ObjectG; 32 private import gobject.Signals; 33 private import gobject.Value; 34 private import gtk.BuildableIF; 35 private import gtk.BuildableT; 36 private import gtk.CellAreaContext; 37 private import gtk.CellEditableIF; 38 private import gtk.CellLayoutIF; 39 private import gtk.CellLayoutT; 40 private import gtk.CellRenderer; 41 private import gtk.TreeIter; 42 private import gtk.TreeModelIF; 43 private import gtk.Widget; 44 private import gtk.c.functions; 45 public import gtk.c.types; 46 public import gtkc.gtktypes; 47 private import std.algorithm; 48 49 50 /** 51 * The #GtkCellArea is an abstract class for #GtkCellLayout widgets 52 * (also referred to as "layouting widgets") to interface with an 53 * arbitrary number of #GtkCellRenderers and interact with the user 54 * for a given #GtkTreeModel row. 55 * 56 * The cell area handles events, focus navigation, drawing and 57 * size requests and allocations for a given row of data. 58 * 59 * Usually users dont have to interact with the #GtkCellArea directly 60 * unless they are implementing a cell-layouting widget themselves. 61 * 62 * # Requesting area sizes 63 * 64 * As outlined in 65 * [GtkWidget’s geometry management section][geometry-management], 66 * GTK+ uses a height-for-width 67 * geometry management system to compute the sizes of widgets and user 68 * interfaces. #GtkCellArea uses the same semantics to calculate the 69 * size of an area for an arbitrary number of #GtkTreeModel rows. 70 * 71 * When requesting the size of a cell area one needs to calculate 72 * the size for a handful of rows, and this will be done differently by 73 * different layouting widgets. For instance a #GtkTreeViewColumn 74 * always lines up the areas from top to bottom while a #GtkIconView 75 * on the other hand might enforce that all areas received the same 76 * width and wrap the areas around, requesting height for more cell 77 * areas when allocated less width. 78 * 79 * It’s also important for areas to maintain some cell 80 * alignments with areas rendered for adjacent rows (cells can 81 * appear “columnized” inside an area even when the size of 82 * cells are different in each row). For this reason the #GtkCellArea 83 * uses a #GtkCellAreaContext object to store the alignments 84 * and sizes along the way (as well as the overall largest minimum 85 * and natural size for all the rows which have been calculated 86 * with the said context). 87 * 88 * The #GtkCellAreaContext is an opaque object specific to the 89 * #GtkCellArea which created it (see gtk_cell_area_create_context()). 90 * The owning cell-layouting widget can create as many contexts as 91 * it wishes to calculate sizes of rows which should receive the 92 * same size in at least one orientation (horizontally or vertically), 93 * However, it’s important that the same #GtkCellAreaContext which 94 * was used to request the sizes for a given #GtkTreeModel row be 95 * used when rendering or processing events for that row. 96 * 97 * In order to request the width of all the rows at the root level 98 * of a #GtkTreeModel one would do the following: 99 * 100 * |[<!-- language="C" --> 101 * GtkTreeIter iter; 102 * gint minimum_width; 103 * gint natural_width; 104 * 105 * valid = gtk_tree_model_get_iter_first (model, &iter); 106 * while (valid) 107 * { 108 * gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE); 109 * gtk_cell_area_get_preferred_width (area, context, widget, NULL, NULL); 110 * 111 * valid = gtk_tree_model_iter_next (model, &iter); 112 * } 113 * gtk_cell_area_context_get_preferred_width (context, &minimum_width, &natural_width); 114 * ]| 115 * 116 * Note that in this example it’s not important to observe the 117 * returned minimum and natural width of the area for each row 118 * unless the cell-layouting object is actually interested in the 119 * widths of individual rows. The overall width is however stored 120 * in the accompanying #GtkCellAreaContext object and can be consulted 121 * at any time. 122 * 123 * This can be useful since #GtkCellLayout widgets usually have to 124 * support requesting and rendering rows in treemodels with an 125 * exceedingly large amount of rows. The #GtkCellLayout widget in 126 * that case would calculate the required width of the rows in an 127 * idle or timeout source (see g_timeout_add()) and when the widget 128 * is requested its actual width in #GtkWidgetClass.get_preferred_width() 129 * it can simply consult the width accumulated so far in the 130 * #GtkCellAreaContext object. 131 * 132 * A simple example where rows are rendered from top to bottom and 133 * take up the full width of the layouting widget would look like: 134 * 135 * |[<!-- language="C" --> 136 * static void 137 * foo_get_preferred_width (GtkWidget *widget, 138 * gint *minimum_size, 139 * gint *natural_size) 140 * { 141 * Foo *foo = FOO (widget); 142 * FooPrivate *priv = foo->priv; 143 * 144 * foo_ensure_at_least_one_handfull_of_rows_have_been_requested (foo); 145 * 146 * gtk_cell_area_context_get_preferred_width (priv->context, minimum_size, natural_size); 147 * } 148 * ]| 149 * 150 * In the above example the Foo widget has to make sure that some 151 * row sizes have been calculated (the amount of rows that Foo judged 152 * was appropriate to request space for in a single timeout iteration) 153 * before simply returning the amount of space required by the area via 154 * the #GtkCellAreaContext. 155 * 156 * Requesting the height for width (or width for height) of an area is 157 * a similar task except in this case the #GtkCellAreaContext does not 158 * store the data (actually, it does not know how much space the layouting 159 * widget plans to allocate it for every row. It’s up to the layouting 160 * widget to render each row of data with the appropriate height and 161 * width which was requested by the #GtkCellArea). 162 * 163 * In order to request the height for width of all the rows at the 164 * root level of a #GtkTreeModel one would do the following: 165 * 166 * |[<!-- language="C" --> 167 * GtkTreeIter iter; 168 * gint minimum_height; 169 * gint natural_height; 170 * gint full_minimum_height = 0; 171 * gint full_natural_height = 0; 172 * 173 * valid = gtk_tree_model_get_iter_first (model, &iter); 174 * while (valid) 175 * { 176 * gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE); 177 * gtk_cell_area_get_preferred_height_for_width (area, context, widget, 178 * width, &minimum_height, &natural_height); 179 * 180 * if (width_is_for_allocation) 181 * cache_row_height (&iter, minimum_height, natural_height); 182 * 183 * full_minimum_height += minimum_height; 184 * full_natural_height += natural_height; 185 * 186 * valid = gtk_tree_model_iter_next (model, &iter); 187 * } 188 * ]| 189 * 190 * Note that in the above example we would need to cache the heights 191 * returned for each row so that we would know what sizes to render the 192 * areas for each row. However we would only want to really cache the 193 * heights if the request is intended for the layouting widgets real 194 * allocation. 195 * 196 * In some cases the layouting widget is requested the height for an 197 * arbitrary for_width, this is a special case for layouting widgets 198 * who need to request size for tens of thousands of rows. For this 199 * case it’s only important that the layouting widget calculate 200 * one reasonably sized chunk of rows and return that height 201 * synchronously. The reasoning here is that any layouting widget is 202 * at least capable of synchronously calculating enough height to fill 203 * the screen height (or scrolled window height) in response to a single 204 * call to #GtkWidgetClass.get_preferred_height_for_width(). Returning 205 * a perfect height for width that is larger than the screen area is 206 * inconsequential since after the layouting receives an allocation 207 * from a scrolled window it simply continues to drive the scrollbar 208 * values while more and more height is required for the row heights 209 * that are calculated in the background. 210 * 211 * # Rendering Areas 212 * 213 * Once area sizes have been aquired at least for the rows in the 214 * visible area of the layouting widget they can be rendered at 215 * #GtkWidgetClass.draw() time. 216 * 217 * A crude example of how to render all the rows at the root level 218 * runs as follows: 219 * 220 * |[<!-- language="C" --> 221 * GtkAllocation allocation; 222 * GdkRectangle cell_area = { 0, }; 223 * GtkTreeIter iter; 224 * gint minimum_width; 225 * gint natural_width; 226 * 227 * gtk_widget_get_allocation (widget, &allocation); 228 * cell_area.width = allocation.width; 229 * 230 * valid = gtk_tree_model_get_iter_first (model, &iter); 231 * while (valid) 232 * { 233 * cell_area.height = get_cached_height_for_row (&iter); 234 * 235 * gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE); 236 * gtk_cell_area_render (area, context, widget, cr, 237 * &cell_area, &cell_area, state_flags, FALSE); 238 * 239 * cell_area.y += cell_area.height; 240 * 241 * valid = gtk_tree_model_iter_next (model, &iter); 242 * } 243 * ]| 244 * 245 * Note that the cached height in this example really depends on how 246 * the layouting widget works. The layouting widget might decide to 247 * give every row its minimum or natural height or, if the model content 248 * is expected to fit inside the layouting widget without scrolling, it 249 * would make sense to calculate the allocation for each row at 250 * #GtkWidget::size-allocate time using gtk_distribute_natural_allocation(). 251 * 252 * # Handling Events and Driving Keyboard Focus 253 * 254 * Passing events to the area is as simple as handling events on any 255 * normal widget and then passing them to the gtk_cell_area_event() 256 * API as they come in. Usually #GtkCellArea is only interested in 257 * button events, however some customized derived areas can be implemented 258 * who are interested in handling other events. Handling an event can 259 * trigger the #GtkCellArea::focus-changed signal to fire; as well as 260 * #GtkCellArea::add-editable in the case that an editable cell was 261 * clicked and needs to start editing. You can call 262 * gtk_cell_area_stop_editing() at any time to cancel any cell editing 263 * that is currently in progress. 264 * 265 * The #GtkCellArea drives keyboard focus from cell to cell in a way 266 * similar to #GtkWidget. For layouting widgets that support giving 267 * focus to cells it’s important to remember to pass %GTK_CELL_RENDERER_FOCUSED 268 * to the area functions for the row that has focus and to tell the 269 * area to paint the focus at render time. 270 * 271 * Layouting widgets that accept focus on cells should implement the 272 * #GtkWidgetClass.focus() virtual method. The layouting widget is always 273 * responsible for knowing where #GtkTreeModel rows are rendered inside 274 * the widget, so at #GtkWidgetClass.focus() time the layouting widget 275 * should use the #GtkCellArea methods to navigate focus inside the area 276 * and then observe the GtkDirectionType to pass the focus to adjacent 277 * rows and areas. 278 * 279 * A basic example of how the #GtkWidgetClass.focus() virtual method 280 * should be implemented: 281 * 282 * |[<!-- language="C" --> 283 * static gboolean 284 * foo_focus (GtkWidget *widget, 285 * GtkDirectionType direction) 286 * { 287 * Foo *foo = FOO (widget); 288 * FooPrivate *priv = foo->priv; 289 * gint focus_row; 290 * gboolean have_focus = FALSE; 291 * 292 * focus_row = priv->focus_row; 293 * 294 * if (!gtk_widget_has_focus (widget)) 295 * gtk_widget_grab_focus (widget); 296 * 297 * valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, priv->focus_row); 298 * while (valid) 299 * { 300 * gtk_cell_area_apply_attributes (priv->area, priv->model, &iter, FALSE, FALSE); 301 * 302 * if (gtk_cell_area_focus (priv->area, direction)) 303 * { 304 * priv->focus_row = focus_row; 305 * have_focus = TRUE; 306 * break; 307 * } 308 * else 309 * { 310 * if (direction == GTK_DIR_RIGHT || 311 * direction == GTK_DIR_LEFT) 312 * break; 313 * else if (direction == GTK_DIR_UP || 314 * direction == GTK_DIR_TAB_BACKWARD) 315 * { 316 * if (focus_row == 0) 317 * break; 318 * else 319 * { 320 * focus_row--; 321 * valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, focus_row); 322 * } 323 * } 324 * else 325 * { 326 * if (focus_row == last_row) 327 * break; 328 * else 329 * { 330 * focus_row++; 331 * valid = gtk_tree_model_iter_next (priv->model, &iter); 332 * } 333 * } 334 * } 335 * } 336 * return have_focus; 337 * } 338 * ]| 339 * 340 * Note that the layouting widget is responsible for matching the 341 * GtkDirectionType values to the way it lays out its cells. 342 * 343 * # Cell Properties 344 * 345 * The #GtkCellArea introduces cell properties for #GtkCellRenderers 346 * in very much the same way that #GtkContainer introduces 347 * [child properties][child-properties] 348 * for #GtkWidgets. This provides some general interfaces for defining 349 * the relationship cell areas have with their cells. For instance in a 350 * #GtkCellAreaBox a cell might “expand” and receive extra space when 351 * the area is allocated more than its full natural request, or a cell 352 * might be configured to “align” with adjacent rows which were requested 353 * and rendered with the same #GtkCellAreaContext. 354 * 355 * Use gtk_cell_area_class_install_cell_property() to install cell 356 * properties for a cell area class and gtk_cell_area_class_find_cell_property() 357 * or gtk_cell_area_class_list_cell_properties() to get information about 358 * existing cell properties. 359 * 360 * To set the value of a cell property, use gtk_cell_area_cell_set_property(), 361 * gtk_cell_area_cell_set() or gtk_cell_area_cell_set_valist(). To obtain 362 * the value of a cell property, use gtk_cell_area_cell_get_property(), 363 * gtk_cell_area_cell_get() or gtk_cell_area_cell_get_valist(). 364 */ 365 public class CellArea : ObjectG, BuildableIF, CellLayoutIF 366 { 367 /** the main Gtk struct */ 368 protected GtkCellArea* gtkCellArea; 369 370 /** Get the main Gtk struct */ 371 public GtkCellArea* getCellAreaStruct(bool transferOwnership = false) 372 { 373 if (transferOwnership) 374 ownedRef = false; 375 return gtkCellArea; 376 } 377 378 /** the main Gtk struct as a void* */ 379 protected override void* getStruct() 380 { 381 return cast(void*)gtkCellArea; 382 } 383 384 /** 385 * Sets our main struct and passes it to the parent class. 386 */ 387 public this (GtkCellArea* gtkCellArea, bool ownedRef = false) 388 { 389 this.gtkCellArea = gtkCellArea; 390 super(cast(GObject*)gtkCellArea, ownedRef); 391 } 392 393 // add the Buildable capabilities 394 mixin BuildableT!(GtkCellArea); 395 396 // add the CellLayout capabilities 397 mixin CellLayoutT!(GtkCellArea); 398 399 400 /** */ 401 public static GType getType() 402 { 403 return gtk_cell_area_get_type(); 404 } 405 406 /** 407 * Activates @area, usually by activating the currently focused 408 * cell, however some subclasses which embed widgets in the area 409 * can also activate a widget if it currently has the focus. 410 * 411 * Params: 412 * context = the #GtkCellAreaContext in context with the current row data 413 * widget = the #GtkWidget that @area is rendering on 414 * cellArea = the size and location of @area relative to @widget’s allocation 415 * flags = the #GtkCellRendererState flags for @area for this row of data. 416 * editOnly = if %TRUE then only cell renderers that are %GTK_CELL_RENDERER_MODE_EDITABLE 417 * will be activated. 418 * 419 * Returns: Whether @area was successfully activated. 420 * 421 * Since: 3.0 422 */ 423 public bool activate(CellAreaContext context, Widget widget, GdkRectangle* cellArea, GtkCellRendererState flags, bool editOnly) 424 { 425 return gtk_cell_area_activate(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), cellArea, flags, editOnly) != 0; 426 } 427 428 /** 429 * This is used by #GtkCellArea subclasses when handling events 430 * to activate cells, the base #GtkCellArea class activates cells 431 * for keyboard events for free in its own GtkCellArea->activate() 432 * implementation. 433 * 434 * Params: 435 * widget = the #GtkWidget that @area is rendering onto 436 * renderer = the #GtkCellRenderer in @area to activate 437 * event = the #GdkEvent for which cell activation should occur 438 * cellArea = the #GdkRectangle in @widget relative coordinates 439 * of @renderer for the current row. 440 * flags = the #GtkCellRendererState for @renderer 441 * 442 * Returns: whether cell activation was successful 443 * 444 * Since: 3.0 445 */ 446 public bool activateCell(Widget widget, CellRenderer renderer, Event event, GdkRectangle* cellArea, GtkCellRendererState flags) 447 { 448 return gtk_cell_area_activate_cell(gtkCellArea, (widget is null) ? null : widget.getWidgetStruct(), (renderer is null) ? null : renderer.getCellRendererStruct(), (event is null) ? null : event.getEventStruct(), cellArea, flags) != 0; 449 } 450 451 /** 452 * Adds @renderer to @area with the default child cell properties. 453 * 454 * Params: 455 * renderer = the #GtkCellRenderer to add to @area 456 * 457 * Since: 3.0 458 */ 459 public void add(CellRenderer renderer) 460 { 461 gtk_cell_area_add(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()); 462 } 463 464 /** 465 * Adds @sibling to @renderer’s focusable area, focus will be drawn 466 * around @renderer and all of its siblings if @renderer can 467 * focus for a given row. 468 * 469 * Events handled by focus siblings can also activate the given 470 * focusable @renderer. 471 * 472 * Params: 473 * renderer = the #GtkCellRenderer expected to have focus 474 * sibling = the #GtkCellRenderer to add to @renderer’s focus area 475 * 476 * Since: 3.0 477 */ 478 public void addFocusSibling(CellRenderer renderer, CellRenderer sibling) 479 { 480 gtk_cell_area_add_focus_sibling(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), (sibling is null) ? null : sibling.getCellRendererStruct()); 481 } 482 483 /** 484 * Applies any connected attributes to the renderers in 485 * @area by pulling the values from @tree_model. 486 * 487 * Params: 488 * treeModel = the #GtkTreeModel to pull values from 489 * iter = the #GtkTreeIter in @tree_model to apply values for 490 * isExpander = whether @iter has children 491 * isExpanded = whether @iter is expanded in the view and 492 * children are visible 493 * 494 * Since: 3.0 495 */ 496 public void applyAttributes(TreeModelIF treeModel, TreeIter iter, bool isExpander, bool isExpanded) 497 { 498 gtk_cell_area_apply_attributes(gtkCellArea, (treeModel is null) ? null : treeModel.getTreeModelStruct(), (iter is null) ? null : iter.getTreeIterStruct(), isExpander, isExpanded); 499 } 500 501 /** 502 * Connects an @attribute to apply values from @column for the 503 * #GtkTreeModel in use. 504 * 505 * Params: 506 * renderer = the #GtkCellRenderer to connect an attribute for 507 * attribute = the attribute name 508 * column = the #GtkTreeModel column to fetch attribute values from 509 * 510 * Since: 3.0 511 */ 512 public void attributeConnect(CellRenderer renderer, string attribute, int column) 513 { 514 gtk_cell_area_attribute_connect(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(attribute), column); 515 } 516 517 /** 518 * Disconnects @attribute for the @renderer in @area so that 519 * attribute will no longer be updated with values from the 520 * model. 521 * 522 * Params: 523 * renderer = the #GtkCellRenderer to disconnect an attribute for 524 * attribute = the attribute name 525 * 526 * Since: 3.0 527 */ 528 public void attributeDisconnect(CellRenderer renderer, string attribute) 529 { 530 gtk_cell_area_attribute_disconnect(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(attribute)); 531 } 532 533 /** 534 * Returns the model column that an attribute has been mapped to, 535 * or -1 if the attribute is not mapped. 536 * 537 * Params: 538 * renderer = a #GtkCellRenderer 539 * attribute = an attribute on the renderer 540 * 541 * Returns: the model column, or -1 542 * 543 * Since: 3.14 544 */ 545 public int attributeGetColumn(CellRenderer renderer, string attribute) 546 { 547 return gtk_cell_area_attribute_get_column(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(attribute)); 548 } 549 550 /** 551 * Gets the value of a cell property for @renderer in @area. 552 * 553 * Params: 554 * renderer = a #GtkCellRenderer inside @area 555 * propertyName = the name of the property to get 556 * value = a location to return the value 557 * 558 * Since: 3.0 559 */ 560 public void cellGetProperty(CellRenderer renderer, string propertyName, Value value) 561 { 562 gtk_cell_area_cell_get_property(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(propertyName), (value is null) ? null : value.getValueStruct()); 563 } 564 565 /** 566 * Gets the values of one or more cell properties for @renderer in @area. 567 * 568 * Params: 569 * renderer = a #GtkCellRenderer inside @area 570 * firstPropertyName = the name of the first property to get 571 * varArgs = return location for the first property, followed 572 * optionally by more name/return location pairs, followed by %NULL 573 * 574 * Since: 3.0 575 */ 576 public void cellGetValist(CellRenderer renderer, string firstPropertyName, void* varArgs) 577 { 578 gtk_cell_area_cell_get_valist(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(firstPropertyName), varArgs); 579 } 580 581 /** 582 * Sets a cell property for @renderer in @area. 583 * 584 * Params: 585 * renderer = a #GtkCellRenderer inside @area 586 * propertyName = the name of the cell property to set 587 * value = the value to set the cell property to 588 * 589 * Since: 3.0 590 */ 591 public void cellSetProperty(CellRenderer renderer, string propertyName, Value value) 592 { 593 gtk_cell_area_cell_set_property(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(propertyName), (value is null) ? null : value.getValueStruct()); 594 } 595 596 /** 597 * Sets one or more cell properties for @renderer in @area. 598 * 599 * Params: 600 * renderer = a #GtkCellRenderer which inside @area 601 * firstPropertyName = the name of the first cell property to set 602 * varArgs = a %NULL-terminated list of property names and values, starting 603 * with @first_prop_name 604 * 605 * Since: 3.0 606 */ 607 public void cellSetValist(CellRenderer renderer, string firstPropertyName, void* varArgs) 608 { 609 gtk_cell_area_cell_set_valist(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), Str.toStringz(firstPropertyName), varArgs); 610 } 611 612 /** 613 * This is sometimes needed for cases where rows need to share 614 * alignments in one orientation but may be separately grouped 615 * in the opposing orientation. 616 * 617 * For instance, #GtkIconView creates all icons (rows) to have 618 * the same width and the cells theirin to have the same 619 * horizontal alignments. However each row of icons may have 620 * a separate collective height. #GtkIconView uses this to 621 * request the heights of each row based on a context which 622 * was already used to request all the row widths that are 623 * to be displayed. 624 * 625 * Params: 626 * context = the #GtkCellAreaContext to copy 627 * 628 * Returns: a newly created #GtkCellAreaContext copy of @context. 629 * 630 * Since: 3.0 631 */ 632 public CellAreaContext copyContext(CellAreaContext context) 633 { 634 auto p = gtk_cell_area_copy_context(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct()); 635 636 if(p is null) 637 { 638 return null; 639 } 640 641 return ObjectG.getDObject!(CellAreaContext)(cast(GtkCellAreaContext*) p, true); 642 } 643 644 /** 645 * Creates a #GtkCellAreaContext to be used with @area for 646 * all purposes. #GtkCellAreaContext stores geometry information 647 * for rows for which it was operated on, it is important to use 648 * the same context for the same row of data at all times (i.e. 649 * one should render and handle events with the same #GtkCellAreaContext 650 * which was used to request the size of those rows of data). 651 * 652 * Returns: a newly created #GtkCellAreaContext which can be used with @area. 653 * 654 * Since: 3.0 655 */ 656 public CellAreaContext createContext() 657 { 658 auto p = gtk_cell_area_create_context(gtkCellArea); 659 660 if(p is null) 661 { 662 return null; 663 } 664 665 return ObjectG.getDObject!(CellAreaContext)(cast(GtkCellAreaContext*) p, true); 666 } 667 668 /** 669 * Delegates event handling to a #GtkCellArea. 670 * 671 * Params: 672 * context = the #GtkCellAreaContext for this row of data. 673 * widget = the #GtkWidget that @area is rendering to 674 * event = the #GdkEvent to handle 675 * cellArea = the @widget relative coordinates for @area 676 * flags = the #GtkCellRendererState for @area in this row. 677 * 678 * Returns: %TRUE if the event was handled by @area. 679 * 680 * Since: 3.0 681 */ 682 public int event(CellAreaContext context, Widget widget, Event event, GdkRectangle* cellArea, GtkCellRendererState flags) 683 { 684 return gtk_cell_area_event(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), (event is null) ? null : event.getEventStruct(), cellArea, flags); 685 } 686 687 /** 688 * This should be called by the @area’s owning layout widget 689 * when focus is to be passed to @area, or moved within @area 690 * for a given @direction and row data. 691 * 692 * Implementing #GtkCellArea classes should implement this 693 * method to receive and navigate focus in its own way particular 694 * to how it lays out cells. 695 * 696 * Params: 697 * direction = the #GtkDirectionType 698 * 699 * Returns: %TRUE if focus remains inside @area as a result of this call. 700 * 701 * Since: 3.0 702 */ 703 public bool focus(GtkDirectionType direction) 704 { 705 return gtk_cell_area_focus(gtkCellArea, direction) != 0; 706 } 707 708 alias foreac = foreach_; 709 /** 710 * Calls @callback for every #GtkCellRenderer in @area. 711 * 712 * Params: 713 * callback = the #GtkCellCallback to call 714 * callbackData = user provided data pointer 715 * 716 * Since: 3.0 717 */ 718 public void foreach_(GtkCellCallback callback, void* callbackData) 719 { 720 gtk_cell_area_foreach(gtkCellArea, callback, callbackData); 721 } 722 723 /** 724 * Calls @callback for every #GtkCellRenderer in @area with the 725 * allocated rectangle inside @cell_area. 726 * 727 * Params: 728 * context = the #GtkCellAreaContext for this row of data. 729 * widget = the #GtkWidget that @area is rendering to 730 * cellArea = the @widget relative coordinates and size for @area 731 * backgroundArea = the @widget relative coordinates of the background area 732 * callback = the #GtkCellAllocCallback to call 733 * callbackData = user provided data pointer 734 * 735 * Since: 3.0 736 */ 737 public void foreachAlloc(CellAreaContext context, Widget widget, GdkRectangle* cellArea, GdkRectangle* backgroundArea, GtkCellAllocCallback callback, void* callbackData) 738 { 739 gtk_cell_area_foreach_alloc(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), cellArea, backgroundArea, callback, callbackData); 740 } 741 742 /** 743 * Derives the allocation of @renderer inside @area if @area 744 * were to be renderered in @cell_area. 745 * 746 * Params: 747 * context = the #GtkCellAreaContext used to hold sizes for @area. 748 * widget = the #GtkWidget that @area is rendering on 749 * renderer = the #GtkCellRenderer to get the allocation for 750 * cellArea = the whole allocated area for @area in @widget 751 * for this row 752 * allocation = where to store the allocation for @renderer 753 * 754 * Since: 3.0 755 */ 756 public void getCellAllocation(CellAreaContext context, Widget widget, CellRenderer renderer, GdkRectangle* cellArea, out GdkRectangle allocation) 757 { 758 gtk_cell_area_get_cell_allocation(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), (renderer is null) ? null : renderer.getCellRendererStruct(), cellArea, &allocation); 759 } 760 761 /** 762 * Gets the #GtkCellRenderer at @x and @y coordinates inside @area and optionally 763 * returns the full cell allocation for it inside @cell_area. 764 * 765 * Params: 766 * context = the #GtkCellAreaContext used to hold sizes for @area. 767 * widget = the #GtkWidget that @area is rendering on 768 * cellArea = the whole allocated area for @area in @widget 769 * for this row 770 * x = the x position 771 * y = the y position 772 * allocArea = where to store the inner allocated area of the 773 * returned cell renderer, or %NULL. 774 * 775 * Returns: the #GtkCellRenderer at @x and @y. 776 * 777 * Since: 3.0 778 */ 779 public CellRenderer getCellAtPosition(CellAreaContext context, Widget widget, GdkRectangle* cellArea, int x, int y, out GdkRectangle allocArea) 780 { 781 auto p = gtk_cell_area_get_cell_at_position(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), cellArea, x, y, &allocArea); 782 783 if(p is null) 784 { 785 return null; 786 } 787 788 return ObjectG.getDObject!(CellRenderer)(cast(GtkCellRenderer*) p); 789 } 790 791 /** 792 * Gets the current #GtkTreePath string for the currently 793 * applied #GtkTreeIter, this is implicitly updated when 794 * gtk_cell_area_apply_attributes() is called and can be 795 * used to interact with renderers from #GtkCellArea 796 * subclasses. 797 * 798 * Returns: The current #GtkTreePath string for the current 799 * attributes applied to @area. This string belongs to the area and 800 * should not be freed. 801 * 802 * Since: 3.0 803 */ 804 public string getCurrentPathString() 805 { 806 return Str.toString(gtk_cell_area_get_current_path_string(gtkCellArea)); 807 } 808 809 /** 810 * Gets the #GtkCellEditable widget currently used 811 * to edit the currently edited cell. 812 * 813 * Returns: The currently active #GtkCellEditable widget 814 * 815 * Since: 3.0 816 */ 817 public CellEditableIF getEditWidget() 818 { 819 auto p = gtk_cell_area_get_edit_widget(gtkCellArea); 820 821 if(p is null) 822 { 823 return null; 824 } 825 826 return ObjectG.getDObject!(CellEditableIF)(cast(GtkCellEditable*) p); 827 } 828 829 /** 830 * Gets the #GtkCellRenderer in @area that is currently 831 * being edited. 832 * 833 * Returns: The currently edited #GtkCellRenderer 834 * 835 * Since: 3.0 836 */ 837 public CellRenderer getEditedCell() 838 { 839 auto p = gtk_cell_area_get_edited_cell(gtkCellArea); 840 841 if(p is null) 842 { 843 return null; 844 } 845 846 return ObjectG.getDObject!(CellRenderer)(cast(GtkCellRenderer*) p); 847 } 848 849 /** 850 * Retrieves the currently focused cell for @area 851 * 852 * Returns: the currently focused cell in @area. 853 * 854 * Since: 3.0 855 */ 856 public CellRenderer getFocusCell() 857 { 858 auto p = gtk_cell_area_get_focus_cell(gtkCellArea); 859 860 if(p is null) 861 { 862 return null; 863 } 864 865 return ObjectG.getDObject!(CellRenderer)(cast(GtkCellRenderer*) p); 866 } 867 868 /** 869 * Gets the #GtkCellRenderer which is expected to be focusable 870 * for which @renderer is, or may be a sibling. 871 * 872 * This is handy for #GtkCellArea subclasses when handling events, 873 * after determining the renderer at the event location it can 874 * then chose to activate the focus cell for which the event 875 * cell may have been a sibling. 876 * 877 * Params: 878 * renderer = the #GtkCellRenderer 879 * 880 * Returns: the #GtkCellRenderer for which @renderer 881 * is a sibling, or %NULL. 882 * 883 * Since: 3.0 884 */ 885 public CellRenderer getFocusFromSibling(CellRenderer renderer) 886 { 887 auto p = gtk_cell_area_get_focus_from_sibling(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()); 888 889 if(p is null) 890 { 891 return null; 892 } 893 894 return ObjectG.getDObject!(CellRenderer)(cast(GtkCellRenderer*) p); 895 } 896 897 /** 898 * Gets the focus sibling cell renderers for @renderer. 899 * 900 * Params: 901 * renderer = the #GtkCellRenderer expected to have focus 902 * 903 * Returns: A #GList of #GtkCellRenderers. 904 * The returned list is internal and should not be freed. 905 * 906 * Since: 3.0 907 */ 908 public ListG getFocusSiblings(CellRenderer renderer) 909 { 910 auto p = gtk_cell_area_get_focus_siblings(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()); 911 912 if(p is null) 913 { 914 return null; 915 } 916 917 return new ListG(cast(GList*) p); 918 } 919 920 /** 921 * Retrieves a cell area’s initial minimum and natural height. 922 * 923 * @area will store some geometrical information in @context along the way; 924 * when requesting sizes over an arbitrary number of rows, it’s not important 925 * to check the @minimum_height and @natural_height of this call but rather to 926 * consult gtk_cell_area_context_get_preferred_height() after a series of 927 * requests. 928 * 929 * Params: 930 * context = the #GtkCellAreaContext to perform this request with 931 * widget = the #GtkWidget where @area will be rendering 932 * minimumHeight = location to store the minimum height, or %NULL 933 * naturalHeight = location to store the natural height, or %NULL 934 * 935 * Since: 3.0 936 */ 937 public void getPreferredHeight(CellAreaContext context, Widget widget, out int minimumHeight, out int naturalHeight) 938 { 939 gtk_cell_area_get_preferred_height(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), &minimumHeight, &naturalHeight); 940 } 941 942 /** 943 * Retrieves a cell area’s minimum and natural height if it would be given 944 * the specified @width. 945 * 946 * @area stores some geometrical information in @context along the way 947 * while calling gtk_cell_area_get_preferred_width(). It’s important to 948 * perform a series of gtk_cell_area_get_preferred_width() requests with 949 * @context first and then call gtk_cell_area_get_preferred_height_for_width() 950 * on each cell area individually to get the height for width of each 951 * fully requested row. 952 * 953 * If at some point, the width of a single row changes, it should be 954 * requested with gtk_cell_area_get_preferred_width() again and then 955 * the full width of the requested rows checked again with 956 * gtk_cell_area_context_get_preferred_width(). 957 * 958 * Params: 959 * context = the #GtkCellAreaContext which has already been requested for widths. 960 * widget = the #GtkWidget where @area will be rendering 961 * width = the width for which to check the height of this area 962 * minimumHeight = location to store the minimum height, or %NULL 963 * naturalHeight = location to store the natural height, or %NULL 964 * 965 * Since: 3.0 966 */ 967 public void getPreferredHeightForWidth(CellAreaContext context, Widget widget, int width, out int minimumHeight, out int naturalHeight) 968 { 969 gtk_cell_area_get_preferred_height_for_width(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), width, &minimumHeight, &naturalHeight); 970 } 971 972 /** 973 * Retrieves a cell area’s initial minimum and natural width. 974 * 975 * @area will store some geometrical information in @context along the way; 976 * when requesting sizes over an arbitrary number of rows, it’s not important 977 * to check the @minimum_width and @natural_width of this call but rather to 978 * consult gtk_cell_area_context_get_preferred_width() after a series of 979 * requests. 980 * 981 * Params: 982 * context = the #GtkCellAreaContext to perform this request with 983 * widget = the #GtkWidget where @area will be rendering 984 * minimumWidth = location to store the minimum width, or %NULL 985 * naturalWidth = location to store the natural width, or %NULL 986 * 987 * Since: 3.0 988 */ 989 public void getPreferredWidth(CellAreaContext context, Widget widget, out int minimumWidth, out int naturalWidth) 990 { 991 gtk_cell_area_get_preferred_width(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), &minimumWidth, &naturalWidth); 992 } 993 994 /** 995 * Retrieves a cell area’s minimum and natural width if it would be given 996 * the specified @height. 997 * 998 * @area stores some geometrical information in @context along the way 999 * while calling gtk_cell_area_get_preferred_height(). It’s important to 1000 * perform a series of gtk_cell_area_get_preferred_height() requests with 1001 * @context first and then call gtk_cell_area_get_preferred_width_for_height() 1002 * on each cell area individually to get the height for width of each 1003 * fully requested row. 1004 * 1005 * If at some point, the height of a single row changes, it should be 1006 * requested with gtk_cell_area_get_preferred_height() again and then 1007 * the full height of the requested rows checked again with 1008 * gtk_cell_area_context_get_preferred_height(). 1009 * 1010 * Params: 1011 * context = the #GtkCellAreaContext which has already been requested for widths. 1012 * widget = the #GtkWidget where @area will be rendering 1013 * height = the height for which to check the width of this area 1014 * minimumWidth = location to store the minimum width, or %NULL 1015 * naturalWidth = location to store the natural width, or %NULL 1016 * 1017 * Since: 3.0 1018 */ 1019 public void getPreferredWidthForHeight(CellAreaContext context, Widget widget, int height, out int minimumWidth, out int naturalWidth) 1020 { 1021 gtk_cell_area_get_preferred_width_for_height(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), height, &minimumWidth, &naturalWidth); 1022 } 1023 1024 /** 1025 * Gets whether the area prefers a height-for-width layout 1026 * or a width-for-height layout. 1027 * 1028 * Returns: The #GtkSizeRequestMode preferred by @area. 1029 * 1030 * Since: 3.0 1031 */ 1032 public GtkSizeRequestMode getRequestMode() 1033 { 1034 return gtk_cell_area_get_request_mode(gtkCellArea); 1035 } 1036 1037 /** 1038 * Checks if @area contains @renderer. 1039 * 1040 * Params: 1041 * renderer = the #GtkCellRenderer to check 1042 * 1043 * Returns: %TRUE if @renderer is in the @area. 1044 * 1045 * Since: 3.0 1046 */ 1047 public bool hasRenderer(CellRenderer renderer) 1048 { 1049 return gtk_cell_area_has_renderer(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()) != 0; 1050 } 1051 1052 /** 1053 * This is a convenience function for #GtkCellArea implementations 1054 * to get the inner area where a given #GtkCellRenderer will be 1055 * rendered. It removes any padding previously added by gtk_cell_area_request_renderer(). 1056 * 1057 * Params: 1058 * widget = the #GtkWidget that @area is rendering onto 1059 * cellArea = the @widget relative coordinates where one of @area’s cells 1060 * is to be placed 1061 * innerArea = the return location for the inner cell area 1062 * 1063 * Since: 3.0 1064 */ 1065 public void innerCellArea(Widget widget, GdkRectangle* cellArea, out GdkRectangle innerArea) 1066 { 1067 gtk_cell_area_inner_cell_area(gtkCellArea, (widget is null) ? null : widget.getWidgetStruct(), cellArea, &innerArea); 1068 } 1069 1070 /** 1071 * Returns whether the area can do anything when activated, 1072 * after applying new attributes to @area. 1073 * 1074 * Returns: whether @area can do anything when activated. 1075 * 1076 * Since: 3.0 1077 */ 1078 public bool isActivatable() 1079 { 1080 return gtk_cell_area_is_activatable(gtkCellArea) != 0; 1081 } 1082 1083 /** 1084 * Returns whether @sibling is one of @renderer’s focus siblings 1085 * (see gtk_cell_area_add_focus_sibling()). 1086 * 1087 * Params: 1088 * renderer = the #GtkCellRenderer expected to have focus 1089 * sibling = the #GtkCellRenderer to check against @renderer’s sibling list 1090 * 1091 * Returns: %TRUE if @sibling is a focus sibling of @renderer 1092 * 1093 * Since: 3.0 1094 */ 1095 public bool isFocusSibling(CellRenderer renderer, CellRenderer sibling) 1096 { 1097 return gtk_cell_area_is_focus_sibling(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), (sibling is null) ? null : sibling.getCellRendererStruct()) != 0; 1098 } 1099 1100 /** 1101 * Removes @renderer from @area. 1102 * 1103 * Params: 1104 * renderer = the #GtkCellRenderer to remove from @area 1105 * 1106 * Since: 3.0 1107 */ 1108 public void remove(CellRenderer renderer) 1109 { 1110 gtk_cell_area_remove(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()); 1111 } 1112 1113 /** 1114 * Removes @sibling from @renderer’s focus sibling list 1115 * (see gtk_cell_area_add_focus_sibling()). 1116 * 1117 * Params: 1118 * renderer = the #GtkCellRenderer expected to have focus 1119 * sibling = the #GtkCellRenderer to remove from @renderer’s focus area 1120 * 1121 * Since: 3.0 1122 */ 1123 public void removeFocusSibling(CellRenderer renderer, CellRenderer sibling) 1124 { 1125 gtk_cell_area_remove_focus_sibling(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), (sibling is null) ? null : sibling.getCellRendererStruct()); 1126 } 1127 1128 /** 1129 * Renders @area’s cells according to @area’s layout onto @widget at 1130 * the given coordinates. 1131 * 1132 * Params: 1133 * context = the #GtkCellAreaContext for this row of data. 1134 * widget = the #GtkWidget that @area is rendering to 1135 * cr = the #cairo_t to render with 1136 * backgroundArea = the @widget relative coordinates for @area’s background 1137 * cellArea = the @widget relative coordinates for @area 1138 * flags = the #GtkCellRendererState for @area in this row. 1139 * paintFocus = whether @area should paint focus on focused cells for focused rows or not. 1140 * 1141 * Since: 3.0 1142 */ 1143 public void render(CellAreaContext context, Widget widget, Context cr, GdkRectangle* backgroundArea, GdkRectangle* cellArea, GtkCellRendererState flags, bool paintFocus) 1144 { 1145 gtk_cell_area_render(gtkCellArea, (context is null) ? null : context.getCellAreaContextStruct(), (widget is null) ? null : widget.getWidgetStruct(), (cr is null) ? null : cr.getContextStruct(), backgroundArea, cellArea, flags, paintFocus); 1146 } 1147 1148 /** 1149 * This is a convenience function for #GtkCellArea implementations 1150 * to request size for cell renderers. It’s important to use this 1151 * function to request size and then use gtk_cell_area_inner_cell_area() 1152 * at render and event time since this function will add padding 1153 * around the cell for focus painting. 1154 * 1155 * Params: 1156 * renderer = the #GtkCellRenderer to request size for 1157 * orientation = the #GtkOrientation in which to request size 1158 * widget = the #GtkWidget that @area is rendering onto 1159 * forSize = the allocation contextual size to request for, or -1 if 1160 * the base request for the orientation is to be returned. 1161 * minimumSize = location to store the minimum size, or %NULL 1162 * naturalSize = location to store the natural size, or %NULL 1163 * 1164 * Since: 3.0 1165 */ 1166 public void requestRenderer(CellRenderer renderer, GtkOrientation orientation, Widget widget, int forSize, out int minimumSize, out int naturalSize) 1167 { 1168 gtk_cell_area_request_renderer(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct(), orientation, (widget is null) ? null : widget.getWidgetStruct(), forSize, &minimumSize, &naturalSize); 1169 } 1170 1171 /** 1172 * Explicitly sets the currently focused cell to @renderer. 1173 * 1174 * This is generally called by implementations of 1175 * #GtkCellAreaClass.focus() or #GtkCellAreaClass.event(), 1176 * however it can also be used to implement functions such 1177 * as gtk_tree_view_set_cursor_on_cell(). 1178 * 1179 * Params: 1180 * renderer = the #GtkCellRenderer to give focus to 1181 * 1182 * Since: 3.0 1183 */ 1184 public void setFocusCell(CellRenderer renderer) 1185 { 1186 gtk_cell_area_set_focus_cell(gtkCellArea, (renderer is null) ? null : renderer.getCellRendererStruct()); 1187 } 1188 1189 /** 1190 * Explicitly stops the editing of the currently edited cell. 1191 * 1192 * If @canceled is %TRUE, the currently edited cell renderer 1193 * will emit the ::editing-canceled signal, otherwise the 1194 * the ::editing-done signal will be emitted on the current 1195 * edit widget. 1196 * 1197 * See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget(). 1198 * 1199 * Params: 1200 * canceled = whether editing was canceled. 1201 * 1202 * Since: 3.0 1203 */ 1204 public void stopEditing(bool canceled) 1205 { 1206 gtk_cell_area_stop_editing(gtkCellArea, canceled); 1207 } 1208 1209 /** 1210 * Indicates that editing has started on @renderer and that @editable 1211 * should be added to the owning cell-layouting widget at @cell_area. 1212 * 1213 * Params: 1214 * renderer = the #GtkCellRenderer that started the edited 1215 * editable = the #GtkCellEditable widget to add 1216 * cellArea = the #GtkWidget relative #GdkRectangle coordinates 1217 * where @editable should be added 1218 * path = the #GtkTreePath string this edit was initiated for 1219 * 1220 * Since: 3.0 1221 */ 1222 gulong addOnAddEditable(void delegate(CellRenderer, CellEditableIF, GdkRectangle*, string, CellArea) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1223 { 1224 return Signals.connect(this, "add-editable", dlg, connectFlags ^ ConnectFlags.SWAPPED); 1225 } 1226 1227 /** 1228 * This signal is emitted whenever applying attributes to @area from @model 1229 * 1230 * Params: 1231 * model = the #GtkTreeModel to apply the attributes from 1232 * iter = the #GtkTreeIter indicating which row to apply the attributes of 1233 * isExpander = whether the view shows children for this row 1234 * isExpanded = whether the view is currently showing the children of this row 1235 * 1236 * Since: 3.0 1237 */ 1238 gulong addOnApplyAttributes(void delegate(TreeModelIF, TreeIter, bool, bool, CellArea) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1239 { 1240 return Signals.connect(this, "apply-attributes", dlg, connectFlags ^ ConnectFlags.SWAPPED); 1241 } 1242 1243 /** 1244 * Indicates that focus changed on this @area. This signal 1245 * is emitted either as a result of focus handling or event 1246 * handling. 1247 * 1248 * It's possible that the signal is emitted even if the 1249 * currently focused renderer did not change, this is 1250 * because focus may change to the same renderer in the 1251 * same cell area for a different row of data. 1252 * 1253 * Params: 1254 * renderer = the #GtkCellRenderer that has focus 1255 * path = the current #GtkTreePath string set for @area 1256 * 1257 * Since: 3.0 1258 */ 1259 gulong addOnFocusChanged(void delegate(CellRenderer, string, CellArea) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1260 { 1261 return Signals.connect(this, "focus-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED); 1262 } 1263 1264 /** 1265 * Indicates that editing finished on @renderer and that @editable 1266 * should be removed from the owning cell-layouting widget. 1267 * 1268 * Params: 1269 * renderer = the #GtkCellRenderer that finished editeding 1270 * editable = the #GtkCellEditable widget to remove 1271 * 1272 * Since: 3.0 1273 */ 1274 gulong addOnRemoveEditable(void delegate(CellRenderer, CellEditableIF, CellArea) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 1275 { 1276 return Signals.connect(this, "remove-editable", dlg, connectFlags ^ ConnectFlags.SWAPPED); 1277 } 1278 }