Skip to content

Commit

Permalink
add title_editable and title_bar_visible knobs
Browse files Browse the repository at this point in the history
  • Loading branch information
sccolbert committed Jun 17, 2013
1 parent 686c705 commit 54b6888
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion enaml/widgets/dock_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class ProxyDockItem(ProxyWidget):
def set_title(self, title):
raise NotImplementedError

def set_title_editable(self, editable):
raise NotImplementedError

def set_title_bar_visible(self, visible):
raise NotImplementedError

def set_icon(self, icon):
raise NotImplementedError

Expand All @@ -51,6 +57,12 @@ class DockItem(Widget):
#: The title to use in the title bar.
title = d_(Unicode())

#: Whether or the not the title is user editable.
title_editable = d_(Bool(False))

#: Whether or not the title bar is visible.
title_bar_visible = d_(Bool(True))

#: The icon to use in the title bar.
icon = d_(Typed(Icon))

Expand Down Expand Up @@ -105,7 +117,8 @@ def tabify(self, direction, *names):
#--------------------------------------------------------------------------
# Observers
#--------------------------------------------------------------------------
@observe(('title', 'icon', 'icon_size', 'stretch', 'closable'))
@observe(('title', 'title_editable', 'title_bar_visible', 'icon',
'icon_size', 'stretch', 'closable'))
def _update_proxy(self, change):
""" Update the proxy when the item state changes.
Expand Down

0 comments on commit 54b6888

Please sign in to comment.