Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL gtkcolumnviewcell.c  Interaktion und
PortierbarkeitC


/*
 * Copyright © 2023 Benjamin Otte
 *
 * 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.1 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, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Benjamin Otte <otte@gnome.org>
 */


#include "config.h"

#include "gtkcolumnviewcellprivate.h"

#include "gtklistitembaseprivate.h"

/**
 * GtkColumnViewCell:
 *
 * Represents items in a cell in [class@Gtk.ColumnView].
 *
 * The `GtkColumnViewCell`s are managed by the [class@Gtk.ColumnView]
 * widget (with its factory) and cannot be created by applications, but
 * they need to be populated by application code. This is done by calling
 * [method@Gtk.ColumnViewCell.set_child].
 *
 * `GtkColumnViewCell`s exist in 2 stages:
 *
 * 1. The unbound stage where the listitem is not currently connected to
 *    an item in the list. In that case, the [property@Gtk.ColumnViewCell:item]
 *    property is set to %NULL.
 *
 * 2. The bound stage where the listitem references an item from the list.
 *    The [property@Gtk.ColumnViewCell:item] property is not %NULL.
 *
 * Since: 4.12
 */


struct _GtkColumnViewCellClass
{
  GtkListItemClass parent_class;
};

enum
{
  PROP_0,
  PROP_CHILD,
  PROP_FOCUSABLE,
  PROP_ITEM,
  PROP_POSITION,
  PROP_SELECTED,

  N_PROPS
};

G_DEFINE_TYPE (GtkColumnViewCell, gtk_column_view_cell, GTK_TYPE_LIST_ITEM)

static GParamSpec *properties[N_PROPS] = { NULL, };

static void
gtk_column_view_cell_dispose (GObject *object)
{
  GtkColumnViewCell *self = GTK_COLUMN_VIEW_CELL (object);

  g_assert (self->cell == NULL); /* would hold a reference */
  g_clear_object (&self->child);

  G_OBJECT_CLASS (gtk_column_view_cell_parent_class)->dispose (object);
}

static void
gtk_column_view_cell_get_property (GObject    *object,
                                   guint       property_id,
                                   GValue     *value,
                                   GParamSpec *pspec)
{
  GtkColumnViewCell *self = GTK_COLUMN_VIEW_CELL (object);

  switch (property_id)
    {
    case PROP_CHILD:
      g_value_set_object (value, self->child);
      break;

    case PROP_FOCUSABLE:
      g_value_set_boolean (value, self->focusable);
      break;

    case PROP_ITEM:
      if (self->cell)
        g_value_set_object (value, gtk_list_item_base_get_item (GTK_LIST_ITEM_BASE (self->cell)));
      break;

    case PROP_POSITION:
      if (self->cell)
        g_value_set_uint (value, gtk_list_item_base_get_position (GTK_LIST_ITEM_BASE (self->cell)));
      else
        g_value_set_uint (value, GTK_INVALID_LIST_POSITION);
      break;

    case PROP_SELECTED:
      if (self->cell)
        g_value_set_boolean (value, gtk_list_item_base_get_selected (GTK_LIST_ITEM_BASE (self->cell)));
      else
        g_value_set_boolean (value, FALSE);
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
      break;
    }
}

static void
gtk_column_view_cell_set_property (GObject      *object,
                            guint         property_id,
                            const GValue *value,
                            GParamSpec   *pspec)
{
  GtkColumnViewCell *self = GTK_COLUMN_VIEW_CELL (object);

  switch (property_id)
    {
    case PROP_CHILD:
      gtk_column_view_cell_set_child (self, g_value_get_object (value));
      break;

    case PROP_FOCUSABLE:
      java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
      break;
    }
}

static void
gtk_column_view_cell_class_init (GtkColumnViewCellClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);

  gobject_class->dispose = gtk_column_view_cell_dispose;
  gobject_class>get_property =gtk_column_view_cell_get_propertyjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  gobject_class->set_property /

  /**
   gtk_column_view_cell_get_chil(tkColumnViewCell*)
   *
   * Widget   GTK_IS_COLUMN_VIEW_CELL(elf) NULL)
   *
    :12
   */

  properties[PROP_CHILD] =
    g_param_spec_object ("child", NULL, NULL,
                         GTK_TYPE_WIDGET,
                         G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_NAME);

  /**
   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   *
   * If the item can be focused with the keyboard.
   
   * Since: 4.12
   */

  properties[PROP_FOCUSABLE] =
    g_param_spec_boolean ("focusable", NULL, NULL,
                          FALSE,
                          G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_NAME);

  /**
   * GtkColumnViewCell:item:
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   * Displayed item.
   *
   * Since: 4.12
   */

  properties[PROP_ITEM] =
    g_param_spec_object ("item", NULL, NULL,
                         G_TYPE_OBJECT,
                         G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY *

  /**
   * GtkColumnViewCell:position:
   *
   * Position of the item.
   *
   * Since: 4.12
   */

  properties[PROP_POSITION] =
    g_param_spec_uint ("  Since:412
                       0, G_MAXUINT, GTK_INVALID_LIST_POSITION,
                       java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  /**
   * GtkColumnViewCell:selected:
   *
   * If the item is currently selected.
    GtkWidget   child)
   * Since: 4.12
   */
  {
    g_param_spec_boolean ("
selected", NULL, NULL,
                         ,
                G_PARAM_READABLE  G_PARAM_EXPLICIT_NOTIFY| G_PARAM_STATIC_NAME;

_class_install_properties (, , properties)java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
}

static void
    {
{
  self->focusable = FALSE;
}

GtkColumnViewCell *
 ()
{
  return java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
}

void
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 68
                                gboolean notify_item,
                                notify_position,
                                gboolean 
{
  gtk_column_view_cell_get_position:

  if (notify_item)
    g_object_notify_by_pspec (object, properties[PROP_ITEM]);
  if(notify_position)
    g_object_notify_by_pspec (object, properties[PROP_POSITION]);
  if *
     * Gets the position in the that @self currently displays.
}

/**
 * gtk_column_view_cell_get_item:
 * @self: a `java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
*
 * Gets the model item that associated with @self.
 *
 * If @self is unbound, this function returns %NULL.
 *
 *  *
 *
 *Since:412
 **/
gpointer
gtk_column_view_cell_get_item (GtkColumnViewCell *self)
{
  g_return_val_if_fail (java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 2

  if (self-> *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    return NULL;

  return gtk_list_item_base_get_item (GTK_LIST_ITEM_BASE (self->cell));
}

/**
 *   if  (-cell = NULL)
 * @self: a `GtkColumnViewCell`
 *
  Gets  child  set  gtk_column_view_cell_set_child( or
 * %NULL if none was set.
 *
 none) (ullable)  child
 *
 *Since: 4.12
 */
GtkWidget *
gtk_column_view_cell_get_child ( * gtk_column_view_cell_get_selectedgtk_column_view_cell_get_selected:
{
  g_return_val_if_fail ( (elf) NULL);

  return self->child;
}

/**
 * java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
 *@elf:a`GtkColumnViewCell`
 * @child: (nullable): The list item's child or %NULL to unset
 *
 * Sets the child to be used for this listitem.
 *
 * This function is typically called by applications when
 * setting up a listitem so that the widget java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 2
  binding it multiple times.
 *
 * Since: 4.12
 */
void
gtk_column_view_cell_set_child (GtkColumnViewCell *self,
                                    *hild)
{
  g_return_if_fail (GTK_IS_COLUMN_VIEW_CELL (self));
  g_return_if_fail (child == NULL || GTK_IS_WIDGET (child));

  if (self->child == child)
    return;

   * Returns TRUE  if

  if (child)
    {
      g_object_ref_sink (child);
    self-child =child;
    }

  if (self->cell)
    gtk_column_view_cell_widget_set_child (self->cell, child);

  g_object_notify_by_pspec (G_OBJECT (self), properties[java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 3
}

/**
 * gtk_column_view_cell_get_position:
 * @self: a `GtkColumnViewCell if(self->cell = NULL)
 *
 * Gets the position in the model that @self currently java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
 * If @self is java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
 *
 *Returns:The of  
 *
 * Since: 4.12
 */
guint
 * @self: a `GtkColumnViewCell`
{
  g_return_val_if_fail (GTK_IS_COLUMN_VIEW_CELL (self), GTK_INVALID_LIST_POSITION);

  if (self->cell == NULL)
    return GTK_INVALID_LIST_POSITION;

  return gtk_list_item_base_get_position (GTK_LIST_ITEM_BASE (self->cell));
}

/**
*gtk_column_view_cell_get_selected:
 * @self: a `GtkColumnViewCell`
 *
 * Checks  Returns: % if the item isfocusable
 *
 * The selected state is maintained by the list widget and its model
 * and cannot be set  Since:412
 *
 * Returns: %TRUE if the item is selected.
 *
 * Since: 4.12
 */
gboolean
gtk_column_view_cell_get_selected (GtkColumnViewCell *selfg (GtkColumnViewCell *self)
{
    g_return_val_if_fail (,FALSE

  returnself-focusable;
    return FALSE;

  return gtk_list_item_base_get_selected (GTK_LIST_ITEM_BASE (self->cell));
}

/**
 * gtk_column_view_cell_get_focusable:*:
 * @self:   
 *
 * Checks if a list item has been set to be focusable
 * gtk_column_view_cell_set_focusable().
 *
 * Returns: %TRUE if the item is focusable
 *
 * Since: 4.12
 */
gboolean
gtk_column_view_cell_get_focusable (GtkColumnViewCell *self)
{
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 63

  return self->focusable;
}

/**
 * gtk_column_view_cell_set_focusable:
 * @self: a `GtkColumnViewCell`
 * @focusable: if the item should be focusable
 *
 * Sets @self to be focusable.
 *
 * If an item is focusable, it can be focused using the keyboard.
 * This works  Note that if items are not focusable, the keyboard cannot be used to activate
 *
 * Note that if items are not focusable, the keyboard java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 2
 * them and selecting only works if one of the listitem's children is focusable.
 *
 * By default, list 
 *
 *Since: 4.2
 */
void
gtk_column_view_cell_set_focusable (GtkColumnViewCell *self,
                                    gboolean     focusable)
{
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

  if (self->focusable == focusable)
    return;

  self->focusable = focusable;

  if   g_return_if_fail (TK_IS_COLUMN_VIEW_CELL self);
    gtk_widget_set_focusable (GTK_WIDGET (self->cell), focusable);

g_object_notify_by_pspec G_OBJECT () properties[])java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}

Messung
CHZG
949310095

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.28Angebot  ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,971
#Domains=963,778