Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9d61182
Copy LayoutBox from Enaml.
jwiggins Feb 8, 2013
66f1909
Add a ConstraintsContainer which doesn't do much yet.
jwiggins Feb 9, 2013
6a44715
Construct a simple demo for testing constraints layout.
jwiggins Feb 9, 2013
71ff334
Add the LayoutManager class from Enaml.
jwiggins Feb 9, 2013
24708da
Add a little more to the ConstraintsContainer.
jwiggins Feb 9, 2013
d56e212
Start adding constraints to Component.
jwiggins Feb 9, 2013
baea8fc
Fix a typo.
jwiggins Feb 9, 2013
8e1de32
Add fixed constraints management.
jwiggins Feb 9, 2013
03fda63
Tie up some loose ends.
jwiggins Feb 9, 2013
c46c471
Add simple eval()-based parsing for user-specified constraints.
jwiggins Feb 11, 2013
314fcfb
More constraints cleanup. Added a relayout() implementation.
jwiggins Feb 11, 2013
36c214e
Get the constraints demo sorta working. Resizing does nothing.
jwiggins Feb 11, 2013
7c37bef
Relayout on resize. Still not quite there.
jwiggins Feb 11, 2013
98ce8d0
Change the lower right corner to black to help testing.
jwiggins Feb 11, 2013
36ba9f4
Add an Enaml file which mirrors the constraints demo (for debug).
jwiggins Feb 12, 2013
33954e7
Implement symbolic constraints and un-hardcode 'top' and 'right'.
jwiggins Feb 12, 2013
dab21e9
Refine the constraints demo a bit. It works!
jwiggins Feb 12, 2013
37e8c84
Remove the __getattr__ nonsense from LayoutBox.
jwiggins Feb 12, 2013
2d09c45
Add hug and resist control for a Component's size constraints.
jwiggins Feb 12, 2013
bf065fe
Make the constraints demos to match more closely.
jwiggins Feb 12, 2013
38f811d
Remove the container's layout box from its list of components.
jwiggins Feb 12, 2013
cb3eb2c
Minor tweaks to ConstraintsContainer.
jwiggins Feb 12, 2013
a14685a
Remove new_component.py and new_abstract_component.py.
jwiggins Feb 13, 2013
06c1773
Remove the old layout_controller bits from Container.
jwiggins Feb 13, 2013
e93472c
Push the constraints layout bits down into CoordinateBox.
jwiggins Feb 13, 2013
0a36590
Stop using strings to specify constraints.
jwiggins Feb 13, 2013
98a8c0a
Remove more unused code.
jwiggins Feb 13, 2013
dc7ddd3
Allow the layout_constraints trait to be a callable or a list.
jwiggins Feb 13, 2013
f5afcf4
Replace LayoutBox with ConstraintsNamespace.
jwiggins Feb 14, 2013
698aac7
Add a contents box to the ConstraintsContainer.
jwiggins Feb 14, 2013
1cd642f
Copy layout helpers from Enaml.
jwiggins Feb 14, 2013
a1aba85
Fix some basic problems with the layout helpers.
jwiggins Feb 14, 2013
9e671a9
Get some of the layout helpers working, more or less...
jwiggins Feb 14, 2013
b734c11
Fix the definition of some contents traits.
jwiggins Feb 15, 2013
173cfe4
Steal some of Robert's enaml debugging code for visualizing constraints.
jwiggins Feb 15, 2013
f9b2778
Flip the debug flag on the constraints demo.
jwiggins Feb 15, 2013
e8b78f1
Add a constraint list with selection to the constraints demo.
jwiggins Feb 15, 2013
f0420bd
Fix the grid layout helper.
jwiggins Feb 15, 2013
5ab3f93
Don't require passing a constraints namespace to layout helpers.
jwiggins Feb 15, 2013
e4d0f00
Fix a drawing bug in the constraints debug overlay.
jwiggins Feb 16, 2013
901dc5e
Undo the constraints helper simplification for the meantime.
jwiggins Feb 18, 2013
70e34d3
Don't require components to have their id explicitly set.
jwiggins Feb 18, 2013
5fd04a5
Add constraints variables as Property traits on CoordinateBox.
jwiggins Feb 18, 2013
f2ca75d
Fix a bug where do_layout() was not being called on children.
jwiggins Feb 19, 2013
95ee85b
Add live constraints editing to the constraints demo.
jwiggins Feb 20, 2013
73696c7
Fix debug rendering for constraints and tweak the constraints demo
jwiggins Feb 20, 2013
5260063
Fix a typo in the contents constraints creation.
jwiggins Feb 20, 2013
48ef870
Fix a small docstring bug.
jwiggins Feb 20, 2013
23b4c05
Fix a typo in an exception message.
jwiggins Feb 21, 2013
4dd81fd
Steal layout sharing from Enaml. Remove debug rendering.
jwiggins Feb 21, 2013
8d05106
Add layout sharing to the constraints demo.
jwiggins Feb 22, 2013
25dbd67
Add an api.py to layout that includes the layout helpers
jwiggins Feb 22, 2013
3c2ba1d
Make 'weak' the default for Component hug preferences.
jwiggins Feb 25, 2013
3aa030c
Add is_spacer to the layout api.py
jwiggins Feb 25, 2013
1302607
Update the layout when a child component's size hint changes.
jwiggins Mar 7, 2013
23f84fb
PEP8
jwiggins Mar 7, 2013
775d182
Remove constraints debug rendering.
jwiggins Mar 7, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions enable/abstract_layout_controller.py

This file was deleted.

1 change: 1 addition & 0 deletions enable/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from container import Container
from coordinate_box import CoordinateBox
from component_editor import ComponentEditor
from constraints_container import ConstraintsContainer
from overlay_container import OverlayContainer

# Breaks code that does not use numpy
Expand Down
14 changes: 11 additions & 3 deletions enable/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import with_statement

from uuid import uuid4

# Enthought library imports
from traits.api \
import Any, Bool, Delegate, Enum, Float, Instance, Int, List, \
Expand All @@ -20,6 +22,7 @@

DEFAULT_DRAWING_ORDER = ["background", "underlay", "mainlayer", "border", "overlay"]


class Component(CoordinateBox, Interactor):
"""
Component is the base class for most Enable objects. In addition to the
Expand Down Expand Up @@ -313,8 +316,8 @@ class Component(CoordinateBox, Interactor):
# into more than one class and that class
classes = List

# The optional element ID of this component.
id = Str("")
# The element ID of this component.
id = Str

# These will be used by the new layout system, but are currently unused.
#max_width = Any
Expand Down Expand Up @@ -1027,14 +1030,19 @@ def _set_active_tool(self, tool):
def _get_layout_needed(self):
return self._layout_needed


def _tools_items_changed(self):
self.invalidate_and_redraw()

#------------------------------------------------------------------------
# Event handlers
#------------------------------------------------------------------------

def _id_default(self):
""" Generate a random UUID for the ID.
"""
# The first 32bits is plenty.
return uuid4().hex[:8]

def _aspect_ratio_changed(self, old, new):
if new is not None:
self._enforce_aspect_ratio()
Expand Down
33 changes: 0 additions & 33 deletions enable/component_layout_category.py

This file was deleted.

175 changes: 0 additions & 175 deletions enable/component_render_category.py

This file was deleted.

Loading