Add a BView::LayoutChanged() method, called after layout of this view and children.
Fixes #7683.
This commit is contained in:
parent
fceb7ee27e
commit
0c8b758c09
@ -581,6 +581,8 @@ public:
|
||||
protected:
|
||||
virtual bool GetToolTipAt(BPoint point, BToolTip** _tip);
|
||||
|
||||
virtual void LayoutChanged();
|
||||
|
||||
private:
|
||||
void _Layout(bool force, BLayoutContext* context);
|
||||
void _LayoutLeft(BLayout* deleted);
|
||||
@ -588,7 +590,6 @@ private:
|
||||
|
||||
private:
|
||||
// FBC padding and forbidden methods
|
||||
virtual void _ReservedView12();
|
||||
virtual void _ReservedView13();
|
||||
virtual void _ReservedView14();
|
||||
virtual void _ReservedView15();
|
||||
|
@ -25,7 +25,9 @@ enum {
|
||||
|
||||
// support kit
|
||||
PERFORM_CODE_ALL_ARCHIVED = 1010,
|
||||
PERFORM_CODE_ALL_UNARCHIVED = 1011
|
||||
PERFORM_CODE_ALL_UNARCHIVED = 1011,
|
||||
|
||||
PERFORM_CODE_LAYOUT_CHANGED = 1012
|
||||
};
|
||||
|
||||
|
||||
|
@ -4493,6 +4493,11 @@ BView::Perform(perform_code code, void* _data)
|
||||
BView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_LAYOUT_CHANGED:
|
||||
{
|
||||
BView::LayoutChanged();
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_GET_TOOL_TIP_AT:
|
||||
{
|
||||
perform_data_get_tool_tip_at* data
|
||||
@ -4879,6 +4884,13 @@ BView::GetToolTipAt(BPoint point, BToolTip** _tip)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BView::LayoutChanged()
|
||||
{
|
||||
// hook method
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BView::_Layout(bool force, BLayoutContext* context)
|
||||
{
|
||||
@ -4909,6 +4921,8 @@ BView::_Layout(bool force, BLayoutContext* context)
|
||||
child->_Layout(force, context);
|
||||
}
|
||||
|
||||
LayoutChanged();
|
||||
|
||||
fLayoutData->fLayoutContext = oldContext;
|
||||
|
||||
// invalidate the drawn content, if requested
|
||||
@ -5811,6 +5825,14 @@ _ReservedView11__5BView(BView* view, BPoint point, BToolTip** _toolTip)
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView12__5BView(BView* view)
|
||||
{
|
||||
// LayoutChanged();
|
||||
view->Perform(PERFORM_CODE_LAYOUT_CHANGED, NULL);
|
||||
}
|
||||
|
||||
|
||||
#elif __GNUC__ > 2
|
||||
|
||||
|
||||
@ -5828,7 +5850,6 @@ _ZN5BView15_ReservedView11Ev(BView* view, BPoint point, BToolTip** _toolTip)
|
||||
|
||||
#endif // __GNUC__ > 2
|
||||
|
||||
void BView::_ReservedView12() {}
|
||||
void BView::_ReservedView13() {}
|
||||
void BView::_ReservedView14() {}
|
||||
void BView::_ReservedView15() {}
|
||||
|
Loading…
Reference in New Issue
Block a user