History log of /haiku/headers/os/interface/Box.h
Revision Date Author Comments
# 7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

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


# 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


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

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


# 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


# 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


# 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


# 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


# 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


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

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


# 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


# 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


# 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


# 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