History log of /haiku/src/kits/interface/View.cpp
Revision Date Author Comments
# 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>


# 75e57397 16-Aug-2019 Simon South <simon@simonsouth.net>

BWindow: Do not invoke BView handlers directly

When dispatching a message to a BView, pass the message on to the view's
MessageReceived() method rather than invoking one of its handlers (e.g.
KeyDown() or MouseDown()) directly.

This commit moves the existing handler-invoking logic from
BWindow::DispatchMessage() into BView::MessageReceived(), preserving the
existing functionality.

Fixes #15254.

Change-Id: I230c0781df13e54e08573a5a31d7550520c060d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1723
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>


# 630e3f14 11-Mar-2018 Jérôme Duval <jerome.duval@gmail.com>

View: move BAffineTransform out of ViewSetStateInfo.

the size of BAffineTransform is architecture dependent, so we transmit
its contents in a standard array instead.

Change-Id: I907110742168846a869a48bb2d116cc5292ec7d0


# 2a493ea0 23-Nov-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

BView: set initial frame rect invalid when using layouting

* When a view is used with the layout system, its initial frame rect
was set to (0, 0, 0, 0), which is a BRect covering 1 pixel in the
top left corner of the window.
Since this a valid rect, it can cause "badly behaved" views to
trigger redraws of themselves and other views during the layout
process, which is ultimately the reason for the HaikuDepot UI
freezing while populating with packages.

The misbehaving view in this case is BTextView. When in read-only
mode, since commit e27a53b2, its GetHeightForWidth() implementation
causes the view to resize (really resizing, not just simulating a
resize) and thus it invalidates itself. This is broken behaviour,
and needs to be fixed in BTextView. Since GetHeightForWidth() is
called during the layout process, all the not-yet-layouted views
have a frame of (0, 0, 0, 0). The invalidation of just the one
BTextView in the layout then hits *all* new views that are being
layouted (because they all occupy the same one pixel in the
corner), and they all get redrawn.
Many view Draw() implementations ignore the update rect, so work
is being done. And even if not, this can cause a lot of traffic
on the app_server link. In a test case with HaikuDepot's
FeaturedPackagesView, adding 300 rows (each containing a BTextView,
among other views) in quick succession caused over 6 million
commands to travel over the app_server link, completely freezing
the UI for a long time.

* The actual problem here is in BTextView::GetHeightForWidth() and
must be fixed there.
However we also put in an extra-fix here because it never makes
sense anyway to try and draw a view that has not yet been layouted.
So we set the initial BView frame to an invalid rect
(0, 0, -1, -1), which will suppress any actual updating, even
when the view actively invalidates itself, as long it doesn't
have a size yet. (The dirty region will always end up empty
then).

* Fixes HaikuDepot UI freezing during package population (caused by
above described behaviour from BTextViews in FeaturedPackagesView).
Might improve performance in other applications using BTextView
with layouting as well.


# 346d1496 05-Nov-2017 Humdinger <humdingerb@gmail.com>

Properly terminate property_info lists

BListView's property_info list lacked termination, resulting in
garbage output at the and of 'hey getsuites'.

Use { 0 } everywhere for sake of consistency.

Thanks to waddlesplash for spotting the bug an providing the easy fix.


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


# ff4dee1c 24-Mar-2017 Axel Dörfler <axeld@pinc-software.de>

BView/BBox: Fixed FrameResized() handling.

* BView incorrectly passed the current width and height to
FrameResized(), not the one from the message. Since there is such
a call for each size change, a Draw() might have been called for
each of those in return.
* This should also fix such problems in BMenuBar, as it used the size
from FrameResized() as it should have.
* BBox now correctly takes the update events into account, and no
longer ignores the size passed to FrameResized().
* This fixes bug #3037.


# 6a42abb2 17-Oct-2016 Augustin Cavalier <waddlesplash@gmail.com>

BView: Add missing NULL checks to GetMouse().

Fixes #12821.


# 76b9d53b 08-Mar-2016 John Scipione <jscipione@gmail.com>

BColorControl: Rebuild control after mode switch

App Server sends each window a message that the screen has changed:
https://www.haiku-os.org/legacy-docs/bebook/BWindow.html#BWindow_ScreenChanged
Propegate B_SCREEN_CHANGED message to all child views first

Tell BColorControl to read the B_SCREEN_CHANGED message and reinitialize itself.

* Only reinit if switching to or from B_CMAP8
* Initialize all pointers to NULL in constructor
* Don't destroy and rebuild offscreen view (and text views) on reinit
* Reinitialize offscreen view on reinit.

Fixes #8035

Also initialzing the pointers to NULL in constructor fixes #12673


# ed749c62 09-Jan-2016 Jessica Hamilton <jessica.l.hamilton@gmail.com>

BView::AdoptViewColors: handle not yet attached to a Window.

As per API documentation, a BView caches the configured view
colours when not yet attached to the app_server via its
window. So check if we're attached to a window, and if we are,
then and only then do we attempt to lock/unlock our looper.

This fixes uses of AdoptViewColors and AdoptParentColors when
the view isn't yet attached to a window.


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


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

BView: Move tooltip release and fix small coding style issues.

This is only an optical change.


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

BView: Fix destruction order of layout items.

Because of the virtual hooks a BLayout must never be destroyed while it
still has layout items. If these items are only removed from the layout
in its destructor, the subclass version of hooks like ItemRemoved() are
not called anymore. This lead to leaks because many BLayout subclasses
use the ItemRemoved() hook to clean up associated data (as is suggested
explicitly in the BLayout documentation).

In the same line of thought, a BLayoutItem must never be deleted when it
is still attached to a layout, as it similarly has virtual hooks like
DetachedFromLayout() that can not be called at this point anymore.

The destructors of BLayout and BLayoutItem now have debugger calls in
case these conditions are not met which should help to avoid
accidentally introducing such hard to debug issues.

To ensure the correct destruction order the sequence is now:

* Destroy the child views first. This cleans up their layout items while
the layout tree is still intact.
* Unset the view layout before removing layout items so it can properly
detach from the layout instead of just deleting it.


# 19bb9ef9 14-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BView: Remove old TODO comment.

The BShelf is not owned by the BView (nor the BWindow for that matter)
and so must not be deleted on destruction.


# 3fc2dd56 04-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BView: Fix 64 bit build with debug output, whitespace cleanup.


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


# 31f5b8b5 25-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

BView::BeginLineArray: leave object in consistent state

We allow this method to throw bad_alloc exceptions as there is no other
way to report errors. However we left the object in a broken state
(maxCount set, but array not initialized) which would crash when calling
either AddLine or EndLineArray.

Initialize the count to 0 before throwing the exception so now
EndLineArray can be called and operations resumed safely after an
allocation failure.


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


# 24479670 17-Mar-2014 Stephan Aßmus <superstippi@gmx.de>

app_server: store and restore fill rule...

...when sending the whole view state over the link.
Also inherit the fill rule when pushing states (DrawState
copy constructor). A somewhat sloppy oversight, I must add.


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


# 5d98ee1e 08-Mar-2014 John Scipione <jscipione@gmail.com>

Revert "BScrollView: Increase small scroll step size from 1 to 3"

This reverts commit bdcfc076173236ddecccfebd945530a309debdce.


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

BView: scroll horizontally when holding control

... instead of vertically. This actually swaps horizontal and vertical
so if you have a mouse with a fancy 2-axis scroll ball it will swap
the x and y coordinates. (untested)


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

BView: ScrollWithMouseWheelDelta return status code


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

BView: Check scroll delta isn't 0


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

BScrollView: Increase small scroll step size from 1 to 3

... and then don't multiply by 3 in BView


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

BView: style fixes related to mouse scrolling


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


# b58b8cdd 01-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

BView: Fix ClipTo[Inverse]Picture() syncing.

When BPictures are created on the stack and go out of scope, they send a
AS_DELETE_PICTURE command to the ServerApp thread, and that command may be
processed sooner than the AS_VIEW_CLIP_TO_PICTURE command in the ServerWindow
thread, causing that command to no longer find a ServerPicture for the given
token. Apparently, the Be API leaves you the choice not to sync, in case for
example when you cache your BPictures and they remain valid. The default
value for "sync" is true. The BeBook could explain the situation better when
sync is needed and when not.


# d0fa6c78 28-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BView: Allow resetting ClipToPicture

Just like for regions, ClipToPicture(NULL) removes any picture clipping
at the current state level (clipping in pushed states are not undone).


# e0d1cc18 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BView: move ClipToPicture code to app_server

Now that DrawingContext makes it possible to draw on a ServerBitmap
without the need for a BView, we can replay pictures on app_server side,
avoiding the cost of creating a BBitmap, offscreen BWindow, and BView
from the application side.

The offscreen drawing context gets the same state as the view it's
rendering the picture for, so font size, drawing mode, etc are used.

The implementation is still the suboptimal one, converting the BBitmap
to a BRegion, and using that for clipping. Changing that comes next.


# 5c3fd460 12-Jan-2014 Stephan Aßmus <superstippi@gmx.de>

BView: Don't allow a view to add itself as a child.


# cf9414ff 16-Dec-2013 John Scipione <jscipione@gmail.com>

Convert coords of B_MOUSE_IDLE in _SanitizeMessage()

When BWindow receives a message in screen coordinates and the
message has a target view, as it does when the message comes from
App Server, convert the coordinates to view coordinates before
passing the message along.

Revert the portion of hrev46532 where BView converts screen
coordinates and converts them since that happens in
BWindow::_SanatizeMessage() now.


# dd0bdb49 13-Dec-2013 John Scipione <jscipione@gmail.com>

Fix a bug retreiving tooltips

Noticed this in Time prefs was displaying wrong time zone tool tip,
dug deeper...

hrev46290 introduced this bug because it passes fLastCursorPosition
into the “be:view_where” parameter of the B_MOUSE_IDLE message.
The problem is that fLastCursorPosition is in the screen’s coordinate
system, not the view’s and BView expects “be:view_where” to be in the
view’s coordinate system.

So, to fix this I pass fLastCursorPosition in the “screen_where” parameter
instead which I’ve instructed BView to interpret as the point in the screen’s
coordinate system which is then dutifully converted back the the view’s
coordinate system.

I tried to follow the naming scheme of other code, not sure if screen_where
should be namespaced with the be: predicate or not.


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


# 27929dcd 28-Jun-2013 John Scipione <jscipione@gmail.com>

BView docs: Add remaining new method descriptions

Layout and Tool Tip method documentation.

Also ScrollWithMouseWheelDelta()


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


# 410d1973 03-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Adjust modifier for fast scrolling to match other OSes.

* instead of any of (OPTION, COMMAND, CONTROL), use SHIFT to
trigger accelerated scrolling via the mouse wheel


# 9be774b5 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.


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


# c645f9bc 04-May-2012 John Scipione <jscipione@gmail.com>

Rework tooltip method in BView again.

Passing NULL or a blank string to SetToolTip(const char*) sets the
tooltip to NULL by calling SetToolTip(BToolTip*) with a NULL argument.

Calling SetToolTip(BToolTip*) with a NULL argument calls HideToolTip()
because sometimes the tool tip can change without the mouse moving,
for example because the user clicked.

Thanks Axeld and Stippi.


# 5ccf455f 03-May-2012 John Scipione <jscipione@gmail.com>

Fix another tooltip related bug that appears in Deskbar.

The bug is that in horizontal mode the tooltip will remain set to
the last moused over team menu item even if the mouse is no longer
over a menu item. The bug can be seen in the following screenshot:

http://26.media.tumblr.com/tumblr_m3gze8s1xi1r0f0hfo1_400.png

To fix this bug, allow you to set the tooltip text to blank or NULL
in SetToolTip(const char* text). In ShowToolTip() check to see if
the tooltip text is blank or NULL and if so, don't show the tip.
Setting the tooltip to blank or NULL effectively unsets the tooltip
on a 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.


# 254640bf 17-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Remove the tool tip if an empty or NULL string is set.


# 7e2730f0 19-Feb-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

View.cpp: Use B_IF_GCC_2 to simplify things


# 48d21c12 19-Feb-2012 Jérôme Duval <jerome.duval@gmail.com>

added BView::_ReservedView12() symbol for GCC4

* added _ZN5BView15_ReservedView12Ev
* helps with #8336


# 40c34878 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect BPicture to the app_server.
* maintain a list of all BPictures to do so
* BView downloads the BPicture data after recording the picture. This could probably done more efficiently using shared memory in the first place.


# ea0a06e2 06-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Remove redundant checks for fParent before calling _InvalidateParentLayout().


# f98f5ca4 01-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Fix bug in BView::RemoveSelf() that lead to a segfault.

Once again, the BObjectList removal behaviour leads to a null dereference. It's my fault of course, but there you have it. Comments have been included for future devs.


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

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

Fixes #7683.


# e7b0dc78 22-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Now that child classes aren't overriding the various InvalidateLayout() methods, we can take advantage of some guarantees to simplify/clean/optimize the layout invalidation propagation mechanisms!


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

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


# fa01d084 08-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

User BView's layout item tracking functionality to simplify and optimize some methods in BLayout and BView.
Delete BLayout::RemoveViewRecursive() as it is no longer needed.
Add a few TODO's.


# bd97b9ad 07-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

Add a BObjectList<BLayoutItem> to BView::fLayoutData that keeps track of any BLayoutItems that refer to this view that are part of a layout. BLayoutItem does the registering/deregistering of the items, and BView::Private proxies fLayoutData for us. Currently, this is not used anywhere, but there are many places where it will be used soon.


# 884384ff 25-Nov-2010 DarkWyrm <darkwyrm@gmail.com>

Sending B_COUNT_PROPERTIES for the View property now returns the right value.


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


# d0844c50 20-Sep-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix typo.



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


# 8f88fe1d 18-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fix CID-258: BView::SetViewOverlay() shouldn't crash if given a NULL bitmap.
Coverity was complaining because we did a half-ass check against NULL only to
pass that NULL pointer on to a function that deref'd it.

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


# 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


# aa818be6 12-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Update BView to call debugger when passed a NULL archive for its archive constructor. This means there is no need to check for a NULL archive in BSeparatorView. Also update BUnarchiver and friends to be NULL safe. Pointed out by Adrien, fixes CID 1754.


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


# 3c38ebff 01-Aug-2010 François Revol <revol@free.fr>

Use IntegerWidth() & friend to avoid the cast, doesn't hurt.


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


# a67b5b99 02-Aug-2010 François Revol <revol@free.fr>

Fix the width and height fields of the B_VIEW_RESIZED message to be of type int32 and not float, as stated in the BeBook. They are rarely used since BView::FrameResize() passes the floats directly from the updated bounds, but at least it should fix the XEmacs port.


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


# 4a254e4d 27-Jul-2010 Alex Wilson <yourpalal2@gmail.com>

Generally, clean up new archiving constant names & strings to be consistent in all classes. Modify archiving constants to be const char* const (thanks Ingo). Also modify archiving in many classes to use less fields by storing more data in arrays and structs. The common min, max, and preferred sizes, for example are always stored in an array now. In BTwoDimensionalLayout and BSplitLayout, the insets are archived in a BRect. Also fixed a typo in BGridLayout which caused column info to be incorrect during archival.



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


# 12c93cc7 11-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Before stippi starts clobbering the sources everywhere with superfluous
work-arounds, I applied the work-around where the problem actually occurs,
until someone takes the time to look into it.


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


# 24386c29 15-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


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


# a2224f75 11-Apr-2010 Jonas Sundström <jonas@kirilla.com>

Corrected strace output.

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


# fa5956d5 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Removed obsolete TODO: BMessage is smart enough to already use area transfers if needed.



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


# 4f24f311 11-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

The decision to inform the server about changed flags needs to depend on the
changed flags, not on the new flags! Fixes the server and client going out of
sync when clearing any flag that the server needs to know about.


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


# 76d24e95 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Ugh, forgot to check this in quite a while ago:
If the view doesn't have a tool tip, pass the B_MOUSE_IDLE to the next handler,
so the parent view can show a tool tip. This makes tool tips in a column list
view possible (or at least reasonably easy).


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


# 2ecef7f3 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Reuse an existing text tool tip, when a new text is set.


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


# a8266798 05-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Only build the gcc 2 compatibility symbols with gcc 2.
* Added gcc 4 _ReservedView11() compatibility symbol.


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


# d7a16b23 31-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

* Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
mechanism.
* Move variables that are purely used by the instance out of the header and into
the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
because of padding.
* Fix message passing by area. It never worked because the created area was
never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


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


# 1b98cebd 24-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Turn off the optimization to skip calling Flush() when an invalidate request
was already sent by this or another view. This was already the case for the
BRect version of Invalidate(), but was forgotten in the BRegion version. I
just had an idea what the problem could be, but I think it's bogus. Needs some
investigation. Should fix ticket #4119 for the time being.


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


# 514fcf3b 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Pass the mouse wheel message to our parent (ie. the next handler) if we don't
have any scrollers.


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


# 68504ee9 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Style cleanup.


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


# 9515252e 03-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The view always included the "error" in the reply, but that's only supposed
to happen when an actual error occured.
* The "set frame" property resized the view incorrectly.


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


# 19e179ca 19-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
race condition with asynchronous SetViewCursor and deleting the
cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
just in case...
* Added TODOs for caching the BView token, it's currently resolved
for every single BView call that talks to the server... not good!


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


# 834a9474 17-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed bug that prevented the font state to be properly popped. It could be
solved more efficiently by adding a new app_server call for this, though.
* Fixed stupid operator precedence bug that caused BView to always archive
everything, instead of only those items with their archiving flag set.
* Minor cleanup.


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


# a47e7e30 30-May-2009 Jérôme Duval <korli@users.berlios.de>

* merged Frame and Hidden properties (set and get) (bug #3493).
* changed Hidden set property to not check the current hidden state, as it's not exactly related.


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


# d69a73df 16-May-2009 Axel Dörfler <axeld@pinc-software.de>

* The Be API requires that options and mask is 0 to remove a mask using
BView::SetEventMask(). This fixes bug #3928.
* And while the app_server handled that correctly, BView actually did not, and
stored the wrong value.


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


# 12349c7d 05-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Begun to use structs for the BView<->app_server communication. This makes
the protocoll less prone to errors, reduces possible points of failure and
most importantly, reduces the number of function calls to the link API.
I only know the numbers for StrokeLine(), which I tested via the Benchmark
test app. With this change, drawing random colored and positioned lines
actually doubled in speed. On the BView side, the calls to
ServerLink::Attach() only halfed, while on the app_server side, the number
of calls to ServerLink::Read() is now 1/4th. It will also be worth
investigating why the link stuff is so slow at all. I also optimized
BView::DrawString() a lot in this change, but I don't have any numbers
yet. Some other commands which used multiple Attach()/Read() calls were
also optimized, at least the most important ones. Begin/EndLineArray() was
also pretty bad on the app_server side.


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


# eaccfb9d 14-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced some "new" with new(std::nothrow) where appropriate in our base
classes (BView, BWindow, BAlert, BButton - BTextView should be part of this,
too, to make BAlerts work).
* However, it's not that simple, because there is often no way to return an
error. Most of that code obviously assumes to be able to throw exceptions
(it's just not communicated to the caller). Maybe we should just start
documenting exceptions for R1 (and properly use exceptions later on).
* Automatic white space cleanup.


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


# 431dc47d 15-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski with some changes by myself:
* Resolved TODO: The type of the gradient is no longer encoded twice in the
app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
method.
* Check success for (at least) ReadGradient() in ServerWindow.


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


# 1138737b 14-Oct-2008 Rene Gollent <anevilyak@gmail.com>

Fix regression introduced in r28116: Due to the change in variable names, the
wrong version of ConvertFromScreen() was now used, resulting in the calculation
being computed and thrown away. This broke BMenu, probably amongst other things.



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


# 0945268d 14-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* GetMouse() now survives being called with NULL parameters for location or
buttons.
* Automatic whitespace cleanup.


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


# 7b40eb42 17-Sep-2008 Philippe Houdoin <philippe.houdoin@gmail.com>

Fixed a typo.


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


# 6ee56a00 08-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

added a comment explaining why the implementation should be moved to the server

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


# 0f1d1fbe 05-Sep-2008 Rene Gollent <anevilyak@gmail.com>

Temporarily disable this check in Invalidate() as requested by Stephan. This fixes the problem with redraws seen in FlattenPictureTest and a few other places.



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


# 3d2516cb 04-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented a client side (and very slow) version of BView::ClipToPicture. See bug #1397

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


# 910c4a01 28-Aug-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

the Link* api supports sending large messages through areas, thanks to Julun, and this TODO can be removed.

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


# fa552775 18-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

In BeOS, BView::Bounds() does the owner lock check. In Haiku, it does now
too. Removed the check in Frame() accordingly, because that uses Bounds().
Removed some code left overs.


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


# 52daa631 15-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added comment about possibly invalidating the layout when changing the font.


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


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

Implemented a simple fix for the message-pile-up problem of
BView::GetMouse( , ,useHistory = true) in case the application
calls GetMouse() in a loop with a longer delay then mouse
messages arrive at the queue. The "when" field of the messages
is used to discard old mouse moved messages. This also fixes
the possible problem of finding the same message over and over
in case it is not removed from the queue for other reasons.
This fix makes selecting text in Pe for example usable.


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


# f3312751 08-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

honor 80 char limit in comment


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


# bafcc63b 08-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

This is either a fix or a workaround for a problem in Pe, where the
application modifies the scrollbars one by one and the changes would
have some weird cyclic effect where the constrains of one scrollbar
affected the scrolling already while they would be lifted afterwards.
It sounds weird, but maybe it is simply a resulting behavior of the
BeOS implementation which does not check the scrollbar restrictions
in the BView code.


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


# f56301c9 07-Jul-2008 Karsten Heimrich <host.haiku@gmx.de>

* maintain our own rect while printing, this makes it possible to print all pages e.g. syslog from StyledEdit



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


# 1c4b7e9e 20-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- revert my last changes to ScrollBy, this temporarily bring back #2312
and the previously mentioned ResizeToFit issue.


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


# d511a89a 19-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- Since r21336, BView::ScrollBy was checking the values against the ScrollBar ranges but ScrollBy is often called before
updating the scroll range (ie: in ContainerWindow.cpp). IMO, the programatic ScrollBy method shouldn't depend on the
ScrollBars ranges or state. The original fix in r21336 was apparently hiding other BScrollBar or BView bugs that have been
fixed in the mean time.
The content was offseted when going back to list mode after moving icons on the left/up in icon mode. This fixes Tracker bug
#2312.

- Revert and fix changes to ContainerWindow.cpp in r18481 (cvs 1.37). The condition was broken, but it wouldn't ScrollBy()
anyway due to the previous problem. Fixing BView made the content autoscroll even if the lefttop corner of the extent was
already visible.

- Probably unrelated, fix changes to ContainerWindow.cpp in r18993 (cvs 1.38). PoseView()->Bounds().left/top < 0 is expected,
if for example in icon mode you move an icon close or crossing the left side of the window and then scroll left to adjust.
This fix ResizeToFit that wouldn't scroll the view correctly in some cases.

So we had a Tracker Bug uncovering a BView fix that was hiding another Tracker bug, everything is fixed hopefully, phew :-)


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


# eaa6da1e 19-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


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


# 82adcce2 11-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- BView::MoveBy was letting BView::MoveTo do the rounding after adding
the delta.
For example, MoveBy(-0.5, 0.0) would do nothing in this case:
roundf(150.0 - 0.5) = 150.0, when rounding the delta it gives the
expected value: roundf(150.0 + roundf(-0.5)) = 149.

On the other hand, BView::ResizeBy was doing it right, and this
explains the bug in Cortex (#333). Cortex was doing
scrollBar->MoveBy(-0.5,0) then scrollBar->ResizeBy(0.5,0) and the
inconsistency lead to the visual bug. (see StatusView::MouseMoved())

This fixes #333. The bug was strange to reproduce since sometimes the
point received in MouseMoved would be "some_integer+0.5" values
sometimes just integral. This has still to be investigated though not
problematic here anymore. See cortex/RouteApp/StatusView.cpp line 222.


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


# 80f4a4f2 09-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

The given updateRect in screen coords (_Draw()/_DrawAfterChildren()) should
no longer extend outside the view after r25879.


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


# 258fd455 08-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Also do fast mouse wheel scrolling when Command or Control is pressed
(was Option only).


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


# fed7414a 07-Jun-2008 Rene Gollent <anevilyak@gmail.com>

A view shouldn't be able to RemoveChild a view that it isn't in fact the parent of.



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


# 08759213 18-May-2008 Rene Gollent <anevilyak@gmail.com>

Moved scroll implementation from ScrollBy into ScrollTo and made ScrollBy simply wrap a call to the former. This
guarantees that the virtual hook is called in all cases, and fixes bugs 1252 and 1838.



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


# a1a5f124 27-Apr-2008 Jérôme Duval <korli@users.berlios.de>

only set shear and rotation with valid values


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


# d092f4d8 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Appearently, PopState() should flush right a way if not in a transaction,
or else the server will keep working with the state and especially a clipping
region which should not be effective anymore. This fixes one problem I could
observe with my test app.


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


# a49de320 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Reordered methods a bit. SetOrigin() and so on is state related. PopState()
PushState() should be at the top of the state related methods.


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


# ee7cf06d 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

* Added link flushing where the change is supposed to happen as soon as
possible on the server side (for example Show() and Hide() need to be
immediate). But also SetViewColor() and a few others. This fixes the
bug encountered in Pairs.
* Removed NOTE in DrawAfterChildren(), since it was outdated.
* Corrected a typo in a comment.


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


# 5464b10f 18-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* get_uint32_color() now returns the color as host endian value.
* Introduced a new get_rgb_color(), that returns an rgb_color from a host endian
uint32.
* Those two together fix bug #2094.


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


# 28d5567e 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* GetPreferredSize() no longer crashes when given a NULL parameter (as the
other interface views already do).
* Minor cleanup.


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


# d7aa5bb8 06-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Oh boy. I think I fixed the issue by understanding it with the right side of
my brain, while the left side is still puzzled. So it's hard to put it into
words. Basically, there was an unwanted feedback loop when applications first
scrolled vertically and then horizontally (or vice versa). Because of the
feedback effects between BView and controlling BScrollBar, and because BView
controlls both scrollbars at once, it is important not to set the scrolling
offset of an unaffected ScrollBar, since we might actually be comming from the
SetValue() function of the other scrollbar. Fixes #1913 and possibly more,
going to check up on the other scrolling related bugs.


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


# c7a77521 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

Renamed all *LAYER* constants to *VIEW*.


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


# 8dd37e7a 07-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Make sure that a detached view is really no longer the focus view.
MakeFocus(false) can not be trusted, since it is virtual and might not call
the BView version.


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


# a2186f4a 07-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

print also the view name in case it mixes up flags and resizing mode.
Helps identifying it.


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


# d4000a76 19-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* fix the new layout version of the BView constructor to call the BHandler
constructor with the supplied name


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


# 5d196712 11-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Add a temporary backwards compatibility fix for applications that accidently
mix up the resizingMode and flags field in the BView constructor. This does
not cause problems under BeOS but was causing wrong follow modes when those
applications were run under Haiku. In case such an application is detetected
a corresponding warning is printed out. Also added a comment explaining the
rational behind the change and a ToDo for the later cleanup.

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


# d2580802 03-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Somehow r23154 reverted r22930...



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


# 8d2fdf2b 15-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Added Flush() to SetMouseEventMask(); this should definitely be sent immediately.


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


# acf8b5d1 31-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

* despite what the BeBook suggests, using CopyBits() on a non-attached BView
does not drop you into the debugger on R5. Should fix #1598.


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


# 259233e4 13-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* added NOTE on why having mouse coords in screen space until the very last
moment is so nice


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


# 72c9d31e 11-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* transmit correct type in BView::BeginRectTracking()
* put message codes for Begin/EndRectTracking() into giant switch... not
actually implemented though


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


# 3424ff46 10-Sep-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

renamed private members of BPicture to fit our coding guidelines


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


# 53fca955 25-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* I confirmed that on BeOS, BView::Invalidate(BRect) rounds the rect to integer
coords in this way. BRegion does a different rounding, also compatible
with BeOS. I added an explaination. This fixes one _part_ of #1426, which is
that Sudoku doesn't invalidate more area than intended (or at least it works
as it does on BeOS now). The second part of the bug though is that the server
has been preventing the drawing of lines and rects in a certain way, in another
words, the part of the bug I fixed should not have been a problem in the first
place if the clipping would have worked correctly. I believe the problem shows
when the drawing commands contain fractional offsets. The rounding happens in
the server, but maybe too late (after comparing with the clipping region). It
could also be a bug in our BRegion implementation, I need to check my new
implementation behaves exactly like BeOS in the Intersects() and Contains()
methods for fractional coordinates parameters. Anyways, at least the visual
problems are gone.


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


# f148f628 22-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* resizing scrolled views should have definitely been broken


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


# 48658ad1 13-Aug-2007 Jérôme Duval <korli@users.berlios.de>

fixed build


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


# 4d47fee5 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Renamed some BPicture private functions, small cleanups.


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


# 27757137 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

AppendToPicture() now sets the correct picture to be returned from
EndPicture() (tests have confirmed this). Although appending to a
picture doens't work yet for some reason...


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


# ed5de868 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of
nested pictures.


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


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

* removed code duplication in BView::check_lock() and do_owner_check(),
* revised use of check_lock() versus do_owner_check() (do_owner_check()
is supposed to drop you into the debugger if there is no owner, otherwise
it behaves like check_lock())
* ConstrainClippingRegion() no longer transmits empty regions to the
app_server. I would have thought that my fix to ServerLink would have
solved the issue I was investigating, but only this commit fixes it.
Maybe the last commit would have fixed it if I did a "jam clean"...
* WonderBrush draws the icons again on mouse over...


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


# 94a48ae2 04-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* use a different message code for DrawString() with escapement delta
and DrawString() without
* this change also includes adding the penlocation to the shape to-screem
coordinate conversion (temporarily breaks shape rendering, will be fixed
in next commit)


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


# 67f3be42 17-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* added ProfileMessageSupport.h/cpp to translate server message codes to
a string
* fixed profiling of message processsing in ServerWindow (didn't take batch
processing into account)
* accelerated ViewLayer::RebuildClipping() by a factor of two by avoiding
BRegion::Exclude(clipping_rect) for each child, and instead building
one region with all children, and excluding that. RebuildClipping() is
quite a common operation and is quite slow for views with many children


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


# da3addea 09-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed incorrect parameter validation in ResizeBy(). Resizing a view to a
negative size is perfectly fine.


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


# 96726e7e 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied Stefano's patch to fix bug #1241; BScrollBar::SetValue() did not work
correctly for out of bounds values.
* BView::ScrollBy() now limits itself to what eventually attached scroll bars allow;
this fixes the problem Stefano was observing after having applied his patch.
* Reenabled the limit check in BScrollBar::SetProportion(); after the above fix, I
could not see any misbehaviour of Tracker anymore; IOW Tracker did not rely on
this before, it was just hiding another bug :)
* Minor cleanup in ScrollBar.cpp


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


# 93c4bf98 27-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Reverted r21191. The one who calls BView::SetFont() is responsible for
also calling InvalidateLayout() and Invalidate(), if necessary.


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


# f856bb28 21-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Invalidate layout, when the font changes.


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


# 027f6a76 08-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

* export SetDiskMode() symbol, thanks to "aldeck" for providing the BeBook link,
fixes ticket #1140


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


# 815c3862 04-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Applied patch by Vasilis Kaoutsis:
* replaced new[] with malloc()/realloc() where appropriate - since we're messing with
the bits anyway, this makes the code slightly faster.
* however, we might want to throw some std::bad_alloc exceptions to deal correctly with
low memory situations.
* cleanup.


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


# 6c3692dc 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out our pulse mechanism was broken; we need to honour the rate set by
SetPulseRate() even if it is 0. BView::_Attach() and BView::SetFlags() now
just set the previous pulse rate again (which will start pulsing in case
there is no fPulseRunner yet).


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


# 83c6772d 03-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

extended a comment and added a new one

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


# ae9aed77 03-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

in case of error, set buttons to 0, for real

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


# 2f9eca85 30-Oct-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

moved Shape related defines to their own header


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


# 00529536 29-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed my previous commit - now dragging a bitmap is working again. Thanks Stefano!


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


# e0091c79 27-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Drag messages can now also be started with a NULL bitmap pointer and an invalid
drag rectangle - this fixes bug #596, as Cortex obviously relies on this.
* Added a comment on how dragging without a bitmap should be done (app_server should
directly support this without needing to drag real bitmaps).


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


# c7580d16 25-Sep-2006 Jérôme Duval <korli@users.berlios.de>

put back errors in scripting replies : it's part of the BeOS behavior
MethodReplicant is now working again.


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


# a89fb193 14-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* on R5, invalid BRects cannot be used with FillRect(), Haiku is
compatible now. This fixes the last remaining drawing bug in
SoundRecorder.


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


# fa407130 24-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Now this should nail down bug #762 pretty well: BView::GetMouse() no calls the
private BWindow::_StealMouseMessage() which makes sure only messages for the
preferred handler are stolen, and also, that nothing gets lost that shouldn't
get lost.
Also updates the fLastMouseMoved view in case the message is actually removed
due to GetMouse().


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


# 78aa8eea 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Added get_uint32_color() again, the previous "hack" doesn't compile
on GCC 4.
* Fixed buggy scripting error responses: "error" is only included on
error, and B_ERROR (-1) can hardly be a candidate for the
BMessage::what field (uint32).


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


# 11235ae7 10-Jul-2006 Jérôme Duval <korli@users.berlios.de>

"class" is added by BArchivable::Archive(), no need to duplicate


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


# 955bc004 04-Jul-2006 Jérôme Duval <korli@users.berlios.de>

little cleanup


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


# b8fc177d 03-Jul-2006 Jérôme Duval <korli@users.berlios.de>

* default source BRect is now offset to B_ORIGIN because Bitmap bounds lefttop could be something else than (0,0). This caused some bugs in Haiku SoundRecorder app
i* thus the NOTE in Painter isn't valid anymore
* in Painter::_DrawBimap() moved scale computation after potential changes to BRects
* fix typo : right => bottom. This caused a bug in Haiku Mouse preferences app


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


# da08acb8 12-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fix some more bugs in scripting handling, this seems to never end
Having canna input method installed shouldn't crash Haiku anymore


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


# 16b4861f 12-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

No reason to return B_ERROR when the method doesn't have to do anything.


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


# f4fc3d62 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

* fixed some more GetSupportedSuites implementations
* fixed some local variables names
* fixed the case of some message attribute names


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


# a03ac895 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fixed some property_info and value_info for BShelf, BMenu, BWindow and BView
real support is to be implemented for a lot of them


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


# 79adc02b 04-Jun-2006 Jérôme Duval <korli@users.berlios.de>

begin to fix bug #658:
makes use of BWindow::_SetFocus() in BView::MakeFocus()
BWindow::_KeyboardNavigation() now uses BView::MakeFocus()
This is though not enough: _SetFocus isn't called on window activation/deactivation, thus the input server isn't aware of a focus view change in this case.


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


# e229fcb2 27-May-2006 Stephan Aßmus <superstippi@gmx.de>

nailed a view bugs concerning archiving BViews, the flags where restored 0 in most cases, which means B_WILL_DRAW was not set, I'm going to clean this up some more, ViewState::archiving_flags is bogus...

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


# 4cf88b82 22-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

set alpha value of default low/view color to 255


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


# df230cb5 22-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

replaced get_uint32_color() by casting into a reference (const uint32 &)


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


# bc685a64 22-May-2006 Stephan Aßmus <superstippi@gmx.de>

set_rgb_color() seemed useless

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


# b0bc48fb 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


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


# 5add574b 19-May-2006 Stephan Aßmus <superstippi@gmx.de>

* invalidate in _Attach and _Detach - I still hope to
find a better solution, at least it fixes the problem
that when views are added to already showing windows,
and those views set their view color in
AttachedToWindow(), the app_server will have already
cleared the background with the previous view color
(for example white check boxes problem in Tracker
Settings window)


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


# 07cc0513 08-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the BView::DrawPictureAsync() version which accepts a filename, not tested

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


# 3279f3b0 03-May-2006 Michael Lotz <mmlr@mlotz.ch>

Detect recursions of UpdateIfNeeded. This is necessary as we may call hook functions (FrameResized(), FrameMoved()) that in turn could call UpdateIfNeeded again. This is the case for DarkSite which uses GetMouse() inside FrameResized(). This fixes resizing DarkSite and probably fixes bug 539 too.

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


# 9d8ea7e4 29-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

modestly added myself to the authors of View.cpp

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


# 621a8324 23-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed ViewAux.h header to ViewPrivate.h.
* Some cleanup.


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


# 4fdedfbd 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

fixed some Archive() following stippi's path


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


# 0c4d8bc5 21-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* added TODO in DragMessage about using an area for the message
* removed TODO in DragMessage about reference counting, since
it already happens
* use _FlushIfNotInTransaction when moving/resizing a view
programmatically, so that it usually happens instantly.


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


# 34ff238b 12-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

Implemented the BRect version of DragMessage(). This just creates a drag bitmap with the rect. We may want to switch to a less heavy implementation later on though.

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


# 39cdae74 10-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

First steps at getting drag & drop to work properly. Simple drag & drop (draging Tracker items) should work now. Not sure about the negotiated version (with mimetype exchange). Fixed left behind drag bitmaps. Some cleanup.

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


# 7bb48db1 04-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The BView::FrameResized()/FrameMoved() hooks are now called asynchronously
as in R5, and no longer directly. This fixes bug #301.
* As a side effect, the hooks are now only called when the view is attached
to a window, as on R5.
* Removed dead B_VIEW_RESIZED/MOVED code from BWindow.


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


# 903936bc 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Added the scrolling offset when a view is created.
This lightens the problem in bug #98 a bit, but doesn't completely fix it; you
still don't see any items in that list on the switch, but they now appear again
when you scroll around there.


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


# 600fbd78 01-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
have retrieved a cursor until they have called Acquire() on the
cursor. (Axel: what good is using atomic* stuff in Acquire() and
Release() if we have to protect this by a lock anyways?)


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


# 9a44fdc9 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
them all several times in BBitmap, we now have one or more areas per team,
and BBitmap will only clone areas once if needed. As a side effect, this
method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
maintenance structures into those everyone-read-write areas, they are now
separated, so that faulty applications cannot crash the app_server this
way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
(ie. via ServerApp), per area (for overlays, not yet implemented), and using
malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


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


# 420379ae 15-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

I should have finally fixed those app_server crashes
in HWInterface::_DrawCursor(). Axel, even though we
understood the problem, we didn't really fix it back
then: When the sync flag was set to true in
BView::SetViewCursor(), the link was only flushed,
which means that the function still returned before the
ServerWindow thread processed the message. This means
that the race condition (the cursor being immediately
deleted after SetViewCursor returns, which might be
processed in ServerApp thread before the SetViewCursor
request in ServerWindow thread) still existed. I changed
SetViewCursor now to do a real sync (wait for the
ServerWindow reply) before returning. The alternative
would be to set the fPendingViewCursor flag in either case.
Anyhow, I could reproduce the error quite reliably before
this change, and now it is gone... here is to hoping!



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


# 562f3db6 15-Mar-2006 Jérôme Duval <korli@users.berlios.de>

unused header


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


# ecf9f948 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



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


# bdbd1cb4 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing the USING_MESSAGE4 define.

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


# e0e1c528 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a possible endless recursion (just do a ResizeBy(0.4, 0.4) or something like this
in your FrameResized() method - exposed by the TextView auto resizing feature).


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


# 8e89843e 08-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
the user defined clipping of the view state instead of being sometimes
used to cache the current view clipping


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


# f19839c2 01-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


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


# 588259b6 26-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to handling custom cursors:
* all cursors owned by a team are visually different,
or (iaw) an already existing cursor is reused when
it is set by the client again
* changed various occurances of cursor data from "int8*"
to "uint8*"
* ServerCursors also remember the R5 data from which
they were created
* the reference counting and destruction of
ServerCursors changed: The cursor knows it is attached
to a CursorManager and one can simply use
ServerCursor::Acquire() and Release() and the reference
counting and everything is being taken care of
* destroying a ViewLayer will now correctly release a set
ServerCursor
* fixed a race condition when setting a cursor through
BView::SetViewCursor(): If the client code looks like this:

BCursor cursor(cursorData);
someView->SetViewCursor(&cursor, false);

there is a relatively high chance the BCursor destructor
told the ServerApp thread to destroy the cursor before
the ServerWindow thread got to "acquire" the cursor for
use by the view layer. The very same problem is likely the
reason that SetViewCursor works to unreliably on R5, even
when the "sync" flag is set to "true" (although it should
theoretically work in that case).

all these fixes make WonderBrush work fine again with the
new support of custom cursors.... coded by axeld and myself
(the joys of pair programming :-)



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


# 0cd3fd40 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Speaking about bugs... removing views is now actually working again.


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


# 62b5f42b 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed view deletion: _CreateSelf() and RemoveSelf() are now symmetrical, removing
all those error output from the app_server.
* AS_LAYER_DELETE now gets a token, no longer frightening choice of parent.
* Removed locking in RemoveChild(); it has to be called locked now.
* Removed AS_LAYER_DELETE_ROOT as it's no longer needed.
* Removed support from BView for being PR3 compatible.


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


# 48e3cfa3 15-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

DrawString() no longer crashes when called with a NULL string.
This fixes bug #136.


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


# 4167cbe8 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

speed up from/to screen conversion of BRects

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


# 585c5a00 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

call debugger when encountering nested BeginLineArray calls like in R5

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


# aa1f5437 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


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


# 7afc7c50 08-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
client request, just for safety reasons
* the link is flushed if there is no drawing engine,
but this case is theoretical only
* deleting the ServerWindow object syncs with the
client, so that when BBitmaps are deleted, they
can be sure there are no pending messages (which
would be executed in a nother thread)
* there is no timeout anymore when sending messages
to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
what it really is
* fLastFamilyAndStyle defaulted to the system plain
font and therefor that font was never loaded when
the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
potential of a division by zero, at least I
had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
double buffered mode

ViewLayer:
* since the top layer is never really deleted
before its time has come, it is not necessary
to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
in _SendMessage()
* drop mouse moved events in the server if we're
lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
of the BWindow looper in RemoveSelf(), since
this is called from the window destructor,
also of BWindows from BBitmaps, which have
never been run (this might need review), at
least I seem to have solved the crashing
problems introduced by actually deleting the
view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
temporarily disabled DrawAfterChildren, which
didn't work yet anyways (because views cannot
draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
there is only one ever in the queue
* set the fInTransaction flag during an update,
I plan to use this in BView later to
flush the link when drawing outside of an
update
* BView::_Draw() is now called by view token,
this gives the next leap forward in speed,
the overhead because of drawing clean views
was considerable



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


# fb82d189 06-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* BWindow deletes its view hirachry
* BViews set fOwner to NULL recursively when detached
* updated a comment


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


# 8f3f25cf 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Merged the four AS_LAYER_DRAW_BITMAP handlers into just one handler

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


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

It's okay that SetMouseEventMask() doesn't do anything when called outside
BView::MouseDown() - or when it's not attached to a view - but it shouldn't
drop into the debugger in either case.
This fixes the desklink volume slider.


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


# 5b0c0d60 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

we don't need this hack anymore

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


# a1a73d28 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Force a Sync() in DrawPicture() instead of expecting a reply. Looks more correct

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


# 8e64a824 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a sort of hack which allows BPictureButton not to hang the app. Strangely, dereferencing a NULL pointer hangs the app instead of crashing it

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


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

Speedup scrolling with the scroll wheel: this seems to vary from app to app,
BeMail uses 2, Terminal (under Dano) 4, and Tracker as well as pe 3 - so 3 seems
to be a good compromise.


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


# 456d0d08 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

We now have mouse wheel support for all views that have scroll bars. Should
probably increase the values we got from BScrollBar::GetSteps(), though, as
it's a bit slow.


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


# 38030e04 30-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

removed a clouple TODO comments where issues cleared up meanwhile

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


# 6fce24d7 30-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

no need to const_cast in there...

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


# b34197fb 30-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed the possible race condition reported by stippi, by getting the bounds and parent offsets of the view on detach

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


# 1ae8b8cd 29-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

-When a view was detached, its parent offset was resetted to B_ORIGIN. This caused BTabViews not to work correctly. - The view state was retrieved twice when a view was detached.

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


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

Got rid of the remaining SERVER_TRUE constants.


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


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

Renamed AS_LAYER_GET_{DRAW|BLEND}_MODE to *_{DRAWING|BLENDING}_MODE.


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


# 9d909e25 25-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

first simplistic implementation of drag bitmaps, drawing modes need more work, drawing text into offscreen bitmaps seems to be broken for some weird reason, B_OP_COPY actually copies the alpha value of the color as well

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


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

* Renamed AS_LAYER_INVAL_{REGION|RECT} to *_INVALIDATE_*.
* Removed unused AS_LAYER_INVALIDATE.


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


# 0f1d5a1a 09-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

finally nailed that bug which prevented Tracker from showing the attribute column titles, I spent way too much time debugging this...

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


# fcb6cbaa 08-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

when attached to a BWindow, make sure that the window sets up pulse messaging, if the view has B_PULSE_NEEDED, fixes Tracker showing 0 items in CountView

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


# 1cf70f2e 08-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

use With() and Height() instead of right an bottom for the new frame size, fBounds contains the scrolling offset...

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


# af43bb3c 07-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

a first and really naive implementation of drag&drop support, no visuals yet... Axel, no worries I'm going to clean this up and remove stuff from EventDispatcher again...

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


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

Fixed comment, thanks Jerome.


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


# 9584d7e4 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

hefty overall drawing speed optimizazion, the Draw() hook was called for every view down the hirarchy when one single child had to redraw, added some TODOs in _Draw about some stuff we need to think about

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


# 17adbf1f 30-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc style changes

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


# 4bd3c01e 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

_AddChildToList() was very inefficient in case there was a "before" view
specified. Also, it now drops into the debugger in case "before" doesn't
belong to us already.


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


# 6450b76d 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
EventDispatcher handles them now. As a result, a window will now
get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
when it's set - this is now used for the window moving instead of
the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
BWindow::_SanitizeMessage(() (similar to what the input_server does).
This should also make the mechanism pretty robust, since every
B_MOUSE_MOVED message can now trigger the view transit (in case a
message is lost). B_WINDOW_ACTIVATED messages should be generated
client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
field; "where" (in window's coordinates) and "be:view_where" are
added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
dropped instead of being sent to the looper - this should be done
in BLooper as well, though.


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


# 8bd2c11f 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


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


# 5fa64315 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* no longer needs to define roundf() as it's now part of libroot.so (like on BeOS).
* for the libbe_test target, though, I need to declare it, although it's also declared
in BeOS' math.h - Ingo??
* removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes
to behave differently depending on that flag (mouse tracking).


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


# cf10934e 13-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

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


# d28b9f65 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

* disable caching of the clipping region,
there can be no notification when it changes in the server.
Note that GetClippingRegion() gets the actually effective clipping,
not only the user defined clipping.
* when removing ourself, set the last mouse moved view of the parent
window to NULL in case it was pointing to this view
* round the frame rectangle passed to the constructor, I have not
actually compared this with R5 behaviour though.


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


# fabffa38 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

fixes for Stroke and FillPolygon

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


# 72b26b59 06-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

* line join defaults to B_MITER_JOIN. The BeBook says that the line join and
cap mode affect all Stroke* functions. If B_BEVEL_JOIN was indeed the
default, then StrokeRect() with a pen size of > 1 would have beveled corners.
* fixed sending op code and point data in Stroke/FillShape()


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


# fd8b9c0d 30-Oct-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc style changes

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


# 88820e72 28-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

the new clipping code uses the same mechanism for updating frame/bounds, so we don't need some things anymore.

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


# a5cd1aee 20-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

small checkin to make the new clipping code work if one desires

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


# f2fd1298 30-Aug-2005 Jérôme Duval <korli@users.berlios.de>

now uses delta escapement
improved GetBoundingBoxesAsString (just for fun, keep in mind we'll use AGGTextRenderer in the end :) )


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


# ef5ab08d 21-Aug-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed keyboard navigation; it should now behave pretty much like R5 AFAICT:
- moved standard keyboard navigation into the BView::KeyDown() hook
- the window now only handles tab+option/command key
- B_COMMAND_KEY triggers group jumping, not B_CONTROL_KEY (that activates the switcher,
but directly in the app_server)
- fixed broken group navigation: (modifiers & B_COMMAND_KEY & B_SHIFT_KEY) is different
to (modifiers & (B_COMMAND_KEY | B_SHIFT_KEY)) and is just never true with these
constants.
That allows the tab key completion to be used again in Terminal.


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


# 2e6a5805 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing

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


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

Fixed DrawBitmapAsync() rectangle variants.


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


# 7d71b635 02-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BScrollBar::SetValue() was called with the wrong values in BView::ScrollBy

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


# 68340522 02-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The BRect version of ConvertTo/FromScreen were broken in case the view didn't have a parent, but was the child of a BWindow. This fixes a bug in menus (and probably other stuff too)

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


# 793b31c5 30-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BView::SetFontSize() - only the internal font state was changed,
no one told the app_server about it (ie. StringWidth() would work
correctly, but the app_server would ignore the font size).


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


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

Fixed BView::LeftTop() - it certainly shouldn't return 0;0 only :-)


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


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

Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
and then again correctly by initCachedState()) - now the ViewState
constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
anyway...)
- cleanup


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


# 5d914f56 15-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Now uses BLooper::check_lock() instead of BLooper::AssertLocked(), because it
doesn't have to check if the looper is valid (we wouldn't be its child if it
weren't).
ResizeTo() and MoveTo() are not supposed to call FrameResized() and FrameMoved()
manually when the view is not yet attached to the window.
BView::CountChildren() and BView::ChildAt() now check if the looper is locked.
Some cleanup.


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


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

Fixed a bad bug in the app_server:
fCurrentLayer was used to determine to which layer a new one would be
added to, but BView::AddChild() would only set this correctly for the
current view, ie. all children of the new child were added to the
wrong layer in the app_server.
Now, AS_LAYER_CREATE sends the parent's token to the server, and the
server relies on this to build the layer hierarchy.
All of a sudden a lot of hidden views are visible now. I noticed the
bug while refactoring the task manager, but a lot of apps were affected.


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


# 7faaf6ba 14-Jun-2005 Adi Oanca <adioanca@nowhere.fake>

fixed the viewColor bug

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


# c24e9a88 10-Jun-2005 Adi Oanca <adioanca@nowhere.fake>

BView's color is not part of a graphic state

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


# 75936a02 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


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


# 743a1473 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

better ResizeToPreferred implementation

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


# 45ca1c94 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Simplified code for BView::ClipToPicture() a lot (both server side and client side). Regions passed with that method should take the place of regions passed with BView::ConstrainClippingRegion(). Note that the needed server support hasn't yet been implemented.

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


# 38b35d9c 29-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BBitmap now uses the correct (private) BWindow constructor. Partially implemented that constructor. Fixed another typo in BView, verified and removed some TODOs

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


# 7d8462ae 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed bad typo

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


# 58b78e47 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Convert mouse coordinates from screen to view, thus fixing GetMouse(). Menus at least open now, and textview works in synchronous mode

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


# 24a075f4 23-May-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented SetMouseEventMask()

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


# 097d6418 20-May-2005 Axel Dörfler <axeld@pinc-software.de>

Didn't know that BView::do_owner_check() also checks the lock - maybe
it should be renamed to do_owner_and_lock_check().
Removed looper locking again, since it's not needed, then. Thanks to
Adi for the hint.


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


# 52005fda 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Finally fixed Adi's repeatedly mentioned pet peeve: in AS_LAYER_GET_MOUSE_COORDS
communication, the port's reply port is no longer sent to the app_server (as it
knows where to reply to, anyway).
Also made sure the view's looper is locked while getting the coords - I guess
BPortLink doesn't like to be written to from two different threads :-)


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


# 25500bdf 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BWindow::UpdateIfNeeded() by moving the code from BView::GetMouse() over.
GetMouse() will now just call UpdateIfNeeded().


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


# d6fad1d0 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Changes due to Adi's insight:
- there can only be one _UPDATE_ message at a time in the queue so we
can stop searching after we hit the first one
- mouse coordinates are always send in screen coordinates (unlike R5,
which means this is a compatibility problem), so we need to convert
them even for the current view.
Apps should now work with the old synchronous controls method (even
though their drawing updates look clumsy and are slow compared to
asynchronous controls for whatever reason).


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


# 3405fff2 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented private function BWindow::DequeueAll() which reads all pending
messages from the port.
BView::GetMouse() now calls this function if it was called from the window's
thread and thus blocking the message loop.


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


# 25b0ec46 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Now, GetMouse() processes and removes all _UPDATE_ messages, not
just those before the first mouse message.
This should be more correct and look better.


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


# c66f958b 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Corrected BView::GetMouse(), untested though:
- it returned on _UPDATE_ messages without a mouse position
- it no longer calls DispatchMessage() for everything anymore,
however, it will still call BWindow::DispatchMessage() directly
for _UPDATE_ messages
- it didn't care for B_MOUSE_DOWN messages
- it didn't unlock the queue in case it found a message.
(this message actually reflects the differences to r12683 of this
file, but the newer one r12705 was even more broken, but in other
ways)


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


# d73474ee 18-May-2005 DarkWyrm <darkwyrm@gmail.com>

Removed an infinite recursion bug in StrokePolygon


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


# 898289a3 18-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved a bit BView::GetMouse(). Added more ToDOs

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


# d557af5b 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Fixes to my fixes of BView::MakeFocus(), the previous focus BView needs to be unfocused of course so the derived classes implementation gets called. Simplified BWindow::setFocus(). BView calls FrameResized() and FrameMoved() if it has no parent, I don't know how R5 handles it, but I added a TODO...

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


# ffe7181e 11-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a TODO item in GetMouse(). I hope to fix the problems
this weekend, if no one does it before.

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


# 587d699c 10-May-2005 Stephan Aßmus <superstippi@gmx.de>

It seemed to me that the MakeFocus() implementation was overly complicated and even incorrect (cyclic) if the view in question already had focus.

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


# d6b3de8c 02-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a todo comment

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


# 9715a3e1 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed BWindow::MoveXX(), BWindow::ResizeXX() and BView::ConvertToScreen()

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


# 35055741 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

Added some TODO comments in Window.cpp, improved coordinate conversion in View.cpp. I'm not sure if this really works correctly, I need to write more tests. The scrolling test actually does more of what it is supposed to. At least the scrolling properly follows the mouse now. Missing are the movement of child views, the rebuilding of clipping, and I think that the scrolling needs to be synced to update requests having been fullfilled, or else some parts of the View will be CopyBits()ed which have not been drawn after having been scrolled into view by previous calls to ScrollBy(). Any insights appreciated.

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


# 28930a12 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

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


# 642d7ca9 21-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented BView::SetEventMask()

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


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

'Attach' hooks are now called after the complete tree of children of the BView to be added is completely known by app_server


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


# 61d65d37 05-Feb-2005 DarkWyrm <darkwyrm@gmail.com>

GetMouse works properly


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


# 4b5bc014 19-Jan-2005 DarkWyrm <darkwyrm@gmail.com>

Send message to create top view immediately to prevent problems with graphics display


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


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

Big cleanup, many parts now fulfill our style guide.
Made instantiation from BMessage more robust.
Fixed some crashing bugs (in ResolveSpecifier() (don't delete a string
that you don't own, in the BView iteration code in deleteView(), ...).


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


# ce3a18db 16-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Added the forgotten length parameter to DrawString


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


# 11620a7e 15-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Fixed the message code for making LineArray calls in the server


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


# c33ef86b 17-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Made some tweaks for region, shape, and polygon support


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


# bb32d497 14-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Checking in some fixes to StrokePolygon protocol before I forget they're there


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


# 0ea7755d 14-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Rearranged attachment protocols for Stroke/Fill Arc and Ellipse


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


# 208b62ed 02-Aug-2004 haydentech <haydentech@nowhere.fake>

gcc3 fix


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


# 3ceb31b9 30-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Pahtz's changes from PortLink/BSession/PortMessage/PortQueue to BPortLink


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


# 1889be2a 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

hidden state was wrongly reported


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


# 2d4c0203 03-Apr-2004 Adi Oanca <adioanca@nowhere.fake>

little fixes/updates for the coordinate conversion system


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


# b19660cb 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

minor fixes to make my version match with the one in CVS


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


# ef94fcd8 11-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

A couple bugfixes, some comment tweaks, and PortLink conversion for a couple functions


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


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

Replaced _view_attr_ struct with a comparable ViewAttr class - removes a crash


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


# b22232f5 19-Nov-2003 Axel Dörfler <axeld@pinc-software.de>

Implemented the missing BView::IsHidden(BView *lookingFrom), fixed
BView::IsHidden().
Commented a ToDo: item in BView::Hide().


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


# 84e57fc9 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Fix line array bugs, missing breaks, gcc3 incompatibilities, and a few typos


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


# 6e627905 24-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

some changes in ConvertXXXYYYY(...) methods.


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


# 2f8db4e4 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* Modified a few lines from BSession::WriteInt32( uint32 ) into WriteUInt32( uint32 )
* in updateCachedState(), now all font attributes are received at once; I realized app_server doesn't need the flag based system. :-)
* added a new method: PrintToStream() - used for debugging.
* now the view state is allocated and initialized in BView::InitData(...)
* modified a few things in addToList(...) 'cause I don't know what was in my head when I wrote it?!
* added _ReservedView2-18() methods because of linker errors.
* a new method used for debugging: PrintTree()
* added debugging messages for a few methods
* TESTED view hierarchy methods like AddChild() and RemoveChild() RemoveSelf() - They WORK! :-)))
* minor but significant :-) ( = instead of == ) change in findView(...)
*** Tree structure is in place now, mirrored on app_server ... and working :-)


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


# eaedbddb 08-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

added code for appserver sync/communication...


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


# e8cf0873 04-Sep-2003 haydentech <haydentech@nowhere.fake>

gcc3 compile fixes: default arguments in implementation no longer allowed


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


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

added scripting support - stil needs some work, and others...


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


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

WELL... here you go: from 5% to more than 95% !!!!!! :-)


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


# 72f334d1 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes; strip ^M characters from TextView.cpp


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


# 40ceba30 03-Jun-2003 haydentech <haydentech@nowhere.fake>

Janitorial work and gcc3-related fixes


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


# ad41204b 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Filled in a few functions


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


# a159d2c7 08-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added a BView stub


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


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

BView: Move tooltip release and fix small coding style issues.

This is only an optical change.


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

BView: Fix destruction order of layout items.

Because of the virtual hooks a BLayout must never be destroyed while it
still has layout items. If these items are only removed from the layout
in its destructor, the subclass version of hooks like ItemRemoved() are
not called anymore. This lead to leaks because many BLayout subclasses
use the ItemRemoved() hook to clean up associated data (as is suggested
explicitly in the BLayout documentation).

In the same line of thought, a BLayoutItem must never be deleted when it
is still attached to a layout, as it similarly has virtual hooks like
DetachedFromLayout() that can not be called at this point anymore.

The destructors of BLayout and BLayoutItem now have debugger calls in
case these conditions are not met which should help to avoid
accidentally introducing such hard to debug issues.

To ensure the correct destruction order the sequence is now:

* Destroy the child views first. This cleans up their layout items while
the layout tree is still intact.
* Unset the view layout before removing layout items so it can properly
detach from the layout instead of just deleting it.


# 19bb9ef937204c12bbaa9f4e8a2b25237a109779 14-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BView: Remove old TODO comment.

The BShelf is not owned by the BView (nor the BWindow for that matter)
and so must not be deleted on destruction.


# 3fc2dd56db2eb2df497022b7834dc9ba786e5679 04-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

BView: Fix 64 bit build with debug output, whitespace cleanup.


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


# 31f5b8b5d2a830c62de3bcb344066f6914abf5b8 25-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

BView::BeginLineArray: leave object in consistent state

We allow this method to throw bad_alloc exceptions as there is no other
way to report errors. However we left the object in a broken state
(maxCount set, but array not initialized) which would crash when calling
either AddLine or EndLineArray.

Initialize the count to 0 before throwing the exception so now
EndLineArray can be called and operations resumed safely after an
allocation failure.


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


# 244796701b8c8768712cdaf6d1fb0690f2c05d08 17-Mar-2014 Stephan Aßmus <superstippi@gmx.de>

app_server: store and restore fill rule...

...when sending the whole view state over the link.
Also inherit the fill rule when pushing states (DrawState
copy constructor). A somewhat sloppy oversight, I must add.


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


# 5d98ee1e4de58d0228a387ba1962e0bf9bd0f749 08-Mar-2014 John Scipione <jscipione@gmail.com>

Revert "BScrollView: Increase small scroll step size from 1 to 3"

This reverts commit bdcfc076173236ddecccfebd945530a309debdce.


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

BView: scroll horizontally when holding control

... instead of vertically. This actually swaps horizontal and vertical
so if you have a mouse with a fancy 2-axis scroll ball it will swap
the x and y coordinates. (untested)


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

BView: ScrollWithMouseWheelDelta return status code


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

BView: Check scroll delta isn't 0


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

BScrollView: Increase small scroll step size from 1 to 3

... and then don't multiply by 3 in BView


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

BView: style fixes related to mouse scrolling


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


# b58b8cdd30d96fc720e767e3158f286066613cc2 01-Feb-2014 Stephan Aßmus <superstippi@gmx.de>

BView: Fix ClipTo[Inverse]Picture() syncing.

When BPictures are created on the stack and go out of scope, they send a
AS_DELETE_PICTURE command to the ServerApp thread, and that command may be
processed sooner than the AS_VIEW_CLIP_TO_PICTURE command in the ServerWindow
thread, causing that command to no longer find a ServerPicture for the given
token. Apparently, the Be API leaves you the choice not to sync, in case for
example when you cache your BPictures and they remain valid. The default
value for "sync" is true. The BeBook could explain the situation better when
sync is needed and when not.


# d0fa6c78f4efad4c2a2fd7a1dfd53624ed3a6471 28-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BView: Allow resetting ClipToPicture

Just like for regions, ClipToPicture(NULL) removes any picture clipping
at the current state level (clipping in pushed states are not undone).


# e0d1cc186aa95cecd9439ebc2373f68a68ff2d02 22-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

BView: move ClipToPicture code to app_server

Now that DrawingContext makes it possible to draw on a ServerBitmap
without the need for a BView, we can replay pictures on app_server side,
avoiding the cost of creating a BBitmap, offscreen BWindow, and BView
from the application side.

The offscreen drawing context gets the same state as the view it's
rendering the picture for, so font size, drawing mode, etc are used.

The implementation is still the suboptimal one, converting the BBitmap
to a BRegion, and using that for clipping. Changing that comes next.


# 5c3fd4605e0ab84490620c980a746c5ba26a9400 12-Jan-2014 Stephan Aßmus <superstippi@gmx.de>

BView: Don't allow a view to add itself as a child.


# cf9414ff69f8823303ad5ac019f8336a73b94a93 16-Dec-2013 John Scipione <jscipione@gmail.com>

Convert coords of B_MOUSE_IDLE in _SanitizeMessage()

When BWindow receives a message in screen coordinates and the
message has a target view, as it does when the message comes from
App Server, convert the coordinates to view coordinates before
passing the message along.

Revert the portion of hrev46532 where BView converts screen
coordinates and converts them since that happens in
BWindow::_SanatizeMessage() now.


# dd0bdb49dc5d2fdb37f29dd687cd2a406fd34ab7 13-Dec-2013 John Scipione <jscipione@gmail.com>

Fix a bug retreiving tooltips

Noticed this in Time prefs was displaying wrong time zone tool tip,
dug deeper...

hrev46290 introduced this bug because it passes fLastCursorPosition
into the “be:view_where” parameter of the B_MOUSE_IDLE message.
The problem is that fLastCursorPosition is in the screen’s coordinate
system, not the view’s and BView expects “be:view_where” to be in the
view’s coordinate system.

So, to fix this I pass fLastCursorPosition in the “screen_where” parameter
instead which I’ve instructed BView to interpret as the point in the screen’s
coordinate system which is then dutifully converted back the the view’s
coordinate system.

I tried to follow the naming scheme of other code, not sure if screen_where
should be namespaced with the be: predicate or not.


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


# 27929dcd1d9938a499a9267c46498031dcc6894a 28-Jun-2013 John Scipione <jscipione@gmail.com>

BView docs: Add remaining new method descriptions

Layout and Tool Tip method documentation.

Also ScrollWithMouseWheelDelta()


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


# 410d1973c1bd568785c97b437a3857b122054fd7 03-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Adjust modifier for fast scrolling to match other OSes.

* instead of any of (OPTION, COMMAND, CONTROL), use SHIFT to
trigger accelerated scrolling via the mouse wheel


# 9be774b553296a712704078314f2291ae5fc352c 30-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation and 64-bit fixes to libbe.so sources.

Fixed the usual issues - printf format strings, uint32 instead of
addr_t, etc. One thing that isn't so nice is several places where
BList is used to store (u)int32, these require a double cast to addr_t
then void* to silence a warning on x86_64.


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


# c645f9bcbeab32cfb3c631a1340d38ebf5fd2d6f 04-May-2012 John Scipione <jscipione@gmail.com>

Rework tooltip method in BView again.

Passing NULL or a blank string to SetToolTip(const char*) sets the
tooltip to NULL by calling SetToolTip(BToolTip*) with a NULL argument.

Calling SetToolTip(BToolTip*) with a NULL argument calls HideToolTip()
because sometimes the tool tip can change without the mouse moving,
for example because the user clicked.

Thanks Axeld and Stippi.


# 5ccf455f7ee43be8060cd4b45c563e0a30ffaf50 03-May-2012 John Scipione <jscipione@gmail.com>

Fix another tooltip related bug that appears in Deskbar.

The bug is that in horizontal mode the tooltip will remain set to
the last moused over team menu item even if the mouse is no longer
over a menu item. The bug can be seen in the following screenshot:

http://26.media.tumblr.com/tumblr_m3gze8s1xi1r0f0hfo1_400.png

To fix this bug, allow you to set the tooltip text to blank or NULL
in SetToolTip(const char* text). In ShowToolTip() check to see if
the tooltip text is blank or NULL and if so, don't show the tip.
Setting the tooltip to blank or NULL effectively unsets the tooltip
on a 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.


# 254640bfcd86a184c9ca8dd593b6a8ecc11a4ea0 17-Apr-2012 Axel Dörfler <axeld@pinc-software.de>

Remove the tool tip if an empty or NULL string is set.


# 7e2730f0485e36b0111eff0c5cca5da71dcd8eb7 19-Feb-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

View.cpp: Use B_IF_GCC_2 to simplify things


# 48d21c129923ba5519770085ff4d6e9e26f16ef0 19-Feb-2012 Jérôme Duval <jerome.duval@gmail.com>

added BView::_ReservedView12() symbol for GCC4

* added _ZN5BView15_ReservedView12Ev
* helps with #8336


# 40c34878fa5d17fe8e9852319374ed8a873cf08c 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Reconnect BPicture to the app_server.
* maintain a list of all BPictures to do so
* BView downloads the BPicture data after recording the picture. This could probably done more efficiently using shared memory in the first place.


# ea0a06e213b2d4ac041c91c4a85d790f33595c2e 06-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Remove redundant checks for fParent before calling _InvalidateParentLayout().


# f98f5ca48b29cf94d796b90b4367979545ac9a31 01-Dec-2011 Alex Wilson <yourpalal2@gmail.com>

Fix bug in BView::RemoveSelf() that lead to a segfault.

Once again, the BObjectList removal behaviour leads to a null dereference. It's my fault of course, but there you have it. Comments have been included for future devs.


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

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

Fixes #7683.


# e7b0dc78f7695340de8d5fd6ab4d0798809e0f0b 22-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

Now that child classes aren't overriding the various InvalidateLayout() methods, we can take advantage of some guarantees to simplify/clean/optimize the layout invalidation propagation mechanisms!


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

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


# fa01d084960d9ee5acf5786c5f15c6e956026be8 08-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

User BView's layout item tracking functionality to simplify and optimize some methods in BLayout and BView.
Delete BLayout::RemoveViewRecursive() as it is no longer needed.
Add a few TODO's.


# bd97b9adba41005ca6dafaf0c32f63422ec351b6 07-Sep-2011 Alex Wilson <yourpalal2@gmail.com>

Add a BObjectList<BLayoutItem> to BView::fLayoutData that keeps track of any BLayoutItems that refer to this view that are part of a layout. BLayoutItem does the registering/deregistering of the items, and BView::Private proxies fLayoutData for us. Currently, this is not used anywhere, but there are many places where it will be used soon.


# 884384ff79a70d3dd8e409dc4251fcf682e58822 25-Nov-2010 DarkWyrm <darkwyrm@gmail.com>

Sending B_COUNT_PROPERTIES for the View property now returns the right value.


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


# d0844c50fbbfacaa3f38871c1d704a6a6c0bc5ee 20-Sep-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Fix typo.



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


# 8f88fe1d98ea0e1118ad247593a6812fd9b4b4fc 18-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

* fix CID-258: BView::SetViewOverlay() shouldn't crash if given a NULL bitmap.
Coverity was complaining because we did a half-ass check against NULL only to
pass that NULL pointer on to a function that deref'd it.

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


# 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


# aa818be69a46065327a75ec383e7b6b3ae2df17f 12-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

Update BView to call debugger when passed a NULL archive for its archive constructor. This means there is no need to check for a NULL archive in BSeparatorView. Also update BUnarchiver and friends to be NULL safe. Pointed out by Adrien, fixes CID 1754.


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


# 3c38ebff78ab76928354848a164944e40085103e 01-Aug-2010 François Revol <revol@free.fr>

Use IntegerWidth() & friend to avoid the cast, doesn't hurt.


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


# a67b5b9911de3226282b52152ad95f0f8523472d 02-Aug-2010 François Revol <revol@free.fr>

Fix the width and height fields of the B_VIEW_RESIZED message to be of type int32 and not float, as stated in the BeBook. They are rarely used since BView::FrameResize() passes the floats directly from the updated bounds, but at least it should fix the XEmacs port.


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


# 4a254e4ddbb0aaeb909ecd68a8442c4302618050 27-Jul-2010 Alex Wilson <yourpalal2@gmail.com>

Generally, clean up new archiving constant names & strings to be consistent in all classes. Modify archiving constants to be const char* const (thanks Ingo). Also modify archiving in many classes to use less fields by storing more data in arrays and structs. The common min, max, and preferred sizes, for example are always stored in an array now. In BTwoDimensionalLayout and BSplitLayout, the insets are archived in a BRect. Also fixed a typo in BGridLayout which caused column info to be incorrect during archival.



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


# 12c93cc7f8a7598b1527c449a2de12b8da34a135 11-Jun-2010 Axel Dörfler <axeld@pinc-software.de>

* Before stippi starts clobbering the sources everywhere with superfluous
work-arounds, I applied the work-around where the problem actually occurs,
until someone takes the time to look into it.


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


# 24386c29374af3925e3ee8946d94c8c156f5c8d2 15-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


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


# a2224f75d910e55d83fae52a0a9a3e182fb1ad33 11-Apr-2010 Jonas Sundström <jonas@kirilla.com>

Corrected strace output.

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


# fa5956d5f3396066f772ef47a6657cba0b5e4233 28-Feb-2010 Rene Gollent <anevilyak@gmail.com>

Removed obsolete TODO: BMessage is smart enough to already use area transfers if needed.



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


# 4f24f3110b1ddaeb05e538696db8805045323702 11-Feb-2010 Stephan Aßmus <superstippi@gmx.de>

The decision to inform the server about changed flags needs to depend on the
changed flags, not on the new flags! Fixes the server and client going out of
sync when clearing any flag that the server needs to know about.


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


# 76d24e95aa29ef07ca8a8f02cfb925b0fd820284 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Ugh, forgot to check this in quite a while ago:
If the view doesn't have a tool tip, pass the B_MOUSE_IDLE to the next handler,
so the parent view can show a tool tip. This makes tool tips in a column list
view possible (or at least reasonably easy).


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


# 2ecef7f3794ce412de29408d859efc1d8660b211 19-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Reuse an existing text tool tip, when a new text is set.


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


# a82667982289f3271c97282354375f22593d2b51 05-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Only build the gcc 2 compatibility symbols with gcc 2.
* Added gcc 4 _ReservedView11() compatibility symbol.


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


# d7a16b238f2207547080ea7eb0f4c430b6f25049 31-Jul-2009 Michael Lotz <mmlr@mlotz.ch>

* Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
mechanism.
* Move variables that are purely used by the instance out of the header and into
the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
because of padding.
* Fix message passing by area. It never worked because the created area was
never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


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


# 1b98cebd7ac192a49343cd62f63295ae8ddc23c4 24-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Turn off the optimization to skip calling Flush() when an invalidate request
was already sent by this or another view. This was already the case for the
BRect version of Invalidate(), but was forgotten in the BRegion version. I
just had an idea what the problem could be, but I think it's bogus. Needs some
investigation. Should fix ticket #4119 for the time being.


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


# 514fcf3be9ba65665ea1221576b39133e1d406ca 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Pass the mouse wheel message to our parent (ie. the next handler) if we don't
have any scrollers.


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


# 68504ee9f250f711596f314afd8e3fc22aa19577 15-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* Style cleanup.


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


# 9515252e02207403a4f66e2e5be87f2b0bbd875b 03-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The view always included the "error" in the reply, but that's only supposed
to happen when an actual error occured.
* The "set frame" property resized the view incorrectly.


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


# 19e179ca4ff838084b9abb0dd19932ac5fcd0051 19-Jun-2009 Stephan Aßmus <superstippi@gmx.de>

* Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
race condition with asynchronous SetViewCursor and deleting the
cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
just in case...
* Added TODOs for caching the BView token, it's currently resolved
for every single BView call that talks to the server... not good!


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


# 834a9474ac66081fae0fe86363fb61d8f20be58d 17-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed bug that prevented the font state to be properly popped. It could be
solved more efficiently by adding a new app_server call for this, though.
* Fixed stupid operator precedence bug that caused BView to always archive
everything, instead of only those items with their archiving flag set.
* Minor cleanup.


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


# a47e7e30e4c2fd93d472a07394b52908f9f83700 30-May-2009 Jérôme Duval <korli@users.berlios.de>

* merged Frame and Hidden properties (set and get) (bug #3493).
* changed Hidden set property to not check the current hidden state, as it's not exactly related.


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


# d69a73dfc7ce6f8340ea7df1fe67986b01aa09ec 16-May-2009 Axel Dörfler <axeld@pinc-software.de>

* The Be API requires that options and mask is 0 to remove a mask using
BView::SetEventMask(). This fixes bug #3928.
* And while the app_server handled that correctly, BView actually did not, and
stored the wrong value.


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


# 12349c7d3d445aa2bb4d737e5c7bcf135cca1d69 05-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Begun to use structs for the BView<->app_server communication. This makes
the protocoll less prone to errors, reduces possible points of failure and
most importantly, reduces the number of function calls to the link API.
I only know the numbers for StrokeLine(), which I tested via the Benchmark
test app. With this change, drawing random colored and positioned lines
actually doubled in speed. On the BView side, the calls to
ServerLink::Attach() only halfed, while on the app_server side, the number
of calls to ServerLink::Read() is now 1/4th. It will also be worth
investigating why the link stuff is so slow at all. I also optimized
BView::DrawString() a lot in this change, but I don't have any numbers
yet. Some other commands which used multiple Attach()/Read() calls were
also optimized, at least the most important ones. Begin/EndLineArray() was
also pretty bad on the app_server side.


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


# eaccfb9dd09b53c1f2788f527cbaaa01db037de9 14-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced some "new" with new(std::nothrow) where appropriate in our base
classes (BView, BWindow, BAlert, BButton - BTextView should be part of this,
too, to make BAlerts work).
* However, it's not that simple, because there is often no way to return an
error. Most of that code obviously assumes to be able to throw exceptions
(it's just not communicated to the caller). Maybe we should just start
documenting exceptions for R1 (and properly use exceptions later on).
* Automatic white space cleanup.


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


# 431dc47ddeaddc4ad9467b87c09f6777d99fbe1c 15-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Artur Wyszynski with some changes by myself:
* Resolved TODO: The type of the gradient is no longer encoded twice in the
app_server link protocoll.
* Moved instantiation of the BGradient into the LinkReceiver::ReadGradient()
method.
* Check success for (at least) ReadGradient() in ServerWindow.


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


# 1138737b87f501727cb1fcf9c2a0d8f96909831d 14-Oct-2008 Rene Gollent <anevilyak@gmail.com>

Fix regression introduced in r28116: Due to the change in variable names, the
wrong version of ConvertFromScreen() was now used, resulting in the calculation
being computed and thrown away. This broke BMenu, probably amongst other things.



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


# 0945268d80ec009f4830f1d7b0103a10da8db9ad 14-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* GetMouse() now survives being called with NULL parameters for location or
buttons.
* Automatic whitespace cleanup.


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


# 7b40eb420660b3dff82f1d51e0d84c1de73bba40 17-Sep-2008 Philippe Houdoin <philippe.houdoin@gmail.com>

Fixed a typo.


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


# 6ee56a00e5be2738676dda25e48e10cf9874dae8 08-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

added a comment explaining why the implementation should be moved to the server

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


# 0f1d1fbe30eb42864277ad9821c123fa4a614a8f 05-Sep-2008 Rene Gollent <anevilyak@gmail.com>

Temporarily disable this check in Invalidate() as requested by Stephan. This fixes the problem with redraws seen in FlattenPictureTest and a few other places.



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


# 3d2516cb5f2870aea3b8cd9915fd22c2c998da33 04-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented a client side (and very slow) version of BView::ClipToPicture. See bug #1397

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


# 910c4a0106708e00466d29f3df209c854ee6547f 28-Aug-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

the Link* api supports sending large messages through areas, thanks to Julun, and this TODO can be removed.

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


# fa55277509699696841ce7546048c9f3b5bb2317 18-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

In BeOS, BView::Bounds() does the owner lock check. In Haiku, it does now
too. Removed the check in Frame() accordingly, because that uses Bounds().
Removed some code left overs.


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


# 52daa631a57f6b74175142d11ff8aea1594e46ca 15-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added comment about possibly invalidating the layout when changing the font.


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


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

Implemented a simple fix for the message-pile-up problem of
BView::GetMouse( , ,useHistory = true) in case the application
calls GetMouse() in a loop with a longer delay then mouse
messages arrive at the queue. The "when" field of the messages
is used to discard old mouse moved messages. This also fixes
the possible problem of finding the same message over and over
in case it is not removed from the queue for other reasons.
This fix makes selecting text in Pe for example usable.


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


# f3312751b999d90645180d5211f6997a858465d0 08-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

honor 80 char limit in comment


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


# bafcc63bccfc0692fe28bff019f92810540a63e5 08-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

This is either a fix or a workaround for a problem in Pe, where the
application modifies the scrollbars one by one and the changes would
have some weird cyclic effect where the constrains of one scrollbar
affected the scrolling already while they would be lifted afterwards.
It sounds weird, but maybe it is simply a resulting behavior of the
BeOS implementation which does not check the scrollbar restrictions
in the BView code.


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


# f56301c9e824fb17a6022f06ec64d6807b64adc5 07-Jul-2008 Karsten Heimrich <host.haiku@gmx.de>

* maintain our own rect while printing, this makes it possible to print all pages e.g. syslog from StyledEdit



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


# 1c4b7e9e01942386c5e526bd237b1ef9080604e4 20-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- revert my last changes to ScrollBy, this temporarily bring back #2312
and the previously mentioned ResizeToFit issue.


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


# d511a89a8a5061c9e3ffecd7a3ebe92fbc83d553 19-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- Since r21336, BView::ScrollBy was checking the values against the ScrollBar ranges but ScrollBy is often called before
updating the scroll range (ie: in ContainerWindow.cpp). IMO, the programatic ScrollBy method shouldn't depend on the
ScrollBars ranges or state. The original fix in r21336 was apparently hiding other BScrollBar or BView bugs that have been
fixed in the mean time.
The content was offseted when going back to list mode after moving icons on the left/up in icon mode. This fixes Tracker bug
#2312.

- Revert and fix changes to ContainerWindow.cpp in r18481 (cvs 1.37). The condition was broken, but it wouldn't ScrollBy()
anyway due to the previous problem. Fixing BView made the content autoscroll even if the lefttop corner of the extent was
already visible.

- Probably unrelated, fix changes to ContainerWindow.cpp in r18993 (cvs 1.38). PoseView()->Bounds().left/top < 0 is expected,
if for example in icon mode you move an icon close or crossing the left side of the window and then scroll left to adjust.
This fix ResizeToFit that wouldn't scroll the view correctly in some cases.

So we had a Tracker Bug uncovering a BView fix that was hiding another Tracker bug, everything is fixed hopefully, phew :-)


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


# eaa6da1ef750d815d4318870eb24ccabc326c4c8 19-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

Use a flag in BWindow to store whether an update to a view (Invalidate()) has
been requested. The first call to a BView::Invalidate() will flush the link
so that app_server is notified as soon as possible. It makes no sense for
further calls to Invalidate() to flush also, since Flush() is not cheap. This
trick makes Invalidate() about 3.2 times faster, making it a cheaper operation.
I could not see any negative effects, I tested with apps that invalidate
multiple different parts inside a window in reaction to something. Thanks go to
Ingo who had the idea.


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


# 82adcce2b7038b54daeff238a3490f8275c3f20a 11-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- BView::MoveBy was letting BView::MoveTo do the rounding after adding
the delta.
For example, MoveBy(-0.5, 0.0) would do nothing in this case:
roundf(150.0 - 0.5) = 150.0, when rounding the delta it gives the
expected value: roundf(150.0 + roundf(-0.5)) = 149.

On the other hand, BView::ResizeBy was doing it right, and this
explains the bug in Cortex (#333). Cortex was doing
scrollBar->MoveBy(-0.5,0) then scrollBar->ResizeBy(0.5,0) and the
inconsistency lead to the visual bug. (see StatusView::MouseMoved())

This fixes #333. The bug was strange to reproduce since sometimes the
point received in MouseMoved would be "some_integer+0.5" values
sometimes just integral. This has still to be investigated though not
problematic here anymore. See cortex/RouteApp/StatusView.cpp line 222.


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


# 80f4a4f27270f32099b83af6f4281010690c1c8c 09-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

The given updateRect in screen coords (_Draw()/_DrawAfterChildren()) should
no longer extend outside the view after r25879.


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


# 258fd455bc7a144316912b460b92cb964af2d232 08-Jun-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Also do fast mouse wheel scrolling when Command or Control is pressed
(was Option only).


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


# fed7414a59a3a5cfe353f7b1e66911bdf1e5e919 07-Jun-2008 Rene Gollent <anevilyak@gmail.com>

A view shouldn't be able to RemoveChild a view that it isn't in fact the parent of.



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


# 087592136a65043c07dafccb3f48aa93d2c05757 18-May-2008 Rene Gollent <anevilyak@gmail.com>

Moved scroll implementation from ScrollBy into ScrollTo and made ScrollBy simply wrap a call to the former. This
guarantees that the virtual hook is called in all cases, and fixes bugs 1252 and 1838.



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


# a1a5f1241f75153e6cde1361d443c64240c0c207 27-Apr-2008 Jérôme Duval <korli@users.berlios.de>

only set shear and rotation with valid values


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


# d092f4d8df0feafc8cb956f4e728088b807c1edf 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Appearently, PopState() should flush right a way if not in a transaction,
or else the server will keep working with the state and especially a clipping
region which should not be effective anymore. This fixes one problem I could
observe with my test app.


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


# a49de3208c8cfd1e39a089cb04fc2dcc6f01b748 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Reordered methods a bit. SetOrigin() and so on is state related. PopState()
PushState() should be at the top of the state related methods.


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


# ee7cf06d20a2a58ed7c71b2bced704939861486a 25-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

* Added link flushing where the change is supposed to happen as soon as
possible on the server side (for example Show() and Hide() need to be
immediate). But also SetViewColor() and a few others. This fixes the
bug encountered in Pairs.
* Removed NOTE in DrawAfterChildren(), since it was outdated.
* Corrected a typo in a comment.


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


# 5464b10f1a6abf6d29fced2007aa74a5e667863b 18-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* get_uint32_color() now returns the color as host endian value.
* Introduced a new get_rgb_color(), that returns an rgb_color from a host endian
uint32.
* Those two together fix bug #2094.


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


# 28d5567e2846edc6b3087ff35dd66a9e449de57c 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* GetPreferredSize() no longer crashes when given a NULL parameter (as the
other interface views already do).
* Minor cleanup.


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


# d7aa5bb89cb3f5dd86412bfd9ab3a2f07dad03a3 06-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Oh boy. I think I fixed the issue by understanding it with the right side of
my brain, while the left side is still puzzled. So it's hard to put it into
words. Basically, there was an unwanted feedback loop when applications first
scrolled vertically and then horizontally (or vice versa). Because of the
feedback effects between BView and controlling BScrollBar, and because BView
controlls both scrollbars at once, it is important not to set the scrolling
offset of an unaffected ScrollBar, since we might actually be comming from the
SetValue() function of the other scrollbar. Fixes #1913 and possibly more,
going to check up on the other scrolling related bugs.


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


# c7a77521ffc3a115780a9abd6c46e07fe17ada39 08-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

Renamed all *LAYER* constants to *VIEW*.


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


# 8dd37e7af9b579201db264c185fcef517a1e2884 07-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Make sure that a detached view is really no longer the focus view.
MakeFocus(false) can not be trusted, since it is virtual and might not call
the BView version.


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


# a2186f4a81a76f472bc257bd5de7b57db23439d9 07-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

print also the view name in case it mixes up flags and resizing mode.
Helps identifying it.


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


# d4000a765f0d76bd5b3f2f698dfd711066d2b4b9 19-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* fix the new layout version of the BView constructor to call the BHandler
constructor with the supplied name


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


# 5d196712c9fb5173e96f8c4bfc5febec07af570d 11-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

Add a temporary backwards compatibility fix for applications that accidently
mix up the resizingMode and flags field in the BView constructor. This does
not cause problems under BeOS but was causing wrong follow modes when those
applications were run under Haiku. In case such an application is detetected
a corresponding warning is printed out. Also added a comment explaining the
rational behind the change and a ToDo for the later cleanup.

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


# d2580802d69595e019d4fab762f7becebc27ad11 03-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Somehow r23154 reverted r22930...



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


# 8d2fdf2b0e9207a4dd63c4a2b042c4450d33f194 15-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

Added Flush() to SetMouseEventMask(); this should definitely be sent immediately.


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


# acf8b5d11c3656269ad857231d57a3896b952bed 31-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

* despite what the BeBook suggests, using CopyBits() on a non-attached BView
does not drop you into the debugger on R5. Should fix #1598.


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


# 259233e466e8513840de1dbdd88247de43fc52a4 13-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* added NOTE on why having mouse coords in screen space until the very last
moment is so nice


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


# 72c9d31ec42b2bf27328ddce458a934aa214ef23 11-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* transmit correct type in BView::BeginRectTracking()
* put message codes for Begin/EndRectTracking() into giant switch... not
actually implemented though


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


# 3424ff46e9a7fb5e22f38e282a6fca4d49e59675 10-Sep-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

renamed private members of BPicture to fit our coding guidelines


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


# 53fca955e6ca4c19cd29540b562dc92eaf8d7787 25-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* I confirmed that on BeOS, BView::Invalidate(BRect) rounds the rect to integer
coords in this way. BRegion does a different rounding, also compatible
with BeOS. I added an explaination. This fixes one _part_ of #1426, which is
that Sudoku doesn't invalidate more area than intended (or at least it works
as it does on BeOS now). The second part of the bug though is that the server
has been preventing the drawing of lines and rects in a certain way, in another
words, the part of the bug I fixed should not have been a problem in the first
place if the clipping would have worked correctly. I believe the problem shows
when the drawing commands contain fractional offsets. The rounding happens in
the server, but maybe too late (after comparing with the clipping region). It
could also be a bug in our BRegion implementation, I need to check my new
implementation behaves exactly like BeOS in the Intersects() and Contains()
methods for fractional coordinates parameters. Anyways, at least the visual
problems are gone.


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


# f148f628da79a859dad7c8677e3706351ba646f9 22-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* resizing scrolled views should have definitely been broken


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


# 48658ad173455d9ba477cd2addfb7f51c3cad846 13-Aug-2007 Jérôme Duval <korli@users.berlios.de>

fixed build


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


# 4d47fee5cd8db7b1337a8b29237517ed3e941e68 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Renamed some BPicture private functions, small cleanups.


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


# 277571370c354c44d83647a854fdfa5e2bffe820 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

AppendToPicture() now sets the correct picture to be returned from
EndPicture() (tests have confirmed this). Although appending to a
picture doens't work yet for some reason...


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


# ed5de868df775fceddb5abedec7eab9bd5147d51 13-Aug-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of
nested pictures.


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


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

* removed code duplication in BView::check_lock() and do_owner_check(),
* revised use of check_lock() versus do_owner_check() (do_owner_check()
is supposed to drop you into the debugger if there is no owner, otherwise
it behaves like check_lock())
* ConstrainClippingRegion() no longer transmits empty regions to the
app_server. I would have thought that my fix to ServerLink would have
solved the issue I was investigating, but only this commit fixes it.
Maybe the last commit would have fixed it if I did a "jam clean"...
* WonderBrush draws the icons again on mouse over...


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


# 94a48ae2765a9c1e1eda25a4e7438f2085658345 04-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* use a different message code for DrawString() with escapement delta
and DrawString() without
* this change also includes adding the penlocation to the shape to-screem
coordinate conversion (temporarily breaks shape rendering, will be fixed
in next commit)


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


# 67f3be42b00f063f84e4e9a743dcf431f99c311d 17-Jul-2007 Stephan Aßmus <superstippi@gmx.de>

* added ProfileMessageSupport.h/cpp to translate server message codes to
a string
* fixed profiling of message processsing in ServerWindow (didn't take batch
processing into account)
* accelerated ViewLayer::RebuildClipping() by a factor of two by avoiding
BRegion::Exclude(clipping_rect) for each child, and instead building
one region with all children, and excluding that. RebuildClipping() is
quite a common operation and is quite slow for views with many children


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


# da3addea5f07769a56ef8b31f66ba9f85689da94 09-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed incorrect parameter validation in ResizeBy(). Resizing a view to a
negative size is perfectly fine.


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


# 96726e7e243b34f27590f7d2cbf5723e6d2e20be 05-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied Stefano's patch to fix bug #1241; BScrollBar::SetValue() did not work
correctly for out of bounds values.
* BView::ScrollBy() now limits itself to what eventually attached scroll bars allow;
this fixes the problem Stefano was observing after having applied his patch.
* Reenabled the limit check in BScrollBar::SetProportion(); after the above fix, I
could not see any misbehaviour of Tracker anymore; IOW Tracker did not rely on
this before, it was just hiding another bug :)
* Minor cleanup in ScrollBar.cpp


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


# 93c4bf98f1fed588ef05e573e285382c9614014c 27-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Reverted r21191. The one who calls BView::SetFont() is responsible for
also calling InvalidateLayout() and Invalidate(), if necessary.


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


# f856bb2838419cbb03f67da877d699435d372c4e 21-May-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Invalidate layout, when the font changes.


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


# 027f6a768cb930964612064032c2a3206abf2fd0 08-Apr-2007 Stephan Aßmus <superstippi@gmx.de>

* export SetDiskMode() symbol, thanks to "aldeck" for providing the BeBook link,
fixes ticket #1140


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


# 815c38625d4d164cd1c655c096b7095dac79cd51 04-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

Applied patch by Vasilis Kaoutsis:
* replaced new[] with malloc()/realloc() where appropriate - since we're messing with
the bits anyway, this makes the code slightly faster.
* however, we might want to throw some std::bad_alloc exceptions to deal correctly with
low memory situations.
* cleanup.


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


# 6c3692dc874fc10cb1404b93f56f7ecbb81eec0b 17-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Turns out our pulse mechanism was broken; we need to honour the rate set by
SetPulseRate() even if it is 0. BView::_Attach() and BView::SetFlags() now
just set the previous pulse rate again (which will start pulsing in case
there is no fPulseRunner yet).


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


# 83c6772dc84d7fc06dfa87aff0a839c5cb9dd49f 03-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

extended a comment and added a new one

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


# ae9aed772eec270c69ed5ccc2cde0de69919da00 03-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

in case of error, set buttons to 0, for real

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


# 2f9eca855a65581e353ad28a0d71b4f48893ac01 30-Oct-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

moved Shape related defines to their own header


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


# 00529536d25e09c0893fa263b945b8f4052bb05f 29-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed my previous commit - now dragging a bitmap is working again. Thanks Stefano!


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


# e0091c79d8ee3453705c684c1e31966f32ba8e04 27-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Drag messages can now also be started with a NULL bitmap pointer and an invalid
drag rectangle - this fixes bug #596, as Cortex obviously relies on this.
* Added a comment on how dragging without a bitmap should be done (app_server should
directly support this without needing to drag real bitmaps).


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


# c7580d16942eda8a1c2a9935005e94d5469f9626 25-Sep-2006 Jérôme Duval <korli@users.berlios.de>

put back errors in scripting replies : it's part of the BeOS behavior
MethodReplicant is now working again.


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


# a89fb19365583f91f7e1652ef733d48712915eac 14-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* on R5, invalid BRects cannot be used with FillRect(), Haiku is
compatible now. This fixes the last remaining drawing bug in
SoundRecorder.


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


# fa407130aaf427956a50adf6b31781d26e8fb52d 24-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Now this should nail down bug #762 pretty well: BView::GetMouse() no calls the
private BWindow::_StealMouseMessage() which makes sure only messages for the
preferred handler are stolen, and also, that nothing gets lost that shouldn't
get lost.
Also updates the fLastMouseMoved view in case the message is actually removed
due to GetMouse().


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


# 78aa8eea3db5e6af2e525ae29e3afc2248517586 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Added get_uint32_color() again, the previous "hack" doesn't compile
on GCC 4.
* Fixed buggy scripting error responses: "error" is only included on
error, and B_ERROR (-1) can hardly be a candidate for the
BMessage::what field (uint32).


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


# 11235ae729e3f91f1141068276715a82e0b0928a 10-Jul-2006 Jérôme Duval <korli@users.berlios.de>

"class" is added by BArchivable::Archive(), no need to duplicate


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


# 955bc004af3b8a4772e4792d0933ccc9ea01ba6c 04-Jul-2006 Jérôme Duval <korli@users.berlios.de>

little cleanup


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


# b8fc177d9c406ce2fea87d9c66eef0dcb1f2ed68 03-Jul-2006 Jérôme Duval <korli@users.berlios.de>

* default source BRect is now offset to B_ORIGIN because Bitmap bounds lefttop could be something else than (0,0). This caused some bugs in Haiku SoundRecorder app
i* thus the NOTE in Painter isn't valid anymore
* in Painter::_DrawBimap() moved scale computation after potential changes to BRects
* fix typo : right => bottom. This caused a bug in Haiku Mouse preferences app


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


# da08acb8bf6c19929320a161e0f91996eec0b950 12-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fix some more bugs in scripting handling, this seems to never end
Having canna input method installed shouldn't crash Haiku anymore


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


# 16b4861f05051ba57173b9efa260fa0dc646164a 12-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

No reason to return B_ERROR when the method doesn't have to do anything.


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


# f4fc3d626a425bf59886cd5773fd2f64ff285b10 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

* fixed some more GetSupportedSuites implementations
* fixed some local variables names
* fixed the case of some message attribute names


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


# a03ac895264010903a2bf3ba28f259d1d1dbfefd 05-Jun-2006 Jérôme Duval <korli@users.berlios.de>

fixed some property_info and value_info for BShelf, BMenu, BWindow and BView
real support is to be implemented for a lot of them


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


# 79adc02bc6eeb389ef0c96681b81c77c23f91867 04-Jun-2006 Jérôme Duval <korli@users.berlios.de>

begin to fix bug #658:
makes use of BWindow::_SetFocus() in BView::MakeFocus()
BWindow::_KeyboardNavigation() now uses BView::MakeFocus()
This is though not enough: _SetFocus isn't called on window activation/deactivation, thus the input server isn't aware of a focus view change in this case.


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


# e229fcb239a8dfef14ea094964289b129fbdfaa0 27-May-2006 Stephan Aßmus <superstippi@gmx.de>

nailed a view bugs concerning archiving BViews, the flags where restored 0 in most cases, which means B_WILL_DRAW was not set, I'm going to clean this up some more, ViewState::archiving_flags is bogus...

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


# 4cf88b82c358ef04e11f5e1354db7206d2d2a408 22-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

set alpha value of default low/view color to 255


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


# df230cb528246f0e428cc800a512905018aafc0a 22-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

replaced get_uint32_color() by casting into a reference (const uint32 &)


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


# bc685a6444bbdd9fc6a29d59bdaa6bbc7c8fa945 22-May-2006 Stephan Aßmus <superstippi@gmx.de>

set_rgb_color() seemed useless

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


# b0bc48fbd360f10cee1856e03393c63dcbdd180f 19-May-2006 Axel Dörfler <axeld@pinc-software.de>

Some more GCC 4 and PPC fixes.
* Mesa doesn't compile yet, as some PPC specific stuff seems to be
missing, Philippe?
* Cortex and some other stuff has been marked x86-only, although
it's more of a "GCC 2.95.3"-only.
* I'm not sure if it's a bug in GCC 4, or if that's what the C
standard demands, but sizeof(some_type::some_field) is not
valid anymore :-/


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


# 5add574bc9cbaec39661e59e1772ed44fb9f8016 19-May-2006 Stephan Aßmus <superstippi@gmx.de>

* invalidate in _Attach and _Detach - I still hope to
find a better solution, at least it fixes the problem
that when views are added to already showing windows,
and those views set their view color in
AttachedToWindow(), the app_server will have already
cleared the background with the previous view color
(for example white check boxes problem in Tracker
Settings window)


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


# 07cc05136fcf577938bd36ce0d46cef113d477be 08-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented the BView::DrawPictureAsync() version which accepts a filename, not tested

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


# 3279f3b0556dae138f680000d77bf0ed51e6993f 03-May-2006 Michael Lotz <mmlr@mlotz.ch>

Detect recursions of UpdateIfNeeded. This is necessary as we may call hook functions (FrameResized(), FrameMoved()) that in turn could call UpdateIfNeeded again. This is the case for DarkSite which uses GetMouse() inside FrameResized(). This fixes resizing DarkSite and probably fixes bug 539 too.

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


# 9d8ea7e4175f3a9f17f336eae80ff5849f20d1ff 29-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

modestly added myself to the authors of View.cpp

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


# 621a832488a17c2281190dd4c3d9f9d741ef1273 23-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed ViewAux.h header to ViewPrivate.h.
* Some cleanup.


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


# 4fdedfbde40258f52c2778d1ca87131b6635fb5d 21-Apr-2006 Jérôme Duval <korli@users.berlios.de>

fixed some Archive() following stippi's path


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


# 0c4d8bc572a5014c659af92fc49a05bf7646bbaa 21-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* added TODO in DragMessage about using an area for the message
* removed TODO in DragMessage about reference counting, since
it already happens
* use _FlushIfNotInTransaction when moving/resizing a view
programmatically, so that it usually happens instantly.


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


# 34ff238b8850511c6b903e6eb934830a62356f1a 12-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

Implemented the BRect version of DragMessage(). This just creates a drag bitmap with the rect. We may want to switch to a less heavy implementation later on though.

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


# 39cdae74a7fc098db3a59a3e9db03b6ad57ab991 10-Apr-2006 Michael Lotz <mmlr@mlotz.ch>

First steps at getting drag & drop to work properly. Simple drag & drop (draging Tracker items) should work now. Not sure about the negotiated version (with mimetype exchange). Fixed left behind drag bitmaps. Some cleanup.

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


# 7bb48db1f2d5918e4ffabf8c08445af7f2e6ebea 04-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

* The BView::FrameResized()/FrameMoved() hooks are now called asynchronously
as in R5, and no longer directly. This fixes bug #301.
* As a side effect, the hooks are now only called when the view is attached
to a window, as on R5.
* Removed dead B_VIEW_RESIZED/MOVED code from BWindow.


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


# 903936bcec7685f61b848763967614eb2e6484bc 03-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Added the scrolling offset when a view is created.
This lightens the problem in bug #98 a bit, but doesn't completely fix it; you
still don't see any items in that list on the switch, but they now appear again
when you scroll around there.


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


# 600fbd78e4d89c3666152fec0e857f11783c0258 01-Apr-2006 Stephan Aßmus <superstippi@gmx.de>

* BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
have retrieved a cursor until they have called Acquire() on the
cursor. (Axel: what good is using atomic* stuff in Acquire() and
Release() if we have to protect this by a lock anyways?)


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


# 9a44fdc97c4c91b6be039ac5125a618c8fd268cc 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented a new client allocation method: instead of having all bitmaps of
all teams in serveral server areas, and instead of having to eventually clone
them all several times in BBitmap, we now have one or more areas per team,
and BBitmap will only clone areas once if needed. As a side effect, this
method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
maintenance structures into those everyone-read-write areas, they are now
separated, so that faulty applications cannot crash the app_server this
way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
(ie. via ServerApp), per area (for overlays, not yet implemented), and using
malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


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


# 420379aef6b11fba2a20aca34939cc9c4dc8733b 15-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

I should have finally fixed those app_server crashes
in HWInterface::_DrawCursor(). Axel, even though we
understood the problem, we didn't really fix it back
then: When the sync flag was set to true in
BView::SetViewCursor(), the link was only flushed,
which means that the function still returned before the
ServerWindow thread processed the message. This means
that the race condition (the cursor being immediately
deleted after SetViewCursor returns, which might be
processed in ServerApp thread before the SetViewCursor
request in ServerWindow thread) still existed. I changed
SetViewCursor now to do a real sync (wait for the
ServerWindow reply) before returning. The alternative
would be to set the fPendingViewCursor flag in either case.
Anyhow, I could reproduce the error quite reliably before
this change, and now it is gone... here is to hoping!



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


# 562f3db610c1416f20ed858a68feaf7103848edd 15-Mar-2006 Jérôme Duval <korli@users.berlios.de>

unused header


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


# ecf9f948002cda853199de279dde5255737e4124 11-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



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


# bdbd1cb4412cb21b5c6ddbec72bd7f151d3f09cf 11-Mar-2006 Michael Lotz <mmlr@mlotz.ch>

Removing the USING_MESSAGE4 define.

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


# e0e1c528659b4bc7ccee4a5945b66fe80624848e 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed a possible endless recursion (just do a ResizeBy(0.4, 0.4) or something like this
in your FrameResized() method - exposed by the TextView auto resizing feature).


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


# 8e89843efc34fa0df08f8986bc1db421e13422e7 08-Mar-2006 Stephan Aßmus <superstippi@gmx.de>

* when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
the user defined clipping of the view state instead of being sometimes
used to cache the current view clipping


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


# f19839c230e64120d4b9e9fda83d1578445d232f 01-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


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


# 588259b66d15a3bde1fae53833230bbe28a4e8b0 26-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to handling custom cursors:
* all cursors owned by a team are visually different,
or (iaw) an already existing cursor is reused when
it is set by the client again
* changed various occurances of cursor data from "int8*"
to "uint8*"
* ServerCursors also remember the R5 data from which
they were created
* the reference counting and destruction of
ServerCursors changed: The cursor knows it is attached
to a CursorManager and one can simply use
ServerCursor::Acquire() and Release() and the reference
counting and everything is being taken care of
* destroying a ViewLayer will now correctly release a set
ServerCursor
* fixed a race condition when setting a cursor through
BView::SetViewCursor(): If the client code looks like this:

BCursor cursor(cursorData);
someView->SetViewCursor(&cursor, false);

there is a relatively high chance the BCursor destructor
told the ServerApp thread to destroy the cursor before
the ServerWindow thread got to "acquire" the cursor for
use by the view layer. The very same problem is likely the
reason that SetViewCursor works to unreliably on R5, even
when the "sync" flag is set to "true" (although it should
theoretically work in that case).

all these fixes make WonderBrush work fine again with the
new support of custom cursors.... coded by axeld and myself
(the joys of pair programming :-)



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


# 0cd3fd40ec7b13143424063a1d0d3cf249689e81 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Speaking about bugs... removing views is now actually working again.


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


# 62b5f42b3541fb277ec03c807c8fb163b04b5c51 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed view deletion: _CreateSelf() and RemoveSelf() are now symmetrical, removing
all those error output from the app_server.
* AS_LAYER_DELETE now gets a token, no longer frightening choice of parent.
* Removed locking in RemoveChild(); it has to be called locked now.
* Removed AS_LAYER_DELETE_ROOT as it's no longer needed.
* Removed support from BView for being PR3 compatible.


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


# 48e3cfa354875d0c319e52fadd439ff254c63c0e 15-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

DrawString() no longer crashes when called with a NULL string.
This fixes bug #136.


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


# 4167cbe823daa241735969737ee8d305516f3b82 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

speed up from/to screen conversion of BRects

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


# 585c5a004236b2a88f3bd2966c5054796bb44c6f 06-Feb-2006 Stephan Aßmus <superstippi@gmx.de>

call debugger when encountering nested BeginLineArray calls like in R5

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


# aa1f5437999ab8531f33139c129c6bcaceb74e7a 05-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


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


# 7afc7c5074c2a3382be788d22fe999040c582ccb 08-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
client request, just for safety reasons
* the link is flushed if there is no drawing engine,
but this case is theoretical only
* deleting the ServerWindow object syncs with the
client, so that when BBitmaps are deleted, they
can be sure there are no pending messages (which
would be executed in a nother thread)
* there is no timeout anymore when sending messages
to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
what it really is
* fLastFamilyAndStyle defaulted to the system plain
font and therefor that font was never loaded when
the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
potential of a division by zero, at least I
had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
double buffered mode

ViewLayer:
* since the top layer is never really deleted
before its time has come, it is not necessary
to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
in _SendMessage()
* drop mouse moved events in the server if we're
lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
of the BWindow looper in RemoveSelf(), since
this is called from the window destructor,
also of BWindows from BBitmaps, which have
never been run (this might need review), at
least I seem to have solved the crashing
problems introduced by actually deleting the
view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
temporarily disabled DrawAfterChildren, which
didn't work yet anyways (because views cannot
draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
there is only one ever in the queue
* set the fInTransaction flag during an update,
I plan to use this in BView later to
flush the link when drawing outside of an
update
* BView::_Draw() is now called by view token,
this gives the next leap forward in speed,
the overhead because of drawing clean views
was considerable



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


# fb82d189d02a686787c6f646143e334b99f6cdaf 06-Jan-2006 Stephan Aßmus <superstippi@gmx.de>

* BWindow deletes its view hirachry
* BViews set fOwner to NULL recursively when detached
* updated a comment


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


# 8f3f25cf639fbce2117e53f2bdcab62c2c4b4e5c 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Merged the four AS_LAYER_DRAW_BITMAP handlers into just one handler

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


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

It's okay that SetMouseEventMask() doesn't do anything when called outside
BView::MouseDown() - or when it's not attached to a view - but it shouldn't
drop into the debugger in either case.
This fixes the desklink volume slider.


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


# 5b0c0d601d3bd1c3438a697823bbbdc95bb8ee44 03-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

we don't need this hack anymore

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


# a1a73d28be155455b147ea8cc05d8b33e779aa12 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Force a Sync() in DrawPicture() instead of expecting a reply. Looks more correct

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


# 8e64a82404fc3deabff40f9525259ea25eebea02 02-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a sort of hack which allows BPictureButton not to hang the app. Strangely, dereferencing a NULL pointer hangs the app instead of crashing it

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


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

Speedup scrolling with the scroll wheel: this seems to vary from app to app,
BeMail uses 2, Terminal (under Dano) 4, and Tracker as well as pe 3 - so 3 seems
to be a good compromise.


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


# 456d0d082b2f7ebba9678bb68e621815f35b6968 30-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

We now have mouse wheel support for all views that have scroll bars. Should
probably increase the values we got from BScrollBar::GetSteps(), though, as
it's a bit slow.


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


# 38030e04771c60f84989e6580fd286c51a0fe690 30-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

removed a clouple TODO comments where issues cleared up meanwhile

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


# 6fce24d77746cc5ed1488eca279865c9594de15f 30-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

no need to const_cast in there...

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


# b34197fb51267f9286b697eba2e4f4a78a3ff6c3 30-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed the possible race condition reported by stippi, by getting the bounds and parent offsets of the view on detach

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


# 1ae8b8cd1984a7b051e9ee9f886dc0a4fdf01546 29-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

-When a view was detached, its parent offset was resetted to B_ORIGIN. This caused BTabViews not to work correctly. - The view state was retrieved twice when a view was detached.

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


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

Got rid of the remaining SERVER_TRUE constants.


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


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

Renamed AS_LAYER_GET_{DRAW|BLEND}_MODE to *_{DRAWING|BLENDING}_MODE.


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


# 9d909e25560c098447fd4dddbed7ed48ae8c9748 25-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

first simplistic implementation of drag bitmaps, drawing modes need more work, drawing text into offscreen bitmaps seems to be broken for some weird reason, B_OP_COPY actually copies the alpha value of the color as well

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


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

* Renamed AS_LAYER_INVAL_{REGION|RECT} to *_INVALIDATE_*.
* Removed unused AS_LAYER_INVALIDATE.


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


# 0f1d5a1af7c3de7bef59ffb124ccd88f2269b318 09-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

finally nailed that bug which prevented Tracker from showing the attribute column titles, I spent way too much time debugging this...

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


# fcb6cbaa64b1ffa34c3b770d08d74ba52a8bc161 08-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

when attached to a BWindow, make sure that the window sets up pulse messaging, if the view has B_PULSE_NEEDED, fixes Tracker showing 0 items in CountView

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


# 1cf70f2e660a18c9d32a2b6c6e96a886064c3e97 08-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

use With() and Height() instead of right an bottom for the new frame size, fBounds contains the scrolling offset...

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


# af43bb3c9410b42ed310a2db1489656be5f0b969 07-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

a first and really naive implementation of drag&drop support, no visuals yet... Axel, no worries I'm going to clean this up and remove stuff from EventDispatcher again...

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


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

Fixed comment, thanks Jerome.


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


# 9584d7e45e6641c3803909a55e3bb878b47693ad 06-Dec-2005 Stephan Aßmus <superstippi@gmx.de>

hefty overall drawing speed optimizazion, the Draw() hook was called for every view down the hirarchy when one single child had to redraw, added some TODOs in _Draw about some stuff we need to think about

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


# 17adbf1f0c0ec58303f403841abc3949d07d95e1 30-Nov-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc style changes

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


# 4bd3c01eaab0ecbeb0c2f8cb37a6c4b8ed617d26 28-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

_AddChildToList() was very inefficient in case there was a "before" view
specified. Also, it now drops into the debugger in case "before" doesn't
belong to us already.


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


# 6450b76dd4cef8cf04e8d31471517b40a35fa09a 23-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
EventDispatcher handles them now. As a result, a window will now
get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
when it's set - this is now used for the window moving instead of
the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
BWindow::_SanitizeMessage(() (similar to what the input_server does).
This should also make the mechanism pretty robust, since every
B_MOUSE_MOVED message can now trigger the view transit (in case a
message is lost). B_WINDOW_ACTIVATED messages should be generated
client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
field; "where" (in window's coordinates) and "be:view_where" are
added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
dropped instead of being sent to the looper - this should be done
in BLooper as well, though.


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


# 8bd2c11fc48ac2284087bfe4119fc041fd0ffb3b 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Moved the declaration of roundf() to HaikuBuildCompatibility.h - it's missing from
math.h but exported by libroot.so.


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


# 5fa643150bc9cebf8d28a41b38eff2b1fb22e3a8 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

* no longer needs to define roundf() as it's now part of libroot.so (like on BeOS).
* for the libbe_test target, though, I need to declare it, although it's also declared
in BeOS' math.h - Ingo??
* removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes
to behave differently depending on that flag (mouse tracking).


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


# cf10934e5fde37c267f7fb3bec89a8e9f5d9c476 13-Nov-2005 Michael Lotz <mmlr@mlotz.ch>

Introducing Message4. The changes to the related sources are ifdefed with USING_MESSAGE4 which is defined in Message4.h. To use Message4 the Message4.cpp, Message4.h, MessageUtils4.cpp, MessageUtils4.h and MessagePrivate4.h have to be linked to their counterparts without 4 suffix. Then MessageBody.cpp and MessageField.cpp have to be commented out in the app kit Jamfile and r5_message.cpp has to be added. There remain some bugs to be found. Feel free to change that.

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


# d28b9f6540555e7a66ee484553a657bad8f2ae9a 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

* disable caching of the clipping region,
there can be no notification when it changes in the server.
Note that GetClippingRegion() gets the actually effective clipping,
not only the user defined clipping.
* when removing ourself, set the last mouse moved view of the parent
window to NULL in case it was pointing to this view
* round the frame rectangle passed to the constructor, I have not
actually compared this with R5 behaviour though.


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


# fabffa3867afc269b8a056179a9675e095e1f3f2 10-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

fixes for Stroke and FillPolygon

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


# 72b26b5956d096853f89193ee1d05041a84bdd1e 06-Nov-2005 Stephan Aßmus <superstippi@gmx.de>

* line join defaults to B_MITER_JOIN. The BeBook says that the line join and
cap mode affect all Stroke* functions. If B_BEVEL_JOIN was indeed the
default, then StrokeRect() with a pen size of > 1 would have beveled corners.
* fixed sending op code and point data in Stroke/FillShape()


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


# fd8b9c0dd904cb50bcaecb4e6cb0f32f7968fa0d 30-Oct-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc style changes

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


# 88820e7210bad65fbfdf45dd8c98c7240f62e001 28-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

the new clipping code uses the same mechanism for updating frame/bounds, so we don't need some things anymore.

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


# a5cd1aeed00f2d832b0390f3e54abc6e7d2248fc 20-Oct-2005 Adi Oanca <adioanca@nowhere.fake>

small checkin to make the new clipping code work if one desires

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


# f2fd12985205decda0138ba31d9b82865b6fe9e8 30-Aug-2005 Jérôme Duval <korli@users.berlios.de>

now uses delta escapement
improved GetBoundingBoxesAsString (just for fun, keep in mind we'll use AGGTextRenderer in the end :) )


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


# ef5ab08df309a3a9ddf7211df822bfd8eec42c6e 21-Aug-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed keyboard navigation; it should now behave pretty much like R5 AFAICT:
- moved standard keyboard navigation into the BView::KeyDown() hook
- the window now only handles tab+option/command key
- B_COMMAND_KEY triggers group jumping, not B_CONTROL_KEY (that activates the switcher,
but directly in the app_server)
- fixed broken group navigation: (modifiers & B_COMMAND_KEY & B_SHIFT_KEY) is different
to (modifiers & (B_COMMAND_KEY | B_SHIFT_KEY)) and is just never true with these
constants.
That allows the tab key completion to be used again in Terminal.


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


# 2e6a5805ba8db3b072d81257cc44f966def5fd37 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing

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


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

Fixed DrawBitmapAsync() rectangle variants.


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


# 7d71b63563fe324a80ed1b9df89ddf67f426af5b 02-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BScrollBar::SetValue() was called with the wrong values in BView::ScrollBy

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


# 6834052234b3af6c28a9622d9a5bab26ef047f43 02-Jul-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The BRect version of ConvertTo/FromScreen were broken in case the view didn't have a parent, but was the child of a BWindow. This fixes a bug in menus (and probably other stuff too)

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


# 793b31c5fd6728ad53f21b2b676920557c4d76b4 30-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BView::SetFontSize() - only the internal font state was changed,
no one told the app_server about it (ie. StringWidth() would work
correctly, but the app_server would ignore the font size).


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


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

Fixed BView::LeftTop() - it certainly shouldn't return 0;0 only :-)


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


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

Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
and then again correctly by initCachedState()) - now the ViewState
constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
anyway...)
- cleanup


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


# 5d914f565f5ad528f2b53a1977ed2e181128f057 15-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Now uses BLooper::check_lock() instead of BLooper::AssertLocked(), because it
doesn't have to check if the looper is valid (we wouldn't be its child if it
weren't).
ResizeTo() and MoveTo() are not supposed to call FrameResized() and FrameMoved()
manually when the view is not yet attached to the window.
BView::CountChildren() and BView::ChildAt() now check if the looper is locked.
Some cleanup.


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


# 53442520cc7c5284373e7b65a8ab55d403ef583d 15-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bad bug in the app_server:
fCurrentLayer was used to determine to which layer a new one would be
added to, but BView::AddChild() would only set this correctly for the
current view, ie. all children of the new child were added to the
wrong layer in the app_server.
Now, AS_LAYER_CREATE sends the parent's token to the server, and the
server relies on this to build the layer hierarchy.
All of a sudden a lot of hidden views are visible now. I noticed the
bug while refactoring the task manager, but a lot of apps were affected.


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


# 7faaf6ba8b3839aac34b6c6ea446ba9b2f660e24 14-Jun-2005 Adi Oanca <adioanca@nowhere.fake>

fixed the viewColor bug

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


# c24e9a8838fc552cc4395b4b7d3041d4be16dcb2 10-Jun-2005 Adi Oanca <adioanca@nowhere.fake>

BView's color is not part of a graphic state

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


# 75936a02e432bb4ceb04494f0d53eb4d10ac7764 07-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

BPortLink now has a FlushWithReply() method itself.
BPortLink::AttachString() now accepts a length argument, and will no longer
send a terminating null byte; LinkMsgReader::ReadString(), however, will
make sure the string read is null terminated.
Changed client communication code to use FlushWithReply() instead of Flush()
and GetNextReply() - there were many bugs and shortcomings in the code, I
hope I've fixed them all.
Converted ClientFontList.cpp to our coding style (but not completely, the
class members are missing).
Some more cleanup - I hope Adi will adopt our coding style one day!


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


# 743a1473536bcbe4186e6d44a078c4a238421925 03-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

better ResizeToPreferred implementation

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


# 45ca1c948cba0471b3107e037489e54500215c50 03-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Simplified code for BView::ClipToPicture() a lot (both server side and client side). Regions passed with that method should take the place of regions passed with BView::ConstrainClippingRegion(). Note that the needed server support hasn't yet been implemented.

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


# 38b35d9caa2505146411842de6734e0a3b5031df 29-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BBitmap now uses the correct (private) BWindow constructor. Partially implemented that constructor. Fixed another typo in BView, verified and removed some TODOs

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


# 7d8462aed509565bc7dbd6536a4ba53ba889520b 28-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed bad typo

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


# 58b78e471ee0fbd8b70e83de34de63e0992e4693 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Convert mouse coordinates from screen to view, thus fixing GetMouse(). Menus at least open now, and textview works in synchronous mode

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


# 24a075f4e42a3d0d1f2d9d28320fac35dc340006 23-May-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented SetMouseEventMask()

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


# 097d6418528fea16a049db8d82b0d4df42e7c576 20-May-2005 Axel Dörfler <axeld@pinc-software.de>

Didn't know that BView::do_owner_check() also checks the lock - maybe
it should be renamed to do_owner_and_lock_check().
Removed looper locking again, since it's not needed, then. Thanks to
Adi for the hint.


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


# 52005fdaffeb73e8826fadb352f0a0179821c3a7 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Finally fixed Adi's repeatedly mentioned pet peeve: in AS_LAYER_GET_MOUSE_COORDS
communication, the port's reply port is no longer sent to the app_server (as it
knows where to reply to, anyway).
Also made sure the view's looper is locked while getting the coords - I guess
BPortLink doesn't like to be written to from two different threads :-)


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


# 25500bdfd925317645cdbd9185ba6e47a546b838 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed BWindow::UpdateIfNeeded() by moving the code from BView::GetMouse() over.
GetMouse() will now just call UpdateIfNeeded().


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


# d6fad1d006525f3d0d40a63fa75ff91bd610c85f 19-May-2005 Axel Dörfler <axeld@pinc-software.de>

Changes due to Adi's insight:
- there can only be one _UPDATE_ message at a time in the queue so we
can stop searching after we hit the first one
- mouse coordinates are always send in screen coordinates (unlike R5,
which means this is a compatibility problem), so we need to convert
them even for the current view.
Apps should now work with the old synchronous controls method (even
though their drawing updates look clumsy and are slow compared to
asynchronous controls for whatever reason).


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


# 3405fff2a98a18cec5630ab1003f3f0a6193865f 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented private function BWindow::DequeueAll() which reads all pending
messages from the port.
BView::GetMouse() now calls this function if it was called from the window's
thread and thus blocking the message loop.


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


# 25b0ec461d9c522919706a6ddab812e6348696fd 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Now, GetMouse() processes and removes all _UPDATE_ messages, not
just those before the first mouse message.
This should be more correct and look better.


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


# c66f958bb65c43ca4642de7fa1af5a6e445df3b5 18-May-2005 Axel Dörfler <axeld@pinc-software.de>

Corrected BView::GetMouse(), untested though:
- it returned on _UPDATE_ messages without a mouse position
- it no longer calls DispatchMessage() for everything anymore,
however, it will still call BWindow::DispatchMessage() directly
for _UPDATE_ messages
- it didn't care for B_MOUSE_DOWN messages
- it didn't unlock the queue in case it found a message.
(this message actually reflects the differences to r12683 of this
file, but the newer one r12705 was even more broken, but in other
ways)


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


# d73474eee96640dd6044bb4dd472f4b14a9ca92d 18-May-2005 DarkWyrm <darkwyrm@gmail.com>

Removed an infinite recursion bug in StrokePolygon


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


# 898289a3f1cbff6cbd0ed295d82239d9dd2d711d 18-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved a bit BView::GetMouse(). Added more ToDOs

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


# d557af5b96ebfb1995761dc0104cd5cd693e5ff3 16-May-2005 Stephan Aßmus <superstippi@gmx.de>

Fixes to my fixes of BView::MakeFocus(), the previous focus BView needs to be unfocused of course so the derived classes implementation gets called. Simplified BWindow::setFocus(). BView calls FrameResized() and FrameMoved() if it has no parent, I don't know how R5 handles it, but I added a TODO...

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


# ffe7181e7c90325d3474a8d2895fb3729e337580 11-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a TODO item in GetMouse(). I hope to fix the problems
this weekend, if no one does it before.

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


# 587d699c28e9c2234114702b92f46db361625e12 10-May-2005 Stephan Aßmus <superstippi@gmx.de>

It seemed to me that the MakeFocus() implementation was overly complicated and even incorrect (cyclic) if the view in question already had focus.

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


# d6b3de8ccb6fe907aa6c37acfcf61e876dd3b4e4 02-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a todo comment

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


# 9715a3e1bf95ffe0cc6d96ffc1c2588e84477b6b 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

fixed BWindow::MoveXX(), BWindow::ResizeXX() and BView::ConvertToScreen()

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


# 35055741647b0d5b499d0a0a46da5e2172a003fa 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

Added some TODO comments in Window.cpp, improved coordinate conversion in View.cpp. I'm not sure if this really works correctly, I need to write more tests. The scrolling test actually does more of what it is supposed to. At least the scrolling properly follows the mouse now. Missing are the movement of child views, the rebuilding of clipping, and I think that the scrolling needs to be synced to update requests having been fullfilled, or else some parts of the View will be CopyBits()ed which have not been drawn after having been scrolled into view by previous calls to ScrollBy(). Any insights appreciated.

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


# 28930a1240a314a0d984c70368ec83aa5d329272 27-Apr-2005 Stephan Aßmus <superstippi@gmx.de>

small changes and fixes here and there

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


# 642d7ca95ecc94f0033ff7e34fb04d27f4313104 21-Mar-2005 Adi Oanca <adioanca@nowhere.fake>

Implemented BView::SetEventMask()

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


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

'Attach' hooks are now called after the complete tree of children of the BView to be added is completely known by app_server


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


# 61d65d37ea714f816b2024842d4b48152ef07b4a 05-Feb-2005 DarkWyrm <darkwyrm@gmail.com>

GetMouse works properly


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


# 4b5bc014055f17d1d010543e3a4f01d125e7864f 19-Jan-2005 DarkWyrm <darkwyrm@gmail.com>

Send message to create top view immediately to prevent problems with graphics display


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


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

Big cleanup, many parts now fulfill our style guide.
Made instantiation from BMessage more robust.
Fixed some crashing bugs (in ResolveSpecifier() (don't delete a string
that you don't own, in the BView iteration code in deleteView(), ...).


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


# ce3a18db3d40df869654a0e33724f1458b2aab61 16-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Added the forgotten length parameter to DrawString


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


# 11620a7e4c4fc9781e55d2c6fa97d5afb3c0491f 15-Oct-2004 DarkWyrm <darkwyrm@gmail.com>

Fixed the message code for making LineArray calls in the server


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


# c33ef86b1d1c733b21e4ba738c27f66cfc8198ef 17-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Made some tweaks for region, shape, and polygon support


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


# bb32d497e97500c4ce25567db304b18fcbcdfa71 14-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Checking in some fixes to StrokePolygon protocol before I forget they're there


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


# 0ea7755d28ee2a566b3a44b5d5870f26041d2bc5 14-Sep-2004 DarkWyrm <darkwyrm@gmail.com>

Rearranged attachment protocols for Stroke/Fill Arc and Ellipse


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


# 208b62ed865cf4c92e7293cb539dfbefba558d2a 02-Aug-2004 haydentech <haydentech@nowhere.fake>

gcc3 fix


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


# 3ceb31b96aefa3601ccc51e415da557b00155d4f 30-Jul-2004 DarkWyrm <darkwyrm@gmail.com>

Pahtz's changes from PortLink/BSession/PortMessage/PortQueue to BPortLink


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


# 1889be2a4d87264f9978357a98f471dc3514141f 18-Jun-2004 Adi Oanca <adioanca@nowhere.fake>

hidden state was wrongly reported


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


# 2d4c02036e8c128498595f4503b2eb950ccba4ca 03-Apr-2004 Adi Oanca <adioanca@nowhere.fake>

little fixes/updates for the coordinate conversion system


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


# b19660cbd832e58cdecae16215ef57f8a8a29123 12-Jan-2004 Adi Oanca <adioanca@nowhere.fake>

minor fixes to make my version match with the one in CVS


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


# ef94fcd8755d799dde9e7e685cdbb81ab4c1e290 11-Dec-2003 DarkWyrm <darkwyrm@gmail.com>

A couple bugfixes, some comment tweaks, and PortLink conversion for a couple functions


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


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

Replaced _view_attr_ struct with a comparable ViewAttr class - removes a crash


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


# b22232f591b9bfee56d2b8dceb35976cad4340a2 19-Nov-2003 Axel Dörfler <axeld@pinc-software.de>

Implemented the missing BView::IsHidden(BView *lookingFrom), fixed
BView::IsHidden().
Commented a ToDo: item in BView::Hide().


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


# 84e57fc918919a6fbd0bd05e4b898c129f27c48d 10-Nov-2003 haydentech <haydentech@nowhere.fake>

Fix line array bugs, missing breaks, gcc3 incompatibilities, and a few typos


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


# 6e62790567ec6613fb40d637f79d740bccb8a469 24-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

some changes in ConvertXXXYYYY(...) methods.


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


# 2f8db4e46aeeb502c174b541f43cf6b2f08fed62 15-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

* Modified a few lines from BSession::WriteInt32( uint32 ) into WriteUInt32( uint32 )
* in updateCachedState(), now all font attributes are received at once; I realized app_server doesn't need the flag based system. :-)
* added a new method: PrintToStream() - used for debugging.
* now the view state is allocated and initialized in BView::InitData(...)
* modified a few things in addToList(...) 'cause I don't know what was in my head when I wrote it?!
* added _ReservedView2-18() methods because of linker errors.
* a new method used for debugging: PrintTree()
* added debugging messages for a few methods
* TESTED view hierarchy methods like AddChild() and RemoveChild() RemoveSelf() - They WORK! :-)))
* minor but significant :-) ( = instead of == ) change in findView(...)
*** Tree structure is in place now, mirrored on app_server ... and working :-)


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


# eaedbddb8995279967c091f183461cd1b40c2dfe 08-Sep-2003 Adi Oanca <adioanca@nowhere.fake>

added code for appserver sync/communication...


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


# e8cf08732d04b9096f3c4e8e8c5de6743553a604 04-Sep-2003 haydentech <haydentech@nowhere.fake>

gcc3 compile fixes: default arguments in implementation no longer allowed


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


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

added scripting support - stil needs some work, and others...


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


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

WELL... here you go: from 5% to more than 95% !!!!!! :-)


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


# 72f334d12f75edfe0ad825ccc04953b882170591 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes; strip ^M characters from TextView.cpp


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


# 40ceba30d6b162a3a59501900e73f236ccac92ab 03-Jun-2003 haydentech <haydentech@nowhere.fake>

Janitorial work and gcc3-related fixes


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


# ad41204bbcb4e8c42541f73b628af840b1974c87 12-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Filled in a few functions


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


# a159d2c761ad6a7229e02be3c2ef6fd24f202002 08-Mar-2003 DarkWyrm <darkwyrm@gmail.com>

Added a BView stub


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