API Docs: add missing methods of class BView
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2011-2015, 2019 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -7,8 +7,8 @@
|
||||
* Joseph Groover, [email protected]
|
||||
*
|
||||
* Corresponds to:
|
||||
* headers/os/interface/View.h hrev497**
|
||||
* src/kits/interface/View.cpp hrev497**
|
||||
* headers/os/interface/View.h hrev52835
|
||||
* src/kits/interface/View.cpp hrev53446
|
||||
*/
|
||||
|
||||
|
||||
@@ -912,6 +912,15 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual void BView::LayoutChanged()
|
||||
\brief Hook function that is called when the layout if this view, or one of
|
||||
its children, has changed.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::LayoutInvalidated(bool descendants)
|
||||
\brief Hook method called when the layout is invalidated.
|
||||
@@ -1661,7 +1670,18 @@ SetViewColor(Parent()->ViewColor());
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ScrollTo(BPoint where)
|
||||
\fn void BView::ScrollTo(float x, float y)
|
||||
\brief Scroll the view to the point specified by coordinates.
|
||||
|
||||
\param x The x-coordinate to scroll the view to.
|
||||
\param y The y-coordinate to scroll the view to.
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual void BView::ScrollTo(BPoint where)
|
||||
\brief Scroll the view to the point specified by \a where.
|
||||
|
||||
\param where The location to scroll the view to.
|
||||
@@ -1837,6 +1857,70 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetTransform(BAffineTransform transform)
|
||||
\brief Sets a BAffineTransform to transform the coordinate system
|
||||
|
||||
\sa See Transform() to get the current transformations, and TranslateBy(),
|
||||
ScaleBy() and RotateBy() for additional transformation options.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BAffineTransform BView::Transform() const
|
||||
\brief Returns the current BAffineTransform that is applied to the
|
||||
coordinate system
|
||||
|
||||
\sa SetTransform()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::TranslateBy(double x, double y)
|
||||
\brief Translate the current view by coordinates.
|
||||
|
||||
The translation of \a x and \a y are applied to the current transformation,
|
||||
not instead of, so it is an additive action.
|
||||
|
||||
\sa See Transform() to get the current transformations, SetTransform(),
|
||||
ScaleBy() and RotateBy() for additional transformation options.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ScaleBy(double x, double y)
|
||||
\brief Scale the current view by factors \a x and \a y.
|
||||
|
||||
The scaling with factors \a x and \a y are applied to the current
|
||||
transformation, not instead of, so it is an additive action.
|
||||
|
||||
\sa See Transform() to get the current transformations, SetTransform(),
|
||||
TranslateBy() and RotateBy() for additional transformation options.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::RotateBy(double angleRadians)
|
||||
\brief Rotate the current view by \a angleRadians.
|
||||
|
||||
The rotation is applied to the current transformation, not instead of, so
|
||||
it is an additive action.
|
||||
|
||||
\sa See Transform() to get the current transformations, SetTransform(),
|
||||
ScaleBy() and TranslateBy() for additional transformation options.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetScale(float scale) const
|
||||
\brief Sets the scale of the coordinate system the view uses for drawing.
|
||||
@@ -1940,6 +2024,38 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetFillRule(int32 rule)
|
||||
\brief Sets the fill rule for the view.
|
||||
|
||||
A fill rule is a rule that describes an algorithm that is used to find out
|
||||
what the inside of a shape is. The concept comes from the SVG format.
|
||||
|
||||
See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule">
|
||||
the Mozilla documentation on the fill property of SVG</a> for more
|
||||
information.
|
||||
|
||||
\param rule There are two algorithms: the \c B_NONZERO and the
|
||||
\c B_EVEN_ODD algorithm.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn int32 BView::FillRule() const
|
||||
\brief Return the current fill mode.
|
||||
|
||||
See BView::SetFillRule() for more information.
|
||||
|
||||
\returns Returns \c 0 if no fill rule is applied, \c B_EVEN_ODD when the
|
||||
even-odd algorithm is applied, and \c B_NONZERO if the nonzero
|
||||
algorithm is applied.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetDrawingMode(drawing_mode mode)
|
||||
\brief Sets the drawing mode of the view.
|
||||
@@ -2487,6 +2603,54 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ClipToRect(BRect rect)
|
||||
\brief Intersects the current clipping region of the view with the pixels
|
||||
of \a rect.
|
||||
|
||||
\param rect The BRect that describes the rectangle to intersect with.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ClipToInverseRect(BRect rect)
|
||||
\brief Intersects the current clipping region of the view with the pixels
|
||||
outside of \a rect.
|
||||
|
||||
\param rect The BRect that describes the rectangle to intersect with.
|
||||
|
||||
\see ClipToRect()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ClipToShape(BShape* shape)
|
||||
\brief Intersects the current clipping region of the view with the pixels
|
||||
of \a shape.
|
||||
|
||||
\param shape The BShape that describes the area to intersect with.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::ClipToInverseShape(BShape* shape)
|
||||
\brief Intersects the current clipping region of the view with the pixels
|
||||
outside of \a shape.
|
||||
|
||||
\param shape The BShape that describes the area to intersect with.
|
||||
|
||||
\see ClipToShape()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::GetClippingRegion(BRegion* region) const
|
||||
\brief Fill out \a region with the view's clipping region.
|
||||
@@ -3814,6 +3978,43 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::BeginLayer(uint8 opacity)
|
||||
\brief Begins a drawing layer.
|
||||
|
||||
This feature of BView allows you to create a separate layer, draw on it,
|
||||
and blend it in with the rest of the view with a given \a opacity.
|
||||
Internally, the method creates a new drawing buffer, that you can draw on
|
||||
using the methods of BView. After finishing your layer, you call EndLayer()
|
||||
to apply the \a opacity to the layer, and blend it in with the existing
|
||||
drawing.
|
||||
|
||||
You can nest layers, meaning you can call this method while drawing a
|
||||
layer, to create a sublayer. The layers are mixed and blended in order.
|
||||
|
||||
This work was done to support drawing for WebKit.
|
||||
|
||||
\sa EndLayer()
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::EndLayer()
|
||||
\brief Finish a layer and blend it in with the view.
|
||||
|
||||
This is the counterpart to BeginLayer(). You can nest multiple layer. If
|
||||
this method is called and the current layer is nested in another layer, the
|
||||
current layer is applied to the layer above. If this is the only layer, it
|
||||
will directly blend in to the main view.
|
||||
|
||||
\sa BeginLayer()
|
||||
|
||||
\since Haiku R`
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::Invalidate(BRect invalRect)
|
||||
\brief Sends a message to App Server to redraw the portion of the view
|
||||
@@ -4186,6 +4387,16 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual BAlignment BView::LayoutAlignment()
|
||||
\brief Return the current BAlignemnt of the view.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetExplicitMinSize(BSize size)
|
||||
\brief Set this view's min size, to be used by MinSize().
|
||||
@@ -4222,6 +4433,19 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetExplicitSize(BSize size)
|
||||
\brief Set this view's size.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
This is a convenience function that calls both SetExplicitMinSize()
|
||||
and SetExplicitMaxSize() with the \a size parameter.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetExplicitAlignment(BAlignment alignment)
|
||||
\brief Set this view's alignment, to be used by Alignment().
|
||||
@@ -4234,6 +4458,86 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BSize BView::ExplicitMinSize() const
|
||||
\brief Returns the explicit minimum size.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
This returns the value that was set by SetExplicitMinSize().
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BSize BView::ExplicitMaxSize() const
|
||||
\brief Returns the explicit maximum size.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
This returns the value that was set by SetExplicitMaxSize().
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BSize BView::ExplicitPreferredSize() const
|
||||
\brief Returns the explicit preferred size.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
This returns the value that was set by SetExplicitPreferredSize().
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BSize BView::ExplicitAlignment() const
|
||||
\brief Returns the explicit alignment size.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
This returns the value that was set by SetExplicitAlignment().
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn bool BView::HasHeightForWidth()
|
||||
\brief Returns whether the layout of the view can calculate a height for a
|
||||
given width.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
Use GetHeightForWidth() to actually get the preferred size.
|
||||
|
||||
\returns \c true if the height values can be calculated, \c false if they
|
||||
cannot.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn virtual void BView::GetHeightForWidth(float width, float* min,
|
||||
float* max, float* preferred)
|
||||
\brief Returns the min, max and preferred height for a given width.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
\param[in] width The width you want the height to be calculated for.
|
||||
\param[out] min The minimum height that the layout will request.
|
||||
\param[out] max The maximum height that the layout will request.
|
||||
\param[out] preferred The preferred height for this \a width.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::SetLayout(BLayout* layout)
|
||||
\brief Sets the \a layout of the view.
|
||||
@@ -4306,7 +4610,7 @@ SetViewColor(Parent()->ViewColor());
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
\brief Returns \c true if the layout is valid, \c false otherwise.
|
||||
\returns Returns \c true if the layout is valid, \c false otherwise.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
@@ -4329,6 +4633,16 @@ SetViewColor(Parent()->ViewColor());
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BLayoutContext* BView::LayoutContext() const
|
||||
\brief Returns the BLayoutContext for this View.
|
||||
|
||||
\remark This is only meaningful if the view is part of a BLayout.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BView::Layout(bool force)
|
||||
\brief Layout the view.
|
||||
|
||||
Reference in New Issue
Block a user