History log of /haiku/src/add-ons/decorators/MacDecorator/MacDecorator.h
Revision Date Author Comments
# 702f22b7 08-Aug-2020 John Scipione <jscipione@gmail.com>

MacDecorator: Whitespace style changes only

Change-Id: Iae2533e553df66945de8394b4678d487ff9de60e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3141
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: CodeforEvolution <secundaja@gmail.com>


# 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.


# f496c617 07-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

MacDecorator: fix some drawing problems

* Make the buttons pixel-perfect clones of Mac OS 9
* Fix missing drawing of top border when inactive
* Some colors and size tweaks to be closer the Mac OS 9

Remaining problems:
* Does not work well for windows with no tab (eg alerts)
* Still missing the resize knob
* Does not show stack and tile
* Does not show command+opt resize/move highlights


# 125ee2cb 20-Feb-2014 John Scipione <jscipione@gmail.com>

Update header guards, copyright


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

Update copyright, Be and Win Decorator descs


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

Fixup the Mac Decorator, it compiles and works

... but it still needs a lot more work to integrate with S&T.


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

MacDecorator: Give credit and update description

... to Adrien Destugues and DarkWyrm.


# 113bc195 13-Nov-2011 pulkomandy <pulkomandy@pulkomandy.ath.cx>

Get MacDecorator building again.
Also includes some style fixes and checks on fTopTab which seems to be NULL sometimes.
Does NOT behave well with tabbing yet and still has some drawing bugs.


# 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


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

Adapt MacDecorator to the new addon interface.



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


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

* Update the MacDecorator to be more in-line with the new API. It still doesn't draw anything, however.


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


# 92d78867 18-Jul-2010 François Revol <revol@free.fr>

Fix Mac decorator build.


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


# 31aac46f 23-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator :
-Draw the text in the titlebar
-Fix the buttons (they now are shaded like the DefaultDecorator one, that is, better than in original Mac OS)
-Draw the decorator all grey with no buttons when not focused
-Fix the border

There are some minor bugs left, but basically the decorator is now usable.


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


# 541987c8 23-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator:
- Style cleanup and sync with DefaultDecorator to some extent
- Don't draw a titlebar and border around menus
- Allow the client to draw something inside the window by returning the correct BRegion. (still not perfect, but it is useable, at least)


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


# 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


# 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


# f496c617c6bf73d7d06a8e22aa69aeaa9efc9404 07-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

MacDecorator: fix some drawing problems

* Make the buttons pixel-perfect clones of Mac OS 9
* Fix missing drawing of top border when inactive
* Some colors and size tweaks to be closer the Mac OS 9

Remaining problems:
* Does not work well for windows with no tab (eg alerts)
* Still missing the resize knob
* Does not show stack and tile
* Does not show command+opt resize/move highlights


# 125ee2cb57d293327121cd44713f0e8043c1190d 20-Feb-2014 John Scipione <jscipione@gmail.com>

Update header guards, copyright


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

Update copyright, Be and Win Decorator descs


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

Fixup the Mac Decorator, it compiles and works

... but it still needs a lot more work to integrate with S&T.


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

MacDecorator: Give credit and update description

... to Adrien Destugues and DarkWyrm.


# 113bc195defcbbdec8bc8e18b7eee4d83b7b6157 13-Nov-2011 pulkomandy <pulkomandy@pulkomandy.ath.cx>

Get MacDecorator building again.
Also includes some style fixes and checks on fTopTab which seems to be NULL sometimes.
Does NOT behave well with tabbing yet and still has some drawing bugs.


# 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


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

Adapt MacDecorator to the new addon interface.



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


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

* Update the MacDecorator to be more in-line with the new API. It still doesn't draw anything, however.


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


# 92d7886758ac24eecaa4378a47e79d0059edc0fa 18-Jul-2010 François Revol <revol@free.fr>

Fix Mac decorator build.


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


# 31aac46f89f3ecde9f99b6e6f6c65d1cddeee8d3 23-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator :
-Draw the text in the titlebar
-Fix the buttons (they now are shaded like the DefaultDecorator one, that is, better than in original Mac OS)
-Draw the decorator all grey with no buttons when not focused
-Fix the border

There are some minor bugs left, but basically the decorator is now usable.


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


# 541987c85dc64f49a33c617468a941d15a80c8ee 23-Dec-2009 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

MacDecorator:
- Style cleanup and sync with DefaultDecorator to some extent
- Don't draw a titlebar and border around menus
- Allow the client to draw something inside the window by returning the correct BRegion. (still not perfect, but it is useable, at least)


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


# 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


# 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