Commit Graph

24 Commits

Author SHA1 Message Date
Clemens Zeidler
70e2076135 - Add helper functions to get the tabs of a view or a layout item.
- AddView only require the top, left tabs now.
- Remove the TwoViews test and replace it with a slightly more complex test.
- Merge XTab and YTab files into one header file.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-30 01:32:48 +00:00
Clemens Zeidler
5b6fca0639 - Rework the ALM layout api. The AddItemTo* function are now related to the current Area. On default the current Area is the last added Area.
- Add some more const where appreciated.
- Fix some style issues and a leak in Row and Column.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-29 03:30:47 +00:00
Clemens Zeidler
19ddd4f1cb SetDefaultBehavior is not needed since all views handled in this function have min and max size equal the pref size (despite of the status bar length, which is ok). As a result they don't grow or shrink undesirable as assumed previously. As a result also the AutoPreferredContentSize is not needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:57:40 +00:00
Clemens Zeidler
21f083af82 - Implement all Add* function of the BLayout class properly. If the Add* functions of the BLayout class are called add the item to the right upper corner of the previous area. That is at least better than ignore this functions.
- Add more convenience AddViewTo{Right, Left, Top, Bottom} functions to add a item to the sides of an existing area.
- Need to add the Jamfile hack again to include the ViewLayoutItem.h header. I thing about to add the ALMLayout.* files to the interface dir when its a little bit more matured. Then the problem will be solved. Till I made a decision or somebody tell me its a bad idea to add the ALMLayout to the official interface stuff or the ViewLayoutItem.h should be in a shared header dir I will keep this hack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:16:49 +00:00
Clemens Zeidler
96e2013e70 Add inset and spacing to BALMLayout. Each Area is able to overwrite this global values and use his own inset. Add spacing and inset to the tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:53:33 +00:00
Clemens Zeidler
40d939a43f - Add some checks if the Area is initialized.
- Init some more variables in the constructor.
- Rename HasSame*As to Set*As. The old one is more a question. Also add an optional factor and remove the HasSameSizeAs function which tempt the user to leak a BList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:04:08 +00:00
Clemens Zeidler
9503cf19be - Don't pass a min size in the Area _Init function. The min size is updated before solving the layout so we don't have to set it in the beginning. This also simplifies the BALMLayout api.
- Header include style fixes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 21:53:32 +00:00
Clemens Zeidler
8f60d419c5 Remove unused Constraint variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 05:55:15 +00:00
Clemens Zeidler
eb4dd1a2a9 Clean up Area header a bit more and remove unused functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 05:50:51 +00:00
Clemens Zeidler
0871de7bdf Remove unsupported reverse engineering feature. Further clean up.
Also remove LayoutStyle feature because resizing the parent view might not be a good idea. If the parent view should be resized you should better but it into a BLayout too.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 05:29:50 +00:00
Clemens Zeidler
5f15562e70 Use the AlignInFrame BLayoutItem function to do the item alignment. The child area is not needed any more.
Don't leak the fConstraints list.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-22 04:51:09 +00:00
Clemens Zeidler
3a3c1d8222 Removed unused min, max, pref variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-21 23:51:41 +00:00
Clemens Zeidler
8d9b6ef428 - Rename BALMLayout.* file to ALMLayout.*.
- Fix some copyrights.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-21 23:31:50 +00:00
Clemens Zeidler
8ec038986a BALMLayout now takes the view min, max and pref values into account. Previously it managed its own values.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-21 23:18:43 +00:00
Clemens Zeidler
248bbad27c First step to make the ALM layout engine more compatible with the haiku layout API. Many stuff was/is managed by ALM which could and should be done by the standard layout facilities.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-21 07:04:40 +00:00
Clemens Zeidler
b3b7b663e0 Encapsulate the solver in the ALM layout class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-20 22:47:13 +00:00
Clemens Zeidler
cd88ee006d More cleanup and BList -> BObjectList.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-20 06:26:32 +00:00
Clemens Zeidler
601eded950 - Hide constraint header in Area file.
- Start to replace BList with BObjectList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-20 06:09:19 +00:00
Alex Wilson
1d6c7b6cb6 Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
  may have slipped by.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 18:43:41 +00:00
Stephan Aßmus
b8ec67f491 * Simplified and optimized a lot the "ToString()" debugging facilities.
* *::Index() is now const, thanks to the BList improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-06 13:14:45 +00:00
Axel Dörfler
ea607d6f7f * Applied a patch by Christof Lutteroth that updates ALM, and brings new test
apps.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-28 09:00:14 +00:00
Ingo Weinhold
5bced18eab ALM/linprog patch by Christof Lutteroth:
* Got rid of class ObjFunctionSummand. Both the constraint summands and
  the objective function summands are now stored using class Summand.
* Some method names are more BeOS compliant now: SetX instead of ChangeX.
* linprog test code now uses new AddConstraint methods.
* CalculateMinSize and CalculateMaxSize did not free the memory they
  allocated.
* Removed inappropriate setter and getter methods.
* Memory allocated in class Constraint is freed now.
* Other small changes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-10 21:43:32 +00:00
Ingo Weinhold
0306945545 Patch by Christof Lutteroth:
* copyright headers for the files of the libraries linprog and alm
* new class Summand for representing summands in a linear constraint
* merged class SoftConstraint into class Constraint; Constraint now
  supports both soft and hard constraint functionality
* new AddConstraint methods in class LinearSpec for directly setting
  constraints with 1 to 4 summands
* code cleanups by using aforementioned AddConstraint methods
* a new very simple test application for alm
* some style corrections


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 01:54:05 +00:00
Ingo Weinhold
a101e99aad Added libalm.so and its dependency liblinprog.so. libalm.so provides a
BLayout implementation (BALMLayout) using the Auckland Layout Model
(ALM). The original ALM was implemented by Christof Lutteroth, the
Haiku/C++ version by James Kim.
The code needs some review, but the test programs seem to work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 10:51:44 +00:00