Commit Graph

14 Commits

Author SHA1 Message Date
Axel Dörfler 95fdee0bc0 BStringView: added truncation support.
* Added new truncation mode B_NO_TRUNCATION.
* The Truncation()/SetTruncation() methods itself are Dano-compatible,
  however, there was no B_NO_TRUNCATION.
2015-01-23 21:00:28 +01:00
John Scipione 5ae0cde363 Style fixes to BStringView related to docs 2014-12-04 17:56:24 -05:00
Michael Lotz bfc18b1ecd Add missing space before opening brace. 2012-06-24 16:17:32 +02:00
John Scipione a2bea84d34 Override the LayoutAlignment method in BStringView.
Left align StringViews using layout API by default falling back
to the alignment settings set by SetAlignment() only if
SetExplicitAlignment() is not used.

This way StringViews are left-aligned by default, can be changed
using the Layout API, and the pre-Layout API legacy method is used
as a fallback.

See this thread for details:
http://www.freelists.org/post/haiku-development/Can-we-make-BStringViews-MaxSize-BSizeB-SIZE-UNLIMITED-B-SIZE-UNSET-by-default
2012-04-15 16:06:29 -04:00
Alex Wilson eee4243d35 De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout. 2011-10-28 14:16:43 -06: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
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 e87506af4d * Implement SetFont() and invalidate the layout. More controls should probably
do this.
* Fix build, appearantly I made a last minute change in Draw()...

BTW, confirmed that adding virtuals declared in the base class is ok for
binary compatibility.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:55:44 +00:00
Stephan Aßmus d3fe87ce70 * Cache a fPreferredSize following the example of BButton. Changed
GetPreferredSize() accordingly.
* No longer adds margins to the left/right side and top/bottom. These will
  make it difficult to make exact visual alignments with other controls and
  labels.
* Invalidate the layout in SetText().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-15 13:20:26 +00:00
Ingo Weinhold 9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00
Axel Dörfler f97761575a * GetPreferredSize() now accepts NULL arguments for "width" and "height"
* use GetFontHeight() instead of: BFont font; GetFont(&font); font.GetHeight(...)
* fixed odd unarchiving of the alignment.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:28:18 +00:00
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00