History log of /haiku/src/add-ons/decorators/WinDecorator/WinDecorator.cpp
Revision Date Author Comments
# a55deaea 16-Nov-2016 Janus <janus2@ymail.com>

WindDecorator and MacDecorator compile again

* Tile works, Stack is not very usefull at the moment.
* MacDecorator minimize button doesn't work.


# 9bd024ed 04-Jul-2015 Janus <janus2@ymail.com>

WinDecorator: fix some glitches

* The decorator now draws the titlebar.
* The titlebar is font sensitive.
* The minimize button is usable.
* The buttons are pressable.
* Fix a redraw issue.


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

Update copyright, Be and Win Decorator descs


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

Give DarkWyrm credit on WinDecorator


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

Refactor WinDecorator


# 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


# 6b585e26 29-Jul-2013 John Scipione <jscipione@gmail.com>

Fix _SetLook() and _SetFlags() methods


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

WinDecorator: Make it compile, use tabs

but stub out the missing pieces for now.

At this point selecting it crashes app server spectacularly.


# 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


# 89d652d5 23-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Decorator: Replaced the MouseAction() method with a new RegionAt().
RegionAt() just gets a point and returns which region was hit. This is in
order to move behavioral code to [Default]WindowBehaviour. I'm not happy
with this solution either, but to do it properly one would have to break the
Decorator interface into separate look and feel interfaces and reorganize the
interaction with WindowBehaviour. A task for the so-inclined reader. :-)
* Adjusted the Decorators implementations, but really tested only the default
one.
* DefaultWindowBehaviour:
- Replaced _ActionFor() method by a _RegionFor() which interprets the region
returned by Decorator::RegionAt() and converts it to a "functional" region,
i.e. combines cases we handle the same way.
- MouseDown():
- Handle the click region cases more in detail, disentangling the mouse
button cases. With the following effects:
- The middle mouse button has no effect anymore.
- Left and right mouse buttons no longer share common behavior. A right
click on a decorator button will send the window to the back.
- The window key window management modifier combo does now have precedence,
i.e. Cmd-Ctrl-click on the decorator buttons will have the same effect as
clicking anywhere in the window.
- When modifiers change between the clicks, reset the click count. Prevents
a standard click in the window followed by a Cmd-Ctrl-click from being
recognized as a double-click.
- Mouse*(): Introduced a fMinimizeCheckOnMouseUp which works similar to
fActivateOnMouseUp, just for double-clicks. The decision whether a
double-click minimizes the window is postponed until releasing the mouse
button. After moving the mouse sufficiently far or waiting half a second
without moving the mouse the window will no longer be minimized. Fixes
#6868.
- MouseUp(): Moved the primary mouse button check without the
"decorator != NULL" block. I suppose this fixes issues with the Cmd-Ctrl
actions and decoratorless windows (if those actually exist).

I can't wait to hear what things I've broken. :-)


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


# 4d978eea 03-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix the WinDecorator and some parts of the MacDecorator
* Since they all work reasonalbly well, add them to the default image. (beOs had them after all)


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


# 35ead881 11-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The WinDecorator crashed when trying to draw a menu.
Clean it up, and try to fix other things. It is now opening menus, but crashes when opening windows...


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


# 2069f565 24-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* After stippi's request, I was urged to update the decorators as well.
* Applied a minor style update to them. There are many many more violations in
there, though.


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


# b6cb7d47 24-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator: only formatting changes
WinDecorator:
* Now compilable
* Windows are drawing properly
* The window title is still missing for some reason


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


# 3b93536a 07-May-2005 DarkWyrm <darkwyrm@gmail.com>

Fixed build for decorators


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


# 3c232c2c 12-Jun-2004 beveloper <beveloper@nowhere.fake>

added missing newline


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


# 747e75bf 15-Feb-2004 DarkWyrm <darkwyrm@gmail.com>

Updated decorators to reflect the removal of _layerdata


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


# a3365dd1 26-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Update to match overhaul of DisplayDriver API


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


# 519933bd 10-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Updated to match recent changes in the DisplayDriver API


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


# 6c2ca02a 17-Nov-2003 DarkWyrm <darkwyrm@gmail.com>

Fixes to decorators broken by tweaks to click_type in Decorator.h


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


# 473f6f30 11-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated Decorator.* from changes made to app_server/Appearance
Added MacDecorator


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


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

Graphical retooling of the Windows decorator. Much better. :)


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


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

Updated WinDecorator from proto7 API


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


# 9bd024edbe5d06358e4285100a3240e4d138a712 04-Jul-2015 Janus <janus2@ymail.com>

WinDecorator: fix some glitches

* The decorator now draws the titlebar.
* The titlebar is font sensitive.
* The minimize button is usable.
* The buttons are pressable.
* Fix a redraw issue.


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

Update copyright, Be and Win Decorator descs


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

Give DarkWyrm credit on WinDecorator


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

Refactor WinDecorator


# 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


# 6b585e268a40f2f6cea18886cd9e844d8a0d8434 29-Jul-2013 John Scipione <jscipione@gmail.com>

Fix _SetLook() and _SetFlags() methods


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

WinDecorator: Make it compile, use tabs

but stub out the missing pieces for now.

At this point selecting it crashes app server spectacularly.


# 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


# 89d652d5e0defd9d095c778709cef82f5f10c357 23-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Decorator: Replaced the MouseAction() method with a new RegionAt().
RegionAt() just gets a point and returns which region was hit. This is in
order to move behavioral code to [Default]WindowBehaviour. I'm not happy
with this solution either, but to do it properly one would have to break the
Decorator interface into separate look and feel interfaces and reorganize the
interaction with WindowBehaviour. A task for the so-inclined reader. :-)
* Adjusted the Decorators implementations, but really tested only the default
one.
* DefaultWindowBehaviour:
- Replaced _ActionFor() method by a _RegionFor() which interprets the region
returned by Decorator::RegionAt() and converts it to a "functional" region,
i.e. combines cases we handle the same way.
- MouseDown():
- Handle the click region cases more in detail, disentangling the mouse
button cases. With the following effects:
- The middle mouse button has no effect anymore.
- Left and right mouse buttons no longer share common behavior. A right
click on a decorator button will send the window to the back.
- The window key window management modifier combo does now have precedence,
i.e. Cmd-Ctrl-click on the decorator buttons will have the same effect as
clicking anywhere in the window.
- When modifiers change between the clicks, reset the click count. Prevents
a standard click in the window followed by a Cmd-Ctrl-click from being
recognized as a double-click.
- Mouse*(): Introduced a fMinimizeCheckOnMouseUp which works similar to
fActivateOnMouseUp, just for double-clicks. The decision whether a
double-click minimizes the window is postponed until releasing the mouse
button. After moving the mouse sufficiently far or waiting half a second
without moving the mouse the window will no longer be minimized. Fixes
#6868.
- MouseUp(): Moved the primary mouse button check without the
"decorator != NULL" block. I suppose this fixes issues with the Cmd-Ctrl
actions and decoratorless windows (if those actually exist).

I can't wait to hear what things I've broken. :-)


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


# 4d978eea2f9530892046f3344341ed85c9e0b1cf 03-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Fix the WinDecorator and some parts of the MacDecorator
* Since they all work reasonalbly well, add them to the default image. (beOs had them after all)


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


# 35ead8815b679605a9b4db8130613ea100f4b14c 11-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

The WinDecorator crashed when trying to draw a menu.
Clean it up, and try to fix other things. It is now opening menus, but crashes when opening windows...


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


# 2069f565e8ed3556b30cf2f5e3aa54450128b8c2 24-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* After stippi's request, I was urged to update the decorators as well.
* Applied a minor style update to them. There are many many more violations in
there, though.


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


# b6cb7d4779e5fbf1c5018b7f0c3e89f715d941c8 24-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator: only formatting changes
WinDecorator:
* Now compilable
* Windows are drawing properly
* The window title is still missing for some reason


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


# 3b93536aba81adc9e3d5a4403d3f6ba3a61c58e0 07-May-2005 DarkWyrm <darkwyrm@gmail.com>

Fixed build for decorators


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


# 3c232c2cba8e1ee6a5a41ea1258c9fdf5f1a5f82 12-Jun-2004 beveloper <beveloper@nowhere.fake>

added missing newline


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


# 747e75bf8d04424813fee48fe1c9fd6d9c09bc0d 15-Feb-2004 DarkWyrm <darkwyrm@gmail.com>

Updated decorators to reflect the removal of _layerdata


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


# a3365dd1848f1fc4e2c167773bc191955c4c1869 26-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Update to match overhaul of DisplayDriver API


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


# 519933bdac2f1ae6a07ec5fecf13bd200923a72f 10-Jan-2004 DarkWyrm <darkwyrm@gmail.com>

Updated to match recent changes in the DisplayDriver API


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


# 6c2ca02adac1f1efa265100218e1573eca84f2cc 17-Nov-2003 DarkWyrm <darkwyrm@gmail.com>

Fixes to decorators broken by tweaks to click_type in Decorator.h


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


# 473f6f30881d13e9db9970b8bb46e6f6c320f204 11-Jul-2003 DarkWyrm <darkwyrm@gmail.com>

Updated Decorator.* from changes made to app_server/Appearance
Added MacDecorator


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


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

Graphical retooling of the Windows decorator. Much better. :)


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


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

Updated WinDecorator from proto7 API


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