Commit Graph

666 Commits

Author SHA1 Message Date
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 eee4243d35 De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout. 2011-10-28 14:16:43 -06:00
Alex Wilson b38ea98f52 Devirtualize BLayout::InvalidateLayout(), add a protected hook BLayout::DoLayout(). This will allow for much better control over the propagation of layout invalidations, and therefore cleaner, more optimal code. 2011-10-28 14:16:39 -06:00
Alex Wilson b8725ee37e De-virtualize BLayout::Relayout(). I think this was virtual only by accident. 2011-10-28 14:16:28 -06:00
Alex Wilson 4e0131f51b Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation. 2011-10-28 14:16:25 -06:00
Alex Wilson fa01d08496 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.
2011-10-28 14:16:16 -06:00
Oliver Tappe 7ba0381def * add protected accessor for baseline offset to StringItem, as that value is of
interest to derived classes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-21 17:17:13 +00:00
Adrien Destugues ca2c99c2ca * Add BIconUtils documentation to the Haiku Book
* Remove comments from the header itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-09 19:31:46 +00:00
Clemens Zeidler c0dad949ee BRect's OffsetBy takes a BPoint. Add a similar BRegion method to be more consistent. This one takes a const reference instead a complete BPoint object.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-24 23:53:12 +00:00
Alex Wilson 8ef1944247 Add new constructors to BLayoutBuilder::Grid and BLayoutBuilder::Group that accept a plain old BView, and give it a new layout. These are very similar to the constructors that are already in place taking a BWindow. This solves a problem I have come across a few times, where one wants to build a layout in something like a BBox. Althought there is currently a way to do it with the layout builders, this is prettier.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 01:12:29 +00:00
Alex Wilson d90a465e08 Change the value of other spacing/inset constants so that B_USE_DEFAULT_SPACING has its own unique value. Also adjust BControlLook::ComposeSpacing() to reflect this.
closes #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 00:37:39 +00:00
Alex Wilson 813147df83 * Add new SetInsets() methods to BTwoDimensionalLayout, BSplitView
* Also add equivalent methods to the layout builders in LayoutBuilder.h
* BSplitView now calls BControlLook::ComposeSpacing(), instead of BSplitLayout
* part of #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-09 20:58:52 +00:00
Alex Wilson 6648dd3cf1 * Add new spacing/inset constants for the layout API. For now, leave B_USE_DEFAULT_SPACING, but this will go soon.
* Rename BControlLook::ComposeItemSpacing() to ComposeSpacing(), and extend it to handle the new constants.
* Adjust users of BControlLook::ComposeItemSpacing() accordingly.
* part of #7447


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-07 20:40:56 +00:00
Axel Dörfler 48ae3e3808 * Followed Ingo's suggestion, and added a BWindow::Layout() method.
* Changed ShowImage to use that function.
+alpha in case Ingo gives his okay :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 22:21:59 +00:00
Axel Dörfler 4296233f0e * Made the messed up BMessage* constructors private - since it only affects the
layout API, we probably can just phase it out after a while.
* Introduced new constructors, and added missing flags to one of them to make
  it more convenient to use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 20:04:55 +00:00
Siarzhuk Zharski 4115645af6 Localization of some UI parts:
- context menu of the replicant dragger. Fixes #7363;
- default <empty> menu placeholder. Fixes #7072;
- other messages used in PrintJob, Dragger and ZombieReplicantView classes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-17 20:25:44 +00:00
Jonas Sundström 2d4087c90a Cleanup. Addition of constructor BRect(float side), allowing e.g. BRect(B_LARGE_ICON).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-17 01:08:01 +00:00
Stephan Aßmus 4153964a10 Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 09:12:38 +00:00
Ryan Leavengood 91f0846f8a Add a default right click context menu to BTextView.
This fixes #7022 and is mostly based on the patch attached to that ticket, with
these changes:
- The patch was adding this to the private _TextInput_ class, not BTextView.
- The patch had a Clear menu item too. I removed that due to the different
semantics between Clear in a BTextView and in a TextInput. The former just
clears the selection where the latter clears the whole view.

We could later add a virtual callback for adding menu items to this context
menu which could be used to add Clear with the two semantics in each class
(this is mainly needed for the enabling logic...each class could handle a clear
message in its own way.) This callback could also obviously be used for other
things, like a spell-check menu or whatever an application would want to add.
Since BTextView has 10 free virtual slots it seems reasonable to add.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-28 05:09:52 +00:00
Axel Dörfler 24a77ea0be * Added ItemAt() method that accepts column and row.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-08 16:14:13 +00:00
Stephan Aßmus d1b6305cd9 Forward important properties and setters of the private BSplitLayout
in the BSplitView class, related to getting and setting item weights
programatically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-01 12:08:49 +00:00
Ingo Weinhold a9e89a7325 Also made LayoutContext() const.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 21:53:25 +00:00
Ingo Weinhold df7309870f Made AncestorsVisible() const.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 21:26:54 +00:00
Ingo Weinhold 00e694dce3 Aligned the second MoveIntoFrame() parameter name with the implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 17:49:09 +00:00
Ingo Weinhold 6bb10e965d Added a layout builder for menus.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 14:29:37 +00:00
Ingo Weinhold 58bee54422 Renamed _CheckSizeLimits() to UpdateSizeLimits() and made it public.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 11:38:45 +00:00
Ingo Weinhold 39c1cc127a Added MoveIntoFrame() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 11:29:52 +00:00
Ingo Weinhold e4acf496c6 BLayoutBuilder::Grid::{AddMenuField,AddTextControl}(): Use separate column
count parameters for label and control view. Most likely when one doesn't want
to use the default value (1), the label and the view will cover a different
amount of columns.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-17 16:29:06 +00:00
Stephan Aßmus e6cb8eb4c6 * Reuse the check for changed location which decides whether
to Invoke() in MouseUp() in the code path for keyboard control.
   Should fix ticket #6792, but I have not actually tested it.
 * Don't post notification values in KeyDown() when the value did
   not change because it was constrained between min and max values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-06 12:43:24 +00:00
Stephan Aßmus 76d9e05341 Introduce a new flag for drawing BBitmaps, B_WAIT_FOR_RETRACE
which triggers waiting on the retrace semaphore in app_server
just before drawing the bitmap. This potentially removes any
additional delay when doing this client side. Completely untested. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 22:22:45 +00:00
Philippe Houdoin 62da9a0fce Ooops, fix the binary compatibility I introduced.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-09 16:33:56 +00:00
Philippe Houdoin 7ae974066f Cache text width to avoid calling StringWidth() too much while
both text and font don't change.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-09 15:13:37 +00:00
Alex Wilson 82ab316723 Add default spacing for Layouts (#5614)
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET
* introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing().
* modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods.
* default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING
* I've found two regressions, patches incoming, please report others on #5614.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 22:58:24 +00:00
Alex Wilson 1d6c7b6cb6 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
2010-08-17 18:43:41 +00:00
Clemens Zeidler 5836cd75c2 Add a BWindowStack interface class. Please review if adding a BWindowStack as a friend of BWindow in Window.h is ok.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 06:47:26 +00:00
François Revol ef855c9edb Remove unwanted compatibility aliases before I get beaten by the Dano hunters...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 21:08:59 +00:00
François Revol 8e8634bf54 Add synonyms for tootip ui_color constants. Fix WindowShade to use the new official ones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 16:33:00 +00:00
Alex Wilson e70fa080b2 Should have been part of my previous commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 16:56:46 +00:00
Alex Wilson 6829d4174b Update BLayout::ItemAdded() and BLayout::ItemRemoved() to take an int32 index parameter, and ItemAdded() to return a bool indicating success or failure. Update BLayout::AddItem() to take the result of ItemAdded() into account. Also update BLayout::AllUnarchived() to take this into account. In either situation, if ItemAdded() returns false, the item does not get added to the layout. Removed various TODOs about code that could be removed once this change was made. In BSplitLayout, an item's LayoutData was lazy-initialized, but would always be created during ItemAdded(). Now we create the LayoutData explicitly, so that we can catch failed memory allocations. Closes #5524.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-30 02:28:17 +00:00
Alex Wilson 106d8c4e5b Convert to unix line endings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 22:28:51 +00:00
Alex Wilson 5f844af738 Update BTabView for layout-friendly archiving. Added _InitContainerView() method that is called from _InitObject() but also called on its own during unarchival. Implemented BTabView::AllUnarchived() and implemented a case for this in BTabView::Perform().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 20:03:41 +00:00
Alex Wilson 5c47e35e2a Updated BTextControl and its custom BLayoutItems. Also a bit of style cleanup. Broke up BTextControl::_InitData() method into _InitData() and _InitText() and moved initialization of the BTextView there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 22:16:46 +00:00
Alex Wilson 7a37b89be9 Updated BMenuField and its custom BLayoutItems for layout-safe archiving. Added an _InitMenu(const BMessage*) method that inits the menu during unarchival.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 20:59:47 +00:00
Ingo Weinhold 814057885c Patch by Alex Wilson:
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:28:55 +00:00
Ingo Weinhold 12463fa891 Patch by Alex Wilson: Added archiving/unarchiving support to BSplitView.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-20 08:24:19 +00:00
Ingo Weinhold 39c72631a3 Patch by Alex Wilson:
* Added archiving/unarchving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 01:05:28 +00:00
Ingo Weinhold ff626c8e29 Patch by Alex Wilson: Added archiving/unarchiving support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:46:40 +00:00
Ingo Weinhold 3fb74eb796 Patch by Alex Wilson (with minor changes by myself):
* Added support for archiving/unarchiving.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:41:56 +00:00
Ingo Weinhold a3d9e70188 dos2unix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:20:19 +00:00
Ingo Weinhold 849e11ad8d Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:15:31 +00:00
Ingo Weinhold d1535a45df Patch by Alex Wilson:
* Implemented archiving/unarchiving support.
* Coding style cleanup (some more by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-17 00:09:06 +00:00
Ingo Weinhold 80c2bbd8ae Patch by Alex Wilson (with small style changes by myself): Added support for
archiving/unarchiving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 18:11:24 +00:00
Ingo Weinhold 7ed1644c55 Patch by Alex Wilson:
* Added archiving/unarchiving support.
* Style cleanup (also some by myself).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 17:23:15 +00:00
Ingo Weinhold cbac1a2355 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
2010-07-16 17:06:55 +00:00
Ingo Weinhold b137ab3eb3 Patch by Alex Wilson (minor changes by myself) related to the new archiving
features:
* Some cosmetic adjustments of the API, like using references instead of
  pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
  and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
  object ownership, now. This is necessary since an error while unarchiving
  could leave an already unarchived object without owning object, which would
  result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
  have an optional parameter to specify whether object ownership shall be
  transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-16 16:49:42 +00:00
Axel Dörfler 268317bd9d * Style cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 16:04:41 +00:00
Adrien Destugues 27d84b482c Patch by Alex Wilson as part of GSoC 2010 : Archiving of Layouted BViews hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 15:40:49 +00:00
Stefano Ceccherini 8460e00cc0 _AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed
by Ziusudra).
Also removed leftover fDynamicItemsAdded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 14:49:42 +00:00
Stefano Ceccherini 780b76dcf9 Applied patch by Ziusudra in ticket #4930 to avoid a deadlock when
navigating the menus via keyboard.
I also factored some code into functions, in particular the code to
add the dynamic items. Also keep track if the dynamic items have been added
or not (using a new boolean class member).
I tested for regressions but couldn't find any.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 12:29:17 +00:00
Stephan Aßmus 33394b856d Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 15:51:54 +00:00
Stephan Aßmus 1c73ffa102 Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 15:53:09 +00:00
Axel Dörfler 542aff1be0 * Added constructor that takes a name for the view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:24:22 +00:00
Axel Dörfler a77ec88a9d * Fixed Group(BWindow*, ...) and Grid(BWindow*, ...) constructors to no longer
leak a view.
* Also set the view's background color to B_PANEL_BACKGROUND_COLOR to make this
  better usable in applications.
* Removed the admittedly useless Group(BView*, ...) constructor I introduced
  earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 15:08:27 +00:00
Axel Dörfler 7628cd87bf * Added new BView variant of the BLayoutBuilder::Group() constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:32:11 +00:00
Axel Dörfler cac9f196d8 * Added BListItem::SetOutlineLevel() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 11:24:25 +00:00
Stephan Aßmus d7fcb36f2b * Allow to set the scale (versus multiplication with a scale).
* Added commented versions for translation, rotation and shear, which would
   work similar.
 * Added B_AFFINE_IDENTITY_TRANSFORM constant similar to B_ORIGIN.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:46:32 +00:00
Stefano Ceccherini 76d5e0641b Partially revert r35962, since the cure is worse than the sickness.
Should fix #5717 (but probably reopens #3103)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 12:37:08 +00:00
Oliver Tappe 575625f155 fix drawing artefacts when the caret is being clipped, which lead
to parts of the caret being inverted:
* instead of always inverting the caret rect, we now invalidate when the
  caret should be hidden



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 14:13:57 +00:00
Jérôme Duval 03e6434ec0 * fixes a BSlider issue noticed by Matt on the mailing list:
Invoke() wasn't called the first time you grab a slider and slide it all the way to the left.
Thanks for the test case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 12:57:58 +00:00
Stephan Aßmus 6ed212bd43 Added TODO about possibly better way to name some constants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-08 10:03:43 +00:00
Stefano Ceccherini bb2576f0c8 Removed some code which was added to fix a crash, which was obviously fixed
correctly later in another way.
Removing this code should also fix ticket #3103.
Use the width of the Bitmaps instead of fixed values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 20:23:30 +00:00
Stephan Aßmus 2789b3911a Rewrote BAffineTransform to not be based on agg::trans_affine, which was pulling
in the AGG header. Reused the AGG code were applicable and implemented a lot
more features. The Multiply and PreMultiply meaning is reversed with respect to
AGG, but follows the mathematical meaning. Added type_code
B_AFFINE_TRANSFORM_TYPE to TypeConstants.h and let BAffineTransform derive from
BFlattenable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 17:20:11 +00:00
Stephan Aßmus abb02bc4a4 Moved BAffineTransform from shared kit into interface kit. Still in BPrivate
namespace. Applied 80 char/line limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-26 11:20:53 +00:00
Stephan Aßmus 00873f7818 Added BShape::CurrentPoint(), returning the current end point of the path.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-19 00:28:38 +00:00
Stephan Aßmus 76ab3f88df Basically, this changeset implements BShape::ArcTo(). In more detail:
* Added BShape::ArcTo() and BShapeIterator::IterateArcTo(), using a previously
   unused virtual slot. (Added the symbols for binary compatibility for GCC2
   and GCC4.)
 * Added operator=(), operator==() and operator!=() to BShape.
 * Added BShape::BezierTo() version taking three points, which is sometimes
   more convenient.
 * Added the four new shape data ops OP_LARGE_ARC_TO_CW, OP_LARGE_ARC_TO_CCW,
   OP_SMALL_ARC_TO_CW and OP_SMALL_ARC_TO_CCW. For a single arc, provided the
   radius is large enough, there are four possibilities to draw the arc, these
   are controlled by the two boolean flags to ArcTo() and mapped to the new
   commands accordingly.
 * Some style cleanup in Shape.cpp (sorry for mixing it up, but it gets
   worse below...)
 * Added ShapeTest to src/tests/servers/app.
 * Changed the way BShapes are transformed from view to screen space in the
   app_server. For arcs, it would be nontrivial to apply a proper transformation,
   it's much easier to let AGG take care of it. This affects ServerPicture as
   well.
 * Wrapped iterating the BShape into try/catch blocks in ShapeIterator. But
   I really don't understand the purpose of the class in the first place.
   Maybe it can now be dropped, since coordinates don't have to be transformed
   in place anymore.
 * Refactored copy&paste shape iteration code in Painter. The transformation
   to screen space happens there.
 * Since RemoteDrawingEngine needed to be adopted anyway, I also updated
   it for the new DrawString() with offsets version. But the client still needs
   to be adapted.
 * Style cleanup in Painter.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-03-18 16:58:19 +00:00
Stephan Aßmus a9daf3d911 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
2010-03-15 15:08:07 +00:00
Stephan Aßmus 77e5acc0d9 * 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
2010-03-15 13:59:14 +00:00
Stephan Aßmus b2e1893c6e Added SetBorder() virtual method and feature. Could also be used by the Terminal
now to polish the tabbed look.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-21 20:15:21 +00:00
Stephan Aßmus a487da80ba * Make a BStatusBar comfortable to use without any text labels.
* In SetBarHeight(), use InvalidateLayout() when used with layout management.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-06 09:48:37 +00:00
Stephan Aßmus c4e211feb6 * Refactored a method to draw a label when the location is already known.
(This one takes care of setting up the correct color.)
 * Added TODO about using either B_CONTROL_TEXT_COLOR, or elliminating that
   constant (which I am in favor of...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-23 12:48:18 +00:00
Ingo Weinhold 1cbfe2ef6e Moved the static stuff into a singleton.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-30 14:43:35 +00:00
Axel Dörfler 09749e95dc * Added a BWindow::InViewTransaction() that determines whether or not the
window is currently updating its drawings as suggested by Stippi.
* Add this method to decide whether to call _FontChanged() in
  BListView::SetFont().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-18 10:48:44 +00:00
Axel Dörfler 5569f33367 * Someone obviously forgot to check in some header changes. Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-06 15:32:55 +00:00
Oliver Tappe a85a827cd0 * introduced two new private methods, _PreviousWordStart() and _NextWordStart(),
which are now being used to implement the word-wise keyboard navigation,
  fixing #4785


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-04 18:49:15 +00:00
Stefano Ceccherini 510fae5f1d Also add layout-friendly constructor for BOptionPopUp (not yet tested)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 10:49:28 +00:00
Stefano Ceccherini ba69bf196e Added layout friendly constructor for BOptionControl
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-25 10:45:42 +00:00
Brecht Machiels 926e63c885 * added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 21:10:19 +00:00
Oliver Tappe 32c8ab89a9 * added _TabExpandedStyledWidth(), which makes sure to expand all tab chars
during the width calculation
* used _TabExpandedStyledWidth() at all places that need to expand tabs,
  fixing #4822
* removed _StyledWidthUTF8Safe() as it didn't make sense - we now perform
  the same auto-scrolling horizontally as we do vertically


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-21 19:09:20 +00:00
Oliver Tappe b18f133db3 generally overhauled non-wrapping mode of BTextView, as it was considerably broken:
* switching from wrapping to non-wrapping mode triggers a recomputation of
  the text rect
* non-wrapping mode now triggers updating of the data rect for the horizontal 
  scrollbar as needed, fixing #4705
* corrected a couple of width computations that confused bounds and text
  rect width, leading to drawing artefacts at the end of a line
* unified computation of text rect width to always take all lines into
  account (not just the first one)
* some cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-21 13:42:25 +00:00
Axel Dörfler 20a11271d0 * Added a (to be virtual) DefaultItemSpacing() method to control look. This is
what you should use in for example BGroupLayout as spacing/inset.
* Changed the label spacing to be dependent on the font size, too (and enlarged
  it a bit as well).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-17 17:01:22 +00:00
Stephan Aßmus 75a6d1db99 Optimized includes. For example, BeBuild.h is almost always already included
via SupportDefs.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 12:36:35 +00:00
Stephan Aßmus 89208c77f1 Finished unifying the Interface Kit headers:
* Fixed copyrights (puncuation and capitalization, removed authors from
  headers)
* Updated indentation style
* Unified pointer/reference style
* Re-ordered some methods for better grouping where it could be done
  (abd adopted source accordingly)
* Small coding style fixes here and there

No functional change intended.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 11:12:41 +00:00
Stephan Aßmus e597623fc8 Small cleanups.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 18:58:11 +00:00
Stephan Aßmus 0e0c81e027 Rewrote PrintJob.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 18:56:44 +00:00
Stephan Aßmus 29c26d1e57 * Indentation cleanup
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32724 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 18:46:08 +00:00
Stephan Aßmus 33d568ae09 * Indentation cleanup
* Code cleanup
* Refactoring (the unit tests still pass)
* Disabled experimental API (BAffineTransform, which is not yet publically
  available anyway)

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 18:40:04 +00:00
Stephan Aßmus 8cc8b1b7e9 * Updated indentation style
* Fixed copyright
* Reordered inherited virtuals to improve the grouping

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:53:06 +00:00
Stephan Aßmus 15ff16b991 * Updated indentation and pointer/reference style.
* Fixed copyright

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:34:56 +00:00
Stephan Aßmus 4b15b90979 * Updated indentation style.
* Fixed copyright.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:30:36 +00:00
Stephan Aßmus 97da0e7cfb * Updated indentation style
* Fixed copyright

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:25:36 +00:00
Stephan Aßmus 56f7fdc402 * Updated indentation style
* Fixed copyright


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:19:30 +00:00
Stephan Aßmus a744468925 Rewritten. Note that the implementation for this class seems to be completely
missing. IIRC, I did write an app way back that used this class...

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 14:04:37 +00:00
Stephan Aßmus a449ca33dc * Updated indentation style
* Fixed copyright

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 13:44:50 +00:00
Stephan Aßmus 42a5968afd Cannot change the ordering of the additional virtual methods, or BC is
broken.
+alphabranch (if previous commit is also applied)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 13:33:54 +00:00
Stephan Aßmus 6eb37bdef7 * Copyright fixed
* Indentation updated.
* Better grouping of methods.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 12:22:10 +00:00
Stephan Aßmus 13e50c47a2 * Indentation cleanup.
* 80 chars limit
* Copyright fixed.
* Better grouping of methods.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 12:08:09 +00:00
Stephan Aßmus 0a5897b71f * Updated indentation style
* Better grouping of methods
* Fixed copyright
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:47:51 +00:00
Stephan Aßmus 7e43502299 * Updated indentation.
* Better grouping.
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:27:06 +00:00
Stephan Aßmus f81fb0e5f6 80 chars/line
+ alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:19:20 +00:00
Stephan Aßmus b87283e761 * Updated indentation and licence.
* Added experimental API warning.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:16:49 +00:00
Stephan Aßmus 2d6e435398 * Updated indentation style
* Added warning about this being experimental API.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 11:10:23 +00:00
Stephan Aßmus 97e88fa432 Indentation cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 10:58:22 +00:00
Stephan Aßmus aaa6b1228a Updated indentation style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 10:45:36 +00:00
Stephan Aßmus 87ba0eaa2b Fixed for 80 char limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 10:32:41 +00:00
Stephan Aßmus c5c20344eb * Cleaned up the header
* Reordered methods to group them logically
* Use nothrow version of new when instantiating BCheckBox from archive.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 10:30:27 +00:00
Stephan Aßmus d89b690d3b * Finished rewriting the header.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-25 14:13:59 +00:00
Ryan Leavengood 19bce7226a Remove the forced resizing to preferred size when CenterIn is called, and
instead just check if the size limits need to be set. The code that previously
did this when processing the B_LAYOUT_WINDOW message was extracted into a
private method, which is called from both places.

This may be slightly wasteful in some cases (since the size limits may be set
multiple times), but it is definitely needed because without it both of the
current test apps (DiskProbe and Screenshot) did not have properly centered
windows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-23 03:06:44 +00:00
Ryan Leavengood b0586d610a Remove useless BRect* version of CenterIn, make remaining version take a const
BRect reference.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 16:10:18 +00:00
Ryan Leavengood 2ff62714d0 Finally implemented BWindow::CenterOnScreen, with associated CenterIn(BRect)
methods as well as Size(). To avoid the problem of centering the window before
it has been resized by the layout system, I force the resizing early. If there
is a better way to do this or some way to avoid doing it repeatedly, let me
know. But I figure the Center* methods should not be called that often.

Updated Screenshot and DiskProbe to use this new method as a test. It certainly
cleaned up DiskProbe. I will update other code over the next few days (if
anyone wants to help, please do :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 14:17:29 +00:00
Axel Dörfler 87da7984dc * Contrl-~ now switches between application windows. This is handier than the
mechanism used in BeOS, that is to press Control+Option-Tab (which didn't
  work on Haiku, though).
* Did not change the window switch logic, though, so it's still not really
  nice.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 15:45:17 +00:00
Oliver Tappe 9946ba71ad * reordered members of BTextView to be compatible with R5 again,
although it should have been safe before, too, since BTextView neither
  has inline methods nor any friends that live outside of libbe
* added new member fLastClickOffset in order to be able to restore the 
  triple-click handling (linewise selection)
* renamed fClickOffset to fCaretOffset, as that is what it really is
  now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-16 17:02:47 +00:00
Jonas Sundström d61def1d46 A spelling error, I presume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 16:24:41 +00:00
Axel Dörfler 12194e33b7 * Added missing default initializer for the message.
* Changed BMenuField::MenuBarLayoutItem::BasePreferredSize() to return the
  min size as well, instead of a fixed 100 pixels for the width...
* More minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 08:52:32 +00:00
Axel Dörfler 50f8cd14bb * Cleanup, no functional change.
* Remove superfluous operator=() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 08:01:27 +00:00
Axel Dörfler 8318af01b9 * 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
2009-08-03 14:47:41 +00:00
Axel Dörfler 617ebd8897 * Added convenience methods to add BTextControls and BMenuFields to a grid
layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 14:03:48 +00:00
Stephan Aßmus 20f7be247e Actually, make B_PLAIN_BORDER look the default for simple separator lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 15:48:51 +00:00
Stephan Aßmus 79f2db07a8 Implemented a BSeparatorView. It can be a horizontal or vertical line/border,
or also a label, optionally with a BView for the label. Some aspects of it have
not been exposed to throughrough testing, yet (archiving, label view),
the BAlignment support is also not well tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 14:15:55 +00:00
Stefano Ceccherini 2e6adc56e4 Added a _BPictureExtent_::Flatten(), moved some code from BPicture::Flatten()
into it. Renamed ImportData() to Unflatten(). Some code shuffling.
No functional change.
Some style cleanup needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 12:33:47 +00:00
Stephan Aßmus e343673a0b * The app_server implements modifiers for performing decorator actions anywhere
inside the window. These are Command + Alt. In X11, it's just Alt, but that
  is already used in various Haiku/BeOS apps.
* Introduced new window flag B_NO_SERVER_SIDE_WINDOW_MODIFIERS to disable the
  above.
* Made click to front in FFM mode less strict, you can slightly move the mouse
  now and still click windows to front.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 20:45:04 +00:00
Ingo Weinhold a0747aad3b 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
2009-06-29 14:18:12 +00:00
Stephan Aßmus 4aeb7a3cc2 * Made BTwoDimensionalLayout and BSplitLayout::GetInsets() const.
* Give access to BSplitLayout::SetInsets() and GetInsets() from BSplitView.
* Give access to BSplitView::SetInsets() from BSplitLayoutBuilder and
  LayoutBuilder.
* Some automatic white-space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 10:56:22 +00:00
Stephan Aßmus b3601d823c * Update indentation style in TabView.h
* Added _MinTabeSize() to BTabView. It makes sure that the BTabView displays
  at least two tabs. In the future it should also add the room to display some
  buttons for cycling the currently displayed tabs left/right if there is more
  than can fit.
* In BTabView::Min/Max/PreferredSize(), use _MinTabSize() to compute the
  respective size.
* Improve Tab rendering code so there are no ugly overlaps at the right edge
  if the tabs falls directly on the view edge.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-21 13:04:51 +00:00
Stephan Aßmus 8f24c71102 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
2009-06-20 15:47:28 +00:00
Stephan Aßmus 1f9fd6d866 * Added BSplitView drawing code to ControlLook.
* BSplitView uses ControlLook to draw itself.
* Small refactoring in SplitLayout to implement IsAboveSplitter(BPoint).
* BSplitView updates the view cursor when the mouse is above a splitter.
* Standard splitter size is now 6 pixels, which is a bit easer to hit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 15:03:33 +00:00
Stephan Aßmus fa0ba1f855 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
2009-06-20 14:12:30 +00:00
Ingo Weinhold 2a3974d313 Added constructor versions of the Group and Grid layout builders that take a
BWindow* parameter. They set the newly created layout on the window, which saves
the API user to do that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 15:28:00 +00:00
Ingo Weinhold 1a726098ec New approach to layout building:
* The new builders are templatized and completely inline.
* They are easily nestable, which only worked for groups with the old approach.
* Added builder for split views.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 19:38:51 +00:00
Axel Dörfler f3b1ada54f * Moved class BStringItem into its own source file.
* Changed BStringItem::Update() to set a better baseline offset and height;
  this should improve vertical text placement.
* Fixed a bug in BStringItem::Update(): it used the owner to determine the
  width, but must use the font passed in instead.
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 16:26:17 +00:00
Axel Dörfler 8e5744fe72 * Fixed style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:58:24 +00:00
Axel Dörfler 08a3563801 * Added layout-friendly constructor.
* Reordered functions to match the order in the header (and vice versa).
* Removed unused private functions.
* Updated the header to follow our coding style.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:56:57 +00:00
Stephan Aßmus 041b97a8b8 * Updated header indentation style and small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-16 14:02:18 +00:00
Axel Dörfler 97970c5c26 * Applied a changed patch by Romain that fixes the non-working double click in
BListView. This fixes bug #3919. Got rid of the _TryInitiateDrag() method,
  and let MouseMoved() do it all.
* Style cleanup of the header, automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-17 16:49:05 +00:00
Oliver Tappe f287ca7dc8 fixed behaviour of non-editable textviews:
* non-editable textviews no longer draw the caret
* the cursor keys scroll immediately, not only when the (invisible) caret 
  reaches the views bounds
* HOME/END work more reliably
* any selection stays active throughout keyboard navigation
Tested with AboutSystem, Mail, StyledEdit and Beam - seems to work ok


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 22:09:15 +00:00
Stephan Aßmus b037500155 Patch by Shinta: The key code was misnamed. Thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 08:32:17 +00:00
Oliver Tappe 5cc8dc2fe3 * unified application of style into a separate method _ApplyStyleRange()
in order to maintain the null-style appropriately, if required
* finally fix #3040 for real (a single style is now maintained at all times
  for non-stylable textviews)
* the caret is now being drawn with the correct size, even if it is on
  the empty line at the end of the buffer and a specific font size has been
  requested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 13:59:13 +00:00
Oliver Tappe 02359fde69 [ should have been part of last commit ]
more work concerning navigation within BTextView:
* pressing HOME on last line works again
* made public versions of LineAt() do what is required to pass back the
  correct value even for the last line of the buffer (original implementation
  has been moved to private _LineAt())
* PAGE_UP/PAGE_DOWN now moves the view by the bounds-height, making the
  behaviour somewhat less confusing (IMHO, please shout if that's not 
  acceptable for you)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 14:00:45 +00:00
Ingo Weinhold c4945a424b Added Count{Columns,Rows}().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 16:47:02 +00:00
Stephan Aßmus 8296330edf Updated indentation style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 09:17:08 +00:00
Stephan Aßmus e55653ec19 Small cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-21 11:26:11 +00:00
Stephan Aßmus b7cafeb2ad Small style cleanups again...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 23:47:17 +00:00
Axel Dörfler b847381250 * Making it private doesn't help unless you have a const BSlider. Therefore,
removed it from the public namespace, and made it only visible when linking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 15:50:03 +00:00
Axel Dörfler d9479a6951 * Added const version of GetLimits() (the non-const version is still around
for binary compatibility).
* Always round the bar thickness, or we get drawing artefacts.
* Cleaned up the header following our coding style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 15:41:10 +00:00
Axel Dörfler fe6c05fdbe * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-08 14:12:45 +00:00
Oliver Tappe 200da6828f * implemented wordwise navigation via control + arrow keys
* renamed _FindXXXWordBoundary() methods to _Previous/_NextWordBoundary()
  since the respective per-char methods are named this way
* started to work on improving the behaviour of page-up/page-down

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 22:40:53 +00:00
Oliver Tappe 3f3ab1625c continued work on BTextView:
* reverted my recent change that caused Mail to always show the end
  of mails 8-) and now invoke ScrollToOffset() wherever it was missing
  (mostly in keyboard-related methods)
* _DoInsertText() only moves the caret if the text has been inserted
  in front of the caret, not after it
* overhauled selection by char/word/line and their extension mechanism
  (which now behaves as the haiku shell)
* use strnlen() instead of strlen() in those versions of Insert() which
  accept a length parameter, as strlen can potentially waste a lot of
  cycles skipping the whole string, when all we want is to clamp the length.
* cleanup (some of it automatic removal of trailing whitespace)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 15:29:23 +00:00
Alexandre Deckner c51d0337a1 * Rewrote BDragger's mouse tracking to be asynchronous using a message filter. Placed the filter in
kits/shared since i plan to use it in other places like Tracker. Animated replicants like 
ActivityMonitor wont stall anymore when initiating the drag. (On the desktop, Tracker's mouse 
tracking still busy loops sometimes, that's next on my list). 

I had asynchronous long click detection (one button mouse support) in it but decided to get rid of 
it, it adds unneeded complexity in the code and is even getting in your way sometimes (ex: now you can 
take your time to drag the dragger, you wont be interrupted). If we want to reimplement that 
someday it should be done system wide anyway (only Tracker and replicants have that 'feature' 
AFAIK).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-06 19:15:00 +00:00
Oliver Tappe 4e50f1ae68 * Instead of invoking _DrawLines out of the app-server drawing context,
we request the drawing via Invalidate() - this make use of the app-server's
  potential double buffering, whenever that is active. This change reduces 
  flickering in VESA mode considerably.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-06 11:31:10 +00:00
Alexandre Deckner 9cfb11a5cf * Make BDragger respect the doc and only archive/unarchive the popup menu when it's a
custom provided one. Incidentally makes #1775 (that i'll reopen in a moment, see r29947) a 
lot less likely to happen for most users since it can now only happen with those 
customized popups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 19:59:53 +00:00
Stephan Aßmus ac754ba0a2 Patch by Brecht Machiels: Add operator==() to BRegion. Thanks a lot!
Also fixed some coding style inconsistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-01 12:39:44 +00:00
Stephan Aßmus f247113640 Added DecoratorFrame() method, which returns the outer frame of the window
on screen (ie including the decorator border and tab). Plus the necessary
refactoring as well as some TODO notes about windows with the tab on the left
side.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 13:34:16 +00:00
Axel Dörfler 8d8da849c8 * Added missing MaxSize() implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 13:01:42 +00:00
Axel Dörfler aa87523e3c * This should have been part of r29776 and fixes the build. Thanks Alexandre!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-29 13:54:44 +00:00
Karsten Heimrich f7b619c91f * quick build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 20:52:08 +00:00
Stephan Aßmus 4f57909806 Introduce the possiblity to draw certain frames with alpha blending on top of
an existing background. It's not supported by many frame types yet, but BButton
and TextControl frames work as well as the soft recessed frame which many
controls use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 19:37:43 +00:00
Stephan Aßmus 53eaeede6f * Moved the bitmap filter options to InterfaceDefs.h.
* Moved the bit in order not to clash with the tile options.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-28 14:09:14 +00:00
Stephan Aßmus 681c2e4425 The button and menu field draw routines take a background color into account,
which makes the resessed frame blend better with the surroundings. This can
be seen best in Keymap, where a different color is set on some buttons, but
the resessed frame should still be the same across all those buttons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 23:34:19 +00:00
Stephan Aßmus 62b9a2ce0e * Header cleanup.
* Removed dead code which was for drawing a BButton like R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-24 13:26:56 +00:00
Stephan Aßmus 47e745c6db * Fixed the unified menu bar width calculations. SetDivider() got it wrong.
* _InitMenuBar() had the meaning of fixedSize reversed. The layout-mode
  constructors pass fixedSize = true accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 12:16:10 +00:00
Stephan Aßmus 74bb70aef9 Moved the BScrollView frame drawing entirely into BControlLook.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 11:19:31 +00:00
Stephan Aßmus cda78e4f8e Fixed more inconsistencies in layouting the menu bar. These would mostly
result in the BMenuField not always drawing all of the frame around the
menu bar correctly, for example cutting off at left for divider = 0.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-23 11:18:26 +00:00
Stephan Aßmus 40a10e1c52 Added method to draw an arrow shape like that of the BScrollBar.
TODO: Adjust BScrollBar to use it.
TODO: Make it virtual like the others, but I don't want to break Vision and
other native Haiku apps just now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-21 17:22:56 +00:00
Stephan Aßmus 1a72cb4139 Make BMenuBar background drawing more flexible and also support an "activated"
state.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-18 17:18:06 +00:00
Alexandre Deckner 3fd2ea61ce * Update ref count later in _AddReplicant and add one check to be sure we checked all possible errors.
* Moved new statics to the cpp file as it seems we don't usually expose such internals in our public headers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 16:08:03 +00:00
Alexandre Deckner 37a89eb4e9 * Use ref counting to determine when to unload a replicants add_on image, fixes #2712.
* Don't delete fStream if we don't own it, would crash ShelfTest on quit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-08 14:18:06 +00:00
Stephan Aßmus 8ee9217eec Improved the look of the slider triangle thumb. Still missing is the vertical
version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 11:09:27 +00:00
Philippe Houdoin 83aff015eb Fixed BTabs focus underline offset.
Fixed a typo in method name.

Please forgive me Stephan if I just screw your next commit...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-17 10:36:58 +00:00
Stephan Aßmus 13cd46dfa3 * Stronger BMenuField popup indicator.
* Softer recessed frame for BMenuField to distinguish more from BButton
  and make it slightly more similar to BTextControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-16 13:57:31 +00:00
Stephan Aßmus 2f86ba4557 Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 18:23:19 +00:00
Stephan Aßmus a0b1d631cc Added layout friendly constructor to this base class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 15:41:35 +00:00
Stephan Aßmus 64eb49fd24 * Cleanup in the Gradient department. No fuctional change.
Renamed BGradient::color_step to BGradient::ColorStop
  as it's called everywhere else. Also renamed BGradient::gradient_type
  to just BGradient::Type. Renamed BGradient::Type() to GetType().
* Simplification of method names in Painter.cpp. Some not yet
  complete and yet inactive code to accelerate vertical gradients
  (bypassing AGG for this special case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 15:15:49 +00:00
Rene Gollent 310177b43e ChannelSlider now sends notifications while being dragged, thus allowing the volume to be manipulated in realtime from the media prefs, rather than on mouseup only. Fixes ticket #3338.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-07 16:55:13 +00:00
Karsten Heimrich 5fd5fe56bb * refactor _Init and DoLayout to share some code
* DoLayout did not work as expected, after the call
  the scrollbars would have an 1px offset inside the target
* the target needs to be resized while setting a new border, otherwise
  it would overlap the border and give some drawing artefacts
  
- I'm still unsure if the behavior change introduced with the layout stuff is nice



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-31 21:27:50 +00:00
Karsten Heimrich 168353694e * cleanup
* use std::nothrow



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-11 19:06:45 +00:00
Karsten Heimrich e6753e37c6 * fix small mem leak
* whitespace cleanup, etc
* some renaming to fit Haiku style



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-08 15:48:10 +00:00
Jérôme Duval 60581c6303 added get_modifier_key()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 14:47:11 +00:00
Stephan Aßmus 295f3d13dc Style update.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-21 00:15:22 +00:00
Stephan Aßmus 24a0a80b05 Properly integrate the BTabView into a layout tree. Ie, the content will
now resize with the tab view. There is probably a more elegant way overriding
DoLayout(), but this should do for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-21 00:14:05 +00:00
Stephan Aßmus e401039efa Patch by Artur Wyszynski:
* The BTabView can now be used with layout management. In this setup, children
  views are managed by a BCardLayout and are hidden/shown instead of removed/
  added when (de)activated.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-20 21:51:43 +00:00
Stephan Aßmus fa6cd8ad6a * The previous change to reorder item->Update() and _RecalcItemTops() obviously
broke everything. If the added item has no chance to calculate it's height,
  _RecalcItemTops() won't work of course. Whatever this was supposed to fix,
  there has to be a correct way.
* Override BView::SetFont() to update all the items. I remember wanting to
  implement this, that's why I refactored a _FontChanged() method, but I
  obviousy never did...
* Moved the AttachedToWindow() and FrameMoved() implementations to a more
  logical position in the file.
* Implement B_PAGE_UP/DOWN key presses. Don't know if that's what the BeOS
  implementation did, will check later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 22:34:11 +00:00
Stephan Aßmus 52de6dce94 Moved the gradient_type and color_step structs into the BGradient
class/namespace. Renamed the B_GRADIENT_* types to TYPE_* as the context
is already given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 14:56:56 +00:00
Stephan Aßmus c8d611a2c0 Prepend header guard with underscore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 12:00:57 +00:00
Stephan Aßmus b2411d9aeb System headers need to have "_" prepended in their header guards.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-08 11:58:54 +00:00
Stephan Aßmus b545073f08 * Moved the global BPrivate::WidthBuffer from BTextView into BPrivate as
gWidthBuffer.
* Tracker PoseView now uses BPrivate::gWidthBuffer instead of it's own
  instance.
* TextView.h and PoseView.h are now a little cleaner.
* InterfaceDefs.cpp now deletes gWidthBuffer in _fini_interface_kit_().
* Added binary compatibility support for NetPositive in WidthBuffer.h and .cpp.
  Obviously it kind of defeats the purpose of having WidthBuffer neatly tucked
  away in the BPrivate namespace, but Haiku should run NetPositive, I guess.
  Fixes #2879.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-06 11:31:40 +00:00
Jérôme Duval d2184e65c1 * whitespace cleanup
* implemented the disabled look and color ramping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 19:08:26 +00:00
Axel Dörfler 9e163a7a93 * Made BScrollView work when using it with the layout system.
* Added a layout friendly constructor - it's not so nice to use, though, since
  the original one already doesn't get a BRect (we just don't need the
  resizing mode, and have to set the B_SUPPORTS_LAYOUT flag).
* Refactored size/frame computation a bit.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 10:14:24 +00:00
Axel Dörfler ab42853558 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 13:17:29 +00:00
Karsten Heimrich d751323939 * reintroduce member fOffscreen which got removed in r2917
* check if locking the offscreen window succeeds before calling delete on it
* don't return offscreen windows in CountWindows and WindowAt (works now as on R5)

  fixes ticket 1522, 1591, 1946, 2318 and propably more

  While creating an BBitmap in BApplication the bitmaps window looper would
  be added to the applications gLooperList, thus calling Quit() on that window
  and later delete on a stale window pointer in BBitmaps dtor. The Lock() check
  would fix the problem, but tests on R5 have shown that BApplication hides the
  offscreen window in CountWindows() and WindowAt().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:23:18 +00:00
Karsten Heimrich a02979bb3f * cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-19 12:05:37 +00:00
Stephan Aßmus 11c5023a77 Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace
  and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.

Thanks a lot!

Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
  to be the more common order in the other Be API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:10:10 +00:00