Exemple #1
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_cairo_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
  Etk_Cairo *cairo;

  if (!(cairo = ETK_CAIRO(object)) || !value)
    return;

  switch (property_id)
  {
    case ETK_CAIRO_MIN_WIDTH_PROPERTY:
      cairo->min_size.w = etk_property_value_int_get(value);
      break;
    case ETK_CAIRO_MIN_HEIGHT_PROPERTY:
      cairo->min_size.h = etk_property_value_int_get(value);
      break;
  }
}
Exemple #2
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_table_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Table *table;

   if (!(table = ETK_TABLE(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_TABLE_NUM_COLS_PROPERTY:
         etk_table_resize(table, etk_property_value_int_get(value), table->num_rows);
         break;
      case ETK_TABLE_NUM_ROWS_PROPERTY:
         etk_table_resize(table, table->num_cols, etk_property_value_int_get(value));
         break;
      case ETK_TABLE_HOMOGENEOUS_PROPERTY:
         etk_table_homogeneous_set(table, etk_property_value_int_get(value));
         break;
      default:
         break;
   }
}
Exemple #3
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_toolbar_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Toolbar *toolbar;

   if (!(toolbar = ETK_TOOLBAR(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_TOOLBAR_ORIENTATION_PROPERTY:
         etk_toolbar_orientation_set(toolbar, etk_property_value_int_get(value));
         break;
      case ETK_TOOLBAR_STYLE_PROPERTY:
         etk_toolbar_style_set(toolbar, etk_property_value_int_get(value));
         break;
      case ETK_TOOLBAR_STOCK_SIZE_PROPERTY:
         etk_toolbar_stock_size_set(toolbar, etk_property_value_int_get(value));
         break;
      default:
         break;
   }
}
Exemple #4
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_box_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Box *box;

   if (!(box = ETK_BOX(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_BOX_SPACING_PROPERTY:
         etk_box_spacing_set(box, etk_property_value_int_get(value));
         break;
      case ETK_BOX_HOMOGENEOUS_PROPERTY:
         etk_box_homogeneous_set(box, etk_property_value_bool_get(value));
         break;
      default:
         break;
   }
}
Exemple #5
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_spinner_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Spinner *spinner;

   if (!(spinner = ETK_SPINNER(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_SPINNER_DIGITS_PROPERTY:
         etk_spinner_digits_set(spinner, etk_property_value_int_get(value));
         break;
      case ETK_SPINNER_SNAP_TO_TICKS_PROPERTY:
         etk_spinner_snap_to_ticks_set(spinner, etk_property_value_bool_get(value));
         break;
      case ETK_SPINNER_WRAP_PROPERTY:
         etk_spinner_wrap_set(spinner, etk_property_value_bool_get(value));
         break;
      default:
         break;
   }
}