1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#------------------------------------------------------------------------------
# Copyright (c) 2013-2025, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
#------------------------------------------------------------------------------
from enaml.widgets.api import Container, Form, Label, Field
from enaml.workbench.api import Extension, PluginManifest
from enaml.workbench.ui.api import ActionItem, MenuItem
print('Imported Second View!')
enamldef SecondView(Container):
padding = 0
Form:
Label:
text = 'First Name'
Field:
pass
Label:
text = 'Last Name'
Field:
pass
Label:
text = 'Address'
Field:
pass
enamldef SecondManifest(PluginManifest):
""" The manifest which is registered when the view is loaded.
This manifest contributes extra menu items to the menu bar.
"""
id = 'sample.second'
Extension:
id = 'actions'
point = 'enaml.workbench.ui.actions'
MenuItem:
path = '/preferences'
label = 'Preferences'
after = 'file'
before = 'workspace'
MenuItem:
path = '/window'
label = 'Window'
before = 'workspace'
MenuItem:
path = '/help'
label = 'Help'
after = 'workspace'
ActionItem:
path = '/preferences/save'
label = 'Save'
ActionItem:
path = '/preferences/restore'
label = 'Restore'
ActionItem:
path = '/help/about'
label = 'About'
|