Commit Graph

254 Commits

Author SHA1 Message Date
John Scipione db1ef05aef BShape: Style fixes for docs 2014-07-14 19:02:44 -04:00
Adrien Destugues 9576c4b742 BRegion scaling: fix semantics to avoid holes/overlaps
Thanks to Stippi for pointing this out.
2014-06-19 19:23:29 +02:00
Adrien Destugues 669ac9d6f5 BRegion: add ScaleBy method.
* Is there a reason to not have it?
2014-06-19 18:05:14 +02:00
John Scipione 9ce450b9c2 AboutWindow: Move to Interface Kit (still private) 2014-03-25 14:17:19 -04:00
Adrien Destugues eb43166326 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.
2014-03-11 17:27:42 +01:00
John Scipione 14aa801ae9 Update DecorInfo to scan for decorators
Look in system and user packaged and non-packaged decorator directories.
2014-02-20 19:31:49 -05:00
Stephan Aßmus a6db6bd40f 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.
2014-02-04 22:53:06 +01:00
Ingo Weinhold f0c3101151 BControl: Move icon code to separate class BIcon 2013-12-22 15:17:53 +01:00
Stephan Aßmus ed6f171aa6 BColumnListView: Enable invalidating rows, fix SetField()
* Seems like there was no easy way to simply invalidate
   a given BRow. Introduced BColumnListView::InvalidateRow().
 * BRow::SetField() tried to invalidate the row, but invalidated
   the listview instead of the BOutlineView responsible for
   drawing the list contents. Use the new InvaalidateRow().
2013-09-17 14:42:03 +02:00
Ingo Weinhold cf70d345b2 Merge remote-tracking branch 'haiku/master' into package-management
This reverts 8f7f28a7c3 (OpenGL: Upgrade
to
Mesa 9.2).

Conflicts:
	build/jam/BuildFeatures
	build/jam/HaikuImage
	build/jam/OptionalPackages
	build/scripts/build_cross_tools_gcc4
	src/add-ons/opengl/swpipe/Jamfile
	src/apps/diskusage/Jamfile
	src/kits/tracker/ContainerWindow.cpp
	src/kits/tracker/DeskWindow.cpp
	src/kits/tracker/Jamfile
2013-09-13 01:02:28 +02:00
Ingo Weinhold 88f12ad84f Add private BViewPort class
* It simplifies putting regular layout-aware views or layout items into
  a BScrollView.
* Not quite complete yet: Height-for-width support is missing, but that
  also requires fixing BScrollView in this respect. Scroll bar auto-hide
  support would be nice as well.
2013-09-11 04:51:03 +02:00
John Scipione 3dd9ff2b5d BMCMenuBar: Refactor MakeFocus()
Get rid of unused fRunner variable.

It is very basic now, it just works.

Also, renamed msg to message in MessageReceived() and
declared MakeFocus() above it (alphabetically).
2013-08-25 00:09:28 -04:00
John Scipione 408c0ee4cd MenuField: enable/disable the menu field when...
the child menu bar or the child menu bar's menu is enabled/disabled.

This means that there is just one status we have to check, the menu
fields, and the child menus agree. This change takes practical form
in the Backgrounds preflet which disables the placement menu when
the image is set to "None", but, only the menu got disabled and not the
parent menu field so the label was erroneously still drawn as enabled.
2013-08-20 18:15:13 -04:00
John Scipione 1c95f72222 Don't set MaxContentWidth on the menu bar of a BMenuField
Fixes #9816

It is no longer necessary, or even desirable for us to set the max
content width of the menu bar of a BMenuField now that BMenuItem
truncation and BMenuField sizing are working.

The user may, however, wish to set the max content width of the menu
bar of a BMenuField themselves like so:

menuField->MenuBar()->SetMaxContentWidth(width);

and the Interface Kit will automatically deduct the left and right
margins from the width including the space used by the drop down arrow.
2013-06-07 03:25:36 -04:00
John Scipione ca3a1c0451 BMenuField: If fixed size always set max content width
When you resize, also set max content width.

Create a SetMaxContentWidth() method that includes the margins.
2013-05-30 00:05:17 -04:00
John Scipione 92c12506ac Move kMinMenuBarWidth to MenuField.cpp 2013-05-30 00:05:16 -04:00
John Scipione a1cf3ead5f Resize menu field if below minimum width in auto-size mode
... cancelling the normal item truncation behavior.
This funcationality comes from BeOS R5, we need to reproduce it for
backwards compat. KeymapSwitcher depends on it at least.

Minimum width is 20px, was set in last commit, comes from BeOS R5.
2013-05-30 00:05:16 -04:00
John Scipione 6031e62420 Move constants to BMCPrivate.h and refactor
We use these constants in both MenuField.cpp and BMCPrivate.cpp

Incorporate kMarginWidth into kPopUpIndicatorWidth.

A small code simplication in FrameResized() along with replacing bare numbers
with magic constants.
2013-05-30 00:05:15 -04:00
John Scipione e28ba280de BMCPrivate: Cleanup
Remove no longer needed header includes, most that I recently added
a few that were already there but just aren't needed anymore. Don't
use BPrivate::MenuPrivate namespace.
2013-05-06 18:29:34 -04:00
John Scipione c1a7e89fc2 Put the label truncation code back in BMenuItem.
Just a few commits ago I moved the label truncation code out of
BMenuItem and into BMCMenuBar because the truncation had to happen
outside of BMenuItem. Turns out, that wasn't true so I'm moving the
label truncation back into BMenuItem and removing the _DrawItems()
method from BMCMenuBar.

Note that the code is not a copy of what was there before, but, the
updated version I created for BMCMenuBar. The main difference is that
I use menuPrivate.Padding() instead of GetItemMargins() and I always
use the width of the parent menu frame instead of using fBounds even
if the state is not MENU_STATE_CLOSED. These are changes needed for
BMCMenuBar but should work just as well for a regular BMenu.
2013-05-06 17:55:33 -04:00
John Scipione c333966291 Draw truncated menu label in BMCPrivate, fixes #9735
...instead of in BMenuItem and remove the truncation code from BMenuItem.

The label truncation code cannot work in BMenuItem because the super
menu helpfully resizes itself to fit the menu item. So, instead we do the label
truncation in BMCPrivate making sure that BMenuItem there can't expand the
BMCMenuBar because we set the width to fMenuField->_MenuBarWidth()
explicity.

Note that this only truncates the label in BMCMenuField, i.e. the label inside
the menufield, it does nothing to the labels of the menu items in the attached
BMenu or BPopUpMenu which is exactly what we want.
2013-05-06 17:15:20 -04:00
John Scipione 2bf1592a70 Rework layout-enabled contructor for BMCMenuBar
Was passing !fixedSize into the view flags of BMenuBar, which made no sense.
Stop doing that, set fixedSize to true instead.

Remove the fixedSize parameter from this contructor, it's too late for that.
2013-05-06 17:15:19 -04:00
John Scipione d5c51ba676 Update header comments 2013-05-06 17:15:18 -04:00
Rene Gollent 69d85497fd Fix update issues in BStringColumn.
In some cases, BStringColumn wouldn't properly detect that an update was
needed, and would consequently fail to truncate a string as needed with
a column resize.
2013-05-04 21:17:47 -04:00
Jessica Hamilton 4898c615d6 BMenu: scroll marked item into view when menu has scrollers attached.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2013-05-03 21:10:51 +02:00
Tri-Edge AI 49126a0e9b Added ResourceEdit and modified BColumnListView, BRow and BMenu.
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-02-27 22:08:46 -05:00
Rene Gollent 902a98ad83 Fix #8753.
- Store whether or not the use of the horizontal scrollbar is desired
  on the class itself. If the CLV was set to use the horizontal scrollbar,
  and then asked to lay itself out while hidden, it would incorrectly assume
  the horizontal scrollbar wasn't in use, and consequently repositioned its
  views such that the horizontal scrollbar and outline view overlapped.
2012-07-20 19:35:21 -04:00
John Scipione 7f7f5eac6e Refactor ToolTipManager a bit.
* Change ShowTip() point parameter name to where.
* Add a parameterless ResetWindowFrame() overload that get's the current
  where and calls ResetWindowFrame(BPoint where) which does the actual
  work. FrameResized() calls this parameterless ResetWindowFrame()
  method instead of doing the work in that method. This is functionaly
  the same but allows me to call the parameterless ResetWindowFrame()
  elsewhere.
2012-05-02 23:51:49 -04:00
Axel Dörfler 2f2f3fa042 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.
2012-04-28 22:14:03 +02:00
Oliver Tappe 248f2283dd Final part of cleanup in Catalog.h.
* move versions of the B_TRANSLATE_...-macros used during collecting
  of catalog keys to a specific header file, which will only be picked
  up when running collectcatkeys
* fix a couple of build problems during the preprocessing of the libbe-
  sources when extracting catalog keys, all due to private headers not
  being found
* move ZombieReplicantView.h from kits/interface to
  headers/private/interface, as this way it can be picked up when
  building the libbe catalog
2012-04-16 00:04:41 +02:00
czeidler c7413cf90c Forgot this file. 2012-01-22 15:30:18 +13:00
czeidler 577f58763b Make it possible to reconnect BBitmap to the app_server.
* maintain a list of all BBitmaps
* refactor the client memory allocator class, its possible now to just clone existing client area
2012-01-22 15:30:15 +13:00
Alex Wilson a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
Michael Lotz dd26f81c56 Add an UTF8NextCharLen() version that takes a string length.
This one works with non-terminated strings that we may need to handle.
It also validates that the sequence is valid UTF-8 so it results in
the same behaviour as the version that is used when converting to
codes (syncing the enumeration and drawing behaviour).
2011-12-06 19:09:56 +01:00
John Scipione 8abe72fb66 Changes the menu key bitmap from CTL to CTRL and SHFT to SHIFT.
This is coming from but does not close #7967

Adds a new (currently unused) Menu key bitmap.

Instead of having a single AltAsCommandKey() method the menus now
show the correct bitmap when you switch between your control,
windows/option, and alt/command keys. This is really not flushed
out yet since it only works when you switch those keys and not
other combinations like say switching the control and caps lock
keys but it is a step in the right direction.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-07 01:46:42 +00:00
Alex Wilson 61eb1f1d19 Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around. 2011-10-28 14:16:49 -06:00
Alex Wilson bd97b9adba 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. 2011-10-28 14:16:07 -06:00
Alex Wilson edb4c8244c Add a method to BView::Private that calls BView::_RemoveSelf().
Add a struct to kits/interface/Layout.cpp that uses BView::Private to
provide RAII mechanics for the removal of views (calling
BView::Private::RemoveSelf()).
Use the new struct to simplify BLayout::AddItem().
2011-10-28 14:16:03 -06:00
Clemens Zeidler 418f391fb1 Fixes #7796. The decorator add-on is unloaded when not needed anymore. Avoid assigning offscreen windows a window behaviour (which lives in an add-on). When loading another add-on the offscreen window was still pointing to an invalid window behaviour.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-25 03:32:14 +00:00
Stephan Aßmus e750d35cbf Applied patch by Pete Goodeve from ticket #7182. It improves
keyboard navigation/tracking of BMenus and BMenuBars, although
many issues remain.
Should not yet go into alpha, since there is one issue which
I am not sure if it's not a regression. The issue is that
invoking a menu item with Enter for the first time seems to
have no effect, while invoking it subsequently works as
expected. I don't know, yet, if that's a regression of this patch.
In any case, it's better than before, thanks, Pete!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-07 12:46:00 +00:00
Axel Dörfler c329950ca7 * Put the decor stuff in the BPrivate namespace, as it should have been from
the beginning.
* Added header for the get_decorator() functions and friends.
* Minor coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-21 18:12:25 +00:00
Stephan Aßmus b46615c55a Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-19 15:25:54 +00:00
Jonas Sundström 73f559a4c7 Move IconView from kits/interface to kits/shared.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-13 08:22:03 +00:00
Jonas Sundström 4b42867495 Make DataTranslations' IconView available privately in the interface kit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-04-12 20:38:09 +00:00
Clemens Zeidler 9ff327dea3 - Make MessageForListener a bit more flexible, passing a fix ServerLink is sometimes not enough and a separate sender and receiver is needed.
- Add communication part to restore and save S&T groups.
- Fix call of GetDecoratorSettings listener hook.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 06:47:20 +00:00
Clemens Zeidler 6acb83bf61 Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 04:34:18 +00:00
Clemens Zeidler ee9246d5f5 Remove unused communication port, pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 23:23:02 +00:00
Clemens Zeidler 94892dc091 Make arguments const if appropriated. Style issues and port_id error check. Thanks Stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 22:54:00 +00:00
Clemens Zeidler 7640bbb6cd Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:35:16 +00:00
Clemens Zeidler 488c90defe Fix style issues, thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:15:13 +00:00