History log of /haiku/headers/os/interface/View.h
Revision Date Author Comments
# 3cb84528 09-Jul-2023 Trung Nguyen <trungnt282910@gmail.com>

headers/os: Make headers generator-friendly

Make Haiku headers a bit more friendly to binding generators by:
- Giving some `enum`s names (especially those that appear in
default arguments).
- Converting an internal `inline` function into a macro so that
the result could be evaluated in compile time.

Change-Id: I770674ad8fa7b24ac30b6b447d52a4b4c2530b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6716
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 241f109c 01-Nov-2022 Máximo Castañeda <antiswen@yahoo.es>

View: provide the transform between different coordinate spaces

There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 5bbf7f1b 05-Feb-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Actually handle more than 3 mouse buttons

The code in input_server was pretty much all set for this, but there was
no way to configure the extra buttons. Add them to the mouse view in
Input preferences (up to 5 buttons are handled now)

Define a new B_MOUSE_BUTTON(n) macro to generate the bitmask for a given
button (numbered from 1).

Change-Id: I9091082277937d89b08464ff474e7bbb5db82401
Reviewed-on: https://review.haiku-os.org/c/haiku/+/180
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 47102c07 24-Feb-2020 X512 <danger_mail@list.ru>

Interface Kit: introduce B_TRANSPARENT_BACKGROUND flag

BeOS didn't support transparent views. As documented in the Be Book,
SetViewColor(B_TRANSPARENT_COLOR) only effect is to not fill the
invalidated areas with the view color before calling Draw() (it avoids
flickering, especially when combined with B_FULL_UPDATE_ON_RESIZE).

A previous change made B_TRANSPARENT_COLOR actually make the view
transparent (that is, additionally to the above, the underlying view is
drawn before the transparent children), but it creates compatibility
issues.

In order to keep the API compatible with BeOS, the new behavior is now
enabled explicitly using the B_TRANSPARENT_VIEW flag. This also opens
for future developments like allowing a view color with an alpha
channel (not supported yet).

Adjust programs that require transparent views.

Fixes #15744, #15745.
Helps with #15645.

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


# c67dde0f 17-Nov-2019 Kacper Kasper <kacperkasper@gmail.com>

app_server: Add tiled bitmap drawing routines

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


# e5d0c909 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

BView: Add a B_SCROLL_VIEW_AWARE flag.

* This indicates the view will manage whatever scrollbars are targeted
to it.
* Use _B_RESERVED7_ for this. It's been RESERVED since BeOS R5
(I guess it was probably something on some older BeOS version?)
and we don't really care about BeOS R4 ABI compatibility, so
that should be fine.
* Update BScrollView to not touch BScrollBar range/proportion
when the target view has this set.
* Update BListView to set this flag, always.

Fixes #14871.

Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 13dbf471 24-Jul-2017 Jérôme Duval <jerome.duval@gmail.com>

Revert "BView: use off_t instead of long."

This reverts commit ab3a87ed6e5925dd8f9de119dbf689b6ac8afee5.


# ab3a87ed 21-Jul-2017 Jérôme Duval <jerome.duval@gmail.com>

BView: use off_t instead of long.


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


# 25dbf74b 10-Nov-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

BView: add methods for affine translation/scaling/rotation

* BView::TranslateBy(), BView::ScaleBy() and BView::RotateBy()
allow to conveniently modify the current affine transformation.
This makes it unnecessary to first read the current transform,
modify it, and then set it again.
Uses the new Pre...() methods of BAffineTransform.

* Also, remove setting the transform "through" to the BView even
while recording a BPicture, as this now results in transforms
being applied more than once.


# 4bd6f322 09-Nov-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

app_server/Interface Kit: add new clipping API

* Add new clipping API for rectangles (ClipToRect, ClipToInverseRect)
and shapes (ClipToShape, ClipToInverseShape)

* Works with affine transforms and automatically switches from fast
region-based clipping to alpha-mask based clipping as necessary.

* Always self-intersecting, i.e. no state push required to further
narrow down the clipping region. All of the 4 new methods can be
mixed in any order.


# 551438b9 25-Jul-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

app_server: add new BView layers API

* Add new methods
BView::BeginLayer(uint8 opacity)
BView::EndLayer()

* All drawing between begin and end of a layer is redirected onto an
intermediate bitmap. When ending the layer, this bitmap is
composited onto the view with the opacity given when the layer was
started.

* Layers can be nested arbitrarily and will be blended onto each
other in order. There can also be any arbitrary interleaving of
layer begin/end and drawing operations.

* Internally, drawing commands are redirected into a BPicture between
BeginLayer and EndLayer (but client code need not know or care
about this). Client code can also start/end other BPictures while
inside a layer.

* Uses the PictureBoundingBoxPlayer to determine the size of the
layer bitmap before allocating and drawing into it, so it does not
allocate more memory than necessary and -- more importantly -- it
will not alpha-composite more pixels than necessary.

* Drawing mode is always set to B_OP_ALPHA, blend mode to
(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE) while inside layers. This is
necessary for (a) correct compositing output and (b) for
redirection of drawing into the intermediate bitmap, which uses the
renderer_region offset (in B_OP_COPY, the Painter does not use the
AGG renderer methods, it directly accesses the pixel data. This
would access out-of-bounds without the offset, so B_OP_COPY cannot
be allowed.)
To ensure these modes aren't changed, BView::SetDrawingMode()
and BView::SetBlendingMode() are ignored while inside a layer.

* The main motivation behind this new API is WebKit, which internally
expects such a layers functionality to be present. A performant and
reusable implementation of this functionality can only be done
server-side in app_server.


# 4198ccec 14-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

Whitespace cleanup only.


# 794c227e 13-Feb-2015 Axel Dörfler <axeld@pinc-software.de>

BView: fixed RemoveSelf() layout item handling.

* When RemoveSelf() is called, we do not own our own layout items, so
we must not delete them.
* However, we do own them when we still have layout items left when
we get deleted ourselves.
* This fixes removing/adding a child view to a view without deleting
it inbetween (like the new Network preferences will do).
* Optimized item removal -- not a good idea to always remove item 0.


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

Style fixes to IK, focus on docs


# f4870e1c 27-May-2014 John Scipione <jscipione@gmail.com>

BView: Rename parameters for consistency, docs.

No functional change.


# eb431663 11-Mar-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

app_server & interface kit: support fill rules.

* BView gets SetFillRule/FillRule methods. The fill rule is part of the
view state.
* The B_NONZERO rule is the default. This is what we implemented before.
* The B_EVEN_ODD rule is the other common possibility for this, and
we need to support it to help WebKit to render properly.


# ab5c7442 07-Mar-2014 John Scipione <jscipione@gmail.com>

BView: ScrollWithMouseWheelDelta return status code


# a6db6bd4 04-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

Added WIP support for affine transformations to BViews.

Everything untested, but compiles, so it must work. The idea is to introduce
BAffineTransform additionally to the existing Origin and Scale properties of
BViews. One may use it in parallel or as an alternative. Painter in app_server
is not yet aware of the additional transformation. It is however already used
to transform drawing coordinates. It probably needs to work differently,
perhaps only in Painter and AGGTextRenderer.


# 45e17d3d 06-Nov-2013 John Scipione <jscipione@gmail.com>

Update BView::DrawAfterChildren() param name

... from r to updateRect, no functional change intended.

Also a tiny change to the param description in the docs.


# 94dc74b0 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More explicit denoting the BPrivate namespace


# 1e6e124c 28-Jun-2013 John Scipione <jscipione@gmail.com>

BView: Style fixes only, no functional change intended

Motivated by inconsistancies found while documenting BView.

Update copyright year, alphabetize

Variable names normalized:
* pt => point
* r => rect
* p => pattern
* c => color
* msg => message
* a, b and pt0, pt1 => start, end
* r, g, b, a => red, green, blue, alpha

A couple of white spaces fixes.

A couple of !pointer => pointer == NULL fixes.

GetPreferredSize params => _width and _height to indicate out params.


# 4656e550 04-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added method SetExplicitSize() for convenience.


# 9f5864ab 24-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Handle the scroll wheel changing over scrollbars.

* Extract the scrollbar change based on the mouse wheel delta into a protected
method of BView.
* Call that method from BScrollBar's MessageReceived.

With this change it is now a bit easier to scroll horizontally around the
system by putting the mouse cursor over a horizontal scrollbar and using the
wheel.

Fixes #8631.


# 31f76857 09-May-2012 czeidler <haiku@clemens-zeidler.de>

The layout checks the target view now if the layout invalidation has been disabled in the view.


# 2f2f3fa0 28-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Moved stable tool tip concept into the BToolManager class.

* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
periodically update its tool tip via SetToolTip(const char*), and one that
sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
extra reference to the tool tip currently shown.


# 0c8b758c 05-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Add a BView::LayoutChanged() method, called after layout of this view and children.

Fixes #7683.


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

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


# 1d6c7b6c 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
may have slipped by.


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


# cbac1a23 16-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Alex Wilson: Added archiving/unarchiving of layout and layout
related data.


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


# a9daf3d9 15-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Improved the DrawString() method that takes offsets per glyph by making the
client provide the array size. Added version that doesn't take a string length
for convenience.


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


# 77e5acc0 15-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

* Extended the BView drawing API by a DrawString() version that takes an array
of locations, one for each glyph.
* Added a test for the new functionality.


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


# 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


# 8318af01 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


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


# a0747aad 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

After the first call to BView::InvalidateLayout() further invocations don't
invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
called by layout implementations whenever they have updated their cached
information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


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


# 8f24c711 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel!


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


# fa0ba1f8 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Cache a view's server token. Avoids getting it for every
BView method that contacts the server.


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


# 53eaeede 28-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the bitmap filter options to InterfaceDefs.h.
* Moved the bit in order not to clash with the tile options.


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


# 39fbf550 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 991547ef 14-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


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


# 162a7f5f 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented new BView drawing functions DrawBitmap[Async](
const BBitmap* bitmap, BRect bitmapRect, BRect viewRect, uint32 options).
Only option so far is B_FILTER_BITMAP_BILINEAR.
* BView::DrawBitmap[Async](const BBitmap* bitmap, BRect viewRect) was accessing
the bitmap pointer without checking it. Would therefore crash when passing
NULL, unlike the other methods.
* The BPicture code already reserved room for the BBitmap flags, but did not
store the actual flags and neiter use them for anything. Since the bitmap
data is stored anyways, the bitmap creation flags do not matter. So I reused
this for the new bitmap drawing options.
* Rewrote Bitmap.h and removed the B_BITMAP_SCALE_BILINEAR flag again.
* Tried to optimize Painter::_DrawBitmapBilinearCopy32() a little by giving
the compiler better hints. There seems to be a marginal, possibly imagined
speed increase < 0.05 ms. ;-)


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


# 1c111165 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Cleanup only.


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


# bb73c05f 09-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
message and discards too old events, but only if there is another event
in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
in case the event mask specifies B_NO_POINTER_HISTORY.
B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
messages.


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


# 52e06f98 16-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Artur Wyszynski:
* Renamed BView::Alignment() to LayoutAlignment() which fixes a ton of warnings
and some conflicts with BControls.
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
(can't do it for GCC 2.95.3, since that would break binary compatibility
AFAIKT)


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


# 838c73ba 11-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed unused BWindow friend classes, renamed some BView member
variables to fit our guidelines.


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


# 099fb2d3 25-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* removed declarations for methods which are not used/implemented in View.h
* improved naming of some private BView functions and used our underscore
prefix
* added a _DrawAfterChildren method to BView which does the necessary setup
and calls the DrawAfterChildren hook
* call the new _DrawAfterChildren method in the BWindow implementation, this
was easy since the view tokens are already hierachically sorted
* implement support for B_DRAW_ON_CHILDREN in the app_server's ViewLayer, it
simply means that children are ignored for the views clipping region, any
drawing methods will paint over children (therefor the B_DRAW_ON_CHILDREN
flag is even properly named)

With these changes, support for B_DRAW_ON_CHILDREN and the DrawAfterChildren()
hook are implemented and behave exactly as on R5 as far as I can tell, also
for the view background painting.



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


# f6e4cbb9 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


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


# b7858373 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


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


# 8c1a98d8 12-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* there was a complete mixup of "drawing origin" and "scrolling offset" in the
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
doing the check_lock() thing in the recursion, also Origin() would likely
have communicated with the app_server all the time, since the origin bit
was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98


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


# d4328390 08-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Set the _RESIZE_MASK_ macro to 0xffff. It was the bitwise inverse of the
disjunction of all view flags before, and the new layout related flags were
missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
directly in a derived class instead of a separate BLayout, one needs to
override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().


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


# 476d4bef 15-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added IsLayoutValid().


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


# 10f6ed94 17-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* implemented "false bold" for text rendering. It is a new property
of BFont. You can BFont::SetFalseBoldWidth(float) a width on a
BFont object, and it will cause the glyph shapes to be run through
an AGG "contour converter" so that they become thicker or thinner.
IIRC, this is commonly referred to as "false bold". The "width" value
is the distance in pixels that the new glyph outline will be offset
from the original outline.

It would be nice if someone could look at my change to View.h with
regards to the B_FONT_ALL flag.


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


# 55f6067f 11-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* I thought it was a good idea to Flush() the server link
in all drawing methods in case the parent window was
not in a "transaction" (fInTransaction). For ordinary
updates, nothing has changed, but if you call drawing
methods outside of an update, they will happen "immediately"
rather than when the link is sporadically full and auto
flushes. The effect is that the cursor in Terminal blinks
reliably, the selection in BTextViews follows the mouse
right on the spot (and so on). BWindow::BeginViewTransaction()
and EndViewTransaction() now have a meaning in Haiku too.


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


# fc62f08d 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed BView::_SetShelf(), it did not remove a previous shelf.
* Fixed BShelf::_AddReplicant(), at least a bit. I managed to add the "ScreenChanger"
icon to the tray, although the icon was not drawn, and it was on the wrong
position.
* _AddReplicant() also did not reply to the waiting message source in case
of failure.


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


# e351ecb7 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BView::_SetViewImage() to _SetViewBitmap(), and AS_LAYER_SET_VIEW_IMAGE
to AS_LAYER_SET_VIEW_BITMAP.


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


# aa110a00 07-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


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


# ac4fe990 05-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
This saves overhead on both sides, the server doesn't need to build the update message
for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
also break the code).


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


# 14d02d22 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
(this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
(previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
compatible to that one.


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


# bb1336b4 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
the same), and fixed it on the way: the state of the child views
is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


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


# 9793d440 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Removed superfluous BView::findView() and moved its functionality to BView::FindView().
Fixed it on the way - it's a bad idea to pass NULL pointers to strcmp().


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


# dd10337f 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


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


# a1ce4892 22-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

added a method for properly calling 'Attached' hooks


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


# dcb1e916 07-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Replaced _view_attr with comparable ViewAttr class and removed a crash


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


# 36845b12 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* added PrintToStream() method for debugging BView.


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


# f62402a7 03-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

added const to void Scale(); uncommented one method...


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


# 3f34315d 01-Sep-2003 shatty <shatty@nowhere.fake>

fixed improper padding removal. the addition of Scale() required one non-virtual function to be removed. apparently the private function "removeFromList" was removed. however, _ReservedView2() was also incorrectly commented out. this caused obos stylededit to fail to work, which is how I found this. I have now tested it with this version and it works


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


# b95458fd 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

modified some methods names


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


# d2304894 14-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Check-in for Adrian Oanca


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


# 4198ccecf3e2f6f19ec577af97a083162ed8e15d 14-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

Whitespace cleanup only.


# 794c227e83907f60a9c92891b0ccdecafa21814b 13-Feb-2015 Axel Dörfler <axeld@pinc-software.de>

BView: fixed RemoveSelf() layout item handling.

* When RemoveSelf() is called, we do not own our own layout items, so
we must not delete them.
* However, we do own them when we still have layout items left when
we get deleted ourselves.
* This fixes removing/adding a child view to a view without deleting
it inbetween (like the new Network preferences will do).
* Optimized item removal -- not a good idea to always remove item 0.


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

Style fixes to IK, focus on docs


# f4870e1cf44f700781d4214c8a1006de0337d189 27-May-2014 John Scipione <jscipione@gmail.com>

BView: Rename parameters for consistency, docs.

No functional change.


# eb431663264ef319e72b492801fb867b5d71910b 11-Mar-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

app_server & interface kit: support fill rules.

* BView gets SetFillRule/FillRule methods. The fill rule is part of the
view state.
* The B_NONZERO rule is the default. This is what we implemented before.
* The B_EVEN_ODD rule is the other common possibility for this, and
we need to support it to help WebKit to render properly.


# ab5c74422e898b5023f2653ba2fb630bb9952602 07-Mar-2014 John Scipione <jscipione@gmail.com>

BView: ScrollWithMouseWheelDelta return status code


# a6db6bd40fe3492fd3104dba560f0e3ff61d388d 04-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

Added WIP support for affine transformations to BViews.

Everything untested, but compiles, so it must work. The idea is to introduce
BAffineTransform additionally to the existing Origin and Scale properties of
BViews. One may use it in parallel or as an alternative. Painter in app_server
is not yet aware of the additional transformation. It is however already used
to transform drawing coordinates. It probably needs to work differently,
perhaps only in Painter and AGGTextRenderer.


# 45e17d3d420323d76203ea234106f4d9d2bdd451 06-Nov-2013 John Scipione <jscipione@gmail.com>

Update BView::DrawAfterChildren() param name

... from r to updateRect, no functional change intended.

Also a tiny change to the param description in the docs.


# 94dc74b027f8689bc67d616bf771fb4415350453 10-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More explicit denoting the BPrivate namespace


# 1e6e124cb40d6907cd2daa0c1d45ac2a646e08f6 28-Jun-2013 John Scipione <jscipione@gmail.com>

BView: Style fixes only, no functional change intended

Motivated by inconsistancies found while documenting BView.

Update copyright year, alphabetize

Variable names normalized:
* pt => point
* r => rect
* p => pattern
* c => color
* msg => message
* a, b and pt0, pt1 => start, end
* r, g, b, a => red, green, blue, alpha

A couple of white spaces fixes.

A couple of !pointer => pointer == NULL fixes.

GetPreferredSize params => _width and _height to indicate out params.


# 4656e550b0998dae6450e63a6a37b2f664b03e4d 04-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

Added method SetExplicitSize() for convenience.


# 9f5864ab093a8e363d1eba0405c57f0e2596b83a 24-Jun-2012 Ryan Leavengood <leavengood@gmail.com>

Handle the scroll wheel changing over scrollbars.

* Extract the scrollbar change based on the mouse wheel delta into a protected
method of BView.
* Call that method from BScrollBar's MessageReceived.

With this change it is now a bit easier to scroll horizontally around the
system by putting the mouse cursor over a horizontal scrollbar and using the
wheel.

Fixes #8631.


# 31f768577ea9a64f880fc9d769648337f01eede8 09-May-2012 czeidler <haiku@clemens-zeidler.de>

The layout checks the target view now if the layout invalidation has been disabled in the view.


# 2f2f3fa042bf2de464d8318de702db7106b686a2 28-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Moved stable tool tip concept into the BToolManager class.

* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
periodically update its tool tip via SetToolTip(const char*), and one that
sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
extra reference to the tool tip currently shown.


# 0c8b758c0920d544dc07d160c90874b027a5889f 05-Nov-2011 Alex Wilson <yourpalal2@gmail.com>

Add a BView::LayoutChanged() method, called after layout of this view and children.

Fixes #7683.


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

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


# 1d6c7b6cb6f46c2672074ff137a18833d4dd3041 17-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
may have slipped by.


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


# cbac1a23551e7a5300d9a95197063574078786ee 16-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Alex Wilson: Added archiving/unarchiving of layout and layout
related data.


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


# a9daf3d9110b857f16e84b3ebbaa7fe6934abdb3 15-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Improved the DrawString() method that takes offsets per glyph by making the
client provide the array size. Added version that doesn't take a string length
for convenience.


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


# 77e5acc0d9d737051591e663ccf3376a32bfcf84 15-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

* Extended the BView drawing API by a DrawString() version that takes an array
of locations, one for each glyph.
* Added a test for the new functionality.


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


# 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


# 8318af01b99f0c1c6622b7bf33db02794b7eaa20 03-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
might need to be improved over time (also, some things as archivability
aren't fully implemented yet). The ToolTip.h header should get public once
finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


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


# a0747aad3bb6204d11f634473eeced2d3f351875 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

After the first call to BView::InvalidateLayout() further invocations don't
invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
called by layout implementations whenever they have updated their cached
information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


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


# 8f24c711026f5a3e370f662cb95a93a1392f6472 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Reverted my change to usage of _get_object_token_(), it already means to use
a cached token... doh! Thanks Axel!


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


# fa0ba1f8558995e2a4ed13b69c95e8402dee8900 20-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

Cache a view's server token. Avoids getting it for every
BView method that contacts the server.


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


# 53eaeede6faa63eb6d3f400fdb43fb4204627fe6 28-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the bitmap filter options to InterfaceDefs.h.
* Moved the bit in order not to clash with the tile options.


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


# 39fbf5509b8740d9883b61649027478dc8a3ead8 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# 991547ef6c1fca650f0fba855206296ef54bc441 14-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski:
* Implemented BGradient, BGradientLinear, BGradientRadial,
BGradientDiamond, BGradientConic and BGradientRadialFocus
new Interface Kit classes.
* Implemented all the (AGG-based) backend necessary in
the app_server to render gradients (Painter, DrawingEngine)
* app_server/View can convert a BGradient layout to screen
coordinates.
* Added BGradient methods of the Fill* methods in BView.
* Implemented a test app and added it to the image as a
demo.
* Adopted Icon-O-Matic and libs/icon in order to avoid
clashing with the new BGradient class. Re-use some
parts where possible.

Awesome work, Artur! Thanks a lot. Now a more modern
looking GUI has just become much easier to implement! :-)

TODO:
* Remove the need to have gradient type twice in the
app_server protocol.
* Refactor some parts of the patch to remove duplicated
code (Painter, DrawingEngine).
* Adopt the BPicture protocol to know about BGradients.
* Review some parts of the BArchivable implementation.


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


# 162a7f5f8e924eda0b7d7b99167882591926ad6d 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented new BView drawing functions DrawBitmap[Async](
const BBitmap* bitmap, BRect bitmapRect, BRect viewRect, uint32 options).
Only option so far is B_FILTER_BITMAP_BILINEAR.
* BView::DrawBitmap[Async](const BBitmap* bitmap, BRect viewRect) was accessing
the bitmap pointer without checking it. Would therefore crash when passing
NULL, unlike the other methods.
* The BPicture code already reserved room for the BBitmap flags, but did not
store the actual flags and neiter use them for anything. Since the bitmap
data is stored anyways, the bitmap creation flags do not matter. So I reused
this for the new bitmap drawing options.
* Rewrote Bitmap.h and removed the B_BITMAP_SCALE_BILINEAR flag again.
* Tried to optimize Painter::_DrawBitmapBilinearCopy32() a little by giving
the compiler better hints. There seems to be a marginal, possibly imagined
speed increase < 0.05 ms. ;-)


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


# 1c111165b0c601366d90b02c4cff0af7f02036c0 28-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Cleanup only.


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


# bb73c05fd78548cff26204255950b22682101cf0 09-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

* Introduced a new view event mask flag: B_FULL_POINTER_HISTORY which,
when set, prevents any old mouse moved message discarding.
* BWindow::DispatchMessage(B_MOUSE_MOVED) checks the event time of the
message and discards too old events, but only if there is another event
in the queue and the view does not specify B_FULL_POINTER_HISTORY.
* BView::GetMouse() ignores the checkHistory flag passed to the function
in case the event mask specifies B_NO_POINTER_HISTORY.
B_FULL_POINTER_HISTORY on the other hand prevents the dropping of old
messages.


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


# 52e06f988d899b47c5d93d07e99aa94c0af8019b 16-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Artur Wyszynski:
* Renamed BView::Alignment() to LayoutAlignment() which fixes a ton of warnings
and some conflicts with BControls.
* Added virtual destructor to BRefFilter in case the GCC version is 3 or newer
(can't do it for GCC 2.95.3, since that would break binary compatibility
AFAIKT)


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


# 838c73ba76ad83ae603837e65739eb975eb522b8 11-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed unused BWindow friend classes, renamed some BView member
variables to fit our guidelines.


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


# 099fb2d3be5caa3ea7413fe6289047479161c877 25-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* removed declarations for methods which are not used/implemented in View.h
* improved naming of some private BView functions and used our underscore
prefix
* added a _DrawAfterChildren method to BView which does the necessary setup
and calls the DrawAfterChildren hook
* call the new _DrawAfterChildren method in the BWindow implementation, this
was easy since the view tokens are already hierachically sorted
* implement support for B_DRAW_ON_CHILDREN in the app_server's ViewLayer, it
simply means that children are ignored for the views clipping region, any
drawing methods will paint over children (therefor the B_DRAW_ON_CHILDREN
flag is even properly named)

With these changes, support for B_DRAW_ON_CHILDREN and the DrawAfterChildren()
hook are implemented and behave exactly as on R5 as far as I can tell, also
for the view background painting.



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


# f6e4cbb95290a74b33d012600438b84742b0e572 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


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


# b78583734c20b5ca97d78789379ae6733a9264d0 20-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),
but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


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


# 8c1a98d8d4d9a90690fbb91df0151a51705c6123 12-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* there was a complete mixup of "drawing origin" and "scrolling offset" in the
BView implementation (client side)
* introduced some private methods for _Convert*(BPoint*) methods which avoid
doing the check_lock() thing in the recursion, also Origin() would likely
have communicated with the app_server all the time, since the origin bit
was needlessly invalidated, so some speedup should be achieved
* this should fix ticket #98


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


# d432839022d3c2f38197c5b4dbdaa734360cd520 08-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Set the _RESIZE_MASK_ macro to 0xffff. It was the bitwise inverse of the
disjunction of all view flags before, and the new layout related flags were
missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
directly in a derived class instead of a separate BLayout, one needs to
override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().


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


# 476d4befd7bb79646f8f279d35448c33c2b4985b 15-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added IsLayoutValid().


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


# 10f6ed940bffa4153ff5511897bcc823b1f2d792 17-Dec-2006 Stephan Aßmus <superstippi@gmx.de>

* implemented "false bold" for text rendering. It is a new property
of BFont. You can BFont::SetFalseBoldWidth(float) a width on a
BFont object, and it will cause the glyph shapes to be run through
an AGG "contour converter" so that they become thicker or thinner.
IIRC, this is commonly referred to as "false bold". The "width" value
is the distance in pixels that the new glyph outline will be offset
from the original outline.

It would be nice if someone could look at my change to View.h with
regards to the B_FONT_ALL flag.


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


# 55f6067fcdf18ba15da0c4dd0ed3b7b8270caddd 11-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* I thought it was a good idea to Flush() the server link
in all drawing methods in case the parent window was
not in a "transaction" (fInTransaction). For ordinary
updates, nothing has changed, but if you call drawing
methods outside of an update, they will happen "immediately"
rather than when the link is sporadically full and auto
flushes. The effect is that the cursor in Terminal blinks
reliably, the selection in BTextViews follows the mouse
right on the spot (and so on). BWindow::BeginViewTransaction()
and EndViewTransaction() now have a meaning in Haiku too.


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


# fc62f08d8a3db0791f2b19ba8f47fcdcc251d04b 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed BView::_SetShelf(), it did not remove a previous shelf.
* Fixed BShelf::_AddReplicant(), at least a bit. I managed to add the "ScreenChanger"
icon to the tray, although the icon was not drawn, and it was on the wrong
position.
* _AddReplicant() also did not reply to the waiting message source in case
of failure.


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


# e351ecb78d8eed1a230832fba37de434a622bf0d 29-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BView::_SetViewImage() to _SetViewBitmap(), and AS_LAYER_SET_VIEW_IMAGE
to AS_LAYER_SET_VIEW_BITMAP.


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


# aa110a00e0d70f6fb072e4cd7ef7a4063c4158e7 07-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


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


# ac4fe990c92665d8b37c0d6ff691e7c2dea004c4 05-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

* The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
This saves overhead on both sides, the server doesn't need to build the update message
for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
also break the code).


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


# 14d02d22f66d08946519ad2b073be23fa78fc0c3 21-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
(this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
(previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
compatible to that one.


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


# bb1336b44fd1e4de56ac33d3c8b66787083243d0 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
the same), and fixed it on the way: the state of the child views
is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


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


# 9793d44045479c0536e0710a7282cf4134b690aa 26-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Removed superfluous BView::findView() and moved its functionality to BView::FindView().
Fixed it on the way - it's a bad idea to pass NULL pointers to strcmp().


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


# dd10337fd005a67a4947714fdeecf2121485b91d 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


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


# a1ce489220378281436887ec7214a8c27f896759 22-Feb-2005 Adi Oanca <adioanca@nowhere.fake>

added a method for properly calling 'Attached' hooks


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


# dcb1e9166daa76fe083aa04498e0adbf64816e97 07-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

Replaced _view_attr with comparable ViewAttr class and removed a crash


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


# 36845b128186f44da3dadc6b0afa79dc9bf67d0b 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* added PrintToStream() method for debugging BView.


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


# f62402a785496ad2393c78801d105d52327de9bb 03-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

added const to void Scale(); uncommented one method...


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


# 3f34315d5262232d09e5e2bdab37538822bd1e1f 01-Sep-2003 shatty <shatty@nowhere.fake>

fixed improper padding removal. the addition of Scale() required one non-virtual function to be removed. apparently the private function "removeFromList" was removed. however, _ReservedView2() was also incorrectly commented out. this caused obos stylededit to fail to work, which is how I found this. I have now tested it with this version and it works


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


# b95458fd6ccc8bce6baebaf86a1dd218d41e2e8f 31-Aug-2003 Adi Oanca <adioanca@nowhere.fake>

modified some methods names


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


# d230489402278bb900ae68703ff64585e1fb9c4c 14-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Check-in for Adrian Oanca


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