Alex Wilson
45f28e068b
Fix error in height calculation in alm/SharedSolver.
2012-05-03 08:45:45 +12:00
Alex Wilson
c8b24e3eb5
Fix BALMLayout archiving issues.
...
SharedSolver was archiving too many constraints, partly because of
multiple typos, also because it archived some which were just artifacts
of the layout process. These extra constraints are created when the
layout calls SetRange() on the left/top/right/bottom tabs during layout.
* LinearSpec/ActiveSetSolver had to be adjusted to get access to the
constraints added by the SetRange() calls.
* BALM::TabBase was adjusted to avoid a segfault during unarchiving,
caused by an unitialized member.
* ALMFriendLayoutTest was adjusted to include a more obvious custom
constraint for testing.
2012-05-03 08:45:44 +12:00
Alex Wilson
5f4e71ba4c
Replace BALMLayoutBuilder::Snake class with a stack.
...
The interface to BALMLayoutBuilder is still pretty much the same, but
this simplifies the class a bit.
2012-05-03 08:45:43 +12:00
Alex Wilson
d10cb215dc
in BALMLayout::DefaultPolicy, call printf instead of debugger.
...
This is more user friendly, debugger() was a bit drastic.
2012-05-03 08:45:42 +12:00
Alex Wilson
bf0b62a004
Add archiving to ALMFriendLayout test.
2012-05-03 08:45:40 +12:00
Alex Wilson
4199a81a8d
Add archiving to ALMHelloWorld test.
2012-05-03 08:45:39 +12:00
Alex Wilson
df2ad52040
Archive more details about areas in BALMLayout.
2012-05-03 08:45:37 +12:00
Alex Wilson
0a5e130725
Make SharedSolver BArchivable to save extra user constraints.
2012-05-03 08:45:36 +12:00
Alex Wilson
bad1d6ba7e
Make Variable::SetRange() more forgiving.
2012-05-03 08:45:35 +12:00
Alex Wilson
015e5f06d8
Make BALMLayout::BadLayoutPolicy archivable.
2012-05-03 08:45:34 +12:00
Alex Wilson
35bf0b5c1c
Add initial support for archiving a BALMLayout.
...
What's supported:
* basic archive/instantiate
* friend layouts
coming soon:
* saving of custom restraints
* archiving of BadLayoutPolicy
2012-05-03 08:45:32 +12:00
Alex Wilson
f9c58743e3
Fix possible NULL dereference in TabBase::IsInLayout().
2012-05-03 08:45:31 +12:00
Alex Wilson
4ca2a44779
Make ownership-taking idempotent during unarchiving.
...
The previous scheme made it hard to deal with reference-counted objects,
which may be owned by many objects.
2012-05-03 08:45:29 +12:00
Alex Wilson
0a408e4992
Make it possible to have a Variable not belonging to any LinearSpec.
2012-05-03 08:45:27 +12:00
Alex Wilson
bc7956c7cf
Use const overloading on BALMLayout::{X|Y}TabAt().
2012-05-03 08:45:26 +12:00
czeidler
d7568eabd2
Add IndexOf methods.
2012-05-03 08:45:25 +12:00
czeidler
15ef732f0d
Check first if we own the constraint before deleting it.
2012-05-03 08:45:23 +12:00
Alex Wilson
4878cc70e2
Don't remove ourselves from a BLayoutContext when it is leaving.
2012-05-03 08:45:22 +12:00
czeidler
c4340eab04
Fix row column weight.
2012-05-03 08:45:21 +12:00
czeidler
35babcf06d
Allow left and top tab to be NULL.
2012-05-03 08:45:19 +12:00
Alex Wilson
0bd511a331
Avoid use after free in RowColumnManager.cpp
...
Fixes CID 10862
2012-05-03 08:45:18 +12:00
Alex Wilson
681f48fcbc
Replace BALMLayout::Ordered*Tabs() method with *TabAt(int, bool sorted).
2012-05-03 08:45:17 +12:00
Alex Wilson
6169a6e3d1
Minimize the effect invisible items have on a BALMLayout.
...
There seems to still be some effect on positioning, but invisible items
no longer constrain the layout.
2012-05-03 08:45:16 +12:00
Alex Wilson
af6ddb01df
Improve FriendLayout test to test invalidations as well.
2012-05-03 08:45:14 +12:00
Alex Wilson
fbd2dfcf17
Refactor ActiveSetSolver::Find{Min|Max}s().
2012-05-03 08:45:13 +12:00
Alex Wilson
a9242e3d98
Properly handle unbounded results in SharedSolver::Validate{Min|Max}()
2012-05-03 08:45:12 +12:00
Alex Wilson
1cbe95140a
Refactor SharedSolver::Validate*() methods a bit more.
2012-05-03 08:45:10 +12:00
Alex Wilson
3ade12dd15
Make BALMLayout::BasePreferredSize() useful again.
2012-05-03 08:45:09 +12:00
Alex Wilson
ac84362568
Update BadLayout test to sync with OnBadLayout changes.
2012-05-03 08:45:08 +12:00
Alex Wilson
09e87fa352
Pass more information to BadLayoutPolicy.
...
Also, re-add BadLayoutPolicy invocations, which were lost while creating
SharedSolver.
2012-05-03 08:45:06 +12:00
Alex Wilson
93904ad087
Have SharedSolver return the solver result from Validate*() methods.
2012-05-03 08:45:05 +12:00
Alex Wilson
82a0965357
Improve efficiency when validating an ALM layout.
2012-05-03 08:45:04 +12:00
Alex Wilson
419fe0b8ae
Introduce SharedSolver class to improve BALMLayout's friend feature.
2012-05-03 08:45:02 +12:00
Alex Wilson
708a298e22
Refactor XTab and YTab to share a common base, TabBase.
...
TabBase takes care of layout tracking etc..
2012-05-03 08:45:01 +12:00
Alex Wilson
a9761aedbf
Refactor BALMLayout::AddItem to reduce repitition.
2012-05-03 08:45:00 +12:00
Alex Wilson
93977272f4
When adding tabs to a BALMLayout, ensure they are fully added.
2012-05-03 08:44:58 +12:00
Alex Wilson
c640be198b
Add a test for ALM's 'friend' behaviour.
2012-05-03 08:44:57 +12:00
Alex Wilson
c761a8a6d4
Let BALM::{X|Y}Tabs be in multiple BALMLayouts, if they are friendly.
2012-05-03 08:44:55 +12:00
Alex Wilson
f9cabdd009
Use BReferenceable properties of LinearSpec in BALMLayout.
...
This saves us from a potential use-afte-free bug.
2012-05-03 08:44:54 +12:00
Alex Wilson
7c3800078e
Make LinearProgramming::LinearSpec BReferenceable.
2012-05-03 08:44:53 +12:00
Alex Wilson
1c8104a70e
Add a test for nested BALMLayouts.
2012-05-03 08:44:51 +12:00
Alex Wilson
f6db102e47
Make BALMLayout respect its position when nested.
2012-05-03 08:44:50 +12:00
Alex Wilson
51b5b66b01
Remove lp_solve as a dependency of the linprog lib.
...
Really, it hasn't depended on lp_solve for a while, but it was still
linked in in some places.
2012-05-03 08:44:48 +12:00
Alex Wilson
03adc8c767
Add test for BALMLayout's bad layout handling.
2012-05-03 08:44:47 +12:00
Alex Wilson
2bbf8b1fbc
Add the ability to handle bad layouts to BALMLayout.
2012-05-03 08:44:45 +12:00
Alex Wilson
57d93f836d
Disable debug output by default in linprog.
2012-05-03 08:44:44 +12:00
Alex Wilson
3479e516b7
Compose spacing given to BALMLayout constructor.
2012-05-03 08:44:43 +12:00
Alex Wilson
548c302600
Adjust MusicCollection app for changes in BALMLayout.
2012-05-03 08:44:42 +12:00
Alex Wilson
de245ca017
Adjust IMAP addon for changes in BALMLayout.
2012-05-03 08:44:40 +12:00
Alex Wilson
20cc993ab5
Remove BALM::Area::fConstraints field, which is not needed.
...
It's easier to just delete all the constraints in the dtor, the ones that
wouldn't have been in fConstraints are NULL at this point anyway.
2012-05-03 08:44:39 +12:00