* 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
This commit is contained in:
@@ -80,16 +80,26 @@ public:
|
||||
virtual status_t GetSupportedSuites(BMessage* data);
|
||||
virtual void SetFlags(uint32 flags);
|
||||
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
|
||||
virtual void InvalidateLayout(bool descendants = false);
|
||||
|
||||
BLayoutItem* CreateLabelLayoutItem();
|
||||
BLayoutItem* CreateTextViewLayoutItem();
|
||||
|
||||
private:
|
||||
class LabelLayoutItem;
|
||||
class TextViewLayoutItem;
|
||||
protected:
|
||||
virtual void DoLayout();
|
||||
|
||||
friend class _BTextInput_;
|
||||
friend class LabelLayoutItem;
|
||||
friend class TextViewLayoutItem;
|
||||
private:
|
||||
class LabelLayoutItem;
|
||||
class TextViewLayoutItem;
|
||||
struct LayoutData;
|
||||
|
||||
friend class _BTextInput_;
|
||||
friend class LabelLayoutItem;
|
||||
friend class TextViewLayoutItem;
|
||||
|
||||
virtual status_t Perform(perform_code d, void* arg);
|
||||
|
||||
@@ -108,18 +118,17 @@ private:
|
||||
void _LayoutTextView();
|
||||
void _UpdateFrame();
|
||||
|
||||
void _ValidateLayoutData();
|
||||
|
||||
private:
|
||||
BPrivate::_BTextInput_* fText;
|
||||
char* fLabel;
|
||||
BMessage* fModificationMessage;
|
||||
alignment fLabelAlign;
|
||||
float fDivider;
|
||||
float fPreviousWidth;
|
||||
float fPreviousHeight;
|
||||
BLayoutItem* fLabelLayoutItem;
|
||||
BLayoutItem* fTextViewLayoutItem;
|
||||
|
||||
uint32 _reserved[5];
|
||||
LayoutData* fLayoutData;
|
||||
|
||||
uint32 _reserved[9];
|
||||
};
|
||||
|
||||
#endif // _TEXT_CONTROL_H
|
||||
|
||||
Reference in New Issue
Block a user