Beispiel #1
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;
   }
}
Beispiel #2
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_dialog_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Dialog *dialog;

   if (!(dialog = ETK_DIALOG(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_DIALOG_HAS_SEPARATOR_PROPERTY:
         etk_dialog_has_separator_set(dialog, etk_property_value_bool_get(value));
         break;
      case ETK_DIALOG_ACTION_AREA_HOMOGENEOUS_PROPERTY:
         etk_dialog_action_area_homogeneous_set(dialog, etk_property_value_bool_get(value));
         break;
      case ETK_DIALOG_ACTION_AREA_ALIGN_PROPERTY:
         etk_dialog_action_area_alignment_set(dialog, etk_property_value_float_get(value));
         break;
      default:
         break;
   }
}
Beispiel #3
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_statusbar_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Statusbar *statusbar;

   if (!(statusbar = ETK_STATUSBAR(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_STATUSBAR_HAS_RESIZE_GRIP_PROPERTY:
         etk_statusbar_has_resize_grip_set(statusbar, etk_property_value_bool_get(value));
         break;
      default:
         break;
   }
}
Beispiel #4
0
/* Menu_Item_Check: Sets the property whose id is "property_id" to the value "value" */
static void _etk_menu_item_check_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Menu_Item_Check *check_item;

   if (!(check_item = ETK_MENU_ITEM_CHECK(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_MENU_ITEM_ACTIVE_PROPERTY:
         etk_menu_item_check_active_set(check_item, etk_property_value_bool_get(value));
         break;
      default:
         break;
   }
}
Beispiel #5
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;
   }
}