<commit_before>/* GTK - The GIMP Toolkit
 * Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
 */

/**
 * SECTION:gtkbox
 * @Short_description: Base class for box containers
 * @Title: GtkBox
 * @See_also: #GtkHBox, #GtkVBox, #GtkFrame, #GtkTable, #GtkLayout
 *
 * GtkBox is an widget which encapsulates functionality for a
 * particular kind of container, one that organizes a variable number of
 * widgets into a rectangular area.  GtkBox has a number of derived
 * classes, e.g. #GtkHBox and #GtkVBox.
 *
 * The rectangular area of a GtkBox is organized into either a single row
 * or a single column of child widgets depending upon whether the box is
 * of type #GtkHBox or #GtkVBox, respectively.  Thus, all children of a
 * GtkBox are allocated one dimension in common, which is the height of a
 * row, or the width of a column.
 *
 * GtkBox uses a notion of <emphasis>packing</emphasis>.  Packing
 * refers to adding widgets with reference to a particular position in a
 * #GtkContainer.  For a GtkBox, there are two reference positions: the
 * <emphasis>start</emphasis> and the <emphasis>end</emphasis> of the box.
 * For a #GtkVBox, the start is defined as the top of the box and the end is
 * defined as the bottom.  For a #GtkHBox the start is defined as the
 * left side and the end is defined as the right side.
 *
 * Use repeated calls to gtk_box_pack_start() to pack widgets into a
 * GtkBox from start to end.  Use gtk_box_pack_end() to add widgets from
 * end to start.  You may intersperse these calls and add widgets from
 * both ends of the same GtkBox.
 *
 * Because GtkBox is a #GtkContainer, you may also use
 * gtk_container_add() to insert widgets into the box, and they will be
 * packed with the default values for #GtkBox:expand and #GtkBox:fill.
 * Use gtk_container_remove() to remove widgets from the GtkBox.
 *
 * Use gtk_box_set_homogeneous() to specify whether or not all children
 * of the GtkBox are forced to get the same amount of space.
 *
 * Use gtk_box_set_spacing() to determine how much space will be
 * minimally placed between all children in the GtkBox. Note that
 * spacing is added <emphasis>between</emphasis> the children, while
 * padding added by gtk_box_pack_start() or gtk_box_pack_end() is added
 * <emphasis>on either side</emphasis> of the widget it belongs to.
 *
 * Use gtk_box_reorder_child() to move a GtkBox child to a different
 * place in the box.
 *
 * Use gtk_box_set_child_packing() to reset the #GtkBox:expand,
 * #GtkBox:fill and #GtkBox:padding child properties.
 * Use gtk_box_query_child_packing() to query these fields.
 *
 * <note>
 * <para>
 * Note that a single-row or single-column #GtkGrid provides exactly the
 * same functionality as #GtkBox.
 * </para>
 * </note>
 */

#include "config.h"

#include "gtkbox.h"
#include "gtkorientable.h"
#include "gtksizerequest.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkintl.h"


enum {
  PROP_0,
  PROP_ORIENTATION,
  PROP_SPACING,
  PROP_HOMOGENEOUS
};

enum {
  CHILD_PROP_0,
  CHILD_PROP_EXPAND,
  CHILD_PROP_FILL,
  CHILD_PROP_PADDING,
  CHILD_PROP_PACK_TYPE,
  CHILD_PROP_POSITION
};

struct _GtkBoxPrivate
{
  GtkOrientation  orientation;

  GList          *children;

  gint16          spacing;

  guint           default_expand : 1;<commit_msg>GtkBoxPrivate: Improve struct packing<commit_after>/* GTK - The GIMP Toolkit
 * Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
 */

/**
 * SECTION:gtkbox
 * @Short_description: Base class for box containers
 * @Title: GtkBox
 * @See_also: #GtkHBox, #GtkVBox, #GtkFrame, #GtkTable, #GtkLayout
 *
 * GtkBox is an widget which encapsulates functionality for a
 * particular kind of container, one that organizes a variable number of
 * widgets into a rectangular area.  GtkBox has a number of derived
 * classes, e.g. #GtkHBox and #GtkVBox.
 *
 * The rectangular area of a GtkBox is organized into either a single row
 * or a single column of child widgets depending upon whether the box is
 * of type #GtkHBox or #GtkVBox, respectively.  Thus, all children of a
 * GtkBox are allocated one dimension in common, which is the height of a
 * row, or the width of a column.
 *
 * GtkBox uses a notion of <emphasis>packing</emphasis>.  Packing
 * refers to adding widgets with reference to a particular position in a
 * #GtkContainer.  For a GtkBox, there are two reference positions: the
 * <emphasis>start</emphasis> and the <emphasis>end</emphasis> of the box.
 * For a #GtkVBox, the start is defined as the top of the box and the end is
 * defined as the bottom.  For a #GtkHBox the start is defined as the
 * left side and the end is defined as the right side.
 *
 * Use repeated calls to gtk_box_pack_start() to pack widgets into a
 * GtkBox from start to end.  Use gtk_box_pack_end() to add widgets from
 * end to start.  You may intersperse these calls and add widgets from
 * both ends of the same GtkBox.
 *
 * Because GtkBox is a #GtkContainer, you may also use
 * gtk_container_add() to insert widgets into the box, and they will be
 * packed with the default values for #GtkBox:expand and #GtkBox:fill.
 * Use gtk_container_remove() to remove widgets from the GtkBox.
 *
 * Use gtk_box_set_homogeneous() to specify whether or not all children
 * of the GtkBox are forced to get the same amount of space.
 *
 * Use gtk_box_set_spacing() to determine how much space will be
 * minimally placed between all children in the GtkBox. Note that
 * spacing is added <emphasis>between</emphasis> the children, while
 * padding added by gtk_box_pack_start() or gtk_box_pack_end() is added
 * <emphasis>on either side</emphasis> of the widget it belongs to.
 *
 * Use gtk_box_reorder_child() to move a GtkBox child to a different
 * place in the box.
 *
 * Use gtk_box_set_child_packing() to reset the #GtkBox:expand,
 * #GtkBox:fill and #GtkBox:padding child properties.
 * Use gtk_box_query_child_packing() to query these fields.
 *
 * <note>
 * <para>
 * Note that a single-row or single-column #GtkGrid provides exactly the
 * same functionality as #GtkBox.
 * </para>
 * </note>
 */

#include "config.h"

#include "gtkbox.h"
#include "gtkorientable.h"
#include "gtksizerequest.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
#include "gtkintl.h"


enum {
  PROP_0,
  PROP_ORIENTATION,
  PROP_SPACING,
  PROP_HOMOGENEOUS
};

enum {
  CHILD_PROP_0,
  CHILD_PROP_EXPAND,
  CHILD_PROP_FILL,
  CHILD_PROP_PADDING,
  CHILD_PROP_PACK_TYPE,
  CHILD_PROP_POSITION
};

struct _GtkBoxPrivate
{
  GList          *children;

  GtkOrientation  orientation;
  gint16          spacing;

  guint           default_expand : 1;
{'fraction_non_alphanumeric': 0.07484576882784309, 'fraction_numerical': 0.008380863694564079, 'mean_word_length': 3.818844643858665, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2699500', 'n_tokens_mistral': 2766, 'n_tokens_neox': 2632, 'n_words': 1156}