History log of /haiku/headers/os/interface/Button.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>


# 1f424632 11-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to IK, focus on docs


# 8ad6baf7 28-May-2014 John Scipione <jscipione@gmail.com>

BButton style fixes for docs.

No functional change intended.


# a0848a19 29-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add optional pop-up marker

* Add behavior constant B_POP_UP_BEHAVIOR which adds a pop-up marker
to the button (similar to that of BMenuField).
* Add methods [Set]PopUpMessage(). To set/get the the message that is
sent to the button's target when the pop-up marker is clicked.


# 813c5772 29-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Removed dead code

Remove methods _DrawDefault() and _DrawFocusLine() which were used for
the non-BControlLook drawing.


# b998f9f0 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add support for toggle button behavior

Add methods SetBehavior(), Behavior(). Supported behavior constants are
B_BUTTON_BEHAVIOR -- normal button behavior -- and B_TOGGLE_BEHAVIOR
-- toggle button behavior.


# b181fabe 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Remove left over attributes


# a249edfb 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add flat property

* Add methods SetFlat()/IsFlat(). A flat button doesn't draw its frame,
unless the mouse is hovering over it or it is otherwise activated.
* As a side effect this change also activates the hover glow that was
already implemented in BControlLook, but not activated in BButton.


# be436742 21-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BControl subclasses: Override SetIcon()

... and implement Perform() action for potential later use.


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

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


# 75a6d1db 26-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Optimized includes. For example, BeBuild.h is almost always already included
via SupportDefs.h.


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


# 89208c77 27-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

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


# 62b9a2ce 24-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Header cleanup.
* Removed dead code which was for drawing a BButton like R5.


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


# 6bef4a07 09-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added default value for message in two arguments constructor.
* Removed resizing to minimum height in layout-friendly constructors.
* Cache preferred size.
* Implemented all of Min/Max/PreferredSize().


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


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

BButton needs B_FULL_UPDATE_ON_RESIZE despite the fact that it isn't
resizable by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21121 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


# bb2ee416 30-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Forgot to commit the changed header too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13363 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


# 1f424632be5dcad5b81a23080eb205ab6471cd7b 11-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to IK, focus on docs


# 8ad6baf7893767740da0453a627dec3388855488 28-May-2014 John Scipione <jscipione@gmail.com>

BButton style fixes for docs.

No functional change intended.


# a0848a191693aac77d3301a13dc59a27114acaa7 29-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add optional pop-up marker

* Add behavior constant B_POP_UP_BEHAVIOR which adds a pop-up marker
to the button (similar to that of BMenuField).
* Add methods [Set]PopUpMessage(). To set/get the the message that is
sent to the button's target when the pop-up marker is clicked.


# 813c5772c980f2f3830eb32ea7e4562df6f51905 29-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Removed dead code

Remove methods _DrawDefault() and _DrawFocusLine() which were used for
the non-BControlLook drawing.


# b998f9f02ffad9b683d9e66074d1a3a0510d301a 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add support for toggle button behavior

Add methods SetBehavior(), Behavior(). Supported behavior constants are
B_BUTTON_BEHAVIOR -- normal button behavior -- and B_TOGGLE_BEHAVIOR
-- toggle button behavior.


# b181fabe574a1f097f5cc1e43f216150f1f3059e 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Remove left over attributes


# a249edfbfc6a699a22052faccd3bcdf21ee9e042 28-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BButton: Add flat property

* Add methods SetFlat()/IsFlat(). A flat button doesn't draw its frame,
unless the mouse is hovering over it or it is otherwise activated.
* As a side effect this change also activates the hover glow that was
already implemented in BControlLook, but not activated in BButton.


# be4367428b6478ae059614d7a9b6f6dc721e5dcb 21-Dec-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BControl subclasses: Override SetIcon()

... and implement Perform() action for potential later use.


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

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


# 75a6d1db99fe8ea432c7ff8d80cfc095710d02f5 26-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Optimized includes. For example, BeBuild.h is almost always already included
via SupportDefs.h.


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


# 89208c77f10235d43fda0c7b3fd6751db02cc12c 27-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

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


# 62b9a2ce0e628aab8e7f94f4b0412edd23ee9d7e 24-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Header cleanup.
* Removed dead code which was for drawing a BButton like R5.


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


# 6bef4a07d6fc59653894b0246ba78629f8a01fdc 09-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added default value for message in two arguments constructor.
* Removed resizing to minimum height in layout-friendly constructors.
* Cache preferred size.
* Implemented all of Min/Max/PreferredSize().


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


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

BButton needs B_FULL_UPDATE_ON_RESIZE despite the fact that it isn't
resizable by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21121 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


# bb2ee4164b366602f96d750ea99665135dd85564 30-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Forgot to commit the changed header too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13363 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