Architecture of the Field Items And Field Editors

The architecture of the object_editor with it’s tree_item and the in_place_field_editors is not simple, to say the least. In the picture below is an overview of the most important objects involved.


The two key players in the structure are the editor_field_item and the in_place_field_editor. The editor_field_item represents the attribute data of the current object in the editor. The in_place_field_editor is the tool to edit that attribute.
To get a grip on the relations, let’s discuss the displaying an attribute and editing an attribute.


Every time a new object is displayed in the editor the object_editor_field_lister rebuilds the editor_field_items and the in_place_field_editors. It does not matter if the object is from the same collection as the previous object, no field items or field editors are reused. If you see the complexity of the structure you could imagine why they decided to do so…
Each editor_field_item creates a display_tree to represent itself in the tree_item. The actual display string of the attribute is constructed by getting the value from the editor_field_item and then let the in_place_field_editor format that value to a string. Note that there is no direct connection between the display_tree and the in_place_field_editor, so the display_tree has to go through the field_item_lister to find the actual in_place_field_editor.


When the user starts to edit an attribute the tree_agent initiates an in_place editing session. An in_place_edit_manager takes control. The manager finds the in_place_field_editor of the display_tree that was clicked and creates proxy_edit_actions for all the sw_edit_actions of the in_place_field_editor. The manager is responsible for the location and the sizing of the gui elements in the editor.
Next the user will interact with the gui controls of the sw_edit_actions. For example a new value could be entered in the text_item.
Upon finishing the edit session of the attribute the proposed value of the attribute is stored in the editor_field_item. The sw_edit_action will update the in_place_field_editor who will update the display_tree who will update the editor_field_item.

I hope this clarifies the structure a bit..

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License