示例#1
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_frame_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Frame *frame;

   if (!(frame = ETK_FRAME(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_FRAME_LABEL_PROPERTY:
         etk_frame_label_set(frame, etk_property_value_string_get(value));
         break;
      default:
         break;
   }
}
示例#2
0
/* Sets the property whose id is "property_id" to the value "value" */
static void _etk_string_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_String *string;

   if (!(string = ETK_STRING(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_STRING_STRING_PROPERTY:
         etk_string_set(string, etk_property_value_string_get(value));
         break;
      default:
         break;
   }
}
示例#3
0
/* Menu_Item: Sets the property whose id is "property_id" to the value "value" */
static void _etk_menu_item_property_set(Etk_Object *object, int property_id, Etk_Property_Value *value)
{
   Etk_Menu_Item *menu_item;

   if (!(menu_item = ETK_MENU_ITEM(object)) || !value)
      return;

   switch (property_id)
   {
      case ETK_MENU_ITEM_LABEL_PROPERTY:
         etk_menu_item_label_set(menu_item, etk_property_value_string_get(value));
         break;
      case ETK_MENU_ITEM_SUBMENU_PROPERTY:
         etk_menu_item_submenu_set(menu_item, ETK_MENU(etk_property_value_object_get(value)));
         break;
      default:
         break;
   }
}