and remove TExpandoMenuBar as a friend class to BMenu hack.
In Deskbar, call the newly added MenuPrivate::SetLayout() method instead.
This is a much cleaner way to implement this, thanks Stefano Ceccherini
for the tip!
Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.
Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.
When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.
Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.
Fixes#9350
* 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.
* Added new truncation mode B_NO_TRUNCATION.
* The Truncation()/SetTruncation() methods itself are Dano-compatible,
however, there was no B_NO_TRUNCATION.
* There is no need to delay this to AllAttached
* Apps may want to override the SetDivider, and doing it as late as
AllAttached can be annoying.
Fixes#10734.
* We archive views using "managed" archives, and the children are not
attached in the BView(BMessage*) constructor, but later. So it's not
possible to find the target and scrollbars in the constructor of
BScrollView.
* Make BScrollView override AllUnarchived and find the target and
scrollbars again there. The code is slightly different as there is no
guarantee that the first child will be the target in that case. The
existing code in the constructor is preserved for non-managed archives.
* MarkAsInvalid is used to enable or disable the mark
* The B_INVALID BControlLook flag is used
* invalid BTextControls are drawn with a red border.
* You ar encouraged to let the user know more precisely what's wrong, by
showing an helpful error message next to the control or in a tooltip.
Double checked BeOS R5 & Haiku R1/A4 and BTextView should be 356
bytes, somewhere since then we've added 4 bytes. So, this commit
reduces the class size from 360 back to 356 by removing 1 reserved
int32 (instead of 2).
I believe the class size changed in hrev46798 as a result of adding
2 bools (1 byte each padded out to 4 bytes).
Sorry for the noise.
In hrev46796 I added two new private methods: _PreviousLineStart(),
and _NextLineEnd() which increased the size of the class breaking
binary compatability because I forgot to decrement the reserved array.
This commit decrements the reserved array restoring the class size
to the original size fixing the binary compat issue.
Thanks Axel for noticing.
The order is updated so the virtual methods appear in the same order
that they did in BeOS R5 with methods new to Haiku added to the bottom.
Perform() moves up, all other methods move below GetDragParameters(),
the last virtual method in BeOS R5's TextView.h.
Accidentally renamed these in the header, rename them back to
match the cpp file. These param names might not be very good but
they match the struct variable names. They are private methods
anyway. No functional change intended in either commit.
No functional changes intended.
* Updated copyright information.
* Reduced doxygen documentation down to a helpful summary
in a regular comment, the documentation has been moved into
the Haiku Book.
* Some parameter renaming for consistency and clarity.
* A few other style fixes.
* Nothing ever reads fTargetName in the scrollbar code, so remove the
field.
* Frees one reserved slot, and a little memory, as the target name was
copied with strdup.
Create and use BLayoutUtils::AlignOnRect() to position the button label
in BControlLook::DrawLabel().
AlignOnRect(), unlike AlignInFrame(), provides the possibility to return
a rectangle with dimensions greater than the available size.
Add some comments above the methods in LayoutUtils that indicate such.
Also update copyright headers in LayoutUtils and ControlLook
* 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.
inline const floats are a gcc extension. It is possible to do it in a
standard way in C++11 using constexpr, but then gcc will reject the
previously accepted nonstandard syntax.
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.
Make Cmd+Left and Cmd+Right work the same as Option+Left and
Option+Right, that is, they do word-wise navigation.
Make Option+Up go to beginning of paragraph and Option+Down go to end
of paragraph like Cmd+Left and Cmd+Right used to.
Unfortunately option shortcuts are currently eaten by S&T until #9431
gets fixed.
* Command+Left goes to beginning of line, ignoring softwrap
* Command+Right goes to the end of line, ignoring softwrap
* Home goes to beginning of line, accounting for softwrap
* End goes to end of line, accounting for softwrap
* Option+Left goes to previous word
* Option+Right goes to next word
* Command+Home and Command+Up go to beginning of document
* Command+End and Command+Down go to end of document
Shift with any of the above also selects the text.
This is similar to how the text editor Eddie works.
* Add behavior constant B_POP_UP_BEHAVIOR which adds a pop-up marker
to the button (similar to that of BMenuField).
* Add methods [Set]PopUpMessage(). To set/get the the message that is
sent to the button's target when the pop-up marker is clicked.