Commit Graph

8 Commits

Author SHA1 Message Date
Axel Dörfler 24a77ea0be * Added ItemAt() method that accepts column and row.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-08 16:14:13 +00:00
Alex Wilson 82ab316723 Add default spacing for Layouts (#5614)
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET
* introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing().
* modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods.
* default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING
* I've found two regressions, patches incoming, please report others on #5614.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 22:58:24 +00:00
Alex Wilson 6829d4174b Update BLayout::ItemAdded() and BLayout::ItemRemoved() to take an int32 index parameter, and ItemAdded() to return a bool indicating success or failure. Update BLayout::AddItem() to take the result of ItemAdded() into account. Also update BLayout::AllUnarchived() to take this into account. In either situation, if ItemAdded() returns false, the item does not get added to the layout. Removed various TODOs about code that could be removed once this change was made. In BSplitLayout, an item's LayoutData was lazy-initialized, but would always be created during ItemAdded(). Now we create the LayoutData explicitly, so that we can catch failed memory allocations. Closes #5524.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-30 02:28:17 +00:00
Alex Wilson 106d8c4e5b Convert to unix line endings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 22:28:51 +00:00
Ingo Weinhold d1535a45df Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:09:06 +00:00
Stephan Aßmus 89208c77f1 Finished unifying the Interface Kit headers:
* Fixed copyrights (puncuation and capitalization, removed authors from
  headers)
* Updated indentation style
* Unified pointer/reference style
* Re-ordered some methods for better grouping where it could be done
  (abd adopted source accordingly)
* Small coding style fixes here and there

No functional change intended.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 11:12:41 +00:00
Ingo Weinhold c4945a424b Added Count{Columns,Rows}().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 16:47:02 +00:00
Ingo Weinhold 9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00