History log of /haiku/src/kits/interface/CardLayout.cpp
Revision Date Author Comments
# d5a3eb04 11-May-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

BCardLayout: make the first item visible.

Change-Id: I7b836a22bc5c281bec9b44859c42fec56af45574
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2683
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>


# 9cfe1443 10-May-2020 Augustin Cavalier <waddlesplash@gmail.com>

BCardLayout: Do not recompute size limits on visible item switch.

The size limits are already the minimum/maximum for all views,
not just the current one, so we do not need to recompute them
when the layout is invalidated due to an item switch.

Fixes #14675, and other performance issues on switching tabs
in layouted BTabViews, among other things.

Change-Id: I55bfe4ddb8c8a79c634634cfc27113205a790c42
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2677
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>


# 5cfca119 06-Apr-2020 Niels Sascha Reedijk <niels.reedijk@gmail.com>

HaikuBook: Add documentation for BCardLayout

This adds documentation for BCardView, BCardLayout and BLayoutBuilder::Cards.
There is also a bit of cleanup for the BSplitView documentation.

It also makes explicit when a developer passes an invalid argument to
BCardLayout::SetVisibleItem(), by making that a debugger() call.

Change-Id: I17ac52cc773bb76c4f81beaa76f72af62a9e10f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2460
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# e01de522 10-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

More whitespace cleanup all over the place.


# 182e2ee9 01-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Add a bit more FBC stuff for the Layout API, which I missed before.


# 53617d36 05-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Override a bunch of methods in layout related classes for FBC stability.

* Especially made sure to override archiving methods, since these are called rarely, so the cost is very minimal
* Otherwise, the closer a class is to a base class, the more likely I was to give it all the overrides.


# 8151838e 02-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Add FBC padding to all (I think..) of the visible Layout related classes.


# a851b3ad 31-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Add Perform() methods to all the layout-related classes that needed them.


# b38ea98f 16-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Devirtualize BLayout::InvalidateLayout(), add a protected hook BLayout::DoLayout(). This will allow for much better control over the propagation of layout invalidations, and therefore cleaner, more optimal code.


# 4e0131f5 09-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation.


# 1d6c7b6c 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

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


# 6829d417 29-Jul-2010 Alex Wilson <yourpalal2@gmail.com>

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


# 81405788 20-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0747aad 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

After the first call to BView::InvalidateLayout() further invocations don't
invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
called by layout implementations whenever they have updated their cached
information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a19a660a 12-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the BSize(const BRect&) constructor and added BRect::Size()
instead. Also added a BRect(BPoint, BSize) constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21120 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e01de52283efe0bd8fa107bd493df302c070204e 10-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

More whitespace cleanup all over the place.


# 182e2ee973b7cd577fb24ba5a186eba235c1fa55 01-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Add a bit more FBC stuff for the Layout API, which I missed before.


# 53617d366d1729716cc1e2764feb4a734b65b9f0 05-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Override a bunch of methods in layout related classes for FBC stability.

* Especially made sure to override archiving methods, since these are called rarely, so the cost is very minimal
* Otherwise, the closer a class is to a base class, the more likely I was to give it all the overrides.


# 8151838e3892d0a18d89d73e2cc37e1f5d01264d 02-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Add FBC padding to all (I think..) of the visible Layout related classes.


# a851b3ad543ebaebc18589b959c01ccaaf35202f 31-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Add Perform() methods to all the layout-related classes that needed them.


# b38ea98f527e2d4a610e9891a10d19ddc9bc00c1 16-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Devirtualize BLayout::InvalidateLayout(), add a protected hook BLayout::DoLayout(). This will allow for much better control over the propagation of layout invalidations, and therefore cleaner, more optimal code.


# 4e0131f51ba30445ab5b48d57ad45564cf6617d1 09-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation.


# 1d6c7b6cb6f46c2672074ff137a18833d4dd3041 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

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


# 6829d4174ba57d752c8d470a55789112db477daf 29-Jul-2010 Alex Wilson <yourpalal2@gmail.com>

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


# 814057885c103cd001bd6408a4cdbaf39eee7ed5 20-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0747aad3bb6204d11f634473eeced2d3f351875 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

After the first call to BView::InvalidateLayout() further invocations don't
invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
called by layout implementations whenever they have updated their cached
information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a19a660a78afa845a9d54d5b2edd135257334658 12-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the BSize(const BRect&) constructor and added BRect::Size()
instead. Also added a BRect(BPoint, BSize) constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21120 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96