Commit Graph

146 Commits

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

Fixes #14871.

Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:04:13 +00:00
Augustin Cavalier 5b0e5c0ac6 BScrollView: Automatically update the scrollbar proportions in layout mode.
Since we know what size the target view is / wants to be, we can automatically
set the range, steps, and proportion trivially. In non-layout mode, we retain
the old behavior. Applications or views that need custom scrolling behavior almost
certainly will be using BScrollBars directly and not this, so this should not be
"wasted computation" in pretty much any case.

Greatly improves the appearance and UX of the default case of a layouted
view inside a BScrollView.

Change-Id: Ia6ff6ee14df96799c579e15d274fd4c849675577
Reviewed-on: https://review.haiku-os.org/c/892
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-24 18:52:39 +00:00
Augustin Cavalier ad7cab8751 Haiku Book: Update BFont docs. 2019-01-23 23:10:33 -05:00
Augustin Cavalier c3ac0a72a6 BMenuItem: Remove ourselves from the super menu on destruct.
This fixes the (intermittently) crashing test added in the previous commit,
and should also fix #12024 and #14348.

Note that this is a slight behavioral departure from BeOS, though since
BeOS crashed when this was done previously, it shouldn't cause any
other problems.

Change-Id: I90b6132ff7741b8d6cb601375a9b11fc3ffacb40
Reviewed-on: https://review.haiku-os.org/541
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-12 01:15:48 +00:00
Alexander G. M. Smith f12d3b3477 Update BListItem::SetHeight() docs with selection box warning.
The cached top coordinate of each BListItem isn't updated when you
change the height of the item, leading to confusing highlighting and
incorrect mouse clicks.  Rather than fixing it, this just documents a
workaround or two to force an update of the cached coordinates.
2018-02-17 00:26:34 +00:00
John Scipione 1061001b46 API Docs: minor brief description updates 2017-11-10 15:24:34 -08:00
John Scipione 9e72aeccc5 LayoutBuilder docs: document missing paramters 2017-11-10 15:11:10 -08:00
John Scipione a960a58cd7 Docs: remove ; causing it not to find copydetails 2017-11-10 15:00:05 -08:00
John Scipione d4a640ec2e Replace pt0 and pt1 with start and end 2017-11-09 13:58:35 -08:00
John Scipione 44b874666a API docs: it's => its fix 2017-11-09 13:23:55 -08:00
Adrien Destugues 05d9795db3 Add some docs for BLayoutBuilder::Grid. 2017-08-13 09:05:29 +02:00
Augustin Cavalier 75b219d35a ReadMe & docs: The Haiku Book has moved to www.haiku-os.org/docs/api. 2017-02-01 11:22:01 -05:00
Augustin Cavalier 9dc2625de0 docs/user: Remove duplicate "ingroup interface" from layout docs.
Since the "Layout" group is a member of the "Interface" group,
Doxygen automatically adds the "Interface" group to all pages
in the "Layout" group, meaning that having an explicit "ingroup Interface"
created duplicate group tags.
2017-01-28 13:22:53 -05:00
Augustin Cavalier 3d7aa45e7a docs/user: Fix duplicate and erroneous BTabView class definition. 2017-01-28 13:19:14 -05:00
John Scipione e1304871bb Revert "BWindow: CenterOnScreen a bit above center"
This reverts commit a5be1832cc.
2017-01-01 12:25:05 -08:00
John Scipione a5be1832cc BWindow: CenterOnScreen a bit above center
BWindow docs: Document changes to CenterOnScreen()

https://68.media.tumblr.com/d8dff7a17b9d90b41e32c5a2a0312513/tumblr_oj2wg1tmKs1r0f0hfo1_1280.png

Will revert if not appreciated.
2016-12-31 18:06:55 -08:00
John Scipione 24cb14bc3d BTabView: Style fixes
Fix misleading indentation

remove extra newline

just a newline

selTabRect => selectedTabRect
2016-04-29 14:31:31 -07:00
John Scipione 3490eda827 ControlLook: Rename border param to borderStyle
border vs. borders is confusing.

BTabView: Rename border param to borderStyle

BTabView docs: rename border param to borderStyle

enumerate border styles in docs
2016-04-29 14:31:05 -07:00
John Scipione c5fe2948ba BColorControl docs: pointer style
(really minor change that doesn't affect output)
2016-03-12 19:10:39 -08:00
John Scipione 8db20d05cb BColorControl: Standardize on useOffscreen
...instead of doubleBuffered for the flag that specifies whether or not to
draw using an offscreen buffer.

Also remove the (not currently used) text from the docs since the parameter
is being used.
2016-03-12 19:10:38 -08:00
looncraz 7f9368cae5 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>
2016-01-04 06:48:22 -05:00
Augustin Cavalier 1ea54e567e docs/user: BAlert: Fix incorrect ::TextView() docs.
TextView() returns *the* BTextView the BAlert is using, not a new
TextView with the contents of the BAlert (which is what this seemed to
imply).
2015-08-26 14:42:11 -04:00
Augustin Cavalier 4d556706b5 docs/user: s/http:/https:/. 2015-07-21 18:24:37 -04:00
Augustin Cavalier 8868ca02ed docs/user: TabView: Fix erroneous descriptions of Select() and Deselect(). 2015-07-14 11:26:39 -04:00
John Scipione 49a56113ef Fix typo: on => one 2015-07-07 16:22:27 -07:00
John Scipione 046d20afd1 BScrollView::ScrollBar return val docs past tense 2015-07-07 16:22:25 -07:00
John Scipione 5a2ed95c23 Clarify ScrollView::ScrollBar() direction parameter in docs 2015-07-07 16:22:23 -07:00
John Scipione c466b4daeb IK: Change orientation param name to direction
for ScrollView::ScrollBar in ScrollView.h and the documentation. This makes
the parameter name consisent and fixes a doxygen warning.
2015-07-07 16:22:22 -07:00
Augustin Cavalier 93c67e52f3 docs/user: Add/update some '\sa's. 2015-07-07 11:57:42 -04:00
Augustin Cavalier 0426b7e7e8 docs/user: Fix documentation of BTab::SetLabel. 2015-07-07 11:57:40 -04:00
Michael Lotz 0bba9b9752 Fix some typos and whitespace in BLayout docs. 2015-04-15 00:30:55 +02:00
Augustin Cavalier 906283b6d6 Haiku Book: Make the layout introduction somewhat more professional. 2015-03-25 11:47:29 -04:00
Augustin Cavalier c86c9e29d3 ScrollView docs: make parameter name match the header file. 2015-02-27 02:39:07 -05:00
Augustin Cavalier aa01bfe571 Haiku Book: fix some typos.
The possessive form of "it" is "its", not "it's" ("it's" is just
shorthand for "it is").

Closes #11712.
2015-02-11 19:04:38 -05:00
John Scipione d04b3b772c Remove trailing . from titles 2015-01-27 19:15:11 -05:00
Adrien Destugues 6aa4d138bf LayoutBuilder: document C++ method chaining behavior
Fixes #8515.
2015-01-07 17:29:35 +01:00
Augustin Cavalier c09cca4a79 BSize docs: fix description of B_SIZE_UNSET.
Thanks Ingo for noticing!
2015-01-07 15:34:49 +01:00
Augustin Cavalier ab00c90d87 Create docs for BSize class.
Fixes #11713.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
2015-01-07 08:29:33 +01:00
John Scipione 4536c6033b Update BToolTip class docs, added credit.
with remarks from Axel and PulkoMandy, thanks guys.
2015-01-02 18:15:25 -05:00
John Scipione d87c6913ec Add preliminary BToolTip docs 2014-12-23 17:32:05 -05:00
John Scipione d3c4833514 Some more small documentation fixes 2014-12-19 19:58:14 -05:00
John Scipione 5ebeb710ab B_WIDTH_FROM_LABEL was not available until BeOS R5 2014-12-19 19:51:46 -05:00
John Scipione ce3da8de9f Add docs for BTab and BTabView 2014-12-19 19:51:44 -05:00
John Scipione a28ddb79ec A few minor fixes to BTextControl docs 2014-12-19 19:51:39 -05:00
John Scipione d78a330deb Add BTextControl docs 2014-12-18 20:46:30 -05:00
John Scipione 95faf2ce54 Minor doc changes 2014-12-18 20:45:25 -05:00
John Scipione a03f66b7fb Fix a few errors in the nascent BOptionPopUp docs 2014-12-15 21:14:47 -05:00
Adrien Destugues 244f97dc27 LayoutItem: better documentation for SetExplicitMinSize.
This is a bit counter-intuitive, at least to me, as forcing the minimal
size can lead to the item being smaller than it would otherwise.
2014-12-15 10:46:11 +01:00
Adrien Destugues 9f9d972f79 Minimal documentation for BOptionPopUp.
This was available in R5 but somehow went missing from our version of
the Be Book (it is documented in the release notes in Tycom Systems
version). Document the more important methods of it, at least.
2014-12-08 14:38:09 +01:00
John Scipione 459706ee4d Update BView and BStringView docs
... based on Adrien's suggestions.

* Add \warning back to BView::ResizeToPreferred(), add \remark to highlight
  methods only appropriate to use as part of a BLayout.
* Clarify BView::SetFont() method and refer to BFont docs.
* Clarify BStringView::SetText(), Text(), and Draw().
* add field descriptions for BStringView::Instantiate().
2014-12-05 20:35:40 -05:00