History log of /haiku/src/add-ons/decorators/BeDecorator/BeDecorator.h
Revision Date Author Comments
# 31234326 01-Jul-2018 John Scipione <jscipione@gmail.com>

BeDecorator: update close and zoom button gradients

... to better match BeOS.

Up until this point we have drawn buttons with a perfectly smooth
linear gradient that was nicely provided by Stippi. However, BeOS
used a more stylized gradient instead. This commit seeks to
reproduce this stylized gradient on BeDecorator adjusting itself
for larger button sizes.

Consolidate and correct colors. button, light1, light2, and
shadow1 colors are the same on close and zoom buttons. Zoom has
a lighter shadow2 than close button. Try to get as close to the
colors used on BeOS as possible. Added comments indicating the
colors used on BeOS in active and inactive states for future
reference.

light1 color stays grayscale if grayscale, otherwise skews
non-blue. This replicates how BeOS worked.

Fill with window tab color before drawing: lose B_TRANSPARENT.

Undraw the bottom left and top right corners of bitmaps in the
unpressed state. BeOS did not do this (usually), but it should
have as it closes the ring.

Define a bunch of bitmaps and use them as stencils to write into
ServerBitmaps 1 or 2 colors at a time.

Update close and zoom button down states. When the button is
pressed rotate bitmap by 180° by reading the source bitmap in
forwards while writing destination bitmap out backwards. This
allows the dark part to be draw in the top left while the light
parts are drawn in the bottom right. (opposite of unpressed)

Don't draw the parts of the big zoom square that are obscured by
the small square.

private _CreateTemporaryBitmap() method stolen from AlphaMask.cpp
to create temporary ServerBitmaps and zero them out. Store the
pointers on the BeDecorator class and then release them in the
destructor method when the class object is deleted.

Initialize the ServerBitmaps in the ctor and set fCStatus. On
failure set to B_NO_MEMORY and fallback to drawing a linear
gradiant. This will most likely never happen but just in case
it does we want to avoid crashing.

A few 80-line char fixes

Change-Id: Ic81837aa387f05b04dda3e1ff76fdf103c93f8e8


# d60b3b1b 18-Sep-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

BeDecorator: Fix build post S&T


# 47c470c6 16-May-2015 Puck Meerburg <puck@puckipedia.nl>

BeDecorator: Add Stack & Tile support


# 5f5f085b 20-Feb-2014 John Scipione <jscipione@gmail.com>

Update copyright, Be and Win Decorator descs


# e0cbe1aa 14-Aug-2013 John Scipione <jscipione@gmail.com>

Refactor BeDecorator


# 5a32087b 08-Aug-2013 John Scipione <jscipione@gmail.com>

Redo close and zoom buttons

... to draw into a cached bitmap and border for BeDecorator.

Make the box positioning closer to BeOS too.

Also rearrange methods in DefaultDecorator and TabDecorator a bit.


# 63720e0f 05-Aug-2013 John Scipione <jscipione@gmail.com>

Convert BeDecorator to derive from TabDecorator

Also, make the close and zoom buttons update when clicked.


# 662298bc 30-Jul-2013 John Scipione <jscipione@gmail.com>

BeDecorator: Update header guard definition


# 87c51182 30-Jul-2013 John Scipione <jscipione@gmail.com>

Decorators: Update copyright headers


# 78a987cc 29-Jul-2013 John Scipione <jscipione@gmail.com>

Make the decorators not crash


# db9c24a6 19-Jul-2013 John Scipione <jscipione@gmail.com>

BeDecorator: make it compile, use tabs.

Crashes spectacularly like WinDecorator.


# b46615c5 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


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


# b509dbd9 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unused _SetColors().


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


# 7330d2fa 23-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Looks like this was somehow missed in r39602. Fixes build.



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


# 3a5082aa 10-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the home brewn double click detection - we're now simply using the
"clicks" field of the mouse message as everywhere else.
* Renamed Decorator::Clicked() to MouseAction().
* Minor style cleanup.


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


# f8751b1f 03-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix coding style.



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


# 1649544d 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Adapted the ClassicBe decorator to the new DecorAddOn interface.



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


# 4d1aa4a6 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Some coding style fixes.



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


# 3becd1d2 18-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix the ClassicBe decorator for decorator API change.


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


# facf61e7 22-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Bring the MacDecorator to compileable and runnable state. I advise you not to use it yet, however.


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


# 4550f389 22-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Bring BeDecorator back at a compilable state
-Some updates to the DecoratorManager to try to make it working. The add-on is not identified properly but I can't find out why...


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


# ff78e73c 23-Feb-2007 DarkWyrm <darkwyrm@gmail.com>

Unbroke the classic R5 decorator and updated sources to match the sources for DefaultDecorator before applying changes for its looks
Sweet cracker sandwich! I actually figured out something for a Jamfile on my own -- it took a while to figure out how to link against the app_server. :-)


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


# 2874b546 21-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Sync with most recent doings in the server's DefaultDecorator class


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


# 4ff18ecc 17-Sep-2003 DarkWyrm <darkwyrm@gmail.com>

Un-kludged Decorator::GetFootprint


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


# 634831d8 28-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated to use new patten passing code.
BeDecorator updated from work on DefaultDecorator


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


# 13696633 07-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated support sources
Improved drawing.
Strange drawing bug in BeDecorator buttons to be fixed later


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


# 293c3378 13-Apr-2003 shatty <shatty@nowhere.fake>

add newline to end of file


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


# bbceccae 07-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Updated BeDecorator from proto7 API


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


# 76b04a86 27-Sep-2002 shatty <shatty@nowhere.fake>

fixed newline at end of file


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


# 9cf7b05e 07-Sep-2002 DarkWyrm <darkwyrm@gmail.com>

Removed SRect and SPoint as per Erik


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


# 30e06bbf 24-Aug-2002 DarkWyrm <darkwyrm@gmail.com>

Initial checkin


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


# 47c470c6d0332d33a1080b762c4a238a9a656e14 16-May-2015 Puck Meerburg <puck@puckipedia.nl>

BeDecorator: Add Stack & Tile support


# 5f5f085b42765aeb1d2ebe2ca7f93f582f9882f1 20-Feb-2014 John Scipione <jscipione@gmail.com>

Update copyright, Be and Win Decorator descs


# e0cbe1aa5dec6398e142a8015e1320c389667379 14-Aug-2013 John Scipione <jscipione@gmail.com>

Refactor BeDecorator


# 5a32087b8eee6cf157f98e7f07fcb2e18ad9dd81 08-Aug-2013 John Scipione <jscipione@gmail.com>

Redo close and zoom buttons

... to draw into a cached bitmap and border for BeDecorator.

Make the box positioning closer to BeOS too.

Also rearrange methods in DefaultDecorator and TabDecorator a bit.


# 63720e0fd05765df6ecbc52db8387aa03a3e956a 05-Aug-2013 John Scipione <jscipione@gmail.com>

Convert BeDecorator to derive from TabDecorator

Also, make the close and zoom buttons update when clicked.


# 662298bc9d526bd27c10ac25b04fc8e7d3e93577 30-Jul-2013 John Scipione <jscipione@gmail.com>

BeDecorator: Update header guard definition


# 87c51182756eeecc680ab404a79e7b474bfabc5c 30-Jul-2013 John Scipione <jscipione@gmail.com>

Decorators: Update copyright headers


# 78a987cc9b0b9beb175b73819f5bd2a95718b1f6 29-Jul-2013 John Scipione <jscipione@gmail.com>

Make the decorators not crash


# db9c24a6513b99e48be51d9833c9ce3f9c6f73e3 19-Jul-2013 John Scipione <jscipione@gmail.com>

BeDecorator: make it compile, use tabs.

Crashes spectacularly like WinDecorator.


# b46615c55ad2c8fe6de54412055a0713da3d610a 19-May-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


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


# b509dbd998354e88e0007909071fc76074459ebb 24-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unused _SetColors().


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


# 7330d2fae363e210d7346145219b550be987df8c 23-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Looks like this was somehow missed in r39602. Fixes build.



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


# 3a5082aa46f958b1f49398c8b69458fa12dd581e 10-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the home brewn double click detection - we're now simply using the
"clicks" field of the mouse message as everywhere else.
* Renamed Decorator::Clicked() to MouseAction().
* Minor style cleanup.


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


# f8751b1fe6af6e6148aa0c653032307ffba6f628 03-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix coding style.



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


# 1649544d81946103a54c944195d8b9d5cad389cd 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Adapted the ClassicBe decorator to the new DecorAddOn interface.



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


# 4d1aa4a61965955da9d277bd7d526bbefebf1302 02-Aug-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Some coding style fixes.



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


# 3becd1d260b168325b32b82c40633f05c999ef21 18-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix the ClassicBe decorator for decorator API change.


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


# facf61e75c3453b771ecf21191f2730e7cd65fd4 22-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Bring the MacDecorator to compileable and runnable state. I advise you not to use it yet, however.


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


# 4550f389498c5e5c7143f340fca42d51fe0f796d 22-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

-Bring BeDecorator back at a compilable state
-Some updates to the DecoratorManager to try to make it working. The add-on is not identified properly but I can't find out why...


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


# ff78e73c3ba7d39a4556fbfce541029cd06f90f7 23-Feb-2007 DarkWyrm <darkwyrm@gmail.com>

Unbroke the classic R5 decorator and updated sources to match the sources for DefaultDecorator before applying changes for its looks
Sweet cracker sandwich! I actually figured out something for a Jamfile on my own -- it took a while to figure out how to link against the app_server. :-)


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


# 2874b546de42f2da6abec39ea0a88ad56a47b848 21-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Sync with most recent doings in the server's DefaultDecorator class


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


# 4ff18eccb5277365db3e92295620b08a72e17711 17-Sep-2003 DarkWyrm <darkwyrm@gmail.com>

Un-kludged Decorator::GetFootprint


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


# 634831d856fb45ec50eb6da629e3796449530c12 28-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated to use new patten passing code.
BeDecorator updated from work on DefaultDecorator


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


# 136966335a267ff37b434288ba32d4026d2a35fd 07-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated support sources
Improved drawing.
Strange drawing bug in BeDecorator buttons to be fixed later


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


# 293c3378f352509a42404cb51d4a1ffd62341515 13-Apr-2003 shatty <shatty@nowhere.fake>

add newline to end of file


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


# bbceccae40603f6e43c1ed328122ed5e6bd34aa5 07-Feb-2003 DarkWyrm <darkwyrm@gmail.com>

Updated BeDecorator from proto7 API


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


# 76b04a8655139f563314382872a9d1dc9797c42a 27-Sep-2002 shatty <shatty@nowhere.fake>

fixed newline at end of file


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


# 9cf7b05e49c2c1cb6abd75565400a5922b5f79e7 07-Sep-2002 DarkWyrm <darkwyrm@gmail.com>

Removed SRect and SPoint as per Erik


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


# 30e06bbf03ad86ec0eaad83238015824a607a865 24-Aug-2002 DarkWyrm <darkwyrm@gmail.com>

Initial checkin


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