Commit Graph

221 Commits

Author SHA1 Message Date
John Scipione 78341a9351 Revert "Fix gcc2 build on Mac OS X Lion"
now that Alex Smith has fixed the build system on Lion this
work-around can now be reverted.

This reverts commit 7c369a4b3f.
2012-07-30 02:10:08 -04:00
czeidler 9c7f297dd6 Remove lp_solve headers. 2012-05-08 07:28:16 +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 0a5e130725 Make SharedSolver BArchivable to save extra user constraints. 2012-05-03 08:45:36 +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 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
Alex Wilson 681f48fcbc Replace BALMLayout::Ordered*Tabs() method with *TabAt(int, bool sorted). 2012-05-03 08:45:17 +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 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 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 f6db102e47 Make BALMLayout respect its position when nested. 2012-05-03 08:44:50 +12:00
Alex Wilson 2bbf8b1fbc Add the ability to handle bad layouts to BALMLayout. 2012-05-03 08:44:45 +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
Alex Wilson 895414da9d In BALM::Area rename fTopLeftInset to fLeftTopInset.
This is consistent with for instance, the BSize ctor.
2012-05-03 08:44:38 +12:00
Alex Wilson f0307e765e Fix spacing before first header in src/libs/alm.
Also add copyright header in ALMGroup.cpp.
2012-05-03 08:44:36 +12:00
Alex Wilson 324ce2851d Add FBC padding to ALM classes. 2012-05-03 08:44:35 +12:00
Alex Wilson 7e021d45da Make BALM::InsetForTab() methods const. 2012-05-03 08:44:34 +12:00
Alex Wilson 0da6f2e916 Rename BALM::GroupItem to BALM::ALMGroup, and move it to its own files.
Also make ALMGroup totally self-contained, i.e. BALMLayout no longer
does the parsing, and is completely unaware of ALMGroup. A small touch
of refactoring as well.
2012-05-03 08:44:32 +12:00
Alex Wilson a25ffa4f04 Style cleanup in alm: mostly clean includes. 2012-05-03 08:44:31 +12:00
Alex Wilson 7dd17203c8 Make Area insets more consistent with other HAIKU inset APIs. 2012-05-03 08:44:29 +12:00
Alex Wilson d814593064 Remove BALMLayout::Add*To* methods, which are availabe in the builder. 2012-05-03 08:44:26 +12:00
Alex Wilson 50cc24b3f9 Add a Builder for BALMLayout. 2012-05-03 08:44:23 +12:00
Alex Wilson b50d4ed8bd Add new methods to BALMLayout for adding multiple x/y tabs at once. 2012-05-03 08:44:22 +12:00
Alex Wilson 8b52747974 In Area, remove unused ItemFrame() method.
Also modify Frame() method to return a rect with rounded coordinates.
2012-05-03 08:44:21 +12:00
Alex Wilson 574533ef12 In BALMLayout, make AddView(...) consistent with other layouts.
If a BView is added which has a BLayout, use the layout as a BLayoutItem
to represent that view, as other layouts do.
2012-05-03 08:44:19 +12:00
Alex Wilson 75e2dcf8fe In BALMLayout, allow for more flexibility in spacing and insets.
* allow for independent left, top, right and bottom insets
* allow for independent vertical and horizontal spacing between tabs
* allow for the usage of Haiku's spacing constants such as B_USE_WINDOW_INSETS
2012-05-03 08:44:17 +12:00
Alex Wilson fefa17f47e Remove unused 'PerformancePath' stuff. 2012-05-03 08:44:14 +12:00
czeidler c3e57dc36d Give the area an id. 2012-05-03 08:44:13 +12:00
czeidler b7630c4c98 Save and restore layout. 2012-05-03 08:44:11 +12:00
John Scipione 7c369a4b3f Fix gcc2 build on Mac OS X Lion.
The gcc2 cross-compiler built on Mac OS X Lion has a bug in it
where it is erroring with 'cast specifies signature type' when
assigning 0 or NULL to a pointer to a member fuction. NULL in this
instance is correctly converted to 0 since it is illegal to assign
((void*)0) to a pointer to a member function. However, it should
be legal to assign 0 to a pointer to a member function. Thus, there
is a bug.  Since I can't fix the gcc2 compiler I am working around
this bug by assigning the pointer to a do nothing function instead.

My host compiler version is
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

The same error occurs using the default gcc-llvm compiler and
a standard gcc 4.61 built from source. This bug does not occur on
Mac OS X 10.6 gcc2 or gcc4, nor does it occur on Mac OS X 10.7 with
the gcc4 cross-compiler.

If and when we decide to finally leave gcc2 behind we can revert this
change.
2012-04-07 06:21:26 -04:00
Jérôme Duval 362efe0c9f freetype: builds against the 2.4.6 optional package.
* added optional feature package for freetype 2.4.6 gcc4/gcc2 x86 and gcc4 ppc.
* FT_CONFIG_OPTION_SUBPIXEL_RENDERING is disabled, --include-patented-code doesn't
  change this setting anymore. This would require different packages.
* drop freetype sources and headers from the tree.
* fix decorators, test app server and appearance to use feature package headers.
* hybrid build untested.
2012-03-17 20:37:00 +01:00
Alex Wilson a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
czeidler 57014d1ff7 Make tabs BReferenceable. Maintain a list of tabs. 2011-11-30 17:55:36 +13:00
Alex Wilson 17499672a0 Bring BALMLayout in line with changes to BLayout. 2011-10-28 14:16:46 -06:00
Ingo Weinhold 85b41b15d9 * Added bool and double BString::operator<<() versions.
* Removed the clashing operator in JobSetupDlg. Automatic whitespace
  cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-07 10:17:15 +00:00
Clemens Zeidler 6e1a22610f Add a comment about who is responsible to clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 01:29:27 +00:00
Clemens Zeidler ef93b55df4 - Areas with same tabs are put in a column/row automtically. Move preferred size constraint from Area to the column/row. This avoids a "spring" effect of the
quadratic solver if multiple Areas are in the same column/row.
- Replace GetString by ToString.
- some clean up



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-14 00:24:12 +00:00
Stephan Aßmus 4153964a10 Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 09:12:38 +00:00
Jérôme Duval 0812493886 merged freetype 2.4.4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-16 17:55:28 +00:00
Clemens Zeidler 8286779101 Make kp_solve interface work again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 09:01:11 +00:00
Clemens Zeidler a0ad88e002 Fix min/ max calculation by removing all soft constraints before doing so. Smaller fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-26 22:06:02 +00:00
Clemens Zeidler 7583db5a1e Add an alternative solver to lp_solve. The solver based on Ingo's active set solver but is able to handle arbitrary hard and soft constraints. The advantage to lp_solve is that the active set solver can optimize variable in respect to a quadratic objective function. This makes it possible to minimise the quadratic derivation to a desired value e.g. \Sum_i(x_i - x_{i,pref})^2 -> min.
The solver part has been refactored in this way that both solver can be used with the same layout specifications. The active set solver is default now; the performance is not as good as lp_solve, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-25 04:59:40 +00:00
Clemens Zeidler f108cdbfab Merge all linear programming types in one file an rename them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-13 19:23:33 +00:00