* First steps towards making BTextView behave well within the layout management.
* The class calculates a minimum width now, which is based on the line height, this may also fix the bug with the small text inputs in the Pe Find window. * Added TODOs about implementing GetHeightForWidth(), which may be a good idea when a BTextView is used as non-editable informative text in an interface, and one wants to make sure that the entire text is shown. * Replaced the call to _Refresh() in Draw(), which recalculates all the line breaks for no reason with _DrawLines() again. The TODO mentioned that text will be drawn without drawing the background first, but maybe this is a relict from times where Draw() was invoked directly? At least I cannot see any negative consequences, and this should be much more efficient. (Other than that, this patch should hopefully have no potential negative side effects...<crosses fingers>) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -210,6 +210,24 @@ public:
|
||||
|
||||
virtual void ResizeToPreferred();
|
||||
virtual void GetPreferredSize(float* _width, float* _height);
|
||||
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
|
||||
virtual bool HasHeightForWidth();
|
||||
virtual void GetHeightForWidth(float width, float* min,
|
||||
float* max, float* preferred);
|
||||
|
||||
virtual void InvalidateLayout(bool descendants = false);
|
||||
|
||||
protected:
|
||||
virtual void DoLayout();
|
||||
|
||||
private:
|
||||
void _ValidateLayoutData();
|
||||
|
||||
public:
|
||||
virtual void AllAttached();
|
||||
virtual void AllDetached();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user