<commit_before>"""
Traits View definition file.

The view trait of the parent class is extracted from the model definition 
file.  This file can either be exec()ed or imported.  See 
core/base.py:Base.trait_view() for what is currently used.  Using exec() 
allows view changes without needing to restart Mayavi, but is slower than 
importing.
"""
# Authors: <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
# Copyright (c) 2005-2008, Enthought, Inc.
# License: BSD Style.

from enthought.traits.ui.api \
    import Item, Group, View, ImageEnumEditor, InstanceEditor, HGroup
from enthought.mayavi.core.lut_manager import lut_mode_list, \
            lut_image_dir


# The view of the LUT Manager object.
view = View(Group(Item(name='lut_mode',
                       editor=ImageEnumEditor(values=lut_mode_list(), 
                                              cols=6,
                                              path=lut_image_dir)),
                  Item(name='file_name', visible_when="lut_mode=='file'"), 
                  Item(name='number_of_colors'),
                  Item(name='reverse_lut'),
                  Item(name='lut',
                       show_label=False,
                       editor=InstanceEditor(label='Edit LUT properties')),
                  Item(name='create_lut', show_label=False),

                  Group(Item(name='show_legend'),
                      Group(   
                          Item(name='number_of_labels'),
                          enabled_when='show_scalar_bar==True',
                      ),
                      Group(   
                          Item(name='shadow'),
                          Item(name='use_default_name'),
                          Item(name='data_name',
                               enabled_when='not object.use_default_name'),
                          HGroup(
                              Item(name='_title_text_property',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Title')),
                              Item(name='_label_text_property',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Text'),
                                   label='Edit bar Text'),
                          ),
                          HGroup(
                              Item(name='scalar_bar',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Actor'),
                                   ),
                              Item(name='scalar_bar_widget',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Widget'),
                                  ),
                          ),
                          enabled_when='show_scalar_bar==True',
                      ),    
                      show_border=True,
                  ),
                  Group(
                      Item(name='use_default_range'),
                      Item(name='data_range',
                          enabled_when='not object.use_default_range'),
                      show_border=True,
                  ),
                  label='LUT (Look Up Table) Manager',
             ),

# Delete this once we're sure we want to keep the new integrated format.
#            Group(Item(name='_title_text_property',
#                       style='custom',
#                       resizable=True),
#                  show_labels=False,
#                  defined_when='show_scalar_bar==True',
#                  label='Title'),
#            Group(Item(name='_label_text_property',<commit_msg>ENH: Adding ID's to the various pop-up editors for the lut manager so their sizing etc. is persisted.<commit_after>"""
Traits View definition file.

The view trait of the parent class is extracted from the model definition 
file.  This file can either be exec()ed or imported.  See 
core/base.py:Base.trait_view() for what is currently used.  Using exec() 
allows view changes without needing to restart Mayavi, but is slower than 
importing.
"""
# Authors: <NAME> <<EMAIL>>
#          <NAME> <<EMAIL>>
# Copyright (c) 2005-2008, Enthought, Inc.
# License: BSD Style.

from enthought.traits.ui.api \
    import Item, Group, View, ImageEnumEditor, InstanceEditor, HGroup
from enthought.mayavi.core.lut_manager import lut_mode_list, \
            lut_image_dir


# The view of the LUT Manager object.
view = View(Group(Item(name='lut_mode',
                       editor=ImageEnumEditor(values=lut_mode_list(), 
                                              cols=6,
                                              path=lut_image_dir)),
                  Item(name='file_name', visible_when="lut_mode=='file'"), 
                  Item(name='number_of_colors'),
                  Item(name='reverse_lut'),
                  Item(name='lut',
                       show_label=False,
                       editor=InstanceEditor(label='Edit LUT properties',
                                             id='mayavi.core.lut_manager.edit_lut')),
                  Item(name='create_lut', show_label=False),

                  Group(Item(name='show_legend'),
                      Group(   
                          Item(name='number_of_labels'),
                          enabled_when='show_scalar_bar==True',
                      ),
                      Group(   
                          Item(name='shadow'),
                          Item(name='use_default_name'),
                          Item(name='data_name',
                               enabled_when='not object.use_default_name'),
                          HGroup(
                              Item(name='_title_text_property',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Title',
                                        id='mayavi.core.lut_manager.bar_title_text')),
                              Item(name='_label_text_property',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Text',
                                        id='mayavi.core.lut_manager.bar_label_text'),
                                   label='Edit bar Text'),
                          ),
                          HGroup(
                              Item(name='scalar_bar',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Actor',
                                       id='mayavi.core.lut_manager.bar_actor'),
                                   ),
                              Item(name='scalar_bar_widget',
                                   show_label=False,
                                   editor=InstanceEditor(label='Edit bar Widget',
                                        id='mayavi.core.lut_manager.bar_widget'),
                                  ),
                          ),
                          enabled_when='show_scalar_bar==True',
                      ),    
                      show_border=True,
                  ),
                  Group(
                      Item(name='use_default_range'),
                      Item(name='data_range',
                          enabled_when='not object.use_default_range'),
                      show_border=True,
                  ),
                  label='LUT (Look Up Table) Manager',
             ),

# Delete this once we're sure we want to keep the new integrated format.
#            Group(Item(name='_title_text_property',
#                       style='custom',
#                       resizable=True),
#                  show_labels=False,
#                  defined_when='show_scalar_bar==True',
#                  label='Title'),
#            Group(Item(name='_label_text_property',
{'fraction_non_alphanumeric': 0.08960843373493976, 'fraction_numerical': 0.002259036144578313, 'mean_word_length': 1.147399622743196, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5310941', 'n_tokens_mistral': 1900, 'n_tokens_neox': 1771, 'n_words': 355}