default decorator and used it instead of Decorator::Region where appropriate
(GetComponentColors(), _GetBitmapForButton()).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39636 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Note that our tests currently don't work because overloading BTestShell
doesn't seem to work (the overridden LoadDynamicSuites() is never called).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39634 a95241bf-73f2-0310-859d-f6bbb57e9c96
- Introduced a virtual GetComponentColors(), that returns an array with the
current colors for the specified component.
- Removed all rgb_color members. Replaced the ones that were actually
constant by const (or static const) ones and made use of
GetComponentColors() where the non-constant ones were used.
* SATDecorator:
- Turned rgb_color members into constants and added an overriding version
of GetComponentColors().
- HighlightBorders(): Invalidate the tab, too, as we use the border
colors for drawing the outer lines of the tab (was this intented?).
Fixes artifacts when breaking apart titled windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39630 a95241bf-73f2-0310-859d-f6bbb57e9c96
closing flag sequence. See RFC1662 §4.4.2, last paragraph.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39628 a95241bf-73f2-0310-859d-f6bbb57e9c96
virtual DrawButtons().
* SATDecorator: Override DrawButtons() instead of _DrawTab(), thus saving a
good deal of code duplication.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39627 a95241bf-73f2-0310-859d-f6bbb57e9c96
field. It does that when the modifiers, the pressed buttons, or the click
target changes between the clicks, or when the distance between the click
points is >= four pixels.
* Adjusted the Window::MouseDown() and WindowBehavior::MouseDown() interfaces
and implementation accordingly (we now also pass and return click count and
click targets).
* Removed the no longer need multi-click handling from DefaultWindowBehaviour.
Fixes#6841 and #6867.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39623 a95241bf-73f2-0310-859d-f6bbb57e9c96
* whitespace cleanup and renamed log2() to radeon_log2 (conflicts with log2 in math.h)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39620 a95241bf-73f2-0310-859d-f6bbb57e9c96
first. Fixes binary compatibility issue introduced with symbol preemption
support in the runtime loader. For unknown reasons liblayout.so, though
linked symbolically, contains a non-weak (!), preemptable BFont type info,
which was no longer resolved correctly with the new method.
Fixes#6892.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39617 a95241bf-73f2-0310-859d-f6bbb57e9c96
checking the mouse button in every case, use separate switches for the
buttons. Makes things easier to read.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39616 a95241bf-73f2-0310-859d-f6bbb57e9c96
or Cmd-Ctrl-right-click anywhere. Introduces the following behavioral changes:
* The send-to-back effect is triggered on mouse-up now. It expires after a
short time of holding the button or moving the mouse, just like the
activation effect on left-click in FFM mode.
* Depending on where the mouse was pressed, moving it will move the closest
border or corner with it, thus resizing the window. The algorithm choosing
the border/corner needs refinement. Currently the window is divided into 8
equally sized sectors corresponding to the borders/corners.
Work in progress...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39615 a95241bf-73f2-0310-859d-f6bbb57e9c96
DefaultWindowBehavior instead. DefaultDecorator uses the more appropriate
Decorator::Region.
* DefaultWindowBehavior::MouseTrackingState: Generalized the fActivateOnMouseUp
handling. It is now named fWindowActionOnMouseUp and the virtual method
MouseUpWindowAction() is called.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39614 a95241bf-73f2-0310-859d-f6bbb57e9c96
last click and reset the click count, if so. Fixes a regression introduced in
r39602 (left-click after right-click was recognized as double-click).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39609 a95241bf-73f2-0310-859d-f6bbb57e9c96
into newly introduced state classes.
* Fixed the right-click-while dragging behavior, I broke in r39602.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39608 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implement OPTION_OVERLOAD support in dhcp_message::NextOption(). Untested.
* Comment out an ASSERT which don't compile in DEBUG mode (and make no sense for me, BTW)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39607 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
* Extended app_server_debug command to be able to send it, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This makes the code much cleaner and simpler.
* Completely untested, though (will do that next).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39595 a95241bf-73f2-0310-859d-f6bbb57e9c96
mode and send the key/page up/down escape sequences instead of trying to
scroll. Makes mouse wheel scrolling in less, nano,... working. Closes#6460.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39589 a95241bf-73f2-0310-859d-f6bbb57e9c96