语言

Menu
Sites
Language
Tizen API documentation is painful

Hi,

After many similar situation, I thought to write here.

Often when I am searching for an information (Native App), I cannot find.

It could be my fault, and my "searching algorithm" is not ok, then can somebody enlighten me what am I doing wrong.

For example, here is a simple code:

elm_object_text_set(ad->label, "<align=center>Shake to roll</align>");

I want to know what are all the possiblities to change the "style", like this case,"<align>". I found other example, there is <font_size>

.

So I am searching for a full list, like:

<align> : set the text alignment horizontally. Possible values: xxxxxxx

<font-size>: set the text size in pointes. Possible values: xxxxxxxx.  Remarks: xxxxxxxxx. Limitations: xxxxxxxxx.

...

Logical place is API reference of "elm_object_text_set". All(!) I find here: "Set a text of an object." Well, this isn't very useful...

Ok, second logical place to find is API reference: Label. Nothing is here about the possible values to pass to change the label style.

Then I started to search all along forums, guides, but I cannot find a simple full list of possible parameters I can pass to a label.

.

What am I doing wrong, what is the way of thinking that helps me to find such information?

This is not limited to this label style question, as I had this problem several times. All the possible values should be listed under elm_object_text_set I think? Or am I wrong?

Thanks

查看选择的答案

响应

3 回复
Mark as answer
Eugene Kurzberg

Much to everyone's surprise the right place to look is here or even here. The issue here is that you shouldn't think of elm_* API as an independent and complete UI library. Instead, one should be aware of the layered EFL architecture which goes as follows:

  1. Evas is the lowest level which provides basic graphical objects such as images, rectangles, texblocks and some container such as box, table, grid, etc...
  2. Edje which is build on top of Evas which provides capabilities for creating layouts which consist of Evas basic objects.
  3. Elementary which is a toolkit of widgets most of which are Edje-layouts plus some logic depending on the widget.

So in many cases when you are using some generic elm_* API, it in fact calls edje_* API (optionally) which in fact uses evas_* API. You also may notice that you can use evas_* API directly on all of Elementary widgets and using elm_layout_edje_get() you can use edje_* API as well.

So given this architecture the answer to your question is: If you cannot find required information for the high level API - go to the lower level.

Armaan-Ul- Islam

Hello,

What I can share with you is, when I need to check out some topic I give a look at the Guide first. ( Tizen Developers > Development > Guides ) . What happens then is I find a complete implementation of a functionality (such as : Implementation of a progress bar) which gives more clear perspect what that specific topic (suppose elm_progressbar_inverted_set() ) is meant to do. 

 

After that I might check the API reference ( Tizen Developers > Development > API Reference ) to get more clear idea about the arguments, return type, etc.

 

In addition for the specific case you mentioned in the post, You may like to go through the HTML tags list, A few number of the tags works fine here. But, I do agree sometimes it takes a long time to search.

Zoltan Puski

Thank you guys!
.
Eugene Kurzberg

This is really a helpful, and makes sense.

However, it's not that clear always to look for lower api doc, as you have to know which lower API is used exactly inside the ELM code.

.

Armaan-Ul- Islam

"need to check out some topic I give a look at the Guide first."

Yes, that often helps, but normally the API referencese should be the first place to look, as Guide should just give an overall picture hwo to use, but not all the details.