Commit Graph

12 Commits

Author SHA1 Message Date
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 349c911ee9 * Implemented a lot of layout related methods and resolved a few TODOs by
doing a lot of these things the same way as BMenuField are already doing.
  Perhaps a private helper class could be refactored from these two controls
  to avoid duplicating a lot of this code, although there are a few subtle
  differences here and there.

These changes make a BTextControl behave properly in the layout management
frame work, in case CreateLabelLayoutItem() and CreateTextViewLayoutItem()
are _not_ used to layout the BTextControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-16 10:50:31 +00:00
Stephan Aßmus 93ba577c3e * Updated header indentation
* Removed unused fClean member
* Got rid of fSkipSetFlags member by simply calling the BView::SetFlags()
  directly where fSkipSetFlags was supposed to prevent the custom
  implementation.
* Added some debugging facilities.
* Used the layout friendly constructors of BControl where appropriate.
* Used B_FOLLOW_ALL for the child text input, it should be more correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 19:43:18 +00:00
Stephan Aßmus b8872c02c1 BTextControl:
* Placed _BTextInput_ into BPrivate namespace.
* Made _BTextInput_::AlignTextRect() smarter, it centers the line vertically,
  for the case that the BTextControl has a larger label font. Improved insets
  for asthetics.
* Used _BTextInput_::AlignTextRect() consistently in BTextControl, no more
  custom calls to SetTextRect(). Account for minimum vertical inset of 2
  pixels in GetPreferredSize().
* Consistendly select all text when gaining focus in _BTextInput_.
* Override MouseDown() in case the control did not have focus before, or else
  BTextView::MouseDown() will deselct the text again and place the cursor.
  (in line with BeOS behavior)
* Removed unused fBool member from _BTextInput_ and other cleanup.

BTextView:
* Reimplemented BTextView::_AutoResize() so that it works well with
  BTextControl and autoscrolling when the alignment is not B_ALIGN_LEFT.
  I needed two new members for this, fLeftInset and fRightInset which are
  the original insets from the fTextRects. It might currently be broken
  for renaming things in Tracker, I will have to check. _AutoResize() no
  longer messes up the fTextRect insets.
* Fixed stray carrets sometimes being left over, mostly when auto scrolling,
  but I observed them in other cases as well.
* Prevent negative scrolling offsets when autoscrolling. Fixes weird scrolling
  offsets when navigating to the left.
* Reset scrolling to B_ORIGIN when SetText() is called. Fixes for example
  starting to type in the middle of the control in Vision when entering new
  text and autoscrolling was triggered before.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 20:39:29 +00:00
Stephan Aßmus a431f44be8 * make the text view layouting more robust, draw the frame around the
text view, ignore the divider for this (application code could layout
  the textview itself, and fDivider might not be maintained)
* change Draw() and TextInput::MakeFocus() accordingly

this fixes the weird placement of text controls in Beam


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:51:59 +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 79c35b3912 SetEnabled() didn't set the text view's colors correctly anymore; _UpdateTextViewColors()
asked for IsEnabled() before it was set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-12 01:23:30 +00:00
Axel Dörfler 3a3f6c1ee9 BTextControl::AttachedToWindow() set wrong colors in case the control was
disabled (unlike SetEnabled()). They are now both using the correctly working
_UpdateTextViewColors() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 15:28:49 +00:00
Axel Dörfler ffe72abd85 * Fixed BTextControl resizing (did not invalidate the border area before).
* Rewrote TextControl.h
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 14:22:33 +00:00
Marc Flerackers 12c3dcc26d This is the full header of BTextControl
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-20 10:09:19 +00:00
Axel Dörfler 3275af4352 Uncomment fClean variable to get the header binary compatible with R5.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:50:06 +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