* Set the _RESIZE_MASK_ macro to 0xffff. It was the bitwise inverse of the

disjunction of all view flags before, and the new layout related flags were
  missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
  directly in a derived class instead of a separate BLayout, one needs to
  override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21355 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-06-08 23:24:38 +00:00
parent ea2dcf71dc
commit d432839022
2 changed files with 47 additions and 42 deletions
+3 -5
View File
@@ -80,9 +80,7 @@ const uint32 _B_RESERVED7_ = 0x00200000UL; /* 22 */
const uint32 B_SUPPORTS_LAYOUT = 0x00100000UL; /* 21 */
const uint32 B_INVALIDATE_AFTER_LAYOUT = 0x00080000UL; /* 20 */
#define _RESIZE_MASK_ ~(B_FULL_UPDATE_ON_RESIZE | _B_RESERVED1_ | B_WILL_DRAW \
| B_PULSE_NEEDED | B_NAVIGABLE_JUMP | B_FRAME_EVENTS | B_NAVIGABLE \
| B_SUBPIXEL_PRECISE | B_DRAW_ON_CHILDREN | B_INPUT_METHOD_AWARE | _B_RESERVED7_)
#define _RESIZE_MASK_ (0xffff)
const uint32 _VIEW_TOP_ = 1UL;
const uint32 _VIEW_LEFT_ = 2UL;
@@ -473,6 +471,7 @@ public:
void MoveTo(float x, float y);
void ResizeBy(float dh, float dv);
void ResizeTo(float width, float height);
void ResizeTo(BSize size);
void ScrollBy(float dh, float dv);
void ScrollTo(float x, float y);
virtual void ScrollTo(BPoint where);
@@ -533,7 +532,7 @@ public:
virtual void SetLayout(BLayout* layout);
BLayout* GetLayout() const;
void InvalidateLayout(bool descendants = false);
virtual void InvalidateLayout(bool descendants = false);
void EnableLayoutInvalidation();
void DisableLayoutInvalidation();
bool IsLayoutValid() const;
@@ -560,7 +559,6 @@ private:
friend class BTabView;
friend class BWindow;
virtual void _ReservedView10();
virtual void _ReservedView11();
virtual void _ReservedView12();
virtual void _ReservedView13();