[haiku-commits] r35890 - haiku/trunk/src/kits/interface

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 17 Mar 2010 13:31:51 +0100 (CET)

Author: stippi
Date: 2010-03-17 13:31:51 +0100 (Wed, 17 Mar 2010)
New Revision: 35890
Changeset: http://dev.haiku-os.org/changeset/35890/haiku

Modified:
   haiku/trunk/src/kits/interface/SplitView.cpp
Log:
 * Style cleanup.
 * Use the new cursors.


Modified: haiku/trunk/src/kits/interface/SplitView.cpp
===================================================================
--- haiku/trunk/src/kits/interface/SplitView.cpp        2010-03-17 12:19:34 UTC 
(rev 35889)
+++ haiku/trunk/src/kits/interface/SplitView.cpp        2010-03-17 12:31:51 UTC 
(rev 35890)
@@ -13,34 +13,6 @@
 #include "SplitLayout.h"
 
 
-static const unsigned char kHSplitterCursor[] = {
-       16, 1, 8, 8,
-       0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40,
-       0x1a, 0x58, 0x2a, 0x54, 0x4a, 0x52, 0x8a, 0x51,
-       0x8a, 0x51, 0x4a, 0x52, 0x2a, 0x54, 0x1a, 0x58,
-       0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0,
-
-       0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0,
-       0x1b, 0xd8, 0x3b, 0xdc, 0x7b, 0xde, 0xfb, 0xdf,
-       0xfb, 0xdf, 0x7b, 0xde, 0x3b, 0xdc, 0x1b, 0xd8,
-       0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0
-};
-
-static const unsigned char kVSplitterCursor[] = {
-       16, 1, 8, 8,
-       0x01, 0x80, 0x02, 0x40, 0x04, 0x20, 0x08, 0x10,
-       0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0x80, 0x01,
-       0x80, 0x01, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xf0,
-       0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01, 0x80,
-
-       0x01, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0,
-       0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-       0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xf0,
-       0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80
-};
-
-
-// constructor
 BSplitView::BSplitView(enum orientation orientation, float spacing)
        :
        BView(NULL,
@@ -50,19 +22,19 @@
        SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
 }
 
-// destructor
+
 BSplitView::~BSplitView()
 {
 }
 
-// SetInsets
+
 void
 BSplitView::SetInsets(float left, float top, float right, float bottom)
 {
        fSplitLayout->SetInsets(left, top, right, bottom);
 }
 
-// GetInsets
+
 void
 BSplitView::GetInsets(float* left, float* top, float* right,
        float* bottom) const
@@ -70,112 +42,112 @@
        fSplitLayout->GetInsets(left, top, right, bottom);
 }
 
-// Spacing
+
 float
 BSplitView::Spacing() const
 {
        return fSplitLayout->Spacing();
 }
 
-// SetSpacing
+
 void
 BSplitView::SetSpacing(float spacing)
 {
        fSplitLayout->SetSpacing(spacing);
 }
 
-// Orientation
+
 orientation
 BSplitView::Orientation() const
 {
        return fSplitLayout->Orientation();
 }
 
-// SetOrientation
+
 void
 BSplitView::SetOrientation(enum orientation orientation)
 {
        fSplitLayout->SetOrientation(orientation);
 }
 
-// SplitterSize
+
 float
 BSplitView::SplitterSize() const
 {
        return fSplitLayout->SplitterSize();
 }
 
-// SetSplitterSize
+
 void
 BSplitView::SetSplitterSize(float size)
 {
        fSplitLayout->SetSplitterSize(size);
 }
 
-// SetCollapsible
+
 void
 BSplitView::SetCollapsible(bool collapsible)
 {
        fSplitLayout->SetCollapsible(collapsible);
 }
 
-// SetCollapsible
+
 void
 BSplitView::SetCollapsible(int32 index, bool collapsible)
 {
        fSplitLayout->SetCollapsible(index, collapsible);
 }
 
-// SetCollapsible
+
 void
 BSplitView::SetCollapsible(int32 first, int32 last, bool collapsible)
 {
        fSplitLayout->SetCollapsible(first, last, collapsible);
 }
 
-// AddChild
+
 void
 BSplitView::AddChild(BView* child, BView* sibling)
 {
        BView::AddChild(child, sibling);
 }
 
-// AddChild
+
 bool
 BSplitView::AddChild(BView* child, float weight)
 {
        return fSplitLayout->AddView(child, weight);
 }
 
-// AddChild
+
 bool
 BSplitView::AddChild(int32 index, BView* child, float weight)
 {
        return fSplitLayout->AddView(index, child, weight);
 }
 
-// AddChild
+
 bool
 BSplitView::AddChild(BLayoutItem* child)
 {
        return fSplitLayout->AddItem(child);
 }
 
-// AddChild
+
 bool
 BSplitView::AddChild(BLayoutItem* child, float weight)
 {
        return fSplitLayout->AddItem(child, weight);
 }
 
-// AddChild
+
 bool
 BSplitView::AddChild(int32 index, BLayoutItem* child, float weight)
 {
        return fSplitLayout->AddItem(index, child, weight);
 }
 
-// Draw
+
 void
 BSplitView::Draw(BRect updateRect)
 {
@@ -189,7 +161,7 @@
        }
 }
 
-// MouseDown
+
 void
 BSplitView::MouseDown(BPoint where)
 {
@@ -200,7 +172,7 @@
                Invalidate();
 }
 
-// MouseUp
+
 void
 BSplitView::MouseUp(BPoint where)
 {
@@ -210,19 +182,19 @@
        }
 }
 
-// MouseMoved
+
 void
 BSplitView::MouseMoved(BPoint where, uint32 transit, const BMessage* message)
 {
-       BCursor cursor(B_CURSOR_SYSTEM_DEFAULT);
+       BCursor cursor(B_CURSOR_ID_SYSTEM_DEFAULT);
 
        int32 splitterIndex = fSplitLayout->DraggedSplitter();
 
        if (splitterIndex >= 0 || fSplitLayout->IsAboveSplitter(where)) {
                if (Orientation() == B_VERTICAL)
-                       cursor = BCursor(kVSplitterCursor);
+                       cursor = BCursor(B_CURSOR_ID_RESIZE_NORTH_SOUTH);
                else
-                       cursor = BCursor(kHSplitterCursor);
+                       cursor = BCursor(B_CURSOR_ID_RESIZE_EAST_WEST);
        }
 
        if (splitterIndex >= 0) {
@@ -236,14 +208,14 @@
        SetViewCursor(&cursor, true);
 }
 
-// SetLayout
+
 void
 BSplitView::SetLayout(BLayout* layout)
 {
        // not allowed
 }
 
-// DrawSplitter
+
 void
 BSplitView::DrawSplitter(BRect frame, const BRect& updateRect,
        enum orientation orientation, bool pressed)
@@ -251,7 +223,7 @@
        _DrawDefaultSplitter(this, frame, updateRect, orientation, pressed);
 }
 
-// _DrawDefaultSplitter
+
 void
 BSplitView::_DrawDefaultSplitter(BView* view, BRect frame,
        const BRect& updateRect, enum orientation orientation, bool pressed)


Other related posts: