History log of /haiku/src/kits/interface/Box.cpp
Revision Date Author Comments
# bfbb9655 10-Sep-2017 Augustin Cavalier <waddlesplash@gmail.com>

Interface Kit: Remove more non-BControlLook code.


# fe9ddedc 31-Mar-2017 Axel Dörfler <axeld@pinc-software.de>

BBox: Fixed broken fBounds position update.

* FrameMoved() is only for frame movements; only scrolling affects the
bounds position.
* Thanks stippi!


# ff4dee1c 24-Mar-2017 Axel Dörfler <axeld@pinc-software.de>

BView/BBox: Fixed FrameResized() handling.

* BView incorrectly passed the current width and height to
FrameResized(), not the one from the message. Since there is such
a call for each size change, a Draw() might have been called for
each of those in return.
* This should also fix such problems in BMenuBar, as it used the size
from FrameResized() as it should have.
* BBox now correctly takes the update events into account, and no
longer ignores the size passed to FrameResized().
* This fixes bug #3037.


# 7cdea13c 10-Jul-2016 looncraz <looncraz@looncraz.net>

BBox: Correct low color for drawing label.

Includes some simplification for existing code.

Fixes #12628, which was mostly exhibited in FilWip and a few other legacy
applications which used the default low color and a custom background color.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# f9fe8e12 24-Jan-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Style fixes as suggested by Axel.


# be1537b4 24-Jan-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

BBox: tolerate non-layouted child in layouted mode

While mixing layouted and non-layouted views is not supported, we are
doing it in some cases, including translator preferences (which uses
layout, but the views may come from a translator add-on which doesn't).

So, try to handle that case and at least avoid crashes by calling
MinSize/MaxSize and other unsupported layout code on views which won't
handle it.

Fixes #12610.


# 7a96554c 09-Dec-2015 looncraz <looncraz@looncraz.net>

kits/interface: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0003-0017 from looncraz, unmodified.


# 4696958a 15-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BBox: fix minimal size when using layouted mode.

It is possible to set a custom layout on a BBox, which is then applied
to the children excluding the label. However, the label size must still
be used when computing the minimal size of the BBox in that case.


# d3765546 03-Jul-2013 Rene Gollent <anevilyak@gmail.com>

BBox: propagate alignment from child for the...

...FULL_{VERTICAL,HORIZONTAL} case.


# fc77b031 30-May-2013 John Scipione <jscipione@gmail.com>

Revert "BBox: Always offset the top border by the same amount"

This reverts commit 39899cf6626bbcb3b41fd44fc49dd2bdec9a34f9.

Checked with BeOS R5, and this is not how it works, to remain
compatable we need to go back to how this was before.


# 39899cf6 30-May-2013 John Scipione <jscipione@gmail.com>

BBox: Always offset the top border by the same amount

...so that the top border of BBox's with no labels, BBox's with
text labels, and BBox's with BControl labels will all line up.


# f9954bfc 30-May-2013 John Scipione <jscipione@gmail.com>

Style fixes to BBox, update copyright header


# 875b2182 09-May-2012 czeidler <haiku@clemens-zeidler.de>

Calling the BView version of {Enable,Disable}LayoutInvalidation() seems to be more natural.


# 58f3387d 08-May-2012 czeidler <haiku@clemens-zeidler.de>

Workaround to not trigger a relayout in DoLayout when adding the label view again.


# 8adaa6c5 26-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

interface kit: added compatibility symbols for GCC4

* InvalidateLayout method for BBox, BButton, BCheckBox, BMenuField,
BScrollView, BSlider, BStringView, BTextControl.


# f6c8d242 19-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Use the correct perform invocation for these functions.


# 466f2b8f 18-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Add compatibility symbols for removed LayoutChanged() calls.


# eee4243d 20-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.


# c944d11f 13-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

bonefish+stippi:
All views which cache layout information need to call ResetLayoutInvalidation()
when they have updated the cached information. Otherwise calling
InvalidateLayout() once they are already attached to a layout may not have any
effect.


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


# c5b26d73 10-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Simplified logic for a previous fix


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


# e457eb2a 10-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed BBox behaviour when it has layout set and BView based class as a label


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


# 699451e6 16-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

The fancy border is now 3 pixels wide.


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


# 9142662b 17-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed bug #3574 - this is only a temporary fix, though, as the BControlLook
class must take care of these things.
* Automatic whitespace cleanup.


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


# 2f86ba45 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


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


# 39fbf550 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 54badb1f 19-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

mmlr + stippi:
Fixed more controls to handle a B_TRANSPARENT_COLOR as view coloe of the
parent view. Some controls would not initialize their LowColor() at all
if they were the only control in a window.


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


# c4157c8d 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

as noticed by Axel, InitObject is also used by other constructors: we init fStyle in the BArchive constructor instead.


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


# 3d9c0d7c 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

Patch from Shinta: fStyle defaults to B_FANCY_BORDER


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


# caf8aba2 08-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added layout-friendly constructors and implemented Min/Max/PreferredSize(),
and DoLayout(). When the B_SUPPORTS_LAYOUT view flag is set (as is by
default when using one of the new constructors) the BBox completely manages
one true child (the first child that is not the label view).
* Centralized the layout related computation in new method
_ValidateLayoutData(). The computed infos are cached in a new private
LayoutData structure.
* GetPreferredSize() was broken in several respects. It does now return the
same result as PreferredSize(). If B_SUPPORTS_LAYOUT is not set, these are
the sums of the insets induces by the frame and the label. I.e. those values
can for instance be added to the child's preferred size to compute the
preferred size of the compound.

Not sure, if the Haiku-only TopBorderOffset() and InnerFrame() functions still
make sense. With layout management they're actually superfluous.


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


# 15e33497 23-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Calling ResizeToPreferred() on a BBox now honours its current size, IOW it won't get
any smaller due to this (before, a box without a label would resize itself to 0/0).


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


# 4fdedfbd 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

fixed some Archive() following stippi's path


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


# 196144a5 12-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

the dark border is now drawn without holes at the edges, as on R5, also fixed the BBox being used as separator, like NetPositive does

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


# e10bfa7a 16-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

* round the top border offset
* actually use it inside the control too


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


# 405bf9da 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

InnerFrame() used fLabelBox, but it has to take the font's descent into account.


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


# ef4aa90f 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Added public InnerFrame() and TopBorderOffset() methods. If you don't like the
naming, please shout :-)


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


# f3eeafa8 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The label height now only takes the ascent into account, likewise, the label
is now drawn at the correct baseline offset (the ascent), without this strange
computation (ascent - descent + 1).


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


# f17cfabc 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* Fixed BBox resizing when not attached.
* Less flickering when drawing the label: the area of the label is now
clipped, so there is no need to fill the background again.
* Consumed the last reserved member for the bounding box of the label.
* More or less rewrote the header.


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


# 76c0041c 23-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

I suppose setting the height was forgotten?

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


# 8643b098 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

All controls/views now accept NULL arguments for "width" and "height" in GetPreferredSize().


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


# dbc61d6c 02-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

implemented real GetPreferredSize() which calculates the minimum size given border_style and label, fixed FrameResized() to invalidate the correct areas of the border

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


# ef5fcc06 01-Nov-2005 DarkWyrm <darkwyrm@gmail.com>

Resolved a TODO


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


# 36b83da4 09-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fBounds.top wasn't resetted when the label was cleared. Thanks to Korli for reporting this.

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


# 491e6111 09-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

SetBorder() shouldn't crash if the BBox isn't attached.
Style changes.

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


# 67f6c84d 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

since we depend on FrameResized() to be called, we should make sure that our flags contain B_FRAME_EVENTS.

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


# 8f6b562a 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed border style not applied in constructor, changed drawing to use line arrays

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


# ce22a23a 14-Jan-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove useless variable and code.


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


# d8ad69eb 04-Sep-2003 haydentech <haydentech@nowhere.fake>

Minor cleanup


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


# adf43596 19-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing includes.


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


# 9cb2dbe2 16-Jun-2003 Marc Flerackers <mflerackers@nowhere.fake>

Fixes


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


# 3fda79c8 25-Oct-2002 Marc Flerackers <mflerackers@nowhere.fake>

Fixed a bug


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


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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


# 4696958aa4fdb35ee24440ea563aa2d1d1a9794d 15-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

BBox: fix minimal size when using layouted mode.

It is possible to set a custom layout on a BBox, which is then applied
to the children excluding the label. However, the label size must still
be used when computing the minimal size of the BBox in that case.


# d376554674564ccef656cd224862b0dfa813c634 03-Jul-2013 Rene Gollent <anevilyak@gmail.com>

BBox: propagate alignment from child for the...

...FULL_{VERTICAL,HORIZONTAL} case.


# fc77b031d74ff6fb38cf10905b4c0e39b567a064 30-May-2013 John Scipione <jscipione@gmail.com>

Revert "BBox: Always offset the top border by the same amount"

This reverts commit 39899cf6626bbcb3b41fd44fc49dd2bdec9a34f9.

Checked with BeOS R5, and this is not how it works, to remain
compatable we need to go back to how this was before.


# 39899cf6626bbcb3b41fd44fc49dd2bdec9a34f9 30-May-2013 John Scipione <jscipione@gmail.com>

BBox: Always offset the top border by the same amount

...so that the top border of BBox's with no labels, BBox's with
text labels, and BBox's with BControl labels will all line up.


# f9954bfc695673552e7eb217c4bf75b0e0717242 30-May-2013 John Scipione <jscipione@gmail.com>

Style fixes to BBox, update copyright header


# 875b21820256044d2e40d7fff021619d01b4d5ea 09-May-2012 czeidler <haiku@clemens-zeidler.de>

Calling the BView version of {Enable,Disable}LayoutInvalidation() seems to be more natural.


# 58f3387d560449ab352cd9cfdfe5eac6214ada6a 08-May-2012 czeidler <haiku@clemens-zeidler.de>

Workaround to not trigger a relayout in DoLayout when adding the label view again.


# 8adaa6c54487cab1d200592bb2d5aca44ba2039b 26-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

interface kit: added compatibility symbols for GCC4

* InvalidateLayout method for BBox, BButton, BCheckBox, BMenuField,
BScrollView, BSlider, BStringView, BTextControl.


# f6c8d242946d814ca47bca8eb49219979f009686 19-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Use the correct perform invocation for these functions.


# 466f2b8f997acaecf0397f9f1c8b36a2b1fc5a4e 18-Dec-2011 Rene Gollent <anevilyak@gmail.com>

Add compatibility symbols for removed LayoutChanged() calls.


# eee4243d35225a35d0964ebebe94490eaca14261 20-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.


# c944d11f7e0a6775ab04ced50dd929e539c7d10f 13-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

bonefish+stippi:
All views which cache layout information need to call ResetLayoutInvalidation()
when they have updated the cached information. Otherwise calling
InvalidateLayout() once they are already attached to a layout may not have any
effect.


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


# c5b26d73a35f9d95aa88f8445d3ad16e4d93f9a3 10-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Simplified logic for a previous fix


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


# e457eb2a5378320dbdfc5cea69823327805edf74 10-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed BBox behaviour when it has layout set and BView based class as a label


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


# 699451e6f93a3b326df23eef597ecf81fafe84d3 16-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

The fancy border is now 3 pixels wide.


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


# 9142662b19f9bba6cb5b3f7eeb996740483db29e 17-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed bug #3574 - this is only a temporary fix, though, as the BControlLook
class must take care of these things.
* Automatic whitespace cleanup.


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


# 2f86ba45579bdc9648b232175f87edc62ab71b54 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


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


# 39fbf5509b8740d9883b61649027478dc8a3ead8 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 54badb1f367a83d2cb7a031375fca78fad510187 19-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

mmlr + stippi:
Fixed more controls to handle a B_TRANSPARENT_COLOR as view coloe of the
parent view. Some controls would not initialize their LowColor() at all
if they were the only control in a window.


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


# c4157c8ddbd290fb9fe2b69538a5603af3ec05fc 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

as noticed by Axel, InitObject is also used by other constructors: we init fStyle in the BArchive constructor instead.


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


# 3d9c0d7c37a5cd1e27ee8d1c12ead6107f1176e0 20-Apr-2008 Jérôme Duval <korli@users.berlios.de>

Patch from Shinta: fStyle defaults to B_FANCY_BORDER


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


# caf8aba2c926b8ebaa3eb8db3aa7b5ff77048f2b 08-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added layout-friendly constructors and implemented Min/Max/PreferredSize(),
and DoLayout(). When the B_SUPPORTS_LAYOUT view flag is set (as is by
default when using one of the new constructors) the BBox completely manages
one true child (the first child that is not the label view).
* Centralized the layout related computation in new method
_ValidateLayoutData(). The computed infos are cached in a new private
LayoutData structure.
* GetPreferredSize() was broken in several respects. It does now return the
same result as PreferredSize(). If B_SUPPORTS_LAYOUT is not set, these are
the sums of the insets induces by the frame and the label. I.e. those values
can for instance be added to the child's preferred size to compute the
preferred size of the compound.

Not sure, if the Haiku-only TopBorderOffset() and InnerFrame() functions still
make sense. With layout management they're actually superfluous.


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


# 15e334974b283a0bd2dcf487d312c5227556dd5b 23-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Calling ResizeToPreferred() on a BBox now honours its current size, IOW it won't get
any smaller due to this (before, a box without a label would resize itself to 0/0).


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


# 4fdedfbde40258f52c2778d1ca87131b6635fb5d 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

fixed some Archive() following stippi's path


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


# 196144a56cdb6a44052e9de3726238f72728a10e 12-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

the dark border is now drawn without holes at the edges, as on R5, also fixed the BBox being used as separator, like NetPositive does

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


# e10bfa7a59ec34bc18863bd2ff816c30a75a6a29 16-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

* round the top border offset
* actually use it inside the control too


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


# 405bf9da6e53ae850adb08296b983680e742e136 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

InnerFrame() used fLabelBox, but it has to take the font's descent into account.


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


# ef4aa90f49ad43b0a2df11a04336ae19ac35e4ec 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Added public InnerFrame() and TopBorderOffset() methods. If you don't like the
naming, please shout :-)


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


# f3eeafa8b94e3c47f3a0e4797cf5cd16dcb000d0 10-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

The label height now only takes the ascent into account, likewise, the label
is now drawn at the correct baseline offset (the ascent), without this strange
computation (ascent - descent + 1).


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


# f17cfabc82c3bce4df7c61b723a3338584128922 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* Fixed BBox resizing when not attached.
* Less flickering when drawing the label: the area of the label is now
clipped, so there is no need to fill the background again.
* Consumed the last reserved member for the bounding box of the label.
* More or less rewrote the header.


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


# 76c0041c5178b5bf491295f803282e5a03c33918 23-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

I suppose setting the height was forgotten?

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


# 8643b0987c2d6aca25b53fb6d8fa0a126b2b3f1f 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

All controls/views now accept NULL arguments for "width" and "height" in GetPreferredSize().


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


# dbc61d6cf23f7319e90701b82643128c2ea72710 02-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

implemented real GetPreferredSize() which calculates the minimum size given border_style and label, fixed FrameResized() to invalidate the correct areas of the border

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


# ef5fcc06377af577dd52e0aad83ad0087d26099e 01-Nov-2005 DarkWyrm <darkwyrm@gmail.com>

Resolved a TODO


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


# 36b83da43d1726d8c085f605690f000bfa2b4862 09-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fBounds.top wasn't resetted when the label was cleared. Thanks to Korli for reporting this.

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


# 491e6111d447aded7b72e9ed85bafad024f2cc18 09-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

SetBorder() shouldn't crash if the BBox isn't attached.
Style changes.

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


# 67f6c84d16ad1a1c15e7de63536ebf2dd5410579 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

since we depend on FrameResized() to be called, we should make sure that our flags contain B_FRAME_EVENTS.

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


# 8f6b562ad568906986fbe62a3643fa6c33674486 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed border style not applied in constructor, changed drawing to use line arrays

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


# ce22a23a9f9ec3071d52b4df5074b3811b855f5c 14-Jan-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove useless variable and code.


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


# d8ad69ebf20fbd5b5a666d616d37a334b1fe5674 04-Sep-2003 haydentech <haydentech@nowhere.fake>

Minor cleanup


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


# adf43596d6565bc1e03bdc68b053c75819d67ec9 19-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Added missing includes.


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


# 9cb2dbe29dbcf58bce0bd925316c77faafce43e0 16-Jun-2003 Marc Flerackers <mflerackers@nowhere.fake>

Fixes


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


# 3fda79c8df884c1cd196b348b7478e4f9a7a6bfd 25-Oct-2002 Marc Flerackers <mflerackers@nowhere.fake>

Fixed a bug


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


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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