summaryrefslogtreecommitdiff
path: root/gtk/gtkgrid.c
Commit message (Collapse)AuthorAgeFilesLines
* grid: Convert docsMatthias Clasen2021-03-111-63/+97
| | | | | Convert link format, add an example image, add property annotations. General cleanup.
* GtkGrid: Add xml example for GtkBuildable to docsUngedummt2021-01-311-0/+59
| | | | Added an example and a short discription for the properties
* Reduce use of GtkStyleContextMatthias Clasen2021-01-281-1/+1
| | | | | | Remove some unnecessary uses of GtkStyleContext where we can directly go to the GtkCssStyle, and and drop unnnecessary includes.
* docs: Add "Accessibility" section to various widgetsEmmanuele Bassi2020-11-121-1/+5
| | | | | There are a few widgets that gained an accessible role, which means adding an "Accessibility" section in their description.
* a11y: Mark more containers as structural elementsEmmanuele Bassi2020-11-111-1/+1
| | | | | Widgets that just provide grouping and layout to other widgets should not be relevant to the accessible tree.
* grid layout: Rename some propertiesMatthias Clasen2020-08-021-57/+55
| | | | | | | Rename GtkGridLayoutChild:left-attach/top-attach to GtkGridLayoutChild:column/row. Update all users. Fixes: #2967
* Replace "gchar" with "char"Benjamin Otte2020-07-251-1/+1
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-29/+29
|
* Move orientable style classes into GtkWidgetEmmanuele Bassi2020-06-051-3/+4
| | | | | | | | | It feels slightly wrong to have GtkOrientable operate on widgets, but at least what happens when an orientable widget changes orientation should be part of GtkWidget. This will allow to add more state changes without accessing widget state from the outside of gtkwidget.c.
* Replace most remaining uses of container apiMatthias Clasen2020-05-111-9/+5
| | | | These are all on GtkBox or enumerating children.
* grid: Derive from GtkWidgetMatthias Clasen2020-05-111-41/+89
| | | | GtkContainer is going away.
* grid: Add gtk_grid_removeMatthias Clasen2020-05-111-3/+22
| | | | This is a replacement for gtk_container_remove.
* Move the idle sizer to GtkWindowMatthias Clasen2020-04-201-1/+0
| | | | | | | | This was only living in gtkcontainer.c for historic reasons. Move it closer to where it belongs, and rename it from 'idle' to 'layout', since it is really about the layout phase of the frame clock, nowadays.
* Remove gtk_widget_get/set_has_surfaceMatthias Clasen2019-05-281-2/+0
| | | | | These serve no purpose anymore - widgets don't have surfaces, unless they're a GtkNative.
* Use gtk_widget_class_set_layout_manager_type()Emmanuele Bassi2019-05-061-2/+3
| | | | | Instead of manually creating the layout manager inside the instance initialization function, we can let GtkWidget do that for us.
* grid: Fix annotation typoTimm Bäder2019-04-161-1/+1
|
* grid: Annotate out args as optionalMatthias Clasen2019-04-051-4/+4
| | | | They are optional, so annotate them as such.
* Add convenience function for querying a child of GtkGridEmmanuele Bassi2019-04-041-0/+38
| | | | | | | | | Getting the layout manager instance out of GtkGrid, and then querying all layout properties can be tedious, especially for code that was usually calling gtk_container_child_get(). To replace that, we can add a simple query function that returns the two attach points and the spans.
* Port GtkGrid to use GtkGridLayoutEmmanuele Bassi2019-04-041-1558/+182
|
* Box, Grid: Improve various bits of documentationDaniel Boles2018-12-041-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #1495 showed that the docs of GtkGrid retain outdated implications that (as was once, but is no longer, the case) it is intended to replace GtkBox, by discussing HfW and widget properties in a way that suggests GtkBox can't handle them. But of course it does, and it's preferable for simple single-row/column cases. Worse, we said GtkGrid “provides exactly the same functionality” for the latter case, but the original point of that Issues was that it doesn’t, at least for CSS positional selectors! Box: • Use an actually meaningful @Short_description. • Remove unhelpful @See_also references to unrelated containers. • Remove references to “rectangular area”: it might be another shape via CSS, or “rectangular” might falsely imply 2 dimensions of children. • Mention Orientable:orientation. • Emphasise usefulness of :[hv]align for allocating in the other axis. • Don’t say that Grid “provides exactly the same functionality” for a single row or column, since (A) it is overkill for that case and (B) said Issue proved that it *doesn’t* for CSS child order, for example. Grid: • Don’t dwell on widget properties and height-for-width in a way that wrongly implies that Box can’t handle those (or Grid can better). In fact, just get rid of that bit altogether: Box handles them fine, and such wording was only needed years ago for migration from GTK+ 2 to 3. • Point to GtkBox as being preferred for the simple row/column use case.
* widget: Don't pass a position to ->size_allocateTimm Bäder2018-11-131-11/+12
| | | | | The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
* widget: Remove clip from size-allocate vfuncBenjamin Otte2018-04-051-8/+4
| | | | As the clip is no longer needed, get rid of it.
* Merge branch 'rename-window-to-surface' into 'master'Alexander Larsson2018-03-201-1/+1
|\ | | | | | | | | Rename window to surface See merge request GNOME/gtk!72
| * GtkWidget: Start renaming widget->windowAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automated change doing these command: git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface git sed -f g gtk_widget_set_window gtk_widget_set_surface git sed -f g gtk_widget_get_window gtk_widget_get_surface git sed -f g gtk_widget_register_window gtk_widget_register_surface git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface git checkout NEWS*
* | grid: Remove child listTimm Bäder2018-03-201-183/+153
|/ | | | | | Save the child info using g_object_set_qdata and just use the widget's built-in child list for everthing else. This is especially simple for GtkGrid since it has never supported reordering its child widgets.
* The big versioning cleanupMatthias Clasen2018-02-061-20/+0
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* gtk: Intern css namesMatthias Clasen2017-11-171-1/+1
| | | | This avoids a bunch of strdups at startup.
* Drop unused includes of gtkrender.hMatthias Clasen2017-10-251-1/+0
| | | | | | We don't use the gtk_render apis internally anymore. Drop these includes so it is clear where the remaining uses are.
* grid: Only pass baselines to children that request itTimm Bäder2017-10-111-1/+1
|
* grid: Simplify allocating childrenTimm Bäder2017-10-111-4/+4
| | | | | allocation->x and allocation->y are always 0. MAX'ing width/height with 1 is also wrong now since 0 is a valid width/height for widgets.
* grid: Drop priv pointerTimm Bäder2017-10-101-74/+45
|
* build: Enable -Wswitch-enum and -Wswitch-defaultBenjamin Otte2017-10-061-0/+4
| | | | | | | | | | | | | | | | | | | This patch makes that work using 1 of 2 options: 1. Add all missing enums to the switch statement or 2. Cast the switch argument to a uint to avoid having to do that (mostly for GdkEventType). I even found a bug while doing that: clearing a GtkImage with a surface did not notify thae surface property. The reason for enabling this flag even though it is tedious at times is that it is very useful when adding values to an enum, because it makes GTK immediately warn about all the switch statements where this enum is relevant. And I expect changes to enums to be frequent during the GTK4 development cycle.
* widget: Remove gtk_widget_set_redraw_on_allocTimm Bäder2017-08-091-1/+0
| | | | | | | Since gtk+ draws more than the widget and allocates more size to it than it knows about, this flag doesn't work anymore. Removing it (or setting it to TRUE for widgets that used to set it to FALSE) fixes drawing invalidation when these widgets get allocated a new size.
* widget: Add baseline and out_clip parameters to size-allocateTimm Bäder2017-07-191-15/+8
| | | | | | | | | | | Since setting a clip is mandatory for almost all widgets, we can as well change the size-allocate signature to include a out_clip parameter, just like GtkCssGadget did. And since we now always propagate baselines, we might as well pass that one on to size-allocate. This way we can also make sure to transform the clip returned from size-allocate to parent-coordinates, i.e. the same coordinate space priv->allocation is in.
* Slightly rework clip handlingTimm Bäder2017-07-191-1/+1
| | | | | | | | | | | always initialize clips to the (content) allocation, don't walk up the widget hierarchy in gtk_widget_set_clip, implement gtk_widget_size_allocate in GtkSeparator. This way we don't end up using uninitialized clip values. The entire clip handling is up for major rework since we can't and don't want to force every single widget to call _set_clip in size-allocate implementations.
* grid: Remove gadgetTimm Bäder2017-07-191-57/+12
|
* gtkgrid: Remove css box drawingTimm Bäder2017-07-191-23/+1
|
* grid: Remove unnecessary NULL checksTimm Bäder2017-04-281-5/+2
| | | | | The minimum and natural pointers passed to measure are never NULL and that's the only place where we call gtk_grid_get_size_for_size.
* Fix gdk_rectangle_union callsTimm Bäder2017-04-281-1/+1
| | | | | | Turns out that the destination is the last parameter, not the first one. This fixes the flickering in the first page of the widget-factory when using the expander on page 2.
* grid: Compute clip directlyTimm Bäder2017-04-251-4/+7
| | | | | Instead of iterating over the children again in gtk_container_get_children_clip
* container: Remove include_internals parameter from forallTimm Bäder2017-04-251-1/+0
| | | | | | with include_internals=TRUE, this is the same as the (still private) gtk_widget_forall, or just using the children/sibling accessors in a loop.
* grid: Fix plural error in docs' @Short_descriptionDaniel Boles2017-01-151-1/+1
|
* Avoid some more type checks for internal callsAlexander Larsson2017-01-111-1/+1
|
* gadget: Remove gtk_css_gadget_draw()Benjamin Otte2016-12-201-1/+0
| | | | | | | And with it, remove the draw func from custom gadgets, that has been NULL everywhere. All gadgets are snapshot now.
* grid: Implement support for CSS border-spacingBenjamin Otte2016-12-101-25/+42
|
* snapshot: Convert GtkGridBenjamin Otte2016-11-151-15/+20
|
* snapshot: Add a snapshot function to GtkCssCustomGadgetBenjamin Otte2016-11-151-0/+1
|
* grid: Use gtk_wiget_measureTimm Bäder2016-11-121-16/+12
|
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-63/+10
| | | | | | | | Add a new ::measure vfunc similar to GtkCssGadget's that widget implementations have to override instead of the old get_preferred_width, get_preferred_height, get_preferred_width_for_height, get_preferred_height_for_width and get_preferred_height_and_baseline_for_width.
* Convert GtkGrid to indirect renderingMatthias Clasen2016-10-181-19/+12
| | | | Following the example of GtkBox.